[gstreamer-bugs] [Bug 332611] New: [basesrc] needs way to prevent expensive start/stop in check_range function

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Sun Feb 26 03:35:39 PST 2006


Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=332611
 GStreamer | gstreamer (core) | Ver: HEAD CVS

           Summary: [basesrc] needs way to prevent expensive start/stop in
                    check_range function
           Product: GStreamer
           Version: HEAD CVS
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gstreamer (core)
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: t.i.m at zen.co.uk
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: Unspecified
   GNOME milestone: Unspecified


GstBaseSrc does basically:

static gboolean
gst_base_src_check_get_range (GstPad * pad)
{
  if (!GST_OBJECT_FLAG_IS_SET (src, GST_BASE_SRC_STARTED)) {
    gst_base_src_start (src);
    gst_base_src_stop (src);
  }

  return src->random_access;
}

which means that whenever there's a typefind element involved (ie. always when
used via playbin/decodebin), the source device will be opened/closed once just
to check whether direct access is possible.

That's bad, especially when the open/close is expensive, like in the case of
dvd:// or cdda:// access.

In the case of http, connecting twice to a http server within a very short
period of time might lead to the connection being refused on the second (real)
attempt (see bug #331690).

The solution for dvd/cdda sources is simple - they can just set up a new
checkrange function of their own on the pad that always returns FALSE.

For something like GnomeVfsSrc it's not that straight-forward, as things depend
on the URI protocol. Of course it could be hacked around, but I think it's a
general problem that should be addressed in GstBaseSrc, maybe by adding a new
vfunc.


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.




More information about the Gstreamer-bugs mailing list