Commit graph

142 commits

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