platform/upstream/gstreamer.git
5 years agocompositor: Implement different operators via per-pad property
Sebastian Dröge [Sat, 27 Oct 2018 15:44:27 +0000 (16:44 +0100)]
compositor: Implement different operators via per-pad property

This removes the crossfade-ratio property and replaces it with an
operator property. Currently this implements the following operators:

- SOURCE: Copy over the source and don't look at the destination
- OVER: Default blending of the source over the destination
- ADD: Like OVER but simply adding the alpha instead

See the example for how to implement crossfading with this.

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

5 years agomeson: Add a feature option for the MSDK plugin
Nirbheek Chauhan [Sun, 28 Oct 2018 14:54:52 +0000 (14:54 +0000)]
meson: Add a feature option for the MSDK plugin

5 years agomeson: add 'curl-ssh2' option for curl libssh2 support
Tim-Philipp Müller [Sun, 28 Oct 2018 11:53:42 +0000 (11:53 +0000)]
meson: add 'curl-ssh2' option for curl libssh2 support

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

5 years agomeson: Use the 'curl' feature option
Xavier Claessens [Sun, 28 Oct 2018 10:47:38 +0000 (06:47 -0400)]
meson: Use the 'curl' feature option

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

5 years agompegts: Use gst and gst_mpegts as symbol prefix in the meson build
Sebastian Dröge [Sun, 28 Oct 2018 11:07:47 +0000 (11:07 +0000)]
mpegts: Use gst and gst_mpegts as symbol prefix in the meson build

Just like we do in the autotools build.

5 years agodshowsrcwrapper: add device-index property to sources
Joshua M. Doe [Thu, 11 Oct 2018 16:45:21 +0000 (12:45 -0400)]
dshowsrcwrapper: add device-index property to sources

This allows users to more easily select different devices without having
to first get the device or device-name.

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

5 years agodshowsrcwrapper: update CMake build instructions
Joshua M. Doe [Wed, 24 Oct 2018 18:16:38 +0000 (14:16 -0400)]
dshowsrcwrapper: update CMake build instructions

GStreamer 1.8 is minimum version, and remove paragraph about 32 vs 64-bit build

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

5 years agodshowsrcwrapper: support building 32- and 64-bit with CMake
Joshua M. Doe [Wed, 24 Oct 2018 18:15:08 +0000 (14:15 -0400)]
dshowsrcwrapper: support building 32- and 64-bit with CMake

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

5 years agodshowsrcwrapper: add debug category for general dshowsrcwrapper
Joshua M. Doe [Thu, 11 Oct 2018 15:17:11 +0000 (11:17 -0400)]
dshowsrcwrapper: add debug category for general dshowsrcwrapper

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

5 years agocheck: Disable mssdemux unit test for now
Edward Hervey [Sat, 27 Oct 2018 15:55:54 +0000 (17:55 +0200)]
check: Disable mssdemux unit test for now

This is for the same reason as the dash tests. This should ideally
be converted to gst-validate tests. These tests randomly timeout also
due to the tests doing seeks from the streaming thread (sic).

5 years agompegts: Add boxed type for DVB CableDeliverySystem descriptor
Sebastian Dröge [Sat, 27 Oct 2018 12:57:45 +0000 (13:57 +0100)]
mpegts: Add boxed type for DVB CableDeliverySystem descriptor

5 years agocompositor: Remove extra header for the pad declaration
Sebastian Dröge [Sat, 27 Oct 2018 11:37:07 +0000 (12:37 +0100)]
compositor: Remove extra header for the pad declaration

There's no reason for having this separate apart from making things less
discoverable.

5 years agotests: Disable most gstplayer tests for now
Edward Hervey [Sat, 27 Oct 2018 11:37:38 +0000 (13:37 +0200)]
tests: Disable most gstplayer tests for now

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

5 years agowebrtcbin: options is a placeholder argument
Luis de Bethencourt [Fri, 26 Oct 2018 14:15:41 +0000 (15:15 +0100)]
webrtcbin: options is a placeholder argument

Make it clear this unused argument is there for planned future use.

5 years agowebrtcbin: ws-semantic is not supported
Luis de Bethencourt [Fri, 26 Oct 2018 13:36:37 +0000 (14:36 +0100)]
webrtcbin: ws-semantic is not supported

Don't offer something that isn't supported.

5 years agoplayer: Don't set state to READY if we're already stopped
Sebastian Dröge [Wed, 24 Oct 2018 13:34:13 +0000 (14:34 +0100)]
player: Don't set state to READY if we're already stopped

Otherwise setting an URI after creation will already set the state
to READY/buffering and disallow setting the configuration.

See https://github.com/servo/servo/issues/22010

5 years agohls: Remove stray '\n' from debug statement
Edward Hervey [Mon, 22 Oct 2018 07:59:24 +0000 (09:59 +0200)]
hls: Remove stray '\n' from debug statement

5 years agoRevert "srtpdec: also check for "roc" in caps"
Olivier Crête [Wed, 17 Oct 2018 22:33:12 +0000 (18:33 -0400)]
Revert "srtpdec: also check for "roc" in caps"

This reverts commit 73ebdb888e047b14ceea19ce1a0bbbeff0cd7b2a.

This isn't needed and it breaks srtpenc ! srtpdec, specifying the
roll-over counter manually is an advanced feature.

Also revert "srtp: Add "roc" caps field to the gst-launch example"
This reverts commit 67ae35813bff9362065bbfec770f3fdbb89165a3.

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

5 years agomeson: Replace empty configuration_data() with copy keyword
Seungha Yang [Wed, 17 Oct 2018 12:09:22 +0000 (21:09 +0900)]
meson: Replace empty configuration_data() with copy keyword

Use 'copy' keyword to avoid meson warning message.
Note that 'copy' keyword in configure_file() is available
since meson 0.47.0

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

5 years agosctp: link against ws2_32 on windows
Matthew Waters [Wed, 17 Oct 2018 10:04:51 +0000 (21:04 +1100)]
sctp: link against ws2_32 on windows

ext/sctp/ext@sctp@@gstsctp@sha/sctpassociation.c.obj: In function `receive_cb':
/var/lib/jenkins/workspace/cerbero-cross-mingw32/workdir/sources/windows_x86/gst-plugins-bad-1.0-1.15.0.1/_builddir/../ext/sctp/sctpassociation.c:692: undefined reference to `_imp__ntohl@4'

5 years agowebrtcbin: implement support for group: BUNDLE
Mathieu Duponchelle [Thu, 13 Sep 2018 22:08:34 +0000 (00:08 +0200)]
webrtcbin: implement support for group: BUNDLE

5 years agoav1enc: Add to configure image formats
Wonchul Lee [Sun, 7 Oct 2018 07:19:03 +0000 (16:19 +0900)]
av1enc: Add to configure image formats

Expanded to support image format to YV12/I422/I444. It's related to the
color bit-depth and profile of the codec. It can make configuring
appropriate profile according to bit-depth and format.

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

5 years agoav1enc: fix compliation with removed defines
Wonchul Lee [Wed, 3 Oct 2018 08:13:32 +0000 (17:13 +0900)]
av1enc: fix compliation with removed defines

AOM_FRAME_IS_INVISIBLE is unused and remove in aom_encoder.h

https://aomedia-review.googlesource.com/c/aom/+/70421

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

5 years agoav1enc: Add configurations
Wonchul Lee [Mon, 30 Jul 2018 14:31:00 +0000 (23:31 +0900)]
av1enc: Add configurations

Added rate control and profile related configuration. The profile
configuration has been copied from vpx.

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

5 years agoshmsrc: delay fd removal until there's no uses
Josep Torra [Tue, 9 Oct 2018 14:59:54 +0000 (16:59 +0200)]
shmsrc: delay fd removal until there's no uses

This fixes the remaining race condition with the fd by delaying
the removal until last pipe ref.

Unexpected critical/warning: gst_poll_fd_has_error: assertion 'fd->fd
>= 0' failed

Stack trace:
gst_debug_get_stack_trace (gstinfo.c:2788)
gst_check_log_critical_func (gstcheck.c:281)
g_logv (/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2:0x7fdd4efa0a40)
g_log (/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2:0x7fdd4efa0c6b)
gst_poll_fd_has_error (gstpoll.c:1217)
gst_shm_src_create (gstshmsrc.c:364)
gst_push_src_create (gstpushsrc.c:131)
gst_base_src_get_range (gstbasesrc.c:2521)
gst_base_src_loop (gstbasesrc.c:2845)
gst_task_func (gsttask.c:328)
default_func (gsttaskpool.c:69)

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

5 years agoshmsrc: fixes a crash when is-live is true due a race condition
Josep Torra [Fri, 28 Sep 2018 11:35:49 +0000 (13:35 +0200)]
shmsrc: fixes a crash when is-live is true due a race condition

There's a race condition when is-live is set to true and the shmsrc
element releases the pipe in the transition from PLAYING to PAUSED.
To avoid it this change ensures that _create method takes the pipe
and increases the use_count in one operation protected by object lock.
Also perform apropriate protections when releasing the pipe.

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

5 years agotests: shm: add an end to end test for live reception
Josep Torra [Fri, 28 Sep 2018 11:23:38 +0000 (13:23 +0200)]
tests: shm: add an end to end test for live reception

Add a unit test to exchange data between two pipelines with shmsrc
acting as a live source.

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

5 years agoshmsrc: Remove commented out code
Olivier Crête [Wed, 10 Oct 2018 17:07:50 +0000 (13:07 -0400)]
shmsrc: Remove commented out code

5 years agoshmsink: do not keep locking if element is unlocked
Aleix Conchillo Flaqué [Mon, 8 Oct 2018 20:56:56 +0000 (13:56 -0700)]
shmsink: do not keep locking if element is unlocked

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

5 years agomeson: use new 'python' module instead of deprecated 'python3' one
Tim-Philipp Müller [Mon, 8 Oct 2018 19:53:17 +0000 (20:53 +0100)]
meson: use new 'python' module instead of deprecated 'python3' one

https://github.com/mesonbuild/meson/pull/4169

5 years agowebrtc/datachannel: fix support for prenegotiated channels
Matthew Waters [Mon, 8 Oct 2018 15:38:14 +0000 (02:38 +1100)]
webrtc/datachannel: fix support for prenegotiated channels

With prenegotiated channels, the data-channel protocol is not used and
instead the channel's negotiation is intended to be performed out of band in
some application-specific manner.

Comes with test!

5 years agowebrtc: start in the closed state
Matthew Waters [Mon, 8 Oct 2018 10:56:31 +0000 (21:56 +1100)]
webrtc: start in the closed state

This means that we will reject all operations before we've transitioned
into READY.

This also fixes the tests using the default GMainContext in the NULL
state instead of the webrtcbin internal GMainContext and thread.  Also
removes a potential ordering race where on the element transitioning to
READY, an operations could have been queued on two different threads and
removing a guarentee on operation ordering.

5 years agowebrtcbin: start and stop thread when changing state
Aleix Conchillo Flaqué [Fri, 5 Oct 2018 19:10:06 +0000 (12:10 -0700)]
webrtcbin: start and stop thread when changing state

It might be possible that if we set webrtcbin to the NULL state some
tasks (idle sources) are still executed and they might even freeze. The freeze
is caused because the webrtcbin tasks don't hold a reference to webrtcbin and
if it's last unref inside the idle source itself this will not allow the main
loop to finish because the main loop is waiting on the idle source to finish.

We now start and stop webrtcbin thread when changing states. This will allow
the idle sources to finish properly.

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

5 years agoglvideomixer: fix the default blend modes for unpremultipled alpha
Matthew Waters [Thu, 4 Oct 2018 13:45:49 +0000 (23:45 +1000)]
glvideomixer: fix the default blend modes for unpremultipled alpha

Alpha in GStreamer is unpremultiplied

5 years agoavwait: Fix sending of dropping=true messages
Vivia Nikolaidou [Thu, 4 Oct 2018 09:07:31 +0000 (12:07 +0300)]
avwait: Fix sending of dropping=true messages

If the first audio buffer to be dropped started right between two video
buffers (after the end of the first but before the start of the second,
as is often the case with N/1001 video frame rates), we would miss
sending the dropping=true message.

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

5 years agotests/webrtcbin: add a couple more dependant element checks
Matthew Waters [Thu, 4 Oct 2018 06:29:25 +0000 (16:29 +1000)]
tests/webrtcbin: add a couple more dependant element checks

Without the sctp elements, all the data channel tests will fail

5 years agoglmixerbin: add gloverlaycompositor to each input stream
Matthew Waters [Thu, 27 Sep 2018 06:37:28 +0000 (16:37 +1000)]
glmixerbin: add gloverlaycompositor to each input stream

Flattens the overlay compositions into the stream before the mixer will
mix them.

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

5 years agoglstereomix: Fix build after deprecating misnamed GST_TYPE_GL_STEREO_DOWNMIX_MODE_TYPE
Sebastian Dröge [Wed, 3 Oct 2018 13:00:23 +0000 (16:00 +0300)]
glstereomix: Fix build after deprecating misnamed GST_TYPE_GL_STEREO_DOWNMIX_MODE_TYPE

5 years agomsdk: Fix building on MSVC
Seungha Yang [Thu, 27 Sep 2018 06:24:20 +0000 (15:24 +0900)]
msdk: Fix building on MSVC

And add missing #ifdef _WIN32 for MSVC build

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

5 years agomsdk: Fix meson build
Seungha Yang [Thu, 27 Sep 2018 05:42:44 +0000 (14:42 +0900)]
msdk: Fix meson build

gst-plugins-bad\sys\msdk\meson.build:57:4: ERROR:  File msdk-enum.c does not exist.

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

5 years agompegtsmux: add custom AC-3 descriptor
Mathieu Duponchelle [Thu, 27 Sep 2018 15:15:20 +0000 (17:15 +0200)]
mpegtsmux: add custom AC-3 descriptor

tsdemux expects a custom descriptor (GST_MTS_DESC_AC3_AUDIO_STREAM)
to detect a stream as AC3 and not EAC3.

Note that tsdemux expects this descriptor because mpegtsmux writes
a stream with a HDMV registration descriptor.

Fixes:

gst-launch-1.0 -v audiotestsrc ! avenc_ac3 ! ac3parse ! mpegtsmux ! \
tsdemux ! ac3parse ! avdec_ac3 ! audioconvert ! autoaudiosink

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

5 years agowebrtcdatachannel: take ref of data so it doesn't disappear
Matthew Waters [Wed, 26 Sep 2018 06:00:50 +0000 (16:00 +1000)]
webrtcdatachannel: take ref of data so it doesn't disappear

5 years agoglmixerbin: "latency" property on aggregator is uint64, not int64
Sebastian Dröge [Mon, 24 Sep 2018 20:26:10 +0000 (23:26 +0300)]
glmixerbin: "latency" property on aggregator is uint64, not int64

Also update the property description and range with aggregator's values.

5 years agoplayer: fix deprecated api declaration
Tim-Philipp Müller [Mon, 24 Sep 2018 13:40:31 +0000 (14:40 +0100)]
player: fix deprecated api declaration

5 years agolibs: fix API export/import and 'inconsistent linkage' on MSVC
Tim-Philipp Müller [Mon, 24 Sep 2018 10:52:22 +0000 (11:52 +0100)]
libs: fix API export/import and 'inconsistent linkage' on MSVC

For each lib we build export its own API in headers when we're
building it, otherwise import the API from the headers.

This fixes linker warnings on Windows when building with MSVC.

The problem was that we had defined all GST_*_API decorators
unconditionally to GST_EXPORT. This was intentional and only
supposed to be temporary, but caused linker warnings because
we tell the linker that we want to export all symbols even
those from externall DLLs, and when the linker notices that
they were in external DLLS and not present locally it warns.

What we need to do when building each library is: export
the library's own symbols and import all other symbols. To
this end we define e.g. BUILDING_GST_FOO and then we define
the GST_FOO_API decorator either to export or to import
symbols depending on whether BUILDING_GST_FOO is set or not.
That way external users of each library API automatically
get the import.

While we're at it, add new GST_API_EXPORT in config.h and use
that for GST_*_API decorators instead of GST_EXPORT.

The right export define depends on the toolchain and whether
we're using -fvisibility=hidden or not, so it's better to set it
to the right thing directly than hard-coding a compiler whitelist
in the public header.

We put the export define into config.h instead of passing it via the
command line to the compiler because it might contain spaces and brackets
and in the autotools scenario we'd have to pass that through multiple
layers of plumbing and Makefile/shell escaping and we're just not going
to be *that* lucky.

The export define is only used if we're compiling our lib, not by external
users of the lib headers, so it's not a problem to put it into config.h

Also, this means all .c files of libs need to include config.h
to get the export marker defined, so fix up a few that didn't
include config.h.

This commit depends on a common submodule commit that makes gst-glib-gen.mak
add an #include "config.h" to generated enum/marshal .c files for the
autotools build.

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

5 years agodocs: plugins: update for git master
Tim-Philipp Müller [Mon, 24 Sep 2018 09:59:16 +0000 (10:59 +0100)]
docs: plugins: update for git master

5 years agopkgconfig: generate sctp lib .pc file also with Meson build
Tim-Philipp Müller [Sat, 22 Sep 2018 18:49:13 +0000 (19:49 +0100)]
pkgconfig: generate sctp lib .pc file also with Meson build

and fix up autotools definition now that it's not conditional
any more.

5 years agopkgconfig: sctp lib does not depend on external sctp library
Tim-Philipp Müller [Sat, 22 Sep 2018 16:37:42 +0000 (17:37 +0100)]
pkgconfig: sctp lib does not depend on external sctp library

So install .pc files unconditionally.

5 years agolibs: dist new sctp lib
Tim-Philipp Müller [Fri, 21 Sep 2018 14:04:01 +0000 (15:04 +0100)]
libs: dist new sctp lib

5 years agoavwait: Send dropping=true message after all streams stopped
Vivia Nikolaidou [Fri, 14 Sep 2018 13:05:20 +0000 (16:05 +0300)]
avwait: Send dropping=true message after all streams stopped

Previously it was dispatched before the last video buffer, and audio
buffers would follow afterwards. It's misleading to send the
dropping=true message before both streams have really stopped, it can
lead to races when someone is e.g. waiting for that message to send EOS.

Also added some debug output.

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

5 years agogst-libs: Always build sctp mini-library
Edward Hervey [Fri, 21 Sep 2018 12:56:52 +0000 (14:56 +0200)]
gst-libs: Always build sctp mini-library

It doesn't depend on any external library

5 years agoglvideomixer: fix constant alpha enum value for constant alpha
Matthew Waters [Wed, 19 Sep 2018 08:01:26 +0000 (18:01 +1000)]
glvideomixer: fix constant alpha enum value for constant alpha

5 years agowebrtcbin: add support for data channels based on SCTP
Matthew Waters [Mon, 10 Sep 2018 13:52:05 +0000 (23:52 +1000)]
webrtcbin: add support for data channels based on SCTP

Mostly follows the W3C specification
https://www.w3.org/TR/webrtc/#peer-to-peer-data-api

With contributions from:
Mathieu Duponchelle <mathieu@centricular.com>

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

5 years agowebrtcbin: functionify dependent element checks
Matthew Waters [Mon, 10 Sep 2018 13:30:56 +0000 (23:30 +1000)]
webrtcbin: functionify dependent element checks

5 years agowebrtc/stats: rename debug category not to be ice related
Matthew Waters [Mon, 10 Sep 2018 13:27:08 +0000 (23:27 +1000)]
webrtc/stats: rename debug category not to be ice related

5 years agosctp elements: avoid assertions on shutdown
Mathieu Duponchelle [Thu, 13 Sep 2018 17:56:47 +0000 (19:56 +0200)]
sctp elements: avoid assertions on shutdown

5 years agosctp*meta: fix api define in gst_sctp_buffer_get_*_meta()
Matthew Waters [Mon, 10 Sep 2018 13:25:36 +0000 (23:25 +1000)]
sctp*meta: fix api define in gst_sctp_buffer_get_*_meta()

5 years agosctpassociation: don't join a NULL thread
Matthew Waters [Mon, 10 Sep 2018 13:24:21 +0000 (23:24 +1000)]
sctpassociation: don't join a NULL thread

Can occur if no connection is actually made and thus no connection
thread is created.

5 years agosctpenc: don't require caps when requesting the pad
Matthew Waters [Mon, 10 Sep 2018 13:23:43 +0000 (23:23 +1000)]
sctpenc: don't require caps when requesting the pad

They can be set later

5 years agosctpenc: start pad task after the parent has activated pads
Matthew Waters [Mon, 10 Sep 2018 13:21:52 +0000 (23:21 +1000)]
sctpenc: start pad task after the parent has activated pads

Fixes a race where the task could attempt to set
stream-start/caps/segment before the pad was active and would be
dropped resulting in a 'data-flow before stream-start' warning.

5 years agoUpdate sctp plugin for the current build system
Matthew Waters [Thu, 6 Sep 2018 07:27:27 +0000 (17:27 +1000)]
Update sctp plugin for the current build system

- Add meson build definitions
- Add necessary API decorators

5 years agoAdd new SCTP plugins (sctpenc/sctpdec)
George Kiagiadakis [Wed, 4 Feb 2015 16:12:48 +0000 (17:12 +0100)]
Add new SCTP plugins (sctpenc/sctpdec)

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

5 years agowebrtcice: do not run host resolution from applictation thread
Mathieu Duponchelle [Tue, 28 Aug 2018 16:48:48 +0000 (18:48 +0200)]
webrtcice: do not run host resolution from applictation thread

g_resolver_lookup_by_name is a blocking call, and should not
be run when the user sets or adds a turn-server.

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

5 years agowebrtcbin: New add-turn-server API
Mathieu Duponchelle [Wed, 22 Aug 2018 17:05:02 +0000 (19:05 +0200)]
webrtcbin: New add-turn-server API

It is possible and often desirable to pass multiple ICE relays
to libnice agents, the "turn-server" property, while convenient
to use from the command line, does not allow that.

This adds a new action signal, "add-turn-server" to address that.

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

5 years agomeson: add glib-checks option to disable API guards and such
Tim-Philipp Müller [Wed, 19 Sep 2018 11:02:19 +0000 (12:02 +0100)]
meson: add glib-checks option to disable API guards and such

We want this enabled by default, also in releases, but people
may want to disable this for performance-critical workloads or
on embedded devices.

5 years agomeson: fix missing closing bracket in option descriptions
Tim-Philipp Müller [Wed, 19 Sep 2018 11:01:47 +0000 (12:01 +0100)]
meson: fix missing closing bracket in option descriptions

5 years agoglvideomixer: Fix typo in property description
Sebastian Dröge [Wed, 19 Sep 2018 07:28:56 +0000 (10:28 +0300)]
glvideomixer: Fix typo in property description

5 years agoccextractor: Use gst_caps_new_simple() instead of gst_caps_from_string()
Sebastian Dröge [Thu, 6 Sep 2018 17:23:55 +0000 (20:23 +0300)]
ccextractor: Use gst_caps_new_simple() instead of gst_caps_from_string()

5 years agodecklinkvideosink: fix build
Matthew Waters [Wed, 12 Sep 2018 12:38:56 +0000 (22:38 +1000)]
decklinkvideosink: fix build

../sys/decklink/gstdecklinkvideosink.cpp:1006:11: error: ‘GstDecklinkVideoSink {aka struct _GstDecklinkVideoSink}’ has no member named ‘scheduled_stop_time’
     self->scheduled_stop_time = start_time;
           ^

5 years agodecklink: wait for stop with a timeout
Matthew Waters [Wed, 12 Sep 2018 10:29:09 +0000 (05:29 -0500)]
decklink: wait for stop with a timeout

Decklink sometimes does not notify us through the callback that it has
stopped scheduled playback either because it was uncleanly shutdown
without an explicit stop or for unknown other reasons.

Wait on the cond for a short amount of time before checking if scheduled
playback has stopped without notification.

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

5 years agodecklink: start scheduled playback in paused
Matthew Waters [Sun, 8 Jul 2018 14:54:04 +0000 (09:54 -0500)]
decklink: start scheduled playback in paused

This is part of a much larger goal to always keep the frames we schedule to
decklink be always increasing.  This also allows us to avoid using both the
sync and async frame display functions which aren't recomended to be used
together.

If the output timestatmsp is not always increasing 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).

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

5 years agodecklinkaudiosink: fix debug string copy-paste error
Matthew Waters [Wed, 12 Sep 2018 10:32:04 +0000 (05:32 -0500)]
decklinkaudiosink: fix debug string copy-paste error

Stopping != Starting

5 years agoh265parse: Fix periodic SPS/PPS sending work after a seek
Seungha Yang [Mon, 13 Aug 2018 13:44:51 +0000 (22:44 +0900)]
h265parse: Fix periodic SPS/PPS sending work after a seek

Apply the commit ef71b61
See also https://bugzilla.gnome.org/show_bug.cgi?id=742212

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

5 years agoh265parse: Add support insert parameter set per IDR
Seungha Yang [Mon, 13 Aug 2018 11:34:36 +0000 (20:34 +0900)]
h265parse: Add support insert parameter set per IDR

Apply commits 0c04e00, bf0d952 and a0876aa to h265parse.
See also https://bugzilla.gnome.org/show_bug.cgi?id=766803

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

5 years agoh265parse: Don't discard first AU delimiter
Seungha Yang [Mon, 13 Aug 2018 15:46:26 +0000 (00:46 +0900)]
h265parse: Don't discard first AU delimiter

Apply the commit 48a1f27

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

5 years agoh265parse: Consider SEI NALU as "HEADER" packets
Seungha Yang [Mon, 13 Aug 2018 15:43:01 +0000 (00:43 +0900)]
h265parse: Consider SEI NALU as "HEADER" packets

Apply the commit 69c09c3

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

5 years agoh265parse: Don't unref buffer that was unreffed just a few lines before already
Seungha Yang [Mon, 13 Aug 2018 13:45:54 +0000 (22:45 +0900)]
h265parse: Don't unref buffer that was unreffed just a few lines before already

Apply the commit 9b50a12

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

5 years agoh265parse: Reset the parser information when caps changes
Seungha Yang [Mon, 13 Aug 2018 16:11:27 +0000 (01:11 +0900)]
h265parse: Reset the parser information when caps changes

Apply the commit 14f6fcd

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

5 years agoh265parse: Fix collection of access units to preserve config headers
Seungha Yang [Mon, 13 Aug 2018 14:45:13 +0000 (23:45 +0900)]
h265parse: Fix collection of access units to preserve config headers

Apply the commit 7d44a51
See also https://bugzilla.gnome.org/show_bug.cgi?id=732203

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

5 years agoh265parse: Improve conditions for skipping NAL units
Seungha Yang [Mon, 13 Aug 2018 14:36:33 +0000 (23:36 +0900)]
h265parse: Improve conditions for skipping NAL units

See also https://bugzilla.gnome.org/show_bug.cgi?id=732203

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

5 years agoh265parse: Introduce new state tracking variables
Seungha Yang [Mon, 13 Aug 2018 13:23:22 +0000 (22:23 +0900)]
h265parse: Introduce new state tracking variables

Direct applying the commit 7bb6443. This could fix also unexpected
nal dropping when nonzero "config-interval" is set.
(e.g., gst-launch-1.0 videotestsrc ! x265enc key-int-max=30 !
 h265parse config-interval=30 ! avdec_h265 ! videoconvert ! autovideosink)

Similar to the h264parse, have_{vps,sps,pps} variables will be used
for deciding on when to submit updated caps or not, and rather mean
"have new SPS/PPS to be submitted?"
See also https://bugzilla.gnome.org/show_bug.cgi?id=732203

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

5 years agoh265parse: Fix and optimize NAL collection function
Seungha Yang [Mon, 13 Aug 2018 12:49:57 +0000 (21:49 +0900)]
h265parse: Fix and optimize NAL collection function

Adopt h264parse's _collect_nal() behavior.
See also commit 5601c87 and  https://bugzilla.gnome.org/show_bug.cgi?id=732154

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

5 years agoh265parse: Unref/replace force_key_unit_event in gst_h265_parse_reset
Seungha Yang [Mon, 13 Aug 2018 15:29:56 +0000 (00:29 +0900)]
h265parse: Unref/replace force_key_unit_event in gst_h265_parse_reset

Apply the commit 36a2aca

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

5 years agoh265parse: Copy over DISCONT flag from input buffers
Seungha Yang [Mon, 13 Aug 2018 15:27:12 +0000 (00:27 +0900)]
h265parse: Copy over DISCONT flag from input buffers

Apply the commit 10ffa08

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

5 years agowatchdog: Add missing static keyword
Nicolas Dufresne [Thu, 16 Aug 2018 20:58:31 +0000 (16:58 -0400)]
watchdog: Add missing static keyword

get/set_property method should have been static.

5 years agowasapi: Remove code that sets thread priority
Nirbheek Chauhan [Mon, 10 Sep 2018 19:30:21 +0000 (01:00 +0530)]
wasapi: Remove code that sets thread priority

This is now handled directly in gstaudiosrc/sink, and we were setting
it in the wrong thread anyway. prepare() is not the same thread as
sink_write() or src_read().

5 years agomeson: Don't pass GNU-like compiler wargs on MSVC
Nirbheek Chauhan [Wed, 5 Sep 2018 16:01:22 +0000 (21:31 +0530)]
meson: Don't pass GNU-like compiler wargs on MSVC

cl : Command line error D8021 : invalid numeric argument '/Wno-missing-include-dirs'

5 years agomeson: Don't skip plugins that don't build with MSVC
Nirbheek Chauhan [Wed, 5 Sep 2018 15:17:05 +0000 (20:47 +0530)]
meson: Don't skip plugins that don't build with MSVC

We now have options for all plugins, so we will just disable these in
the cerbero recipe instead. These require external deps, so they won't
affect gst-build either.

