Commit 459d3241 authored by Harald Sitter's avatar Harald Sitter
Browse files

disconnect all signals of a videowidget upon disconnect as to avoid signal...

disconnect all signals of a videowidget upon disconnect as to avoid signal connection duplication etc.
parent da1722d3
......@@ -80,6 +80,14 @@ void VideoWidget::connectToMediaObject(MediaObject *mediaObject)
clearPendingAdjusts();
}
void VideoWidget::disconnectFromMediaObject(MediaObject *mediaObject)
{
SinkNode::disconnectFromMediaObject(mediaObject);
// Undo all connections or path creation->destruction->creation can cause
// duplicated connections or getting singals from two different MediaObjects.
disconnect(mediaObject, 0, this, 0);
}
#ifndef PHONON_VLC_NO_EXPERIMENTAL
void VideoWidget::connectToAvCapture(Experimental::AvCapture *avCapture)
{
......
......@@ -73,6 +73,11 @@ public:
*/
void connectToMediaObject(MediaObject *mediaObject);
/**
* Overloads SinkNode.
*/
void disconnectFromMediaObject(MediaObject *mediaObject);
#ifndef PHONON_VLC_NO_EXPERIMENTAL
/**
* Connects the VideoWidget to an AvCapture. connectToMediaObject() is called
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment