diff options
author | Val Doroshchuk <valentyn.doroshchuk@qt.io> | 2019-08-29 12:46:33 +0200 |
---|---|---|
committer | Val Doroshchuk <valentyn.doroshchuk@qt.io> | 2019-08-29 13:59:40 +0200 |
commit | 94852a47c130c3dc265d900390bf0d7b53cbab3e (patch) | |
tree | 8fcaa692de23e3f14dbb6bd21664c9cb750f7e7f /src/plugins/common/evr/evrcustompresenter.h | |
parent | 012affe3194a48d8bb10d0a100f1d1bbb24ecf7e (diff) |
DirectShow: Add startTime and endTime to QVideoFrame
If the application seeks to a new position, the Media Session restarts
the presentation clock at the specified seek time.
The media source might deliver samples with a slightly earlier time stamp
if the seek time does not fall on a key-frame boundary.
And IMFSample->GetSampleTime will return time that is related to
a position when the clock has been restarted, and can be also negative.
So if it needs to have times from the beginning, it would require to add seeked position
to times from IMFSample.
It also reverts c4de056a6aa44567cdbf2ce91a464e597ad4af8f
Fixes: QTBUG-77849
Change-Id: I1a7cb7bd18aee73087a61d2ed2c3d644ad0fbd50
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'src/plugins/common/evr/evrcustompresenter.h')
-rw-r--r-- | src/plugins/common/evr/evrcustompresenter.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/common/evr/evrcustompresenter.h b/src/plugins/common/evr/evrcustompresenter.h index bd04bd952..9e1ee88d6 100644 --- a/src/plugins/common/evr/evrcustompresenter.h +++ b/src/plugins/common/evr/evrcustompresenter.h @@ -264,6 +264,9 @@ public: bool event(QEvent *) override; +public Q_SLOTS: + void positionChanged(qint64 position); + private: HRESULT checkShutdown() const { @@ -364,6 +367,7 @@ private: QAbstractVideoSurface *m_surface; bool m_canRenderToSurface; + qint64 m_positionOffset; // Seek position in microseconds. }; bool qt_evr_setCustomPresenter(IUnknown *evr, EVRCustomPresenter *presenter); |