From 4f6dadd220df2a384c19989f5913f1f33415753b Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20Test=C3=A9?= Date: Tue, 8 Mar 2016 17:53:46 +0100 Subject: [PATCH] Adding specific audio input (USB mixing desk) --- stream_2016/gstconf.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/stream_2016/gstconf.py b/stream_2016/gstconf.py index 9e69df6..ab93f1d 100755 --- a/stream_2016/gstconf.py +++ b/stream_2016/gstconf.py @@ -38,6 +38,8 @@ ERROR = '[ERROR] ' INFO = '[INFO] ' WARN = '[WARN] ' +AUDIO_INPUT = 'alsa_input.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00-CODEC.analog-stereo' + class New_user_pipeline(): @@ -72,7 +74,15 @@ class New_user_pipeline(): elif len(devices) == 1: return '/dev/video0' print(ERROR, gettime(), 'No webcam device found.') - + + def find_mixingdesk_device(self): + """Look out for the USB mixing desk device. + Product used here: Behringer XENYX Q1002USB. + """ + # shell cmd : 'pactl list | grep alsa_input' + # AUDIO_INPUT --> const used currently + pass + def create_pipeline_callbacks(self): """Callbacks to connect dynamically created pads.""" self.videosrc.connect('pad-added', self.on_pad_added_to_rtspsrc) @@ -86,6 +96,7 @@ class New_user_pipeline(): """Create audio inputs from various sources.""" self.audiosrc = Gst.ElementFactory.make('pulsesrc', 'audiosrc') ## self.videosrc.set_property('latency', 0) + self.audiosrc.set_property('device', AUDIO_INPUT) def create_audiolevel_plugin(self): """Create audio level plugin to feed a vu-meter.""" -- 2.25.1