diff options
author | Artem Dyomin <artem.dyomin@qt.io> | 2023-03-30 18:54:44 +0200 |
---|---|---|
committer | Artem Dyomin <artem.dyomin@qt.io> | 2023-04-12 13:20:49 +0200 |
commit | 57ebebae16d9b4d984709541a1b37e711f48b14d (patch) | |
tree | 8f9f66cf7af6cb6c6284fc0234d2fe51210d4c22 /src/multimedia/platform | |
parent | bfae176fd3297089fb723cd1555b1ac981fed15a (diff) |
Implement seamless ffmpeg playback looping
Users need seamless looping, in other words, looping without
little delays on jumping from the media end to the start.
The only way to make it seamles and smooth is to intrude into the
playback engine. As result, we have just a regular delay between frames
on shifting.
Also, a bunch of adjuscent small improvements have been introduced:
- simplify criteria of the demuxer's buffer size, it was more complex
and a bit not relevant before. Actually, we need to check
only max buffering time.
- Improve handling of media with streams of different length.
- Fix setting of the playback rate before opening sources.
- Add new auto tests for looping.
- Add debug logs.
Pick-to: 6.5
Task-number: QTBUG-112305
Change-Id: Ic9073d77535f5aae19f9ea48d4e745c9f2fa9ea3
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Diffstat (limited to 'src/multimedia/platform')
-rw-r--r-- | src/multimedia/platform/qplatformmediaplayer_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/multimedia/platform/qplatformmediaplayer_p.h b/src/multimedia/platform/qplatformmediaplayer_p.h index a04565668..b2cd5e571 100644 --- a/src/multimedia/platform/qplatformmediaplayer_p.h +++ b/src/multimedia/platform/qplatformmediaplayer_p.h @@ -116,7 +116,8 @@ public: return isSeekable() && (m_loops < 0 || ++m_currentLoop < m_loops); } int loops() { return m_loops; } - void setLoops(int loops) { + virtual void setLoops(int loops) + { if (m_loops == loops) return; m_loops = loops; |