Hi,
what is the correct way to set tags in mp3 stream set with shout2send?
While I have no problem with setting tags in OGG/Vorbis stream, seems
that the following code simply does not work:
#include <glib.h>
#include <glib-object.h>
#include <gst/gst.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
GstPipeline* pipeline = NULL;
GstElement* source = NULL;
GstElement* converter = NULL;
GstElement* codec = NULL;
GstElement* sink = NULL;
int main (int argc, char ** argv) {
GMainLoop* loop;
g_thread_init (NULL);
g_type_init ();
gst_init (&argc, &argv);
loop = g_main_loop_new (NULL, FALSE);
pipeline = (GstPipeline*) gst_pipeline_new ("pipeline");
source = gst_element_factory_make ("audiotestsrc", "source");
converter = gst_element_factory_make ("audioconvert", "converter");
codec = gst_element_factory_make ("lame", "codec");
sink = gst_element_factory_make ("shout2send", "sink");
g_object_set(sink, "mount", "/test", NULL);
g_object_set(sink, "ip", "127.0.0.1", NULL);
g_object_set(sink, "port", 8000, NULL);
g_object_set(sink, "password", "hackme", NULL);
gst_bin_add_many ((GstBin*) pipeline, source, converter, codec, sink, NULL);
gst_element_link (source, converter);
gst_element_link (converter, codec);
gst_element_link (codec, sink);
gst_tag_setter_add_tags(GST_TAG_SETTER(codec),
GST_TAG_MERGE_REPLACE_ALL,
GST_TAG_TITLE, "Sample Title",
GST_TAG_ARTIST, "Sample Artist",
NULL);
gst_element_set_state ((GstElement*) pipeline, GST_STATE_PLAYING);
g_main_loop_run (loop);
g_main_loop_unref(loop);
return 0;
}
I've tried to replace GST_TAG_SETTER(codec) with GST_TAG_SETTER(sink).
Running application with GST_DEBUG=shout2:4 shows that
set_shout_metadata() is not triggered at all with my tags (only
default ones).
Am I doing something wrong or maybe that is just a bug? If the latter
one, I can spend some time on investigating it, but it would be nice
if stop me at this point if it is just my failure.
Thank you,
m.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel