[gst-devel] is it possible dynamically change framerate in a running pipeline?

Tamas Korodi d853211 at gmail.com
Thu Jan 21 13:52:40 CET 2010


Hi,

I looked the debug info of the above mentioned pipeline (videotestsrc !
capsfilter ! xvimagesink). When i changed the capsfilter's caps property
from 20 fps to 1 fps, i got these lines:

-------------------
capsfilter gstcapsfilter.c:162:gst_capsfilter_set_property: set new caps
video/x-raw-yuv, framerate=(fraction)1/1, width=(int)176, height=(int)144
capsfilter gstcapsfilter.c:175:gst_capsfilter_set_property: we had
negotiated caps video/x-raw-yuv, format=(fourcc)YUY2, width=(int)176,
height=(int)144, framerate=(fraction)20/1
capsfilter gstcapsfilter.c:183:gst_capsfilter_set_property: copied structure
fields
basetransform gstbasetransform.c:2432:gst_base_transform_suggest: new
suggest video/x-raw-yuv, format=(fourcc)YUY2, width=(int)176,
height=(int)144, framerate=(fraction)1/1
basetransform
gstbasetransform.c:1470:gst_base_transform_buffer_alloc:<caps01:sink>alloc
with caps video/x-raw-yuv, format=(fourcc)YUY2, width=(int)176,
height=(int)144, framerate=(fraction)20/1, size 50688
basetransform
gstbasetransform.c:1496:gst_base_transform_buffer_alloc:<caps01>new format
video/x-raw-yuv, format=(fourcc)YUY2, width=(int)176, height=(int)144,
framerate=(fraction)20/1
basetransform
gstbasetransform.c:1504:gst_base_transform_buffer_alloc:<caps01>have
suggestion video/x-raw-yuv, format=(fourcc)YUY2, width=(int)176,
height=(int)144, framerate=(fraction)1/1
basetransform
gstbasetransform.c:462:gst_base_transform_transform_caps:<caps01>transform
caps (direction = 2)
capsfilter gstcapsfilter.c:253:gst_capsfilter_transform_caps:<caps01>filter:
   video/x-raw-yuv, framerate=(fraction)1/1, width=(int)176, height=(int)144
capsfilter
gstcapsfilter.c:254:gst_capsfilter_transform_caps:<caps01>intersect:
video/x-raw-yuv, format=(fourcc)YUY2, width=(int)176, height=(int)144,
framerate=(fraction)1/1
basetransform
gstbasetransform.c:503:gst_base_transform_transform_caps:<caps01> to: (1)
video/x-raw-yuv, format=(fourcc)YUY2, width=(int)176, height=(int)144,
framerate=(fraction)1/1
basetransform
gstbasetransform.c:792:gst_base_transform_find_transform:<caps01>
intersecting against padtemplate ANY
...
GST_CAPS gstpad.c:2436:gst_pad_set_caps:<src01:src> caps video/x-raw-yuv,
format=(fourcc)YUY2, width=(int)176, height=(int)144,
framerate=(fraction)1/1
...
GST_PADS gstpad.c:2263:gst_pad_acceptcaps_default:<xvsink01:sink> caps
video/x-raw-yuv, format=(fourcc)YUY2, width=(int)176, height=(int)144,
framerate=(fraction)1/1
-------------------

It seems to me that the capabilities are changed to 1 fps, on both the
source and the sink side, but the pipeline freezed. I don't have any idea
why.
Before i changed the capsfilter's caps property i blocked the source
element's source pad, after it i unblocked it. Did i do it right, or what is
the correct way of changing the capabilities of a pad?

Please give me some info or example code about it!

BR,
Tamas


On Thu, Jan 21, 2010 at 9:35 AM, Farkas Levente <lfarkas at lfarkas.org> wrote:

> Tim,
> could you show us a few lines of example?
> thanks in advance.
> regards.
>
> On 01/20/2010 05:59 PM, Tamas Korodi wrote:
> > Is there any example code that demonstrates capability renegotiation?
> > For example changing the framerate of a running pipeline, because as i
> > saw in most cases framerate values are set through capabilities, not
> > through properties.
> > I already tried to change capsfilter's capabilities in the videotestsrc
> > ! capsfilter ! xvimagesink pipeline in PLAYING state, but it didn't work.
> >
> > Cheers,
> > Tamas
> >
> > On Fri, Jan 15, 2010 at 1:10 AM, Tim-Philipp Müller <t.i.m at zen.co.uk
> > <mailto:t.i.m at zen.co.uk>> wrote:
> >
> >     On Thu, 2010-01-14 at 13:09 -0800, John Buckley wrote:
> >
> >      > Do you know of any example code of changing these parameters on
> >     the fly?
> >      > I would like to apply this approach to videocrop, videoscale &
> >     the image
> >      > size...
> >
> >
> http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/icles/videocrop-test.c
> >
> >     does something along those lines (run with --with-ffmpegcolorspace).
> Not
> >     sure if the pad blocking that the code there does is still needed.
> >
> >     Cheers
> >       -tim
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> >     Throughout its 18-year history, RSA Conference consistently attracts
> the
> >     world's best and brightest in the field, creating opportunities for
> >     Conference
> >     attendees to learn about information security's most important
> >     issues through
> >     interactions with peers, luminaries and emerging and established
> >     companies.
> >     http://p.sf.net/sfu/rsaconf-dev2dev
> >     _______________________________________________
> >     gstreamer-devel mailing list
> >     gstreamer-devel at lists.sourceforge.net
> >     <mailto:gstreamer-devel at lists.sourceforge.net>
> >     https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> >
> >
> >
> >
> > --
> > kotyoTK
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > Throughout its 18-year history, RSA Conference consistently attracts the
> > world's best and brightest in the field, creating opportunities for
> Conference
> > attendees to learn about information security's most important issues
> through
> > interactions with peers, luminaries and emerging and established
> companies.
> > http://p.sf.net/sfu/rsaconf-dev2dev
> >
> >
> >
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>
> --
>    Levente                               "Si vis pacem para bellum!"
>
>
> ------------------------------------------------------------------------------
> Throughout its 18-year history, RSA Conference consistently attracts the
> world's best and brightest in the field, creating opportunities for
> Conference
> attendees to learn about information security's most important issues
> through
> interactions with peers, luminaries and emerging and established companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>



-- 
kotyoTK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100121/ce40d3df/attachment.htm>


More information about the gstreamer-devel mailing list