[gst-devel] Re: [gst-cvs] wingo gstreamer: gstreamer/gst/elements/

in7y118 at public.uni-hamburg.de in7y118 at public.uni-hamburg.de
Tue Sep 30 07:26:05 CEST 2003


I like the approach. In theory you shouldn't require seeking support anyway. 
(As it can change anyway in our threaded system, because someone could replug 
after you queried, but before you push.
Can you explain to me how AVI works (possibly on IRC) to see if we can find a 
way around the requirement to know if this is supported?

Quoting Ronald Bultje <rbultje at ronald.bitfreak.net>:

> Hi,
> 
> On Tue, 2003-09-30 at 15:11, Andy Wingo wrote:
> > make filesink handle events only in the chainfunction
> [..]
> > -/* supported events */
> > -static const GstEventMask *
> > -gst_filesink_get_event_mask (GstPad *pad)
> > -{
> > -  GstFileSink *filesink = GST_FILESINK (gst_pad_get_parent (pad));
> > -  struct stat filestat;
> > -  static const GstEventMask seek_masks[] = {
> > -    { GST_EVENT_SEEK, GST_SEEK_METHOD_CUR |
> > -                      GST_SEEK_METHOD_SET |
> > -                      GST_SEEK_METHOD_END |
> > -                      GST_SEEK_FLAG_FLUSH },
> > -    { GST_EVENT_FLUSH, 0 },
> > -    { GST_EVENT_DISCONTINUOUS, 0 },
> > -    { 0, 0 }
> > -  }, noseek_masks[] = {
> > -    { GST_EVENT_FLUSH, 0 },
> > -    { 0, 0 }
> > -  }, *selected = seek_masks;
> > -
> > -  if (filesink->file != NULL) {
> > -    if (fstat (fileno (filesink->file), &filestat) == 0) {
> > -      if (S_ISFIFO (filestat.st_mode) ||
> > -	  S_ISSOCK (filestat.st_mode)) {
> > -        selected = noseek_masks;
> > -      }
> > -    }
> > -  }
> > -
> > -  return selected;
> > -}
> 
> I totally don't like this. I know someone added a g_return_val_if_fail()
> for event functions on sink pads, but I think we shouldn't do that for
> event_mask functions. How else am I supposed to query whether the sink
> pad supports seeking or not?
> 
> Ronald
> 
> -- 
> Ronald Bultje <rbultje at ronald.bitfreak.net>
> Linux Video/Multimedia developer
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> 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