summaryrefslogtreecommitdiff
path: root/voctogui/lib
diff options
context:
space:
mode:
authorMaZderMind <github@mazdermind.de>2015-07-22 19:51:57 +0200
committerMaZderMind <github@mazdermind.de>2015-07-23 10:26:55 +0200
commitde0b94687f7ac2bf9bbf34bcc87e3518bdf3e5ec (patch)
tree21811047e010a237167dfb91594b5cc34a505c87 /voctogui/lib
parent3729af316ea10d17be064e14edf2b4e5f331c167 (diff)
Rudimentary support for visual Warning of blanked Stream
Diffstat (limited to 'voctogui/lib')
-rw-r--r--voctogui/lib/videodisplay.py15
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