Commit graph

322 commits

Author SHA1 Message Date
Julien Isorce
e62978d045 mpegtsparse: check offset when retrieving table_id on malformed packets 2011-12-12 15:05:16 +01:00
Vincent Penquerc'h
09f0860a10 mpegtsdemux: only offset timestamps when live
This code is to sync to a live source when there is a delay
between start and when we receive the first buffer, so it does
not make sense in a non live case.

This fixes playback of streams where the input timestamps are
based off some arbitrary offset.

https://bugzilla.gnome.org/show_bug.cgi?id=663756
2011-12-08 12:46:20 +00:00
Alexey Fisher
2099a39459 mpegpsdemux: recalculate adjust if difference is negative
One of my dvds jump on some position and miss about 1 minute of stream.
The reason was mpeg timestamps. On some position scr difference is negative.
It produced negative timestamps. Since it was converted to unsigned value,
gstreamer timestamps was invalid. Instead of increasing mpeg ts,
they was decreasing till it started to be positive.

The jump in timestamps caused mpeg2dec to skip frames to make QoS happy.

This patch just make diff unsigned to avoid negative values.

Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net>

https://bugzilla.gnome.org/show_bug.cgi?id=656115
2011-11-29 11:35:11 +00:00
Tim-Philipp Müller
f585848d4b Merge remote-tracking branch 'origin/master' into 0.11 2011-11-28 23:20:58 +00:00
Vincent Penquerc'h
f1a4791f74 mpegdemux: Try to add all streams early
This will allow us to signal no-more-pads to avoid hitting
the decodebin2 overrun.
2011-11-28 15:10:47 +00:00
Vincent Penquerc'h
fb66b3c2ac mpegtsdemux: handle pads with no data
Some streams declare PIDs but will not send data for them.
Ensure we time out on those, and both send new segments to
keep their time synchronized with the rest, and do not wait
forever before deciding to signal no-more-pads.

https://bugzilla.gnome.org/show_bug.cgi?id=659924
2011-11-28 15:08:13 +00:00
Vincent Penquerc'h
f909c57546 mpegtsdemux: signal no-more-pads when appropriate
We track streams for which a data callback is set (and for which
pads will be added only when data is received), and signal
no-more-pads when the last pad is added.

https://bugzilla.gnome.org/show_bug.cgi?id=659924
2011-11-28 15:08:06 +00:00
Vincent Penquerc'h
9715fc3189 mpegdemux: take into account offset of first buffer
This fixes playback when the source starts later than the playback
pipeline, and when a source drops for a while then restarts.

https://bugzilla.gnome.org/show_bug.cgi?id=657794
2011-11-28 14:01:43 +00:00
Vincent Penquerc'h
918d2e710f mpegdemux: fix some more video freezing
There was a second threshold, which apparently needs to be smaller
than the first, though I'm not certain of it as I don't understand
yet this nest of wtf that is the mpeg demuxer timing logic.

Fixes video freezing on one (corrupted) MPEG sample. It would
previously never think it was out of the discontinuity, and would
push buffers with no timestamp.

Now this took me more than a day's poking at the thing, for just
one constant change, and I'm scared to have to touch this again :S

https://bugzilla.gnome.org/show_bug.cgi?id=655804
2011-11-28 13:57:42 +00:00
Vincent Penquerc'h
7960280afb mpegdemux: catch smaller PTS dicontinuities
In a test stream, I get one buffer with a PTS of about 15 seconds
in the future compared to the previous one, and next buffers with
timestamps continuing where the original ones left off.

This caused the sink to wait 15 seconds to display the frame while
more frames queued up, and then dump all the subsequent frames as
they "arrived too late".

Maybe that threshold should be made configurable, but for now,
make it more smaller to catch more of these.

https://bugzilla.gnome.org/show_bug.cgi?id=655804

Non AV streams keep using the larger threshold (10 minutes), as
subtitles may arrive only every so often.
2011-11-28 13:57:29 +00: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
Wim Taymans
0a9387c43c Merge branch 'master' into 0.11
Conflicts:
	ext/opus/gstopusdec.c
	ext/opus/gstopusenc.c
	ext/opus/gstopusparse.c
	gst/audiovisualizers/gstwavescope.c
	gst/filter/Makefile.am
	gst/filter/gstfilter.c
	gst/filter/gstiir.c
	gst/playondemand/gstplayondemand.c
