platform/upstream/gst-plugins-bad.git
6 years agowebrtc: Fix memory leak
Jan Schmidt [Sat, 14 Jul 2018 13:05:53 +0000 (23:05 +1000)]
webrtc: Fix memory leak

Fix a leaked string when building RTX info.

6 years agowebrtc: Clean up and fix transportsendbin
Jan Schmidt [Sat, 14 Jul 2018 13:04:30 +0000 (23:04 +1000)]
webrtc: Clean up and fix transportsendbin

Refactor transportsendbin, and change the way
pads are blocked on dtlssrtpenc so that they
don't interfere with state changes.

As well as being easier to read, this fixes
spurious failures shutting down webrtcbin
if DTLS negotiation hasn't completed yet.

6 years agowebrtc: Move dtlssrtpenc state management
Jan Schmidt [Sat, 14 Jul 2018 13:02:05 +0000 (23:02 +1000)]
webrtc: Move dtlssrtpenc state management

Move the errant piece of dtlssrtpenc state change
management from dtlstransport in the Webrtc libs,
into the transportsendbin that does the rest of
the element management so it's all in one place.

6 years agowebrtc/dtlstransport: Add more debug. Rename category
Jan Schmidt [Mon, 2 Jul 2018 09:55:41 +0000 (19:55 +1000)]
webrtc/dtlstransport: Add more debug. Rename category

Rename the dtlstransport debug category to webrtcdtlstransport.

6 years agoopencv: Fix build for opencv >= 3.4.2
Thibault Saunier [Fri, 13 Jul 2018 18:42:28 +0000 (14:42 -0400)]
opencv: Fix build for opencv >= 3.4.2

The `CV_RGB` macro is now in `imgproc.hpp`.

Fixes:

    ../subprojects/gst-plugins-bad/ext/opencv/gsthanddetect.cpp:497:40: error: ‘CV_RGB’ was not declared in this scope
            cvCircle (img, center, radius, CV_RGB (0, 0, 200), 1, 8, 0);
                                        ^~~~~~

6 years agofind_codec_preferences: use received caps
Mathieu Duponchelle [Sat, 7 Jul 2018 01:40:49 +0000 (03:40 +0200)]
find_codec_preferences: use received caps

When negotiation is triggered by receiving caps on our sink pad
probes, we could encounter a race condition where need-negotiation
is emitted and the application requires the creation of an offer
before the current caps were actually updated.

This led to retrieving incomplete caps when creating the offer,
using find_codec_preferences -> pad_get_current_caps.

Instead, as we save the caps in the probe callback anyway, it is better
and thread safe to use these if they were set.

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

6 years agoglvideomixer: fix default placement when different sized output
Matthew Waters [Thu, 12 Jul 2018 02:48:39 +0000 (12:48 +1000)]
glvideomixer: fix default placement when different sized output

i.e. when expanding from 320x240 to 800x600, the resulting frame should
appear in the top left corner, not the middle.

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

6 years agoglvideomixer: Moves the objects to zero on z axis
Daniel Klamt [Wed, 25 Apr 2018 14:36:21 +0000 (16:36 +0200)]
glvideomixer: Moves the objects to zero on z axis

Matches the output from a similar glimagesink pipeline when
rotating from an upstream gltransformation passed through
the affine transformation meta with xpos/ypos being set.

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

6 years agoglvideomixer: Fix coding style
Nicolas Dufresne [Tue, 10 Jul 2018 13:45:31 +0000 (09:45 -0400)]
glvideomixer: Fix coding style

6 years agoglvideomixer: Add missing string.h include
Nicolas Dufresne [Tue, 10 Jul 2018 13:42:47 +0000 (09:42 -0400)]
glvideomixer: Add missing string.h include

6 years agodecklink: keep the internal time we send to decklink always increasing
Matthew Waters [Sun, 8 Jul 2018 14:54:04 +0000 (09:54 -0500)]
decklink: keep the internal time we send to decklink always increasing

Otherwise decklink seems to hold onto the latest frame and may cause a
flash in the output if the played sequence has a framerate less than the
video output.

Scenario is play for N seconds, pause, flushing seek to some other position,
play again.  Each of the play sequences would normally start at 0 with
the decklink time.  As a result, the latest frame from the previous sequence
is kept alive waiting for it's timestamp to pass before either dropping
(if a subsequent frame in the new sequence overrides it) or displayed
causing the out of place frame to be displayed.

This is also supported by the debug logs from the decklink video sink
element where a ScheduledFrameCompleted() callback would not occur for
the frame until the above had happened.

It was timing related as to whether the frame was displayed based
on the decklink refresh cycle (which seems to be 16ms here),
when the frame was scheduled by the sink and the difference between
the 'time since vblank' of the two play requests (and thus start times
of scheduled playback).

