summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaZderMind <github@mazdermind.de>2015-05-11 23:04:09 +0200
committerMaZderMind <github@mazdermind.de>2015-05-11 23:04:09 +0200
commit849feb71eec9648d875362f033ac3836458b5088 (patch)
tree90c29a2e1afc160da0e053ab72e46610f430c9eb
parent345b9eba28b3165f01ab681cf76bb624c0387aa3 (diff)
remove distribution pipeline, restores a/v sync for external recorders
-rw-r--r--voctocore/lib/audio/src.py25
-rw-r--r--voctocore/lib/video/src.py27
2 files changed, 10 insertions, 42 deletions
diff --git a/voctocore/lib/audio/src.py b/voctocore/lib/audio/src.py
index 83805b9..03c7bcc 100644
--- a/voctocore/lib/audio/src.py
+++ b/voctocore/lib/audio/src.py
@@ -11,7 +11,6 @@ class AudioSrc(object):
port = None
caps = None
- distributionPipeline = None
receiverPipeline = None
boundSocket = None
@@ -24,24 +23,6 @@ class AudioSrc(object):
self.port = port
self.caps = caps
- pipeline = """
- interaudiosrc channel=audio_{name}_in !
- {caps} !
- queue !
- tee name=tee
-
- tee. ! queue ! interaudiosink channel=audio_{name}_mirror
- tee. ! queue ! interaudiosink channel=audio_{name}_preview
- tee. ! queue ! interaudiosink channel=audio_{name}_mixer
- """.format(
- name=self.name,
- caps=self.caps
- )
-
- self.log.debug('Launching Source-Distribution-Pipeline:\n%s', pipeline)
- self.distributionPipeline = Gst.parse_launch(pipeline)
- self.distributionPipeline.set_state(Gst.State.PLAYING)
-
self.log.debug('Binding to Source-Socket on [::]:%u', port)
self.boundSocket = socket.socket(socket.AF_INET6)
self.boundSocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
@@ -64,7 +45,11 @@ class AudioSrc(object):
fdsrc fd={fd} !
gdpdepay !
{caps} !
- interaudiosink channel=audio_{name}_in
+ queue !
+ tee name=tee
+
+ tee. ! queue ! interaudiosink channel=audio_{name}_mixer
+ tee. ! queue ! interaudiosink channel=audio_{name}_mirror
""".format(
fd=conn.fileno(),
name=self.name,
diff --git a/voctocore/lib/video/src.py b/voctocore/lib/video/src.py
index 404b60f..cd36d8c 100644
--- a/voctocore/lib/video/src.py
+++ b/voctocore/lib/video/src.py
@@ -11,7 +11,6 @@ class VideoSrc(object):
port = None
caps = None
- distributionPipeline = None
receiverPipeline = None
boundSocket = None
@@ -24,26 +23,6 @@ class VideoSrc(object):
self.port = port
self.caps = caps
- pipeline = """
- intervideosrc channel=video_{name}_in !
- {caps} !
- timeoverlay halignment=left valignment=top !
- textoverlay text=video_{name}_in halignment=left valignment=top ypad=75 !
- queue !
- tee name=tee
-
- tee. ! queue ! intervideosink channel=video_{name}_mirror
- tee. ! queue ! intervideosink channel=video_{name}_preview
- tee. ! queue ! intervideosink channel=video_{name}_mixer
- """.format(
- name=self.name,
- caps=self.caps
- )
-
- self.log.debug('Launching Source-Distribution-Pipeline:\n%s', pipeline)
- self.distributionPipeline = Gst.parse_launch(pipeline)
- self.distributionPipeline.set_state(Gst.State.PLAYING)
-
self.log.debug('Binding to Source-Socket on [::]:%u', port)
self.boundSocket = socket.socket(socket.AF_INET6)
self.boundSocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
@@ -67,7 +46,11 @@ class VideoSrc(object):
gdpdepay !
{caps} !
textoverlay text=video_{name}_fd halignment=left valignment=top ypad=125 !
- intervideosink channel=video_{name}_in
+ queue !
+ tee name=tee
+
+ tee. ! queue ! intervideosink channel=video_{name}_mixer
+ tee. ! queue ! intervideosink channel=video_{name}_mirror
""".format(
fd=conn.fileno(),
name=self.name,