mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-06 16:19:59 +00:00
More generalized tagging
Original commit message from CVS: More generalized tagging
This commit is contained in:
parent
6e85edcd38
commit
cc23405805
1 changed files with 3 additions and 4 deletions
|
@ -4,9 +4,8 @@ import sys
|
|||
import gst
|
||||
|
||||
def found_tags(element, source, tags):
|
||||
print 'Artist:', tags.get('artist')
|
||||
print 'Title: ', tags.get('title')
|
||||
print 'Album: ', tags.get('album')
|
||||
for tag in tags.keys():
|
||||
print gst.tag_get_nick(tag), tags[tag]
|
||||
|
||||
def playfile(filename):
|
||||
bin = gst.Pipeline('player')
|
||||
|
@ -16,7 +15,7 @@ def playfile(filename):
|
|||
|
||||
spider = gst.Element('spider', 'spider')
|
||||
spider.connect('found-tag', found_tags)
|
||||
|
||||
|
||||
sink = gst.Element('osssink', 'sink')
|
||||
|
||||
bin.add_many(source, spider, sink)
|
||||
|
|
Loading…
Reference in a new issue