Commit graph

8378 commits

Author SHA1 Message Date
Thiago Santos
38520a1e12 qtdemux: push data from adapter before starting new segment
The adapter might have data remaining from the previous segment,
push it all before clearing the adapter and starting a new segment.

It can accumulate data if it had pushed and got not-linked, returning
immediately without processing all the data. Before starting a new
segment this data should be handled.
2015-07-08 23:23:53 -03:00
Sebastian Dröge
6e7c724afa rtpjitterbuffer: Calculate DTS from the clock if we had none for the first packet after a reset
https://bugzilla.gnome.org/show_bug.cgi?id=749536
2015-07-08 23:19:52 +03:00
Havard Graff
ddd032f56b rtpjitterbuffer: fix gap-time calculation and remove "late"
The amount of time that is completely expired and not worth waiting for,
is the duration of the packets in the gap (gap * duration) - the
latency (size) of the jitterbuffer (priv->latency_ns). This is the duration
that we make a "multi-lost" packet for.

The "late" concept made some sense in 0.10 as it reflected that a buffer
coming in had not been waited for at all, but had a timestamp that was
outside the jitterbuffer to wait for. With the rewrite of the waiting
(timeout) mechanism in 1.0, this no longer makes any sense, and the
variable no longer reflects anything meaningful (num > 0 is useless,
the duration is what matters)

Fixed up the tests that had been slightly modified in 1.0 to allow faulty
behavior to sneak in, and port some of them to use GstHarness.

https://bugzilla.gnome.org/show_bug.cgi?id=738363
2015-07-08 23:18:48 +03:00
Stian Selnes
40524e5a49 Revert "rtpjitterbuffer: Fix expected_dts calc in calculate_expected"
This reverts commit 05bd708fc5.

The reverted patch is wrong and introduces a regression because there
may still be time to receive some of the packets included in the gap
if they are reordered.
2015-07-08 23:18:48 +03:00
Thiago Santos
ee7ddf6c67 qtdemux: flush samples before adding more from moof
Avoids accumulating all samples from a fragmented stream that could
lead to a 'index-too-big' error once it goes over 50MB of data. It
could reach that before 2h of playback so it doesn't take that long.

As upstream elements are providing data in time format they should
be the ones that have more information about the full media index
and should be able to seek if possible.
2015-07-08 11:53:44 -03:00
Thiago Santos
6ee4b31c0e qtdemux: rename upstream_newsegment to upstream_format_is_time
upstream_newsegment isn't really clear on what it means, it is set
to TRUE when the upstream element sends a segment in TIME format, so
rename it to be more clear about it.

It is important to know this because it means that upstream has
a notion of time and qtdemux is likely being driven by an upstream
element that is reading from a higher level abstraction than a file,
such as a DASH, MSS or DLNA element.
2015-07-08 11:53:44 -03:00
Thiago Santos
5994b30257 qtdemux: fix leak by flushing previous sample info from trak
In fragmented streaming, multiple moov/moof will be parsed and their
previously stored samples array might leak when new values are parsed.
The parse_trak and callees won't free the previously stored values
before parsing the new ones.

In step-by-step, this is what happens:

1) initial moov is parsed, traks as well, streams are created. The
   trak doesn't contain samples because they are in the moof's trun
   boxes. n_samples is set to 0 while parsing the trak and the samples
   array is still NULL.
2) moofs are parsed, and their trun boxes will increase n_samples and
   create/extend the samples array
3) At some point a new moov might be sent (bitrate switching, for example)
   and parsing the trak will overwrite n_samples with the values from
   this trak. If the n_samples is set to 0 qtdemux will assume that
   the samples array is NULL and will leak it when a new one is
   created for the subsequent moofs.

This patch makes qtdemux properly free previous sample data before
creating new ones and adds an assert to catch future occurrences of
this issue when the code changes.
2015-07-08 11:53:44 -03:00
Thiago Santos
63f35eeb12 qtdemux: fix index size check and debug message
It is allocating samples_count + n_samples, not only n_samples
2015-07-08 11:53:44 -03:00
Sebastian Dröge
4e23481d9f rtpjitterbuffer: Calculate receive time if we don't have any
This is required to properly schedule packet loss timers and make
sure all our calculations work properly.

https://bugzilla.gnome.org/show_bug.cgi?id=749536
2015-07-08 17:02:05 +03:00
Sebastian Dröge
243730ced4 rtpjitterbuffer: Handle seqnum gaps in TCP streams without erroring out or overflowing calculations
That is, handle DTS==GST_CLOCK_TIME_NONE correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=749536
2015-07-08 15:15:00 +03:00
Vineeth T M
5439fc9a0c avidemux: fix event leak
when seek fails in avidemux, event is not being freed.

https://bugzilla.gnome.org/show_bug.cgi?id=752117
2015-07-08 12:57:43 +01:00
Stian Selnes
8a0dbff3f4 rtph263depay: Make sure payload is large enough
Plus new unit test.

https://bugzilla.gnome.org/show_bug.cgi?id=752112
2015-07-08 11:36:55 +01:00
Vineeth TM
ffe9cbc1f6 rtpklvdepay: fix printf format compiler warning
v_len is of type guint64, but while print the value(16 + len_size + v_len)
G_GSIZE_FORMAT is being used instead of G_GUINT64_FORMAT

