mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
Add property for enabling/disabling of RP188 receival/transmission
Enabling this can lead to frame drops in certain setups so enabling it always is not ideal.
This commit is contained in:
parent
1f6ea294db
commit
27fb7d380a
4 changed files with 37 additions and 4 deletions
|
@ -38,6 +38,7 @@ GST_DEBUG_CATEGORY_STATIC(gst_aja_sink_debug);
|
|||
#define DEFAULT_OUTPUT_DESTINATION (GST_AJA_OUTPUT_DESTINATION_AUTO)
|
||||
#define DEFAULT_SDI_MODE (GST_AJA_SDI_MODE_SINGLE_LINK)
|
||||
#define DEFAULT_TIMECODE_INDEX (GST_AJA_TIMECODE_INDEX_VITC)
|
||||
#define DEFAULT_RP188 (TRUE)
|
||||
#define DEFAULT_REFERENCE_SOURCE (GST_AJA_REFERENCE_SOURCE_AUTO)
|
||||
#define DEFAULT_CEA608_LINE_NUMBER (12)
|
||||
#define DEFAULT_CEA708_LINE_NUMBER (12)
|
||||
|
@ -54,6 +55,7 @@ enum {
|
|||
PROP_OUTPUT_DESTINATION,
|
||||
PROP_SDI_MODE,
|
||||
PROP_TIMECODE_INDEX,
|
||||
PROP_RP188,
|
||||
PROP_REFERENCE_SOURCE,
|
||||
PROP_CEA608_LINE_NUMBER,
|
||||
PROP_CEA708_LINE_NUMBER,
|
||||
|
@ -195,6 +197,13 @@ static void gst_aja_sink_class_init(GstAjaSinkClass *klass) {
|
|||
(GParamFlags)(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
|
||||
G_PARAM_CONSTRUCT)));
|
||||
|
||||
g_object_class_install_property(
|
||||
gobject_class, PROP_RP188,
|
||||
g_param_spec_boolean(
|
||||
"rp188", "RP188", "Enable RP188 timecode transmission", DEFAULT_RP188,
|
||||
(GParamFlags)(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
|
||||
G_PARAM_CONSTRUCT)));
|
||||
|
||||
g_object_class_install_property(
|
||||
gobject_class, PROP_REFERENCE_SOURCE,
|
||||
g_param_spec_enum(
|
||||
|
@ -311,6 +320,9 @@ void gst_aja_sink_set_property(GObject *object, guint property_id,
|
|||
case PROP_TIMECODE_INDEX:
|
||||
self->timecode_index = (GstAjaTimecodeIndex)g_value_get_enum(value);
|
||||
break;
|
||||
case PROP_RP188:
|
||||
self->rp188 = g_value_get_boolean(value);
|
||||
break;
|
||||
case PROP_REFERENCE_SOURCE:
|
||||
self->reference_source = (GstAjaReferenceSource)g_value_get_enum(value);
|
||||
break;
|
||||
|
@ -361,6 +373,9 @@ void gst_aja_sink_get_property(GObject *object, guint property_id,
|
|||
case PROP_TIMECODE_INDEX:
|
||||
g_value_set_enum(value, self->timecode_index);
|
||||
break;
|
||||
case PROP_RP188:
|
||||
g_value_set_boolean(value, self->rp188);
|
||||
break;
|
||||
case PROP_REFERENCE_SOURCE:
|
||||
g_value_set_enum(value, self->reference_source);
|
||||
break;
|
||||
|
@ -1917,7 +1932,7 @@ restart:
|
|||
|
||||
if (!self->device->device->AutoCirculateInitForOutput(
|
||||
self->channel, 0, self->audio_system,
|
||||
AUTOCIRCULATE_WITH_RP188 |
|
||||
(self->rp188 ? AUTOCIRCULATE_WITH_RP188 : 0) |
|
||||
(self->vanc_mode == ::NTV2_VANCMODE_OFF ? AUTOCIRCULATE_WITH_ANC
|
||||
: 0),
|
||||
1, start_frame, end_frame)) {
|
||||
|
|
|
@ -76,6 +76,7 @@ struct _GstAjaSink {
|
|||
GstAjaOutputDestination output_destination;
|
||||
GstAjaSdiMode sdi_mode;
|
||||
GstAjaTimecodeIndex timecode_index;
|
||||
gboolean rp188;
|
||||
GstAjaReferenceSource reference_source;
|
||||
|
||||
gint cea608_line_number;
|
||||
|
|
|
@ -42,6 +42,7 @@ GST_DEBUG_CATEGORY_STATIC(gst_aja_src_debug);
|
|||
#define DEFAULT_AUDIO_SOURCE (GST_AJA_AUDIO_SOURCE_EMBEDDED)
|
||||
#define DEFAULT_EMBEDDED_AUDIO_INPUT (GST_AJA_EMBEDDED_AUDIO_INPUT_AUTO)
|
||||
#define DEFAULT_TIMECODE_INDEX (GST_AJA_TIMECODE_INDEX_VITC)
|
||||
#define DEFAULT_RP188 (TRUE)
|
||||
#define DEFAULT_REFERENCE_SOURCE (GST_AJA_REFERENCE_SOURCE_FREERUN)
|
||||
#define DEFAULT_CLOSED_CAPTION_CAPTURE_MODE \
|
||||
(GST_AJA_CLOSED_CAPTION_CAPTURE_MODE_CEA708_AND_CEA608)
|
||||
|
@ -61,6 +62,7 @@ enum {
|
|||
PROP_AUDIO_SOURCE,
|
||||
PROP_EMBEDDED_AUDIO_INPUT,
|
||||
PROP_TIMECODE_INDEX,
|
||||
PROP_RP188,
|
||||
PROP_REFERENCE_SOURCE,
|
||||
PROP_CLOSED_CAPTION_CAPTURE_MODE,
|
||||
PROP_START_FRAME,
|
||||
|
@ -225,6 +227,13 @@ static void gst_aja_src_class_init(GstAjaSrcClass *klass) {
|
|||
(GParamFlags)(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
|
||||
G_PARAM_CONSTRUCT)));
|
||||
|
||||
g_object_class_install_property(
|
||||
gobject_class, PROP_RP188,
|
||||
g_param_spec_boolean(
|
||||
"rp188", "RP188", "Enable RP188 timecode retrieval", DEFAULT_RP188,
|
||||
(GParamFlags)(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
|
||||
G_PARAM_CONSTRUCT)));
|
||||
|
||||
g_object_class_install_property(
|
||||
gobject_class, PROP_REFERENCE_SOURCE,
|
||||
g_param_spec_enum(
|
||||
|
@ -354,6 +363,9 @@ void gst_aja_src_set_property(GObject *object, guint property_id,
|
|||
case PROP_TIMECODE_INDEX:
|
||||
self->timecode_index = (GstAjaTimecodeIndex)g_value_get_enum(value);
|
||||
break;
|
||||
case PROP_RP188:
|
||||
self->rp188 = g_value_get_boolean(value);
|
||||
break;
|
||||
case PROP_REFERENCE_SOURCE:
|
||||
self->reference_source = (GstAjaReferenceSource)g_value_get_enum(value);
|
||||
break;
|
||||
|
@ -411,6 +423,9 @@ void gst_aja_src_get_property(GObject *object, guint property_id, GValue *value,
|
|||
case PROP_TIMECODE_INDEX:
|
||||
g_value_set_enum(value, self->timecode_index);
|
||||
break;
|
||||
case PROP_RP188:
|
||||
g_value_set_boolean(value, self->rp188);
|
||||
break;
|
||||
case PROP_REFERENCE_SOURCE:
|
||||
g_value_set_enum(value, self->reference_source);
|
||||
break;
|
||||
|
@ -2084,9 +2099,10 @@ restart:
|
|||
|
||||
if (!self->device->device->AutoCirculateInitForInput(
|
||||
self->channel, 0, self->audio_system,
|
||||
AUTOCIRCULATE_WITH_RP188 | (self->vanc_mode == ::NTV2_VANCMODE_OFF
|
||||
? AUTOCIRCULATE_WITH_ANC
|
||||
: 0),
|
||||
(self->rp188 ? AUTOCIRCULATE_WITH_RP188 : 0) |
|
||||
(self->vanc_mode == ::NTV2_VANCMODE_OFF
|
||||
? AUTOCIRCULATE_WITH_ANC
|
||||
: 0),
|
||||
1, start_frame, end_frame)) {
|
||||
GST_ELEMENT_ERROR(self, STREAM, FAILED, (NULL),
|
||||
("Failed to initialize autocirculate"));
|
||||
|
|
|
@ -69,6 +69,7 @@ struct _GstAjaSrc {
|
|||
GstAjaAudioSource audio_source;
|
||||
GstAjaEmbeddedAudioInput embedded_audio_input;
|
||||
GstAjaTimecodeIndex timecode_index;
|
||||
gboolean rp188;
|
||||
GstAjaReferenceSource reference_source;
|
||||
GstAjaClosedCaptionCaptureMode closed_caption_capture_mode;
|
||||
guint queue_size;
|
||||
|
|
Loading…
Reference in a new issue