Skip to content

Commit

Permalink
Adding a more useful help message about gstreamer1.0-dvswitch.
Browse files Browse the repository at this point in the history
  • Loading branch information
mithro committed Mar 26, 2015
1 parent ad622fc commit bd49842
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions dvsource-v4l2-other
Expand Up @@ -158,13 +158,15 @@ def check_command(name, package=None):
print "Please try 'sudo apt-get install %s'" % package
raise

def check_gst_module(name, package=None):
def check_gst_module(name, package=None, extra_help=None):
try:
subprocess.check_call(["gst-inspect-1.0", name], stdout=subprocess.DEVNULL)
except subprocess.CalledProcessError, e:
print "Unable to find required gstreamer module", name
if package:
print "Please try 'sudo apt-get install %s'" % package
if extra_help:
print extra_help
raise

###############################################################################
Expand Down Expand Up @@ -281,7 +283,11 @@ def main():
check_gst_module("videoconvert", "gstreamer1.0-ffmpeg")
check_gst_module("avenc_dvvideo", "gstreamer1.0-ffmpeg")
check_gst_module("avmux_dv", "gstreamer1.0-ffmpeg")
check_gst_module("dvswitchsink", "gstreamer1.0-dvswitch")
check_gst_module("dvswitchsink", "gstreamer1.0-dvswitch", """
If your distro doesn't ship the gstreamer1.0-dvswitch package you
can find out more information in the README.md file or at
https://github.com/timvideos/dvsource-v4l2-other#installing-the-gstreamer-dvswitch-plugin
""")

check_gst_module("audiotestsrc", "gstreamer1.0-plugins-base")

Expand Down

0 comments on commit bd49842

Please sign in to comment.