From f637e3b80cf3b242be6c75995a6995c72fb465ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 27 Jun 2007 12:55:20 +0000 Subject: [PATCH] gst-libs/gst/pbutils/descriptions.c: Add description for Windows Media RTP caps. Original commit message from CVS: * gst-libs/gst/pbutils/descriptions.c: (caps_are_rtp_caps): Add description for Windows Media RTP caps. * gst-libs/gst/pbutils/missing-plugins.c: (copy_and_clean_caps): Remove RTP fields that don't define the format from caps. --- ChangeLog | 8 ++++++++ gst-libs/gst/pbutils/descriptions.c | 10 +++++++++- gst-libs/gst/pbutils/missing-plugins.c | 10 ++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 16b26ed094..7132d8bc22 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-06-27 Tim-Philipp Müller + + * gst-libs/gst/pbutils/descriptions.c: (caps_are_rtp_caps): + Add description for Windows Media RTP caps. + + * gst-libs/gst/pbutils/missing-plugins.c: (copy_and_clean_caps): + Remove RTP fields that don't define the format from caps. + 2007-06-27 Tim-Philipp Müller * ext/vorbis/vorbisdec.c: (vorbis_dec_decode_buffer): diff --git a/gst-libs/gst/pbutils/descriptions.c b/gst-libs/gst/pbutils/descriptions.c index c76b8a2dbc..4ba1145e6d 100644 --- a/gst-libs/gst/pbutils/descriptions.c +++ b/gst-libs/gst/pbutils/descriptions.c @@ -606,7 +606,15 @@ caps_are_rtp_caps (const GstCaps * caps, const gchar * media, gchar ** format) str = gst_structure_get_string (s, "encoding-name"); if (str == NULL || *str == '\0') return FALSE; - *format = g_strdup (str); + + if (strcmp (str, "X-ASF-PF") == 0) { + *format = g_strdup ("Windows Media"); + } else if (g_str_has_prefix (str, "X-")) { + *format = g_strdup (str + 2); + } else { + *format = g_strdup (str); + } + return TRUE; } diff --git a/gst-libs/gst/pbutils/missing-plugins.c b/gst-libs/gst/pbutils/missing-plugins.c index 465d34c0ab..3d6d9055fc 100644 --- a/gst-libs/gst/pbutils/missing-plugins.c +++ b/gst-libs/gst/pbutils/missing-plugins.c @@ -137,6 +137,16 @@ copy_and_clean_caps (const GstCaps * caps) gst_structure_remove_field (s, "height"); gst_structure_remove_field (s, "channels"); gst_structure_remove_field (s, "rate"); + /* rtp fields */ + gst_structure_remove_field (s, "config"); + gst_structure_remove_field (s, "clock-rate"); + gst_structure_remove_field (s, "clock-base"); + gst_structure_remove_field (s, "maxps"); + gst_structure_remove_field (s, "seqnum-base"); + gst_structure_remove_field (s, "npt-start"); + gst_structure_remove_field (s, "npt-stop"); + gst_structure_remove_field (s, "play-speed"); + gst_structure_remove_field (s, "play-scale"); return ret; }