mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +00:00
ntv2: Update to AJA NTV2 SDK 17.1.0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7568>
This commit is contained in:
parent
e758ffa2cf
commit
be6eba3e9e
3 changed files with 69 additions and 55 deletions
|
@ -25,7 +25,8 @@
|
|||
#include "gstajacommon.h"
|
||||
#include "gstajadeviceprovider.h"
|
||||
|
||||
static GstDevice *gst_aja_device_new(NTV2DeviceInfo &device, gboolean video);
|
||||
static GstDevice *gst_aja_device_new(CNTV2Device &device, guint index,
|
||||
gboolean video);
|
||||
|
||||
G_DEFINE_TYPE(GstAjaDeviceProvider, gst_aja_device_provider,
|
||||
GST_TYPE_DEVICE_PROVIDER);
|
||||
|
@ -35,18 +36,19 @@ static void gst_aja_device_provider_init(GstAjaDeviceProvider *self) {}
|
|||
static GList *gst_aja_device_provider_probe(GstDeviceProvider *provider) {
|
||||
GList *ret = NULL;
|
||||
|
||||
CNTV2DeviceScanner scanner;
|
||||
CNTV2Card device;
|
||||
guint device_idx = 0;
|
||||
|
||||
NTV2DeviceInfoList devices = scanner.GetDeviceInfoList();
|
||||
for (NTV2DeviceInfoList::iterator it = devices.begin(); it != devices.end();
|
||||
it++) {
|
||||
while (CNTV2DeviceScanner::GetDeviceAtIndex(device_idx, device)) {
|
||||
auto features = device.features();
|
||||
// Skip non-input / non-output devices
|
||||
if (it->numVidInputs == 0 && it->numVidOutputs == 0) continue;
|
||||
if (features.GetNumVideoInputs() == 0 && features.GetNumVideoOutputs() == 0)
|
||||
continue;
|
||||
|
||||
if (it->numVidInputs > 0)
|
||||
ret = g_list_prepend(ret, gst_aja_device_new(*it, TRUE));
|
||||
if (it->numVidOutputs > 0)
|
||||
ret = g_list_prepend(ret, gst_aja_device_new(*it, FALSE));
|
||||
if (features.GetNumVideoInputs() > 0)
|
||||
ret = g_list_prepend(ret, gst_aja_device_new(device, device_idx, TRUE));
|
||||
if (features.GetNumVideoOutputs() > 0)
|
||||
ret = g_list_prepend(ret, gst_aja_device_new(device, device_idx, FALSE));
|
||||
}
|
||||
|
||||
ret = g_list_reverse(ret);
|
||||
|
@ -98,7 +100,7 @@ static void gst_aja_device_class_init(GstAjaDeviceClass *klass) {
|
|||
GST_DEBUG_FUNCPTR(gst_aja_device_create_element);
|
||||
}
|
||||
|
||||
static GstDevice *gst_aja_device_new(NTV2DeviceInfo &device,
|
||||
static GstDevice *gst_aja_device_new(CNTV2Card &device, guint index,
|
||||
gboolean is_capture) {
|
||||
GstDevice *ret;
|
||||
gchar *display_name;
|
||||
|
@ -107,52 +109,62 @@ static GstDevice *gst_aja_device_new(NTV2DeviceInfo &device,
|
|||
GstStructure *properties;
|
||||
|
||||
device_class = is_capture ? "Audio/Video/Source" : "Audio/Video/Sink";
|
||||
display_name = g_strdup_printf("AJA %s (%s)", device.deviceIdentifier.c_str(),
|
||||
display_name = g_strdup_printf("AJA %s (%s)", device.GetDisplayName().c_str(),
|
||||
is_capture ? "Source" : "Sink");
|
||||
|
||||
caps = gst_ntv2_supported_caps(device.deviceID);
|
||||
caps = gst_ntv2_supported_caps(device.GetDeviceID());
|
||||
|
||||
properties = gst_structure_new_empty("properties");
|
||||
|
||||
auto features = device.features();
|
||||
auto widget_ids = device.GetSupportedItems(kNTV2EnumsID_WidgetID);
|
||||
gst_structure_set(
|
||||
properties, "device-id", G_TYPE_UINT, device.deviceID, "device-index",
|
||||
G_TYPE_UINT, device.deviceIndex, "pci-slot", G_TYPE_UINT, device.pciSlot,
|
||||
"serial-number", G_TYPE_UINT64, device.deviceSerialNumber,
|
||||
"device-identifier", G_TYPE_STRING, device.deviceIdentifier.c_str(),
|
||||
"num-audio-streams", G_TYPE_UINT, device.numAudioStreams,
|
||||
"dual-link-support", G_TYPE_BOOLEAN, device.dualLinkSupport,
|
||||
"sdi-3g-support", G_TYPE_BOOLEAN, device.sdi3GSupport, "sdi-12g-support",
|
||||
G_TYPE_BOOLEAN, device.sdi12GSupport, "ip-support", G_TYPE_BOOLEAN,
|
||||
device.ipSupport, "bi-directional-sdi", G_TYPE_BOOLEAN,
|
||||
device.biDirectionalSDI, "ltc-in-support", G_TYPE_BOOLEAN,
|
||||
device.ltcInSupport, "ltc-in-on-ref-port", G_TYPE_BOOLEAN,
|
||||
device.ltcInOnRefPort, "2k-support", G_TYPE_BOOLEAN, device.has2KSupport,
|
||||
"4k-support", G_TYPE_BOOLEAN, device.has4KSupport, "8k-support",
|
||||
G_TYPE_BOOLEAN, device.has8KSupport, "multiformat-support",
|
||||
G_TYPE_BOOLEAN, device.multiFormat, NULL);
|
||||
properties, "device-id", G_TYPE_UINT, device.GetDeviceID(),
|
||||
"device-index", G_TYPE_UINT, index, "serial-number", G_TYPE_UINT64,
|
||||
device.GetSerialNumber(), "device-identifier", G_TYPE_STRING,
|
||||
device.GetDisplayName().c_str(), "num-audio-streams", G_TYPE_UINT,
|
||||
features.GetNumAudioSystems(), "dual-link-support", G_TYPE_BOOLEAN,
|
||||
features.CanDoDualLink(), "sdi-3g-support", G_TYPE_BOOLEAN,
|
||||
widget_ids.find(NTV2_Wgt3GSDIOut1) != widget_ids.end(), "sdi-12g-support",
|
||||
G_TYPE_BOOLEAN, device.IsSupported(kDeviceCanDo12GSDI), "ip-support",
|
||||
G_TYPE_BOOLEAN, device.IsSupported(kDeviceCanDoIP), "bi-directional-sdi",
|
||||
G_TYPE_BOOLEAN, device.IsSupported(kDeviceHasBiDirectionalSDI),
|
||||
"ltc-in-support", G_TYPE_BOOLEAN,
|
||||
device.GetNumSupported(kDeviceGetNumLTCInputs) > 0, "ltc-in-on-ref-port",
|
||||
G_TYPE_BOOLEAN, device.IsSupported(kDeviceCanDoLTCInOnRefPort),
|
||||
"2k-support", G_TYPE_BOOLEAN, device.IsSupported(kDeviceCanDo2KVideo),
|
||||
"4k-support", G_TYPE_BOOLEAN, device.IsSupported(kDeviceCanDo4KVideo),
|
||||
"8k-support", G_TYPE_BOOLEAN, device.IsSupported(kDeviceCanDo8KVideo),
|
||||
"multiformat-support", G_TYPE_BOOLEAN,
|
||||
device.IsSupported(kDeviceCanDoMultiFormat), NULL);
|
||||
|
||||
if (is_capture) {
|
||||
gst_structure_set(
|
||||
properties, "num-vid-inputs", G_TYPE_UINT, device.numVidInputs,
|
||||
"num-anlg-vid-inputs", G_TYPE_UINT, device.numAnlgVidInputs,
|
||||
"num-hdmi-vid-inputs", G_TYPE_UINT, device.numHDMIVidInputs,
|
||||
properties, "num-vid-inputs", G_TYPE_UINT, features.GetNumVideoInputs(),
|
||||
"num-anlg-vid-inputs", G_TYPE_UINT, features.GetNumAnalogVideoInputs(),
|
||||
"num-hdmi-vid-inputs", G_TYPE_UINT, features.GetNumHDMIVideoInputs(),
|
||||
"num-analog-audio-input-channels", G_TYPE_UINT,
|
||||
device.numAnalogAudioInputChannels, "num-aes-audio-input-channels",
|
||||
G_TYPE_UINT, device.numAESAudioInputChannels,
|
||||
features.GetNumAnalogAudioInputChannels(),
|
||||
"num-aes-audio-input-channels", G_TYPE_UINT,
|
||||
features.GetNumAESAudioInputChannels(),
|
||||
"num-embedded-audio-input-channels", G_TYPE_UINT,
|
||||
device.numEmbeddedAudioInputChannels, "num-hdmi-audio-input-channels",
|
||||
G_TYPE_UINT, device.numHDMIAudioInputChannels, NULL);
|
||||
features.GetNumEmbeddedAudioInputChannels(),
|
||||
"num-hdmi-audio-input-channels", G_TYPE_UINT,
|
||||
features.GetNumHDMIAudioInputChannels(), NULL);
|
||||
} else {
|
||||
gst_structure_set(
|
||||
properties, "num-vid-outputs", G_TYPE_UINT, device.numVidOutputs,
|
||||
"num-anlg-vid-outputs", G_TYPE_UINT, device.numAnlgVidOutputs,
|
||||
"num-hdmi-vid-outputs", G_TYPE_UINT, device.numHDMIVidOutputs,
|
||||
"num-analog-audio-output-channels", G_TYPE_UINT,
|
||||
device.numAnalogAudioOutputChannels, "num-aes-audio-output-channels",
|
||||
G_TYPE_UINT, device.numAESAudioOutputChannels,
|
||||
"num-embedded-audio-output-channels", G_TYPE_UINT,
|
||||
device.numEmbeddedAudioOutputChannels, "num-hdmi-audio-output-channels",
|
||||
G_TYPE_UINT, device.numHDMIAudioOutputChannels, NULL);
|
||||
gst_structure_set(properties, "num-vid-outputs", G_TYPE_UINT,
|
||||
features.GetNumVideoOutputs(), "num-anlg-vid-outputs",
|
||||
G_TYPE_UINT, features.GetNumAnalogVideoOutputs(),
|
||||
"num-hdmi-vid-outputs", G_TYPE_UINT,
|
||||
features.GetNumHDMIVideoOutputs(),
|
||||
"num-analog-audio-output-channels", G_TYPE_UINT,
|
||||
features.GetNumAnalogAudioOutputChannels(),
|
||||
"num-aes-audio-output-channels", G_TYPE_UINT,
|
||||
features.GetNumAESAudioOutputChannels(),
|
||||
"num-embedded-audio-output-channels", G_TYPE_UINT,
|
||||
features.GetNumEmbeddedAudioOutputChannels(),
|
||||
"num-hdmi-audio-output-channels", G_TYPE_UINT,
|
||||
features.GetNumHDMIAudioOutputChannels(), NULL);
|
||||
}
|
||||
|
||||
ret = GST_DEVICE(g_object_new(GST_TYPE_AJA_DEVICE, "display-name",
|
||||
|
@ -164,7 +176,7 @@ static GstDevice *gst_aja_device_new(NTV2DeviceInfo &device,
|
|||
gst_structure_free(properties);
|
||||
|
||||
GST_AJA_DEVICE(ret)->is_capture = is_capture;
|
||||
GST_AJA_DEVICE(ret)->device_index = device.deviceIndex;
|
||||
GST_AJA_DEVICE(ret)->device_index = index;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[wrap-file]
|
||||
directory = libajantv2-ntv2_17_0_1
|
||||
source_url = https://github.com/aja-video/libajantv2/archive/refs/tags/ntv2_17_0_1.tar.gz
|
||||
source_filename = libajantv2-ntv2_17_0_1.tar.gz
|
||||
source_hash = a4be947e4e34dd8065b25082a681994067877966c2aaef8fbc9a25681f03ebe7
|
||||
directory = libajantv2-ntv2_17_1_0
|
||||
source_url = https://github.com/aja-video/libajantv2/archive/refs/tags/ntv2_17_1_0.tar.gz
|
||||
source_filename = libajantv2-ntv2_17_1_0.tar.gz
|
||||
source_hash = b19bd5d2eb2cb20552d084cd709549517875922c4a6960e077ce96bf2922b7dd
|
||||
patch_directory = ntv2
|
||||
|
||||
[provide]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
project('ajantv2', ['c', 'cpp'],
|
||||
version : '17.0.1',
|
||||
version : '17.1.0',
|
||||
meson_version : '>= 0.54.0',
|
||||
default_options : [ 'warning_level=1',
|
||||
'buildtype=debugoptimized',
|
||||
|
@ -30,10 +30,10 @@ endif
|
|||
|
||||
conf_data = configuration_data()
|
||||
conf_data.set('AJA_NTV2_SDK_VERSION_MAJOR', '17')
|
||||
conf_data.set('AJA_NTV2_SDK_VERSION_MINOR', '0')
|
||||
conf_data.set('AJA_NTV2_SDK_VERSION_POINT', '1')
|
||||
conf_data.set('AJA_NTV2_SDK_VERSION_MINOR', '1')
|
||||
conf_data.set('AJA_NTV2_SDK_VERSION_POINT', '0')
|
||||
conf_data.set('AJA_NTV2_SDK_BUILD_NUMBER', '0')
|
||||
conf_data.set('AJA_NTV2_SDK_BUILD_DATETIME', '2024-02-15T17:41:48-08:00')
|
||||
conf_data.set('AJA_NTV2_SDK_BUILD_DATETIME', '2024-07-18T13:40:28-07:00')
|
||||
conf_data.set('AJA_NTV2_SDK_BUILD_TYPE', '')
|
||||
configure_file(input : 'ajantv2/includes/ntv2version.h.in',
|
||||
output : 'ntv2version.h',
|
||||
|
@ -58,6 +58,7 @@ ajantv2_sources = [
|
|||
'ajaanc/src/ancillarydata_timecode.cpp',
|
||||
'ajaanc/src/ancillarydata_timecode_atc.cpp',
|
||||
'ajaanc/src/ancillarydata_timecode_vitc.cpp',
|
||||
'ajaanc/src/ancillarydata_hdmi_aux.cpp',
|
||||
'ajaanc/src/ancillarylist.cpp',
|
||||
'ajabase/common/audioutilities.cpp',
|
||||
'ajabase/common/buffer.cpp',
|
||||
|
@ -103,6 +104,7 @@ ajantv2_sources = [
|
|||
'ajabase/system/linux/processimpl.cpp',
|
||||
'ajabase/system/linux/threadimpl.cpp',
|
||||
'ajantv2/src/ntv2anc.cpp',
|
||||
'ajantv2/src/ntv2aux.cpp',
|
||||
'ajantv2/src/ntv2audio.cpp',
|
||||
'ajantv2/src/ntv2autocirculate.cpp',
|
||||
'ajantv2/src/ntv2bitfile.cpp',
|
||||
|
@ -148,7 +150,6 @@ ajantv2_sources = [
|
|||
'ajantv2/src/ntv2task.cpp',
|
||||
'ajantv2/src/ntv2testpatterngen.cpp',
|
||||
'ajantv2/src/ntv2transcode.cpp',
|
||||
'ajantv2/src/ntv2utf8.cpp',
|
||||
'ajantv2/src/ntv2utils.cpp',
|
||||
'ajantv2/src/ntv2version.cpp',
|
||||
'ajantv2/src/ntv2verticalfilter.cpp',
|
||||
|
@ -164,6 +165,7 @@ ajantv2_args = [
|
|||
'-DAJA_USE_CPLUSPLUS11',
|
||||
'-DNDEBUG',
|
||||
'-DNTV2_USE_CPLUSPLUS11',
|
||||
'-DNTV2_PREVENT_PLUGIN_LOAD',
|
||||
]
|
||||
|
||||
ajantv2_inc = include_directories(
|
||||
|
|
Loading…
Reference in a new issue