changing Caps of a pad

Eric Trousset etrousset at awox.com
Thu Nov 21 08:33:02 PST 2013


I found the solution. Implementing the get_caps function solved my problem.
Thx,
Eric T.

> -----Original Message-----
> From: Eric Trousset [mailto:etrousset at awox.com]
> Sent: jeudi 21 novembre 2013 17:12
> To: Discussion of the development of and with GStreamer
> Subject: RE: changing Caps of a pad
> 
> Ok, it looks like I could change the Caps on my srcpad, but the other element
> didn't change their caps.
> In the create function, if I have new caps from my resource, I create a
> gst_event_new_caps() event and push it using gst_pad_push_event(src-
> >srcpad, theCapsEvent)
> 
> Do I have to handle something in the query/event functions of my source?
> 
> Eric
> 
> > -----Original Message-----
> > From: Josh Doe [mailto:josh at joshdoe.com]
> > Sent: jeudi 21 novembre 2013 16:25
> > To: Discussion of the development of and with GStreamer
> > Subject: Re: changing Caps of a pad
> >
> > On Thu, Nov 21, 2013 at 9:34 AM, Eric Trousset <etrousset at awox.com>
> > wrote:
> > > I am writing a src element. At some point, I need to change the caps
> > > of the output.
> > >
> > > I need the change the width and the height of the output?
> >
> > I assume you mean you wish to change the caps from within your src
> > element. If you're using 0.10 I believe you can just change the caps
> > you set on the GstBuffer, which will start renegotiation. In 1.0 I
> > just send a STREAM_START, CAPS, then NEW_SEGMENT event before
> sending
> > the next buffer, but you might be able to get away with just sending
> > the CAPS event.
> > -Josh
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> _______________________________________________
> 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