Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qqnxmediacapturesession.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 Research In Motion
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#include "qqnxaudioinput_p.h"
9#include "qqnxvideosink_p.h"
10#include "qvideosink.h"
11
13
18
22
24{
25 return m_camera;
26}
27
29{
30 if (camera == m_camera)
31 return;
32
33 if (m_camera)
34 m_camera->setCaptureSession(nullptr);
35
36 m_camera = static_cast<QQnxPlatformCamera *>(camera);
37
38 if (m_camera)
39 m_camera->setCaptureSession(this);
40
42}
43
48
50{
51 if (m_imageCapture == imageCapture)
52 return;
53
54 if (m_imageCapture)
55 m_imageCapture->setCaptureSession(nullptr);
56
57 m_imageCapture = static_cast<QQnxImageCapture *>(imageCapture);
58
59 if (m_imageCapture)
60 m_imageCapture->setCaptureSession(this);
61
63}
64
69
71{
72 if (m_mediaRecorder == mediaRecorder)
73 return;
74
75 if (m_mediaRecorder)
76 m_mediaRecorder->setCaptureSession(nullptr);
77
78 m_mediaRecorder = static_cast<QQnxMediaRecorder *>(mediaRecorder);
79
80 if (m_mediaRecorder)
81 m_mediaRecorder->setCaptureSession(this);
82
84}
85
87{
88 if (m_audioInput == input)
89 return;
90
91 m_audioInput = static_cast<QQnxAudioInput*>(input);
92}
93
95{
96 auto qnxSink = sink ? static_cast<QQnxVideoSink *>(sink->platformVideoSink()) : nullptr;
97 if (m_videoSink == qnxSink)
98 return;
99 m_videoSink = qnxSink;
100}
101
103{
104 if (m_audioOutput == output)
105 return;
106 m_audioOutput = output;
107}
108
110{
111 return m_audioInput;
112}
113
115{
116 return m_videoSink;
117}
118
120
121#include "moc_qqnxmediacapturesession_p.cpp"
void setCaptureSession(QQnxMediaCaptureSession *session)
void setMediaRecorder(QPlatformMediaRecorder *mediaRecorder) override
void setAudioOutput(QPlatformAudioOutput *output) override
void setCamera(QPlatformCamera *camera) override
QPlatformCamera * camera() override
void setAudioInput(QPlatformAudioInput *input) override
QPlatformMediaRecorder * mediaRecorder() override
void setImageCapture(QPlatformImageCapture *imageCapture) override
QPlatformImageCapture * imageCapture() override
QQnxAudioInput * audioInput() const
QQnxVideoSink * videoSink() const
void setVideoPreview(QVideoSink *sink) override
void setCaptureSession(QQnxMediaCaptureSession *session)
void setCaptureSession(QPlatformMediaCaptureSession *session) override
The QVideoSink class represents a generic sink for video data.
Definition qvideosink.h:22
QCamera * camera
Definition camera.cpp:19
QImageCapture * imageCapture
Definition camera.cpp:21
Combined button and popup list for selecting options.
GLsizei GLenum GLboolean sink
GLenum GLenum GLenum input
#define emit
QT_BEGIN_NAMESPACE typedef uchar * output