diff options
Diffstat (limited to 'voctogui/lib/videodisplay.py')
-rw-r--r-- | voctogui/lib/videodisplay.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/voctogui/lib/videodisplay.py b/voctogui/lib/videodisplay.py index 6915666..42724ac 100644 --- a/voctogui/lib/videodisplay.py +++ b/voctogui/lib/videodisplay.py @@ -4,17 +4,26 @@ from gi.repository import Gst, Gtk class VideoDisplay: """ Displays a Voctomix-Video-Stream into a GtkWidget """ - def __init__(self, port, videowidget, audiolevelwidget=None, playaudio=False): + def __init__(self, port, videowidget, audiolevelwidget=None, playaudio=False, allowoverlay=False): self.log = logging.getLogger('VideoDisplay[%u]' % port) pipeline = """ videotestsrc ! timeoverlay ! video/x-raw,width=1920,height=1080 ! - xvimagesink name=v """.format( port=port ) + if allowoverlay: + pipeline += """ + videoconvert ! + cairooverlay name=overlay ! + videoconvert ! + """ + + pipeline += """ + xvimagesink name=v + """ if audiolevelwidget or playaudio: pipeline += """ @@ -46,6 +55,8 @@ class VideoDisplay: bus.connect('message::error', self.on_error) bus.connect("sync-message::element", self.on_syncmsg) + self.draw_callback = None + if audiolevelwidget: self.levelrms = [0, 0] self.audiolevelwidget = audiolevelwidget |