https://bugzilla.gnome.org/show_bug.cgi?id=752100
2015-07-08 08:49:37 +01:00
Tim-Philipp Müller
b105e1e3d1 rtpklvdepay: improve start detection and handle fragmented KLV units 2015-07-07 20:11:27 +01:00
Tim-Philipp Müller
740f10bae9 rtp: add SMPTE 336M KLV metadata depayloader
http://tools.ietf.org/html/rfc6597
2015-07-07 20:11:27 +01:00
Tim-Philipp Müller
7db7da1acb rtp: add SMPTE 336M KLV metadata payloader
http://tools.ietf.org/html/rfc6597
2015-07-07 20:11:23 +01:00
Stefan Sauer
12930c2f8c docs: fix "Symbol name not found at the start of the comment block"
Add symbols or change comment into a regular comment.
2015-07-07 17:12:02 +02:00
Stefan Sauer
093e8f8a75 docs: remove outdated doc strings 2015-07-07 17:12:02 +02:00
Luis de Bethencourt
55175561f6 Revert "imagefreeze: Remove impossible error condition"
This reverts commit d46631c5c7.

pad only handle EOS events but not EOS flow, and will push the buffer again
resulting in an assertion error. So we should not handle the buffer
and return EOS flow.
2015-07-07 15:57:19 +01:00
Tim-Philipp Müller
f0c6b728f8 rtpg729depay: unmap rtp buffer in error path 2015-07-07 15:50:50 +01:00
Tim-Philipp Müller
f07d61a9ef rtpg729pay: fix buffer leak
The handle_buffer vfunc takes ownership of the input buffer.
Fixes elements/rtp-payloading under valgrind.
2015-07-07 15:50:37 +01:00
Tobias Mueller
6faeb75170 goom: Initialised variables to remove compiler warnings
goom_core.c: In function 'goom_update':
goom_core.c:685:5: error: 'param2' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     goom_lines_switch_to (goomInfo->gmline2, mode, param2, amplitude, couleur);
     ^
goom_core.c:684:5: error: 'param1' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     goom_lines_switch_to (goomInfo->gmline1, mode, param1, amplitude, couleur);
     ^

https://bugzilla.gnome.org/show_bug.cgi?id=752053
2015-07-07 13:18:49 +03:00
Tim-Philipp Müller
19e7f188fa rtph261pay: fix indentation 2015-07-07 09:18:39 +01:00
Jimmy Ohn
2f016f3f9d rtph261pay: Fix uninitialized variable compiler error
endpos variable does not correctly understand in the
4.6.3 GCC version. So compile error appears when we do
compile rtph261pay using jhbuild.
This patch is fixed the compile error in 4.6.3 GCC version.

https://bugzilla.gnome.org/show_bug.cgi?id=751985
2015-07-07 09:18:06 +01:00
Jan Alexander Steffens (heftig)
439f98ed9a flvdemux: Handle seek flags properly
Allows for non-keyframe seeks.

https://bugzilla.gnome.org/show_bug.cgi?id=738570
2015-07-06 10:30:42 -04:00
Thiago Santos
f40c1f8b09 qtdemux: avoid looping reading the 'moof' atom forever
It gets stuck if it only finds a moof and no mfra/mfro or moov
atoms. Skip the moof to continue the parsing to have it either
play or error out.

https://bugzilla.gnome.org/show_bug.cgi?id=745089
2015-07-06 11:00:20 -03:00
Stian Selnes
a675e18935 rtph263pdepay: init debug category
https://bugzilla.gnome.org/show_bug.cgi?id=752012
2015-07-06 13:35:04 +03:00
Stian Selnes
d91ef9dcbf rtpv8depay: ignore reserved bit in payload descriptor
Draft 16 of "RTP Payload Format for VP8" states in section 4.2 that:

R: Bit reserved for future use.  MUST be set to zero and MUST be
   ignored by the receiver.

https://bugzilla.gnome.org/show_bug.cgi?id=751929
2015-07-06 12:03:51 +03:00
Stian Selnes
f682772898 rtph261pay: rtph261depay: Add documentation
https://bugzilla.gnome.org/show_bug.cgi?id=751982
2015-07-05 16:09:02 +01:00
Sebastian Dröge
ab77906a37 rtph261pay: Fix compiler warning
gstrtph261pay.c: In function 'gst_rtp_h261_pay_class_init':
gstrtph261pay.c:1003:17: error: variable 'gobject_class' set but not used [-Werror=unused-but-set-variable]
   GObjectClass *gobject_class;
2015-07-03 14:29:16 +02:00
Sebastian Dröge
e0204938a8 rtph261depay: Let the base class push the buffer so it can deal with the flow return 2015-07-03 14:15:31 +02:00
Sebastian Dröge
b653fae8c9 rtph261pay: Remove unused adapter 2015-07-03 14:15:29 +02:00
Sebastian Dröge
90d47bff9e speexpay: Directly attach payload to the output buffer instead of copying it 2015-07-03 14:00:04 +02:00
Sebastian Dröge
6675e33109 sbcpay: Attach payload directly to the output instead of copying 2015-07-03 14:00:04 +02:00
Stian Selnes
ef8d630a59 rtp: add H.261 RTP payloader and depayloader
Implementation according to RFC 4587.

Payloader create fragments on MB boundaries in order to match MTU size
the best it can. Some decoders/depayloaders in the wild are very strict
about receiving a continuous bit-stream (e.g. no no-op bits between
frames), so the payloader will shift the compressed bit-stream of a
frame to align with the last significant bit of the previous frame.

Depayloader does not try to be fancy in case of packet loss. It simply
drops all packets for a frame if there is a loss, keeping it simple.

