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