platform/upstream/gst-plugins-good.git
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

8 years agogst: Fix unintialized variable warnings
Víctor Manuel Jáquez Leal [Mon, 25 Jan 2016 16:21:24 +0000 (17:21 +0100)]
gst: Fix unintialized variable warnings

While cross-compiling with Linaro GCC 5.1-2015.08, it complained
about a couple unitialized variables.

This patch initializes them to zero.

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

8 years agosplitmuxsrc: print potentially negative offset with a sign
George Kiagiadakis [Mon, 25 Jan 2016 14:03:23 +0000 (15:03 +0100)]
splitmuxsrc: print potentially negative offset with a sign

8 years agov4l2: Re-add colorimetry field for RGB formats
Nicolas Dufresne [Thu, 21 Jan 2016 22:41:55 +0000 (17:41 -0500)]
v4l2: Re-add colorimetry field for RGB formats

This time, check if it's an RGB format and sets the transformation
matrix to identity. The rest of the colorimetry information is
meaningfull and shall be kept.

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

8 years agov4l2: fix sRGB colorspace definition
Wim Taymans [Fri, 22 Jan 2016 09:03:50 +0000 (10:03 +0100)]
v4l2: fix sRGB colorspace definition

V4l2 can also use the sRGB colorspace for YUV formats and thus needs a
default matrix.

8 years agotaginject: fix sample pipeline in docs
Tim-Philipp Müller [Thu, 21 Jan 2016 15:29:46 +0000 (15:29 +0000)]
taginject: fix sample pipeline in docs

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

8 years agov4l2: Add adobe colorspace support
Wim Taymans [Thu, 21 Jan 2016 09:49:44 +0000 (10:49 +0100)]
v4l2: Add adobe colorspace support

Use the new primaries and transfer function for Adobe RGB.
Explicitly list the colorimetry instead of using the default GStreamer
ones. The defaults for BT2020, for example, do not match.
Explicitly set the matrix of SRGB to RGB.

8 years agovp8enc: Ensure that we always have valid frame user data before using it
Sebastian Dröge [Wed, 20 Jan 2016 11:41:33 +0000 (13:41 +0200)]
vp8enc: Ensure that we always have valid frame user data before using it

Otherwise we're going to dereference NULL pointers.

8 years agovpxdec: Unref frame in all code paths of handle_frame()
Sebastian Dröge [Wed, 20 Jan 2016 08:02:48 +0000 (10:02 +0200)]
vpxdec: Unref frame in all code paths of handle_frame()

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

8 years agovpxenc: Unref frame on ERROR
Thibault Saunier [Tue, 19 Jan 2016 21:49:20 +0000 (22:49 +0100)]
vpxenc: Unref frame on ERROR

All code paths for handle_frame() must somehow take ownership of the frame, be
it by actually unreffing, forwarding the frame elsewhere or storing it for
later.

http://bugzilla.gnome.org/show_bug.cgi?id=760666

8 years agov4l2: Don't free props structure twice.
Jan Schmidt [Wed, 20 Jan 2016 07:20:43 +0000 (18:20 +1100)]
v4l2: Don't free props structure twice.

gst_v4l2_device_provider_probe_device() frees the passed props
structure, don't free it again in the caller.

8 years agov4l2object: Cleanup uneeded return statement
Nicolas Dufresne [Tue, 19 Jan 2016 20:15:35 +0000 (15:15 -0500)]
v4l2object: Cleanup uneeded return statement

8 years agov4l2object: Don't set colorimetry for non YUV formats
Nicolas Dufresne [Tue, 19 Jan 2016 20:14:59 +0000 (15:14 -0500)]
v4l2object: Don't set colorimetry for non YUV formats

Setting colormetry in caps for RGB have no meaning, but worst it
confuses the converters downstream.

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

8 years agortp: fix compiler warnings with gcc-6
Tim-Philipp Müller [Tue, 19 Jan 2016 13:01:17 +0000 (13:01 +0000)]
rtp: fix compiler warnings with gcc-6

In file included from gstrtpL16depay.h:27:0,
                 from gstrtp.c:73:
gstrtpchannels.h:154:33: error: 'channel_orders' defined but not used [-Werror=unused-const-variable]
 static const GstRTPChannelOrder channel_orders[] =

8 years agowavparse: Don't play anything after the end of the data chunk even when seeking
Sebastian Dröge [Tue, 19 Jan 2016 12:57:03 +0000 (14:57 +0200)]
wavparse: Don't play anything after the end of the data chunk even when seeking

Especially in push mode we would completely ignore the size of the data chunk
when not stop position is given for the seek. Instead make sure that the end
offset is at most the end of the data chunk if known.

Without this we would output anything after the data chunk, possibly causing
loud noises if the media file is followed by an INFO chunk or an ID3 tag.

8 years agowavparse: Don't do calculations with -1 offsets when handling SEGMENT events
Sebastian Dröge [Tue, 19 Jan 2016 12:55:57 +0000 (14:55 +0200)]
wavparse: Don't do calculations with -1 offsets when handling SEGMENT events

We use that to signal "infinity", taking the difference between that and some
other value is not going to give us any useful result for the end offsets of
segments.

8 years agoRevert "WIP: rtpjitterbuffer: Add RFC7273 media clock handling"
Sebastian Dröge [Mon, 18 Jan 2016 09:30:45 +0000 (11:30 +0200)]
Revert "WIP: rtpjitterbuffer: Add RFC7273 media clock handling"

This reverts commit 271501f6576de4d141e7c2f618e28b9e3b1e5b38.

It wasn't meant to be pushed yet as the commit message indicates.

