platform/upstream/gst-plugins-good.git
8 years agoqtdemux: don't push encrypted buffer without cenc metadata
Philippe Normand [Wed, 24 Feb 2016 08:12:03 +0000 (09:12 +0100)]
qtdemux: don't push encrypted buffer without cenc metadata

When the cenc metadata is stored outside of the moof box and the
stream is exposed it is possible that the cenc metadata hasn't been
processed yet while the first buffer is being pushed. When this
happens the buffer can't possibly be decrypted downstream so don't
push it.

https://bugzilla.gnome.org/show_bug.cgi?id=762516

8 years agoqtdemux: read saio aux_info_type as a FOURCC
Philippe Normand [Wed, 21 Oct 2015 14:21:45 +0000 (16:21 +0200)]
qtdemux: read saio aux_info_type as a FOURCC

https://bugzilla.gnome.org/show_bug.cgi?id=756897

8 years agogst: Handle gst_pad_get_current_caps() returning NULL gracefully
Sebastian Dröge [Tue, 23 Feb 2016 16:27:47 +0000 (18:27 +0200)]
gst: Handle gst_pad_get_current_caps() returning NULL gracefully

8 years agortph265depay: Don't assume that get_current_caps() returns non-NULL caps after has_cu...
Dave Craig [Tue, 23 Feb 2016 16:12:54 +0000 (18:12 +0200)]
rtph265depay: Don't assume that get_current_caps() returns non-NULL caps after has_current_caps()

Remove calls to gst_pad_has_current_caps() which then go on to call
gst_pad_get_current_caps() as the caps can go to NULL in between. Instead just
use gst_pad_get_current_caps() and check for NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=759539

8 years agogst: Don't assume that get_current_caps() returns non-NULL caps after has_current_caps()
Dave Craig [Wed, 16 Dec 2015 12:40:39 +0000 (12:40 +0000)]
gst: Don't assume that get_current_caps() returns non-NULL caps after has_current_caps()

Remove calls to gst_pad_has_current_caps() which then go on to call
gst_pad_get_current_caps() as the caps can go to NULL in between. Instead just
use gst_pad_get_current_caps() and check for NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=759539

8 years agoaacparse: Handle gst_pad_get_current_caps() returning NULL gracefully
Dave Craig [Wed, 16 Dec 2015 10:54:17 +0000 (10:54 +0000)]
aacparse: Handle gst_pad_get_current_caps() returning NULL gracefully

This can happen when the pipeline is currently shutting down.

https://bugzilla.gnome.org/show_bug.cgi?id=759539

8 years agomatroska-demux: Don't handle seek until ready
Linus Svensson [Tue, 23 Feb 2016 14:57:18 +0000 (15:57 +0100)]
matroska-demux: Don't handle seek until ready

https://bugzilla.gnome.org/show_bug.cgi?id=762542

8 years agomatroska-demux: Unref seek event
Linus Svensson [Tue, 23 Feb 2016 14:55:13 +0000 (15:55 +0100)]
matroska-demux: Unref seek event

https://bugzilla.gnome.org/show_bug.cgi?id=762542

8 years agomultifilesink: close file on write error with next-file mode is set to buffer
Aurélien Zanelli [Mon, 22 Feb 2016 10:01:40 +0000 (11:01 +0100)]
multifilesink: close file on write error with next-file mode is set to buffer

If we have an error during fwrite call, file stays open and thus next
incoming buffer will trigger an assert when trying to opening a new
file.
This happens if we do not restart element, file is closed at stop, and
if application handles the returned GST_FLOW_ERROR to keep bin alive.

https://bugzilla.gnome.org/show_bug.cgi?id=762434

8 years agomatroskamux: don't output empty tags/tag elements
Matej Knopp [Fri, 19 Feb 2016 22:44:42 +0000 (23:44 +0100)]
matroskamux: don't output empty tags/tag elements

Such files will not play on Android, because of bug in libwebm matroska parsing, which is still present in 6.0.1

https://bugzilla.gnome.org/show_bug.cgi?id=762349

8 years agomatroska-demux: make up an OpusHead block if possible when missing
Vincent Penquerc'h [Thu, 4 Feb 2016 15:59:04 +0000 (15:59 +0000)]
matroska-demux: make up an OpusHead block if possible when missing

https://bugzilla.gnome.org/show_bug.cgi?id=761489

8 years agomatroska-mux: make up an OpusHead block if possible when missing
Vincent Penquerc'h [Thu, 4 Feb 2016 10:43:15 +0000 (10:43 +0000)]
matroska-mux: make up an OpusHead block if possible when missing

This block is needed in the Matroska file, but data coming from
RTP may not have one.

https://bugzilla.gnome.org/show_bug.cgi?id=761489

8 years agomatroskademux: make stream-id more readable and order-friendly
Mark Nauwelaerts [Mon, 22 Feb 2016 12:53:21 +0000 (13:53 +0100)]
matroskademux: make stream-id more readable and order-friendly

... as streams are so ordered by id by e.g. decodebin
(and as typically already honoured by other demuxers).