6 years agogl/utils: fix matrix conversion for column majorness
Matthew Waters [Tue, 10 Jul 2018 10:12:15 +0000 (20:12 +1000)]
gl/utils: fix matrix conversion for column majorness

Companion to
https://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=e4bf9ed8f060021151cd57e2b00493ed696cb47b
https://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=16cba63d43f319ac33bc993eca2b1b51679727b3

6 years agoMoved the pad offset and aspect ratio to a matrix so it will be added in view space...
Daniel Klamt [Wed, 25 Apr 2018 14:39:34 +0000 (16:39 +0200)]
Moved the pad offset and aspect ratio to a matrix so it will be added in view space and not in world space

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

6 years agoclosedcaption: Fix compilation on older compilers
Arun Raghavan [Mon, 9 Jul 2018 01:10:29 +0000 (06:40 +0530)]
closedcaption: Fix compilation on older compilers

For when -std=c99 (or later) is not the default.

6 years agobluez: Expose transport volume as a property on avdtpsrc
Arun Raghavan [Mon, 9 Jul 2018 01:10:24 +0000 (06:40 +0530)]
bluez: Expose transport volume as a property on avdtpsrc

This can be handy if we want to track Bluetooth volume changes from the
device, or if we want to set it.

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

6 years agomsdkdec: Fix latency calculation
Sreerenj Balachandran [Wed, 4 Jul 2018 02:38:04 +0000 (18:38 -0800)]
msdkdec: Fix latency calculation

Use async_depth for latency calcuation instead of
the length of Tasks array which could be NULL since we
don't do the msdk decoder init in set_format().

6 years agomsdk: Set 16 bit alignment for width
Sreerenj Balachandran [Tue, 3 Jul 2018 00:50:46 +0000 (16:50 -0800)]
msdk: Set 16 bit alignment for width

According to MediaSDK specification,
Width must be a multiple of 16 and Height must be a multiple
of 16 for progressive frame sequence and a multiple of 32 otherwise.

This patch sets a 16 bit alignment for width and 32 bit alignment
for height as default.

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

6 years agomsdkdec: avoid early destruction of frame in dynamic resolution change
Sreerenj Balachandran [Tue, 3 Jul 2018 00:50:02 +0000 (16:50 -0800)]
msdkdec: avoid early destruction of frame in dynamic resolution change

In cases where we do hard resest, the current code destroys the frame
which has new resolution bit early and this causes buffer_unmap
warnings. Keep an extra ref to the frame internally to avoid this.

6 years agomsdkdec: vc1: Fix handling of advanced profile elementary stream
Sreerenj Balachandran [Tue, 3 Jul 2018 00:49:23 +0000 (16:49 -0800)]
msdkdec: vc1: Fix handling of advanced profile elementary stream

Advanced profile elementary streams may not have codec_data
always. So make sure we don't do anything with null buffer.

6 years agomsdkdec: Fix advanced profile vc1 decode when codec_data presents
Sreerenj Balachandran [Tue, 3 Jul 2018 00:48:11 +0000 (16:48 -0800)]
msdkdec: Fix advanced profile vc1 decode when codec_data presents

The gst-msdk decoders only support packetized formats for
all codecs except VC1. For VC1, it supports codec_data for advanced
profiles and this codec_data wan't submitting to MSDK's DecodeHeader APIs.
Make sure the subclass deocders correctly configured so that
the codec_data buffers are in place in the internal adapter for
MediaSDK's DecoderHeader usage.

6 years agomsdkdec: Fix the PTS of output frames
Sreerenj Balachandran [Tue, 3 Jul 2018 00:42:20 +0000 (16:42 -0800)]
msdkdec: Fix the PTS of output frames

Currently we use the gst_video_decoder_get_oldest_frame()
to get the old pending frame to output. But this is not correct
if pts re-ordering required. This patch uses a custom made
get_old_frame() which accounts the PTS too similar to the
v4l2decoder.

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

6 years agomsdkdec: Remove dead code
Sreerenj Balachandran [Tue, 3 Jul 2018 00:41:58 +0000 (16:41 -0800)]
msdkdec: Remove dead code

We are not using any ExtendedParams for decoding.

6 years agomsdk: dec: Add dynamic-configuration change support
Sreerenj Balachandran [Tue, 3 Jul 2018 00:17:49 +0000 (16:17 -0800)]
msdk: dec: Add dynamic-configuration change support

The patch adds a serios of changes to support dynamic resolution
change and efficient utilization of resources.
Major changes:

