summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2015-02-05 10:29:26 +0000
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2015-02-19 13:52:29 +0000
commitb866c989f5edf6439bd4d0dd0e58e9a5cdd9c511 (patch)
tree15d9227bf36fce71781096dae9cda88f4ec6d1b7 /gst
parent939a95d44b2cd52fce494521680a5d4bc5616666 (diff)
rtpvp8pay: negotiate encoding name
Chrome uses a different one than gstreamer. https://bugzilla.gnome.org/show_bug.cgi?id=737810
Diffstat (limited to 'gst')
-rw-r--r--gst/rtp/gstrtpvp8pay.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/gst/rtp/gstrtpvp8pay.c b/gst/rtp/gstrtpvp8pay.c
index 489895457..18180d588 100644
--- a/gst/rtp/gstrtpvp8pay.c
+++ b/gst/rtp/gstrtpvp8pay.c
@@ -509,8 +509,25 @@ gst_rtp_vp8_pay_sink_event (GstRTPBasePayload * payload, GstEvent * event)
static gboolean
gst_rtp_vp8_pay_set_caps (GstRTPBasePayload * payload, GstCaps * caps)
{
+ GstCaps *src_caps;
+ GstStructure *s;
+ char *encoding_name;
+
+ src_caps = gst_pad_get_allowed_caps (GST_RTP_BASE_PAYLOAD_SRCPAD (payload));
+ if (src_caps) {
+ src_caps = gst_caps_truncate (src_caps);
+ src_caps = gst_caps_make_writable (src_caps);
+ s = gst_caps_get_structure (src_caps, 0);
+ gst_structure_fixate_field_string (s, "encoding-name", "VP8-DRAFT-IETF-01");
+ encoding_name = g_strdup (gst_structure_get_string (s, "encoding-name"));
+ gst_caps_unref (src_caps);
+ } else {
+ encoding_name = g_strdup ("VP8-DRAFT-IETF-01");
+ }
+
gst_rtp_base_payload_set_options (payload, "video", TRUE,
- "VP8-DRAFT-IETF-01", 90000);
+ encoding_name, 90000);
+ g_free (encoding_name);
return gst_rtp_base_payload_set_outcaps (payload, NULL);
}