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 985
    • Issues 985
    • 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
  • #241

Closed
Open
Created Apr 15, 2015 by Bugzilla Migration User@bugzilla-migration

unable to dynamically insert tsmux into running pipeline

Submitted by Andreas Frisch @fraxinas

Link to original bug (#747898)

Description

Created attachment 301598
./tsswitchtest <short-file.ts>

i have a scenario where i wanna dynamically switch the input of a gst-rtsp-server streaming mpeg ts (with h.264 + aac es inside) from a ts stream delivered over a socket to a still image in case the input stream is lost.

so i destilled this into a minimal test case reading a ts from a file in an appsrc's need-data callback and then removing the appsrc and replacing it with testsources when the file is played completely.

so basically i have this pipeline (except with appsrc instead of filesrc)

gst-launch-1.0 filesrc location=test.ts ! queue name=ts_queue ! tsparse name=tsparse set-timestamps=TRUE ! tsdemux name=d d. ! queue ! faad ! audioconvert ! alsasink d. ! queue ! h264parse ! avdec_h264 ! autovideosink

and replace it with

gst-launch-1.0 videotestsrc ! capsfilter ! x264enc ! mpegtsmux name=m audiotestsrc ! capsfilter ! faac ! m. m. ! queue name=ts_queue ! tsparse name=tsparse set-timestamps=TRUE ! tsdemux name=d d. ! queue ! faad ! audioconvert ! alsasink d. ! queue ! h264parse ! avdec_h264 ! autovideosink

i did lots of experiments trying to get the timestamps right to achieve a seamless transition but I suspect some bugginess because there are also

(tsswitchtest:10281): GStreamer-WARNING **: gstpad.c:4802:store_sticky_event:<ts_queue:sink> Sticky event misordering, got 'segment' before 'caps'

the testsources seem to produce the buffers with the correct timestamps because they show up as
tsparse mpegtsparse.c:789:drain_pending_buffers:<tsparse> Pushing buffers - startTS 0:00:13.874543898 duration 0:00:00.119712000 16168 bytes
...
but then after each drain line, there are several
GST_PADS gstpad.c:4102:gst_pad_chain_list_default:tsparse:sink chaining each group in list as a merged buffer
and faad will eventually error out because it can't decode the stream

Attachment 301598, "./tsswitchtest <short-file.ts>":
tsswitchtest.c

Assignee
Assign to
Time tracking