-- Use MSDK's apis to retrieve the headers instead of only relying
on upsteram notification. For eg: avc decoder requires SEI header
information for dpb count calculation which we don't get from caps.

-- For all codecs other than VP9, we force the reset of decoder
if resoultion changes to fit with gstreamer flow. VP9 enfource
the hard reset only if the new resolution is bigger.

-- delay the src caps setting till msdk api's invokation in
handle_frame to avoid caching multiple configuration values

-- ensure pool negotiation is based on decoder's allocation_caps.

--dynamic resoluttion change use an explicit allocation_query
to reclaim the buffers before closing the decoder (thanks to v4l2dec)

--In case if we don't get upstream notification of res change (for eg,
this can can happen for vp9 frames with ivfheader where ivfparse
is not able to notify the dynamic changes), we handle the the case
based on MFX_ERR_INCOMPATIBLE_VIDEO_PARAM which is the return value
of MFXVideoDECODE_DecodeFrameAsync

-- calculate the minimum surfaces to be preallocated based on
msdk suggestion, downstream requirement, async depth and scratch surface
count for smooth display.

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

6 years agoplayer: Avoid trying to join the player thread from itself
Roland Jon [Mon, 2 Jul 2018 11:09:19 +0000 (19:09 +0800)]
player: Avoid trying to join the player thread from itself

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

6 years agowebrtc: Explicitly initialise mutex and condition
Jan Schmidt [Sun, 1 Jul 2018 00:44:45 +0000 (10:44 +1000)]
webrtc: Explicitly initialise mutex and condition

Fixes random crashes when an allocated webrtcbin isn't
given fresh 0-filled memory in its allocation. It works
mostly because GMutex and GCond are automatically initialised
in that case.

6 years agowebrtc: Move the transportsendbin pad block removal
Jan Schmidt [Fri, 29 Jun 2018 14:56:29 +0000 (00:56 +1000)]
webrtc: Move the transportsendbin pad block removal

Move freeing of the pad blocks back to before we call the
GstBin state change function, as there's something racy
going on on the build server otherwise, where the pads don't
unblock during downward state changes.

This is a bit of a stab in the dark, since I can't recreate
the build server failure locally.

6 years agoaomenc: Handle 8 bit_depth images with AOM_IMG_FMT_HIGHBITDEPTH enabled
Sean-Der [Wed, 27 Jun 2018 09:48:00 +0000 (09:48 +0000)]
aomenc: Handle 8 bit_depth images with AOM_IMG_FMT_HIGHBITDEPTH enabled

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

6 years agoaomenc: Add support for 10/12bit decoding
Sean-Der [Wed, 27 Jun 2018 09:44:00 +0000 (09:44 +0000)]
aomenc: Add support for 10/12bit decoding

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

6 years agoivfparse: Add the AV01 FOURCC for parsing AV1 IVFs
Georg Ottinger [Tue, 26 Jun 2018 15:45:36 +0000 (17:45 +0200)]
ivfparse: Add the AV01 FOURCC for parsing AV1 IVFs

Adds AV01 FOURCC to the list of allowed media files, in order to allow
parsing the IVF Container holding AV1 content.
At a later point dynamic resolution change can be supported - therefore
the sequence header OBU and frame header OBU of AV1 file must be parsed,
which can be done in future with the help of gst-lib gstav1parse.

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

6 years agomeson: Add fallback for openh264 dependency
Thibault Saunier [Thu, 28 Jun 2018 19:21:12 +0000 (15:21 -0400)]
meson: Add fallback for openh264 dependency

6 years agowebrtc: Clean up pad block allocs on dispose.
Jan Schmidt [Wed, 27 Jun 2018 12:42:12 +0000 (22:42 +1000)]
webrtc: Clean up pad block allocs on dispose.

Release references in pad blocks and release the memory in the
dispose function too, in case the state change doesn't get
run (because calling the parent state change fails).

6 years agowebrtc: Don't deadlock on block pads on shutdown
Jan Schmidt [Tue, 26 Jun 2018 17:05:55 +0000 (03:05 +1000)]
webrtc: Don't deadlock on block pads on shutdown

When changing state downward, we can't set pads
to inactive if they are blocked, it will deadlock
trying to acquire the streaming lock.

Just calling the parent state change function
will do the correct things to unblock probes and
set the pad inactive, so let it do that and
remove the probes after the parent state change
function has run

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

6 years agowinks: Update for g_type_class_add_private() deprecation in recent GLib
Tim-Philipp Müller [Sat, 23 Jun 2018 22:17:26 +0000 (00:17 +0200)]
winks: Update for g_type_class_add_private() deprecation in recent GLib

Untested

