3 # vi:si:et:sw=4:sts=4:ts=4
6 # Copyright (C) 2005 Fluendo S.L.
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.
23 # Author: Andy Wingo <wingo@pobox.com>
33 class DebugSlider(gtk.HScale):
35 adj = gtk.Adjustment(int(gst.debug_get_default_threshold()),
37 gtk.HScale.__init__(self, adj)
39 self.set_draw_value(True)
40 self.set_value_pos(gtk.POS_TOP)
42 def value_changed(self):
43 newlevel = int(self.get_adjustment().get_value())
44 gst.debug_set_default_threshold(newlevel)
46 self.connect('value-changed', value_changed)
48 if __name__ == '__main__':
49 p = gst.parse_launch('fakesrc ! fakesink')
50 p.set_state(gst.STATE_PLAYING)
56 w.set_default_size(200, 40)
58 w.connect('delete-event', lambda *args: gtk.main_quit())