Help required for Gst recording pipeline meta tagging to Ogg Vorbis in GNOME Gingerblue 0.8.0
Ole Aamot
ole at gnome.org
Wed Jul 14 00:14:25 UTC 2021
Hi,
I am trying to get this right in GNOME Gingerblue 0.8.0, but it fails
to write the tags in the record pipeline in GStreamer 1.19.1.
See http://www.gingerblue.org/ and the committed code
in https://gitlab.gnome.org/ole/gingerblue.git
From
https://gitlab.gnome.org/ole/gingerblue/-/commit/709572e09a8369b86cc499d2619144f46544d75e#b683de4daf44a8552743f88f71fa84c25937a5b8
+#include <gst/tag/tag.h>
#include <gtk/gtk.h>
#include <glib/gstdio.h>
#include <glib/gi18n.h>
@@ -49,6 +50,8 @@ GtkWidget *summary_entry, *summary_label;
GMainLoop *main_loops;
+GstTagList *tag_list;
+
static void gb_assistant_entry_changed(GtkEditable * editable,
GtkAssistant * assistant,
GstElement * pipeline)
@@ -72,6 +75,27 @@ static void gb_assistant_button_clicked(GtkButton *
button,
recorder = gst_pipeline_new("record_pipe");
+ tag_list = gst_tag_list_new (GST_TAG_ARTIST,
gtk_entry_get_text(GTK_ENTRY(musician_entry)), NULL);
+ gst_stream_set_tags (GST_STREAM (recorder), tag_list);
+
+ tag_list = gst_tag_list_new (GST_TAG_ALBUM,
gtk_entry_get_text(GTK_ENTRY(song_entry)), NULL);
+ gst_stream_set_tags (GST_STREAM (recorder), tag_list);
+
+ tag_list = gst_tag_list_new (GST_TAG_TITLE,
gtk_entry_get_text(GTK_ENTRY(song_entry)), NULL);
+ gst_stream_set_tags (GST_STREAM (recorder), tag_list);
+
+ tag_list = gst_tag_list_new (GST_TAG_COPYRIGHT,
gtk_entry_get_text(GTK_ENTRY(label_entry)), NULL);
+ gst_stream_set_tags (GST_STREAM (recorder), tag_list);
+
+ tag_list = gst_tag_list_new (GST_TAG_PUBLISHER,
gtk_entry_get_text(GTK_ENTRY(label_entry)), NULL);
+ gst_stream_set_tags (GST_STREAM (recorder), tag_list);
+
+ tag_list = gst_tag_list_new (GST_TAG_DATE_TIME, datestamp,
NULL);
+ gst_stream_set_tags (GST_STREAM (recorder), tag_list);
+
+ tag_list = gst_tag_list_new (GST_TAG_DATE_TIME, datestamp,
NULL);
Alternative route:
+ gst_vorbis_tag_add (tag_list, GST_TAG_ARTIST,
gtk_entry_get_text(GTK_ENTRY(musician_entry)));
+ gst_vorbis_tag_add (tag_list, GST_TAG_ALBUM,
gtk_entry_get_text(GTK_ENTRY(song_entry)));
+ gst_vorbis_tag_add (tag_list, GST_TAG_TITLE,
gtk_entry_get_text(GTK_ENTRY(song_entry)));
+ gst_vorbis_tag_add (tag_list, GST_TAG_COPYRIGHT,
gtk_entry_get_text(GTK_ENTRY(label_entry)));
+ gst_vorbis_tag_add (tag_list, GST_TAG_PUBLISHER,
gtk_entry_get_text(GTK_ENTRY(label_entry)));
+ gst_vorbis_tag_add (tag_list, GST_TAG_DATE_TIME, datestamp);
+ gst_vorbis_tag_add (tag_list, GST_TAG_DATE_TIME, datestamp);
+ gst_stream_set_tags (GST_STREAM (recorder), tag_list);
Doesn't work and the comment does not show up in the recorded files.
Best,
Ole
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210714/22f3a7dc/attachment.htm>
More information about the gstreamer-devel
mailing list