baseparse converting seek event from format BYTES to TIME

Eric Trousset etrousset at awox.com
Tue Jan 28 06:56:16 PST 2014


Hi,
I've been trying to understand what is going going on with my seeking. When doing it on Mpeg PS file, the seek event is converted from time to byte, and I receive it ok in my source element. 
But for mpegts file, with mpeg2 vid and ac3 audio, it looks like the event is converted from time to byte and from byte to time again, and never reach my source element.

Here is a log of this :

> Player_SetPosition( 10000 ms)
0:02:22.293803636 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:1334:gst_base_parse_src_query:<ac3parse0> duration query: duration query: 0xb5b73c90, GstQueryDuration, format=(GstFormat)GST_FORMAT_TIME, duration=(gint64)-1;
0:02:22.293847287 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:3676:gst_base_parse_src_query_default:<ac3parse0> duration query
0:02:22.293907071 19759  0x8b35660 LOG                baseparse gstbaseparse.c:3620:gst_base_parse_get_duration:<ac3parse0> cannot estimate duration
0:02:22.293917268 19759  0x8b35660 LOG                baseparse gstbaseparse.c:3624:gst_base_parse_get_duration:<ac3parse0> res: 0, duration 99:99:99.999999999
0:02:22.293931376 19759  0x8b35660 LOG                baseparse gstbaseparse.c:1342:gst_base_parse_src_query:<ac3parse0> duration query result: 0 duration query: 0xb5b73c90, GstQueryDuration, format=(GstFormat)GST_FORMAT_TIME, duration=(gint64)-1;
0:02:22.293963294 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:1334:gst_base_parse_src_query:<ac3parse0> duration query: duration query: 0xb5b758c0, GstQueryDuration, format=(GstFormat)GST_FORMAT_BYTES, duration=(gint64)-1;
0:02:22.293984455 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:3676:gst_base_parse_src_query_default:<ac3parse0> duration query
0:02:22.294002475 19759  0x8b35660 LOG                baseparse gstbaseparse.c:3620:gst_base_parse_get_duration:<ac3parse0> cannot estimate duration
0:02:22.294012462 19759  0x8b35660 LOG                baseparse gstbaseparse.c:3624:gst_base_parse_get_duration:<ac3parse0> res: 0, duration 99:99:99.999999999
0:02:22.294025243 19759  0x8b35660 LOG                baseparse gstbaseparse.c:1342:gst_base_parse_src_query:<ac3parse0> duration query result: 0 duration query: 0xb5b758c0, GstQueryDuration, format=(GstFormat)GST_FORMAT_BYTES, duration=(gint64)-1;
0:02:22.294123090 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:1334:gst_base_parse_src_query:<mpegvparse0> duration query: duration query: 0xb5b73c90, GstQueryDuration, format=(GstFormat)GST_FORMAT_TIME, duration=(gint64)-1;
0:02:22.294153751 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:3676:gst_base_parse_src_query_default:<mpegvparse0> duration query
0:02:22.294199776 19759  0x8b35660 LOG                baseparse gstbaseparse.c:3620:gst_base_parse_get_duration:<mpegvparse0> cannot estimate duration
0:02:22.294209973 19759  0x8b35660 LOG                baseparse gstbaseparse.c:3624:gst_base_parse_get_duration:<mpegvparse0> res: 0, duration 99:99:99.999999999
0:02:22.294223033 19759  0x8b35660 LOG                baseparse gstbaseparse.c:1342:gst_base_parse_src_query:<mpegvparse0> duration query result: 0 duration query: 0xb5b73c90, GstQueryDuration, format=(GstFormat)GST_FORMAT_TIME, duration=(gint64)-1;
0:02:22.294428786 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:1366:gst_base_parse_src_event:<mpegvparse0> event 51201, seek
MySource : Seekable : true
0:02:26.045423797 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:4090:gst_base_parse_handle_seek:<mpegvparse0> seek to format time, rate 1.000000, start type 1 at 0:00:10.000000000, end type 0 at 99:99:99.999999999
0:02:26.585621192 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:4131:gst_base_parse_handle_seek:<mpegvparse0> configuring seek
0:02:26.585658348 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:4044:gst_base_parse_find_offset:<mpegvparse0> no index entry found for 0:00:10.000000000
0:02:26.585676367 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:4142:gst_base_parse_handle_seek:<mpegvparse0> accurate seek possible
0:02:26.585686983 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:4044:gst_base_parse_find_offset:<mpegvparse0> no index entry found for 0:00:10.000000000
0:02:26.585699624 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:4168:gst_base_parse_handle_seek:<mpegvparse0> seek position 0 in bytes: 0
0:02:26.585710938 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:4171:gst_base_parse_handle_seek:<mpegvparse0> seek stop -1 in bytes: -1
0:02:26.585721694 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:4285:gst_base_parse_handle_seek:<mpegvparse0> seek in PUSH mode
0:02:26.585880373 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:1366:gst_base_parse_src_event:<ac3parse0> event 51201, seek
MySource : Seekable : true
0:02:28.653730133 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:4090:gst_base_parse_handle_seek:<ac3parse0> seek to format time, rate 1.000000, start type 1 at 0:00:10.000000000, end type 0 at 99:99:99.999999999
0:02:30.744850170 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:4131:gst_base_parse_handle_seek:<ac3parse0> configuring seek
0:02:30.744890049 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:4044:gst_base_parse_find_offset:<ac3parse0> no index entry found for 0:00:10.000000000
0:02:30.744908208 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:4142:gst_base_parse_handle_seek:<ac3parse0> accurate seek possible
0:02:30.744918614 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:4044:gst_base_parse_find_offset:<ac3parse0> no index entry found for 0:00:09.936000000
0:02:30.744931046 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:4168:gst_base_parse_handle_seek:<ac3parse0> seek position 0 in bytes: 0
0:02:30.744942430 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:4171:gst_base_parse_handle_seek:<ac3parse0> seek stop -1 in bytes: -1
0:02:30.744953186 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:4285:gst_base_parse_handle_seek:<ac3parse0> seek in PUSH mode
0:02:30.745037205 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:1366:gst_base_parse_src_event:<ac3parse0> event 51201, seek
0:02:30.745060671 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:4090:gst_base_parse_handle_seek:<ac3parse0> seek to format bytes, rate 1.000000, start type 1 at 0:00:00.000240000, end type 0 at 99:99:99.999999999
0:02:32.205802781 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:1459:gst_base_parse_convert_default:<ac3parse0> converting bytes -> time
0:02:32.205835816 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:1463:gst_base_parse_convert_default:<ac3parse0> conversion result: 10000 ms
0:02:32.205850623 19759  0x8b35660 LOG                baseparse gstbaseparse.c:924:gst_base_parse_convert:<ac3parse0> BYTES -> TIME: 240000 -> 0:00:10.000000000
0:02:32.205867035 19759  0x8b35660 LOG                baseparse gstbaseparse.c:924:gst_base_parse_convert:<ac3parse0> BYTES -> TIME: -1 -> 99:99:99.999999999
0:02:32.205882680 19759  0x8b35660 INFO               baseparse gstbaseparse.c:4107:gst_base_parse_handle_seek:<ac3parse0> converted bytes format to start time 0:00:10.000000000 and stop time 99:99:99.999999999
0:02:32.205901188 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:4131:gst_base_parse_handle_seek:<ac3parse0> configuring seek
0:02:32.205915086 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:4044:gst_base_parse_find_offset:<ac3parse0> no index entry found for 0:00:10.000000000
0:02:32.205927937 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:4142:gst_base_parse_handle_seek:<ac3parse0> accurate seek possible
0:02:32.205937994 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:4044:gst_base_parse_find_offset:<ac3parse0> no index entry found for 0:00:09.936000000
0:02:32.205949867 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:4168:gst_base_parse_handle_seek:<ac3parse0> seek position 0 in bytes: 0
0:02:32.205960483 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:4171:gst_base_parse_handle_seek:<ac3parse0> seek stop -1 in bytes: -1
0:02:32.205971238 19759  0x8b35660 DEBUG              baseparse gstbaseparse.c:4285:gst_base_parse_handle_seek:<ac3parse0> seek in PUSH mode


