summaryrefslogtreecommitdiff
path: root/bin
diff options
authorSylvain Pineau <sylvain.pineau@canonical.com>2019-05-21 17:41:53 +0200
committerSylvain Pineau <sylvain.pineau@canonical.com>2019-05-23 17:41:34 +0200
commit9ce58eee91cff07ea6ad396eec7dd38727b30fdf (patch)
treea96b4606b1cc1eeae596652ece5e733cfe2e7679 /bin
parentbc1006f3e0510d9c383bbf6ac02052eb7936fba4 (diff)
bin:gst_pipeline_test: Use pactl instead of pacmd
Diffstat (limited to 'bin')
-rwxr-xr-xbin/gst_pipeline_test8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/gst_pipeline_test b/bin/gst_pipeline_test
index 4d9f3c4c..f6b6703f 100755
--- a/bin/gst_pipeline_test
+++ b/bin/gst_pipeline_test
@@ -17,14 +17,14 @@ from subprocess import check_output
def check_state(device):
"""Checks whether the sink is available for the given device.
"""
- sink_info = check_output(['pacmd', 'list-sinks'],
+ sink_info = check_output(['pactl', 'list', 'sinks'],
universal_newlines=True)
data = sink_info.split("\n")
try:
- device_name = re.findall(".*name:\s.*%s.*" % device, sink_info)[0].lstrip()
- sink = re.findall(".*name:\s<(.*%s.*)>" % device, sink_info)[0].lstrip()
- status = data[data.index("\t" + device_name) + 3]
+ device_name = re.findall(".*Name:\s.*%s.*" % device, sink_info)[0].lstrip()
+ sink = re.findall(".*Name:\s(.*%s.*)" % device, sink_info)[0].lstrip()
+ status = data[data.index("\t" + device_name) - 1]
except (IndexError, ValueError):
logging.error("Failed to find status for device: %s" % device)
return False