summaryrefslogtreecommitdiffstats
path: root/src/plugins/directshow/player
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-12 10:59:51 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-12 15:19:04 +0200
commitd25ed5222aec9e642ac534aea463a91c1952f229 (patch)
tree751fb0fc3d0174db1d69d5dafedfca0d0932f14d /src/plugins/directshow/player
parent8849979754d45dc911e10e9b4942615352e5f3a0 (diff)
DirectShow: Use member initialization
Change-Id: I4e696083c2ed78b374f2df64706ecb2297f122dd Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Diffstat (limited to 'src/plugins/directshow/player')
-rw-r--r--src/plugins/directshow/player/directshowaudioendpointcontrol.cpp2
-rw-r--r--src/plugins/directshow/player/directshowaudioendpointcontrol.h4
-rw-r--r--src/plugins/directshow/player/directshowevrvideowindowcontrol.cpp1
-rw-r--r--src/plugins/directshow/player/directshowevrvideowindowcontrol.h2
-rw-r--r--src/plugins/directshow/player/directshowioreader.cpp20
-rw-r--r--src/plugins/directshow/player/directshowioreader.h24
-rw-r--r--src/plugins/directshow/player/directshowiosource.cpp11
-rw-r--r--src/plugins/directshow/player/directshowiosource.h18
-rw-r--r--src/plugins/directshow/player/directshowmetadatacontrol.cpp1
-rw-r--r--src/plugins/directshow/player/directshowmetadatacontrol.h2
-rw-r--r--src/plugins/directshow/player/directshowplayercontrol.cpp13
-rw-r--r--src/plugins/directshow/player/directshowplayercontrol.h28
-rw-r--r--src/plugins/directshow/player/directshowplayerservice.cpp29
-rw-r--r--src/plugins/directshow/player/directshowplayerservice.h64
-rw-r--r--src/plugins/directshow/player/directshowvideorenderercontrol.cpp5
-rw-r--r--src/plugins/directshow/player/directshowvideorenderercontrol.h6
-rw-r--r--src/plugins/directshow/player/videosurfacefilter.cpp10
-rw-r--r--src/plugins/directshow/player/videosurfacefilter.h20
-rw-r--r--src/plugins/directshow/player/vmr9videowindowcontrol.cpp9
-rw-r--r--src/plugins/directshow/player/vmr9videowindowcontrol.h18
20 files changed, 97 insertions, 190 deletions
diff --git a/src/plugins/directshow/player/directshowaudioendpointcontrol.cpp b/src/plugins/directshow/player/directshowaudioendpointcontrol.cpp
index 78733972..3af9a5a2 100644
--- a/src/plugins/directshow/player/directshowaudioendpointcontrol.cpp
+++ b/src/plugins/directshow/player/directshowaudioendpointcontrol.cpp
@@ -48,8 +48,6 @@ DirectShowAudioEndpointControl::DirectShowAudioEndpointControl(
DirectShowPlayerService *service, QObject *parent)
: QAudioOutputSelectorControl(parent)
, m_service(service)
- , m_bindContext(0)
- , m_deviceEnumerator(0)
{
if (CreateBindCtx(0, &m_bindContext) == S_OK) {
m_deviceEnumerator = com_new<ICreateDevEnum>(CLSID_SystemDeviceEnum);
diff --git a/src/plugins/directshow/player/directshowaudioendpointcontrol.h b/src/plugins/directshow/player/directshowaudioendpointcontrol.h
index b6f8a672..1004489d 100644
--- a/src/plugins/directshow/player/directshowaudioendpointcontrol.h
+++ b/src/plugins/directshow/player/directshowaudioendpointcontrol.h
@@ -68,8 +68,8 @@ private:
void updateEndpoints();
DirectShowPlayerService *m_service;
- IBindCtx *m_bindContext;
- ICreateDevEnum *m_deviceEnumerator;
+ IBindCtx *m_bindContext = nullptr;
+ ICreateDevEnum *m_deviceEnumerator = nullptr;
QMap<QString, IMoniker *> m_devices;
QString m_defaultEndpoint;
diff --git a/src/plugins/directshow/player/directshowevrvideowindowcontrol.cpp b/src/plugins/directshow/player/directshowevrvideowindowcontrol.cpp
index fc1058d5..8ef5fd6c 100644
--- a/src/plugins/directshow/player/directshowevrvideowindowcontrol.cpp
+++ b/src/plugins/directshow/player/directshowevrvideowindowcontrol.cpp
@@ -43,7 +43,6 @@
DirectShowEvrVideoWindowControl::DirectShowEvrVideoWindowControl(QObject *parent)
: EvrVideoWindowControl(parent)
- , m_evrFilter(NULL)
{
}
diff --git a/src/plugins/directshow/player/directshowevrvideowindowcontrol.h b/src/plugins/directshow/player/directshowevrvideowindowcontrol.h
index fb661780..314aee3e 100644
--- a/src/plugins/directshow/player/directshowevrvideowindowcontrol.h
+++ b/src/plugins/directshow/player/directshowevrvideowindowcontrol.h
@@ -55,7 +55,7 @@ public:
IBaseFilter *filter();
private:
- IBaseFilter *m_evrFilter;
+ IBaseFilter *m_evrFilter = nullptr;
};
QT_END_NAMESPACE
diff --git a/src/plugins/directshow/player/directshowioreader.cpp b/src/plugins/directshow/player/directshowioreader.cpp
index 3482cee0..5fff295f 100644
--- a/src/plugins/directshow/player/directshowioreader.cpp
+++ b/src/plugins/directshow/player/directshowioreader.cpp
@@ -55,25 +55,23 @@ class DirectShowSampleRequest
public:
DirectShowSampleRequest(
IMediaSample *sample, DWORD_PTR userData, LONGLONG position, LONG length, BYTE *buffer)
- : next(0)
- , sample(sample)
+ : sample(sample)
, userData(userData)
, position(position)
, length(length)
, buffer(buffer)
- , result(S_FALSE)
{
}
DirectShowSampleRequest *remove() { DirectShowSampleRequest *n = next; delete this; return n; }
- DirectShowSampleRequest *next;
+ DirectShowSampleRequest *next = nullptr;
IMediaSample *sample;
DWORD_PTR userData;
LONGLONG position;
LONG length;
BYTE *buffer;
- HRESULT result;
+ HRESULT result = S_FALSE;
};
DirectShowIOReader::DirectShowIOReader(
@@ -81,18 +79,6 @@ DirectShowIOReader::DirectShowIOReader(
: m_source(source)
, m_device(device)
, m_loop(loop)
- , m_pendingHead(0)
- , m_pendingTail(0)
- , m_readyHead(0)
- , m_readyTail(0)
- , m_synchronousPosition(0)
- , m_synchronousLength(0)
- , m_synchronousBytesRead(0)
- , m_synchronousBuffer(0)
- , m_synchronousResult(S_OK)
- , m_totalLength(0)
- , m_availableLength(0)
- , m_flushing(false)
{
moveToThread(device->thread());
diff --git a/src/plugins/directshow/player/directshowioreader.h b/src/plugins/directshow/player/directshowioreader.h
index 55099064..a0f2d7ad 100644
--- a/src/plugins/directshow/player/directshowioreader.h
+++ b/src/plugins/directshow/player/directshowioreader.h
@@ -99,18 +99,18 @@ private:
DirectShowIOSource *m_source;
QIODevice *m_device;
DirectShowEventLoop *m_loop;
- DirectShowSampleRequest *m_pendingHead;
- DirectShowSampleRequest *m_pendingTail;
- DirectShowSampleRequest *m_readyHead;
- DirectShowSampleRequest *m_readyTail;
- LONGLONG m_synchronousPosition;
- LONG m_synchronousLength;
- qint64 m_synchronousBytesRead;
- BYTE *m_synchronousBuffer;
- HRESULT m_synchronousResult;
- LONGLONG m_totalLength;
- LONGLONG m_availableLength;
- bool m_flushing;
+ DirectShowSampleRequest *m_pendingHead = nullptr;
+ DirectShowSampleRequest *m_pendingTail = nullptr;
+ DirectShowSampleRequest *m_readyHead = nullptr;
+ DirectShowSampleRequest *m_readyTail = nullptr;
+ LONGLONG m_synchronousPosition = 0;
+ LONG m_synchronousLength = 0;
+ qint64 m_synchronousBytesRead = 0;
+ BYTE *m_synchronousBuffer = nullptr;
+ HRESULT m_synchronousResult = S_OK;
+ LONGLONG m_totalLength = 0;
+ LONGLONG m_availableLength = 0;
+ bool m_flushing = false;
QMutex m_mutex;
QWaitCondition m_wait;
};
diff --git a/src/plugins/directshow/player/directshowiosource.cpp b/src/plugins/directshow/player/directshowiosource.cpp
index d5833faf..934ac97f 100644
--- a/src/plugins/directshow/player/directshowiosource.cpp
+++ b/src/plugins/directshow/player/directshowiosource.cpp
@@ -66,16 +66,7 @@ static const GUID directshow_subtypes[] =
};
DirectShowIOSource::DirectShowIOSource(DirectShowEventLoop *loop)
- : m_ref(1)
- , m_state(State_Stopped)
- , m_reader(0)
- , m_loop(loop)
- , m_graph(0)
- , m_clock(0)
- , m_allocator(0)
- , m_peerPin(0)
- , m_pinId(QLatin1String("Data"))
- , m_queriedForAsyncReader(false)
+ : m_loop(loop)
{
// This filter has only one possible output type, that is, a stream of data
// with no particular subtype. The graph builder will try every demux/decode filters
diff --git a/src/plugins/directshow/player/directshowiosource.h b/src/plugins/directshow/player/directshowiosource.h
index 02639de7..83784251 100644
--- a/src/plugins/directshow/player/directshowiosource.h
+++ b/src/plugins/directshow/player/directshowiosource.h
@@ -119,19 +119,19 @@ public:
HRESULT STDMETHODCALLTYPE QueryDirection(PIN_DIRECTION *pPinDir) override;
private:
- volatile LONG m_ref;
- FILTER_STATE m_state;
- DirectShowIOReader *m_reader;
+ volatile LONG m_ref = 1;
+ FILTER_STATE m_state = State_Stopped;
+ DirectShowIOReader *m_reader = nullptr;
DirectShowEventLoop *m_loop;
- IFilterGraph *m_graph;
- IReferenceClock *m_clock;
- IMemAllocator *m_allocator;
- IPin *m_peerPin;
+ IFilterGraph *m_graph = nullptr;
+ IReferenceClock *m_clock = nullptr;
+ IMemAllocator *m_allocator = nullptr;
+ IPin *m_peerPin = nullptr;
DirectShowMediaType m_connectionMediaType;
QList<DirectShowMediaType> m_supportedMediaTypes;
QString m_filterName;
- const QString m_pinId;
- bool m_queriedForAsyncReader;
+ const QString m_pinId = QLatin1String("Data");
+ bool m_queriedForAsyncReader = false;
QMutex m_mutex;
};
diff --git a/src/plugins/directshow/player/directshowmetadatacontrol.cpp b/src/plugins/directshow/player/directshowmetadatacontrol.cpp
index 915fa1c7..c87ce82c 100644
--- a/src/plugins/directshow/player/directshowmetadatacontrol.cpp
+++ b/src/plugins/directshow/player/directshowmetadatacontrol.cpp
@@ -445,7 +445,6 @@ static QVariant convertValue(const PROPVARIANT& var)
DirectShowMetaDataControl::DirectShowMetaDataControl(QObject *parent)
: QMetaDataReaderControl(parent)
- , m_available(false)
{
}
diff --git a/src/plugins/directshow/player/directshowmetadatacontrol.h b/src/plugins/directshow/player/directshowmetadatacontrol.h
index 4196a795..36a3ba84 100644
--- a/src/plugins/directshow/player/directshowmetadatacontrol.h
+++ b/src/plugins/directshow/player/directshowmetadatacontrol.h
@@ -76,7 +76,7 @@ private:
};
QVariantMap m_metadata;
- bool m_available;
+ bool m_available = false;
};
QT_END_NAMESPACE
diff --git a/src/plugins/directshow/player/directshowplayercontrol.cpp b/src/plugins/directshow/player/directshowplayercontrol.cpp
index 7de0a686..7e1413b5 100644
--- a/src/plugins/directshow/player/directshowplayercontrol.cpp
+++ b/src/plugins/directshow/player/directshowplayercontrol.cpp
@@ -50,19 +50,6 @@
DirectShowPlayerControl::DirectShowPlayerControl(DirectShowPlayerService *service, QObject *parent)
: QMediaPlayerControl(parent)
, m_service(service)
- , m_audio(0)
- , m_updateProperties(0)
- , m_state(QMediaPlayer::StoppedState)
- , m_status(QMediaPlayer::NoMedia)
- , m_error(QMediaPlayer::NoError)
- , m_streamTypes(0)
- , m_volume(100)
- , m_muted(false)
- , m_emitPosition(-1)
- , m_pendingPosition(-1)
- , m_duration(0)
- , m_playbackRate(0)
- , m_seekable(false)
{
}
diff --git a/src/plugins/directshow/player/directshowplayercontrol.h b/src/plugins/directshow/player/directshowplayercontrol.h
index dba9ab9a..7b235b91 100644
--- a/src/plugins/directshow/player/directshowplayercontrol.h
+++ b/src/plugins/directshow/player/directshowplayercontrol.h
@@ -129,20 +129,20 @@ private:
void setVolumeHelper(int volume);
DirectShowPlayerService *m_service;
- IBasicAudio *m_audio;
- QIODevice *m_stream;
- int m_updateProperties;
- QMediaPlayer::State m_state;
- QMediaPlayer::MediaStatus m_status;
- QMediaPlayer::Error m_error;
- int m_streamTypes;
- int m_volume;
- bool m_muted;
- qint64 m_emitPosition;
- qint64 m_pendingPosition;
- qint64 m_duration;
- qreal m_playbackRate;
- bool m_seekable;
+ IBasicAudio *m_audio = nullptr;
+ QIODevice *m_stream = nullptr;
+ int m_updateProperties = 0;
+ QMediaPlayer::State m_state = QMediaPlayer::StoppedState;
+ QMediaPlayer::MediaStatus m_status = QMediaPlayer::NoMedia;
+ QMediaPlayer::Error m_error = QMediaPlayer::NoError;
+ int m_streamTypes = 0;
+ int m_volume = 100;
+ bool m_muted = false;
+ qint64 m_emitPosition = -1;
+ qint64 m_pendingPosition = -1;
+ qint64 m_duration = 0;
+ qreal m_playbackRate = 0;
+ bool m_seekable = false;
QMediaContent m_media;
QString m_errorString;
diff --git a/src/plugins/directshow/player/directshowplayerservice.cpp b/src/plugins/directshow/player/directshowplayerservice.cpp
index 4b57cdcd..ad0dfabf 100644
--- a/src/plugins/directshow/player/directshowplayerservice.cpp
+++ b/src/plugins/directshow/player/directshowplayerservice.cpp
@@ -123,37 +123,8 @@ private:
DirectShowPlayerService::DirectShowPlayerService(QObject *parent)
: QMediaService(parent)
- , m_playerControl(0)
- , m_metaDataControl(0)
- , m_videoRendererControl(0)
- , m_videoWindowControl(0)
- , m_audioEndpointControl(0)
- , m_audioProbeControl(nullptr)
- , m_videoProbeControl(nullptr)
- , m_audioSampleGrabber(nullptr)
- , m_videoSampleGrabber(nullptr)
- , m_taskThread(0)
, m_loop(qt_directShowEventLoop())
- , m_pendingTasks(0)
- , m_executingTask(0)
- , m_executedTasks(0)
, m_taskHandle(::CreateEvent(0, 0, 0, 0))
- , m_eventHandle(0)
- , m_graphStatus(NoMedia)
- , m_stream(0)
- , m_graph(0)
- , m_graphBuilder(nullptr)
- , m_source(0)
- , m_audioOutput(0)
- , m_videoOutput(0)
- , m_rate(1.0)
- , m_position(0)
- , m_seekPosition(-1)
- , m_duration(0)
- , m_buffering(false)
- , m_seekable(false)
- , m_atEnd(false)
- , m_dontCacheNextSeekResult(false)
{
m_playerControl = new DirectShowPlayerControl(this);
m_metaDataControl = new DirectShowMetaDataControl(this);
diff --git a/src/plugins/directshow/player/directshowplayerservice.h b/src/plugins/directshow/player/directshowplayerservice.h
index a6eeb8a7..329a463e 100644
--- a/src/plugins/directshow/player/directshowplayerservice.h
+++ b/src/plugins/directshow/player/directshowplayerservice.h
@@ -193,44 +193,44 @@ private:
InvalidMedia
};
- DirectShowPlayerControl *m_playerControl;
- DirectShowMetaDataControl *m_metaDataControl;
- DirectShowVideoRendererControl *m_videoRendererControl;
- QVideoWindowControl *m_videoWindowControl;
- DirectShowAudioEndpointControl *m_audioEndpointControl;
- DirectShowAudioProbeControl *m_audioProbeControl;
- DirectShowVideoProbeControl *m_videoProbeControl;
- DirectShowSampleGrabber *m_audioSampleGrabber;
- DirectShowSampleGrabber *m_videoSampleGrabber;
-
- QThread *m_taskThread;
+ DirectShowPlayerControl *m_playerControl = nullptr;
+ DirectShowMetaDataControl *m_metaDataControl = nullptr;
+ DirectShowVideoRendererControl *m_videoRendererControl = nullptr;
+ QVideoWindowControl *m_videoWindowControl = nullptr;
+ DirectShowAudioEndpointControl *m_audioEndpointControl = nullptr;
+ DirectShowAudioProbeControl *m_audioProbeControl = nullptr;
+ DirectShowVideoProbeControl *m_videoProbeControl = nullptr;
+ DirectShowSampleGrabber *m_audioSampleGrabber = nullptr;
+ DirectShowSampleGrabber *m_videoSampleGrabber = nullptr;
+
+ QThread *m_taskThread = nullptr;
DirectShowEventLoop *m_loop;
- int m_pendingTasks;
- int m_executingTask;
- int m_executedTasks;
- int m_streamTypes;
+ int m_pendingTasks = 0;
+ int m_executingTask = 0;
+ int m_executedTasks = 0;
+ int m_streamTypes = 0;
HANDLE m_taskHandle;
- HANDLE m_eventHandle;
- GraphStatus m_graphStatus;
- QMediaPlayer::Error m_error;
- QIODevice *m_stream;
- IFilterGraph2 *m_graph;
- ICaptureGraphBuilder2 *m_graphBuilder;
- IBaseFilter *m_source;
- IBaseFilter *m_audioOutput;
- IBaseFilter *m_videoOutput;
- qreal m_rate;
- qint64 m_position;
- qint64 m_seekPosition;
- qint64 m_duration;
+ HANDLE m_eventHandle = nullptr;
+ GraphStatus m_graphStatus = NoMedia;
+ QMediaPlayer::Error m_error = QMediaPlayer::NoError;
+ QIODevice *m_stream = nullptr;
+ IFilterGraph2 *m_graph = nullptr;
+ ICaptureGraphBuilder2 *m_graphBuilder = nullptr;
+ IBaseFilter *m_source = nullptr;
+ IBaseFilter *m_audioOutput = nullptr;
+ IBaseFilter *m_videoOutput = nullptr;
+ qreal m_rate = 1;
+ qint64 m_position = 0;
+ qint64 m_seekPosition = -1;
+ qint64 m_duration = 0;
QMediaTimeRange m_playbackRange;
QUrl m_url;
QString m_errorString;
QMutex m_mutex;
- bool m_buffering;
- bool m_seekable;
- bool m_atEnd;
- bool m_dontCacheNextSeekResult;
+ bool m_buffering = false;
+ bool m_seekable = false;
+ bool m_atEnd = false;
+ bool m_dontCacheNextSeekResult = false;
QVariantMap m_metadata;
friend class DirectShowPlayerServiceThread;
diff --git a/src/plugins/directshow/player/directshowvideorenderercontrol.cpp b/src/plugins/directshow/player/directshowvideorenderercontrol.cpp
index 88b5a51e..18eb9218 100644
--- a/src/plugins/directshow/player/directshowvideorenderercontrol.cpp
+++ b/src/plugins/directshow/player/directshowvideorenderercontrol.cpp
@@ -51,11 +51,6 @@
DirectShowVideoRendererControl::DirectShowVideoRendererControl(DirectShowEventLoop *loop, QObject *parent)
: QVideoRendererControl(parent)
, m_loop(loop)
- , m_surface(0)
- , m_filter(0)
-#if QT_CONFIG(evr)
- , m_evrPresenter(0)
-#endif
{
}
diff --git a/src/plugins/directshow/player/directshowvideorenderercontrol.h b/src/plugins/directshow/player/directshowvideorenderercontrol.h
index b2abeeae..09d66b13 100644
--- a/src/plugins/directshow/player/directshowvideorenderercontrol.h
+++ b/src/plugins/directshow/player/directshowvideorenderercontrol.h
@@ -71,10 +71,10 @@ Q_SIGNALS:
private:
DirectShowEventLoop *m_loop;
- QAbstractVideoSurface *m_surface;
- IBaseFilter *m_filter;
+ QAbstractVideoSurface *m_surface = nullptr;
+ IBaseFilter *m_filter = nullptr;
#if QT_CONFIG(evr)
- EVRCustomPresenter *m_evrPresenter;
+ EVRCustomPresenter *m_evrPresenter = nullptr;
#endif
};
diff --git a/src/plugins/directshow/player/videosurfacefilter.cpp b/src/plugins/directshow/player/videosurfacefilter.cpp
index 70159d5e..bb06d187 100644
--- a/src/plugins/directshow/player/videosurfacefilter.cpp
+++ b/src/plugins/directshow/player/videosurfacefilter.cpp
@@ -222,20 +222,10 @@ HRESULT VideoSurfaceInputPin::Receive(IMediaSample *pMediaSample)
VideoSurfaceFilter::VideoSurfaceFilter(QAbstractVideoSurface *surface, DirectShowEventLoop *loop, QObject *parent)
: QObject(parent)
, m_loop(loop)
- , m_pin(NULL)
, m_surface(surface)
- , m_bytesPerLine(0)
- , m_surfaceStarted(false)
, m_renderMutex(QMutex::Recursive)
- , m_running(false)
- , m_pendingSample(NULL)
- , m_pendingSampleEndTime(0)
, m_renderEvent(CreateEvent(NULL, FALSE, FALSE, NULL))
, m_flushEvent(CreateEvent(NULL, TRUE, FALSE, NULL))
- , m_adviseCookie(0)
- , m_EOS(false)
- , m_EOSDelivered(false)
- , m_EOSTimer(0)
{
supportedFormatsChanged();
connect(surface, &QAbstractVideoSurface::supportedFormatsChanged,
diff --git a/src/plugins/directshow/player/videosurfacefilter.h b/src/plugins/directshow/player/videosurfacefilter.h
index 56791f27..91f1b28a 100644
--- a/src/plugins/directshow/player/videosurfacefilter.h
+++ b/src/plugins/directshow/player/videosurfacefilter.h
@@ -130,28 +130,28 @@ private:
QMutex m_mutex;
DirectShowEventLoop *m_loop;
- VideoSurfaceInputPin *m_pin;
+ VideoSurfaceInputPin *m_pin = nullptr;
QWaitCondition m_waitSurface;
QAbstractVideoSurface *m_surface;
QVideoSurfaceFormat m_surfaceFormat;
- int m_bytesPerLine;
- bool m_surfaceStarted;
+ int m_bytesPerLine = 0;
+ bool m_surfaceStarted = false;
QList<GUID> m_supportedTypes;
QReadWriteLock m_typesLock;
QMutex m_renderMutex;
- bool m_running;
- IMediaSample *m_pendingSample;
- REFERENCE_TIME m_pendingSampleEndTime;
+ bool m_running = false;
+ IMediaSample *m_pendingSample = nullptr;
+ REFERENCE_TIME m_pendingSampleEndTime = 0;
HANDLE m_renderEvent;
HANDLE m_flushEvent;
- DWORD_PTR m_adviseCookie;
+ DWORD_PTR m_adviseCookie = 0;
- bool m_EOS;
- bool m_EOSDelivered;
- UINT m_EOSTimer;
+ bool m_EOS = false;
+ bool m_EOSDelivered = false;
+ UINT m_EOSTimer = 0;
friend class VideoSurfaceInputPin;
};
diff --git a/src/plugins/directshow/player/vmr9videowindowcontrol.cpp b/src/plugins/directshow/player/vmr9videowindowcontrol.cpp
index c026a12d..76444be0 100644
--- a/src/plugins/directshow/player/vmr9videowindowcontrol.cpp
+++ b/src/plugins/directshow/player/vmr9videowindowcontrol.cpp
@@ -49,15 +49,6 @@
Vmr9VideoWindowControl::Vmr9VideoWindowControl(QObject *parent)
: QVideoWindowControl(parent)
, m_filter(com_new<IBaseFilter>(CLSID_VideoMixingRenderer9))
- , m_windowId(0)
- , m_windowColor(RGB(0, 0, 0))
- , m_dirtyValues(0)
- , m_aspectRatioMode(Qt::KeepAspectRatio)
- , m_brightness(0)
- , m_contrast(0)
- , m_hue(0)
- , m_saturation(0)
- , m_fullScreen(false)
{
if (IVMRFilterConfig9 *config = com_cast<IVMRFilterConfig9>(m_filter, IID_IVMRFilterConfig9)) {
config->SetRenderingMode(VMR9Mode_Windowless);
diff --git a/src/plugins/directshow/player/vmr9videowindowcontrol.h b/src/plugins/directshow/player/vmr9videowindowcontrol.h
index 8ab9bd50..c814c2c8 100644
--- a/src/plugins/directshow/player/vmr9videowindowcontrol.h
+++ b/src/plugins/directshow/player/vmr9videowindowcontrol.h
@@ -91,16 +91,16 @@ private:
IVMRMixerControl9 *control, VMR9ProcAmpControlFlags property, int value) const;
IBaseFilter *m_filter;
- WId m_windowId;
- COLORREF m_windowColor;
- DWORD m_dirtyValues;
- Qt::AspectRatioMode m_aspectRatioMode;
+ WId m_windowId = 0;
+ COLORREF m_windowColor = RGB(0, 0, 0);
+ DWORD m_dirtyValues = 0;
+ Qt::AspectRatioMode m_aspectRatioMode = Qt::KeepAspectRatio;
QRect m_displayRect;
- int m_brightness;
- int m_contrast;
- int m_hue;
- int m_saturation;
- bool m_fullScreen;
+ int m_brightness = 0;
+ int m_contrast = 0;
+ int m_hue = 0;
+ int m_saturation = 0;
+ bool m_fullScreen = false;
};
QT_END_NAMESPACE