GNOME Bugzilla – Bug 619136
[dvdsubdec] spits out buffers at video framerate
Last modified: 2011-03-15 10:05:34 UTC
when expected behaviour, according to wtay, is that it should output only one buffer on every new vob subpicture. in my app the dvdsubdec is connected to the text-sink of a playbin2 playing an mkv container. dvdsubdec is in a bin together with an appsink that hands off the buffer and blits it on hardware at the correct time. of course, with a new buffer ever 32 ms, this kills our little embedded system :) got new subpicture @ buf_pos = 4756000000 ns (in pts=428044), len=1658880 bytes. eServiceMP3::pushSubtitles VOB show_pts = 428044 running_pts = 426960 diff = 12 immediate show! m_subtitle_widget = 0x1555000, frontpage.vob_page = 0x1551dd8 blitting... eServiceMP3::pushSubtitles VOB show_pts = 430924 running_pts = 426960 diff = 44 start recheck timer eServiceMP3::pushSubtitles VOB show_pts = 430924 running_pts = 432720 diff = -19 immediate show! m_subtitle_widget = 0x1555000, frontpage.vob_page = 0x15917c0 blitting... got new subpicture @ buf_pos = 4820000000 ns (in pts=433804), len=1658880 bytes. eServiceMP3::pushSubtitles VOB show_pts = 433804 running_pts = 435600 diff = -19 immediate show! m_subtitle_widget = 0x1555000, frontpage.vob_page = 0x15419d8 blitting... got new subpicture @ buf_pos = 4852000000 ns (in pts=436684), len=1658880 bytes. eServiceMP3::pushSubtitles VOB show_pts = 436684 running_pts = 441360 diff = -51 immediate show! m_subtitle_widget = 0x1555000, frontpage.vob_page = 0x15573e0 blitting... got new subpicture @ buf_pos = 4884000000 ns (in pts=439564), len=1658880 bytes. eServiceMP3::pushSubtitles VOB show_pts = 439564 running_pts = 441360 diff = -19 immediate show! m_subtitle_widget = 0x1555000, frontpage.vob_page = 0x150f760 blitting... got new subpicture @ buf_pos = 4916000000 ns (in pts=442444), len=1658880 bytes. eServiceMP3::pushSubtitles VOB show_pts = 442444 running_pts = 444240 diff = -19 immediate show! m_subtitle_widget = 0x1555000, frontpage.vob_page = 0x15575c8 blitting... got new subpicture @ buf_pos = 4948000000 ns (in pts=445324), len=1658880 bytes. eServiceMP3::pushSubtitles VOB show_pts = 445324 running_pts = 444240 diff = 12 immediate show! m_subtitle_widget = 0x1555000, frontpage.vob_page = 0x14a3858 blitting... got new subpicture @ buf_pos = 4980000000 ns (in pts=448204), len=1658880 bytes. eServiceMP3::pushSubtitles VOB show_pts = 448204 running_pts = 447120 diff = 12 immediate show! m_subtitle_widget = 0x1555000, frontpage.vob_page = 0x1549260 blitting... got new subpicture @ buf_pos = 5012000000 ns (in pts=451084), len=1658880 bytes. eServiceMP3::pushSubtitles VOB show_pts = 451084 running_pts = 447120 diff = 44 start recheck timer got new subpicture @ buf_pos = 5044000000 ns (in pts=453964), len=1658880 bytes. eServiceMP3::pushSubtitles VOB show_pts = 451084 running_pts = 450000 diff = 12 immediate show! m_subtitle_widget = 0x1555000, frontpage.vob_page = 0x15677d8 blitting... eServiceMP3::pushSubtitles VOB show_pts = 453964 running_pts = 450000 diff = 44 start recheck timer got new subpicture @ buf_pos = 5076000000 ns (in pts=456844), len=1658880 bytes. eServiceMP3::pushSubtitles VOB show_pts = 453964 running_pts = 450000 diff = 44 start recheck timer eServiceMP3::pushSubtitles VOB show_pts = 453964 running_pts = 455760 diff = -19 immediate show! m_subtitle_widget = 0x1555000, frontpage.vob_page = 0x154bfd8 blitting... eServiceMP3::pushSubtitles VOB show_pts = 456844 running_pts = 455760 diff = 12 immediate show! m_subtitle_widget = 0x1555000, frontpage.vob_page = 0x15497c8 blitting... got new subpicture @ buf_pos = 5108000000 ns (in pts=459724), len=1658880 bytes. eServiceMP3::pushSubtitles VOB show_pts = 459724 running_pts = 461520 diff = -19 immediate show! m_subtitle_widget = 0x1555000, frontpage.vob_page = 0x1591178 blitting... got new subpicture @ buf_pos = 5140000000 ns (in pts=462604), len=1658880 bytes. eServiceMP3::pushSubtitles VOB show_pts = 462604 running_pts = 464400 diff = -19 immediate show! m_subtitle_widget = 0x1555000, frontpage.vob_page = 0x15549d8 blitting... got new subpicture @ buf_pos = 5172000000 ns (in pts=465484), len=1658880 bytes. eServiceMP3::pushSubtitles VOB show_pts = 465484 running_pts = 470160 diff = -51 immediate show! m_subtitle_widget = 0x1555000, frontpage.vob_page = 0x15683d8 blitting... got new subpicture @ buf_pos = 5204000000 ns (in pts=468364), len=1658880 bytes. eServiceMP3::pushSubtitles VOB show_pts = 468364 running_pts = 473040 diff = -51 immediate show! m_subtitle_widget = 0x1555000, frontpage.vob_page = 0x1568348 blitting...
the output buffer frequency is independet from the framerate prop of dvdsubdec e.g. i have g_object_set (G_OBJECT (dvdsubdec), "framerate", GST_TYPE_FRACTION, 2, 1, NULL); now and it still hands off a buffer every 32ms
Created attachment 162021 [details] [review] [PATCH] dvdsubdec: add singlebuffer property (fixes bug 619136) this will add a property to the dvdsubdec element which will, when set to TRUE, only output one buffer instead of a continues video stream. previous behaviour remains default setting
Comment on attachment 162021 [details] [review] [PATCH] dvdsubdec: add singlebuffer property (fixes bug 619136) This should be the default and only behaviour IMHO. And the durations of the buffers should be until the next SPU.
Created attachment 183411 [details] [review] [PATCH] dvdsubdec: force single_buffer as above and add correct timestamp to buffer Same as above but without a property and the correct end time to the buffer.
commit 101e8a024ff547f81ca34073de454f89e465aa63 Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Tue Mar 15 11:02:42 2011 +0100 dvdsubdec: Rearrange buffer allocation and pushing code a bit This makes the code easier to read, doesn't store every buffer in the instance until the next buffer is to be drawn and fixes an unitialized variable compiler warning. commit 1c1868682e4923e9c8c6fccb477c274a4a86ec17 Author: Brendan Le Foll <blefoll@fluendo.com> Date: Tue Mar 15 10:59:23 2011 +0100 dvdsubdec: Output only a single buffer per subpicture and set the correct duration Fixes bug #619136.