13#include <QtMultimediaWidgets/qvideowidget.h>
14#include <QtGui/qscreen.h>
15#include <QtGui/qguiapplication.h>
16#include <QtGui/qimage.h>
86 rotation = (cameraDevice.orientation() - screenAngle) % 360;
89 rotation = (360 - cameraDevice.orientation() + screenAngle) % 360;
126 format.setVideoCodec(QMediaRecorder::VideoCodec::H264);
127 format.setAudioCodec(QMediaRecorder::AudioCodec::MP3);
143 qDebug() << cameraDevice.description();
152 if (cameraDevice.description() ==
"mycamera")
165 qDebug() <<
"The camera is on the front face of the hardware system.";
167 qDebug() <<
"The camera is on the back face of the hardware system.";
The QCameraDevice class provides general information about camera devices.
Position position
\qmlproperty enumeration QtMultimedia::cameraDevice::position
The QCamera class provides interface for system camera devices.
@ WhiteBalanceFluorescent
QCameraDevice cameraDevice
\qmlproperty cameraDevice QtMultimedia::Camera::cameraDevice
void start()
\qmlmethod void Camera::start()
void setWhiteBalanceMode(WhiteBalanceMode mode)
Sets the white balance to mode.
void setZoomFactor(float factor)
Zooms to a zoom factor factor at a rate of 1 factor per second.
void setCustomFocusPoint(const QPointF &point)
QScreen * primaryScreen
the primary (or default) screen of the application.
int capture()
Capture the image and make it available as a QImage.
QImage transformed(const QTransform &matrix, Qt::TransformationMode mode=Qt::FastTransformation) const
\inmodule QtCore\reentrant
The QScreen class is used to query screen properties. \inmodule QtGui.
int angleBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b) const
Convenience function to compute the angle of rotation to get from rotation a to rotation b.
Qt::ScreenOrientation nativeOrientation
the native screen orientation
Qt::ScreenOrientation orientation
the screen orientation
The QVideoSink class represents a generic sink for video data.
GLenum GLenum GLsizei count
GLint GLsizei GLsizei GLenum format
QSettings settings("MySoft", "Star Runner")
[0]