Commit d45f8e79 authored by unknown's avatar unknown
Browse files

don't set fps when static image is used

parent 48826342
......@@ -1668,7 +1668,7 @@ mblk_t *ms_load_jpeg_as_yuv(const char *jpgpath, MSVideoSize *reqsize){
}
err=read(fd,jpgbuf,statbuf.st_size);
if (err!=statbuf.st_size){
ms_error("Could not read as much as wanted !");
ms_error("Could not read as much as wanted: %i<>%i !",err,statbuf.st_size);
}
m=jpeg2yuv(jpgbuf,statbuf.st_size,reqsize);
ms_free(jpgbuf);
......
......@@ -1080,7 +1080,7 @@ static void win_display_update(MSDisplay *obj, int new_image, int new_selfview){
ms_filter_call_method(wd->filter, MS_VIDEO_OUT_GET_BACKGROUND_COLOR, &color);
brush = CreateSolidBrush(RGB(color[0],color[1],color[2]));
FillRect(dd_hdc, &rect, brush);
FillRect(dd_hdc, &rect, brush);
DeleteObject(brush);
corner = 0;
......@@ -1130,8 +1130,8 @@ static void win_display_update(MSDisplay *obj, int new_image, int new_selfview){
if (rect.right>100 && rect.bottom>100)
{
int x_sv;
int y_sv;
int x_sv;
int y_sv;
if (new_selfview>0)
yuv420p_to_rgb_selfview(wd, &wd->fb_selfview, wd->rgb_selfview);
......@@ -1140,7 +1140,7 @@ static void win_display_update(MSDisplay *obj, int new_image, int new_selfview){
//SelectObject(dd_hdc, hpenDot);
if (sv_pos[0]!=SELVIEW_POS_INACTIVE)
{
x_sv = (int)((rect.right*sv_pos[0])/100.0-w_selfview/2);
x_sv = (int)((rect.right*sv_pos[0])/100.0-w_selfview/2);
y_sv = (int)((rect.bottom*sv_pos[1])/100.0-h_selfview/2);
}
else if (corner==1 || corner==4+1)
......
......@@ -262,7 +262,8 @@ 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 vsize=%ix%i, fps=%f",vsize.width,vsize.height,fps);
/* configure the filters */
ms_filter_call_method(stream->source,MS_FILTER_SET_FPS,&fps);
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 */
......@@ -374,7 +375,8 @@ VideoStream * video_preview_start(MSWebCam *device, MSVideoSize disp_size){
/* configure the filters */
ms_filter_call_method(stream->source,MS_FILTER_SET_VIDEO_SIZE,&vsize);
ms_filter_call_method(stream->source,MS_FILTER_SET_FPS,&fps);
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_GET_PIX_FMT,&format);
ms_filter_call_method(stream->source,MS_FILTER_GET_VIDEO_SIZE,&vsize);
if (format==MS_MJPEG){
......
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