8 years agortspsrc: handle rtcp/srtcp caps properly when using interleaved data
Aleix Conchillo Flaqué [Tue, 12 Jan 2016 22:01:21 +0000 (14:01 -0800)]
rtspsrc: handle rtcp/srtcp caps properly when using interleaved data

We check the stream profile and use the proper RTCP caps:
application/x-srtcp if we are using a secure profile and
application/x-rtcp otherwise.

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

8 years agoWIP: rtpjitterbuffer: Add RFC7273 media clock handling
Sebastian Dröge [Tue, 5 Jan 2016 14:15:16 +0000 (16:15 +0200)]
WIP: rtpjitterbuffer: Add RFC7273 media clock handling

8 years agovp8enc: Return FLOW_ERROR when an error accures
Thibault Saunier [Fri, 15 Jan 2016 11:36:35 +0000 (11:36 +0000)]
vp8enc: Return FLOW_ERROR when an error accures

FALSE would mean FLOW_OK

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

8 years agoosxaudio: break as soon as the device is found
Nirbheek Chauhan [Thu, 14 Jan 2016 22:27:45 +0000 (03:57 +0530)]
osxaudio: break as soon as the device is found

No need to loop further if there's no side-effects for it

8 years agoosxaudio: Fix error handling when selecting/opening devices
Nirbheek Chauhan [Thu, 14 Jan 2016 22:26:49 +0000 (03:56 +0530)]
osxaudio: Fix error handling when selecting/opening devices

Post an element error when the CoreAudio device cannot be selected or opened.
Also ensure that we post a GST_ERROR with more detail.

8 years agowavparse: When flushing on EOS, don't process more data than the "data" size
Sebastian Dröge [Wed, 13 Jan 2016 22:40:20 +0000 (23:40 +0100)]
wavparse: When flushing on EOS, don't process more data than the "data" size

Even if we have more data queued up when flushing than the size of the data
chunk, don't process and output it. If the data size is known, this likely
contains another chunk (e.g. an INFO chunk) or things like ID3 tags. Just
outputting them as if they were data is going to cause unexpected behaviour
and unpleasant audio noises.

8 years agotests: fix a thinko in the wavenc example
Antonio Ospite [Fri, 29 Aug 2014 13:40:23 +0000 (15:40 +0200)]
tests: fix a thinko in the wavenc example

The code is supposed to follow somehow what the comment above says, that
is to have one channel with a wave of freq 440 and the other channel
with a wave of freq 880, but an off by one error results in frequencies
of 0 and 440.

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

8 years agointerleave: Fix the example by setting channel-masks in the sink pads
Antonio Ospite [Fri, 29 Aug 2014 13:07:58 +0000 (15:07 +0200)]
interleave: Fix the example by setting channel-masks in the sink pads

The current example does not work, it fails with:

ERROR: from element /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstWavParse:wavparse0: Internal data flow error.
gstwavparse.c(2178): gst_wavparse_loop (): /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstWavParse:wavparse0:
streaming task paused, reason not-negotiated (-4)

This is because negotiation with wavenc gets messed up by the missing
channel positions configuration.

The proper way to define the channel layout when using the interleave
element in code would be to set the channel-positions property, but
gst-launch-1.0 does not know how to deal with arrays; so the example
pipeline works around the issue by setting the channel-masks in the sink
pads.

Also fix a repetition in the deinterleave example description

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

8 years agosbcparse: Fix frame length calculation
Tim Sheridan [Mon, 11 Jan 2016 16:29:55 +0000 (16:29 +0000)]
sbcparse: Fix frame length calculation

SBC frame length calculation wasn't being rounded up to the nearest byte
(as specified in the A2DP 1.0 specification, section 12.9). This could
cause 'stereo' and 'joint stereo' mode SBC streams to have incorrectly
calculated frame lengths.

Incorrect frame length calculation causes frame coalescing to fail, as
subsequent frames in the stream aren't found in the expected locations.

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

8 years agoflacparse: demote warning on wrong reserved value to fixme
Reynaldo H. Verdejo Pinochet [Mon, 11 Jan 2016 06:54:12 +0000 (22:54 -0800)]
flacparse: demote warning on wrong reserved value to fixme

We are likely just parsing a backward-compatible stream we
don't fully support.

8 years agoimagefreeze: simplify caps selection
Thiago Santos [Fri, 8 Jan 2016 19:27:05 +0000 (16:27 -0300)]
imagefreeze: simplify caps selection

The downstream caps query with a filter alraedy gives us the possible
intersection so there is no need to check it again with downstream
if it is supported. Just try to set it directly.

8 years agortph264depay: fix unnecessary sub-buffer creation
Tim-Philipp Müller [Thu, 7 Jan 2016 20:42:41 +0000 (20:42 +0000)]
rtph264depay: fix unnecessary 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 agortpdvdepay: fix unnecessary sub-buffer creation
Tim-Philipp Müller [Thu, 7 Jan 2016 20:38:27 +0000 (20:38 +0000)]
rtpdvdepay: fix unnecessary 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 agortpamrdepay: fix unnecessary sub-buffer creation
Tim-Philipp Müller [Thu, 7 Jan 2016 20:34:05 +0000 (20:34 +0000)]
rtpamrdepay: fix unnecessary 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 agortpvrawdepay: fix major memory leak and performance issue
Tim-Philipp Müller [Thu, 7 Jan 2016 20:27:29 +0000 (20:27 +0000)]
rtpvrawdepay: fix major memory leak and performance issue

We call gst_rtp_buffer_get_payload() which creates a sub-buffer
of each input buffer, just to copy over metas, and then leak it.

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