8 years agomatroska: remove confusing duplicate track uid field
Mark Nauwelaerts [Mon, 22 Feb 2016 12:25:51 +0000 (13:25 +0100)]
matroska: remove confusing duplicate track uid field

8 years agortpvp9pay: add missing break
Luis de Bethencourt [Mon, 22 Feb 2016 14:03:02 +0000 (14:03 +0000)]
rtpvp9pay: add missing break

VP9_PAY_PICTURE_ID_7BITS and VP9_PAY_PICTURE_ID_15BITS are mutually
exclusive options of the picture-id-mode. We can break after the
first case.

1 or 2 bytes need to be added to the header length depending on the
PictureID size.
https://tools.ietf.org/html/draft-uberti-payload-vp9-00#section-4.2

CID 1353479

8 years agoavidemux: Fix buffer memory leak
Vineeth TM [Mon, 22 Feb 2016 00:09:01 +0000 (09:09 +0900)]
avidemux: Fix buffer memory leak

buffer being mapped is not being unmapped in some cases

https://bugzilla.gnome.org/show_bug.cgi?id=762420

8 years agortpmanager: Don't warn for duplicate/reordered packets
Stian Selnes [Wed, 4 Nov 2015 09:19:03 +0000 (10:19 +0100)]
rtpmanager: Don't warn for duplicate/reordered packets

This is a normal scenario and should not be a warning.

https://bugzilla.gnome.org/show_bug.cgi?id=762208

8 years agowin32: remove outdated build cruft
Tim-Philipp Müller [Sun, 21 Feb 2016 09:47:43 +0000 (09:47 +0000)]
win32: remove outdated build cruft

This hasn't been touched for generations, doesn't work,
and is just causing confusion. We also don't want to
maintain these files manually.

8 years agov4l2: don't use undeclared core debug category symbols
Tim-Philipp Müller [Sat, 20 Feb 2016 11:51:56 +0000 (11:51 +0000)]
v4l2: don't use undeclared core debug category symbols

8 years agoqtdemux: workaround for files with wrong color_table_id value
Matej Knopp [Sat, 6 Feb 2016 13:39:05 +0000 (14:39 +0100)]
qtdemux: workaround for files with wrong color_table_id value

Instead of erroring out, just use the default color table.

https://bugzilla.gnome.org/show_bug.cgi?id=761637

8 years agoflvmux, rtpvp9depay: fix indentation
Tim-Philipp Müller [Fri, 19 Feb 2016 15:02:04 +0000 (15:02 +0000)]
flvmux, rtpvp9depay: fix indentation

8 years agov4l2src: fix indentation
Tim-Philipp Müller [Fri, 19 Feb 2016 15:03:04 +0000 (15:03 +0000)]
v4l2src: fix indentation

8 years agoflvmux: plug leak(s) in error-scenario
Havard Graff [Thu, 3 Dec 2015 13:46:34 +0000 (00:46 +1100)]
flvmux: plug leak(s) in error-scenario

https://bugzilla.gnome.org/show_bug.cgi?id=762210

8 years agoflvdemux: fix eos event leak
Havard Graff [Thu, 3 Dec 2015 13:46:12 +0000 (00:46 +1100)]
flvdemux: fix eos event leak

https://bugzilla.gnome.org/show_bug.cgi?id=762209

8 years agotests: fix indentation
Tim-Philipp Müller [Fri, 19 Feb 2016 14:41:07 +0000 (14:41 +0000)]
tests: fix indentation

8 years agotests: rtpjitterbuffer: port testharness to GstHarness and cleanup/improve
Havard Graff [Thu, 18 Feb 2016 15:09:29 +0000 (16:09 +0100)]
tests: rtpjitterbuffer: port testharness to GstHarness and cleanup/improve

Probably found a bug as well, in that there are some timestamps in
there that are looking very wrong. (marked with FIXME)

https://bugzilla.gnome.org/show_bug.cgi?id=762267

8 years agotests: rtpjitterbuffer: test cleanups/improvements
Havard Graff [Thu, 18 Feb 2016 09:27:19 +0000 (10:27 +0100)]
tests: rtpjitterbuffer: test cleanups/improvements

Use fail_unless and friends instead of g_assert
Factor seq-num checking out to separate function
Check more return-values from push and crank and others

https://bugzilla.gnome.org/show_bug.cgi?id=762254

8 years agotests: rtpjitterbuffer: fix leaks in unit test
Stian Selnes [Thu, 3 Dec 2015 10:07:05 +0000 (11:07 +0100)]
tests: rtpjitterbuffer: fix leaks in unit test

https://bugzilla.gnome.org/show_bug.cgi?id=762214

8 years agoBack to development
Sebastian Dröge [Fri, 19 Feb 2016 10:38:28 +0000 (12:38 +0200)]
Back to development

8 years agoRelease 1.7.2
Sebastian Dröge [Fri, 19 Feb 2016 09:49:55 +0000 (11:49 +0200)]
Release 1.7.2