2011-11-23 11:08:39 +01:00
Sebastian Pölsterl
9759d66407 mpegtsparse: 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
2011-11-22 11:35:00 +00:00
Wim Taymans
dbdaa23742 Merge branch 'master' into 0.11
Conflicts:
	gst/colorspace/colorspace.c
2011-11-09 12:19:04 +01:00
Vincent Penquerc'h
4275a70cb5 mpegdemux: 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.
2011-11-07 11:59:12 +00:00
Vincent Penquerc'h
b3d751667d mpegpsdemux: fix zero length packet handling
https://bugzilla.gnome.org/show_bug.cgi?id=631416
2011-11-07 11:17:00 +00:00
Wim Taymans
c8adc4f8c8 make request pads take _%u 2011-11-04 12:22:37 +01:00
Vincent Penquerc'h
e4856a2965 mpegtsdemux: fix scanning stopping too early
https://bugzilla.gnome.org/show_bug.cgi?id=648245
2011-10-03 11:15:16 +02:00
Vincent Penquerc'h
46dd7941f3 mpegpsdemux: take into account SCR offset when seeking
Since the seeking byte offset is chosen by linear interpolation
from SCR values, we need to take that first SCR into account
to end up near the correct offset. Otherwise, as the code does
a linear search after that first seek, it will take a LOOOOOONG
time to get there for streams which don't start at zero.

https://bugzilla.gnome.org/show_bug.cgi?id=659485
2011-09-30 15:15:06 +01:00
Vincent Penquerc'h
49d1121101 mpegdemux: answer position query with a stream time position
https://bugzilla.gnome.org/show_bug.cgi?id=659485
2011-09-30 15:11:12 +01:00
Vincent Penquerc'h
71f28c44a0 mpegpsdemux: remove unused field
https://bugzilla.gnome.org/show_bug.cgi?id=659485
2011-09-30 15:05:31 +01:00
Vincent Penquerc'h
38cdb54112 mpegtsdemux: keep CRC table in .rodata
https://bugzilla.gnome.org/show_bug.cgi?id=660118
2011-09-26 13:00:03 +02:00
Olivier Crête
ad97807497 mpegdemux: Restore erroneously removed data++
Also, put back some unused code in comment and replace // comments by /* */
2011-07-13 13:38:31 -04:00
Olivier Crête
dcd54fced1 mpegtsdemux: Fix unused-but-set warnings 2011-07-12 17:50:27 -04:00
Tim-Philipp Müller
0777b678f5 gst: some more unused-but-set-variable warning fixes 2011-06-04 20:35:03 +01:00
Gabriel Strimtu
d8fd874f52 mpegtsparse: Fix parsing of PSI table IDs
Fixes bug #635917.
2011-05-26 09:46:58 +02:00
Rafael Diniz
83b5b29639 mpeg[pt]sdemux: Add support for AAC LATM/LOAS streams
Fixes bug #615681.
2011-05-20 10:00:02 +02:00
David Schleef
40f3b4a651 mpegtsdemux,tsdemux: Add byte-stream to h264 caps
Fixes #606662.
2011-04-24 19:40:08 -07:00
Tim-Philipp Müller
5d6bdf6052 Fix some unused-but-set-variable warnings with gcc 4.6 2011-04-15 00:24:47 +01:00
Thibault Saunier
17fd7ebcb4 android: make it ready for androgenizer
Remove the android/ top dir
Fixe the Makefile.am to be androgenized

To build gstreamer for android we are now using androgenizer which generates the needed Android.mk files.
Androgenizer can be found here: http://git.collabora.co.uk/?p=user/derek/androgenizer.git
2011-04-11 07:27:11 +02:00
René Stadler
379d5adfce mpegtsdemux: ensure cleanup of pes/section filter helper structures
In particular, the section_filter would not be cleared for a private section
stream, leaking a GstAdapter. Seen on bug #645502.
2011-03-24 22:42:08 +02:00
René Stadler
1d8482c0c6 mpegtsdemux: don't leak pad name
As seen on bug #645502.
2011-03-24 22:41:12 +02:00
Mart Raudsepp
b69450af92 mpegtspacketizer: Handle all ISO8859-x encodings in get_encoding()
... according to ETSI EN 300 468, "Selection of character table"
2011-03-21 19:57:39 +01:00
Edward Hervey
ee0c9ae2f3 mpegtspacketizer: Don't forget the GType when using caps_new_simple() 2011-01-10 19:11:22 +01:00
Tim-Philipp Müller
d4441a3025 mpegtsdemux: fix silly way of creating caps 2011-01-10 11:25:47 +00:00
Karol Sobczak
0b4dfa685d mpegtsdemux: fix re-syncing on invalid data after seek
Or possibly even at startup. If we couldn't find a sync within
the first few bytes, we'd just push more data into the adapter
but never discard any of the invalid data at the beginning, so
would never be able to re-sync.

https://bugzilla.gnome.org/show_bug.cgi?id=639063
2011-01-10 11:18:52 +00:00
Tim-Philipp Müller
89fed534e8 mpegtsdemux: fix PAT and PMT info-related object leaks 2011-01-07 02:12:11 +00:00
David Schleef
edd1f791ca mpegdemux: Fix c99-ism 2010-12-30 19:25:46 -08:00
Vincent Penquerc'h
29c6a95417 mpegdemux: do not use the pad buffer allocation functions in demuxers
https://bugzilla.gnome.org/show_bug.cgi?id=637931
2010-12-24 14:17:51 +01:00
Sebastian Dröge
18061222b9 mpegtsdemux: Rename DVB subtitling media type to subpicture/x-dvb 2010-12-15 21:11:11 +01:00
Sebastian Dröge
61c2b173c6 mpegtsdemux: Mark array static const and use G_N_ELEMENTS instead of sizeof 2010-12-15 20:49:57 +01:00
Janne Grunau
431ea2c697 mpegtsdemux: add DESC_DVB_SUBTITLING descriptor for language parsing 2010-12-15 20:47:25 +01:00
Janne Grunau
eaf1b316b0 mpegtsdemux: enable gather_pes only for DVB subtitle private streams 2010-12-15 20:47:25 +01:00
Mart Raudsepp
1db547f0b6 gstmpegtsdemux: add temporary **HACK** for dvb subs testing so dvbsuboverlay gets whole packets
<tpm> leio, what's the mpegts demux hack about?
<leio> my libdvbsub code can't handle cut packets
<leio> so the hack instructs the demuxer to gather full packets before pushing down, but it applies that to more PES packet types than just dvbsub, but I'm not sure if that's a bad thing
<leio> either way, needs a cleaner solution, either in demuxer, or I need to handle cut packets
<tpm> ok, but really it should be fixed in the overlay, right?
<tpm> or a parser be inserted
<leio> the problem is that I don't know from the first packet beforehand if it is a cut one or no
<leio> not
<leio> err, first buffer
<leio> just when I receive the next one I see if it has a valid timestamp on it or not
<leio> so I can't very well queue it up in the chain either, I might be blocking the very last subtitle for no reason or something
<tpm> but you could just drop/ignore packets until you find one, right?
<leio> find what?
<tpm> a complete packet?
<leio> the problem isn't that they aren't complete
<leio> the problem is that they are cut across multiple GstBuffers by the demuxer without the hack
<tpm> sure, I understand that
<tpm> but you can't easily determine if a GstBuffer contains he start fragment of a packet or not?
<leio> I guess I could parse the packet and see if its length is enough, just like the libdvbsub code eventually does too
<leio> I can, it has a timestamp if it's the first chunk
<leio> I just never know if I need to wait for more, without some parsing
<tpm> ah ok
<leio> while the demuxer could just give me an uncut one in the first place
<leio> like it always does for program streams
<leio> that gather_pes is always set in gstmpegdemux, but not in gstmpegtsdemux
2010-12-08 16:30:09 +01:00
Andoni Morales Alastruey
e307bfe6e6 mpegtsparse: Create a sub-buffer with the section length 2010-11-23 11:26:56 +01:00
Alessandro Decina
b005ed2197 mpegtsparse: fix compiler warning 2010-11-19 18:51:32 +01:00
Andoni Morales Alastruey
fb9234de78 mpegtsparse: fix thinko 2010-11-19 18:33:10 +01:00
Andoni Morales Alastruey
b11f737096 mpegtsparse: fix handling of TOT and TDT sections. Fixes #635281.
TDT and TOT sections, with PID=0x14, doesn't extend to several packets
and the section filter is not needed here and shouldn't be used at all
for these tables because the have a different structure.
For example, TDT tables were not parsed for odd hours because this bit
is the 'current_next_indicator' bit for the other sections, and the table
was discarded.
2010-11-19 18:11:50 +01:00
Andoni Morales Alastruey
2611b12970 mpegtsparse: don't calculate the CRC for TOT tables. Fixes #635281.
TOT tables, with table_id=0x73, don't have a CRC, so don't calcute it
2010-11-19 18:10:47 +01:00
Andoni Morales Alastruey
891e08f220 mpegtsparse: send TDT tables messages in a serialized event downstream
https://bugzilla.gnome.org/show_bug.cgi?id=633917
2010-11-03 04:48:00 +00:00
Sebastian Pölsterl
13431420eb mpegtsparse: Add tag event emission. Fixes #627253 2010-10-28 11:45:46 +01:00
Stefan Kost
0c22e1b954 various (gst): add missing G_PARAM_STATIC_STRINGS flags
Canonicalize property names as needed.
2010-10-19 15:47:17 +03:00
Sebastian Dröge
f407d51ae8 mpegdemux: Don't use GST_FLOW_IS_FATAL()
And fix some minor issues related to its usage.
2010-09-21 12:26:35 +02:00
Zaheer Abbas Merali
c7b195740e mpegtsparse: actually work when we have small buffers coming in
available_fast is not what we want and it will never get to discover packet
size if 188 byte buffers are being picked up.
2010-07-29 10:38:58 +01:00
Sebastian Pölsterl
61a8856133 mpegtsparse: don't free PAT structure which may still be needed later
This is a problem if you tune to a channel which uses pid X and later tune to
another channel where X is used for another table (e.g. PMT).

