Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gst-plugins-rs gst-plugins-rs
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 74
    • Issues 74
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 24
    • Merge requests 24
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & 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
  • GStreamer
  • gst-plugins-rsgst-plugins-rs
  • Merge requests
  • !277

threadshare/*src: rework pause/flush_start/flush_stop

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged François Laignel requested to merge fengalin/gst-plugins-rs:appsrc-prevent-buffer-loss into master Mar 16, 2020
  • Overview 56
  • Commits 1
  • Pipelines 22
  • Changes 13

This commit fixes several issues with the Ts*Src elements.

pause

The pause functions used cancel_task which breaks the Task loop at await points. For some elements, this implies making sure no item is being lost. Moreover, cancelling the Task also cancels downstream processing, which makes it difficult to ensure elements can handle all cases.

This commit reimplements Task::pause which allows completing the running loop iteration before pausing the loop.

See !277 (comment 439529)

In the Paused state, incoming items were rejected by TsAppSrc and DataQueue.

See !277 (comment 438455)

flush_start / flush_stop

  • FlushStart must engage items rejection and cancel the Task.
  • FlushStop must purge the internal stream & accept items again.
  • A Segment event must be sent before pushing a new Buffer after a flush is complete.

push_prelude

If the task was cancelled, push_prelude could set need_initial_events to true when the events weren't actually pushed yet.

Potential Buffer loss in TsAppSrc

TsAppSrc used to renew its internal channel which could cause Buffer loss when transitionning Playing -> Paused -> Playing.

See #98 (closed)

Fixes #98 (closed)

Edited Mar 20, 2020 by François Laignel
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: appsrc-prevent-buffer-loss