diff options
author | Dan Williams <dcbw@redhat.com> | 2007-02-28 20:41:00 (GMT) |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2007-02-28 20:41:00 (GMT) |
commit | 7ce21d47bd7ac982a84bd1271ce259b7b7e0e59d (patch) | |
tree | caf06931842c739118e654b5fb1977bf5ddebef5 /shell/intro/glive.py | |
parent | 748275ca00c995f98a454fad533ed7673d578765 (diff) |
Ensure video is realized before showing live video
Diffstat (limited to 'shell/intro/glive.py')
-rw-r--r-- | shell/intro/glive.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/shell/intro/glive.py b/shell/intro/glive.py index b2126aa..b573659 100644 --- a/shell/intro/glive.py +++ b/shell/intro/glive.py @@ -148,14 +148,21 @@ class LiveVideoSlot(gtk.EventBox): gtk.EventBox.__init__(self) self.imagesink = None + self.playa = None + self._width = width + self._height = height + self.unset_flags(gtk.DOUBLE_BUFFERED) self.connect('focus-in-event', self.focus_in) self.connect('focus-out-event', self.focus_out) self.connect("button-press-event", self._button_press_event_cb) + self.connect("expose-event", self._expose_event_cb) - self.playa = Glive(self, width, height) - self.playa.connect('new-picture', self._new_picture_cb) - self.playa.connect('sink', self._new_sink_cb) + def _expose_event_cb(self, widget, event): + if not self.playa: + self.playa = Glive(self, self._width, self._height) + self.playa.connect('new-picture', self._new_picture_cb) + self.playa.connect('sink', self._new_sink_cb) def _new_picture_cb(self, playa, pixbuf): self.emit('pixbuf', pixbuf) |