WMF: Recreate the MFMediaSession when loading a new media.
MFMediaSession doesn't seem to handle correctly the change of media source, causing the playback not to work afterwards. A single MFMediaSession was created and used for every loaded media, we now create a new one whenever we load a new media (releasing the old one beforehand). Task-number: QTBUG-26819 Change-Id: Id99c9dd54e161823d9580933e063f16240806529 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Jason Barron <jason@cutehacks.com>
This commit is contained in:
committed by
The Qt Project
parent
ad83534736
commit
06b63e99e4
@@ -58,7 +58,7 @@ public:
|
||||
QAbstractVideoSurface *surface() const;
|
||||
void setSurface(QAbstractVideoSurface *surface);
|
||||
|
||||
IMFActivate* currentActivate() const;
|
||||
IMFActivate* createActivate();
|
||||
|
||||
protected:
|
||||
void customEvent(QEvent *event);
|
||||
@@ -68,6 +68,8 @@ private Q_SLOTS:
|
||||
void present();
|
||||
|
||||
private:
|
||||
void clear();
|
||||
|
||||
QAbstractVideoSurface *m_surface;
|
||||
IMFActivate *m_currentActivate;
|
||||
IMFSampleGrabberSinkCallback *m_callback;
|
||||
|
||||
Reference in New Issue
Block a user