diff options
author | Christian Pointner <equinox@spreadspace.org> | 2012-10-17 17:47:38 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2012-10-17 17:47:38 +0200 |
commit | f59d1964bab3800730aae754641565750229665c (patch) | |
tree | 08fc84c3faaf95e393ccc1a7fe2e87e811ab3daa | |
parent | fixed test.json (diff) |
added audomatic repeater generation
-rwxr-xr-x | src/flufigut.py | 20 | ||||
-rw-r--r-- | templates/example/planet.xml | 5 | ||||
-rw-r--r-- | templates/example/repeater.xml | 11 | ||||
-rw-r--r-- | templates/example/soundcard.xml | 17 |
4 files changed, 49 insertions, 4 deletions
diff --git a/src/flufigut.py b/src/flufigut.py index 88e49c4..2f3b2c2 100755 --- a/src/flufigut.py +++ b/src/flufigut.py @@ -243,9 +243,9 @@ for mux_name in mux.keys(): 'properties': {}, } - ### generate streamer components ################################ flow['streamer'] = {} +flow['repeater'] = {} for cluster in stream.keys(): streamer_cnt = stream[cluster]['count'] @@ -288,7 +288,23 @@ for cluster in stream.keys(): for mux_name in stream[cluster]['muxes']: for format in mux[mux_name]['formats'].keys(): for profile in mux[mux_name]['formats'][format]: - feeder = 'muxer-%s-%s-%s' % (mux_name, format, profile) + muxer_feed = 'muxer-%s-%s-%s' % (mux_name, format, profile) + if 'repeater' in stream[cluster]: + repeater_worker = stream[cluster]['repeater'] + if repeater_worker not in worker: + worker[repeater_worker] = -1 + else: + worker[repeater_worker] = 1 + repeater_name = '%s-%s-%s-%s' % (stream[cluster]['repeater'], mux_name, format, profile) + flow['repeater'][repeater_name] = { + 'type': "repeater", + 'desc': "%s for %s %s-%s" % (stream[cluster]['repeater'], mux_name, format, profile), + 'worker': repeater_worker, + 'feeder': muxer_feed } + feeder = repeater_name + else: + feeder = muxer_feed + name = '%s-%s%i-%s-%s-%s' % (stream[cluster]['type'], cluster, idx+1, mux_name, format, profile) mount_point = '/%s-%s-%s.%s' % (mux_name, format, profile, globals['formats'][format]['muxer']) if streamer_cnt > 1: diff --git a/templates/example/planet.xml b/templates/example/planet.xml index 5ee260d..c1633ee 100644 --- a/templates/example/planet.xml +++ b/templates/example/planet.xml @@ -39,6 +39,11 @@ {% include '%s.xml' % component.type %} {% endfor %} +<!-- repeater --> +{% for name, component in flow['repeater'].items() %} +{% include '%s.xml' % component.type %} +{% endfor %} + <!-- streaming --> {% for name, component in flow['streamer'].items() %} {% include '%s.xml' % component.type %} diff --git a/templates/example/repeater.xml b/templates/example/repeater.xml new file mode 100644 index 0000000..aa469ec --- /dev/null +++ b/templates/example/repeater.xml @@ -0,0 +1,11 @@ + <component name="{{ name }}" + type="repeater" + label="{{ component.desc }}" + worker="{{ component.worker }}" + project="flumotion" + version="{{ globals.version }}"> + <eater name="default"> + <feed alias="default">{{ component.feeder }}</feed> + </eater> + <clock-master>false</clock-master> + </component> diff --git a/templates/example/soundcard.xml b/templates/example/soundcard.xml index 07f4c99..23df8a4 100644 --- a/templates/example/soundcard.xml +++ b/templates/example/soundcard.xml @@ -1,6 +1,6 @@ - <component name="{{ name }}" + <component name="{{ name }}_raw" type="soundcard-producer" - label="{{ component.desc }}" + label="{{ component.desc }} (raw)" worker="{{ component.worker }}" project="flumotion" version="{{ globals.version }}"> @@ -9,3 +9,16 @@ %% endfor <clock-master>{{ component.master }}</clock-master> </component> + + <component name="{{ name }}" + type="pipeline-converter" + label="{{ component.desc }} (normalized)" + worker="{{ component.worker }}" + project="flumotion" + version="{{ globals.version }}"> + <eater name="default"> + <feed alias="default">{{ name }}_raw</feed> + </eater> + <property name="pipeline">audioconvert ! audio/x-raw-int,rate=(int)48000,width=16,depth=16,channels=2</property> + <clock-master>false</clock-master> + </component> |