Commit graph

99 commits

Author SHA1 Message Date
Edward Hervey d920d9d64f tsdemux: Remove all seeking code
It was more than bogus
2012-03-01 18:15:51 +01:00
Thibault Saunier 5c2e6dc512 mpegtspacketizer: catch section lengths extending past the buffer length
This is probably the cause for an occasional crash while streaming
MPEG. Blind fix after staring at the code and following logic, so
may or may not fix the issue, I cannot test.

(Port of 4275a70cb5 from mpegdemux)
2012-02-27 09:57:45 -03:00
Thibault Saunier 58a210e3d3 mpegtspacketizer: support more character set encodings
Support UTF-16BE, EUC-KR (KSX1001), GB2312 and ISO-10646/UTF8 text
encoding and fixed new line for multibyte encoding
    
https://bugzilla.gnome.org/show_bug.cgi?id=664257

(Port of 9759d66407 from the mpegtsdemux
element)
2012-02-27 09:42:27 -03:00
Thibault Saunier 336710d355 tsbase: Fix parsing of PSI table IDs
(Ported from mpegtsdemux d8fd874f52)
2012-02-24 19:08:40 -03:00
Thibault Saunier f977d7e743 tsdemux: Avoid unlinkely leaks and segfault 2012-02-24 15:28:35 -03:00
Edward Hervey b6d98aea5f tsdemux: Use new clock skew estimation for outgoing timestamps
Only used in live mode
2012-02-24 17:53:52 +01:00
Edward Hervey e6ff2f7b83 tsdemux: Various code cleanup and dead code removal 2012-02-24 17:52:33 +01:00
Edward Hervey 4bc7cd04c1 mpegtspacketizer: Fix issues with skew code
* Always try to get a timestamp for the algorithm
* Remove dead variable
* Return proper default value
2012-02-24 17:47:38 +01:00
Thibault Saunier 6a8d2c45f6 mpegtspacketizer: Estimate clock skew and retimestamps buffers more precisly
Apply the EPTLA algotithm to estimate clock skew.
Reusing code from  -good/gst/rtpmanager/rtpjitterbuffer.c
2012-02-24 10:57:09 +01:00
Thibault Saunier 48a699812b tsdemux: Clean up AAC caps mess 2012-02-24 10:57:05 +01:00
Thibault Saunier dc8b6c678d tsdemux: Reindent gstmpegdesc.h 2012-02-24 10:57:02 +01:00
Thibault Saunier 67fd590e9a tsdemux: Support more DTS/AC3 descriptors 2012-02-24 10:56:58 +01:00
Edward Hervey 6ef0ae4ffe tsdemux: Remove useless finalize() 2012-02-24 10:56:14 +01:00
Edward Hervey 8b73baeced tsdemux: Use incoming timestamps in live mode 2012-02-23 16:39:48 +01:00
Edward Hervey 8f433e1677 tsdemux: Report latency (700ms) 2012-02-23 16:39:48 +01:00
Edward Hervey c492b00b69 mpegtsbase: Query whether upstream is live or not 2012-02-23 16:39:48 +01:00
Thibault Saunier 8cb0e87f56 mpegtsdemux: Not apply various time the same PMT to a program when repetead
Sometimes their are several times the same PMT applying to a same program in a stream,
tsdemux was totally baffled when this was happening, we now keep the one we
already applied so it works properly.
2012-02-17 12:19:20 -03:00
Thibault Saunier adc947e127 tsdemux: fix glib deprecation 2012-02-17 12:19:20 -03:00
Thibault Saunier 1182dd0c1b tsdemux: Avoid throwing FLOW_ERROR on last PCR processing error
In the case of scanning last pcr, errors are not critical, so we keep
the stream flowing.
2012-02-15 15:48:44 -03:00
Thibault Saunier cda0d3aed8 tsdemux: Add AAC latm support 2012-02-15 15:48:44 -03:00
Thibault Saunier 6094ec27b1 tsdemux: Minor refactoring/code cleaning
... add some debugging symbols in the mean time.
2012-02-15 15:48:44 -03:00
Vincent Penquerc'h 2dec0950cf tsdemux: add explicit supported AAC stream-format in template caps
https://bugzilla.gnome.org/show_bug.cgi?id=665394
2012-02-02 12:37:02 +00:00
Vincent Penquerc'h 8147669971 plenty: fixup glib deprecations 2012-01-27 15:47:07 +00:00
Mark Nauwelaerts d8fdd3485b mpegtsdemux: break out when stream identified 2012-01-23 14:22:18 +01:00
Mark Nauwelaerts b00ed32c5a mpegtsdemux: avoid NULL manipulation if invalid input 2012-01-23 14:22:18 +01:00
Edward Hervey fcf511aa8f tsdemux: Don't provide bogus values in non-TIME push-mode
Only take the upstream segment values in GST_FORMAT_TIME
2012-01-10 11:45:25 +01:00
Edward Hervey 24408bce96 tsdemux: Handle rollover in PTS and DTS
Also hands back-rollover which can happen with PTS
2012-01-10 11:45:22 +01:00
Vincent Penquerc'h 7521b597f4 various: fix pad template ref leaks
https://bugzilla.gnome.org/show_bug.cgi?id=662664
2011-11-28 13:08:27 +00:00
Edward Hervey e500ec524c tsdemux: Add notes on synchronization and scheduling 2011-11-16 12:47:58 +01:00
Youness Alaoui 894ac8f493 hlsdemux/tsdemux: Add HP copyright on work done on HLS 2011-09-09 12:12:12 +02:00
Youness Alaoui 59c61209cf tsdemux: Need to flush all streams when we receive a flush-start 2011-08-30 16:17:47 +02:00
Youness Alaoui e380fbb019 tsdemux: In push mode, do not start pull loop if upstream seek fails 2011-08-26 09:51:46 +02:00
Sebastian Dröge c86aba3469 tsdemux: Use FALSE instead of 0 for bool parameter 2011-08-24 09:35:18 +02:00
Youness Alaoui 744101a417 tsdemux: Need to send a newsegment after a seek 2011-08-24 08:12:29 +02:00
Youness Alaoui cfd28a6f90 tsdemux: Forward seek/duration query/event to the sinkpad 2011-08-24 07:48:52 +02:00
Vincent Penquerc'h 66dbdfd4d1 tsdemux: do not try to compare a PCR with itself for statistics
Especially as one of the logs will cause a divide by zero.