8 years agopo: Update translations
Sebastian Dröge [Fri, 19 Feb 2016 08:31:48 +0000 (10:31 +0200)]
po: Update translations

8 years agoqtdemux: plug leaks in cenc aux info parsing
Philippe Normand [Thu, 18 Feb 2016 17:33:13 +0000 (18:33 +0100)]
qtdemux: plug leaks in cenc aux info parsing

8 years agotests: fix spurious souphttpsrc test timouts
Tim-Philipp Müller [Thu, 18 Feb 2016 13:43:07 +0000 (13:43 +0000)]
tests: fix spurious souphttpsrc test timouts

Set GSETTINGS_BACKEND=memory, apparently there's something
about fork() and the dconf backend (or whatever else that
drags in or activates) that messes up locking and causes
timeouts due to deadlocks in g_mutex_lock(), since
everything works fine with CK_FORK=no as well.

8 years agomatroskademux: Unmap wavpack header buffer after creating it
Sebastian Dröge [Thu, 18 Feb 2016 09:10:14 +0000 (11:10 +0200)]
matroskademux: Unmap wavpack header buffer after creating it

Otherwise it will be mapped writable all the time and we can't read from it
anywhere.

https://bugzilla.gnome.org/show_bug.cgi?id=762239

8 years agortpjitterbuffer: Add test for big seqnum gap handling
Stian Selnes [Tue, 8 Dec 2015 17:49:40 +0000 (18:49 +0100)]
rtpjitterbuffer: Add test for big seqnum gap handling

Make sure that the packets queued when detecting a big gap are pushed
after reset (5 consective seqnums) and not dropped.

https://bugzilla.gnome.org/show_bug.cgi?id=762211

8 years agortp: sprinkle some G_GNUC_INTERNAL for internal utils functions
Tim-Philipp Müller [Wed, 17 Feb 2016 15:03:13 +0000 (15:03 +0000)]
rtp: sprinkle some G_GNUC_INTERNAL for internal utils functions

8 years agoqtdemux: only transform protected caps once
Alex Ashley [Tue, 9 Feb 2016 13:17:00 +0000 (13:17 +0000)]
qtdemux: only transform protected caps once

Commit 7873bede3134b15e5066e8d14e54d1f5054d2063
(https://bugzilla.gnome.org/show_bug.cgi?id=760774) changed the
behaviour of qtdemux to call gst_qtdemux_configure_stream() for
every new moof.

When playing a protected stream, gst_qtdemux_configure_stream()
calls gst_qtdemux_configure_protected_caps(). The
gst_qtdemux_configure_protected_caps() function takes the original
media format, puts this in a field called "original-media-type"
and then changes the caps to "application/x-cenc".

The gst_qtdemux_configure_protected_caps() did not handle the case
of being called multiple times, causing it to incorrectly set the
caps. The second call was causing the caps to be set to:

    application/x-cenc, original-media-type"application/x-cenc"

This commit makes gst_qtdemux_configure_protected_caps() check that
the caps have already been transformed, so that it only gets
changed once.

    https://bugzilla.gnome.org/show_bug.cgi?id=761769

8 years agortp: h264/h265: avoid duplication of read_golomb()
Luis de Bethencourt [Wed, 17 Feb 2016 13:26:02 +0000 (13:26 +0000)]
rtp: h264/h265: avoid duplication of read_golomb()

There is no need to have two identical implementations of the read_golomb
function.

https://bugzilla.gnome.org/show_bug.cgi?id=761606

8 years agomatroskademux: Simple implementation of TRICKMODE_KEY_UNITS
Ognyan Tonchev [Wed, 17 Feb 2016 13:37:44 +0000 (14:37 +0100)]
matroskademux: Simple implementation of 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

https://bugzilla.gnome.org/show_bug.cgi?id=762185

8 years agomatroska-demux: send GAP events for lagging audio and video streams too
Tim-Philipp Müller [Fri, 21 Aug 2015 13:15:18 +0000 (14:15 +0100)]
matroska-demux: send GAP events for lagging audio and video streams too

Send GAP events for non-subtitle streams too if they lag too much
behind, but use a higher threshold than for subtitles.

This helps with fixing prerolling with a file where one of the
audio streams only has data starting from 19s onwards. It's not
a complete fix yet, it also requires changes elsewhere, such as
in baseparse, to make sure caps are propagated.

https://bugzilla.gnome.org/show_bug.cgi?id=614460
https://bugzilla.gnome.org/show_bug.cgi?id=753899

8 years agortpvp9pay: rtpvp9depay: Initial implementation of draft 01
Stian Selnes [Wed, 23 Dec 2015 18:54:13 +0000 (19:54 +0100)]
rtpvp9pay: rtpvp9depay: Initial implementation of draft 01

Quick and dirty implementation of an RTP payloader and depayloader
for VP9. In particalur it assumes no spatial or temporal layering,
non-flexible mode, and some other bits and pieces.

https://bugzilla.gnome.org/show_bug.cgi?id=754773

8 years agoavidemux: Fix string memory leak
Vineeth TM [Tue, 16 Feb 2016 00:02:30 +0000 (09:02 +0900)]
avidemux: Fix string memory leak

codec_name is not being freed in all conditions leading to memory leak

https://bugzilla.gnome.org/show_bug.cgi?id=762117

8 years agortpbin: add "get-session" signal
Miguel París Díaz [Thu, 10 Dec 2015 11:15:52 +0000 (12:15 +0100)]
rtpbin: add "get-session" signal

This gets the GstRTPSession element, as compared to the RTPSession object
that is returned by get-internal-session.

https://bugzilla.gnome.org/show_bug.cgi?id=759293

8 years agortp: h265: hook up move RTP H.265 payloader/depayloader to build
Tim-Philipp Müller [Tue, 16 Feb 2016 00:19:00 +0000 (00:19 +0000)]
rtp: h265: hook up move RTP H.265 payloader/depayloader to build

https://bugzilla.gnome.org/show_bug.cgi?id=761606

8 years agortp: h265: use common meta utility functions
Tim-Philipp Müller [Tue, 16 Feb 2016 00:14:27 +0000 (00:14 +0000)]
rtp: h265: use common meta utility functions

https://bugzilla.gnome.org/show_bug.cgi?id=761606

8 years agortp: h265: remove codecparser dependency from h265 payloader/depayloader
Tim-Philipp Müller [Fri, 5 Feb 2016 18:18:31 +0000 (18:18 +0000)]
rtp: h265: remove codecparser dependency from h265 payloader/depayloader

Looks like it just uses the NAL enums and nothing else from
the codecparsers, and that's the only reason it had to be
moved from -good to -bad when it was originally added. We
can probably keep those NAL enums up to date enough, so let's
remove the codecparser dependency so it can be moved back into
-good.

https://bugzilla.gnome.org/show_bug.cgi?id=761606

8 years agoMerge branch 'plugin-move-rtp-h265'
Tim-Philipp Müller [Tue, 16 Feb 2016 00:24:58 +0000 (00:24 +0000)]
Merge branch 'plugin-move-rtp-h265'

Move RTP H.265 payloader/depayloader from -bad to -good.

https://bugzilla.gnome.org/show_bug.cgi?id=761606

8 years agogstrtph265depay: keep consistency with rtph264depay
Luis de Bethencourt [Fri, 5 Feb 2016 15:34:51 +0000 (15:34 +0000)]
gstrtph265depay: keep consistency with rtph264depay

Use gst_rtp_drop_meta() and the same function prototype for
gst_rtp_copy_meta() to keep consistency with the RTP elements in
gst-plugins-good

8 years agortph265depay: fix termination of access unit
Luis de Bethencourt [Fri, 5 Feb 2016 13:56:34 +0000 (13:56 +0000)]
rtph265depay: fix termination of access unit

Only consider the access unit complete when the next-occurring VCL NAL unit
has the first bit after its NAL unit header equal to 1.

8 years agortph265depay: fix unneeded sub-buffer creation
Luis de Bethencourt [Fri, 15 Jan 2016 16:10:02 +0000 (16:10 +0000)]
rtph265depay: fix unneeded sub-buffer creation

We create a sub-buffer just to copy over its metas and then throw it
away immediately, just use the original input buffer directly.

8 years agortph265pay: add "send VPS/SPS/PPS with every key frame" mode
Luis de Bethencourt [Fri, 15 Jan 2016 15:56:59 +0000 (15:56 +0000)]
rtph265pay: add "send VPS/SPS/PPS with every key frame" mode

It's not enough to have timeout or event based VPS/SPS/PPS information
sent in RTP packets. There are some scenarios when key frames may appear
more frequently than once a second, in which case the minimum timeout
for "config-interval" of 1 second for sending VPS/SPS/PPS isn't enough.
It might also be desirable in general to make sure the VPS/SPS/PPS is
available with every keyframe (packet loss aside), so receivers can
actually pick up decoding immediately from the first keyframe if
VPS/SPS/PPS is not signaled out of band.

This commit adds the possibility to send VPS/SPS/PPS with every key frame.
This mode can be enabled by setting "config-interval" property to -1. In
this case the payloader will add VPS, SPS and PPS before every key (IDR)
frame.

https://bugzilla.gnome.org/show_bug.cgi?id=757892

8 years agortph265pay: change config-interval property type from uint to int
Luis de Bethencourt [Fri, 15 Jan 2016 15:19:41 +0000 (15:19 +0000)]
rtph265pay: change config-interval property type from uint to int

This way we can use -1 as special value, which is nicer than MAXUINT.

https://bugzilla.gnome.org/show_bug.cgi?id=757892

8 years agortph265depay: make sure we call handle_nal for each NAL
Luis de Bethencourt [Sat, 15 Aug 2015 15:22:20 +0000 (16:22 +0100)]
rtph265depay: make sure we call handle_nal for each NAL

Call handle_nal for each NAL in the STAP-A RTP packet. This makes sure
we correctly extract the SPS and PPS.

https://bugzilla.gnome.org/show_bug.cgi?id=730999

8 years agortph265pay: Copy metadata in the payloader, but only the relevant ones
Luis de Bethencourt [Sat, 15 Aug 2015 13:45:34 +0000 (14:45 +0100)]
rtph265pay: Copy metadata in the payloader, but only the relevant ones

The payloader didn't copy anything so far, the depayloader copied every
possible meta. Let's make it consistent and just copy all metas without
tags or with only the video tag.

https://bugzilla.gnome.org/show_bug.cgi?id=751774

8 years agortph265pay: Use GST_WARNING_OBJECT() instead of GST_WARNING()
Luis de Bethencourt [Sat, 15 Aug 2015 10:41:40 +0000 (11:41 +0100)]
rtph265pay: Use GST_WARNING_OBJECT() instead of GST_WARNING()

https://bugzilla.gnome.org/show_bug.cgi?id=753228

8 years agortph265pay: fix potential crash when shutting down
Luis de Bethencourt [Sat, 15 Aug 2015 10:30:36 +0000 (11:30 +0100)]
rtph265pay: fix potential crash when shutting down

A race condition in the state change function may cause buffers to be
unreffed while they are still used by the streaming thread in
gst_rtp_h265_pay_send_vps_sps_pps() resulting in a crash. Chain up to the
parent class first in the state change function to make sure streaming
has stopped and only then free those buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=741381

8 years agortph265pay: fix buffer leak when using SPS/PPS
Luis de Bethencourt [Fri, 14 Aug 2015 14:08:08 +0000 (15:08 +0100)]
rtph265pay: fix buffer leak when using SPS/PPS

Fixes a buffer leak that would occur if the pipeline was shutdown while a
SPS/PPS header was being created.

https://bugzilla.gnome.org/show_bug.cgi?id=741271

8 years agortph265depay: copy metadata in the depayloader, but only the relevant ones
Luis de Bethencourt [Fri, 14 Aug 2015 10:49:51 +0000 (11:49 +0100)]
rtph265depay: copy metadata in the depayloader, but only the relevant ones

The payloader didn't copy anything so far, the depayloader copied every
possible meta. Let's make it consistent and just copy all metas without
tags or with only the video tag.

https://bugzilla.gnome.org/show_bug.cgi?id=751774

8 years agortph265depay: checking if depay has sps/pps nals before insertion
Luis de Bethencourt [Wed, 12 Aug 2015 16:54:52 +0000 (17:54 +0100)]
rtph265depay: checking if depay has sps/pps nals before insertion

Related to: https://bugzilla.gnome.org/show_bug.cgi?id=753430

https://bugzilla.gnome.org/show_bug.cgi?id=753228

8 years agortph265depay: only update the srcpad caps if something else than the codec_data changed
Luis de Bethencourt [Wed, 12 Aug 2015 16:22:42 +0000 (17:22 +0100)]
rtph265depay: only update the srcpad caps if something else than the codec_data changed

h264parse and gstrtph264depay do the same, let's keep the behaviour
consistent. As we now include the codec_data inside the stream, this causes
less caps renegotiation.

https://bugzilla.gnome.org/show_bug.cgi?id=753228

8 years agortph265depay: PPS replaces old PPS if it has the same id
Luis de Bethencourt [Wed, 12 Aug 2015 15:43:48 +0000 (16:43 +0100)]
rtph265depay: PPS replaces old PPS if it has the same id

https://bugzilla.gnome.org/show_bug.cgi?id=753228

8 years agortph265depay: Insert SPS/PPS NALs into the stream
Luis de Bethencourt [Wed, 12 Aug 2015 15:11:00 +0000 (16:11 +0100)]
rtph265depay: Insert SPS/PPS NALs into the stream

rtph264depay does the same and this fixes decoding of some streams with 32
SPS (or 256 PPS). It is allowed to have SPS ID 0 to 31 (or PPS ID 0 to 255),
but the field in the codec_data for the number of SPS or PPS is only 5
(or 8) bit. As such, 32 SPS (or 256 PPS) are interpreted as 0 everywhere.

This looks like a mistake in the part of the spect about the codec_data.

8 years agortph265depay: implement process_rtp_packet() vfunc
Luis de Bethencourt [Wed, 12 Aug 2015 14:49:50 +0000 (15:49 +0100)]
rtph265depay: implement process_rtp_packet() vfunc

For more optimised RTP packet handling: means we don't need to map the
input buffer again but can just re-use the mapping the base class has
already done.

Based on: https://bugzilla.gnome.org/show_bug.cgi?id=750235

https://bugzilla.gnome.org/show_bug.cgi?id=753228

8 years agortph265depay: Use GST_BUFFER_PTS() instead of GST_BUFFER_TIMESTAMP()
Luis de Bethencourt [Wed, 12 Aug 2015 14:14:50 +0000 (15:14 +0100)]
rtph265depay: Use GST_BUFFER_PTS() instead of GST_BUFFER_TIMESTAMP()

Switching to GST_BUFFER_TIMESTAMP() to be consistent with other rtp code.

8 years agortph265depay: prevent trying to get 0 bytes from adapter
Luis de Bethencourt [Wed, 12 Aug 2015 13:59:53 +0000 (14:59 +0100)]
rtph265depay: 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.

Related to rpth264depay: https://bugzilla.gnome.org/show_bug.cgi?id=737199

8 years agortp: remove dead assignment
Luis de Bethencourt [Wed, 29 Jul 2015 16:29:28 +0000 (17:29 +0100)]
rtp: remove dead assignment

Value set to ret will be overwritten at least once at the end of the while
loop, removing assignment.

8 years agoremove unused enum items PROP_LAST
Luis de Bethencourt [Fri, 24 Apr 2015 15:48:23 +0000 (16:48 +0100)]
remove unused enum items PROP_LAST

This were probably added to the enums due to cargo cult programming and are
unused.

8 years agortp: donl_present variable unused
Luis de Bethencourt [Fri, 6 Mar 2015 14:54:41 +0000 (14:54 +0000)]
rtp: donl_present variable unused

donl_present is not implemented, yet the value is set and checked a few times.
Cleaning this.

CID #1249687

8 years agortp: value truncated too short creates dead code
Luis de Bethencourt [Thu, 8 Jan 2015 15:36:04 +0000 (15:36 +0000)]
rtp: value truncated too short creates dead code

type is truncated to 0-31 with "& 0x1f", but right after that it is checks if
the value is equivalent to GST_H265_NAL_VPS, GST_H265_NAL_SPS, and
GST_H265_NAL_PPS (which are 32, 33, and 34 respectively). Obviously, this will
never be True if the value is maximum 31 after the truncation.
The intention of the code was to truncate to 0-63.

8 years agortp: fix nal unit type check
Luis de Bethencourt [Thu, 8 Jan 2015 15:27:44 +0000 (15:27 +0000)]
rtp: fix nal unit type check

After further investigation the previous commit is wrong. The code intended to
check if the type is 39 or the ranges 41-44 and 48-55. Just like gsth265parse.c
does. Type 40 would not be complete.

8 years agortp: fix dead code and check for impossible values
Luis de Bethencourt [Thu, 8 Jan 2015 13:47:09 +0000 (13:47 +0000)]
rtp: fix dead code and check for impossible values

nal_type is the index for a GstH265NalUnitType enum. There are two types of dead
code here:
First, after checking if nal_type is >= 39 there are two OR conditionals that
check if the value is in ranges higher than that number, so if nal_type >= 39
falls in the True branch those other conditions aren't checked and if it falls
in the False branch and they are checked, they will always also be False. They
are redundant.
Second, the enum has a range of 0 to 40. So the checks for ranges higher than 41
should never be True.
Removing this redundant checks.

CID 1249684

8 years agortp: add h265 RTP payloader + depayloader
Thijs Vermeir [Thu, 16 Oct 2014 08:34:01 +0000 (10:34 +0200)]
rtp: add h265 RTP payloader + depayloader

8 years agotests: rtpmux: Fix element memory leak
Vineeth TM [Mon, 15 Feb 2016 02:51:46 +0000 (11:51 +0900)]
tests: rtpmux: Fix element memory leak

https://bugzilla.gnome.org/show_bug.cgi?id=762057

8 years agomonoscope: rework the scaling code
Stefan Sauer [Fri, 12 Feb 2016 19:57:29 +0000 (20:57 +0100)]
monoscope: rework the scaling code

The running average was wrong and the resulting scaling factor was only held in
place using the CLAMP. In addtion we are now convering quickly to volume
changes.

FInally now with this change, we can change the resolution defines and
everythign adjusts.

8 years agomonoscope: use constants in the drawing code
Stefan Sauer [Thu, 28 Jan 2016 16:00:55 +0000 (17:00 +0100)]
monoscope: use constants in the drawing code

Make all the drawing ops be based on the constants. This way we can change
the fixed size at least at compile time.

8 years agomonoscope: replace hardcoded values by constants
Stefan Sauer [Thu, 28 Jan 2016 08:51:17 +0000 (09:51 +0100)]
monoscope: replace hardcoded values by constants

This at least establishes the relationship.

8 years agomonoscpe: make the convolver use dynamic memory
Stefan Sauer [Thu, 28 Jan 2016 08:43:12 +0000 (09:43 +0100)]
monoscpe: make the convolver use dynamic memory

Replace all #defines with members and initialize the convolver with a parameter.

8 years agomonoscope: update README
Stefan Sauer [Thu, 28 Jan 2016 07:56:44 +0000 (08:56 +0100)]
monoscope: update README

We can already create multiple instances.

8 years agomonoscope: code cleanup
Stefan Sauer [Thu, 28 Jan 2016 07:53:35 +0000 (08:53 +0100)]
monoscope: code cleanup

Use constants more often. Cleanup comments and add more to explain how things
work.

8 years agodeinterlace: remove check for impossible condition
Luis de Bethencourt [Mon, 8 Feb 2016 23:41:32 +0000 (23:41 +0000)]
deinterlace: remove check for impossible condition

Commit bd27a1f30b4458f2edee53c76dd07fb35904b61d added a few error handling
memory management checks. These check srccaps to see if it needs to be
unreferenced before returning, in the case of invalid_caps this goto jump
always happens before srccaps is set, so it will always be NULL in this
error label.

CID #1352035

8 years agopo: update POTFILES
Piotr Drąg [Mon, 8 Feb 2016 11:48:46 +0000 (12:48 +0100)]
po: update POTFILES

https://bugzilla.gnome.org/show_bug.cgi?id=761705

8 years agov4l2allocator: Fix spelling of reenqueueing
Luis de Bethencourt [Mon, 8 Feb 2016 15:31:55 +0000 (15:31 +0000)]
v4l2allocator: Fix spelling of reenqueueing

To match commit 7d7074cef0272cd5155098bfc2bda6849dd89267. I love the idea
of aiming for the maximum number of consecutive vowels.

8 years agov4l2allocator: Fix spelling of queueing
Nicolas Dufresne [Mon, 8 Feb 2016 15:17:49 +0000 (10:17 -0500)]
v4l2allocator: Fix spelling of queueing

Didn't know which one to choose between queuing and queueing, so I picked
the one with the biggest amount of vowels in a row ;-P (both are
acceptable apparently)

8 years agojpegdec: Don't pass the same data over and over
Nicolas Dufresne [Sun, 7 Feb 2016 20:02:35 +0000 (15:02 -0500)]
jpegdec: Don't pass the same data over and over

We already pass the entire frame to the decoder. If the decoder ask for
more data, don't pass the same data again as this leads to infinit loop.
Instead, simply fail the fill function to signal the problem with that
frame. It will then be skipped properly.

https://bugzilla.gnome.org/show_bug.cgi?id=761670

8 years agomatroska: get rid of _stdint.h include
Tim-Philipp Müller [Mon, 8 Feb 2016 00:10:33 +0000 (00:10 +0000)]
matroska: get rid of _stdint.h include

8 years agotests: extend the AM_TESTS_ENVIRONMENT from check.mak
Thiago Santos [Fri, 5 Feb 2016 23:00:57 +0000 (20:00 -0300)]
tests: extend the AM_TESTS_ENVIRONMENT from check.mak

To get the CK_DEFAULT_TIMEOUT defined for all tests

https://bugzilla.gnome.org/show_bug.cgi?id=761472

8 years agoAutomatic update of common submodule
Thiago Santos [Fri, 5 Feb 2016 21:04:31 +0000 (18:04 -0300)]
Automatic update of common submodule

From 86e4663 to b64f03f

8 years agortpjpegpay: Skip APP and JPG markers and print warnings for unknown markers
Sebastian Dröge [Sat, 30 Jan 2016 17:43:30 +0000 (18:43 +0100)]
rtpjpegpay: Skip APP and JPG markers and print warnings for unknown markers

For APP/JPG markers the size is following and we have to skip that. This is
not really a problem unless the marker contains e.g. a preview JPEG or
something else that we might interprete as another marker.

8 years agoqtdemux: fix framerate calculation for fragmented format
Seungha Yang [Tue, 26 Jan 2016 13:37:30 +0000 (22:37 +0900)]
qtdemux: fix framerate calculation for fragmented format

qtdemux calculates framerate using duration and the number of sample.
In case of fragmented mp4 format, however, the number of sample can
be figure out after parsing every moof box. Because qtdemux does not
parse every moof in QTDEMUX_STATE_HEADER state, it will cause incorrect
framerate calculation.

This patch will triger gst_qtdemux_configure_stream() for every new moof.
Then, framerate will be calculated by using duration and n_samples of the moof.

https://bugzilla.gnome.org/show_bug.cgi?id=760774

8 years agoqtdemux: handling zero segment-duration edit list
Seungha Yang [Thu, 28 Jan 2016 13:36:23 +0000 (22:36 +0900)]
qtdemux: handling zero segment-duration edit list

Based on document ISO_IEC_14496-12, edit list box can have
segment duration as zero. It does not imply that media_start equals to
media_stop. But, it just indicates a sample which should be presented
at the first. This patch derives segment duration using media_time
and duration of file. And set derived duration to segment-duration.

https://bugzilla.gnome.org/show_bug.cgi?id=760781

8 years agoqtdemux: expose streams with first moof for fragmented format
Seungha Yang [Thu, 28 Jan 2016 12:36:54 +0000 (21:36 +0900)]
qtdemux: expose streams with first moof for fragmented format

In case of push mode, qtdemux expose streams after got moov box.
We can not guarantee that a moov box has sample data such as sample duration
and the number of sample in stbl box for fragmented format case.
So, if a moov has no sample data, streams will not be exposed until get the first moof.

https://bugzilla.gnome.org/show_bug.cgi?id=760779

8 years agodeinterlace: Check for subset instead of non-empty intersection for ACCEPT_CAPS
Sebastian Dröge [Wed, 27 Jan 2016 17:48:17 +0000 (18:48 +0100)]
deinterlace: Check for subset instead of non-empty intersection for ACCEPT_CAPS

8 years agodeinterlace: Unset RECONFIGURE flag on srcpad whenever we configure new caps
Sebastian Dröge [Wed, 27 Jan 2016 17:44:23 +0000 (18:44 +0100)]
deinterlace: Unset RECONFIGURE flag on srcpad whenever we configure new caps

Prevents double-negotiation during startup and in some other cases.

8 years agodeinterlace: Add negotiation unit tests for all 4 modes
Sebastian Dröge [Wed, 27 Jan 2016 15:43:22 +0000 (16:43 +0100)]
deinterlace: Add negotiation unit tests for all 4 modes

These now check the output caps based on the input caps and a following
capsfilter and make sure the caps are exactly as expected.

https://bugzilla.gnome.org/show_bug.cgi?id=760995
https://bugzilla.gnome.org/show_bug.cgi?id=720388

8 years agodeinterlace: Do passthrough in auto mode if downstream only supports interlaced
Vivia Nikolaidou [Tue, 26 Jan 2016 16:39:20 +0000 (17:39 +0100)]
deinterlace: Do passthrough in auto mode if downstream only supports interlaced

If the following conditions are met:
1) upstream and downstream caps are compatible
2) upstream is interlaced
3) downstream doesn't support progressive mode
then deinterlace will just do passthrough instead of failing to link.

