[gst-devel] Seek events: do_seek vs. newsegment
Julien MOUTTE
julien at moutte.net
Sun Sep 9 17:03:41 CEST 2007
When working in push mode elements like demuxers are supposed to convert
the seek in TIME format to a seek in BYTES format and generate an
upstream seek event that might get handled or not.
Handling of newsegment in that scenario can be a bit more blurry as you
are getting a segment in bytes again.
You can look at current version of flvdemux in gst-plugins-bad/gst/flv
that does work.
Best regards,
Julien Moutte,
FLUENDO S.A.
On Sat, 2007-09-08 at 23:42 +0100, Jay L. T. Cornwall wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I'm currently tracing a problem in Rhythmbox where .m4a files are
> seekable locally but not over DAAP. qtdemux/qtdemux.c incorrectly
> assumes that only pull sources are seekable (push sources are now
> seekable too, given some constraints). Fixing this enables seeking but
> leads to a crash.
>
> - From what I can see, Rhythmbox's GStreamer source element never receives
> a do_seek notification. Seeking a .mp3 file generates this event, but
> .m4a does not. This seems to stem from the events that each demuxer
> chooses to issue during a seek:
>
> gstmad.c:
> seek_event = gst_event_new_seek (rate, GST_FORMAT_BYTES, flags,
> cur_type, bytes_cur, stop_type, bytes_stop);
>
> qtdemux.c:
> gst_qtdemux_push_event (qtdemux, gst_event_new_new_segment (TRUE,
> qtdemux->segment.rate, qtdemux->segment.format,
> qtdemux->segment.start, qtdemux->segment.last_stop,
> qtdemux->segment.time));
>
> GStreamer's "playbin" element seeks fine with both demuxers, so I
> thought by adding a check for "newsegment" I could cover both bases
> (although it's an untidy feature of GStreamer). However, I notice this
> in base/gstbasesrc.h:
>
> /* generate and send a newsegment (UNUSED) */
> gboolean (*newsegment) (GstBaseSrc *src);
>
> And, sure enough, this is not called in base/gstbasesrc.c. So what's the
> deal here, should qtdemux.c be generating do_seek events? Should
> Rhythmbox be catching something else to handle seeks from the .m4a demuxer?
>
> For extra fun, I now also see a prepare_seek_segment vfunc in CVS HEAD
> base/gstbasesrc.h. Gah!
>
> - --
> Jay L. T. Cornwall
> http://www.jcornwall.me.uk/
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFG4yVYdQczt3VeX8URAhhsAJ9lRRNCDtgWixZ3kuJBPP3X038JMwCfeIbI
> tNRdFxU7sWnlkCa9iLdpj5s=
> =DNSg
> -----END PGP SIGNATURE-----
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list