"extension id %" G_GUINT64_FORMAT, uri, ext_id);
gst_clear_object (&ext);
}
- /* it is the signal handler's responsibility to set attributes if
- * required */
+
+ if (ext && !gst_rtp_header_extension_set_attributes_from_caps (ext,
+ caps)) {
+ GST_WARNING_OBJECT (filter,
+ "Failed to configure rtp header " "extension %"
+ GST_PTR_FORMAT " attributes from caps %" GST_PTR_FORMAT,
+ ext, caps);
+ res = FALSE;
+ g_clear_object (&ext);
+ goto ext_out;
+ }
/* We don't create an extension implementation by default and require
* the caller to set the appropriate extension if it's required */
GST_START_TEST (rtp_base_depayload_request_extension)
{
GstRTPHeaderExtension *ext;
+ GstRTPDummyHdrExt *dummy;
State *state;
state =
create_depayloader ("application/x-rtp,extmap-3=(string)"
DUMMY_HDR_EXT_URI, NULL);
ext = rtp_dummy_hdr_ext_new ();
+ dummy = GST_RTP_DUMMY_HDR_EXT (ext);
gst_rtp_header_extension_set_id (ext, 3);
GST_RTP_DUMMY_DEPAY (state->element)->push_method =
g_signal_connect (state->element, "request-extension",
G_CALLBACK (request_extension), ext);
+ fail_unless (dummy->set_attributes_count == 0);
+
set_state (state, GST_STATE_PLAYING);
push_rtp_buffer (state, "pts", 0 * GST_SECOND,
validate_buffer (0, "pts", 0 * GST_SECOND, "discont", FALSE, NULL);
fail_unless_equals_int (GST_RTP_DUMMY_HDR_EXT (ext)->read_count, 1);
+ fail_unless (dummy->set_attributes_count == 1);
gst_object_unref (ext);
destroy_depayloader (state);