Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gst-plugins-bad gst-plugins-bad
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 989
    • Issues 989
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 132
    • Merge requests 132
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GStreamer
  • gst-plugins-badgst-plugins-bad
  • Issues
  • #549

Closed
Open
Created Apr 25, 2017 by Bugzilla Migration User@bugzilla-migration

inter: Add overflow-mode property and alternative "block" mode

Submitted by Carlos Rafael Giani

Link to original bug (#781721)

Description

Right now, the inter elements discard existing data if the channel is full. This is undesirable if one wants to use inter elements for creating a "producer" and a "consumer" pipeline. Example:

gst-launch-1.0 audiotestsrc ! interaudiosink sync=false interaudiosrc ! alsasink

This will output a corrupted sine wave and use 100% CPU, which is because interaudiosink will output data as fast as the CPU allows - if the channel is full, it just flushes the oldest samples until there is enough room for new ones.

This current behavior is retained and remains the default; it is now called the "flush" mode. The overflow-mode property introduces an alternative behavior, the "block" mode. In this mode, if the channel is full, inter*sink elements block until the channel has enough free space. With intervideo and interaudio, this means that the sink elements block until the corresponding src elements have read out the last buffer (= the channel has a capacity of exactly one buffer). With interaudio, this means that the interaudiosink element blocks until the interaudiosrc element has retrieved period-time nanoseconds of audio data from the channel.

NOTE: This is a first version that does not include tests yet. Also, the intersub element changes have not been tested yet because so far I could not construct a test pipeline because the intersubsink sink caps are incompatible with existing subtitle parsers (perhaps a good topic for a separate intersub bugfix?).

Blocking

  • Bug 791348
  • Bug 791353
Assignee
Assign to
Time tracking