mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
wavparse: expose CUE sheet items as tracks not chapter entries in TOC
https://bugzilla.gnome.org/show_bug.cgi?id=677306
This commit is contained in:
parent
83f9cfb928
commit
35769f7c5d
1 changed files with 4 additions and 4 deletions
|
@ -1296,19 +1296,19 @@ gst_wavparse_create_toc (GstWavParse * wav)
|
||||||
gst_toc_entry_set_start_stop_times (entry, 0, wav->duration);
|
gst_toc_entry_set_start_stop_times (entry, 0, wav->duration);
|
||||||
gst_toc_append_entry (toc, entry);
|
gst_toc_append_entry (toc, entry);
|
||||||
|
|
||||||
/* add chapters in cue edition */
|
/* add tracks in cue edition */
|
||||||
list = g_list_first (wav->cues);
|
list = g_list_first (wav->cues);
|
||||||
while (list) {
|
while (list) {
|
||||||
cue = list->data;
|
cue = list->data;
|
||||||
prev_subentry = cur_subentry;
|
prev_subentry = cur_subentry;
|
||||||
/* previous chapter stop time = current chapter start time */
|
/* previous track stop time = current track start time */
|
||||||
if (prev_subentry != NULL) {
|
if (prev_subentry != NULL) {
|
||||||
gst_toc_entry_get_start_stop_times (prev_subentry, &start, NULL);
|
gst_toc_entry_get_start_stop_times (prev_subentry, &start, NULL);
|
||||||
stop = gst_util_uint64_scale_round (cue->position, GST_SECOND, wav->rate);
|
stop = gst_util_uint64_scale_round (cue->position, GST_SECOND, wav->rate);
|
||||||
gst_toc_entry_set_start_stop_times (prev_subentry, start, stop);
|
gst_toc_entry_set_start_stop_times (prev_subentry, start, stop);
|
||||||
}
|
}
|
||||||
id = g_strdup_printf ("%08x", cue->id);
|
id = g_strdup_printf ("%08x", cue->id);
|
||||||
cur_subentry = gst_toc_entry_new (GST_TOC_ENTRY_TYPE_CHAPTER, id);
|
cur_subentry = gst_toc_entry_new (GST_TOC_ENTRY_TYPE_TRACK, id);
|
||||||
g_free (id);
|
g_free (id);
|
||||||
start = gst_util_uint64_scale_round (cue->position, GST_SECOND, wav->rate);
|
start = gst_util_uint64_scale_round (cue->position, GST_SECOND, wav->rate);
|
||||||
stop = wav->duration;
|
stop = wav->duration;
|
||||||
|
@ -1317,7 +1317,7 @@ gst_wavparse_create_toc (GstWavParse * wav)
|
||||||
list = g_list_next (list);
|
list = g_list_next (list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* add tags in chapters */
|
/* add tags in tracks */
|
||||||
list = g_list_first (wav->labls);
|
list = g_list_first (wav->labls);
|
||||||
while (list) {
|
while (list) {
|
||||||
labl = list->data;
|
labl = list->data;
|
||||||
|
|
Loading…
Reference in a new issue