Commit 5732684e authored by Andoni Morales Alastruey's avatar Andoni Morales Alastruey Committed by Sebastian Dröge

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
parent 19021e71
...@@ -278,6 +278,9 @@ gst_qt_mux_class_init (GstQTMuxClass * klass) ...@@ -278,6 +278,9 @@ gst_qt_mux_class_init (GstQTMuxClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_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; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
...@@ -288,6 +291,13 @@ gst_qt_mux_class_init (GstQTMuxClass * klass) ...@@ -288,6 +291,13 @@ gst_qt_mux_class_init (GstQTMuxClass * klass)
gobject_class->get_property = gst_qt_mux_get_property; gobject_class->get_property = gst_qt_mux_get_property;
gobject_class->set_property = gst_qt_mux_set_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_object_class_install_property (gobject_class, PROP_MOVIE_TIMESCALE,
g_param_spec_uint ("movie-timescale", "Movie timescale", g_param_spec_uint ("movie-timescale", "Movie timescale",
"Timescale to use in the movie (units per second)", "Timescale to use in the movie (units per second)",
...@@ -337,9 +347,7 @@ gst_qt_mux_class_init (GstQTMuxClass * klass) ...@@ -337,9 +347,7 @@ gst_qt_mux_class_init (GstQTMuxClass * klass)
2000 : DEFAULT_FRAGMENT_DURATION, 2000 : DEFAULT_FRAGMENT_DURATION,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_STREAMABLE, g_object_class_install_property (gobject_class, PROP_STREAMABLE,
g_param_spec_boolean ("streamable", "Streamable", g_param_spec_boolean ("streamable", "Streamable", 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.",
DEFAULT_STREAMABLE, DEFAULT_STREAMABLE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
...@@ -3399,9 +3407,14 @@ gst_qt_mux_set_property (GObject * object, ...@@ -3399,9 +3407,14 @@ gst_qt_mux_set_property (GObject * object,
case PROP_FRAGMENT_DURATION: case PROP_FRAGMENT_DURATION:
qtmux->fragment_duration = g_value_get_uint (value); qtmux->fragment_duration = g_value_get_uint (value);
break; break;
case PROP_STREAMABLE: case PROP_STREAMABLE:{
qtmux->streamable = g_value_get_boolean (value); 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; break;
}
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break; break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment