mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-21 07:46:38 +00:00
gst/nsf/gstnsf.*: Add support for (very) basic tagging.
Original commit message from CVS: 2007-09-03 Johan Dahlin <johan@gnome.org> * gst/nsf/gstnsf.c: (gst_nsfdec_finalize), (start_play_tune): * gst/nsf/gstnsf.h: Add support for (very) basic tagging.
This commit is contained in:
parent
fcce4aff92
commit
a378cad6b9
3 changed files with 27 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2007-09-03 Johan Dahlin <johan@gnome.org>
|
||||
|
||||
* gst/nsf/gstnsf.c: (gst_nsfdec_finalize), (start_play_tune):
|
||||
* gst/nsf/gstnsf.h:
|
||||
Add support for (very) basic tagging.
|
||||
|
||||
2007-09-03 Wim Taymans <wim.taymans@gmail.com>
|
||||
|
||||
* gst/rtpmanager/gstrtpbin-marshal.list:
|
||||
|
|
|
@ -214,6 +214,9 @@ gst_nsfdec_finalize (GObject * object)
|
|||
if (nsfdec->tune_buffer)
|
||||
gst_buffer_unref (nsfdec->tune_buffer);
|
||||
|
||||
if (nsfdec->taglist)
|
||||
gst_tag_list_free (nsfdec->taglist);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
|
@ -370,6 +373,22 @@ start_play_tune (GstNsfDec * nsfdec)
|
|||
if (!nsfdec_negotiate (nsfdec))
|
||||
goto could_not_negotiate;
|
||||
|
||||
nsfdec->taglist = gst_tag_list_new ();
|
||||
gst_tag_list_add (nsfdec->taglist, GST_TAG_MERGE_REPLACE,
|
||||
GST_TAG_AUDIO_CODEC, "Nosefart", NULL);
|
||||
|
||||
if (nsfdec->nsf->artist_name)
|
||||
gst_tag_list_add (nsfdec->taglist, GST_TAG_MERGE_REPLACE,
|
||||
GST_TAG_ARTIST, nsfdec->nsf->artist_name, NULL);
|
||||
|
||||
if (nsfdec->nsf->song_name)
|
||||
gst_tag_list_add (nsfdec->taglist, GST_TAG_MERGE_REPLACE,
|
||||
GST_TAG_TITLE, nsfdec->nsf->song_name, NULL);
|
||||
|
||||
gst_element_post_message (GST_ELEMENT_CAST (nsfdec),
|
||||
gst_message_new_tag (GST_OBJECT (nsfdec),
|
||||
gst_tag_list_copy (nsfdec->taglist)));
|
||||
|
||||
nsf_playtrack (nsfdec->nsf,
|
||||
nsfdec->tune_number, nsfdec->frequency, nsfdec->bits, nsfdec->stereo);
|
||||
nsf_setfilter (nsfdec->nsf, nsfdec->filter);
|
||||
|
|
|
@ -73,6 +73,8 @@ struct _GstNsfDec {
|
|||
gboolean stereo;
|
||||
int channels;
|
||||
int bps;
|
||||
|
||||
GstTagList *taglist;
|
||||
};
|
||||
|
||||
struct _GstNsfDecClass {
|
||||
|
|
Loading…
Reference in a new issue