The code that does that was actually already there but never used because the
pat structure was freed before. The commit that introduced those lines intended
to fix a memory leak, but we clean things up elsewhere.

Fixes #622725.
2010-06-30 18:27:16 +01:00
Thijs Vermeir
ba39867606 mpegdemux: improve debug output 2010-06-17 10:52:31 +02:00
Sebastian Dröge
b1a12c3a2d mpegtsdemux: Don't use liboil functions
glibc memcpy() will be faster than liboil's/orc's for now anyway
and we can use orc's later, after orc has support for loop unrolling.
2010-06-14 14:48:02 +02:00
Arun Raghavan
e5a37377ae mpegtsdemux: Some checks to avoid asserts
gst_mpeg_descriptor_find() expects the description field to be non-NULL.
This fixes a couple of calls where the value being passed is not
verified to be non-NULL first.

https://bugzilla.gnome.org/show_bug.cgi?id=620456
2010-06-03 20:11:29 +02:00
Sebastian Pölsterl
58b926b978 mpegtspacketizer: fix minor memory leak
Don't leak language code.

Fixes #619444.
2010-05-23 19:20:31 +01:00
Zaheer Abbas Merali
5208d030b3 mpegtsdemux: fix memory corruption when parsing adaptation field 2010-05-17 16:26:03 +01:00
Zaheer Abbas Merali
d2bd939899 mpegtsparse: parse TDT table in mpegts.
Some tables in MPEG-TS do not have a crc in the spec, so also mpegtsparse
is not calculating crc for sections with table_id 0x70 - 0x72 because they
do not have a CRC in the spec. See EN300468. Parse Time and Date table and
output bus message.
2010-05-12 13:00:16 +02:00
Sebastian Dröge
5a51dbd093 mpegdemux: Use GST_FLOW_CUSTOM_SUCCESS instead of some integer
Fixes compiler warning with gcc 4.5.
2010-04-16 19:43:59 +02:00
Sebastian Dröge
2908515bd4 Revert "mpegpsdemux: Workaround new gcc 4.5 compiler warning"
This reverts commit a331228ecc.
2010-04-16 19:42:00 +02:00
Sebastian Dröge
a331228ecc mpegpsdemux: Workaround new gcc 4.5 compiler warning
gcc 4.5 warns when comparing some integer with an enum value, in
the case of GstFlowReturn this is valid though. We should later
add GST_FLOW_CUSTOM_OK1, GST_FLOW_CUSTOM_OK2, etc. after new core
is released.
2010-04-15 21:26:45 +02:00
Sebastian Dröge
1306160b79 mpegtsdemux: Add support for BlueRay style DTS
Fixes bug #614259.
2010-04-05 10:33:26 +02:00
Sebastian Dröge
074d20cf99 mpegtsdemux: Add support for the two DTS HD stream types
Fixes bug #614259.
2010-04-04 20:23:00 +02:00
Sebastian Pölsterl
d7ab75abb8 mpegtspacketizer: Additionally use the CRC to check if tables are duplicates
The current code just uses table id, subtable extension and version number to
check if the section has been seen before. However, this comparison is not
sufficient, causing actually new tables being dismissed.