https://bugzilla.gnome.org/show_bug.cgi?id=751886
2015-07-03 11:48:41 +01:00
Sebastian Dröge
9dfae82566 rtpmpvdepay: Don't forget to unmap the input buffer 2015-07-03 12:19:05 +02:00
Sebastian Dröge
7e1d28d27f rtpmpvpay: Create buffer lists instead of pushing each buffer individually 2015-07-03 12:15:10 +02:00
Sebastian Dröge
f67bafb90d rtpmpapay: Use buffer lists instead of pushing each fragment individually 2015-07-03 12:04:18 +02:00
Sebastian Dröge
002bba37f7 rtpmp4apay: Create buffer lists and don't copy payload memory 2015-07-03 12:00:26 +02:00
Miguel París Díaz
5ae672fd22 rtpjitterbuffer: Consider timers len to compare with RTP_MAX_DROPOUT
When there are a lot of small gaps, we can consider that there is
a big gap (too losses) to reset the buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=751636
2015-07-02 18:38:46 +02:00
Sebastian Dröge
3df0cce65d rtpjitterbuffer: If possible, always update the current time before looping over all timers
If we have a clock, update "now" now with the very latest running time we have.
If timers are unscheduled below we otherwise wouldn't update now (it's only updated
when timers expire), and also for the very first loop iteration now would otherwise
always be 0.

Also the time is used for the timeout functions, e.g. to calculate any times
for the next timeouts and we would otherwise pass too old times there.

https://bugzilla.gnome.org/show_bug.cgi?id=751636
2015-07-02 16:45:59 +02:00
Sebastian Dröge
6a59cc4b76 rtph263ppay: Generate buffer lists and attach the payload directly instead of copying it 2015-07-02 12:26:03 +02:00
Sebastian Dröge
9ceb15bcf8 rtph263pdepay: Simplify code a bit and do less direct memcpy and let GstBuffer do that for us 2015-07-02 09:49:44 +02:00
Sebastian Dröge
8b0d11a0ee rtph263pay: Stop using an adapter and directly use the buffer
We always pushed one buffer into the adapter, then handled exactly that one
buffer and flushed it from the adapter. Now also don't memcpy() the actual
payload but just attach the input buffer's data to the output buffer.

This code still needs some serious refactoring/rewriting.
2015-07-02 09:26:27 +02:00
Sebastian Dröge
51cd22c912 rtpgsmpay: Remove non-existing includes for now
git add -p mistake.
2015-07-01 21:57:28 +02:00
Sebastian Dröge
ef5e14989b rtpgstpay: Use the return value of gst_buffer_append() 2015-07-01 21:39:25 +02:00
Sebastian Dröge
137672ff18 rtpgsmpay: Attach payload to the output buffer instead of copying it 2015-07-01 21:39:25 +02:00
Sebastian Dröge
cb0232ba4e rtpg729pay: Attach payload directly to output buffers instead of copying 2015-07-01 21:39:25 +02:00
Sebastian Dröge
0a71dbc80c rtpg723pay: Attach payload buffer to the output instead of copying 2015-07-01 21:39:25 +02:00
Sebastian Dröge
8aca30799a rtpdvdepay: Map the output buffer once instead of once every 80 bytes 2015-07-01 21:39:25 +02:00
Jimmy Ohn
4f4605f481 avidemux: fix return type of index_entry_offset_search()
It's a compare function and may return a negative value,
so should for correctness and consistency return a signed
integer.

https://bugzilla.gnome.org/show_bug.cgi?id=751780
2015-07-01 19:18:11 +01:00
Miguel París Díaz
2176f31174 rtpjitterbuffer: refactor handle_next_buffer
The goal of this patch is making handle_next_buffer function
more readable avoiding unnecesary gotos and adding other
cosmetic changes.
2015-07-01 16:06:40 +02:00
Sebastian Dröge
3af36ed8fe rtpac3pay: Attach the payload to the output buffer instead of copying it
Might also want to produce buffer lists here if needed.
2015-07-01 15:46:07 +02:00
Sebastian Dröge
adf2d8459f rtp: Fix indention 2015-07-01 15:46:06 +02:00
Sebastian Dröge
978903cd87 rtph264pay: Use GST_WARNING_OBJECT() instead of GST_WARNING() 2015-07-01 11:58:26 +02:00
Sebastian Dröge
ceaf90f027 vp8depay: Don't lock/map every non-keyframe buffer twice
Just copy the complete header instead of first looking at the first byte
and then at the remaining 10 bytes.
2015-06-30 14:07:28 +02:00
Sebastian Dröge
de5cd0995b Revert "rtpjitterbuffer: If we have an immediate timeout, don't try to find an earlier timeout"
This reverts commit 0c21cd7177.

If we have multiple immediate timers, we want to first handle the one with the
lowest sequence number... which would be broken now.

Instead of this we should just use a GSequence for the timers, and have them
sorted first by timestamp, and for equal timestamps by sequence number. Then
we would always only have to take the very first timer from the list and never
have to look at any others.
2015-06-29 10:36:58 +02:00
Sebastian Dröge
0c21cd7177 rtpjitterbuffer: If we have an immediate timeout, don't try to find an earlier timeout
If we have lots of such immediate timeouts, we would otherwise have quadratic
runtime in the number of timeouts.
2015-06-29 10:14:05 +02:00
Thiago Santos
121fcbf7da splitmuxsrc: sticky events are sent automatically from the pad
No need to send them explicitly from the element

https://bugzilla.gnome.org/show_bug.cgi?id=751240
2015-06-25 17:13:43 -03:00
Thiago Santos
af6a09ae4c splitmuxsrc: make sure to push sticky events before adding pad
It allows the caps to be set on the pad before being added for
dynamic autoplugging to work.

https://bugzilla.gnome.org/show_bug.cgi?id=751240
2015-06-25 17:13:43 -03:00
Hyunjun Ko
f560a3d223 rtspsrc: Add new ntp-time-source property and deprecate use-pipeline-clock property
Enable to use new ntp-time-source property of rtpbin

