From 7148946afa2b91cf93e4fb792f3c7925e4497219 Mon Sep 17 00:00:00 2001 From: Carl Karsten Date: Wed, 23 Mar 2016 01:24:04 -0500 Subject: added --video-source ximage for screen capture. --- clients/source/ingest.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'clients') 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") -- cgit v1.2.3