Fixes bug #614479.
2010-04-02 19:52:25 +02:00
Sebastian Dröge
129042b65c mpegtsparse: Make sure that the buffer metadata is writable before setting caps
Fixes bug #614349.
2010-04-02 19:19:23 +02:00
Tim-Philipp Müller
eb34b2015b mpegtsdemux: add missing space to debug message 2010-03-26 12:04:48 +00:00
Benjamin Otte
240f494aa7 Add -Wold-style-definition
and fix the warnings
2010-03-22 16:56:03 +01:00
Benjamin Otte
33c2f5fb01 Add -Wwrite-strings
and fix its warnings
2010-03-22 13:16:33 +01:00
Benjamin Otte
b7655bbd2e Add -Wredundant-decls flag
and fix warnings from it
2010-03-22 12:05:59 +01:00
Benjamin Otte
f96e4f1581 Add -Wmissing-declarations -Wmissing-prototypes to configure flags
And fix all warnings
2010-03-21 21:39:18 +01:00
Benjamin Otte
775c7584fd gst_element_class_set_details => gst_element_class_set_details_simple 2010-03-18 22:46:41 +01:00
Tim-Philipp Müller
cadb0526d5 mpegtsdemux: fix minor memory leak in property getter
Don't leak the string returned by g_strjoinv(). While we're at it,
use GString to assemble the string to be returned.
2010-03-15 19:21:52 +00:00
Sebastian Dröge
e1c1a6c874 mpegtsdemux: Never flush more bytes than available
This could happen if the input doesn't contain any MPEG TS
data and the complete adapter content should be skipped.
2010-02-09 15:24:28 +01:00
b3f0b029f3 win32: Include config.h before anything else. Fix mpegdemux LIBADD
Because config.h defines __MSVCRT_VERSION__, which should be defined
before inclusion of any system header.

Also fixes mpegdemux Makefile.am LIBADD typo.

Fixes #606665
2010-01-12 12:31:56 +01:00
Linqiang Pu
d68c2d4ab9 mpegdemux: fix allignment issue
Use GST_READ_UINT32_BE instead of GUINT32_FROM_BE to
fix int allignment issues on ARM

Fixes #606371
2010-01-10 10:09:55 -03:00
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
Xavier Queralt Mateu
b6b1658e97 Expose lang codes in pmt 2009-11-24 10:14:49 +00:00
Edward Hervey
ba460f587a mpegdemux: Fix pointer-differences printout
There is unfortunately no G_*_FORMAT conversion specifier for differences of
pointers in glib, and we can't rely either on all platforms being 64bit.

