Commit e63f4a4b authored by Filippo Carone's avatar Filippo Carone

Initial implementation of libvlc_get_input_fps.

parent 9781b846
......@@ -270,7 +270,8 @@ vlc_int64_t libvlc_input_get_time ( libvlc_input_t *, libvlc_exception_t *
float libvlc_input_get_position ( libvlc_input_t *, libvlc_exception_t *);
vlc_bool_t libvlc_input_will_play ( libvlc_input_t *, libvlc_exception_t *);
vlc_bool_t libvlc_input_has_vout ( libvlc_input_t *, libvlc_exception_t *);
float libvlc_input_get_fps ( libvlc_input_t *, libvlc_exception_t *);
/** @} */
/** defgroup libvlc_video Video
......
......@@ -22,6 +22,7 @@
*****************************************************************************/
#include <libvlc_internal.h>
#include <vlc_demux.h>
#include <vlc/libvlc.h>
#include <vlc/intf.h>
......@@ -116,6 +117,20 @@ float libvlc_input_get_position( libvlc_input_t *p_input,
return val.f_float;
}
float libvlc_input_get_fps( libvlc_input_t *p_input,
libvlc_exception_t *p_exception)
{
double f_fps;
input_thread_t *p_input_thread;
p_input_thread = libvlc_get_input_thread ( p_input, p_exception);
if( demux2_Control( p_input_thread->input.p_demux, DEMUX_GET_FPS, &f_fps ) || f_fps < 0.1 )
return 0;
else
return( f_fps );
}
vlc_bool_t libvlc_input_will_play( libvlc_input_t *p_input,
libvlc_exception_t *p_exception)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment