aboutsummaryrefslogtreecommitdiff
path: root/clients/source/ingest.py
diff options
context:
space:
mode:
Diffstat (limited to 'clients/source/ingest.py')
-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")