Commit graph

7947 commits

Author SHA1 Message Date
Luis de Bethencourt
102ae8511a splitmux: fix typo 2015-02-10 14:57:55 +00:00
Luis de Bethencourt
12aa2428e0 splitmux: update example pipeline
Element x264enc doesn't have a max-key-int property
2015-02-10 14:56:23 +00:00
Luis de Bethencourt
0373fd8f65 splitmux: fix memory leak
If execution goes to the beach in line 981, buf_info goes out of scope without
the memory being free'd. Handle this case.

CID #1268403
2015-02-10 13:33:09 +00:00
Tim-Philipp Müller
603c1d71a1 rtspsrc: fix awkward if clause 2015-02-08 12:03:10 +00:00
Jan Schmidt
8ceb58122e splitmux: Add unit test for file splitting
Add a unit test for file splitting, and fix the leaks in the
splitmuxsink it found
2015-02-07 03:58:30 +11:00
Luis de Bethencourt
eb975ce880 wavparse: fix which stop variable is used in assignment
Assignment is done to variable segment.stop when the intention was to assign to
local variable stop. Instead of overwriting it, the value is now clamped and
segment.stop is set to it soon after.

CID #1265773
2015-02-06 14:46:14 +00:00
Jan Schmidt
aa4c29c5d6 splitmux: Fix memory leaks until the test valgrinds clean 2015-02-07 00:19:36 +11:00
Jan Schmidt
ace6be8abb splitmux: Handle early EOS during part preparation
Handle the case where a short file reaches EOS while we're still
waiting for no-more-pads, and make sure we continue to the internal
READY state for real playback to work properly later.
2015-02-06 06:42:17 +11:00
Jan Schmidt
5e2214d309 splitmux: Implement new elements for splitting files at mux level.
Implement 2 new elements - splitmuxsink and splitmuxsrc.

splitmuxsink is a bin which wraps a muxer and takes 1 video stream,
plus audio/subtitle streams, and starts a new file
whenever necessary to avoid overrunning a threshold of either bytes
or time. New files are started at a keyframe, and corresponding audio
and subtitle streams are split at packet boundaries to match
video GOP timestamps.

splitmuxsrc is a corresponding source element which handles
the splitmux:// URL and plays back all component files,
reconstructing the original elementary streams as it goes.
2015-02-06 04:26:59 +11:00
Thiago Santos
a6d73797d0 rtph264depay: prevent trying to get 0 bytes from adapter
This causes an assertion and would lead to getting a NULL instead
of a buffer. Without proper checking this would easily lead to
a segfault

https://bugzilla.gnome.org/show_bug.cgi?id=737199
2015-02-04 21:37:50 -03:00
Jan Schmidt
a3059bec1f qtdemux: Simple implementation of GST_SEGMENT_FLAG_TRICKMODE_KEY_UNITS
When the trickmode key-units flag is set on the segment, simply skip
any sample on a video stream that isn't a keyframe
2015-02-04 21:58:31 +11:00
Wim Taymans
852c040c89 rtspsrc: fix container handling
We detect a container correctly now so we need to revert the weird
check there was before.
Use gst_rtspsrc_stream_push_event() to push the caps event on the
right pad.

See https://bugzilla.gnome.org/show_bug.cgi?id=739391
2015-02-03 17:39:10 +01:00
Thiago Santos
7772a25fdc matroskamux: store and write stream tags
Separate global from stream tags storage and write them to the
appropriate tags entry in the output
2015-02-02 20:07:13 -03:00
Thiago Santos
75dee31b0d qtdemux: parse stream tags
Keep global and stream tags separately and parse the udta node
that can be found under the trak atom. The udta will contain
stream specific tags and will be pushed as such

https://bugzilla.gnome.org/show_bug.cgi?id=692473
2015-02-02 14:05:51 -03:00
Thiago Santos
e52b2cb2cf qtmux: store stream and container tags separately
Tags received via events, when marked as stream tags, will
be stored on that stream's trak atom instead of being stored
in the main tags atom. This allows the resulting file to have
global and stream tags stored.

https://bugzilla.gnome.org/show_bug.cgi?id=692473
2015-01-31 17:23:01 -03:00
Thiago Santos
6321cdedb3 qtmux: refactor tags functions to accomodata UDTA at trak level
Refactor the functions that were bound to the 'moov' atom to
directly pass the desired 'udta' that should receive the tags.
This allows the tags to be written to 'udta' at the 'moov' or
the 'trak' level, creating tags that are for the container or
for a stream only.

https://bugzilla.gnome.org/show_bug.cgi?id=692473
2015-01-31 17:22:57 -03:00
Thiago Santos
f0fde8be88 qtmux: map application name to _swr tag
It refers to the application name and version used to create the
file

https://bugzilla.gnome.org/show_bug.cgi?id=692473
2015-01-31 17:22:44 -03:00
Jan Schmidt
4a77c8a84f matroska: Fix seeking past the end of the file in reverse mode.
Snap to the end of the file when seeking past the end in reverse mode,
and also fix GST_SEEK_TYPE_END and GST_SEEK_TYPE_NONE handling
for the stop position by always seeking on a segment in stream time
2015-01-31 06:15:44 +11:00
Sebastian Dröge
075eb10e65 rtpsession: Fix signal name
This wasn't meant to be pushed at all yet, but now that it's there
already it won't hurt to make it correct at least.
2015-01-30 18:22:31 +01:00
Sebastian Dröge
ec99bbb5e1 rtpstats: Fix typo in documentation 2015-01-30 16:56:35 +01:00
Sebastian Dröge
77511b156e rtpsession: Add new on-receiving-rtcp signal
This will be emitted whenever an RTCP packet is received. Different to
on-feedback-rtcp, this signal gets every complete RTCP packet and not
just the individual feedback packets.
2015-01-30 16:50:36 +01:00
Thiago Santos
9a9d4eccea qtdemux: simplify segment.base math
Remove a fix for heavily edited files added for fixing
https://bugzilla.gnome.org/show_bug.cgi?id=345830 to work
with seeks and proper gaps playback. The fix was replaced
for a more general solution that bases on using previous
segment's duration, just like it works for media segments
playback.

https://bugzilla.gnome.org/show_bug.cgi?id=743518
2015-01-28 15:20:58 -03:00
Luis de Bethencourt
5ff1229754 videomixer: update orc files 2015-01-27 14:00:35 +00:00
Thiago Santos
2586a219f6 qtdemux: Fix data dropping for fragmented streams
For fragmented streams with extra data at the end of the mdat
qtdemux was not dropping those bytes and would try to use
that extra data as the beginning of a new atom, causing the
stream to fail.

https://bugzilla.gnome.org/show_bug.cgi?id=743407
2015-01-27 08:54:19 -03:00
Sebastian Dröge
e4ed852041 rtpsession: Deprecate rtcp-immediate-feedback-threshold property
It had no effect since quite some time and also is not needed in general,
especially not to switch between immediate feedback mode and early feedback
mode. The latest understanding of the RFC is that from the endpoint point of
view, both modes are exactly the same. RTCP is only allowed to use the
bandwidth as given by the RFC constraints, as such it is only ever possible
to schedule a RTCP packet early but it's against the RFC to schedule more RTCP
packets.

The difference between immediate feedback mode and early feedback mode is that
the former guarantees that an RTCP packet can be sent for every event
"immediately", which means that the bandwidth calculations from the RFC have
resulted in an RTCP scheduling interval that is small enough. Early feedback
mode on the other hand means that we can schedule some packets early to make
that happen, but it's not guaranteed at all that it's possible to schedule
an RTCP packet per event (i.e. they need to be accumulated or dropped).
2015-01-26 18:49:31 +01:00
Sebastian Dröge
b07b7736b3 rtpsession: Delay the next regular RTCP packet after early RTCP
This is required to not exceed the short term average RTCP bitrate when
using early feedback as compared to without early feedback.
2015-01-26 18:49:31 +01:00
Sebastian Dröge
bc9111a03d rtpsession: Add new send-rtcp-full signal
This indicates with a boolean return value if scheduling a new RTCP packet
within the requested delay was possible. Otherwise it behaves exactly like
send-rtcp. The only reason for adding a new signal is ABI compatibility.
2015-01-26 18:49:31 +01:00
Luis de Bethencourt
1e15808563 matroskademux: remove unnecessary check
No matter if gst_matroska_read_common_parse_index_cuetrack () returns that the
flow is OK or not, the check there will be a break from the switch. Removing the
check since the outcome is the same.

CID #1265762
2015-01-23 17:35:51 +00:00
Edward Hervey
932b32bb6e matroskamux: Avoid using freed variable
the name variable might have been attributed to pad_name, make sure we
free it only *after* pad_name has been used.

Coverity CID : 1265774
2015-01-23 15:16:25 +01:00
Edward Hervey
8abfd9d720 avimux: Avoid using freed variable
the name variable might have been attributed to pad_name, make sure we
free it only *after* pad_name has been used.