This is done with the following scenario in mind:

videotestsrc ! "video/x-raw,interlace-mode=interleaved" ! deinterlace
name=dein_src ! tee name=t ! queue ! deinterlace name=dein_file ! filesink t. !
queue ! deinterlace name=dein_desktop ! autovideosink
In this case, dein_src will do the deinterlacing. However,

videotestsrc ! "video/x-raw,interlace-mode=interleaved" ! deinterlace
name=dein_src ! tee name=t ! queue ! deinterlace name=dein_file ! filesink t. !
queue ! deinterlace name=dein_desktop ! autovideosink t. ! queue !
"video/x-raw,interlace-mode=interleaved" ! fakesink

In this case, caps auto-negotiation will make dein_file and dein_desktop do
the deinterlacing, while dein_src will be passthrough.

https://bugzilla.gnome.org/show_bug.cgi?id=760995

8 years agodeinterlace: Add mode=auto-strict
Sebastian Dröge [Tue, 26 Jan 2016 17:05:51 +0000 (18:05 +0100)]
deinterlace: Add mode=auto-strict

In this mode we will passthrough all progressive caps but interlaced caps must be
caps where we actually support deinterlacing.

This is the only difference between auto and auto-strict, auto would
passthrough all unsupported interlaced caps.

https://bugzilla.gnome.org/show_bug.cgi?id=720388