6 years agomsdk: Update for g_type_class_add_private() deprecation in recent GLib
Tim-Philipp Müller [Sat, 23 Jun 2018 22:17:26 +0000 (00:17 +0200)]
msdk: Update for g_type_class_add_private() deprecation in recent GLib

Untested.

6 years agolibs: Update for g_type_class_add_private() deprecation in recent GLib
Tim-Philipp Müller [Sat, 23 Jun 2018 22:17:26 +0000 (00:17 +0200)]
libs: Update for g_type_class_add_private() deprecation in recent GLib

6 years agovideoaggregator: Update for g_type_class_add_private() deprecation in recent GLib
Tim-Philipp Müller [Sat, 23 Jun 2018 22:17:26 +0000 (00:17 +0200)]
videoaggregator: Update for g_type_class_add_private() deprecation in recent GLib

6 years agogl: Update for g_type_class_add_private() deprecation in recent GLib
Tim-Philipp Müller [Sat, 23 Jun 2018 22:17:26 +0000 (00:17 +0200)]
gl: Update for g_type_class_add_private() deprecation in recent GLib

6 years agovulkan: Update for g_type_class_add_private() deprecation in recent GLib
Tim-Philipp Müller [Sat, 23 Jun 2018 22:17:26 +0000 (00:17 +0200)]
vulkan: Update for g_type_class_add_private() deprecation in recent GLib

6 years agosoundtouch: Update for g_type_class_add_private() deprecation in recent GLib
Tim-Philipp Müller [Sat, 23 Jun 2018 22:17:26 +0000 (00:17 +0200)]
soundtouch: Update for g_type_class_add_private() deprecation in recent GLib

6 years agodtls: Update for g_type_class_add_private() deprecation in recent GLib
Tim-Philipp Müller [Sat, 23 Jun 2018 22:17:26 +0000 (00:17 +0200)]
dtls: Update for g_type_class_add_private() deprecation in recent GLib

6 years agowebrtc: Update for g_type_class_add_private() deprecation in recent GLib
Tim-Philipp Müller [Sat, 23 Jun 2018 22:17:26 +0000 (00:17 +0200)]
webrtc: Update for g_type_class_add_private() deprecation in recent GLib

6 years agouvch264src: get rid of unnecessary private struct
Tim-Philipp Müller [Sat, 23 Jun 2018 22:07:59 +0000 (00:07 +0200)]
uvch264src: get rid of unnecessary private struct

6 years agojpegformat: get rid of unnecessary private structs
Tim-Philipp Müller [Sat, 23 Jun 2018 21:51:37 +0000 (23:51 +0200)]
jpegformat: get rid of unnecessary private structs

6 years agoext/closedcaption/misc.h: Transform into UTF-8
Olivier Crête [Thu, 21 Jun 2018 12:49:01 +0000 (08:49 -0400)]
ext/closedcaption/misc.h: Transform into UTF-8

6 years agodecklink: Fix warning about HRESULT not being unsigned int
Nirbheek Chauhan [Wed, 20 Jun 2018 06:08:17 +0000 (11:38 +0530)]
decklink: Fix warning about HRESULT not being unsigned int

6 years agotsdemux: Don't set invalid seqnum on segment event
Nicolas Dufresne [Tue, 19 Jun 2018 03:06:18 +0000 (23:06 -0400)]
tsdemux: Don't set invalid seqnum on segment event

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

6 years agopitch: remove trailing whitespaces from previous commit
Mathieu Duponchelle [Mon, 18 Jun 2018 21:42:04 +0000 (23:42 +0200)]
pitch: remove trailing whitespaces from previous commit

6 years agopitch: Flush only if there are unprocessed samples
Suhas Nayak [Mon, 18 Jun 2018 02:09:10 +0000 (07:39 +0530)]
pitch: Flush only if there are unprocessed samples

Otherwise we end up trying to flush before
sample rate of SoundTouch is set

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

6 years agotests: Make sure to provide the KEY_UNIT flag always together with the SNAP flags...
Sebastian Dröge [Mon, 18 Jun 2018 09:18:07 +0000 (12:18 +0300)]
tests: Make sure to provide the KEY_UNIT flag always together with the SNAP flags in seeks

SNAP flags alone make no sense and nowadays cause warnings.

6 years agopitch: preserve seek event seqnums
Mathieu Duponchelle [Sat, 16 Jun 2018 16:23:41 +0000 (18:23 +0200)]
pitch: preserve seek event seqnums

This was wreaking havoc when used with a downstream audiomixer.

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

6 years agopitch: fix latency reporting
Mathieu Duponchelle [Sat, 16 Jun 2018 16:21:58 +0000 (18:21 +0200)]
pitch: fix latency reporting

