mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
dashsink: add dashmp4mux support
As mp4mux is not correctly suppporting the fragment generation, see https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1722, we deprecate and advertize the current status of usage. Added the possibility to use the rust dashmp4mux element. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5403>
This commit is contained in:
parent
2644b3608f
commit
898e153968
2 changed files with 26 additions and 3 deletions
|
@ -10057,9 +10057,14 @@
|
||||||
"value": "0"
|
"value": "0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"desc": "Use mp4mux",
|
"desc": "Use mp4mux (deprecated, non-functional)",
|
||||||
"name": "mp4",
|
"name": "mp4",
|
||||||
"value": "1"
|
"value": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc": "Use dashmp4mux",
|
||||||
|
"name": "dashmp4",
|
||||||
|
"value": "2"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,6 +100,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_dash_sink_debug);
|
||||||
* GstDashSinkMuxerType:
|
* GstDashSinkMuxerType:
|
||||||
* @GST_DASH_SINK_MUXER_TS: Use mpegtsmux
|
* @GST_DASH_SINK_MUXER_TS: Use mpegtsmux
|
||||||
* @GST_DASH_SINK_MUXER_MP4: Use mp4mux
|
* @GST_DASH_SINK_MUXER_MP4: Use mp4mux
|
||||||
|
* @GST_DASH_SINK_MUXER_DASHMP4: Use dashmp4mux
|
||||||
*
|
*
|
||||||
* Muxer type
|
* Muxer type
|
||||||
*/
|
*/
|
||||||
|
@ -107,6 +108,7 @@ typedef enum
|
||||||
{
|
{
|
||||||
GST_DASH_SINK_MUXER_TS = 0,
|
GST_DASH_SINK_MUXER_TS = 0,
|
||||||
GST_DASH_SINK_MUXER_MP4 = 1,
|
GST_DASH_SINK_MUXER_MP4 = 1,
|
||||||
|
GST_DASH_SINK_MUXER_DASHMP4 = 2,
|
||||||
} GstDashSinkMuxerType;
|
} GstDashSinkMuxerType;
|
||||||
|
|
||||||
typedef struct _DashSinkMuxer
|
typedef struct _DashSinkMuxer
|
||||||
|
@ -124,7 +126,14 @@ gst_dash_sink_muxer_get_type (void)
|
||||||
static GType dash_sink_muxer_type = 0;
|
static GType dash_sink_muxer_type = 0;
|
||||||
static const GEnumValue muxer_type[] = {
|
static const GEnumValue muxer_type[] = {
|
||||||
{GST_DASH_SINK_MUXER_TS, "Use mpegtsmux", "ts"},
|
{GST_DASH_SINK_MUXER_TS, "Use mpegtsmux", "ts"},
|
||||||
{GST_DASH_SINK_MUXER_MP4, "Use mp4mux", "mp4"},
|
{GST_DASH_SINK_MUXER_MP4, "Use mp4mux (deprecated, non-functional)", "mp4"},
|
||||||
|
/**
|
||||||
|
* GstDashSinkMuxerType::dashmp4
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Since: 1.24
|
||||||
|
*/
|
||||||
|
{GST_DASH_SINK_MUXER_DASHMP4, "Use dashmp4mux", "dashmp4"},
|
||||||
{0, NULL, NULL},
|
{0, NULL, NULL},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -146,6 +155,11 @@ static const DashSinkMuxer dash_muxer_list[] = {
|
||||||
"mp4mux",
|
"mp4mux",
|
||||||
"video/mp4",
|
"video/mp4",
|
||||||
"mp4"},
|
"mp4"},
|
||||||
|
{
|
||||||
|
GST_DASH_SINK_MUXER_DASHMP4,
|
||||||
|
"dashmp4mux",
|
||||||
|
"video/mp4",
|
||||||
|
"mp4"},
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DEFAULT_SEGMENT_LIST_TPL "_%05d"
|
#define DEFAULT_SEGMENT_LIST_TPL "_%05d"
|
||||||
|
@ -646,9 +660,13 @@ gst_dash_sink_add_splitmuxsink (GstDashSink * sink, GstDashSinkStream * stream)
|
||||||
gst_element_factory_make (dash_muxer_list[sink->muxer].element_name,
|
gst_element_factory_make (dash_muxer_list[sink->muxer].element_name,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
if (sink->muxer == GST_DASH_SINK_MUXER_MP4)
|
if (sink->muxer == GST_DASH_SINK_MUXER_MP4) {
|
||||||
g_object_set (mux, "fragment-duration", sink->target_duration * GST_MSECOND,
|
g_object_set (mux, "fragment-duration", sink->target_duration * GST_MSECOND,
|
||||||
NULL);
|
NULL);
|
||||||
|
} else if (sink->muxer == GST_DASH_SINK_MUXER_DASHMP4) {
|
||||||
|
g_object_set (mux, "fragment-duration", sink->target_duration * GST_SECOND,
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
|
|
||||||
g_return_val_if_fail (mux != NULL, FALSE);
|
g_return_val_if_fail (mux != NULL, FALSE);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue