mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 08:41:07 +00:00
rtph263ppay: Set H263-2000 if thats what the other side wants
The static caps states this element supports H263-2000, but setcaps never sets it, so it was lie. See https://bugzilla.gnome.org/show_bug.cgi?id=577784
This commit is contained in:
parent
b2e8362767
commit
d4778dbe43
1 changed files with 23 additions and 1 deletions
|
@ -162,9 +162,31 @@ static gboolean
|
|||
gst_rtp_h263p_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
|
||||
{
|
||||
gboolean res;
|
||||
GstCaps *peercaps;
|
||||
gchar *encoding_name = NULL;
|
||||
|
||||
gst_basertppayload_set_options (payload, "video", TRUE, "H263-1998", 90000);
|
||||
g_return_val_if_fail (gst_caps_is_fixed (caps), FALSE);
|
||||
|
||||
peercaps = gst_pad_peer_get_caps (GST_BASE_RTP_PAYLOAD_SRCPAD (payload));
|
||||
if (peercaps) {
|
||||
GstCaps *intersect = gst_caps_intersect (peercaps,
|
||||
gst_pad_get_pad_template_caps (GST_BASE_RTP_PAYLOAD_SRCPAD (payload)));
|
||||
|
||||
gst_caps_unref (peercaps);
|
||||
if (!gst_caps_is_empty (intersect)) {
|
||||
GstStructure *s = gst_caps_get_structure (intersect, 0);
|
||||
encoding_name = g_strdup (gst_structure_get_string (s, "encoding-name"));
|
||||
}
|
||||
gst_caps_unref (intersect);
|
||||
}
|
||||
|
||||
if (!encoding_name)
|
||||
encoding_name = g_strdup ("H263-1998");
|
||||
|
||||
gst_basertppayload_set_options (payload, "video", TRUE,
|
||||
(gchar *) encoding_name, 90000);
|
||||
res = gst_basertppayload_set_outcaps (payload, NULL);
|
||||
g_free (encoding_name);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue