RTCP_SYNC_RTP
};
+#define GST_TYPE_RTSP_SRC_TIMEOUT_CAUSE (gst_rtsp_src_timeout_cause_get_type())
+static GType
+gst_rtsp_src_timeout_cause_get_type (void)
+{
+ static GType timeout_cause_type = 0;
+ static const GEnumValue timeout_causes[] = {
+ {GST_RTSP_SRC_TIMEOUT_CAUSE_RTCP, "timeout triggered by RTCP", "RTCP"},
+ {0, NULL, NULL},
+ };
+
+ if (!timeout_cause_type) {
+ timeout_cause_type =
+ g_enum_register_static ("GstRTSPSrcTimeoutCause", timeout_causes);
+ }
+ return timeout_cause_type;
+}
+
enum _GstRtspSrcBufferMode
{
BUFFER_MODE_NONE,
#define DEFAULT_USER_AGENT "GStreamer/" PACKAGE_VERSION
#define DEFAULT_MAX_RTCP_RTP_TIME_DIFF 1000
#define DEFAULT_RFC7273_SYNC FALSE
+#define DEFAULT_ADD_REFERENCE_TIMESTAMP_META FALSE
#define DEFAULT_MAX_TS_OFFSET_ADJUSTMENT G_GUINT64_CONSTANT(0)
#define DEFAULT_MAX_TS_OFFSET G_GINT64_CONSTANT(3000000000)
#define DEFAULT_VERSION GST_RTSP_VERSION_1_0
PROP_USER_AGENT,
PROP_MAX_RTCP_RTP_TIME_DIFF,
PROP_RFC7273_SYNC,
+ PROP_ADD_REFERENCE_TIMESTAMP_META,
PROP_MAX_TS_OFFSET_ADJUSTMENT,
PROP_MAX_TS_OFFSET,
PROP_DEFAULT_VERSION,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
+ * GstRTSPSrc:add-reference-timestamp-meta:
+ *
+ * When syncing to a RFC7273 clock, add #GstReferenceTimestampMeta
+ * to buffers with the original reconstructed reference clock timestamp.
+ *
+ * Since: 1.22
+ */
+ g_object_class_install_property (gobject_class,
+ PROP_ADD_REFERENCE_TIMESTAMP_META,
+ g_param_spec_boolean ("add-reference-timestamp-meta",
+ "Add Reference Timestamp Meta",
+ "Add Reference Timestamp Meta to buffers with the original clock timestamp "
+ "before any adjustments when syncing to an RFC7273 clock.",
+ DEFAULT_ADD_REFERENCE_TIMESTAMP_META,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
* GstRTSPSrc:default-rtsp-version:
*
* The preferred RTSP version to use while negotiating the version with the server.
gst_rtsp_ext_list_init ();
+ gst_type_mark_as_plugin_api (GST_TYPE_RTSP_SRC_TIMEOUT_CAUSE, 0);
gst_type_mark_as_plugin_api (GST_TYPE_RTSP_SRC_BUFFER_MODE, 0);
gst_type_mark_as_plugin_api (GST_TYPE_RTSP_SRC_NTP_TIME_SOURCE, 0);
gst_type_mark_as_plugin_api (GST_TYPE_RTSP_BACKCHANNEL, 0);
src->user_agent = g_strdup (DEFAULT_USER_AGENT);
src->max_rtcp_rtp_time_diff = DEFAULT_MAX_RTCP_RTP_TIME_DIFF;
src->rfc7273_sync = DEFAULT_RFC7273_SYNC;
+ src->add_reference_timestamp_meta = DEFAULT_ADD_REFERENCE_TIMESTAMP_META;
src->max_ts_offset_adjustment = DEFAULT_MAX_TS_OFFSET_ADJUSTMENT;
src->max_ts_offset = DEFAULT_MAX_TS_OFFSET;
src->max_ts_offset_is_set = FALSE;
case PROP_RFC7273_SYNC:
rtspsrc->rfc7273_sync = g_value_get_boolean (value);
break;
+ case PROP_ADD_REFERENCE_TIMESTAMP_META:
+ rtspsrc->add_reference_timestamp_meta = g_value_get_boolean (value);
+ break;
case PROP_MAX_TS_OFFSET_ADJUSTMENT:
rtspsrc->max_ts_offset_adjustment = g_value_get_uint64 (value);
break;
case PROP_RFC7273_SYNC:
g_value_set_boolean (value, rtspsrc->rfc7273_sync);
break;
+ case PROP_ADD_REFERENCE_TIMESTAMP_META:
+ g_value_set_boolean (value, rtspsrc->add_reference_timestamp_meta);
+ break;
case PROP_MAX_TS_OFFSET_ADJUSTMENT:
g_value_set_uint64 (value, rtspsrc->max_ts_offset_adjustment);
break;
/* timeout, post element message */
gst_element_post_message (GST_ELEMENT_CAST (src),
gst_message_new_element (GST_OBJECT_CAST (src),
- gst_structure_new ("GstRTSPSrcTimeout",
- "cause", G_TYPE_ENUM, GST_RTSP_SRC_TIMEOUT_CAUSE_RTCP,
+ gst_structure_new ("GstRTSPSrcTimeout", "cause",
+ GST_TYPE_RTSP_SRC_TIMEOUT_CAUSE, GST_RTSP_SRC_TIMEOUT_CAUSE_RTCP,
"stream-number", G_TYPE_INT, stream->id, "ssrc", G_TYPE_UINT,
stream->ssrc, NULL)));
g_object_set (src->manager, "rfc7273-sync", src->rfc7273_sync, NULL);
}
+ if (g_object_class_find_property (klass, "add-reference-timestamp-meta")) {
+ g_object_set (src->manager, "add-reference-timestamp-meta",
+ src->add_reference_timestamp_meta, NULL);
+ }
+
if (src->use_pipeline_clock) {
if (g_object_class_find_property (klass, "use-pipeline-clock")) {
g_object_set (src->manager, "use-pipeline-clock", TRUE, NULL);