Commit graph

169 commits

Author SHA1 Message Date
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