https://bugzilla.gnome.org/show_bug.cgi?id=656927
2011-08-23 10:38:10 +02:00
Vincent Penquerc'h b19a5ea1f3 tsdemux: do not keep a dangling pointer
When removing the current program, it will get freed by the
hash table removal callback, so ensure we clear our pointer
to it.

Fixes a crash later on in gst_ts_demux_push trying to access it.

https://bugzilla.gnome.org/show_bug.cgi?id=656927
2011-08-23 10:37:24 +02:00
Sebastian Dröge 6edff48378 mpegtsbase: First try if upstream handles seeking in TIME format before seeking in the demuxer 2011-08-23 09:52:20 +02:00
Sebastian Dröge a27b7b6712 tsdemux: First send SEEKING queries upstream 2011-08-23 09:40:16 +02:00
Sebastian Dröge ca0df16d52 tsdemux: Send DURATION query upstream first 2011-08-23 09:27:23 +02:00
Youness Alaoui 818762e8fc tsdemux: do not send a new-segment on stream removal
When a program is changed, stream_added is called which sets the
need_newsegment to TRUE, then stream_removed is called, which calls
the flush_pending_data, which checks for the newsegment and causes
it to send a new-segment.

We must not send the newsegment when flushing the pending data on the
removed stream. We should only push it when flushing data on the newly
added streams (after they finish parsing their PTS header)
2011-08-22 16:01:24 +02:00
Youness Alaoui 382710e200 tsdemux: Fix newsegment when switching programs
If a program/stream is changed, then a newsegment is sent which must
not be the same as the base segment since it happens later. We must
shift the start position by the time elapsed since the newsegment
and the current PTS of the stream
2011-08-22 16:01:17 +02:00
Youness Alaoui 4cc1dfb360 tsdemux: interpolate gap and fix timestamps depending on upstream segment 2011-08-22 15:55:47 +02:00
Youness Alaoui 02bc614163 tsbase: reinitiate segment at flush-stop event only 2011-08-18 14:54:22 +02:00
Edward Hervey 5c77682dab tsdemux: Take into account upstream newsegment events
If the incoming newsegment event was in time, use that position value
for the downstream newsegments.
2011-08-01 18:49:55 +02:00
Edward Hervey adfb090b59 mpegtsbase: Remove programs on EOS
Allows subclasses to properly flush out pending data.
2011-08-01 15:46:12 +02:00
Edward Hervey 57279cdd24 tsdemux: Refactor stream/program removal
The program_stopped vmethod was called before stream_removed vmethod
was being called. Since we only did stream-related operations in there,
we just remove the program_stopped vmethod and do everything in the
stream_removed one.

Also, make sure we flush out all pending data before sending EOS.
2011-08-01 10:54:16 +02:00
Nicolas Dufresne cbc0a2f056 mpegtsbase: Prevent stack gardening by using the right type
stream_type is stored as guint inside the GstStructure but was retreived
using valist with a pointer to guint16. This would cause stack gardening
when code is compiled without optimisation (e.g. in -O0 the compiler wont
pad the stack to optimise out required mask).

https://bugzilla.gnome.org/show_bug.cgi?id=655540
2011-08-01 09:33:25 +02:00
Edward Hervey 634d29cd88 mpegtsbase/tsdemux: Fix stream/pad activation order
We first activate new streams before shutting down old ones.
We emit no-more-pads after we add new streams and emit EOS before
removing old ones.
Also cleanup/refactor a bit more of the code accordingly
2011-07-25 18:56:49 +02:00
Edward Hervey d0e8427b4e pesparse: Fix stuffing byte handling
We in fact get the size of the header (including stuffing bytes), therefore
use that instead of trying to skip 0xff bytes ourselves since some media
streams do start with 0xff (like mpeg audio's initial 0xfff).
2011-07-20 19:19:13 +02:00