add custom tags to flac file.
Jacobo Luis Mejías Albertos
jalumeal at gmail.com
Sun Aug 27 00:00:30 UTC 2017
I try to registry some custom tags with 'gst_tag_register()' for using
it with flacenc, but when I do the merge the final output file only show
the predefined tags.
This is and excerpt of the code related with the problem:
GstElement* encoder = gst_element_factory_make("flacenc", "encoder");
...
for (auto& tag : mytags) // mytags are a std::multimap<const char*,
constchar*>
gst_tag_register(tag.first, GST_TAG_FLAG_META, G_TYPE_STRING,
tag.first, tag.second, gst_tag_merge_strings_with_comma);
...
GstTagSetter* tagger = GST_TAG_SETTER(encoder);
if (tagger) {
gst_tag_setter_set_tag_merge_mode(tagger, GST_TAG_MERGE_APPEND);
GstTagList* list = gst_tag_list_new_empty();
for (auto& tag : meta)
gst_tag_list_add_values(list, GST_TAG_MERGE_APPEND, tag.first,
tag.second);
gst_tag_setter_merge_tags(tagger, list, GST_TAG_MERGE_APPEND);
gst_tag_list_unref(list);
}
gst_element_set_state(pipeline, GST_STATE_PLAYING);
...
I do something bad or flacenc don't support custom tags ?
--
Jacobo Luis Mejías Albertos
More information about the gstreamer-devel
mailing list