[gst-devel] Querying frame rate

Stefan Kost ensonic at hora-obscura.de
Mon Mar 8 16:10:46 CET 2010


darkwing wrote:
> Hi all.  I have a bin that's constructed using the gst.parse_launch method
> (written in Python).  I've assigned this to player (ie. player =
> gst.parse_launch(stream)).  The source is an http stream and I'm using the
> neonhttpsrc element to get it.  I want to be able to query the current frame
> rate when I press a button.  I'm unsure of how exactly to do this.  I
> googled for some result but I kept seeing people using functions that I
> can't find in the gstreamer doc.  I've tried something like
>
> format = gst.format_register('rate', 'video rate')
> query = gst.query_new_segment(format)
>   
just look at e.g. the sink-pads caps of your video renderer. The target
framerate is there in the "frame-rate" field as a fraction. If you want
to see the actual achieved framerate, you can have a look at the
fpsdisplaysink in gst-plugins-bad.

Stefan

> I'm not sure of what to do next here (and it's most likely that I am off the
> track completely).  Can someone give me a direction and perhaps some sample
> codes?  Thanks.
>   





More information about the gstreamer-devel mailing list