GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS ("video/x-h263, " "variant = (string) \"itu\"")
+ GST_STATIC_CAPS ("video/x-h263, variant = (string) itu")
);
/*
peercaps =
gst_pad_peer_query_caps (GST_RTP_BASE_PAYLOAD_SRCPAD (payload), filter);
- if (!peercaps)
+
+ /* if we're just outputting to udpsink or fakesink or so, we should also
+ * accept any input compatible with our sink template caps */
+ if (!peercaps || gst_caps_is_any (peercaps))
+ return
+ gst_pad_get_pad_template_caps (GST_RTP_BASE_PAYLOAD_SINKPAD (payload));
+
+ /* We basically need to differentiate two use-cases here: One where there's
+ * a capsfilter after the payloader with caps created from an SDP; in this
+ * case the filter caps are fixed and we want to signal to an encoder what
+ * we want it to produce. The second case is simply payloader ! depayloader
+ * where we are dealing with the depayloader's template caps. In this case
+ * we should accept any input compatible with our sink template caps. */
+ if (!gst_caps_is_fixed (peercaps))
return
gst_pad_get_pad_template_caps (GST_RTP_BASE_PAYLOAD_SINKPAD (payload));
rtp_pipeline_test (rtp_h263p_frame_data, rtp_h263p_frame_data_size,
rtp_h263p_frame_count, "video/x-h263,variant=(string)itu,"
"h263version=(string)h263", "rtph263ppay", "rtph263pdepay", 0, 0, FALSE);
+
+ /* payloader should accept any input that matches the template caps
+ * if there's just a udpsink or fakesink downstream */
+ rtp_pipeline_test (rtp_h263p_frame_data, rtp_h263p_frame_data_size,
+ rtp_h263p_frame_count, "video/x-h263,variant=(string)itu,"
+ "h263version=(string)h263", "rtph263ppay", "identity", 0, 0, FALSE);
+
+ /* default output of avenc_h263p */
+ rtp_pipeline_test (rtp_h263p_frame_data, rtp_h263p_frame_data_size,
+ rtp_h263p_frame_count, "video/x-h263,variant=(string)itu,"
+ "h263version=(string)h263p, annex-f=(boolean)true, "
+ "annex-j=(boolean)true, annex-i=(boolean)true, annex-t=(boolean)true",
+ "rtph263ppay", "identity", 0, 0, FALSE);
+
+ /* pay ! depay should also work with any input */
+ rtp_pipeline_test (rtp_h263p_frame_data, rtp_h263p_frame_data_size,
+ rtp_h263p_frame_count, "video/x-h263,variant=(string)itu,"
+ "h263version=(string)h263p, annex-f=(boolean)true, "
+ "annex-j=(boolean)true, annex-i=(boolean)true, annex-t=(boolean)true",
+ "rtph263ppay", "rtph263pdepay", 0, 0, FALSE);
}
GST_END_TEST;