From 0be03035285d674a89b70643048df4d8470e94f6 Mon Sep 17 00:00:00 2001 From: aymeric Date: Tue, 23 Sep 2008 12:05:21 +0000 Subject: [PATCH] Be able video to open under a different YUV/RGB format than default one (for testing CPU load). git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@34 3f6dc0c8-ddfe-455d-9043-3cd528dc4637 --- linphone/mediastreamer2/src/winvideods.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/linphone/mediastreamer2/src/winvideods.c b/linphone/mediastreamer2/src/winvideods.c index ab836e0a3..948f5f7ee 100644 --- a/linphone/mediastreamer2/src/winvideods.c +++ b/linphone/mediastreamer2/src/winvideods.c @@ -1043,6 +1043,13 @@ static int v4w_set_fps(MSFilter *f, void *arg){ return 0; } + +static int v4w_set_pix_fmt(MSFilter *f,void *arg){ + V4wState *s=(V4wState*)f->data; + s->pix_fmt=*((MSPixFmt*)arg); + return 0; +} + static int v4w_get_pix_fmt(MSFilter *f,void *arg){ V4wState *s=(V4wState*)f->data; *((MSPixFmt*)arg) = (MSPixFmt)s->pix_fmt; @@ -1092,6 +1099,7 @@ static int v4w_set_image(MSFilter *f, void *arg){ static MSFilterMethod methods[]={ { MS_FILTER_SET_FPS , v4w_set_fps }, + { MS_FILTER_SET_PIX_FMT , v4w_set_pix_fmt }, { MS_FILTER_GET_PIX_FMT , v4w_get_pix_fmt }, { MS_FILTER_SET_VIDEO_SIZE, v4w_set_vsize }, { MS_FILTER_GET_VIDEO_SIZE, v4w_get_vsize },