Coverity CID : 1265775
2015-01-23 15:15:07 +01:00
Sebastian Dröge
60e2d0c84f rtpsession: Fix indention 2015-01-22 11:03:25 +01:00
Edward Hervey
7203c4751c qtdemux_dump: Bypass even more code if debugging is disabled
And avoid using variables that won't exist when debugging is disabled
2015-01-21 17:36:26 +01:00
Edward Hervey
906f4c4360 qtdemux: Only traverse/dump nodes if guaranteed to be used
__gst_debug_min is the "global" lowest debug level set. There's no
guarantee the qtdemux debug category is actually set at that level.
2015-01-21 15:32:01 +01:00
Edward Hervey
9fa85f72e1 matroska: Avoid debugging below category threshold
This part alone was what made the matroska thread take a full core
on an android phone ...
2015-01-21 15:26:41 +01:00
Sebastian Dröge
d5aab81a77 Constify some static arrays everywhere 2015-01-21 09:55:53 +01:00
Vincent Penquerc'h
d854cfff9d qtdemux: fix deadlock seeking in files without seek entries
A mutex unlock was missing.

https://bugzilla.gnome.org/show_bug.cgi?id=739975
2015-01-19 17:49:54 +00:00
Vincent Penquerc'h
84c44fceac videomixer: fix illegal memory access in blend function with negative ypos
https://bugzilla.gnome.org/show_bug.cgi?id=741115
2015-01-19 12:34:25 +00:00
Sebastian Dröge
dc2251a664 qtmux: Add support for v210 2015-01-13 19:05:40 +01:00
Sebastian Dröge
b7134435ee qtdemux: v210 is v210, not UYVY and yuv2 is YUY2, not I420
Also add a few other raw video formats we support: v308, v216
and add comments for a few others we don't support yet.

https://developer.apple.com/library/mac/technotes/tn2162/
2015-01-13 19:05:40 +01:00
Thiago Santos
3e0be85840 qtdemux: fix stream time conversion
Use the right macro to convert to the correct scale or the
segment information will be wrong

https://bugzilla.gnome.org/show_bug.cgi?id=742572
2015-01-09 11:40:40 -03:00
Matej Knopp
ff5b235c32 ac3parse: request at least 8 bytes to properly parse header
https://bugzilla.gnome.org/show_bug.cgi?id=742325
2015-01-08 14:45:23 +01:00
Michael Smith
e8f3d596bc wavparse: skip an additional uninteresting chunk type before the fmt chunk. 2015-01-07 16:20:03 -08:00
Luis de Bethencourt
42535107ca audiodynamic: assert func_index is inside bounds
Bringing back the check removed in the previous commit but have that check be a
g_assert. Changing the function to static void since return can never be False,
because audio format will never be unkown.
2015-01-07 18:16:12 +00:00
Luis de Bethencourt
1db92a91de audiodynamic: remove always-true conditional
func_index is set by the sum of three ternary operators which add, 0:4, 0:2,
and 1:0. Minimum value would be 0+0+0=0, and maximum would be 4+2+1=7.
The conditional checking if func_index is >= 0 and < 8 will always be true.
Removing it.

CID 1226442
2015-01-07 17:31:39 +00:00
Sebastian Dröge
87c8c163a8 rtpjitterbuffer: If we get a gap with a buffer without DTS, error out
We (currently?) can't really handle gaps between RTP packets if they're not
properly timestamped. The current code would go into calculations with
GST_CLOCK_TIME_NONE and then cause assertions everywhere. It's probably
better to error out cleanly instead.
2015-01-07 18:05:18 +01:00
Aleix Conchillo Flaqué
07c5d1820a rtspsrc: set PLAYING state after configuring caps
We set to PLAYING after we have configured the caps, otherwise we
might end up calling request_key (with SRTP) while caps are still
being configured, ending in a crash.

https://bugzilla.gnome.org/show_bug.cgi?id=740505
2014-12-31 12:49:11 +00:00
Sebastian Dröge
67d4b85d6a matroskademux: Improve detection of being stuck at the same offset
Only error out if we read from the same position again and got the
same length. Just the same position is not necessarily enough.
2014-12-29 15:35:19 +01:00
Sebastian Dröge
e596a3b6a7 matroskademux: Don't get stuck at the same offset when searching for clusters
This could happen if there is an invalid cluster with size 0, and in that
case just error out instead of looping forever.
2014-12-29 15:02:52 +01:00
Tim-Philipp Müller
aa94fc6beb qtmux: fix ALAC muxing
Actually copy the codec data instead of copying nothing
and then bombing out because there's no data.

Fixes: gst-launch-1.0 audiotestsrc ! avenc_alac ! qtmux ! fakesink

https://bugzilla.gnome.org/show_bug.cgi?id=741783
2014-12-25 21:37:49 +00:00
Tim-Philipp Müller
c62209d050 rtpptdemux: just drop invalid rtp packets instead of erroring out
Apparently linphone sends an invalid RTP packet as very
first packet. We want to ignore that instead of erroring
out (same for any other invalid packets really).

https://bugzilla.gnome.org/show_bug.cgi?id=741398
2014-12-25 15:48:04 +00:00