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 645584 - tsdemux: Add GST_SEEK_FLAG_SEGMENT support
tsdemux: Add GST_SEEK_FLAG_SEGMENT support
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-03-23 16:35 UTC by Andreas Frisch
Modified: 2018-11-03 13:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
mpegtsdemux: make certain dvb recordings seekable (2.84 KB, patch)
2011-03-23 16:37 UTC, Andreas Frisch
rejected Details | Review
debug 5 log of trying to do a segmnet seek with tsdemux (185.80 KB, text/x-log)
2011-06-14 10:20 UTC, Andreas Frisch
  Details
test case (6.62 KB, text/x-csrc)
2011-06-16 12:30 UTC, Andreas Frisch
  Details

Description Andreas Frisch 2011-03-23 16:35:17 UTC
i've narrowed the problem down to the following
a second PCR is required so that the stream bitrate can be approximated
without this variable, seek operations are not permitted (line 2565)
but the second PCR can't be recorded since the required difference of one second to the previous pcr is never reached (line 1855) 
i've experimentally patched that to 3000 and voilà i can seek.
maybe somebody has a real solution for this though

when mpegtsdemux first calculates the bitrate, i'm posting a "seekable" message now so that in my application i know when i can invoke the first seek operation.
this is probably not the right way of doing this :)
Comment 1 Andreas Frisch 2011-03-23 16:37:50 UTC
Created attachment 184146 [details] [review]
mpegtsdemux: make certain dvb recordings seekable
Comment 2 Andreas Frisch 2011-03-23 16:38:16 UTC
a relevant test stream can be found at http://opendreambox.org/~fraxinas/20110316_0020_-_RTL_HD_-_Dr_House.ts
Comment 3 David Schleef 2011-06-05 21:26:03 UTC
tsdemux doesn't play this file.
Comment 4 Edward Hervey 2011-06-12 09:34:35 UTC
Plays fine with current tsdemux
Comment 5 Andreas Frisch 2011-06-14 10:20:42 UTC
Created attachment 189887 [details]
debug 5 log of trying to do a segmnet seek with tsdemux

okay i'm using latest git of tsdemux now, including jannau's latest changes about seeking which edward pushed last week. still, no segment seeking can be done with my little app.
to me it looks like it's actually stuck in mpegtsbase
i'm still working with the same test stream as above.
Comment 6 Andreas Frisch 2011-06-16 12:30:40 UTC
Created attachment 190034 [details]
test case

doing a segment seek on a playbin2 also causes the playback to stall
usage: playbin2segmentseek <uri>
Comment 7 Andreas Frisch 2012-01-30 08:59:29 UTC
let me bitch and moan here a little bit about the fact that it's still not possible to do segment seeking in mpeg ts files (and about my inability to fix it by myself). i'd be really grateful if somebody could take another look at it together with me!
Comment 8 Edward Hervey 2013-06-12 06:14:04 UTC
Andreas, just pushed quite a few seek related commits to 1.0 master. Want to try again ? I tried seeking on that file and it works.
Comment 9 Andreas Frisch 2013-06-12 13:44:25 UTC
gst_element_seek ((app->pipeline), rate, GST_FORMAT_TIME, flags,
      GST_SEEK_TYPE_SET, in_pos, GST_SEEK_TYPE_SET, out_pos);

with rate = 1.0; flags = GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_KEY_UNIT; in_pos = current_position; out_pos = -1

still fails :(

0:00:00.638619002  4676      0x113f120 WARN                 tsdemux tsdemux.c:563:gst_ts_demux_srcpad_event: seeking failed
Comment 10 Edward Hervey 2013-06-12 13:47:14 UTC
I just tried with the file in comment #2, it works. What are you doing exactly ?

And are you using master (and not the 1.0 branch, my fault)
Comment 11 Edward Hervey 2013-07-05 15:43:29 UTC
ping ?
Comment 12 Andreas Frisch 2013-07-08 06:34:54 UTC
i still try to perform a segment seek
with seek flags having GST_SEEK_FLAG_SEGMENT set

0:00:00.034986193  9061      0x1b09f00 WARN              mpegtsbase mpegtsbase.c:1256:mpegts_base_handle_seek_event: seek flags 0xd are not supported
0:00:00.035002812  9061      0x1b09f00 WARN                 tsdemux tsdemux.c:563:gst_ts_demux_srcpad_event: seeking failed
Comment 13 Edward Hervey 2013-07-08 07:03:04 UTC
Ah ok, sorry, got confused. Changing title accordingly.
Comment 14 Sebastian Dröge (slomo) 2013-12-23 14:13:29 UTC
Comment on attachment 184146 [details] [review]
mpegtsdemux: make certain dvb recordings seekable

I assume this is not needed anymore then? Just support for SEGMENT seeks needed?

That should be trivial to add btw, main difference between a normal seek is just that messages are sent and the demuxer doesn't go EOS
Comment 15 GStreamer system administrator 2018-11-03 13:07:46 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/37.