summaryrefslogtreecommitdiff
path: root/clients/source
diff options
context:
space:
mode:
authorCarl Karsten <carl@personnelware.com>2016-03-23 01:24:04 -0500
committerCarl Karsten <carl@personnelware.com>2016-03-23 01:24:04 -0500
commit7148946afa2b91cf93e4fb792f3c7925e4497219 (patch)
tree74681f94fa5b140b6b3bccb5bd2c3f3736c03315 /clients/source
parente10725d1792c1a519b49a2c2130780c5c6b6bf67 (diff)
added --video-source ximage for screen capture.
Diffstat (limited to 'clients/source')
-rwxr-xr-xclients/source/ingest.py21
1 files changed, 18 insertions, 3 deletions
diff --git a/clients/source/ingest.py b/clients/source/ingest.py
index 12e9cc4..93b9a84 100755
--- a/clients/source/ingest.py
+++ b/clients/source/ingest.py
@@ -19,6 +19,7 @@ from gi.repository import Gst, GstNet, GObject
GObject.threads_init()
Gst.init([])
+# this is kinda icky.
sys.path.insert(0, '../..' )
import voctogui.lib.connection as Connection
@@ -74,6 +75,14 @@ def mk_video_src(args, videocaps):
videorate !
"""
+ elif args.video_source == 'ximage':
+ video_src = """
+ ximagesrc name=videosrc !
+ videoconvert !
+ videorate !
+ videoscale !
+ """
+
elif args.video_source == 'blackmagichdmi':
video_src = """
decklinkvideosrc mode=17 connection=2 !
@@ -154,7 +163,10 @@ def mk_pipeline(args, server_caps):
mux = mk_mux(args)
client = mk_client(args)
- pipeline = video_src + "mux. \n" + audio_src + mux + client
+ pipeline = video_src + "mux.\n" + audio_src + mux + client
+
+ # remove blank lines to make it more human readable
+ pipeline = pipeline.replace("\n\n","\n")
return pipeline
@@ -217,13 +229,16 @@ def run_pipeline(pipeline, args):
def get_args():
- parser = argparse.ArgumentParser(description='Vocto-ingesb')
+ parser = argparse.ArgumentParser(description='Vocto-ingest client')
parser.add_argument('-v', '--verbose', action='count', default=0,
help="Also print INFO and DEBUG messages.")
parser.add_argument( '--video-source', action='store',
- choices=['dv', 'hdv', 'hdmi2usb', 'blackmagichdmi', 'test'],
+ choices=[
+ 'dv', 'hdv', 'hdmi2usb', 'blackmagichdmi',
+ 'ximage',
+ 'test', ],
default='test',
help="Where to get video from")