summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.co.uk>2010-01-18 14:49:26 -0500
committerWim Taymans <wim.taymans@collabora.co.uk>2010-01-19 13:47:38 +0100
commitc4fa559f1594ab4f8505da78196c5a871b833c0a (patch)
treee8cea020d8f5924c43d1b0f870342c1dbb820e56
parent7a0590b1f181853162a02a3082a4c3a097978fc5 (diff)
rtph264pay: Don't set profile-level-id in out caps
The profile-level-id represents restrictions on what can be sent, it does not describe the stream. So it should be reflected in the sink caps of the payloader, not the src caps. https://bugzilla.gnome.org/show_bug.cgi?id=607353
-rw-r--r--gst/rtp/gstrtph264pay.c22
-rw-r--r--gst/rtp/gstrtph264pay.h1
2 files changed, 6 insertions, 17 deletions
diff --git a/gst/rtp/gstrtph264pay.c b/gst/rtp/gstrtph264pay.c
index 3876e3bca..2efbbab9d 100644
--- a/gst/rtp/gstrtph264pay.c
+++ b/gst/rtp/gstrtph264pay.c
@@ -151,8 +151,7 @@ gst_rtp_h264_pay_class_init (GstRtpH264PayClass * klass)
g_object_class_install_property (G_OBJECT_CLASS (klass),
PROP_PROFILE_LEVEL_ID, g_param_spec_string ("profile-level-id",
"profile-level-id",
- "The base64 profile-level-id to set in out caps (set to NULL to "
- "extract from stream)",
+ "The base64 profile-level-id to set in the sink caps (deprecated)",
DEFAULT_PROFILE_LEVEL_ID,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
@@ -230,7 +229,6 @@ gst_rtp_h264_pay_finalize (GObject * object)
gst_rtp_h264_pay_clear_sps_pps (rtph264pay);
- g_free (rtph264pay->profile_level_id);
g_free (rtph264pay->sprop_parameter_sets);
G_OBJECT_CLASS (parent_class)->finalize (object);
@@ -275,8 +273,7 @@ gst_rtp_h264_pay_set_sps_pps (GstBaseRTPPayload * basepayload)
/* profile is 24 bit. Force it to respect the limit */
profile = g_strdup_printf ("%06x", payloader->profile & 0xffffff);
/* combine into output caps */
- res = gst_basertppayload_set_outcaps (basepayload, "profile-level-id",
- G_TYPE_STRING, profile,
+ res = gst_basertppayload_set_outcaps (basepayload,
"sprop-parameter-sets", G_TYPE_STRING, sprops->str, NULL);
g_string_free (sprops, TRUE);
g_free (profile);
@@ -945,21 +942,18 @@ gst_rtp_h264_pay_handle_buffer (GstBaseRTPPayload * basepayload,
GST_DEBUG_OBJECT (basepayload, "found next start at %u of size %u", next,
nal_len);
- if (rtph264pay->profile_level_id != NULL &&
- rtph264pay->sprop_parameter_sets != NULL) {
+ if (rtph264pay->sprop_parameter_sets != NULL) {
/* explicitly set profile and sprop, use those */
if (rtph264pay->update_caps) {
- if (!gst_basertppayload_set_outcaps (basepayload, "profile-level-id",
- G_TYPE_STRING, rtph264pay->profile_level_id,
+ if (!gst_basertppayload_set_outcaps (basepayload,
"sprop-parameter-sets", G_TYPE_STRING,
rtph264pay->sprop_parameter_sets, NULL))
goto caps_rejected;
rtph264pay->update_caps = FALSE;
- GST_DEBUG
- ("outcaps udpate: profile-level-id=%s, sprop-parameter-sets=%s",
- rtph264pay->profile_level_id, rtph264pay->sprop_parameter_sets);
+ GST_DEBUG ("outcaps udpate: sprop-parameter-sets=%s",
+ rtph264pay->sprop_parameter_sets);
}
} else {
/* We know our stream is a valid H264 NAL packet,
@@ -1025,9 +1019,6 @@ gst_rtp_h264_pay_set_property (GObject * object, guint prop_id,
switch (prop_id) {
case PROP_PROFILE_LEVEL_ID:
- g_free (rtph264pay->profile_level_id);
- rtph264pay->profile_level_id = g_value_dup_string (value);
- rtph264pay->update_caps = TRUE;
break;
case PROP_SPROP_PARAMETER_SETS:
g_free (rtph264pay->sprop_parameter_sets);
@@ -1059,7 +1050,6 @@ gst_rtp_h264_pay_get_property (GObject * object, guint prop_id,
switch (prop_id) {
case PROP_PROFILE_LEVEL_ID:
- g_value_set_string (value, rtph264pay->profile_level_id);
break;
case PROP_SPROP_PARAMETER_SETS:
g_value_set_string (value, rtph264pay->sprop_parameter_sets);
diff --git a/gst/rtp/gstrtph264pay.h b/gst/rtp/gstrtph264pay.h
index 3522d83df..823756fe4 100644
--- a/gst/rtp/gstrtph264pay.h
+++ b/gst/rtp/gstrtph264pay.h
@@ -57,7 +57,6 @@ struct _GstRtpH264Pay
guint nal_length_size;
GArray *queue;
- gchar *profile_level_id;
gchar *sprop_parameter_sets;
gboolean update_caps;
GstH264ScanMode scan_mode;