summaryrefslogtreecommitdiff
path: root/voctogui/lib/videodisplay.py
diff options
context:
space:
mode:
Diffstat (limited to 'voctogui/lib/videodisplay.py')
-rw-r--r--voctogui/lib/videodisplay.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/voctogui/lib/videodisplay.py b/voctogui/lib/videodisplay.py
index 8ce1413..78dafba 100644
--- a/voctogui/lib/videodisplay.py
+++ b/voctogui/lib/videodisplay.py
@@ -2,6 +2,7 @@ import logging
from gi.repository import Gst
from lib.config import Config
+from lib.clock import Clock
class VideoDisplay(object):
""" Displays a Voctomix-Video-Stream into a GtkWidget """
@@ -24,7 +25,7 @@ class VideoDisplay(object):
# Setup Server-Connection, Demuxing and Decoding
pipeline = """
- tcpclientsrc host={host} port={port} !
+ tcpclientsrc host={host} port={port} blocksize=1048576 !
queue !
matroskademux name=demux
"""
@@ -88,11 +89,10 @@ class VideoDisplay(object):
level name=lvl interval=50000000 !
"""
- # If Playback is requested, push fo alsa
+ # If Playback is requested, push fo pulseaudio
if play_audio:
- # ts-offset=1000000000 (1s) - should keep audio & video in sync but delay by 1s
pipeline += """
- alsasink sync=False
+ pulsesink
"""
# Otherwise just trash the Audio
@@ -111,6 +111,7 @@ class VideoDisplay(object):
self.log.debug('Creating Display-Pipeline:\n%s', pipeline)
self.pipeline = Gst.parse_launch(pipeline)
+ self.pipeline.use_clock(Clock)
self.drawing_area.realize()
self.xid = self.drawing_area.get_property('window').get_xid()