Fix different palettes warning showing up when using automatic palette selection.
This commit is contained in:
parent
41ad83a7d3
commit
de015761c1
|
@ -315,21 +315,6 @@ LocalCamera::LocalCamera( int p_id, const std::string &p_device, int p_channel,
|
|||
channel_prime = false;
|
||||
}
|
||||
|
||||
if ( last_camera )
|
||||
{
|
||||
if ( (p_method == "v4l2" && v4l_version != 2) || (p_method == "v4l1" && v4l_version != 1) )
|
||||
Fatal( "Different Video For Linux version used for monitors sharing same device" );
|
||||
|
||||
if ( standard != last_camera->standard )
|
||||
Warning( "Different video standards defined for monitors sharing same device, results may be unpredictable or completely wrong" );
|
||||
|
||||
if ( palette != last_camera->palette )
|
||||
Warning( "Different video palettes defined for monitors sharing same device, results may be unpredictable or completely wrong" );
|
||||
|
||||
if ( width != last_camera->width || height != last_camera->height )
|
||||
Warning( "Different capture sizes defined for monitors sharing same device, results may be unpredictable or completely wrong" );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* The V4L1 API doesn't care about endianness, we need to check the endianness of the machine */
|
||||
|
@ -359,6 +344,22 @@ LocalCamera::LocalCamera( int p_id, const std::string &p_device, int p_channel,
|
|||
}
|
||||
#endif
|
||||
|
||||
if( capture ) {
|
||||
if ( last_camera ) {
|
||||
if ( (p_method == "v4l2" && v4l_version != 2) || (p_method == "v4l1" && v4l_version != 1) )
|
||||
Fatal( "Different Video For Linux version used for monitors sharing same device" );
|
||||
|
||||
if ( standard != last_camera->standard )
|
||||
Warning( "Different video standards defined for monitors sharing same device, results may be unpredictable or completely wrong" );
|
||||
|
||||
if ( palette != last_camera->palette )
|
||||
Warning( "Different video palettes defined for monitors sharing same device, results may be unpredictable or completely wrong" );
|
||||
|
||||
if ( width != last_camera->width || height != last_camera->height )
|
||||
Warning( "Different capture sizes defined for monitors sharing same device, results may be unpredictable or completely wrong" );
|
||||
}
|
||||
}
|
||||
|
||||
#if HAVE_LIBSWSCALE
|
||||
if( capture ) {
|
||||
/* Get ffmpeg pixel format based on capture palette and endianness */
|
||||
|
|
Loading…
Reference in New Issue