When max is GST_CLOCK_TIME_NONE in the query, it should not
be set in the query handler, this otherwise could lead to
impossible situations, where the minimum latency ended up
greater than the maximum.

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

6 years agopitch: Fix single input buffer followed by EOS
Mathieu Duponchelle [Sat, 16 Jun 2018 16:19:39 +0000 (18:19 +0200)]
pitch: Fix single input buffer followed by EOS

The flush function immediately returned when pitch->next_buffer_offset
was 0.

This is clearly wrong, as next_buffer_offset can be 0 when a single
input buffer has been received, and no output buffer has been produced
before receiving EOS.

Simply remove that condition.

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

6 years agovideoaggregator: Fix string leak
Seungha Yang [Fri, 15 Jun 2018 13:48:42 +0000 (22:48 +0900)]
videoaggregator: Fix string leak

gst_video_colorimetry_to_string() returns allocated memory which
must be freed.

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

6 years agoandroidmedia: Invert the transform matrix from the decoder
Jan Schmidt [Tue, 6 Mar 2018 13:07:29 +0000 (00:07 +1100)]
androidmedia: Invert the transform matrix from the decoder

The transform from mediacodec applies to the texture coords, but
GStreamer affine meta applies to the video geometry, which is the
opposite - so invert it to get display correct for decoders
that require transforming

6 years agovulkaninstance: add missing precondition to _open()
Matthew Waters [Thu, 8 Feb 2018 06:02:17 +0000 (17:02 +1100)]
vulkaninstance: add missing precondition to _open()

6 years agotsdemux: Don't query duration if program isn't active
Edward Hervey [Tue, 12 Jun 2018 09:14:25 +0000 (11:14 +0200)]
tsdemux: Don't query duration if program isn't active

6 years agogst_webrtc_session_description_new: fix annotations
Mathieu Duponchelle [Mon, 11 Jun 2018 16:34:24 +0000 (18:34 +0200)]
gst_webrtc_session_description_new: fix annotations

6 years agovideoaggregator: log an ERROR if we're going to return a flow error
Tim-Philipp Müller [Mon, 11 Jun 2018 12:48:09 +0000 (13:48 +0100)]
videoaggregator: log an ERROR if we're going to return a flow error

6 years agomsdk: vpp: remove mfxExtVPPDoUse from vpp filters.
Wang,Fei [Thu, 7 Jun 2018 23:31:54 +0000 (15:31 -0800)]
msdk: vpp: remove mfxExtVPPDoUse from vpp filters.

According to msdk spec, there are two ways to enable filters:
1: Filters can be enabled by adding a filter ID
to mfxExtVPPDoUse. In this case, default filter parameters are used
2: Add filter configuration structures directly to mfxVideoParam.

Using 1 with 2 is optional but legal. Unfortunately it won't work
with some specific use cases like Detail/EdgeEnhancement.
Let's stick with option2 which works fine for all VPP operations.

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

6 years agomsdk: vpp: set passthrough from set_caps method for code clarity
Sreerenj Balachandran [Thu, 7 Jun 2018 23:30:23 +0000 (15:30 -0800)]
msdk: vpp: set passthrough from set_caps method for code clarity

Call passthrough setting method from set_caps so that
msdk initialize subroutine looks more clear.

6 years agomskd: vpp: error out gracefully instead of segfaulting if Init failed
Sreerenj Balachandran [Thu, 7 Jun 2018 23:29:29 +0000 (15:29 -0800)]
mskd: vpp: error out gracefully instead of segfaulting if Init failed

Since we do the MSDK initializing in set_caps(), a FALSE
return may still cause the invokation of set_caps() again
and this will leads to buffer allocation and other mess-up.
So make sure the msdk initialized correctly before trying
to do any buffer allocation.

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

6 years agomsdk: vpp: Add filters to VideoParm before doing the Query
Sreerenj Balachandran [Thu, 7 Jun 2018 23:28:44 +0000 (15:28 -0800)]
msdk: vpp: Add filters to VideoParm before doing the Query

Make sure all the enabled filter structures are added in the
mfxVideoParm before doing the VPPQuery so that msdk
can do the input param validation

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

6 years agoexamples: Don't install non-prefixed examples
Nicolas Dufresne [Wed, 6 Jun 2018 18:32:56 +0000 (14:32 -0400)]
examples: Don't install non-prefixed examples

6 years agoexamples: Build waylandsink example
Nicolas Dufresne [Wed, 6 Jun 2018 18:31:43 +0000 (14:31 -0400)]
examples: Build waylandsink example

6 years agompegtsdemux: Fix SEGMENT seqnum propagation
Edward Hervey [Wed, 6 Jun 2018 05:51:19 +0000 (07:51 +0200)]
mpegtsdemux: Fix SEGMENT seqnum propagation

