diff options
Diffstat (limited to 'voctocore/lib/audio/src.py')
-rw-r--r-- | voctocore/lib/audio/src.py | 25 |
1 files changed, 5 insertions, 20 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, |