Skip to content
Snippets Groups Projects

Add basic pipeline tools

Merged James Kennington requested to merge feature-pipeline-tools into master
All threads resolved!

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 specific gstlal.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))
Edited by James Kennington

Merge request reports

Pipeline #312655 passed

Pipeline passed for a653322d on feature-pipeline-tools

Approval is optional

Merged by James KenningtonJames Kennington 3 years ago (Nov 4, 2021 2:52am UTC)

Merge details

Pipeline #312661 passed

Pipeline passed for cd9f8c4f on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • James Kennington resolved all threads

    resolved all threads

  • added 1 commit

    Compare with previous version

  • Patrick Godwin resolved all threads

    resolved all threads

  • Patrick Godwin resolved all threads

    resolved all threads

  • added 1 commit

    • b98a48aa - and you get a rename, and you get a rename!

    Compare with previous version

  • James Kennington changed the description

    changed the description

  • James Kennington added 36 commits

    added 36 commits

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Patrick Godwin approved this merge request

    approved this merge request

  • Please register or sign in to reply
    Loading