MCPcopy Create free account
hub / github.com/GStreamer/gst-python / populate_combobox

Method populate_combobox

old_examples/switch.py:137–145  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

135 self.player.play()
136
137 def populate_combobox(self):
138 switch = self.player.pipeline.get_by_name('s')
139 for i, pad in enumerate([p for p in switch.pads()
140 if p.get_direction() == gst.PAD_SINK]):
141 self.combobox.append_text(pad.get_name())
142 if switch.get_property('active-pad') == pad.get_name():
143 self.combobox.set_active(i)
144 if self.combobox.get_active() == -1:
145 self.combobox.set_active(0)
146
147 def combobox_changed(self):
148 model = self.combobox.get_model()

Callers 1

__init__Method · 0.95

Calls 1

get_propertyMethod · 0.80

Tested by

no test coverage detected