Commit aae06a07 authored by smorlat's avatar smorlat
Browse files

allow yuy2 format on windows

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@32 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
parent 37fa3997
......@@ -562,8 +562,9 @@ static GtkWidget *create_icon_menu(){
return menu;
}
static GtkStatusIcon *icon=NULL;
static void linphone_gtk_init_status_icon(){
GtkStatusIcon *icon;
GdkPixbuf *pbuf=create_pixbuf("linphone2.png");
GtkWidget *menu=create_icon_menu();
icon=gtk_status_icon_new_from_pixbuf(pbuf);
......@@ -719,6 +720,8 @@ int main(int argc, char *argv[]){
gdk_threads_leave();
linphone_gtk_destroy_log_window();
linphone_core_destroy(the_core);
/*workaround a bug on win32 that makes status icon still present in the systray even after program exit.*/
gtk_status_icon_set_visible(icon,FALSE);
return 0;
}
......
......@@ -43,7 +43,7 @@ int ms_pix_fmt_to_ffmpeg(MSPixFmt fmt){
case MS_UYVY:
return PIX_FMT_UYVY422;
case MS_YUY2:
return PIX_FMT_YUYV422; /* <- same as MS_UYVY */
return PIX_FMT_YUYV422; /* <- same as MS_YUYV */
default:
ms_fatal("format not supported.");
return -1;
......
......@@ -91,6 +91,10 @@ static bool_t try_format(V4wState *s, BITMAPINFO *videoformat, MSPixFmt pixfmt){
videoformat->bmiHeader.biBitCount = 12;
videoformat->bmiHeader.biCompression=MAKEFOURCC('I','4','2','0');
break;
case MS_YUY2:
videoformat->bmiHeader.biBitCount = 16;
videoformat->bmiHeader.biCompression=MAKEFOURCC('Y','U','Y','2');
break;
case MS_RGB24:
videoformat->bmiHeader.biBitCount = 24;
videoformat->bmiHeader.biCompression=BI_RGB;
......@@ -189,6 +193,9 @@ static int v4w_open_videodevice(V4wState *s)
s->pix_fmt=MS_RGB24;
ms_message("Using RGB24");
s->startwith_yuv_bug=TRUE;
}else if (try_format(s,&videoformat,MS_YUY2)){
s->pix_fmt=MS_YUY2;
ms_message("Using YUY2");
}else{
ms_error("v4w: Failed to set any video format.");
capDriverDisconnect (s->capvideo);
......
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