Commit graph

3223 commits

Author SHA1 Message Date
Wim Taymans 0d70fe30a8 avidemux: small cleanups 2009-09-28 22:16:46 +02:00
Wim Taymans b4a490655a avi: fix read offset and cleanups 2009-09-28 22:16:43 +02:00
Wim Taymans 9c37611dfa avi: rewrite index playback
disable code, start on reimplementing loop based operation.
Rewrite the index handling so that all streams use their own index for decoding
media.
2009-09-28 22:16:41 +02:00
Wim Taymans 89bcbbbe7c avidemux: add new index parsing code
Add a new function and datastructure to parse and hold the index entries on a
per stream base. Also avoid doing too much work trying to figure out the
timestamps and durations as we can trivially do that later.

Less information in the entries makes them 2 times smaller and not doing too
much work makes this code about 12 times faster than the regular case.

Hook in the new function alongside the existing function for comparison until
the rest of the code is updated to handle the new index datastructure.
2009-09-28 22:16:38 +02:00
Mark Nauwelaerts 0fac7b5347 qtdemux: some optional QT specified stsd MPEG-4 atoms also apply to H264
Fixes #596319.
2009-09-25 19:23:15 +02:00
Mark Nauwelaerts e21d16a4f8 qtdemux: only send tag events downstream after newsegment 2009-09-25 16:47:42 +02:00
Mark Nauwelaerts 50d5c8dce5 rtspsrc: if transport protocol unsupported, try another one
Also change error message to more accurately reflect cases in which
it can occur.
2009-09-25 16:47:39 +02:00
Wim Taymans 03f46a42e5 qtdemux: add durations modulo 1<<32
For calculating the durations of each sample, we are supposed to add each
duration modulo 1<<32 so make the elapsed time counter a uint32.

Fixes #595942
2009-09-25 11:54:06 +02:00
Wim Taymans 4e114a2b24 qtdemux: small cleanup 2009-09-24 20:38:54 +02:00
Tim-Philipp Müller 01e00ba1cd qtdemux: don't use core API that doesn't exist yet
There's no gst_byte_reader_has_remaining() yet. Fixes build.
2009-09-24 19:33:39 +01:00
Tim-Philipp Müller fab4113c24 qtdemux: map some atomparser functions to their new bytereader equivalents
Now that GstByteReader has unchecked and inlined variants as well, map
atomparser functions to their respective bytereader equivalents.
2009-09-24 16:34:08 +01:00
Tim-Philipp Müller 0f197776e1 qtdemux: add qt_atom_parser_has_chunks() and fix indentation 2009-09-24 16:32:02 +01:00
Tim-Philipp Müller f65e6ea3a1 qtdemux: bail out instead of trying to alloc silly index sizes
If it looks like we would be allocating a silly size for our sample
index, just bail out instead of trying to allocate it. Helps with
broken or fuzzed files where we might end up trying to malloc a
couple of hundred MBs otherwise.
2009-09-24 16:29:26 +01:00
Tim-Philipp Müller abaf91e428 qtdemux: error out correctly if we don't even have enough bytes for an atom header 2009-09-24 16:29:25 +01:00
Tim-Philipp Müller 25db7df49b qtdemux: init fourcc to 0 as well to avoid invalid reads when printf'ing error message 2009-09-24 16:29:25 +01:00
Tim-Philipp Müller 9da3ed6491 qtdemux: add qt_atom_parse_has_remaining() to avoid overflows with _get_remaining() 2009-09-24 16:28:40 +01:00
Tim-Philipp Müller a16feec38e qtdemux: use GstByteReader when parsing tkhd atom 2009-09-23 16:54:43 +01:00
Tim-Philipp Müller 6b7f4f5e23 qtdemux: use unsigned ints for node length and do more sanity checking of the atom length 2009-09-23 16:54:43 +01:00
Tim-Philipp Müller 3abeb1e578 qtdemux: use GstByteReader for atom dumping and fix a few bugs 2009-09-23 16:54:42 +01:00
Tim-Philipp Müller c8c9b0f35d qtdemux: move stco, stts, stss and stps atom parsing over to GstByteReader
Make sure we don't read beyond the atom boundary. Note that the code
behaves slightly differently in the corner case where there is not
enough atom data for the specified number of samples (n_samples_time)
in the atom, but still enough data to fill the pre-allocated index of
n_samples entries: before we would just stop parsing the stts data
and continue, whereas now we will likely error out. This should not
be a problem in practice though. We could maintain the old behaviour
by doing reads with a size check inside the loop if needed.
2009-09-23 16:54:42 +01:00
Tim-Philipp Müller 4be46b1586 qtdemux: use bytereader to parse stsz and stsc atoms
Use GstByteReader to parse stsz and stsc chunks, and check size of
available data before parsing it, instead of blindly assuming there
will be enough data. Fixes crashes with some fuzzed/broken files.
2009-09-23 16:54:42 +01:00
Tim-Philipp Müller 5875e2016a qtdemux: add qt_atom_parser_get_offset() and optimise _peek_sub() 2009-09-23 16:54:42 +01:00
Tim-Philipp Müller 410ebb7eb3 qtdemux: add QtAtomParser, an inlined GstByteReader variant 2009-09-23 16:54:41 +01:00
Mark Nauwelaerts 02581dd2a5 matroskademux: use proper order for no-more-pads and newsegment and tag sending 2009-09-23 17:24:22 +02:00
Mark Nauwelaerts 702df566c3 matroskademux: sprinkle a few branch prediction macros 2009-09-23 17:24:22 +02:00
Alessandro Decina 195883b30a Fix compile warnings with gcc 4.0.1. 2009-09-22 15:04:36 +02:00
Jan Schmidt 600516be90 matroskamux: Don't get stuck in an infinite loop with Dirac
At the end, Dirac streams have an EOS packet with 0 length.
Don't ever sit in an infinite loop when processing one. Allows
muxing Dirac into mkv to complete successfully.
2009-09-22 11:50:11 +01:00
Tim-Philipp Müller 0506545b04 videomixer: fix up Makefile some more
Remove CFLAGS from LIBADD and make order of the various CFLAGS and
LIBS at least consistent with each other.
2009-09-22 11:02:02 +01:00
Brian Cameron 341be447a6 videomixer: Add $(GST_PLUGINS_BASE_LIBS) to LDFLAGS for linking libgstvideo
Fixes bug #595897.
2009-09-22 08:09:39 +02:00
Wim Taymans 10eb1a0ff4 avi: fix timestamps in push mode 2009-09-21 18:10:12 +02:00
Wim Taymans 2f26ee4285 avi: add some performance measurements
Measure the performance of various index and header parsing steps to the
PERFORMANCE debug category.
2009-09-21 12:32:51 +02:00
Stefan Kost 0868ddf30f avidemux: some logging cleanup to help understanding the index parsing overhead 2009-09-18 14:27:45 +03:00
Olivier Crête 750387f520 rtpg729pay: Fix adapter leak
The adapter would be leaked if it was empty and the data could be pushed out directly.
2009-09-15 17:24:24 -04:00
David Schleef 78eeb6636e multifilesink: Add next-file property
Add a property to allow control over what event causes a file
to finish being written and a new file start.  The default is
the same as before -- each buffer causes a new file to be
written.  Added is a case where buffers are written to the
same file until a discontinuity in the stream.
2009-09-13 20:00:53 -07:00
Michael Smith 3257374310 wavparse: treat a zero-sized data chunk as extending to the end of the file.
This fixes playback of some files that don't have a valid data chunk length,
apparently some program creates these.
2009-09-11 13:34:01 -07:00
Wim Taymans 445236a769 spectrum: add post-messages property
Add a post-messages property and deprecate the less descriptive message
property.
2009-09-11 13:28:35 +02:00
Wim Taymans 1935483fbf multifilesink: rename silent to post-messages
Use the post-messages property name instead of silent as it is more
descriptive.
2009-09-11 13:12:54 +02:00
Wim Taymans f68cd7e708 multifilesink: post messages for each buffer
Add a silent property that can be set to FALSE to post messages on the bus for
each written file.
Do some more cleanups.
Add some docs.

