Querying frame rate

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Querying frame rate

darkwing
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)

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.
Reply | Threaded
Open this post in threaded view
|

Re: Querying frame rate

Stefan Sauer
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.
>  


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel