summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@ocrete.ca>2014-10-10 18:11:19 -0400
committerOlivier CrĂȘte <olivier.crete@ocrete.ca>2014-10-10 18:16:54 -0400
commita0a37f28fe551022223f24135e0b7b9c8c3647f4 (patch)
tree1037bc82c2ce8f54fe4ff9c5c304ae24ab4d78ef
parent9eab5fda7e125f8618e5b975e192f05fc5045fc2 (diff)
rtpdtmfsrc: clock-base and seqnum-base -> timestamp-offset and seqnum-offset
These were renamed in GstRTPBasePayload in 1.0
-rw-r--r--gst/dtmf/gstrtpdtmfsrc.c26
-rw-r--r--tests/check/elements/dtmf.c8
2 files changed, 18 insertions, 16 deletions
diff --git a/gst/dtmf/gstrtpdtmfsrc.c b/gst/dtmf/gstrtpdtmfsrc.c
index ca986e788..7530b08dc 100644
--- a/gst/dtmf/gstrtpdtmfsrc.c
+++ b/gst/dtmf/gstrtpdtmfsrc.c
@@ -893,9 +893,9 @@ gst_rtp_dtmf_src_negotiate (GstBaseSrc * basesrc)
gst_caps_set_simple (srccaps,
"payload", G_TYPE_INT, dtmfsrc->pt,
"ssrc", G_TYPE_UINT, dtmfsrc->current_ssrc,
- "clock-base", G_TYPE_UINT, dtmfsrc->ts_base,
+ "timestamp-offset", G_TYPE_UINT, dtmfsrc->ts_base,
"clock-rate", G_TYPE_INT, dtmfsrc->clock_rate,
- "seqnum-base", G_TYPE_UINT, dtmfsrc->seqnum_base, NULL);
+ "seqnum-offset", G_TYPE_UINT, dtmfsrc->seqnum_base, NULL);
GST_DEBUG_OBJECT (dtmfsrc, "no peer caps: %" GST_PTR_FORMAT, srccaps);
} else {
@@ -970,26 +970,28 @@ gst_rtp_dtmf_src_negotiate (GstBaseSrc * basesrc)
dtmfsrc->current_ssrc);
}
- if (gst_structure_has_field_typed (s, "clock-base", G_TYPE_UINT)) {
- value = gst_structure_get_value (s, "clock-base");
+ if (gst_structure_has_field_typed (s, "timestamp-offset", G_TYPE_UINT)) {
+ value = gst_structure_get_value (s, "timestamp-offset");
dtmfsrc->ts_base = g_value_get_uint (value);
- GST_LOG_OBJECT (dtmfsrc, "using peer clock-base %u", dtmfsrc->ts_base);
+ GST_LOG_OBJECT (dtmfsrc, "using peer timestamp-offset %u",
+ dtmfsrc->ts_base);
} else {
/* FIXME, fixate_nearest_uint would be even better */
- gst_structure_set (s, "clock-base", G_TYPE_UINT, dtmfsrc->ts_base, NULL);
- GST_LOG_OBJECT (dtmfsrc, "using internal clock-base %u",
+ gst_structure_set (s, "timestamp-offset", G_TYPE_UINT, dtmfsrc->ts_base,
+ NULL);
+ GST_LOG_OBJECT (dtmfsrc, "using internal timestamp-offset %u",
dtmfsrc->ts_base);
}
- if (gst_structure_has_field_typed (s, "seqnum-base", G_TYPE_UINT)) {
- value = gst_structure_get_value (s, "seqnum-base");
+ if (gst_structure_has_field_typed (s, "seqnum-offset", G_TYPE_UINT)) {
+ value = gst_structure_get_value (s, "seqnum-offset");
dtmfsrc->seqnum_base = g_value_get_uint (value);
- GST_LOG_OBJECT (dtmfsrc, "using peer seqnum-base %u",
+ GST_LOG_OBJECT (dtmfsrc, "using peer seqnum-offset %u",
dtmfsrc->seqnum_base);
} else {
/* FIXME, fixate_nearest_uint would be even better */
- gst_structure_set (s, "seqnum-base", G_TYPE_UINT, dtmfsrc->seqnum_base,
+ gst_structure_set (s, "seqnum-offset", G_TYPE_UINT, dtmfsrc->seqnum_base,
NULL);
- GST_LOG_OBJECT (dtmfsrc, "using internal seqnum-base %u",
+ GST_LOG_OBJECT (dtmfsrc, "using internal seqnum-offset %u",
dtmfsrc->seqnum_base);
}
diff --git a/tests/check/elements/dtmf.c b/tests/check/elements/dtmf.c
index 8b295da06..c2ae36d50 100644
--- a/tests/check/elements/dtmf.c
+++ b/tests/check/elements/dtmf.c
@@ -233,8 +233,8 @@ GST_STATIC_PAD_TEMPLATE ("sink",
"media = (string) \"audio\", "
"payload = (int) 99, "
"clock-rate = (int) 1000, "
- "seqnum-base = (uint) 333, "
- "clock-base = (uint) 666, "
+ "seqnum-offset = (uint) 333, "
+ "timestamp-offset = (uint) 666, "
"ssrc = (uint) 999, "
"maxptime = (uint) 20, encoding-name = (string) \"TELEPHONE-EVENT\"")
);
@@ -444,8 +444,8 @@ GST_START_TEST (test_rtpdtmfsrc_min_duration)
"encoding-name", G_TYPE_STRING, "TELEPHONE-EVENT",
"media", G_TYPE_STRING, "audio",
"clock-rate", G_TYPE_INT, 1000, "payload", G_TYPE_INT, 99,
- "seqnum-base", G_TYPE_UINT, 333,
- "clock-base", G_TYPE_UINT, 666,
+ "seqnum-offset", G_TYPE_UINT, 333,
+ "timestamp-offset", G_TYPE_UINT, 666,
"ssrc", G_TYPE_UINT, 999, "ptime", G_TYPE_UINT, 20, NULL);
caps = gst_pad_get_current_caps (sink);
fail_unless (gst_caps_can_intersect (caps, expected_caps));