Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pulseaudio pulseaudio
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 897
    • Issues 897
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 56
    • Merge requests 56
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PulseAudioPulseAudio
  • pulseaudiopulseaudio
  • Merge requests
  • !494

[simplify] Make GStreamer encoder/decoder synchronous

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Marijn Suijten requested to merge MarijnS95/pulseaudio:gst-synchronous into master Feb 01, 2021
  • Overview 66
  • Commits 3
  • Pipelines 14
  • Changes 4

Fixes #1115 (closed)

Run GStreamer in PA's IO thread, without extra threads, semaphores and buffer copies.


As outlined in #1115 (closed) synchronization primitives might incur overhead - not to speak of all the extra code/maintenance overhead. As per the commit message:

Handling multiple threads does not come without overhead, especially when the end-goal is to ping-pong them making the whole system run serially. This patch rips out all that thread handling and instead "chains" buffers to be encoded/decoded directly into the pipeline, making them execute their work on the current thread. The resulting buffer can be pulled out from appsink immediately without require extra locking and signalling. While the overhead on modern systems is found to be negligible or unnoticable, code complexity of such locking and signalling systems is prevalent making it the main drive behind this refactor.


Unfortunately it seems GStreamer isn't built to support fully synchronous behaviour; I really want to map output_buffer as WRITEONLY in GStreamer and somehow shove that into the src pad of the transcoder GstBin before or during pad chaining, but haven't found the right API for that. Is it possible?


CC @SanchayanMaity @arun

Edited Dec 27, 2021 by Marijn Suijten
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: gst-synchronous