mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
matroskamux: For streaming files, push tags first
This commit is contained in:
parent
3937abf999
commit
0672232b26
1 changed files with 24 additions and 0 deletions
|
@ -258,6 +258,9 @@ static gboolean kate_streamheader_to_codecdata (const GValue * streamheader,
|
|||
GstMatroskaTrackContext * context);
|
||||
static gboolean flac_streamheader_to_codecdata (const GValue * streamheader,
|
||||
GstMatroskaTrackContext * context);
|
||||
static void
|
||||
gst_matroska_mux_write_simple_tag (const GstTagList * list, const gchar * tag,
|
||||
gpointer data);
|
||||
|
||||
static void
|
||||
gst_matroska_mux_add_interfaces (GType type)
|
||||
|
@ -2117,6 +2120,27 @@ gst_matroska_mux_start (GstMatroskaMux * mux)
|
|||
gst_ebml_write_master_finish (ebml, master);
|
||||
}
|
||||
|
||||
if (mux->streamable) {
|
||||
const GstTagList *tags;
|
||||
|
||||
/* tags */
|
||||
tags = gst_tag_setter_get_tag_list (GST_TAG_SETTER (mux));
|
||||
|
||||
if (tags != NULL && !gst_tag_list_is_empty (tags)) {
|
||||
guint64 master_tags, master_tag;
|
||||
|
||||
GST_DEBUG ("Writing tags");
|
||||
|
||||
/* TODO: maybe limit via the TARGETS id by looking at the source pad */
|
||||
mux->tags_pos = ebml->pos;
|
||||
master_tags = gst_ebml_write_master_start (ebml, GST_MATROSKA_ID_TAGS);
|
||||
master_tag = gst_ebml_write_master_start (ebml, GST_MATROSKA_ID_TAG);
|
||||
gst_tag_list_foreach (tags, gst_matroska_mux_write_simple_tag, ebml);
|
||||
gst_ebml_write_master_finish (ebml, master_tag);
|
||||
gst_ebml_write_master_finish (ebml, master_tags);
|
||||
}
|
||||
}
|
||||
|
||||
/* segment info */
|
||||
mux->info_pos = ebml->pos;
|
||||
master = gst_ebml_write_master_start (ebml, GST_MATROSKA_ID_SEGMENTINFO);
|
||||
|
|
Loading…
Reference in a new issue