After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 692397 - New plugin for MPEG TS time shifting
New plugin for MPEG TS time shifting
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-01-23 16:09 UTC by Krzysztof Konopko
Modified: 2018-11-03 13:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed implementation (140.71 KB, patch)
2013-01-23 16:09 UTC, Krzysztof Konopko
none Details | Review

Description Krzysztof Konopko 2013-01-23 16:09:56 UTC
Created attachment 234220 [details] [review]
Proposed implementation

tstimeshift: New plugin for MPEG TS time shifting

This is an initial proposal.  I'd like to ask for any help, views, suggestions and directions.

The plugin is base on Fluendo timeshift element [1] although quite substantially changed.  The proposed code is maintained on GitHub [2].  The gsttstimeshift comprises several elements that can be used for MPEG TS time shifting:

  tsshifter    : Time Shift for MPEG TS streams
  tsshifterbin : Time Shift + TS parser for MPEG TS streams
  tsseeker     : Time Shift seeker
  tsindexer    : Indexer for MPEG-TS streams

A typical pipeline that makes use of them would look like:
  <some MPEG TS src> ! tsshifterbin ! <some MPEG TS sink>

The tsshifterbin element will instantiate elements as follows:

  tsparse ! tsindexer ! tsshifter ! tsseeker
  
and prepare tsindexer ("tune" it to look for the right PID containing PCRs).
 
Potentially tsshifter can be replaced with queue2 (see the problems below) and this is actually one of the goals.

Problems still to be considered/solved/improved:
---------------------------------------
- naming
  Both tsindexer and tsseeker are supposed to be MPEG TS agnostic but ATM they are TS specific, hence their names.
  Also the tsshifter is actually a ring buffer.
  
- tsindexer
  * uses overengineered for this use case and abandoned GstIndex API (local copy)
    * can't remove index entries
    * can't write the index to the disk
  * duplicates parsing TS packets logic from tsparse
    tsparse would have to be improved to send some additional timestamp information (e. g. as tags or as buffer timestamps) so that the indexer could pick them up. The indexer itself could be a generic component (no knowledge about TS packets), hard to come up with the right format though.
    
- tsindexer and tsseeker share an index object while it should be shared through some index database

- tsshifter
  * it's actually a ring buffer, not a shifter (see naming notes above)
  * ideally it should be replaced with queue2
    * as a first attempt, replacement could be optional (both tsshifter and queue2 co-exist)
      There are still some issues when using queue2 instead of tsshifter that have to be solved.
    * as a goal tsshifter could be completely replaced with queue2 which might require some changes/improvements of the latter:
      * custom allocator can be used (see FileMemAllocator: https://bugzilla.gnome.org/show_bug.cgi?id=691299)
      
- tests still to be written
- documentation

[1] https://github.com/kkonopko/gst-fluendo-timeshift
[2] https://github.com/kkonopko/gst-plugins-bad/tree/ts-timeshifter-element
Comment 2 GStreamer system administrator 2018-11-03 13:14:09 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/85.