forked from CESNET/UltraGrid
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aja: print device informations as it was before
approximate the output of now removed CNTV2DeviceScanner::GetDeviceInfoList() (removed in commit 0ef9f00)
- Loading branch information
1 parent
a893667
commit 6730fda
Showing
4 changed files
with
43 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Martin Pulec <[email protected]> | ||
*/ | ||
/* | ||
* Copyright (c) 2020 CESNET, z. s. p. o. | ||
* Copyright (c) 2020-2024 CESNET | ||
* All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
|
@@ -38,11 +38,15 @@ | |
#ifdef HAVE_CONFIG_H | ||
#include "config.h" | ||
#endif | ||
#include "config_msvc.h" | ||
#include "config_unix.h" | ||
#include "config_win32.h" | ||
#include "config_msvc.h" // coompat - __attribute__ etc. | ||
|
||
#include "aja_common.h" | ||
#include <cinttypes> // for PRIx64 | ||
#include <cstdint> // for uint64_t | ||
#include <cstdio> // for printf | ||
#include <ntv2card.h> // for CNTV2Card | ||
|
||
#include "aja_common.hpp" | ||
#include "utils/color_out.h" // for color_printf, TUNDERLINE | ||
|
||
#ifndef BYTE_SWAP | ||
#ifdef WORDS_BIGENDIAN | ||
|
@@ -159,3 +163,24 @@ vc_copylineR12AtoR12L(unsigned char * __restrict dst, const unsigned char * __re | |
} | ||
} | ||
|
||
void | ||
print_aja_device_details(CNTV2Card *device) | ||
{ | ||
printf("\t%s\n", device->GetDescription().c_str()); | ||
|
||
color_printf("\t" TUNDERLINE("Device ID:") " 0x%08x\n", | ||
device->GetBaseDeviceID()); | ||
|
||
ULWord dev_pci_id = 0; | ||
device->GetPCIDeviceID(dev_pci_id); | ||
color_printf("\t" TUNDERLINE("Device PCI ID:") " 0x%08x\n", dev_pci_id); | ||
|
||
uint64_t serial_nr = device->GetSerialNumber(); | ||
color_printf("\t" TUNDERLINE("Serial Number:") " 0x%" PRIx64 "\n", | ||
serial_nr); | ||
|
||
color_printf("\t" TUNDERLINE("Video Inputs:") " %hu\n", | ||
device->features().GetNumVideoInputs()); | ||
printf("\t" TUNDERLINE("Video Outputs:") " %hu\n", | ||
device->features().GetNumVideoOutputs()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
/** | ||
* @file aja_common.h | ||
* @file aja_common.hpp | ||
* @author Martin Pulec <[email protected]> | ||
*/ | ||
/* | ||
* Copyright (c) 2018 CESNET, z. s. p. o. | ||
* Copyright (c) 2018-2024 CESNET | ||
* All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
|
@@ -35,12 +35,13 @@ | |
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
#include <iostream> | ||
#include <map> | ||
#include <ntv2enums.h> | ||
|
||
#include "types.h" | ||
|
||
class CNTV2Card; | ||
|
||
#ifdef _MSC_VER | ||
#define log_msg(x, ...) fprintf(stderr, __VA_ARGS__) | ||
#define color_printf printf | ||
|
@@ -81,6 +82,8 @@ void | |
vc_copylineR12LtoR12A(unsigned char * __restrict dst, const unsigned char * __restrict src, int dstlen, int rshift, | ||
int gshift, int bshift); | ||
|
||
void print_aja_device_details(CNTV2Card *device); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Martin Pulec <[email protected]> | ||
*/ | ||
/* | ||
* Copyright (c) 2018-2023 CESNET, z. s. p. o. | ||
* Copyright (c) 2018-2024 CESNET | ||
* All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
|
@@ -91,7 +91,7 @@ | |
#include "video_display.h" | ||
#include "video.h" | ||
|
||
#include "aja_common.h" // should be included last (overrides log_msg etc.) | ||
#include "aja_common.hpp" // should be included last (overrides log_msg etc.) | ||
|
||
#define DEFAULT_MAX_FRAME_QUEUE_LEN 1 | ||
#define MOD_NAME "[AJA display] " | ||
|
@@ -793,8 +793,8 @@ void aja::display::show_help() { | |
} | ||
|
||
col() << "\t" << SBOLD(i) << ") " | ||
<< SBOLD(device.GetDisplayName()) << ". " | ||
<< device.GetDescription() << "\n"; | ||
<< SBOLD(device.GetDisplayName()); | ||
print_aja_device_details(&device); | ||
col() << "\n"; | ||
} | ||
if (deviceScanner.GetNumDevices() == 0) { | ||
|