AJA: warn if not setting channel number for a non-SDI

Warn if not setting channel number for a non-SDI IO.
This commit is contained in:
Martin Pulec
2019-08-13 14:44:01 +02:00
parent 1c6526648d
commit 3e2ae3628d
2 changed files with 13 additions and 2 deletions

View File

@@ -241,6 +241,11 @@ vidcap_state_aja::vidcap_state_aja(unordered_map<string, string> const & paramet
}
}
if (!NTV2_INPUT_SOURCE_IS_SDI(mInputSource) && mInputChannel == NTV2_CHANNEL_INVALID) {
LOG(LOG_LEVEL_NOTICE) << MODULE_NAME "Non-SDI source detected - we will use "
"probably channel 1. Consider passing \"channel\" option (see help).\n";
}
if (audioFlags & VIDCAP_FLAG_AUDIO_EMBEDDED) {
// this maps according to mInputSource - EMBEDDED (SDI), HDMI or ANALOG
mAudioSource = NTV2InputSourceToAudioSource(mInputSource);
@@ -871,7 +876,7 @@ static void show_help() {
cout << "\t\tVideo input is 4K.\n";
cout << rang::style::bold << "\tchannel\n" << rang::style::reset;
cout << "\t\tChannel number to use (advanced, from 1).\n";
cout << "\t\tChannel number to use (indexed from 1). Doesn't need to be set for SDI, useful for HDMI (capture and display should have different channel numbers if both used, also other than 1 if SDI1 is in use).\n";
cout << rang::style::bold << "\tconnection\n" << rang::style::reset <<
"\t\tConnection can be one of: ";
@@ -921,6 +926,7 @@ static void show_help() {
}
cout << "\n";
}
cout << rang::style::underline << "\tNumber of frame stores: " << rang::style::reset << NTV2DeviceGetNumFrameStores (info.deviceID) << "\n";
}
if (deviceScanner.GetNumDevices() == 0) {
cout << rang::fg::red << "\tno devices found\n" << rang::fg::reset;

View File

@@ -215,6 +215,11 @@ display::display(string const &device_id, NTV2OutputDestination outputDestinatio
}
if (mOutputChannel == NTV2_CHANNEL_INVALID) {
if (!NTV2_OUTPUT_DEST_IS_SDI(mOutputDestination)) {
LOG(LOG_LEVEL_NOTICE) << MODULE_NAME "Non-SDI destination detected - we will use "
"probably channel 1. Consider passing \"channel\" option (see help).\n";
}
mOutputChannel = ::NTV2OutputDestinationToChannel(mOutputDestination);
// Beware -- some devices (e.g. Corvid1) can only output from FrameStore 2...
@@ -656,7 +661,7 @@ void aja::display::show_help() {
cout << "\n";
cout << rang::style::bold << "\tchannel\n" << rang::style::reset <<
"\t\tchannel number to use (advanced, from 1)\n";
"\t\tchannel number to use (indexed from 1). Doesn't need to be set for SDI, useful for HDMI (capture and display should have different channel numbers if both used, also other than 1 if SDI1 is in use, see \"-t aja:help\" to see number of available channels).\n";
cout << rang::style::bold << "\tnovsync\n" << rang::style::reset <<
"\t\tdisable sync on VBlank (may improve latency at the expense of tearing)\n";