summaryrefslogtreecommitdiff
path: root/voctocore/lib/failaudiosrc.py
diff options
context:
space:
mode:
authorMaZderMind <peter@mazdermind.de>2014-09-18 11:49:36 +0200
committerMaZderMind <peter@mazdermind.de>2014-09-18 11:49:36 +0200
commit33ae6e1aac59b4d120ed3b8a319c6eb0ed5045cf (patch)
tree9bef83e15aea02c739c4a23aef47dd9e78bac53f /voctocore/lib/failaudiosrc.py
parent1e8589e2895eec33ec344f60a9579b118e751312 (diff)
enable audioswitch, use a payloader to transfer buffer timestamps through the shm-bridge and keep a/v sync intact
Diffstat (limited to 'voctocore/lib/failaudiosrc.py')
-rw-r--r--voctocore/lib/failaudiosrc.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/voctocore/lib/failaudiosrc.py b/voctocore/lib/failaudiosrc.py
new file mode 100644
index 0000000..0ce885e
--- /dev/null
+++ b/voctocore/lib/failaudiosrc.py
@@ -0,0 +1,25 @@
+#!/usr/bin/python3
+import time, logging
+from gi.repository import GLib, Gst
+
+from lib.config import Config
+
+class FailAudioSrc(Gst.Bin):
+ log = logging.getLogger('FailAudioSrc')
+
+ def __init__(self, idx, name):
+ super().__init__()
+
+ # Create elements
+ self.failsrc = Gst.ElementFactory.make('audiotestsrc', None)
+
+ # Add elements to Bin
+ self.add(self.failsrc)
+
+ # Set properties
+ self.failsrc.set_property('freq', 400+idx*50)
+
+ # Add Ghost Pads
+ self.add_pad(
+ Gst.GhostPad.new('src', self.failsrc.get_static_pad('src'))
+ )