Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
gst-plugins-bad
gst-plugins-bad
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,011
    • Issues 1,011
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 199
    • Merge Requests 199
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GStreamer
  • gst-plugins-badgst-plugins-bad
  • Issues
  • #549

Closed
Open
Opened 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
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: gstreamer/gst-plugins-bad#549