From 5732684e18b4d8e0a71242407df92d5e7ceb8170 Mon Sep 17 00:00:00 2001 From: Andoni Morales Alastruey Date: Tue, 17 Sep 2013 12:01:30 +0200 Subject: [PATCH] qtmux: deprecate the streamable property for non-fragmented MP4 The streamable property only makes sense for fragmented MP4. https://bugzilla.gnome.org/show_bug.cgi?id=707242 --- gst/isomp4/gstqtmux.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/gst/isomp4/gstqtmux.c b/gst/isomp4/gstqtmux.c index 710d0da..b808b71 100644 --- a/gst/isomp4/gstqtmux.c +++ b/gst/isomp4/gstqtmux.c @@ -278,6 +278,9 @@ gst_qt_mux_class_init (GstQTMuxClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; + const gchar *streamable_desc; +#define STREAMABLE_DESC "If set to true, the output should be as if it is to "\ + "be streamed and hence no indexes written or duration written." gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; @@ -288,6 +291,13 @@ gst_qt_mux_class_init (GstQTMuxClass * klass) gobject_class->get_property = gst_qt_mux_get_property; gobject_class->set_property = gst_qt_mux_set_property; + if (klass->format == GST_QT_MUX_FORMAT_ISML) { + streamable_desc = STREAMABLE_DESC; + } else { + streamable_desc = + STREAMABLE_DESC " (DEPRECATED, only valid for fragmented MP4)"; + } + g_object_class_install_property (gobject_class, PROP_MOVIE_TIMESCALE, g_param_spec_uint ("movie-timescale", "Movie timescale", "Timescale to use in the movie (units per second)", @@ -337,9 +347,7 @@ gst_qt_mux_class_init (GstQTMuxClass * klass) 2000 : DEFAULT_FRAGMENT_DURATION, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_STREAMABLE, - g_param_spec_boolean ("streamable", "Streamable", - "If set to true, the output should be as if it is to be streamed " - "and hence no indexes written or duration written.", + g_param_spec_boolean ("streamable", "Streamable", streamable_desc, DEFAULT_STREAMABLE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); @@ -3399,9 +3407,14 @@ gst_qt_mux_set_property (GObject * object, case PROP_FRAGMENT_DURATION: qtmux->fragment_duration = g_value_get_uint (value); break; - case PROP_STREAMABLE: - qtmux->streamable = g_value_get_boolean (value); + case PROP_STREAMABLE:{ + GstQTMuxClass *qtmux_klass = + (GstQTMuxClass *) (G_OBJECT_GET_CLASS (qtmux)); + if (qtmux_klass->format == GST_QT_MUX_FORMAT_ISML) { + qtmux->streamable = g_value_get_boolean (value); + } break; + } default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; -- 2.7.4