Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
mediastreamer2
Commits
efe65efb
Commit
efe65efb
authored
Sep 03, 2010
by
Simon Morlat
Browse files
implement fps get on static picture filter
parent
51b8d797
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
src/nowebcam.c
src/nowebcam.c
+7
-0
src/videostream.c
src/videostream.c
+2
-1
No files found.
src/nowebcam.c
View file @
efe65efb
...
...
@@ -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
},
...
...
src/videostream.c
View file @
efe65efb
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment