QMediaCaptureSession

The QMediaCaptureSession class allows capturing of audio and video content. More

Inheritance diagram of PySide6.QtMultimedia.QMediaCaptureSession

New in version 6.1.

Synopsis

Functions

Detailed Description

The QMediaCaptureSession is the central class that manages capturing of media on the local device.

You can connect a camera and a microphone to QMediaCaptureSession using setCamera() and setAudioInput() . A preview of the captured media can be seen by setting a QVideoSink of QVideoWidget using setVideoOutput() and heard by routing the audio to an output device using setAudioOutput() .

You can capture still images from a camera by setting a QImageCapture object on the capture session, and record audio/video using a QMediaRecorder .

class PySide6.QtMultimedia.QMediaCaptureSession([parent=None])
Parameters

parentPySide6.QtCore.QObject

Creates a session for media capture from the parent object.

PySide6.QtMultimedia.QMediaCaptureSession.audioInput()
Return type

PySide6.QtMultimedia.QAudioInput

Returns the device that is being used to capture audio.

See also

setAudioInput()

PySide6.QtMultimedia.QMediaCaptureSession.audioInputChanged()
PySide6.QtMultimedia.QMediaCaptureSession.audioOutput()
Return type

PySide6.QtMultimedia.QAudioOutput

See also

setAudioOutput()

PySide6.QtMultimedia.QMediaCaptureSession.audioOutputChanged()
PySide6.QtMultimedia.QMediaCaptureSession.camera()
Return type

PySide6.QtMultimedia.QCamera

See also

setCamera()

PySide6.QtMultimedia.QMediaCaptureSession.cameraChanged()
PySide6.QtMultimedia.QMediaCaptureSession.imageCapture()
Return type

PySide6.QtMultimedia.QImageCapture

PySide6.QtMultimedia.QMediaCaptureSession.imageCaptureChanged()
PySide6.QtMultimedia.QMediaCaptureSession.recorder()
Return type

PySide6.QtMultimedia.QMediaRecorder

See also

setRecorder()

PySide6.QtMultimedia.QMediaCaptureSession.recorderChanged()
PySide6.QtMultimedia.QMediaCaptureSession.setAudioInput(input)
Parameters

inputPySide6.QtMultimedia.QAudioInput

Sets the audio input device to input. If setting it to an empty QAudioDevice the capture session will use the default input as defined by the operating system.

See also

audioInput()

PySide6.QtMultimedia.QMediaCaptureSession.setAudioOutput(output)
Parameters

outputPySide6.QtMultimedia.QAudioOutput

Sets the audio output device to output.

See also

audioOutput()

PySide6.QtMultimedia.QMediaCaptureSession.setCamera(camera)
Parameters

cameraPySide6.QtMultimedia.QCamera

See also

camera()

PySide6.QtMultimedia.QMediaCaptureSession.setImageCapture(imageCapture)
Parameters

imageCapturePySide6.QtMultimedia.QImageCapture

See also

imageCapture()

PySide6.QtMultimedia.QMediaCaptureSession.setRecorder(recorder)
Parameters

recorderPySide6.QtMultimedia.QMediaRecorder

See also

recorder()

PySide6.QtMultimedia.QMediaCaptureSession.setVideoOutput(output)
Parameters

outputPySide6.QtCore.QObject

Sets a QObject , (output), to a video preview for the capture session.

A QObject based preview is expected to have an invokable method that returns a QVideoSink .

The previously set preview is detached.

See also

videoOutput()

PySide6.QtMultimedia.QMediaCaptureSession.setVideoSink(sink)
Parameters

sinkPySide6.QtMultimedia.QVideoSink

Sets a QVideoSink , (sink), to a video preview for the capture session.

A QObject based preview is expected to have an invokable method that returns a QVideoSink .

The previously set preview is detached.

PySide6.QtMultimedia.QMediaCaptureSession.videoOutput()
Return type

PySide6.QtCore.QObject

See also

setVideoOutput()

PySide6.QtMultimedia.QMediaCaptureSession.videoOutputChanged()
PySide6.QtMultimedia.QMediaCaptureSession.videoSink()
Return type

PySide6.QtMultimedia.QVideoSink