high complexity gstreamer pipelines buzztard audio
play

High complexity GStreamer pipelines Buzztard / Audio / Gstreamer - PowerPoint PPT Presentation

High complexity GStreamer pipelines Buzztard / Audio / Gstreamer Stefan Sauer <ensonic@hora-obscura.de>, 24.10.2011 What is buzztard? What is buzztard? ? NO NO We're getting We're getting there there Short history Short history


  1. High complexity GStreamer pipelines Buzztard / Audio / Gstreamer Stefan Sauer <ensonic@hora-obscura.de>, 24.10.2011

  2. What is buzztard? What is buzztard? ?

  3. NO

  4. NO

  5. We're getting We're getting there there

  6. Short history Short history ● Buzz: free, but closed source and windows only ● Dead in 2002, continued in 2009

  7. ● Buzztard: open source, focuses on Linux ● Since 2003 ● Uses GStreamer :)

  8. Foundation: Registry Foundation: Registry ● Book keeping of features ● Fast startup (cache) ● Safe plugin probing (out-of-process)

  9. Foundation: Scalability Foundation: Scalability ● Huge pipelines ● >500 elements ● >50 threads ● Example buzztard song of this size ● ~ 50 CPU use on a 1.6 GHz Intel Atom ● on a gstreamer debug enabled build

  10. Foundation: Sequencing Foundation: Sequencing ● GstController ● Sync control-changes with rendering ● Outside of ui threads

  11. Foundation: Sparse streams Foundation: Sparse streams ● Gap flag on buffers ● elements take shortcuts on silence

  12. Foundation: DecodeBin(2) Foundation: DecodeBin(2) ● Handling of different audio formats is a NO-OP VORBIS MP3 WAV AIFF AAC AU

  13. Foundation : Audio IO Foundation : Audio IO ● Everything is there! ● alsa, jack, pulseaudio, ...

  14. Foundation: Elements Foundation: Elements ● Lots of utility elements available ● data conversion, level meter, spectrum analyzer, ...

  15. Foundation: Introspection Foundation: Introspection ● Lots of GObject goodness ● Classify elements ● Generate dialogs

  16. Tricky: trick modes Tricky: trick modes ● Jog dial like scrubbing ● All elements need to play to the rules ● Adder fixed in git HEAD ● Still occational lockups in reverse mode

  17. Tricky: seamless loops Tricky: seamless loops ● Don't miss a beat ● Adder fixed in git HEAD

  18. Tricky: dynamic linking Tricky: dynamic linking ● Add/remove elements while playing ● Fragile, complicated and under-documented

  19. Tricky: dynamic linking Tricky: dynamic linking ● data flow on disconnected pads is fatal => pad-blocking ● pad-blocking on inactive pads hangs ● Pad-blocking is async ● Happens on data-flow over the pad ● Mind the direction: src for push, sink for pull ● Block the the the last src pad for push, first sink pad for pull ● Need to emulate startup/shutdown

  20. Tricky: dynamic linking Tricky: dynamic linking ● What to do with conditional elements ● un-parent from the pipeline ● Keep in the pipeline and lock the state

  21. Tricky: dynamic linking Tricky: dynamic linking ● Add elements ● Activate pads ● Block pads ● Change state to PAUSED ● Link ● Seek (the flush unblocks) ● Unlock the state ● Change state to PLAYING

  22. Tricky: dynamic linking : add 1 Tricky: dynamic linking : add 1

  23. Tricky: dynamic linking : add 2 Tricky: dynamic linking : add 2

  24. Tricky: dynamic linking : add 3 Tricky: dynamic linking : add 3

  25. Tricky: dynamic linking Tricky: dynamic linking ● Remove elements ● Block pads ● change state to NULL ● Lock the state ● Unlink ● Unblock pads

  26. Tricky: dynamic linking : remove Tricky: dynamic linking : remove

  27. Tricky: dynamic linking Tricky: dynamic linking ● Buzztard svn repo: design/gst/dynlink{2,3}.c

  28. WIP: plugin wrappers WIP: plugin wrappers ● Ladspa and lv2 still have issues (sources) ● More wrappers needed (dssi, vst)

  29. WIP: low latency audio WIP: low latency audio ● Determine effective latency in push mode ● Make pull mode work for audio ● It does not lockup anymore ● Queues need changes to not buffer

  30. WIP: push mode latency WIP: push mode latency ● Latency related to bpm/tpb and sampling rate ● e.g.: chunk-size for sink 120000 µs = 120 ms

  31. WIP: push mode latency WIP: push mode latency ● 140 ms delay ~ 46ms per queue

  32. Future Future ● GStreamer 1.0 :) ● EncodeBin for recording ● discoverer in the wave-table browser ● if the gtk+filechooser could be populated with disco- info asynchronously … ● tempo information as sticky events on the pads ● beats-per-minute + ticks-per-beat

  33. Thanks! Questions?

  34. Thanks Thanks sheetmusic: by 'starrise' Trey Jones ● sequencer: shows propellerheads reason ● icons are from gnome and tango icon themes ●

Recommend


More recommend