So let's just cast the difference to a gint and be done with it.
2009-11-04 17:45:34 +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
Josep Torra
3fedf9e9a5 mpegdemux: fix warnings in macosx snow leopard 2009-10-11 12:56:29 +02:00
Sebastian Pölsterl
bf3cf014ab mpegtsparse: Ignore emphasis on/off bytes, and do fallback string encoding.
For fallback, try ISO 8859-9 encoding if ISO 6637 failed.
Add more debug calls.
2009-10-06 17:46:36 +01:00
Alessandro Decina
a17393fd34 Fix warnings with gcc 4.0.1. 2009-09-23 12:34:47 +02:00
Edward Hervey
4ceb3c5678 mpegtsparse: Specify that psi table is static const.
This avoids re-allocating it every single time we go into it.
Roughly 10% performance boost in overall tsparse processing time.
2009-09-21 12:13:03 +02:00
Zaheer Abbas Merali
bf34bdd3ab Revert "mpegtsparse: use fixed size array rather than dynamically allocating"
This reverts commit ae75b6f366.
2009-09-20 17:53:24 +01:00
Zaheer Abbas Merali
ae75b6f366 mpegtsparse: use fixed size array rather than dynamically allocating 2009-09-20 15:32:14 +01:00
Zaheer Abbas Merali
f9c4b3cce9 mpegtsparse: replace streams hashtable with an array of streams 2009-09-20 15:23:44 +01:00
Zaheer Abbas Merali
309eaafb04 mpegtsparse: unref caps on dispose, reset packet size on _reset 2009-09-20 14:12:59 +01:00
Zaheer Abbas Merali
ec100c87c7 mpegtsparse: make sure packetsize is set on caps of buffers 2009-09-20 13:25:53 +01:00
Zaheer Abbas Merali
bdf11016fa mpegtsparse: detect packetsize and don't just assume 188 bytes. 2009-09-20 13:25:34 +01:00
Edward Hervey
314e2dabd5 mpegtsparse: Don't use GstIterator, do change detection ourselves.
Using a GstIterator is slow because we have to create/destroy that
iterator every single time.
We just do the threadsafe cookie check and list iteration ourselves.
2009-09-19 12:49:47 +02:00
Edward Hervey
c224da54e4 mpegtsparse: Avoid type-checking casts in tight loops 2009-09-19 12:45:39 +02:00
Edward Hervey
8b981fba5c mpegtspacketizer: Make next_packet() return an enum.
This avoids calling an extra gst_adapter_available() in a tight loop.
2009-09-19 12:45:39 +02:00
Edward Hervey
bdc513b31e mpegtsparse: More branch prediction macros 2009-09-19 12:45:39 +02:00
Edward Hervey
879e00b969 mpegtspacketizer: Spread branch prediction macros 2009-09-19 12:45:39 +02:00
Edward Hervey
fcc4f8388c mpegtsparse/mpegtspacketizer: Register and use GQuark for structures. 2009-09-19 12:41:34 +02:00
Edward Hervey
d88af539f9 mpegtspacketizer: Initialize debugging in _get_type
There's no need for an extra function since all debuggin will require
a MpegTSPacketizer which means that the GType will be created, therefore
move the debug category initialization there.
2009-09-19 12:41:27 +02:00
Edward Hervey
56b71d6a48 mpegtspacketizer: memset structure instead of individually setting fields to 0 2009-09-19 12:32:21 +02:00
Edward Hervey
69aab98702 mpegtspacketizer: Remove g_return_if_fail
It's overkill for code only used by one element.
2009-09-19 12:32:17 +02:00
Edward Hervey
0ac7e16066 mpegtspacketizer/parse: Don't use gst_structure_to_string() for debugging.
There's GST_PTR_FORMAT for that, and too bad for the systems that don't have
support for that. It just costs too much cpu.
2009-09-19 12:32:10 +02:00
David Schleef
2506c3567c mpegtsdemux: Set DISCONT on buffers 2009-09-17 17:03:40 -07:00
Jan Schmidt
50d08ce732 mpegdemux: Handle base_time when sending segment updates.
Don't send bogus new segment update events when the stream doesn't
start at 0. Fixes broken seeking in some files.

