Commit graph

163 commits

Author SHA1 Message Date
Wim Taymans
b98ec32380 update for tag event change 2012-06-06 13:02:40 +02:00
Edward Hervey
e2576f0e86 mpegtsdemux: Also parse TOT (Time Offset Section)
It's the same as TDT, except with descriptors at the end
2012-06-05 10:54:27 +02:00
Edward Hervey
d9121c38ea mpegtsdemux: FIXME/Comment about issues/errors 2012-06-05 10:54:26 +02:00
Edward Hervey
9e117b83fc mpegtspacketizer: Fix leak 2012-06-05 10:54:26 +02:00
Edward Hervey
5f7ecaa0f1 mpegtspacketizer: Reduce usage of GstAdapter
Peek as much as possible in one go. Ideally we should remove usage of
adapter altogether, but for the time being it provides a big enough
speedup (around 2 times faster per packet processed).
2012-06-05 10:54:26 +02:00
Edward Hervey
f0867c7247 mpegtspacketizer: Avoid alloc/free where possible
Helps for streams with a lot of sections, like EIT
2012-06-05 10:54:26 +02:00
Edward Hervey
aab8c46f10 mpegtbase: Add more sections that don't have a CRC 2012-06-05 10:54:26 +02:00
Edward Hervey
25f6c78d79 mpegdefs: Add list of known table_id
Along with the specifications from which they come. Avoids having
to search for which spec a table_id belongs to
2012-06-05 10:54:26 +02:00
Edward Hervey
0e86e68c6a mpegtspacketizer: Clarify debug statements
Use hex values in more cases (since that's how PID/table_id/... are
represented in the various specs).
2012-06-05 10:54:26 +02:00
Edward Hervey
63f8b970af mpegtsbase/packetizer: Add CAT section handling
Allows reporting the global EMM
2012-06-05 10:54:25 +02:00
Edward Hervey
dfe6863387 mpegtbase: Add more debug in PSI handling
Allows us to identify which SI we don't handle
2012-06-05 10:47:49 +02:00
Edward Hervey
d47d1713d9 mpegtbase: Add more default known PSI table_id 2012-06-05 10:47:49 +02:00
Edward Hervey
9924c178c8 mpegtbase: Refactor PSI detection 2012-06-05 10:47:49 +02:00
Edward Hervey
9f7e70f754 mpegtbase: ECM/CA sections don't have a CRC
So don't check for it :)

Also add a bit more info in the warning message to speed up detecting
whether it's a false-positive or not.
2012-06-01 16:42:41 +02:00
Edward Hervey
8b2f229553 mpegdesc: Add more comments/info
Namely where they belong to
2012-05-26 15:54:51 +02:00
Edward Hervey
8aa64c5d7d tsdemux: Make sure we have a language code before using it 2012-05-26 15:54:48 +02:00
Edward Hervey
7784c0d350 mpegtsbase: Check before getting descriptors from structure
Avoids spurious warnings. Not having those descriptors is nothing
fatal, so check their presence before trying to get them.
2012-05-26 15:54:44 +02:00
Edward Hervey
b6732a27d3 pesparse: Be a bit more permissive with PTS/DTS parsing
According to the specifications a PTS_DTS_flags value of 0x01 is forbidden.
... but there are some rare files out there that do that.

Instead of erroring out, let's warn, carry on parsing accordingly.

If the packet is really corrupted there are enough checks afterward to
detect that.
2012-05-26 15:54:41 +02:00
Edward Hervey
12f24874aa mpegtsbase: Fix bit operation
"a % 8" corresponds to "a & 0x7" (and not 0xf).

spotted by Julian Scheel
2012-05-25 14:16:59 +02:00
Edward Hervey
a633347ed1 mpegtsbase: Speed up _is_psi()
By making it inline and simplifying the bit macros
2012-05-23 09:37:49 +02:00
Julian Scheel
a0a184931a tsdemux: Add language code to taglist.
Read the language codes for tracks from the mpegts descriptors and add it into
the pads taglist.

https://bugzilla.gnome.org/show_bug.cgi?id=673896
2012-05-22 18:13:30 +02:00
Edward Hervey
6bf54ff850 tsdemux: Adapt to new packetizer API
We no longer use GstBufferList and instead copy the incoming data
into newly allocated memory.

This makes tsdemux behaviour 3 to 4 times faster.
2012-05-22 17:43:38 +02:00
Edward Hervey
7fdf1cb0c8 tsparse: Adapt to new packetizer API 2012-05-22 17:43:38 +02:00
Edward Hervey
3c73d29162 mpegtsbase: Adapt to new packetizer behaviour 2012-05-22 17:43:38 +02:00
Edward Hervey
c6035d403c mpegtspacketizer: Avoid usage of GstBuffer internally
The overhead of creating/using 188 byte GstBuffer from GstAdapter
is too expensive.
We now peek the next packet, and provide a data/size which is only
valid until the packetizerpacket is cleared.

In addition, cleanup all the internal code to deal with that new
behaviour and remove double-checks which are no longer needed.

