3 # vi:si:et:sw=4:sts=4:ts=4
6 # Copyright (C) 2009 Stefan Kost <ensonic@user.sf.net>
8 # This library is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU Library General Public
10 # License as published by the Free Software Foundation; either
11 # version 2 of the License, or (at your option) any later version.
13 # This library is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # Library General Public License for more details.
18 # You should have received a copy of the GNU Library General Public
19 # License along with this library; if not, write to the
20 # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 # Boston, MA 02110-1301, USA.
27 gobject.threads_init()
34 mainloop = gobject.MainLoop()
40 "Tagsetter test, test result with:"
41 "gst-launch -t playbin uri=file://$PWD/test.avi"
43 # create a new bin to hold the elements
44 bin = gst.parse_launch('audiotestsrc num-buffers=100 ! ' +
46 'avimux name=mux ! ' +
47 'filesink location=test.avi')
49 mux = bin.get_by_name('mux')
52 bus.add_signal_watch()
53 bus.connect('message::eos', on_eos)
56 bin.set_state(gst.STATE_READY)
60 l[gst.TAG_ARTIST] = "Unknown Genius"
61 l[gst.TAG_TITLE] = "Unnamed Artwork"
62 mux.merge_tags(l, gst.TAG_MERGE_APPEND)
65 bin.set_state(gst.STATE_PLAYING)
69 except KeyboardInterrupt:
73 bin.set_state(gst.STATE_NULL)
75 if __name__ == '__main__':
76 sys.exit(main(sys.argv))