https://bugzilla.gnome.org/show_bug.cgi?id=751496
2015-06-25 17:16:49 +02:00
Hyunjun Ko
a1bff413a1 rtpbin/session: fix description
https://bugzilla.gnome.org/show_bug.cgi?id=751496
2015-06-25 16:31:51 +02:00
Luis de Bethencourt
063f553275 docs: decodebin2 -> decodebin 2015-06-25 10:57:29 +01:00
Luis de Bethencourt
34caf9d7c5 deinterlace: update example pipeline
Update reference to decodebin2 to decodebin
2015-06-25 10:47:40 +01:00
Luis de Bethencourt
72f63c58ad deinterlace: remove dead assignments
Values in fields_required and same_buffer are overwritten before used. Removing
assignment
2015-06-25 10:46:43 +01:00
Gilbok Lee
0dcd76447a qtdemux: does not detect orientation
Most files don't contain the values for transposing the coordinates
back to the positive quadrant so qtdemux was ignoring the rotation
tag. To be able to properly handle those files qtdemux will also ignore
the transposing values to only detect the rotation using the values
abde from the transformation matrix:

[a b c]
[d e f]
[g h i]

https://bugzilla.gnome.org/show_bug.cgi?id=738681
2015-06-25 00:24:21 -03:00
Nicolas Dufresne
2359ee29e8 qtmux: Correctly calculate the elst media start
The media start has nothing to do with the shift we have applied
but with the value of the first PTS. This is defined as:

  Dt(0) = 0
  Ct(0) = Dt(0) + CTTS(0)

So the media start is always the first CTTS.

https://bugzilla.gnome.org/show_bug.cgi?id=751361
2015-06-23 22:34:36 -04:00
Thiago Santos
eceb2ccc73 qtdemux: accumulate previous edts entries into segment.base
Allows playing edts editted files with proper synchronization of
streams. This patch fixes the regression introduced by
bf95f93c01 that was added to fix
segment seeks handling.

Having the accumulated_base separated from the main segment.base
allows handling both segment seeks and edts editted files.

https://bugzilla.gnome.org/show_bug.cgi?id=751361
2015-06-23 22:34:36 -04:00
Thiago Santos
aef61c2251 qtdemux: improve some debug messages
Those messages are about the stream, use the pad as the
debug object to make it clear from the logs

https://bugzilla.gnome.org/show_bug.cgi?id=751361
2015-06-23 22:34:35 -04:00
Thiago Santos
1ec9a86e72 qtmux: store last_dts of the first buffer
Buffers need not to start at running-time 0 so the last_dts needs
to be the value of the first buffer's dts as it is used to compute
the duration of the buffers. If it was left at 0 the first buffer
would have a larger duration when it shouldn't

https://bugzilla.gnome.org/show_bug.cgi?id=751361
2015-06-23 22:34:35 -04:00
Vineeth TM
e44ce40455 flacparse: fix possible memory leak
when buffer is stored to seektable, and stop gets called due to
corrupt flac file, then the seektable is not being released

https://bugzilla.gnome.org/show_bug.cgi?id=751364
2015-06-23 10:17:53 +02:00
Jan Schmidt
b26bbae695 Revert "splitmuxsink: Mask async-start/done while switching files."
This reverts commit d61e5393f1.

Causes failures muxing larger GOP sizes for some reason. Reverting
while I figure it out
2015-06-23 17:33:03 +10:00
Jan Schmidt
600bab0056 splitmuxsrc: Fix startup and shutdown races.
Fix 2 startup races when things happen too quickly, and 1
at shutdown by holding a ref to the pads in use until the
loop functions exit.

Handle errors activating file parts and publish them on
the bus.

https://bugzilla.gnome.org/show_bug.cgi?id=750747
2015-06-23 12:03:14 +10:00
Jan Schmidt
d61e5393f1 splitmuxsink: Mask async-start/done while switching files.
Sometimes, extra async-start/done from the internal sink
while the element is still starting up can cause splitmuxsink
to stall in PAUSED state when it has been set to PLAYING
by the app. Drop the child's async-start/done messages while
switching, so they don't cause state changes at the
splitmuxsink level.

https://bugzilla.gnome.org/show_bug.cgi?id=750747
2015-06-23 12:03:14 +10:00
Jan Schmidt
e5db2673bd matroska-demux: Use gst_video_multiview_guess_half_aspect()
Use the gst_video_multiview_guess_half_aspect() utility function
to set the half-aspect flag (or not) on stereoscopic frame-packed
videos.
2015-06-23 11:58:41 +10:00
Jan Schmidt
b7cbfe1fa1 qtdemux: Move multiview caps calculations, add half-aspect heuristics
Move the multiview caps calculations to the configure_stream()
function, so the rest of the video info is available, and
use the gst_video_multiview_guess_half_aspect() function to
determine if the half-aspect flag should be set on frame-packed
video.
2015-06-23 11:58:41 +10:00
Nicolas Dufresne
dd72267a8d qtdemux: Add cslg support
The cslg atom provide information about the DTS shift. This is
needed in recent version of ctts atom where the offset can be
negative. When cslg is missing, we parse the CTTS table as proposed
in the spec to calculate these values.

In this implementation, we only need to know the shift. As GStreamer
cannot transport negative timestamps, we shift the timestamps forward
using that value and adapt the segment to compensate. This patch also
removes bogus offset of ctts_soffset, this offset shall be included
in the edit list.

https://bugzilla.gnome.org/show_bug.cgi?id=751103
2015-06-22 17:51:49 -04:00
Nicolas Dufresne
7b8615d4fc qtmux: Use PTS to figure-out presence of gaps
We need to look at the presentation timestamp in order to conclude if
there is a gap at the start of a stream.

