Commit graph

56 commits

Author SHA1 Message Date
Tim-Philipp Müller
b32305d015 mpegtsdemux: fix language extraction
The descriptor contains ISO 639-2 language codes, but we want
two-letter ISO 639-1 codes in GST_TAG_LANGUAGE.
2010-01-06 01:57:01 +00:00
Arnaud Patard
24965dc415 mpegtsdemux: Handle eac3 in PMT
When the stream type is set to private data, gst-mpegtsdemux is trying to find
audio descriptors in PMT and look for AC3 (tag 0x6a) but doesn't look for EAC3
(tag 0x7a). Handle this case too.

Fixes bug #605904.
2010-01-04 10:15:29 +01:00
Jan Schmidt
91499fd9a7 mpegtsdemux: Don't send new-segment with start time == -1
When sending new-segment to a stream, ensure that there is either a valid
PCR, or else wait until there's a PTS on the stream (dropping packets if
needed) in order to avoid generating an invlaid new-segments event.

https://bugzilla.gnome.org/show_bug.cgi?id=595161
2009-10-29 10:53:10 +00:00
Alessandro Decina
a17393fd34 Fix warnings with gcc 4.0.1. 2009-09-23 12:34:47 +02:00
David Schleef
2506c3567c mpegtsdemux: Set DISCONT on buffers 2009-09-17 17:03:40 -07:00
Zaheer Abbas Merali
712ee57190 mpegtsdemux: add pad for DVB Subtitling pads 2009-09-15 14:35:15 +01:00
Edward Hervey
92ec711733 mpegtsdemux: Use GST_TIME_FORMAT in debug statement. 2009-09-11 15:19:17 +02:00
Edward Hervey
ddcd0e60b1 mpegtsdemux: Reset stream->last_time when flushing.
This fixes naive seeking a tiny bit (by basically hinting at _data_cb
that it shouldn't expect the incoming buffers to be the ones just after
the previous ones).

Without this, seeking by more than 10mins forward would just end up in an
endless loop.
2009-09-11 15:18:58 +02:00
Edward Hervey
7057f285cc mpegtsdemux: Sprinkle branch prediction macros. 2009-09-11 15:16:17 +02:00
Sebastian Dröge
15796d66bb mpegtsdemux: Fix usage of __always_inline__ attribute
This attribute can't be used for function declarations because
it needs the function body. Instead of a forward declaration of
functions, move the function itself above it's first use.

Fixes bug #594489 and compilation with gcc 4.3 and earlier.
2009-09-08 15:20:14 +02:00
Josep Torra
b60d71482f mpegtsdemux: set specific caps for lpcm in private stream
In the clips that I've found those streams, the lpcm header is
different than the DVD case.
Then the decoder need to know this in order to be able parse it.
2009-09-04 12:35:31 +02:00
Josep Torra
659e90f8f6 mpegtsdemux: added autodetect of packet size and removed m2ts mode property 2009-09-04 12:30:18 +02:00
Josep Torra
c67dc212bf mpegtsdemux: some more handling of VC1 and EAC3
If the PMT have the register descriptor HDMV assume EAC3
For VC1 make the code more aligned to RP227.
2009-09-04 12:02:18 +02:00
Sebastian Dröge
77fa16cf44 mpegtsdemux: If stream type is AC3 and no EAC3 descriptor is found assume AC3 2009-09-03 15:46:27 +02:00
Josep Torra
1e865242a7 mpegtsdemux: Implement EAC3 handling according some ATSC specs.
Fixes bug #594030.
2009-09-03 15:46:27 +02:00
Sebastian Dröge
3f35ef4584 mpegtsdemux: Stream type 0x81 is normal AC3, not EAC3
Not sure what the stream type for EAC3 is though.

Fixes bug #593059.
2009-09-01 12:56:12 +02:00
Sebastian Dröge
6115e0cb0e mpegtsdemux: Don't answer the SEEKING query if we don't know the answer yet
A bitrate!=-1 is required for seeking but the bitrate is only calculated
after the second PCR was read.

