summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkjellander@webrtc.org <kjellander@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2013-05-09 07:53:08 +0000
committerkjellander@webrtc.org <kjellander@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2013-05-09 07:53:08 +0000
commit41b55fad5729bf5d6b56ac58b584190ed015878a (patch)
treef3e4a89b80537ec5b8364b565787d0cf24c85f07
parent4afe86bc006c80cd83b44ad109c1d566a0a1daf6 (diff)
downloadwebrtc-41b55fad5729bf5d6b56ac58b584190ed015878a.tar.gz
Drop Virtual webcam check script as moved into buildbot scripts.
Having this script being located in the WebRTC repo doesn't make sense since it has no connection to the source code. Updating this script should apply to all build configurations and since this script will be used for Chromium builders, we'll end up with having to wait for a new WebRTC revision to be rolled in DEPS before it's updated. TEST=none BUG=none TBR=phoglund Review URL: https://webrtc-codereview.appspot.com/1444006 git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@3992 4adac7df-926f-26a2-2b94-8c16560cd09d
-rwxr-xr-xtest/buildbot/ensure_webcam_is_running.py73
1 files changed, 0 insertions, 73 deletions
diff --git a/test/buildbot/ensure_webcam_is_running.py b/test/buildbot/ensure_webcam_is_running.py
deleted file mode 100755
index 45ca7cfe..00000000
--- a/test/buildbot/ensure_webcam_is_running.py
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-"""Checks if a virtual webcam is running and starts it if not.
-
-Returns a non-zero return code if the webcam could not be started.
-
-Prerequisites:
-* Python must have the psutil package installed.
-* Windows: a scheduled task named 'ManyCam' must exist and be configured to
- launch ManyCam preconfigured to auto-play the test clip.
-* Mac: ManyCam must be installed in the default location and be preconfigured
- to auto-play the test clip.
-* Linux: The v4l2loopback must be loaded to the kernel already (with the
- devices=2 argument) and the v4l2_file_player application must be compiled and
- put in the location specified below.
-"""
-
-import psutil
-import subprocess
-import sys
-
-
-WEBCAM_WIN = ['schtasks', '/run', '/tn', 'ManyCam']
-WEBCAM_MAC = ['open', '/Applications/ManyCam/ManyCam.app']
-WEBCAM_LINUX = (
- '$HOME/fake-webcam-driver/linux/v4l2_file_player/v4l2_file_player '
- '$HOME/webrtc_video_quality/reference_video.yuv 640 480 /dev/video1 &')
-
-
-def IsWebCamRunning():
- if sys.platform == 'win32':
- process_name = 'ManyCam.exe'
- elif sys.platform.startswith('darwin'):
- process_name = 'ManyCam'
- elif sys.platform.startswith('linux'):
- process_name = 'v4l2_file_player'
- else:
- raise Exception('Unsupported platform: %s' % sys.platform)
- for p in psutil.get_process_list():
- if process_name == p.name:
- print 'Found a running virtual webcam (%s with PID %s)' % (p.name, p.pid)
- return True
- return False
-
-
-def Main():
- if IsWebCamRunning():
- return 0
-
- try:
- if sys.platform == 'win32':
- subprocess.check_call(WEBCAM_WIN)
- elif sys.platform.startswith('darwin'):
- subprocess.check_call(WEBCAM_MAC)
- elif sys.platform.startswith('linux'):
- subprocess.check_call(WEBCAM_LINUX, shell=True)
-
- print 'Successfully launched virtual webcam.'
- return 0
-
- except Exception as e:
- print 'Failed to launch virtual webcam: %s' % e
-
-
-if __name__ == '__main__':
- sys.exit(Main())