5 years agotimecodestamper: Fix typo in set_drop_frame
Vivia Nikolaidou [Mon, 3 Sep 2018 12:15:45 +0000 (15:15 +0300)]
timecodestamper: Fix typo in set_drop_frame

Was checking if fps_d == 60000 (instead of fps_n), causing 60000/1001 to
be always falsely interpreted as non-drop-frame

5 years agoplayer: Set default position and duration value to GST_CLOCK_TIME_NONE
Philippe Normand [Sat, 1 Sep 2018 10:23:33 +0000 (11:23 +0100)]
player: Set default position and duration value to GST_CLOCK_TIME_NONE

When the position query fails the returned value shall remain -1 instead of 0 to
avoid confusion on application side between error and beginning of media.

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

5 years agomeson: Fix applemedia dependencies on iOS
Nirbheek Chauhan [Sat, 1 Sep 2018 16:18:31 +0000 (21:48 +0530)]
meson: Fix applemedia dependencies on iOS

These were accidentally not being found because they were incorrectly
specified.

5 years agomeson: Maintain macOS ABI through dylib versioning
Nirbheek Chauhan [Fri, 31 Aug 2018 09:07:46 +0000 (14:37 +0530)]
meson: Maintain macOS ABI through dylib versioning

Requires Meson 0.48, but the feature will be ignored on older versions
so it's safe to add it without bumping the requirement.

Documentation:
https://github.com/mesonbuild/meson/blob/master/docs/markdown/Reference-manual.md#shared_library

5 years agomeson: add pkg-config file for the webrtc plugin
Matthew Waters [Fri, 31 Aug 2018 07:19:02 +0000 (17:19 +1000)]
meson: add pkg-config file for the webrtc plugin

5 years agoandroidmedia/meson: we also depend on gmodule and orc
Matthew Waters [Thu, 30 Aug 2018 14:37:17 +0000 (00:37 +1000)]
androidmedia/meson: we also depend on gmodule and orc

5 years agortmpsink: Fix leak on connection failure
Seungha Yang [Fri, 31 Aug 2018 05:55:05 +0000 (14:55 +0900)]
rtmpsink: Fix leak on connection failure

Although RTMP_ConnectStream() was failed, librtmp's internal memory
is not freed by RTMP_ConnectStream(), so RTMP_Close() should be called
before RTMP_Free()

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

5 years agokmssink: Add "restore-crtc" property
Devarsh Thakkar [Sat, 25 Aug 2018 17:17:34 +0000 (22:47 +0530)]
kmssink: Add "restore-crtc" property

This adds "restore-crtc" property using which one
can restore previous crtc mode.

By default it is enabled, if CRTC was already
active with a valid mode and kmssink set a new mode
on CRTC using force-modesetting.

This helps user restore previous crtc mode and get
the previous session back after running a kmssink
pipeline involving a force-modesetting.

For e.g. When running a kmssink pipeline on rpi
using force-modesetting on tty console, it was giving
a blank screen after pipeline, and now with help of restore-crtc
functionality, CRTC is set with previous crtc mode
previously active on tty console.

Edited-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
https://bugzilla.gnome.org/show_bug.cgi?id=797025

5 years agokmssink: Document possible advance usage
Nicolas Dufresne [Wed, 29 Aug 2018 16:02:22 +0000 (12:02 -0400)]
kmssink: Document possible advance usage

This adds a mention about modetest command line tool and adds an example
on how to use the connector/plane-properties.

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

5 years agokmssink: Escape DRM property names
Nicolas Dufresne [Wed, 29 Aug 2018 15:53:13 +0000 (11:53 -0400)]
kmssink: Escape DRM property names

This allow setting properties that contains spaces. The spaces are
replaced with '-'. As an example, one can set the connector proper
"scaling mode" with the following:

  ... ! kmssink connector-properties="s,scaling-mode=1"

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

5 years agokmssink: Add 'plane-properties' property
Nicolas Dufresne [Mon, 27 Aug 2018 19:08:08 +0000 (15:08 -0400)]
kmssink: Add 'plane-properties' property

This is similar to 'connector-properties' but will change
selected plane properties instead.

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

5 years agokmssink: Generalize setting DRM object properties
Nicolas Dufresne [Mon, 27 Aug 2018 19:07:47 +0000 (15:07 -0400)]
kmssink: Generalize setting DRM object properties

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