summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2012-09-29 12:10:32 +0200
committerChristian Pointner <equinox@spreadspace.org>2012-09-29 12:10:32 +0200
commit49950864de32adbd9bf69b5a54ea25759e23eac6 (patch)
treec10d11d51527453708059439b3f3570fd539b342
parentno more useless data (diff)
started decklink source as input
-rwxr-xr-xsrc/flufigut.py18
-rw-r--r--templates/example/decklink.xml19
-rw-r--r--templates/example/firewireav.xml7
3 files changed, 35 insertions, 9 deletions
diff --git a/src/flufigut.py b/src/flufigut.py
index a832518..e68c047 100755
--- a/src/flufigut.py
+++ b/src/flufigut.py
@@ -100,8 +100,22 @@ for streamer in config['streamer']:
### generate input components ###################################
flow['input'] = {}
-# TODO
-
+flow['input']['raw-input'] = {
+ 'type': config['input']['source'],
+ 'desc': "Raw AV input from %s" % config['input']['source'],
+ 'worker': 'input',
+ 'properties': {},
+ }
+for property in config['input'].keys():
+ if property == 'samplerate':
+ flow['input']['raw-input']['properties'][property] = config['input']['samplerate']
+ elif property == 'resolution':
+ flow['input']['raw-input']['properties']['width'] = config['globals']['resolutions'][config['input'][property]]['width']
+ flow['input']['raw-input']['properties']['height'] = config['globals']['resolutions'][config['input'][property]]['height']
+ flow['input']['raw-input']['properties']['framerate'] = config['globals']['resolutions'][config['input'][property]]['rate']
+ elif property != 'source':
+ flow['input']['raw-input']['properties'][property] = config['input'][property]
+
### generate encoder components #################################
flow['encoder'] = {}
diff --git a/templates/example/decklink.xml b/templates/example/decklink.xml
new file mode 100644
index 0000000..f5815c1
--- /dev/null
+++ b/templates/example/decklink.xml
@@ -0,0 +1,19 @@
+ <component name="{{ name }}"
+ type="decklink-producer"
+ label="{{ component.desc }}"
+ worker="{{ component.worker }}"
+ project="flumotion"
+ version="{{ globals.version }}">
+ {% if 'device' in component.properties %}
+ <property name="device">{{ component.properties['device'] }}</property>
+ {% endif %}
+ {% if 'mode' in component.properties %}
+ <property name="mode">{{ component.properties['mode'] }}</property>
+ {% endif %}
+ {% if 'connection' in component.properties %}
+ <property name="connection">{{ component.properties['connection'] }}</property>
+ {% endif %}
+ {% if 'audio-input' in component.properties %}
+ <property name="audio-input">{{ component.properties['audio-input'] }}</property>
+ {% endif %}
+ </component>
diff --git a/templates/example/firewireav.xml b/templates/example/firewireav.xml
deleted file mode 100644
index aa8918e..0000000
--- a/templates/example/firewireav.xml
+++ /dev/null
@@ -1,7 +0,0 @@
- <component name="{{ name }}"
- type="firewire-producer"
- label="{{ component.desc }}"
- worker="{{ component.worker }}"
- project="flumotion"
- version="{{ globals.version }}">
- </component>