static void _resize_video_window(GtkWidget *video_window, MSVideoSize vsize){ MSVideoSize cur; gtk_window_get_size(GTK_WINDOW(video_window),&cur.width,&cur.height); if (vsize.width*vsize.height > cur.width*cur.height || ms_video_size_get_orientation(vsize)!=ms_video_size_get_orientation(cur) ){ gtk_window_resize(GTK_WINDOW(video_window),vsize.width,vsize.height); } }
static MSVideoSize get_with_same_orientation(MSVideoSize size, MSVideoSize refsize){ if (ms_video_size_get_orientation(refsize)!=ms_video_size_get_orientation(size)){ int tmp; tmp=size.width; size.width=size.height; size.height=tmp; } return size; }