PROP_RESET_MUXER,
PROP_ASYNC_FINALIZE,
PROP_MUXER_FACTORY,
+ PROP_MUXER_PRESET,
PROP_MUXER_PROPERTIES,
PROP_SINK_FACTORY,
+ PROP_SINK_PRESET,
PROP_SINK_PROPERTIES,
PROP_MUXERPAD_MAP
};
"The muxer element factory to use (default = mp4mux). "
"Valid only for async-finalize = TRUE",
"mp4mux", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ /**
+ * GstSplitMuxSink:muxer-preset
+ *
+ * An optional #GstPreset name to use for the muxer. This only has an effect
+ * in `async-finalize=TRUE` mode.
+ *
+ * Since: 1.18
+ */
+ g_object_class_install_property (gobject_class, PROP_MUXER_PRESET,
+ g_param_spec_string ("muxer-preset", "Muxer preset",
+ "The muxer preset to use. "
+ "Valid only for async-finalize = TRUE",
+ NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_MUXER_PROPERTIES,
g_param_spec_boxed ("muxer-properties", "Muxer properties",
"The muxer element properties to use. "
"The sink element factory to use (default = filesink). "
"Valid only for async-finalize = TRUE",
"filesink", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ /**
+ * GstSplitMuxSink:sink-preset
+ *
+ * An optional #GstPreset name to use for the sink. This only has an effect
+ * in `async-finalize=TRUE` mode.
+ *
+ * Since: 1.18
+ */
+ g_object_class_install_property (gobject_class, PROP_SINK_PRESET,
+ g_param_spec_string ("sink-preset", "Sink preset",
+ "The sink preset to use. "
+ "Valid only for async-finalize = TRUE",
+ NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_SINK_PROPERTIES,
g_param_spec_boxed ("sink-properties", "Sink properties",
"The sink element properties to use. "
if (splitmux->muxer_factory)
g_free (splitmux->muxer_factory);
+ if (splitmux->muxer_preset)
+ g_free (splitmux->muxer_preset);
if (splitmux->muxer_properties)
gst_structure_free (splitmux->muxer_properties);
if (splitmux->sink_factory)
g_free (splitmux->sink_factory);
+ if (splitmux->sink_preset)
+ g_free (splitmux->sink_preset);
if (splitmux->sink_properties)
gst_structure_free (splitmux->sink_properties);
splitmux->muxer_factory = g_value_dup_string (value);
GST_OBJECT_UNLOCK (splitmux);
break;
+ case PROP_MUXER_PRESET:
+ GST_OBJECT_LOCK (splitmux);
+ if (splitmux->muxer_preset)
+ g_free (splitmux->muxer_preset);
+ splitmux->muxer_preset = g_value_dup_string (value);
+ GST_OBJECT_UNLOCK (splitmux);
+ break;
case PROP_MUXER_PROPERTIES:
GST_OBJECT_LOCK (splitmux);
if (splitmux->muxer_properties)
splitmux->sink_factory = g_value_dup_string (value);
GST_OBJECT_UNLOCK (splitmux);
break;
+ case PROP_SINK_PRESET:
+ GST_OBJECT_LOCK (splitmux);
+ if (splitmux->sink_preset)
+ g_free (splitmux->sink_preset);
+ splitmux->sink_preset = g_value_dup_string (value);
+ GST_OBJECT_UNLOCK (splitmux);
+ break;
case PROP_SINK_PROPERTIES:
GST_OBJECT_LOCK (splitmux);
if (splitmux->sink_properties)
g_value_set_string (value, splitmux->muxer_factory);
GST_OBJECT_UNLOCK (splitmux);
break;
+ case PROP_MUXER_PRESET:
+ GST_OBJECT_LOCK (splitmux);
+ g_value_set_string (value, splitmux->muxer_preset);
+ GST_OBJECT_UNLOCK (splitmux);
+ break;
case PROP_MUXER_PROPERTIES:
GST_OBJECT_LOCK (splitmux);
gst_value_set_structure (value, splitmux->muxer_properties);
g_value_set_string (value, splitmux->sink_factory);
GST_OBJECT_UNLOCK (splitmux);
break;
+ case PROP_SINK_PRESET:
+ GST_OBJECT_LOCK (splitmux);
+ g_value_set_string (value, splitmux->sink_preset);
+ GST_OBJECT_UNLOCK (splitmux);
+ break;
case PROP_SINK_PROPERTIES:
GST_OBJECT_LOCK (splitmux);
gst_value_set_structure (value, splitmux->sink_properties);
create_element (splitmux, splitmux->sink_factory, newname,
TRUE)) == NULL)
goto fail;
+ if (splitmux->sink_preset && GST_IS_PRESET (splitmux->sink))
+ gst_preset_load_preset (GST_PRESET (splitmux->sink),
+ splitmux->sink_preset);
if (splitmux->sink_properties)
gst_structure_foreach (splitmux->sink_properties,
_set_property_from_structure, splitmux->sink);
* failures, so let's try and turn that off */
g_object_set (splitmux->sink, "async", FALSE, NULL);
}
+ if (splitmux->muxer_preset && GST_IS_PRESET (splitmux->muxer))
+ gst_preset_load_preset (GST_PRESET (splitmux->muxer),
+ splitmux->muxer_preset);
if (splitmux->muxer_properties)
gst_structure_foreach (splitmux->muxer_properties,
_set_property_from_structure, splitmux->muxer);
create_element (splitmux, splitmux->muxer_factory, "muxer",
FALSE)) == NULL)
goto fail;
+ if (splitmux->muxer_preset && GST_IS_PRESET (splitmux->muxer))
+ gst_preset_load_preset (GST_PRESET (splitmux->muxer),
+ splitmux->muxer_preset);
if (splitmux->muxer_properties)
gst_structure_foreach (splitmux->muxer_properties,
_set_property_from_structure, splitmux->muxer);
create_element (splitmux, splitmux->sink_factory, "sink",
TRUE)) == NULL)
goto fail;
+ if (splitmux->sink_preset && GST_IS_PRESET (splitmux->sink))
+ gst_preset_load_preset (GST_PRESET (splitmux->sink),
+ splitmux->sink_preset);
if (splitmux->sink_properties)
gst_structure_foreach (splitmux->sink_properties,
_set_property_from_structure, splitmux->sink);