Any advice on what is going wrong?
Cheers, 
Eric
> -----Original Message-----
> From: gstreamer-devel-bounces at lists.freedesktop.org [mailto:gstreamer-
> devel-bounces at lists.freedesktop.org] On Behalf Of Tim Müller
> Sent: lundi 27 janvier 2014 10:39
> To: gstreamer-devel at lists.freedesktop.org
> Subject: Re: baseparse converting seek event from format BYTES to TIME
> 
> On Mon, 2014-01-27 at 10:30 +0100, Eric Trousset wrote:
> 
> Hi Eric,
> 
> > When I do a seek on my pipeline, playing an mp3,  my source element
> > doesn’t receive the seek event.
> >
> > The source element working in GST_FORMAT_TIME.
> >
> > If I follow the seek event, it seems the baseperse element tries to
> > convert it to a seek in GST_FORMAT_BYTES even if it as a input segment
> > in GST_FORMAT_TIME.
> >
> > The result is that I end up with a seek event in byte format that
> > can’t be handled by the source element.
> >
> > I’ve attached some log. If this is a bug, I’ll put on bugzilla.
> 
> As far as I can tell from the log, the parser behaves as expected: it will first try
> to forward the event upstream as-is to see if upstream can handle it, and if
> that fails it will try to convert to a BYTE position and try again.
> 
> The first line seems to indicate that it is actually passing the TIME format seek
> upstream. So it seems that doesn't get handle somewhere (probably either
> id3demux or your source)
> 
>  Cheers
>   -Tim
> 
> --
> Tim Müller, Centricular Ltd - http://www.centricular.com
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list