Commit efe65efb authored by Simon Morlat's avatar Simon Morlat
Browse files

implement fps get on static picture filter

parent 51b8d797
......@@ -1786,6 +1786,12 @@ static int static_image_set_fps(MSFilter *f, void *arg){
return 0;
}
static int static_image_get_fps(MSFilter *f, void *arg){
SIData *d=(SIData*)f->data;
*((float*)arg) = d->fps;
return 0;
}
int static_image_set_vsize(MSFilter *f, void* data){
SIData *d=(SIData*)f->data;
d->vsize=*(MSVideoSize*)data;
......@@ -1828,6 +1834,7 @@ static int static_image_set_image(MSFilter *f, void *arg){
MSFilterMethod static_image_methods[]={
{ MS_FILTER_SET_FPS, static_image_set_fps },
{ MS_FILTER_GET_FPS, static_image_get_fps },
{ MS_FILTER_SET_VIDEO_SIZE, static_image_set_vsize },
{ MS_FILTER_GET_VIDEO_SIZE, static_image_get_vsize },
{ MS_FILTER_GET_PIX_FMT, static_image_get_pix_fmt },
......
......@@ -301,8 +301,9 @@ int video_stream_start (VideoStream *stream, RtpProfile *profile, const char *re
ms_filter_call_method(stream->encoder,MS_FILTER_GET_FPS,&fps);
ms_message("Setting sent vsize=%ix%i, fps=%f",vsize.width,vsize.height,fps);
/* configure the filters */
if (ms_filter_get_id(stream->source)!=MS_STATIC_IMAGE_ID)
if (ms_filter_get_id(stream->source)!=MS_STATIC_IMAGE_ID) {
ms_filter_call_method(stream->source,MS_FILTER_SET_FPS,&fps);
}
ms_filter_call_method(stream->source,MS_FILTER_SET_VIDEO_SIZE,&vsize);
/* get the output format for webcam reader */
ms_filter_call_method(stream->source,MS_FILTER_GET_PIX_FMT,&format);
......
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