8 years agodeinterlace: Implement reconfiguration a bit better
Sebastian Dröge [Tue, 26 Jan 2016 16:50:30 +0000 (17:50 +0100)]
deinterlace: Implement reconfiguration a bit better

And e.g. consider reconfiguration caused by RECONFIGURE events too.

https://bugzilla.gnome.org/show_bug.cgi?id=720388

8 years agodeinterlace: Rewrite caps negotiation
Sebastian Dröge [Tue, 26 Jan 2016 10:57:09 +0000 (11:57 +0100)]
deinterlace: Rewrite caps negotiation

Previously the result of the CAPS query and ACCEPT_CAPS depended on what kind
of caps were last set, and e.g. if we last had interlaced caps or not. That's
just broken.

Also previously the handling of non-sysmem caps features was rather random and
unusuable.

Now the behaviour is the following, depending on the mode property:
1) mode=disabled
  Completely do passthrough of everything
2) mode=interlaced
  Only accept formats we can actually deinterlace, and accept interlaced
  and progressive content and always run the deinterlacer and output
  progressive content
3) mode=auto (i.e. playbin)
  Accept all progressive formats as passthrough, accept all formats that we
  can deinterlace ourselves (which we do then), but also accept everything
  else for which we then just passthrough. In auto mode, deinterlacing is best
  effort: If we can, we deinterlace, if we can't we just output interlaced
  content.

https://bugzilla.gnome.org/show_bug.cgi?id=720388
https://bugzilla.gnome.org/show_bug.cgi?id=760553

8 years agodeinterlace: Remove unused, obsolete bufferalloc code
Sebastian Dröge [Tue, 26 Jan 2016 10:34:40 +0000 (11:34 +0100)]
deinterlace: Remove unused, obsolete bufferalloc code

8 years agomatroskamux: use A_AAC instead of A_AAC/MPEGx/y
Matej Knopp [Tue, 26 Jan 2016 17:50:38 +0000 (18:50 +0100)]
matroskamux: use A_AAC instead of A_AAC/MPEGx/y

Some GoogleCast compatible devices ignore A_AAC/MPEGx/y tracks; Also according to http://wiki.multimedia.cx/index.php?title=Matroska A_AAC/MPEGx/y is obsolete

https://bugzilla.gnome.org/show_bug.cgi?id=761144