Fixes bug #590446.
2009-08-08 22:14:53 +02:00
Josep Torra
9861908926 mpegtsdemux: fix a memory leak 2009-08-07 19:12:26 +02:00
Josep Torra
1a9b54b781 mpegtsdemux: added VC1, EAC3 and LPCM related to blueray/hdmv 2009-08-07 19:00:23 +02:00
Sebastian Dröge
3f6e84ec61 mpeg[pt]sdemux: Fix SEEKING query
Send the BYTES based query downstream, not the orignal one.
2009-08-05 09:36:00 +02:00
Sebastian Dröge
da7263b51f mpegdemux: Remove some backward compatibility code
Also we always require liboil so use it unconditionally.
2009-07-23 09:58:38 +02:00
Sebastian Dröge
d8b285d7fd mpegdemux: Implement query type function for the src pads 2009-07-23 09:53:29 +02:00
Sebastian Dröge
1f88ceeba8 mpegtsdemux: Implement SEEKING query
Partially fixes bug #588944.
2009-07-21 13:33:58 +02:00
Aleksey Yulin
2db8d6ea0b mpegtsdemux: Don't use PIDs > MPEGTS_MAX_PID
The mpegtsdemux streams array only has MPEGTS_MAX_PID entries
and accessing one afterwards will result in crashes.

Fixes bug #575672.
2009-07-16 19:52:22 +02:00
Edward Hervey
22496517e0 mpegtsdemux: Fix HDV private stream definition/caps. 2009-06-05 20:23:44 +02:00
Jan Schmidt
b8eb0d5dbb mpegtsdemux: Avoid passing the custom GST_FLOW_NEED_MORE_DATA upstream
Don't return GST_FLOW_NEED_MORE_DATA from the chain function at the end
of files.
2009-06-04 16:11:16 +01:00
Jan Schmidt
db7d1a7eeb mpegtsdemux: Fix bogus uninitialised variable access
Typo in the previous commit
2009-05-29 15:44:51 +01:00
Jan Schmidt
f3a9f52536 mpegtsdemux: Use the ISO 639 language code descriptor to send tags.
If there is an ISO 639 language descriptor for a stream, send a language
code tag so that players can show a meaningful language for the audio and
subtitle streams.
2009-05-29 15:07:11 +01:00
Jan Schmidt
471640e3f3 mpegtsdemux: Add mapping for DVD and Bluray subpicture streams.
Add output subpicture pads for DVD (video/x-dvd-subpicture) and Bluray PGS
(subpicture/x-pgs) streams. Remove an unused variable from
the PES filter.
2009-05-26 15:31:53 +01:00
Edward Hervey
36cc757bda mpegtsdemux: Ignore NULL packets as early as possible.
This avoids:
* creating a MpegTSStream structure for nothing
* processing packet data for nothing
2009-05-25 18:32:26 +02:00
Edward Hervey
f92f282874 mpegtsdemux: Add mapping for HDV private streams 2009-05-25 18:32:26 +02:00
Wim Taymans
580b20d6cc mpegtsdemux: fix memleaks and refcounts
Use correct constants for PID_type so that we clear the right filter.
provide_clock must return a ref to a clock.
2009-05-22 11:02:07 +02:00
Edward Hervey
f9dfc44a67 mpegtsdemux: Protect bitrate estimation against bogus values.
If the estimated bitrate is lower than 188 bytes, there's most likely
something completely wrong with the two samples. If that happens,
force recalculation.

