51 DWORD dwStreamFlags, LONGLONG llTimestamp, IMFSample *pSample)
override;
59 bool activate(
const QString &cameraId,
60 const QCameraFormat &cameraFormat,
61 const QString µphoneId);
95 HRESULT createSource(
const QString &deviceId,
bool video, IMFMediaSource **source);
96 HRESULT createAggregateReader(IMFMediaSource *firstSource, IMFMediaSource *secondSource,
97 IMFMediaSource **aggregateSource, IMFSourceReader **sourceReader);
98 HRESULT createVideoMediaType(
const GUID &format, UINT32 bitRate, UINT32 width, UINT32 height,
99 qreal frameRate, IMFMediaType **mediaType);
100 HRESULT createAudioMediaType(
const GUID &format, UINT32 bitRate, IMFMediaType **mediaType);
101 HRESULT initAudioType(IMFMediaType *mediaType, UINT32 channels, UINT32 samplesPerSec,
bool flt);
102 HRESULT prepareVideoStream(DWORD mediaTypeIndex);
103 HRESULT prepareAudioStream();
104 HRESULT initSourceIndexes();
105 HRESULT updateSinkInputMediaTypes();
106 HRESULT startMonitoring();
107 void stopMonitoring();
108 void releaseResources();
109 void stopStreaming();
110 DWORD findMediaTypeIndex(
const QCameraFormat &reqFormat);
114 QWaitCondition m_hasFinalized;
115 IMFMediaSource *m_videoSource =
nullptr;
116 IMFMediaType *m_videoMediaType =
nullptr;
117 IMFMediaSource *m_audioSource =
nullptr;
118 IMFMediaType *m_audioMediaType =
nullptr;
119 IMFMediaSource *m_aggregateSource =
nullptr;
120 IMFSourceReader *m_sourceReader =
nullptr;
121 IMFSinkWriter *m_sinkWriter =
nullptr;
122 IMFMediaSink *m_monitorSink =
nullptr;
123 IMFSinkWriter *m_monitorWriter =
nullptr;
124 QString m_audioOutputId;
129 UINT32 m_frameWidth = 0;
130 UINT32 m_frameHeight = 0;
131 qreal m_frameRate = 0.0;
133 bool m_active =
false;
134 bool m_streaming =
false;
135 bool m_recording =
false;
136 bool m_firstFrame =
false;
137 bool m_paused =
false;
138 bool m_pauseChanging =
false;
139 bool m_inputMuted =
false;
140 bool m_outputMuted =
false;
141 qreal m_inputVolume = 1.0;
142 qreal m_outputVolume = 1.0;
144 LONGLONG m_timeOffset = 0;
145 LONGLONG m_pauseTime = 0;
146 LONGLONG m_lastTimestamp = 0;
147 QTimer m_durationTimer;
148 qint64 m_currentDuration = -1;
149 qint64 m_lastDuration = -1;