* If the seek was handled upstream, use that SEGMENT seqnum
* Use the proper invalid default value

6 years agovdpau: Run gst-indent
Edward Hervey [Wed, 6 Jun 2018 05:50:21 +0000 (07:50 +0200)]
vdpau: Run gst-indent

6 years agomsdk: vpp: fix the filter count in mfxExtVPPDoUse
Sreerenj Balachandran [Wed, 6 Jun 2018 01:01:13 +0000 (17:01 -0800)]
msdk: vpp: fix the filter count in mfxExtVPPDoUse

Repostion the mfxExtVPPDoUse enabling code
so that it will get the filter algorithm count correctly.

6 years agowebrtc: Fix wrong parent classes for DTLSTransport and ICETransport
Thibault Saunier [Tue, 5 Jun 2018 18:11:13 +0000 (14:11 -0400)]
webrtc: Fix wrong parent classes for DTLSTransport and ICETransport

Those are GObjects not GstBins

6 years agoplayer: Fix duration-changed CRITICAL warning if duration did not actually change
Lyon Wang [Mon, 4 Jun 2018 08:35:41 +0000 (16:35 +0800)]
player: Fix duration-changed CRITICAL warning if duration did not actually change

Check if duration is changed before emitting duration-changed signal

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

6 years agodvb: Fix typo in comment termination
Jan Schmidt [Fri, 1 Jun 2018 07:07:19 +0000 (17:07 +1000)]
dvb: Fix typo in comment termination

6 years agodvb: update my email address
Alessandro Decina [Fri, 1 Jun 2018 06:37:13 +0000 (16:37 +1000)]
dvb: update my email address

6 years agodvb: camconditionalaccess: fix wrong license headers
Alessandro Decina [Fri, 1 Jun 2018 06:30:12 +0000 (16:30 +1000)]
dvb: camconditionalaccess: fix wrong license headers

Update the license blurb in camconditionalaccess.[hc] from GPL to LGPL.
The plugin is LGPL and the GPL header in those two files was just a
copy/paste mistake.

6 years agogitignore: Add h265parser test
Edward Hervey [Fri, 1 Jun 2018 06:20:21 +0000 (08:20 +0200)]
gitignore: Add h265parser test

6 years agocodecparsers: mpeg2: don't mess the StartCode only packets
Sreerenj Balachandran [Fri, 1 Jun 2018 02:21:58 +0000 (18:21 -0800)]
codecparsers: mpeg2: don't mess the StartCode only packets

It is completely legal to have packets with zero sizes.
Zero-sized packet indicates header with only Start Code.
One eg: is user data packet. The patch allows having
GstMpegVideoPacket with zero sizes.

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

6 years agomsdk: vpp: don't use NV12 as vpp default output for DMABuf usecase
Sreerenj Balachandran [Thu, 31 May 2018 00:27:37 +0000 (16:27 -0800)]
msdk: vpp: don't use NV12 as vpp default output for DMABuf usecase

Using NV12 layout in dmabuf mode giving mis-aligned
VPP output with the media-driver. Keep the NV12 support
(so that we can file the bug agianst msdk or mediadriver),
but lower the ordering so that BGRA picks as default.

NV12 issue can be reproduced with explicit capfilter:
vidoetestsrc ! msdkvpp ! video/x-raw\(memory:DMABuf\),format=NV12 ! glimagesink

6 years agomsdk: enc: Add supprot for dmabuf-import
Sreerenj Balachandran [Thu, 31 May 2018 00:26:27 +0000 (16:26 -0800)]
msdk: enc: Add supprot for dmabuf-import

MediaSDK requires all the input buffers to be
pre-allocated during init phase and this won't work with
current design of GStreamer or gst-msdk. But this can be
done in future once we have a solution for:
https://bugzilla.gnome.org/show_bug.cgi?id=795747

There is a workaround possible as per
https://github.com/Intel-Media-SDK/MediaSDK/issues/155#issuecomment-381790504
by faking the mem-id during MFXInit.
This patch enabling it in gst-msdk by replacing the MemID of mfxSurface
with dmabuf-backed vasurface dynamically.

