+
+ // The mode is a combination of size and format and not every format
+ // is supported by every size.
+ if( in_size)
+ {
+ if( strcmp( in_size, "160x120") == 0)
+ {
+ if( in_fmt && (strcmp( in_fmt, "YUV444") != 0) )
+ msg_Err(p_demux, "160x120 only supports YUV444 - forcing");
+ p_sys->video_mode = DC1394_VIDEO_MODE_160x120_YUV444;
+ }
+ else if( strcmp( in_size, "320x240") == 0)
+ {
+ if( in_fmt && (strcmp( in_fmt, "YUV422") != 0) )
+ msg_Err(p_demux, "320x240 only supports YUV422 - forcing");
+ p_sys->video_mode = DC1394_VIDEO_MODE_320x240_YUV422;
+ }
+ }
+ else
+ { // 640x480 default
+ if( in_fmt )
+ {
+ if( strcmp( in_fmt, "RGB8") == 0)
+ p_sys->video_mode = DC1394_VIDEO_MODE_640x480_RGB8;
+ else if( strcmp( in_fmt, "MONO8") == 0)
+ p_sys->video_mode = DC1394_VIDEO_MODE_640x480_MONO8;
+ else if( strcmp( in_fmt, "MONO16") == 0)
+ p_sys->video_mode = DC1394_VIDEO_MODE_640x480_MONO16;
+ else if( strcmp( in_fmt, "YUV411") == 0)
+ p_sys->video_mode = DC1394_VIDEO_MODE_640x480_YUV411;
+ else // YUV422 default
+ p_sys->video_mode = DC1394_VIDEO_MODE_640x480_YUV422;
+ }
+ else // YUV422 default
+ p_sys->video_mode = DC1394_VIDEO_MODE_640x480_YUV422;
+ }
+