Fixes #594663
2009-09-11 12:17:21 +02:00
Olivier Crête 411c71da13 rtph263pay: Allocate Boundry structs on the stack instead of the heap to avoid leaks
Fixes bug #594691.
2009-09-11 07:31:38 +02:00
Stefan Kost 0a7ef67ad0 docs: fix gtk-doc warnings 2009-09-10 10:28:48 +03:00
Sebastian Dröge a9909c1abf videobox: Fix AYUV->I420 conversion
For this fix the averaging of the chroma values. It should't be (a/2 + b)/2
but just (a + b)/2.

Fixes bug #594599.
2009-09-09 16:28:53 +02:00
Marc-André Lureau fe2d8bdc64 multipartmux: mark data buffer as delta-unit
So that multifdsink always start sending header buffer first

Fixes #594520
2009-09-08 18:34:49 +02:00
Marc Leeman 6b46aeb6a3 rtpbin: add ignore-pt parameter
Add a parameter 'ignore-pt' that disables creating a gstrtpptdemux module and
ghosts the pads of gstrtpjitterbuffer instead of the ones of gstrtpptdemux.

Fixes #594490
2009-09-08 17:38:32 +02:00
Håvard Graff 2912b21d14 rtpbin: propagate payload-type-change signal from demuxer
fixes #594254
2009-09-08 13:59:56 +02:00
Havard Graff a52309eff7 jitterbuffer: change severity of clock-rate change debug
Make log GST_DEBUG under normal circumstances, GST_WARNING otherwise.

Fixes #594253
2009-09-08 13:44:49 +02:00
Håvard Graff 40549278c3 jitterbuffer: avoid throwing reordered buffers with same timestamps
When we receive a reordered packet with the same timestamp as the previous one
(which can happen for fragmented packets) don't consider the packet as lost but
instead wait for the reordered packet to arrive.

Switch the warning-level, so that a reordering does not get a warning, only
an actual produced lost-packet.

Fixes #594251
2009-09-08 13:39:31 +02:00
Havard Graff 6108024838 rtpjpegdepay: add missing math.h include
Fixes #594247
2009-09-08 13:32:51 +02:00
Arnout Vandecappelle 19455200b1 rtspsrc: fix memory leak
In gst_rtspsrc_parse_digest_challenge(), rtspsrc does a g_strndup of the auth
header items and then passes them to gst_rtsp_connection_set_auth_param()
without freeing.

Fixes #594133
2009-09-08 13:30:29 +02:00
Stig Sandnes 8f3299c547 rtpbin: make free_session() remove stream references
When receiving a sync-packet, all sessions with the same cname will be compared
and synced together. In this process, there could still be references to a
session that has been shut down in the meanwhile.

This patch makes sure that these references are removed when shutting down a
session, so that the syncing can be done safely.

Fixes #594283
2009-09-08 13:18:29 +02:00
Havard Graff e08e610db0 rtpbin: use locked state on internal bins
Set the locked state on internal elements to make sure that they don't change
back to another state when shutting down.

Fixes #594248
2009-09-08 12:41:52 +02:00