7#include "private/qwindowsmultimediautils_p.h"
8#include "private/qplatformvideosink_p.h"
10#include <QtCore/qdebug.h>
21 this, &QWindowsMediaDeviceSession::handleStreamingStarted);
23 this, &QWindowsMediaDeviceSession::handleStreamingStopped);
25 this, &QWindowsMediaDeviceSession::handleStreamingError);
27 this, &QWindowsMediaDeviceSession::handleVideoFrameChanged);
40 delete m_mediaDeviceReader;
55 if ((active && (m_active || m_activating)) || (!active && !m_active && !m_activating))
61 if (!camId.isEmpty() || !micId.isEmpty()) {
62 if (m_mediaDeviceReader->
activate(camId, m_cameraFormat, micId)) {
79void QWindowsMediaDeviceSession::reactivate()
81 if (m_active || m_activating) {
91 m_activeCameraDevice =
camera;
97 return m_activeCameraDevice;
102 m_cameraFormat = cameraFormat;
110void QWindowsMediaDeviceSession::handleStreamingStarted()
114 m_activating =
false;
120void QWindowsMediaDeviceSession::handleStreamingStopped()
127void QWindowsMediaDeviceSession::handleStreamingError(
int errorCode)
134void QWindowsMediaDeviceSession::handleVideoFrameChanged(
const QVideoFrame &
frame)
168 if (m_active || m_activating)
174 if (m_audioInput ==
input)
178 m_audioInput =
input;
191 if (m_audioOutput ==
output)
196 if (!m_audioOutput) {
217 if (
res.width() > 0 &&
res.height() > 0) {
234 UINT32 videoBitRate = 0;
236 videoBitRate = UINT32(
settings.videoBitRate());
239 settings.setVideoBitRate(
int(videoBitRate));
242 UINT32 audioBitRate = 0;
244 audioBitRate = UINT32(
settings.audioBitRate());
246 audioBitRate = estimateAudioBitRate(audioFormat, quality);
247 settings.setAudioBitRate(
int(audioBitRate));
252 audioFormat, audioBitRate);
305 if (audioFormat == MFAudioFormat_AAC) {
321 }
else if (audioFormat == MFAudioFormat_MP3) {
338 }
else if (audioFormat == MFAudioFormat_WMAudioV8) {
354 }
else if (audioFormat == MFAudioFormat_WMAudioV9) {
376#include "moc_qwindowsmediadevicesession_p.cpp"
QByteArray id
\qmlproperty string QtMultimedia::audioDevice::id
\qmltype AudioOutput \instantiates QAudioOutput
void mutedChanged(bool muted)
QAudioDevice device
\qmlproperty AudioDevice QtMultimedia::AudioOutput::device
void volumeChanged(float volume)
The QCameraDevice class provides general information about camera devices.
QByteArray id
\qmlproperty string QtMultimedia::cameraDevice::id
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
\threadsafe
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
The QVideoFrame class represents a frame of video data.
The QVideoSink class represents a generic sink for video data.
QPlatformVideoSink * platformVideoSink() const
Combined button and popup list for selecting options.
constexpr const T & qMax(const T &a, const T &b)
GLint GLsizei GLsizei height
GLenum GLenum GLenum input
constexpr QPixelLayout::BPP bitsPerPixel()
QT_BEGIN_NAMESPACE typedef uchar * output
QSettings settings("MySoft", "Star Runner")
[0]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent