def __init__(self, pipelinel, stage): Group.__init__(self) easyevent.User.__init__(self) self.stage = stage self.make_buttons() self.register_event("send_eos") self.register_event("item_description") self.register_event("play") self.register_event("pause") #self.add_icon(file="player_play", launch_evt="play", desc="Play") #self.add_icon(file="player_pause", launch_evt="pause", desc="Pause") #self.add_icon(file="player_stop", launch_evt="send_eos", desc="Send EOS") #self.add_icon(file="exit", launch_evt="quit", desc="Force Exit") self.n_actors = 0 self.yoffset = 0 self.pipelinel = pipelinel self.parse_pipeline(pipelinel) self.display_pipeline() self.pipeline_actioner = PipelineActioner(pipelinel) self.display_cpuinfo() self.desc = desc = Text() desc.set_position(0, 400) desc.show() self.stage.add(desc) gobject.timeout_add(100, self.pipeline_actioner.stats.get_queue_info, self.queue_list) gobject.timeout_add(100, self.pipeline_actioner.stats.get_videorate_info, self.videorate_list)
def __init__(self, element): easyevent.User.__init__(self) Group.__init__(self) self.name = name = element.get_name() self.gstelt = element if name.find("src") != -1: color = clutter.color_from_string("Blue") elif name.find("sink") != -1: color = clutter.color_from_string("LightBlue") else: color = clutter.color_from_string("Green") self.back = r = Rectangle(color) r.set_size(wwidth,wheight) r.show() self.add(r) self.label = l = Text() l.show() self.add(l) self.set_reactive(True) self.connect("button-press-event", self.display_props) if name.startswith("queue"): self.leaky = leaky = int(element.get_property("leaky")) if leaky > 0: self.name = "%s, leaky" %name self.register_event("queue_state") if name.startswith("progressreport"): self.register_event("progress_report") if name.startswith("videorate"): self.register_event("videorate") l.set_text(self.name) self.show()