https://bugzilla.gnome.org/show_bug.cgi?id=751242
2015-06-22 17:45:30 -04:00
Nicolas Dufresne
feda525591 qtmux: Set edit list to compensate DTS shift
We shift DTS forward to avoid negative timestamps which cannot be
represented with version 0 of the CTTS table. To stick with that
version (backward compatibility), the spec recommend using an
edit list entry to move back the presentation time to where it
should be.

https://bugzilla.gnome.org/show_bug.cgi?id=751242
2015-06-22 17:45:30 -04:00
Nicolas Dufresne
bbea34bb6e flvmux: Insert AVC end of sequence
This FLV specific mark is needed to prevent Flow Player (most likely
all Flash base player) from going into buffering state when near EOS.

https://bugzilla.gnome.org/show_bug.cgi?id=751320
2015-06-22 17:24:16 -04:00
Vineeth TM
9a1ed36b7a matroska: remove useless check
No need to check for context availability while freeing. We are inside
inside a code block with a condition that dereferences context.
if (context->type == 0 ...

https://bugzilla.gnome.org/show_bug.cgi?id=751306
2015-06-22 12:26:23 +01:00
Vineeth T M
e97df1e097 lzo: fix memory leak
the opened file is not being closed during test, which will result
in memory leak.

https://bugzilla.gnome.org/show_bug.cgi?id=751306
2015-06-22 12:22:06 +01:00
Sangkyu Park
2663388000 rtpjitterbuffer: Minor clean-up
1. Fix the code which is wrong coding style.
2. Fix a typing error of comment.

https://bugzilla.gnome.org/show_bug.cgi?id=751316
2015-06-22 13:08:12 +02:00
Jose Antonio Santos Cadenas
11f298a338 rtpsource: Do not try to push NULL buffers
If update_receiver_stats() fails, we can't really do anything with this buffer
anymore and have to drop it. This happens if there's a big seqnum
discontinuity for example.

https://bugzilla.gnome.org/show_bug.cgi?id=751311
2015-06-22 12:26:59 +02:00
Vineeth TM
636d47d2d6 flvdemux: trivial cleanup
trivial patch to add proper ( while checking for if(G_UNLIKELY())

https://bugzilla.gnome.org/show_bug.cgi?id=751306
2015-06-22 11:13:32 +01:00
Vineeth TM
78fcd03ca3 dcaparse: initialize size variable
size can be used in cleanup without being initialized. Hence
setting it to 0 when declaring

https://bugzilla.gnome.org/show_bug.cgi?id=751306
2015-06-22 10:58:35 +01:00
Vineeth TM
331fca4dfb mpegaudioparse: initialze bpf variable
bpf variable might be used in cleanup without being intialized.

https://bugzilla.gnome.org/show_bug.cgi?id=751306
2015-06-22 10:57:35 +01:00
Miguel París Díaz
40957a9212 rtprtxqueue: reverse pending list before pushing buffers
With this we send the RTX buffers in the same order
that they were requested.

https://bugzilla.gnome.org/show_bug.cgi?id=751297
2015-06-22 11:36:22 +02:00
Nicolas Dufresne
212f39ee1d flvmux: Fix DTS validity check
This check was up-side-down, causing a bad timestamp at start
and then all timestamp being delayed.

https://bugzilla.gnome.org/show_bug.cgi?id=751298
2015-06-21 19:23:22 -04:00
Nicolas Dufresne
d6e1e744a7 cslg: Add Composition Shift Least Greatest Atom
This simply add fourcc and dump function for the cslg Atom.

https://bugzilla.gnome.org/show_bug.cgi?id=751103
2015-06-17 15:21:16 -04:00
Nicolas Dufresne
8a406c9c38 ctts_dump: Fix signess issues
It didn't bug, but use correct signess in traces. The number of
entries is unsigned while the offset can be signed according to
recent spec.

https://bugzilla.gnome.org/show_bug.cgi?id=751103
2015-06-17 15:21:16 -04:00
Sebastian Dröge
e9902430da rtpjitterbuffer: gst_rtp_buffer_ext_timestamp() modifies its first argument, keep a copy around 2015-06-16 11:43:39 +02:00
Sebastian Dröge
62a7bcb395 rtpjitterbuffer: Compare ext RTP times, not plain RTP time and ext RTP time when calculating elapsed time
Otherwise all RTP times after a wraparound would be considered as going
backwards, they will always be smaller than the ext RTP time.
2015-06-16 10:31:47 +02:00
Sebastian Dröge
f4e01b13ee rtpbin: The default rtp-profile should be AVP, not AVPF 2015-06-15 19:25:12 +02:00
Sangkyu Park
6696bd62ef rtpjitterbuffer: Minor cleanup
1. Add Null check in 'free_item' function.
2. Fix a typing error of comment.

https://bugzilla.gnome.org/show_bug.cgi?id=750965
2015-06-15 11:55:57 +02:00
Nicolas Dufresne
717265ebfb flmux: Make sure best_time is initialized 2015-06-12 17:45:23 -04:00
Sebastian Dröge
dc513eb949 rtpbin/session: Add new ntp-time-source property and deprecate use-pipeline-clock property
The new property allows to select the time source that should be used for the
NTP time in RTCP packets. By default it will continue to calculate the NTP
timestamp (1900 epoch) based on the realtime clock. Alternatively it can use
the UNIX timestamp (1970 epoch), the pipeline's running time or the pipeline's
clock time. The latter is especially useful for synchronizing multiple
receivers if all of them share the same clock.

If use-pipeline-clock is set to TRUE, it will override the ntp-time-source
setting and continue to use the running time plus 70 years. This is only kept
for backwards compatibility.
2015-06-12 23:35:42 +02:00
Nicolas Dufresne
135e516730 qtdemux: Adjust segment according to ctts offset
In presence of a CTTS, the segment start/stop must be offset so
the segment start/stop include the PTS. This is needed since the
PTS cannot be negative in this format. This fixes issues where the
running time of the first buffer isn't at the start.

https://bugzilla.gnome.org/show_bug.cgi?id=740575
2015-06-12 17:18:24 -04:00
Nicolas Dufresne
12181efddc qtmux: Handle DTS with negative running time
As QT works with duration, simply bring back first DTS to 0 and shift
forward the PTS of the same amount.

https://bugzilla.gnome.org/show_bug.cgi?id=740575
2015-06-12 17:18:24 -04:00
Nicolas Dufresne
2274ca7d07 flvmux: Add negative runtime DTS support
This is done by using new feature of the CollectPad clip function
which sets the DTS as a gint64 in the collected data. It also simplify
the code a bit.

https://bugzilla.gnome.org/show_bug.cgi?id=740575
2015-06-12 17:18:24 -04:00
Sebastian Dröge
37e3ca1447 rtpbin: Rename some variables and debug output to make more sense
Local and remote were mixed up in a few places, and the time we store here is
not UNIX time (1970 epoch), but NTP time (1900 epoch) in nanoseconds.
2015-06-12 23:07:27 +02:00
Jan Schmidt
0c46c5c3e2 matroska-demux: Actually set detected 3D info into output caps.
Use the information read from the StereoMode info
to configure multiview-mode and multiview-flags in the
video caps.
2015-06-12 01:57:36 +10:00
Jan Schmidt
3f39d06338 splitmuxsink: Take released-but-not-yet-output bytes into account
When deciding whether it's time to switch to a new file, take into
account data that's been released for pushing, but hasn't yet
been pushed - because downstream is slow or the threads haven't been
scheduled.

Fixes a race in the unit test and probably in practice - sometimes
failing to switch when it should for an extra GOP or two.

Also fix a problem in splitmuxsrc where playback sometimes
stalls at startup if types are found too quickly.

https://bugzilla.gnome.org/show_bug.cgi?id=750747
2015-06-12 01:57:36 +10:00
Thiago Santos
03f1a2ea67 atoms: remove custom gst_buffer_new function in favor of core version
Remove a custom specialized version of gst_buffer_new_wrapped by
using gst_buffer_new_wrapped_full inside a macro to simplify
parameters and give it a more meaningful name.
It is only used to create temporary buffers to have its data copied.
2015-06-11 01:11:31 -03:00
Thiago Santos
1596972674 atoms: simplify free form data atoms creation
Avoid creating an intermediary buffer or memory area just
to copy into an atom's data area.
2015-06-11 01:11:31 -03:00
Thiago Santos
ab18f5035c qtmux: add AC-3 muxing support
Adds AC-3 muxing support. It is defined for mp4 and 3gp formats.

One extra feature that was added was the ability to add extension
atoms after set_caps as the AC-3 extension atom needs some data
that has to be extracted from the stream itself and is not
present on caps.
2015-06-11 01:11:31 -03:00
Thiago Santos
674e0cc2df qtmux: remove unused type MP4S 2015-06-11 01:11:31 -03:00
Thiago Santos
f83fd7a88f qtmux: remove duplicate attribute value set
It is also set a few lines below
2015-06-11 01:11:18 -03:00
Jan Schmidt
ec5bc9dccb matroska: Implement basic stereoscopic video support
Implement support for the packed video formats WebM
uses, not all the values that Matroska might use.

In practice, it's really hard to find any samples in the
wild of any.

Supported in both the muxer and demuxer.
2015-06-11 12:11:42 +10:00
Jan Schmidt
fff76157d8 qtdemux: Add basic support for MPEG-A stereoscopic video
The MPEG-A format provides an extension to the ISO base media
file format to store stereoscopic content encoded with different
codecs like H.264 and MPEG-4:2. The stereo video media information(svmi)
atom declares the presence and storage method for the video.

Stereo video information for MPEG-A can also be supplied through
the 'stvi' atom (ref: ISO/IEC_14496-12, ISO/IEC_23000-11), which
is not implemented in this patch.

Also missing is support for stereo video encoded as separate video tracks
for now.

Based on a patch by Sreerenj Balachandran <sreerenj.balachandran@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=611157
2015-06-11 12:11:42 +10:00
Sebastian Dröge
dc059efa60 rtp: Use GST_BUFFER_PTS() instead of GST_BUFFER_TIMESTAMP()
The mix between all these in the RTP code is confusing, let's try to be
consistent.
2015-06-10 14:34:47 +02:00
Ilya Konstantinov
c7e168ec70 rtpmanager: clarify negative lost packets in stats
Also:
- Move notes on units before field documentation.
- Unify documentation style.

https://bugzilla.gnome.org/show_bug.cgi?id=750653
2015-06-10 14:10:52 +02:00
Vineeth TM
720ff75c72 qtdemux: fix reverse playback
When performing seek, segment->start is being updated with desired_offset,
but in case of reverse playback segment->start should be 0 and
segment->stop should be updated with desired offset.

https://bugzilla.gnome.org/show_bug.cgi?id=750675
2015-06-10 10:41:13 +02:00
Xavier Claessens
b0b3e8e2cc rtspsrc: Add a GTlsInteraction property
It can be used for TLS client authentication.

https://bugzilla.gnome.org/show_bug.cgi?id=750471
2015-06-09 20:03:18 -04:00
Ilya Konstantinov
0a578c235a rtpmanager: document units of stats and arguments
Also, minor spelling and style corrections.

https://bugzilla.gnome.org/show_bug.cgi?id=750653
2015-06-09 18:21:59 +02:00
Luis de Bethencourt
e56ef6bcf0 goom: possible uninitialized variables warning
Build fails with the latest snapshot of gcc-4.9 because param1 and param2 might
possibly be used uninitialized. They are set depending on the cases of a switch
statement and the compiler sees this as not a complete guarantee.
Set them to 0 if the switch statement falls down to the default case.

https://bugzilla.gnome.org/show_bug.cgi?id=750566#c6
2015-06-08 23:06:39 +01:00
Chris Clayton
e29f231e5d rtpvp8depay: potential access beyond end of array
Compiling (with gcc-4.9-20150603) produces an error because of an access beyond
the end of an array. This patch fixes the error by initializing the loop
control/array index variable (i) to 1 and returning i - 1 when a match is found.
Also, because the values stored in the array increase in value as the index
increases, the >= test unnecessary, so it is removed.
2015-06-08 20:16:20 +01:00
Jan Schmidt
d78502deb1 splitmuxsink: Don't accumulate more than 2 GOPs
Don't allow large amounts of data to queue up - we only need
the GOP we're writing, and the GOP we're accumulating.
2015-06-08 18:58:43 +10:00
Jan Schmidt
23d610140d isomp4: fsync after sending updates in robust mode
Use the new GstBuffer SYNC_AFTER flag to trigger an fsync
after updating the moov or mdat atom, and after updating the free
atom to make it visible.
2015-06-08 14:49:11 +10:00
Jan Schmidt
3e17cd8acb isomp4: Only set moov header into streamheader at EOS
Only update the moov header into the caps if it's the finalised
moov at EOS time. Avoids posting a bogus moov at startup and
repeated updates in robust-recording mode
2015-06-08 14:49:11 +10:00
Jan Schmidt
1d058c7d8a isomp4: Implement robust muxing using ping-pong strategy
Implement a robust recording mode, where the output
file is always in a playable state, seeking and rewriting
the moov header at a configurable interval. Rewriting
moov is done using reserved space at the start of
the file, and a ping-pong strategy where the moov
is replaced atomically so it's never invalid.

Track when tags have actually changed, and don't write them into
the moov unless they've changed. Clear any existing tags when
re-writing them, so we can do progressive moov updating in robust
recording mode.

Write placeholder mdat as a free atom plus a 32-bit mdat
with '0' size, which means "rest of the file" in the spec.

Re-write it later to a full 64-bit extended size atom if needed.
2015-06-08 14:49:11 +10:00
Jan Schmidt
3d7b343525 isomp4: Update edit list when re-writing moov
Correctly update any edit lists each time the moov is recalculated,
updating existing table entries if they already exist instead of just
adding new ones.
2015-06-08 14:16:36 +10:00
Jan Schmidt
0c1bcc629d isomp4: Remove an extra bracket in a comment. 2015-06-08 14:16:36 +10:00
Jan Schmidt
94e113c6c6 splitmuxsrc: Protect total_duration state variable with the object lock.
Prevent deadlocks from downstream querying duration from the streaming thread.
2015-06-08 14:16:36 +10:00
Luis de Bethencourt
0b8c7ab797 goom: clean dereferences of private structure
https://bugzilla.gnome.org/show_bug.cgi?id=742875
2015-06-07 19:24:20 +01:00
Luis de Bethencourt
fce8e5fb26 goom2k1: clean dereferences of private structure
https://bugzilla.gnome.org/show_bug.cgi?id=742875
2015-06-07 19:20:49 +01:00
Sebastian Dröge
a7faa3e0a2 Release 1.5.1 2015-06-07 10:46:34 +02:00
Sebastian Dröge
b549ebd066 rtpsession: Override the SSRC from the packets' SSRC if none was given via caps or property 2015-06-07 10:33:27 +02:00
Sebastian Dröge
d650a310da rtpsession: Only suggest our internal ssrc if it's not a random one and was selected as internal ssrc
https://bugzilla.gnome.org/show_bug.cgi?id=749581
2015-06-05 16:45:54 +02:00
Vineeth TM
0e5631c5c0 interleave: error when channel-positions-from-input=False
self->channels is being incremented only when
channel-positions-from-input is set as TRUE. So in case of FALSE
self->func is not set and hence creating assertion error.
Hence removing the condition to increment self->channels.

https://bugzilla.gnome.org/show_bug.cgi?id=744211
2015-06-05 08:48:25 -03:00
Sebastian Dröge
8f5bdf9690 rtpjitterbuffer: Add support for receiving reduced size RTCP
It worked before but gave warnings, now we just ignore RTCP
packets that don't start with a SR. As all we're interested
in here are SRs.
2015-06-05 10:33:11 +02:00
Jose Antonio Santos Cadenas
f563176349 rtpssrcdemux: Add support for reduce size rtcp
According to RFC 5506, reduce size packages can be sent, this
packages may not be compound, so we need to add support for
getting ssrc from other types of packages.

https://bugzilla.gnome.org/show_bug.cgi?id=750327
2015-06-05 10:30:15 +02:00
Jose Antonio Santos Cadenas
f8f23bbf5d rtpsession: Add support for receiving reduced size rtcp
See RFC 5506

https://bugzilla.gnome.org/show_bug.cgi?id=750332
2015-06-05 10:24:17 +02:00
Sebastian Dröge
ec82eba96b aacparse: Add support for channel configurations 11, 12 and 14 and 7 actually has 8 channels
ISO/IEC 14496-3:2009/PDAM 4 added 11, 12 and 14.
2015-06-04 16:09:41 +02:00
Nicolas Dufresne
3ab70e4677 asteriskh263: Un-rank clashing depayloader
This depayloader clash with the standard one for H263p. It produces an
H263p stream with a modified header. It uses encoding-name that is the
same as H263p (H263-1998) though the resulting ES is not decodable or
parsable in GStreamer, making it unsuable in dynamic pipeline. This
patch unrank this specialized depayloader since it can only be used in
custom pipeline.

https://bugzilla.gnome.org/show_bug.cgi?id=739935
2015-06-03 08:57:57 -04:00
Luis de Bethencourt
ffe7507512 goom2k1: remove variables not needed anymore
https://bugzilla.gnome.org/show_bug.cgi?id=742875
2015-06-02 18:09:48 +01:00
Luis de Bethencourt
8756b6a9d4 goom2k1: rebase to use the audiovisualizer class
Rebase to have goom2k1 using the common GstAudioVisualizer class

https://bugzilla.gnome.org/show_bug.cgi?id=742875
2015-06-02 18:02:08 +01:00
Luis de Bethencourt
89903bf66a goom: rebase to use the audiovisualizer class 2015-06-02 17:47:57 +01:00
Sebastian Dröge
647eefea67 rtpsession: Only schedule a timer when we actually have to send RTCP
Otherwise we will have 10s-100s of thread wakeups in feedback profiles, create
RTCP packets, etc. just to suppress them in 99% of the cases (i.e. if no
feedback is actually pending and no regular RTCP has to be sent).

This improves CPU usage and battery life quite a lot.

https://bugzilla.gnome.org/show_bug.cgi?id=746543
2015-06-02 11:38:15 +02:00
Sebastian Dröge
8ada98964d rtpsession: Remove useless goto
https://bugzilla.gnome.org/show_bug.cgi?id=746543
2015-06-02 11:38:15 +02:00
Sebastian Dröge
0a7823b30f rtspsrc: Set RTP profile on the rtpsession objects
https://bugzilla.gnome.org/show_bug.cgi?id=746543
2015-06-02 11:38:15 +02:00
Sebastian Dröge
506a8a8857 rtpbin: Add rtp-profile property for setting the default profile of newly created sessions
https://bugzilla.gnome.org/show_bug.cgi?id=746543
2015-06-02 11:38:15 +02:00
Sebastian Dröge
0f7e80ed59 rtpsession: Only put RRs and full SDES into regular RTCP packets
If we may suppress the packet due to the rules of RFC4585 (i.e. when
below the t-rr-int), we can send a smaller RTCP packet without RRs
and full SDES. In theory we could even send a minimal RTCP packet
according to RFC5506, but we don't support that yet.

https://bugzilla.gnome.org/show_bug.cgi?id=746543
2015-06-02 11:38:15 +02:00
Sebastian Dröge
6f830e5bd5 rtpsession: Keep track of tp/tn and t_rr_last separately
Otherwise we can't properly schedule RTCP in feedback profiles as we need to
distinguish the time when we last checked for sending RTCP (tp) but might have
suppressed it, and the time when we last actually sent a non-early RTCP
packet.

This together with the other changes should now properly implement RTCP
scheduling according to RFC4585, and especially allow us to send feedback
packets a lot if needed but only send regular RTCP packets every once in a
while.

https://bugzilla.gnome.org/show_bug.cgi?id=746543
2015-06-02 11:38:15 +02:00
Sebastian Dröge
3122ef4ae3 rtpsession: Add property for selecting RTP profile (AVP/AVPF/etc)
And modify our RTCP scheduling algorithm accordingly. We now can send more
RTCP packets if needed for feedback, but will throttle full RTCP packets by
rtcp-min-interval (t-rr-int from RFC4585).

In non-feedback mode, rtcp-min-interval is Tmin from RFC3550, which is
statically set to 1s or 0s by RFC4585. Tmin defines how often we should
send RTCP packets at most.

https://bugzilla.gnome.org/show_bug.cgi?id=746543
2015-06-02 11:38:15 +02:00
Olivier Crête
8fd3e0e125 mulawdec: Let baseclass estimate bitrate
This makes playback directly from a file work with the right caps.
2015-05-30 17:41:44 -04:00
Tim-Philipp Müller
2e5df10ed9 dynudpsink: keep GCancellable fd around instead of re-creating it constantly
And create it only when starting the element.
2015-05-27 17:08:47 +01:00
Tim-Philipp Müller
b33d30621c udpsink, multiudpsink: keep GCancellable fd around instead of re-creating it constantly
Otherwise we constantly create/close event file descriptors,
every time we call g_socket_condition_timed_wait() or
g_socket_send_message(s)(), i.e. a lot. Which is not
particularly good for performance.

Can't create GCancellable in ::start() here because it's used
in client_new() which may be called via the add-client action
signal which may be called before the element is up and running.
2015-05-27 17:08:47 +01:00
Tim-Philipp Müller
11bb21f3c2 udpsrc: keep GCancellable fd around instead of re-creating it constantly
Otherwise we constantly create/close event file descriptors,
every single time we call g_socket_condition_timed_wait() or
g_socket_receive_message(), i.e. twice per packet received!
This was not particularly good for performance.

Also only create GCancellable on start-up.
2015-05-27 17:08:47 +01:00
Luis de Bethencourt
6d06a74f7f matroska: overwritten value assignment
curpos is set and immediately after, set again. Remove the redundant
assignment.

https://bugzilla.gnome.org/show_bug.cgi?id=749909
2015-05-27 16:56:15 +01:00