The section_length is now the corrected section_length (i.e. with
the additional 3 bytes).

Avoid using gst_adapter_prev_timestamp and instead track
the timestamp ourself.
2012-05-22 17:43:38 +02:00
Edward Hervey
6d01f5f1b3 mpegtspacketizer: Detect PCR wraparound in skew code
If the received PCR is going backwards (by a safe margin), include
that wraparound for further calculation.

https://bugzilla.gnome.org/show_bug.cgi?id=674536
2012-05-22 16:51:25 +02:00
Julian Scheel
5536bcf8b8 tsdemux: flush on pusi only for payload packets
Data should not be flushed out of the tsdemux because a payload unit start
indicator (pusi) is seen in a adaptation only ts packet. If the package contains no
payload a pusi does not indicate a new PES packet, but PSI information, etc.
This fixes playback of several TS files which contain ts packets without
payload but with pusi set to 1.

https://bugzilla.gnome.org/show_bug.cgi?id=676168
2012-05-18 11:12:20 +02:00
Edward Hervey
e75612c3fd tsdemux: Don't queue data for streams that don't have a pad
This would result in an error further down, and it also avoids processing
for that data which we wouldn't be using anyway.
2012-05-18 11:11:37 +02:00
Edward Hervey
8a4fd8358d tsdemux: Detect and handle scrambled packets
Users (tsdemux/mpegtsparse) can decide what to do with that
2012-05-18 11:11:31 +02:00
Edward Hervey
fa4b92e743 tsdemux: Emit no-more-pads when all pads are activated
Fixes #670921 again
2012-05-18 11:11:25 +02:00
Albert Astrals Cid
dda551e723 mpegts: support items in extended event descriptor
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=672478
2012-05-14 11:51:15 +02:00
Raimo Järvi
93ad7a4d06 Fix printf format compiler warnings on mingw-w64
https://bugzilla.gnome.org/show_bug.cgi?id=675520
2012-05-05 19:45:42 +01:00
Wim Taymans
7394deef33 tsbase: unref bad packets too
Conflicts:

	gst/mpegtsdemux/mpegtsbase.c
2012-05-01 11:50:39 +02:00
Wim Taymans
b56ab4b3cf tsdemux: reset the state of the stream when flushing
We need to reset the stream on a flush or else old packets could be added to the
list and leak.
2012-05-01 11:47:52 +02:00
Wim Taymans
eaf4d97815 mpegtsbase: don't push events upstream in pull mode
In pull mode, don't push the seek event upstream.
2012-05-01 11:43:07 +02:00
Wim Taymans
6bf0ebdcd8 mpegts: don't poke into private adapter fields 2012-05-01 09:41:18 +02:00
Wim Taymans
8da3c2a969 mpegtsdemux: we ignore warnings differently
We suppress the warnings in the .c file instead.
2012-04-20 11:25:31 +02:00
Gil Pedersen
fcd8155d87 mpegtsdemux: port to 0.11
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=674397
2012-04-20 11:25:31 +02:00
Wim Taymans
5bd76c7c97 mpegtsbase: clarify event ownership 2012-04-20 11:25:31 +02:00
Gil Pedersen
095a17ad03 mpegtsdemux: fix memory leaks
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=674393
2012-04-20 11:25:31 +02:00
Julian Scheel
1059905237 tsdemux: Set currentlist to NULL after free.
This prevents double free of currentlist is some circumstances.
2012-04-18 09:30:22 +02:00
Sebastian Dröge
cda192b3b7 gst: Update for GST_PLUGIN_DEFINE() API changes 2012-04-05 18:02:56 +02:00
Alessandro Decina
f4b292f994 tsdemux: set correct newsegment fields on _TIME seeks
Forward the seek rate and set NS.start to the seek target so that decoders can
apply clipping where necessary.
2012-04-05 09:16:07 +02:00
Sebastian Dröge
1318a97e0a gst: Update versioning 2012-04-04 14:44:34 +02:00
Alessandro Decina
3b525d1147 tsdemux: reset iterator to NULL after it's free
Fixes possible invalid memory access in gst_ts_demux_stream_flush
2012-04-04 07:24:28 +02:00
Edward Hervey
6800d0c4e0 tsdemux: Clear bufferlist/iterator when removing streams 2012-04-02 15:26:28 +02:00
Edward Hervey
dd6550a663 mpegtspacketizer: Don't leak buffer in fast variant 2012-04-02 15:25:46 +02:00
Edward Hervey
cd728627af mpegtsbase: Don't leak corrupt section packet buffer 2012-04-02 15:25:16 +02:00
Edward Hervey
881350f34c tsdemux: Fix several leaks
* dont' leak buffers when a stream is in discont state
* don't leak buffers when a program is removed/deactivated
* remove all programs when disposing
2012-03-30 19:20:17 +02:00
Edward Hervey
416b10b991 mpegtspacketizer: Handle rollover in offset calculations 2012-03-05 12:46:13 +01:00