After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 663616 - [gstffmpegdec] Properly report latency
[gstffmpegdec] Properly report latency
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-libav
git master
Other Linux
: Normal enhancement
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-11-08 12:49 UTC by Edward Hervey
Modified: 2012-09-13 13:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ffmpegdec: Report latency if B-frames are present (3.17 KB, patch)
2011-11-08 17:58 UTC, Edward Hervey
none Details | Review
Cleanup an unused boolean (has_b_frames) (1.00 KB, patch)
2012-09-13 13:45 UTC, Nicolas Dufresne (ndufresne)
none Details | Review
Set latency base on the number of bframes (1.35 KB, patch)
2012-09-13 13:45 UTC, Nicolas Dufresne (ndufresne)
none Details | Review

Description Edward Hervey 2011-11-08 12:49:18 UTC
There are a couple of places where ffmpeg introduces latency which we should report in the LATENCY query.

* When using frame-based multi-threading (FF_THREAD_FRAME), there will be an introduced latency of at least one frame [0]

* When context->has_b_frames is !=0, there is an introduced latency of has_b_frames.

[0] http://git.libav.org/?p=libav.git;a=blob;f=libavcodec/avcodec.h;h=f169bec37e487c85f13942bb7a1b691b404d8566;hb=HEAD#l2886
Comment 1 Edward Hervey 2011-11-08 17:58:03 UTC
Created attachment 201018 [details] [review]
ffmpegdec: Report latency if B-frames are present

... and cleanup the query handler while we're at it
Comment 2 Not Used 2012-06-11 20:01:14 UTC
This patch will need porting as we are using base class now. For some reason, in my testing, I see has_b_frames + 1 or latency when running with a single thread.
Comment 3 Nicolas Dufresne (ndufresne) 2012-09-13 13:44:36 UTC
I no longer see that +1 bug in .11. Here's a branch that reintroduce latency support implement the same way as Edward did.

http://cgit.collabora.com/git/user/nicolas/gst-ffmpeg.git/log/?h=fixup
Comment 4 Nicolas Dufresne (ndufresne) 2012-09-13 13:45:22 UTC
Created attachment 224223 [details] [review]
Cleanup an unused boolean (has_b_frames)
Comment 5 Nicolas Dufresne (ndufresne) 2012-09-13 13:45:52 UTC
Created attachment 224224 [details] [review]
Set latency base on the number of bframes
Comment 6 Edward Hervey 2012-09-13 13:49:34 UTC
commit 3ca45b8c454699aef97b4a162e5472e3b4b86537
Author: Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
Date:   Thu Sep 13 09:36:14 2012 -0400

    viddec: Set latency base on the number of bframes

commit 1f74496b8a6bd536484d05e45272db88822c67ca
Author: Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
Date:   Thu Sep 13 09:34:29 2012 -0400

    viddec: Cleanup unused has_b_frames flag