Important: v4l2 ! msdkenc won't work without a copy because
of the GMMLib (https://github.com/intel/gmmlib) memory restrictions.

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

6 years agomsdk: vpp: Add supprot for dmabuf-import
Sreerenj Balachandran [Thu, 31 May 2018 00:24:24 +0000 (16:24 -0800)]
msdk: vpp: Add supprot for dmabuf-import

MediaSDK requires all the input and output buffers to be
pre-allocated during init phase and this won't work with
current design of GStreamer or gst-msdk. But this can be
done with https://bugzilla.gnome.org/show_bug.cgi?id=795747

There is a workaround possible as per
https://github.com/Intel-Media-SDK/MediaSDK/issues/155#issuecomment-381790504
by faking the mem-id during MFXInit.
This patch do this in gst-msdk by replacing the MemID of mfxSurface
with dmabuf-backed vasurface dynamically.

Important: v4l2 ! msdkvpp won't work without a copy because
of the GMMLib (https://github.com/intel/gmmlib) memory restrictions.

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

6 years agomsdk: Add method to replace internal VASurface of mfxFrameSurface
Sreerenj Balachandran [Thu, 31 May 2018 00:23:44 +0000 (16:23 -0800)]
msdk: Add method to replace internal VASurface of mfxFrameSurface

Added a utility method to replace the MemID (interanl VASurfaceID)
associated with the mfxFrameSurface. This is usefull for dmabuf-import
where we need to replace the memID dynamically

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

6 years agomsdk: Add method to export dmabuf to VASurface
Sreerenj Balachandran [Thu, 31 May 2018 00:22:49 +0000 (16:22 -0800)]
msdk: Add method to export dmabuf to VASurface

Exporting DRM_PRIME fd to VASurface requires direct
invocation of VA api VACreateSurface with
VASurfaceAttribExternalBufferDescriptor and other
necessary surface attributes.

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

6 years agowebrtcbin: copy sticky events on our ghostpads
Mathieu Duponchelle [Tue, 29 May 2018 11:03:54 +0000 (13:03 +0200)]
webrtcbin: copy sticky events on our ghostpads

This lets users call gst_pad_get_current_caps on newly-added
pads to easily determine what to plug them into.

We cannot copy sticky events unconditionally in core,
see #719437

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

6 years agoadaptivedemux: Set connection-speed value as current download rate if set
Hosang Lee [Mon, 10 Jul 2017 07:56:26 +0000 (16:56 +0900)]
adaptivedemux: Set connection-speed value as current download rate if set

If connection-speed property is in use, this value should be used as the
current download rate since subclasses might read it to figure out
which playlist variant they will use.

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

6 years agoclosedcaption: Fix compilation without debugging
Edward Hervey [Mon, 28 May 2018 13:55:57 +0000 (15:55 +0200)]
closedcaption: Fix compilation without debugging

6 years agoceaccoverlay: New CEA-708 Closed Caption decoder and overlayer
Edward Hervey [Wed, 11 Mar 2015 10:00:08 +0000 (18:00 +0800)]
ceaccoverlay: New CEA-708 Closed Caption decoder and overlayer

This new element allows decoding and overlaying CEA-708 Closed Caption
streams over video.

* Supports CDP and cc_data closedcaption/x-cea-708 streams
* Uses pango to render CC stream
* Support GstVideoOverlayComposition meta if downstream supports is

Tested on various test files.

Remains to be fixed/improved:
* Switch to GstByteReader (for code safety)
* Switch to GString (instead of manual pango string construction)
* Move pango/rendering code outside of main 708 decoder file (so
  that actual CC parser/decoder can be (re)used in other scenarios).

Initial patches and improvements by:
* CableLabs RUIH-RI Team <ruihri@cablelabs.com>
* Steve Maynard <steve@secondstryke.com>
* cjun.wang" <cjun.wang@samsung.com>

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

6 years agoclosedcaption: fix meson build
Tim-Philipp Müller [Mon, 28 May 2018 13:16:48 +0000 (14:16 +0100)]
closedcaption: fix meson build

6 years agoclosedcaption: Add new "line 21 VBI" CC decoder
Edward Hervey [Mon, 19 Mar 2018 09:56:31 +0000 (10:56 +0100)]
closedcaption: Add new "line 21 VBI" CC decoder

Allows detecting and extracting CEA608 closed caption present on
the VBI of analog NTSC SD signals.

6 years agoclosedcaption: zvbi: Add gst-debug category to zvbi code
Edward Hervey [Mon, 19 Mar 2018 09:55:06 +0000 (10:55 +0100)]
closedcaption: zvbi: Add gst-debug category to zvbi code

And adapt their logging system to go through it

6 years agoclosedcaption: zvbi: Disable unused legacy bit slicer
Edward Hervey [Mon, 19 Mar 2018 09:53:52 +0000 (10:53 +0100)]
closedcaption: zvbi: Disable unused legacy bit slicer

The code only uses the new 'optimized' bit slicer

6 years agoclosedcaption: zvbi: Enforce strict line21 CC detection
Edward Hervey [Mon, 19 Mar 2018 09:52:08 +0000 (10:52 +0100)]
closedcaption: zvbi: Enforce strict line21 CC detection

zvbi switched to a lot more flexible CC detection in VBI.

The problem is that it returns a *lot* of non-VBI lines as containing
CC which isn't the case.

6 years agoclosedcaption: zvbi: Comment out bogus redefinition
Edward Hervey [Thu, 22 Mar 2018 14:35:45 +0000 (15:35 +0100)]
closedcaption: zvbi: Comment out bogus redefinition

All this code should be converted to glib eventually, but for now
just comment out a function which isn't even used

6 years agoclosedcaption: zvbi: Remove dead code
Edward Hervey [Tue, 20 Mar 2018 08:01:25 +0000 (09:01 +0100)]
closedcaption: zvbi: Remove dead code

* RGB8 is never used
* some inline functions were never used

6 years agoclosedcaption: Include zvbi raw vbi decoder code
Edward Hervey [Thu, 15 Mar 2018 06:07:16 +0000 (07:07 +0100)]
closedcaption: Include zvbi raw vbi decoder code

Current code from zapping/zvbi as of 2018-03-14. Files copied
are all LGPL v2+.

Changes from original zvbi code:
* Switch to gst-debug logging system
* Use glib for endianness detection
* Fix compilation warnings

6 years agoclosedcaption: add meson build files
Tim-Philipp Müller [Mon, 28 May 2018 10:09:45 +0000 (11:09 +0100)]
closedcaption: add meson build files

6 years agoext: New ccextractor element
Edward Hervey [Thu, 8 Mar 2018 14:22:47 +0000 (15:22 +0100)]
ext: New ccextractor element

Allows extracting GstVideoCaptionMeta from a stream and outputs
it to a standalone stream.

Part of a new 'ext' closedcaption plugin, since more features are
going to be added, which will depend on external dependencies such
as pango.

6 years agowebrtcbin: rtpstorage takes a 64-bit integer for "size-time" property
Tim-Philipp Müller [Sun, 27 May 2018 19:34:50 +0000 (20:34 +0100)]
webrtcbin: rtpstorage takes a 64-bit integer for "size-time" property

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

6 years agodirectfb: don't error out for warnings in system headers
Tim-Philipp Müller [Fri, 25 May 2018 18:49:34 +0000 (19:49 +0100)]
directfb: don't error out for warnings in system headers

On debian system headers trigger compiler warnings like these,
don't error out on them:
/usr/include/directfb/direct/os/linux/glibc/waitqueue.h:95:1: note: previous definition of ‘direct_waitqueue_signal’ was here

6 years agogitignore: Add new webrtc example
Edward Hervey [Mon, 28 May 2018 08:59:01 +0000 (10:59 +0200)]
gitignore: Add new webrtc example

6 years agowasapisink: recover from low buffer levels in shared mode
Christoph Reiter [Wed, 23 May 2018 19:15:09 +0000 (21:15 +0200)]
wasapisink: recover from low buffer levels in shared mode

In case the wasapi buffer levels got low in shared mode we would still wait until
more buffer is available until writing something in it, which means we could never
catch up and recover.

Instead only wait for a new buffer in case the existing one is full and always write
what we can. Also don't loop until all data is written since the base class can handle
that for us and under normal circumstances this doesn't happen anyway.

This only works in shared mode, as in exclusive mode we have to exactly
fill the buffer and always have to wait first.

This fixes noisy (buffer underrun) playback with the wasapisink under load.

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

6 years agowasapisink: fix a rounding error when calculating the buffer frame count
Christoph Reiter [Thu, 24 May 2018 09:04:08 +0000 (11:04 +0200)]
wasapisink: fix a rounding error when calculating the buffer frame count

The calculation for the frame count in the non-aligned case resulted in
a one too low buffer frame count.

This resulted in:
1) exclusive mode not working as the frame count has to match
   exactly there.
2) Buffer underruns in shared mode as the current write() code doesn't
   handle catching up to low buffer levels (fixed in the next commit)

To fix just use the wasapi API to get the buffer size which will always
be correct.

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

6 years agowasapisink: fix missing unlock in case IAudioClient_Start fails
Christoph Reiter [Wed, 23 May 2018 19:10:00 +0000 (21:10 +0200)]
wasapisink: fix missing unlock in case IAudioClient_Start fails

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

6 years agowasapi: use FAILED to detect errors
Christoph Reiter [Tue, 22 May 2018 20:58:22 +0000 (22:58 +0200)]
wasapi: use FAILED to detect errors

S_FALSE is a valid return value which does not indicate an error.
For example IAudioClient_Stop() returns S_FALSE when it is already stopped.
Use the FAILED macro instead which just checks if an error occured or not.

This fixes spurious warnings when using the wasapisink element.

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