Fixes: #594812
2009-09-15 23:36:24 +01:00
Zaheer Abbas Merali
cb9ff89929 mpegtsdemux, mpegtsparse: max section length is 4093 not 1021. 2009-09-15 14:35:15 +01: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
7fa795a725 mpegpsdemux: in seeking use a factor for SCR interpolation
Fixes seeking on clips where PTS are unalignded with SCR.
2009-09-04 12:56:03 +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
Josep Torra
da95f4a873 mpegpsdemux: added caps for AAC and fixed playback of a clip with LPCM 2009-08-07 18:35:42 +02:00
Josep Torra
3c22fb611b mpegpsdemux: improved demuxer performance
Increased performance doing pull_range in blocks of 32Kb instead of 4Kb.
Caching the value of gst_adapter_available instead of calling it 3 times.
Added some comments with the header descriptions.
Peek enough data to avoid a corner case where could be readed data outside
the buffer.
Speed up some more inlining some functions and keeping another stream pointer
list to be used as iterator.
Sprinkle branch prediction macros accross the code.
Handling the seeking with flush in pull mode in the proper way.
2009-08-07 18:17:28 +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
Stefan Kost
5e6edd7e7b mpegdemux: don't add a base_time==-1 to segment positions
Fixes assertion about newsegment with start=-1.
2009-07-22 00:33:22 +03:00
Sebastian Dröge
95e50d3598 mpegpsdemux: Implement SEEKING query
Fixes bug #588944.
2009-07-21 13:39:21 +02:00
Sebastian Dröge
1f88ceeba8 mpegtsdemux: Implement SEEKING query
Partially fixes bug #588944.
2009-07-21 13:33:58 +02:00
Sebastian Dröge
e3f08983aa mpegtsparse: Free the PMT before setting a new one 2009-07-21 13:18:10 +02:00
Mikael Magnusson
6233d1c950 mpegtsparse: Remove old PES PIDs when receiving PAT tables
Fixes bug #583470.
2009-07-21 13:18:09 +02:00
Matijs van Zuijlen
01200712ea mpegdemux: Fix integer overflow
This breaks playback of files >4 GB as the offset was
a guint before. Changing it to a guint64 fixes this.
2009-07-18 08:44:58 +02:00
Zaheer Merali
3d44d92630 mpegtsparse: add component tag to the video component structure in eit 2009-07-17 09:40:12 +01: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
Josep Torra
6303b0e80d pesfilter: Permit unbounded packets for 0xfd (extended stream id).
Added parsing of PES extension related data.
Fixes some VC1 related issues.
2009-07-16 16:05:41 +02:00
Zaheer Merali
1a6cd35c50 mpegtsparse: add component tag to structure for component message 2009-07-15 18:27:39 +01:00
Sebastian Pölsterl
fc80a08e44 mpegtsdemux: Fix double free
The hash table already makes sure that the stream is correctly
free'd when elements are removed.

Fixes bug #587819.
2009-07-08 15:27:48 +02:00
Miguel Àngel Farré
4266fd443a mpegtsparse: parse component tag 2009-07-08 10:34:02 +01:00
Miguel Àngel Farré
c90fccd986 mpegtsparse: parse carousel identifier descriptor 2009-07-08 10:33:44 +01:00
Zaheer Abbas Merali
66a5549094 mpegtsparse: add parsing of data broadcast descriptors 2009-07-08 10:33:29 +01:00
Zaheer Abbas Merali
2e6de387ac mpegtsparse: fix sdt parsing.
fix parsing of everything for each service from eit schedule flag on and also
add a running-status parameter to the bus message structure.
2009-07-02 15:58:00 +01:00
Edward Hervey
22496517e0 mpegtsdemux: Fix HDV private stream definition/caps. 2009-06-05 20:23:44 +02:00
Jan Schmidt
8eac0482fd mpegdemux: Add a GST_MEMDUMP line in the descriptor parsing
Make it possible to see descriptor contents in the debug output
(GST_DEBUG=mpegtsdesc:9), and remove a stray semi-colon.
2009-06-04 16:29:31 +01: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
b460592917 mpegdemux: Only treat streams from 0xa0 to 0xaf as LPCM, not 0xa0..0xbf
Don't treat some streams (Private Stream 2) as LPCM when they're not. Fixes
playback of files that have private streams in them now that the PES filter
emits such packets.
2009-05-26 21:05:01 +01:00
Jan Schmidt
f7eefea47c mpegdemux: Add sparse stream filling.
First stab at sending new-segment events to effect sparse stream
updates.
2009-05-26 15:31:54 +01:00
Jan Schmidt
e1d778e559 mpegdemux: Add support for outputting sub-picture streams found in files.
Output subpicture streams when they are found on the private stream ID.
Don't strip off the first byte of such packets when pushing.
2009-05-26 15:31:53 +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