Use guint64 for observation PCR, I saw cases where it would overflow.
2009-05-11 16:59:20 +02:00
Edward Hervey
bc062b9acf mpegtsdemux: Only take PCR from the active stream for bitrate estimation. 2009-05-11 16:58:58 +02:00
Edward Hervey
432dd98321 mpegtsdemux: Change debugging levels for very frequent messages.
This allows debugging with mpegtsdemux:4 while being able to track what's
going on (and avoid taking up as much cpu for debugging as for the actual
demuxing process).
2009-05-11 16:53:18 +02:00
Zaheer Merali
ff7b54e7da mpegtsdemux: Add initial naive seeking support and fix duration query.
Sync from gst-fluendo-mpegdemux and have seeking/duration query
improvements in. No support however for wrapped around pcrs etc. but a
start nonetheless.
Also fix indentation issues.
2009-05-08 18:26:43 +01:00
Zaheer Abbas Merali
51fdc78786 mpegtsdemux: add hack specific for itvhd
itvhd masks its h264 video stream as a private stream making it harder for
other set top boxes to decode. this checks for specific program number, video
pid and stream type combination before declaring it as h264.
2009-04-21 12:09:31 +01:00
Zaheer Abbas Merali
39d6074539 itv hd hack 2009-04-21 12:09:31 +01:00
Zaheer Abbas Merali
e8ca380063 hack for itvhd sid to detect mpeg1 as h264 2009-04-21 12:09:31 +01:00
Josep Torra
ff1a6b4b22 mpegtsdemux: reset sync_lut_len to 0 on READY to NULL 2009-03-04 18:16:31 +00:00
Josep Torra
84860befdf mpegtsdemux: dynamically adjust the sync LUT table
Make the sync LUT table adjusted dynamically according to the size
of scanned data. Fixes demuxing buffers of any size.
2009-03-03 18:28:10 +00:00
Zaheer Merali
571d51ac92 mpegtsdemux: s/fluts/mpegts
Change all definitions from fluts to mpegts.
2009-02-19 11:36:45 +00:00
David Schleef
fe42ac1020 gst/mpegdemux/gstmpegtsdemux.c: Don't forward duration requests in BYTES, since the returned value doesn't mean anyth...
Original commit message from CVS:
* gst/mpegdemux/gstmpegtsdemux.c:
Don't forward duration requests in BYTES, since the returned
value doesn't mean anything.  Fixes #566959
2009-01-09 22:09:06 +00:00
David Schleef
4317cdbec0 gst/mpegdemux/gstmpegtsdemux.*: Enable latency code, since we're definitely after 0.10.12
Original commit message from CVS:
* gst/mpegdemux/gstmpegtsdemux.c:
* gst/mpegdemux/gstmpegtsdemux.h:
Enable latency code, since we're definitely after 0.10.12
2008-11-26 04:57:22 +00:00
Zaheer Abbas Merali
d087870e09 gst/mpegdemux/gstmpegtsdemux.c: Make private section pads have a caps set so they are not tried to be linked in parse...
Original commit message from CVS:
* gst/mpegdemux/gstmpegtsdemux.c:
Make private section pads have a caps set so they are not tried
to be linked in parse_launch for example.
2008-11-06 12:17:08 +00:00
Zaheer Abbas Merali
5e47fd7616 gst/mpegdemux/gstmpegtsdemux.c: No need to reclaculate flush in this case.
Original commit message from CVS:
patch by: Josep Torra
* gst/mpegdemux/gstmpegtsdemux.c:
No need to reclaculate flush in this case.
Fixes some bad decode errors introduced.
2008-11-06 11:31:03 +00:00
Zaheer Abbas Merali
32a383f8b4 gst/mpegdemux/gstmpegtsdemux.*: Fix typo.
Original commit message from CVS:
* gst/mpegdemux/gstmpegtsdemux.c:
* gst/mpegdemux/gstmpegtsdemux.h:
Fix typo.
2008-11-06 10:42:59 +00:00
Zaheer Abbas Merali
cf69768bfb gst/mpegdemux/gstmpegtsdemux.c: Heuristic approach when resyncing.
Original commit message from CVS:
patch by: Josep Torra
* gst/mpegdemux/gstmpegtsdemux.c:
Heuristic approach when resyncing.
2008-11-05 18:52:38 +00:00
Zaheer Abbas Merali
e758c7dc23 gst/mpegdemux/gstmpegtsdemux.*: Properly handle some resync cases in the optimised buffering strategy.
Original commit message from CVS:
Patch by: Josep Torra
* gst/mpegdemux/gstmpegtsdemux.c:
* gst/mpegdemux/gstmpegtsdemux.h:
Properly handle some resync cases in the optimised
buffering strategy.
2008-10-16 16:37:33 +00:00
Zaheer Abbas Merali
9a808ad30a gst/mpegdemux/gstmpegtsdemux.c: Fixes a segfault in the adaptation buffer size strategy.
Original commit message from CVS:
patch by: Josep Torra
* gst/mpegdemux/gstmpegtsdemux.c:
Fixes a segfault in the adaptation buffer size strategy.
Fixes #556440
2008-10-16 08:13:49 +00:00