Add basic pipeline tools
Motivation
The same code is repeated in many places for creating a pipeline, coercing strings to Caps, and running a pipeline. This MR gathers these into a single place.
Changes
- added several utilities to
gstlal.gsttools
for creating and executing gstreamer pipelines - renames
gstlal.gsttools
to a more specificgstlal.gstpipetools
Related Issues
Closes: #88 (closed) Related: #90, #91
Examples
Using the new utilities it's possible to put together a simple GStreamer pipeline and run.
# Import utilities
from gstlal import gsttools
from gstlal.pipeparts import source, sink, transform, encode
# Construct the pipeline
pipeline = gsttools.make_pipeline('Tutorial101')
head = source.audio_test(pipeline, wave=source.AudioTestWaveform.Sine)
head = transform.amplify(pipeline, head, amplification=0.5)
head = encode.wav(pipeline, head)
head = sink.file(pipeline, head, 'sample-out.wav')
# Execute the pipeline
gsttools.run_pipeline(pipeline, segment=(0, 1))
Merge request reports
Activity
requested review from @patrick.godwin
added 2 commits
- Resolved by Patrick Godwin
- Resolved by James Kennington
- Resolved by James Kennington
- Resolved by Patrick Godwin
- Resolved by James Kennington
added 36 commits
-
b98a48aa...826fc6c2 - 35 commits from branch
master
- c51549ad - Merge branch 'master' into feature-pipeline-tools
-
b98a48aa...826fc6c2 - 35 commits from branch