[gstreamer-bugs] [Bug 362390] New: [basetransform] derived elements cannot filter events

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Sun Oct 15 08:03:13 PDT 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=362390

  GStreamer | gstreamer (core) | Ver: HEAD CVS

           Summary: [basetransform] derived elements cannot filter events
           Product: GStreamer
           Version: HEAD CVS
          Platform: Other
        OS/Version: All
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: Normal
         Component: gstreamer (core)
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: mail at renestadler.de
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: Unspecified
   GNOME milestone: Unspecified


In gst_base_transform_sink_event (which is installed as the sink pad's event
function):

  if (bclass->event)
    ret = bclass->event (trans, event);

  /* FIXME, do this in the default event handler so the subclass can do         
   * something different. */
  if (ret)
    ret = gst_pad_push_event (trans->srcpad, event);

  gst_object_unref (trans);

  return ret;

This causes problems if a derived class instance wants to filter (eat) an
event.  To prevent basetransform from pushing on the event, the "event" vfunc
has to return FALSE.  Unfortunately, this also leads to the event function
returning FALSE, which indicates to the sender of the event that it was not
handled (gst_pad_send_event returns FALSE).

A use case is the upcoming ReplayGain volume element, which should remove the
gain and peak tags from tag events it receives.  If this would empty the tag
list because it contains no other tags, it makes more sense to drop the event
instead of pushing it further.  Currently, there seems to be no easy way to do
this with basetransform.


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email




More information about the Gstreamer-bugs mailing list