QCameraControlclass is an abstract base class for classes that control still cameras or video cameras. 更多 …
此服务被提供由
QMediaService对象凭借 QMediaService::control()。它被用于QCamera.The interface name of
QCameraControlisorg.qt-project.qt.cameracontrol/5.0作为定义在QCameraControl_iid.另请参阅
QCameraControl
(
[
parent=None
]
)
¶
- param parent
QObject
Constructs a camera control object with
parent
.
PySide2.QtMultimedia.QCameraControl.
PropertyChangeType
¶
|
常量 |
描述 |
|---|---|
|
QCameraControl.CaptureMode |
Indicates the capture mode is changed. |
|
QCameraControl.ImageEncodingSettings |
Image encoder settings are changed, including resolution. |
|
QCameraControl.VideoEncodingSettings |
Video encoder settings are changed, including audio, video and container settings. |
|
QCameraControl.Viewfinder |
Viewfinder is changed. |
|
QCameraControl.ViewfinderSettings |
Viewfinder settings are changed. |
PySide2.QtMultimedia.QCameraControl.
canChangeProperty
(
changeType
,
status
)
¶
changeType
–
PropertyChangeType
status
–
Status
bool
Returns true if backend can effectively apply changing camera properties of
changeType
type while the camera state is QCamera::Active and camera status matches
status
参数。
If backend doesn’t support applying this change in the active state, it will be stopped before the settings are changed and restarted after. Otherwise the backend should apply the change in the current state, with the camera status indicating the progress, if necessary.
PySide2.QtMultimedia.QCameraControl.
captureMode
(
)
¶
CaptureModes
Returns the current capture mode.
另请参阅
PySide2.QtMultimedia.QCameraControl.
captureModeChanged
(
mode
)
¶
mode
–
CaptureModes
PySide2.QtMultimedia.QCameraControl.
error
(
error
,
errorString
)
¶
error
–
int
errorString – unicode
PySide2.QtMultimedia.QCameraControl.
isCaptureModeSupported
(
mode
)
¶
mode
–
CaptureModes
bool
Returns true if the capture
mode
is suported.
PySide2.QtMultimedia.QCameraControl.
setCaptureMode
(
arg__1
)
¶
arg__1
–
CaptureModes
Sets the current capture
mode
.
The capture mode changes are synchronous and allowed in any camera state.
If the capture mode is changed while camera is active, it’s recommended to change status to
LoadedStatus
and start activating the camera in the next event loop with the status changed to
StartingStatus
. This allows the capture settings to be applied before camera is started. Than change the status to QCamera::StartedStatus when the capture mode change is done.
另请参阅
PySide2.QtMultimedia.QCameraControl.
setState
(
state
)
¶
state
–
State
Sets the camera
state
.
State changes are synchronous and indicate user intention, while camera status is used as a feedback mechanism to inform application about backend status. Status changes are reported asynchronously with
statusChanged()
信号。
另请参阅
state()
State
PySide2.QtMultimedia.QCameraControl.
state
(
)
¶
State
Returns the state of the camera service.
另请参阅
setState()
state
PySide2.QtMultimedia.QCameraControl.
stateChanged
(
arg__1
)
¶
arg__1
–
State
PySide2.QtMultimedia.QCameraControl.
status
(
)
¶
Status
Returns the status of the camera service.
另请参阅
state
PySide2.QtMultimedia.QCameraControl.
statusChanged
(
arg__1
)
¶
arg__1
–
Status