Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QMediaRecorderPrivate Class Reference

#include <qmediarecorder_p.h>

Collaboration diagram for QMediaRecorderPrivate:

Public Member Functions

 QMediaRecorderPrivate ()
 \qmltype MediaRecorder \nativetype QMediaRecorder

Static Public Member Functions

static QString msgFailedStartRecording ()

Public Attributes

QMediaCaptureSessioncaptureSession = nullptr
QPlatformMediaRecordercontrol = nullptr
QString initErrorMessage
bool autoStop = false
bool settingsChanged = false
QMediaEncoderSettings encoderSettings
QMediaRecorderq_ptr = nullptr

Detailed Description

Definition at line 29 of file qmediarecorder_p.h.

Constructor & Destructor Documentation

◆ QMediaRecorderPrivate()

QMediaRecorderPrivate::QMediaRecorderPrivate ( )

\qmltype MediaRecorder \nativetype QMediaRecorder

For encoding and recording media generated in a CaptureSession.

\inqmlmodule QtMultimedia

Use the MediaRecorder element within a CaptureSession to encode and record: \list

  • Audio captured from an audio interface (like microphone or line input).
  • Video captured from camera, screen, or an application window. \endlist

Performance of video encoding and recording is limited by the hardware, the operating system, the installed graphic drivers, and the input video format. If Camera, ScreenCapture, or WindowCapture produces video frames faster than MediaRecorder can encode and record them, the recorder may drop some frames. This is likely to occur if the input frame resolution is high, 4K for example, and hardware-accelerated encoding is unavailable.

Since
6.2 The code below shows a simple capture session containing a MediaRecorder using the default camera and default audio input.

\qml CaptureSession { id: captureSession camera: Camera { id: camera active: true } audioInput: AudioInput {} recorder: MediaRecorder { id: recorder } } \endqml

The code below shows how the recording can be started and stopped. \qml CameraButton { text: "Record" visible: recorder.recorderState !== MediaRecorder.RecordingState onClicked: recorder.record() }

CameraButton { id: stopButton text: "Stop" visible: recorder.recorderState === MediaRecorder.RecordingState onClicked: recorder.stop() } \endqml

See also
CaptureSession, Camera, ScreenCapture, WindowCapture, AudioInput, ImageCapture

Definition at line 122 of file qmediarecorder.cpp.

Member Function Documentation

◆ msgFailedStartRecording()

QString QMediaRecorderPrivate::msgFailedStartRecording ( )
static

Definition at line 131 of file qmediarecorder.cpp.

Member Data Documentation

◆ autoStop

bool QMediaRecorderPrivate::autoStop = false

Definition at line 41 of file qmediarecorder_p.h.

◆ captureSession

QMediaCaptureSession* QMediaRecorderPrivate::captureSession = nullptr

Definition at line 38 of file qmediarecorder_p.h.

◆ control

QPlatformMediaRecorder* QMediaRecorderPrivate::control = nullptr

Definition at line 39 of file qmediarecorder_p.h.

Referenced by QAccessibleQuickControl::QAccessibleQuickControl().

◆ encoderSettings

QMediaEncoderSettings QMediaRecorderPrivate::encoderSettings

Definition at line 45 of file qmediarecorder_p.h.

◆ initErrorMessage

QString QMediaRecorderPrivate::initErrorMessage

Definition at line 40 of file qmediarecorder_p.h.

◆ q_ptr

QMediaRecorder* QMediaRecorderPrivate::q_ptr = nullptr

Definition at line 47 of file qmediarecorder_p.h.

◆ settingsChanged

bool QMediaRecorderPrivate::settingsChanged = false

Definition at line 43 of file qmediarecorder_p.h.


The documentation for this class was generated from the following files: