mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 15:40:21 +00:00
DeckLink cap: pretty print mode
align: - mode indices - FPS - flags (color-space first, because it is always present; 3D after)
This commit is contained in:
@@ -661,11 +661,11 @@ string bmd_get_audio_connection_name(BMDAudioOutputAnalogAESSwitch audioConnecti
|
||||
string bmd_get_flags_str(BMDDisplayModeFlags flags) {
|
||||
bool first = true;
|
||||
ostringstream oss;
|
||||
map<uint32_t, const char *> map {
|
||||
{ bmdDisplayModeSupports3D, "3D" },
|
||||
vector<pair<uint32_t, const char *>> map {
|
||||
{ bmdDisplayModeColorspaceRec601, "Rec601" },
|
||||
{ bmdDisplayModeColorspaceRec709, "Rec709" },
|
||||
{ bmdDisplayModeColorspaceRec2020, "Rec2020" }
|
||||
{ bmdDisplayModeColorspaceRec2020, "Rec2020" },
|
||||
{ bmdDisplayModeSupports3D, "3D" },
|
||||
};
|
||||
|
||||
for (auto &f : map ) {
|
||||
|
||||
@@ -1693,7 +1693,7 @@ static list<tuple<int, string, string, string>> get_input_modes (IDeckLink* deck
|
||||
string fcc{(char *) &mode, 4};
|
||||
string name{displayModeCString};
|
||||
char buf[1024];
|
||||
snprintf(buf, sizeof buf, "%d x %d \t %2.2f FPS %.4s, flags: %s", modeWidth, modeHeight,
|
||||
snprintf(buf, sizeof buf, "%d x %d \t %6.2f FPS \t flags: %.4s, %s", modeWidth, modeHeight,
|
||||
(float) ((double)frameRateScale / (double)frameRateDuration),
|
||||
(char *) &field_dominance_n, flags_str.c_str());
|
||||
string details{buf};
|
||||
@@ -1722,7 +1722,7 @@ static void print_input_modes (IDeckLink* deckLink)
|
||||
list<tuple<int, string, string, string>> ret = get_input_modes (deckLink);
|
||||
printf("\tcapture modes:\n");
|
||||
for (auto &i : ret) {
|
||||
col() << "\t\t" << right << setw(2) << SBOLD(get<0>(i) << " (" << get<1>(i) << ")") << ") " <<
|
||||
col() << "\t\t" << right << SBOLD(setw(2) << get<0>(i) << " (" << get<1>(i) << ")") << ") " <<
|
||||
left << setw(20) << get<2>(i) << internal << " " <<
|
||||
get<3>(i) << "\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user