Commit graph

23983 commits

Author SHA1 Message Date
Aleix Conchillo Flaqué
5078116889 shmsink: do not keep locking if element is unlocked
https://bugzilla.gnome.org/show_bug.cgi?id=797260
2018-10-10 12:02:44 -04:00
Tim-Philipp Müller
84bcd14848 meson: use new 'python' module instead of deprecated 'python3' one
https://github.com/mesonbuild/meson/pull/4169
2018-10-08 20:53:47 +01:00
Matthew Waters
21bf3a35ac 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!
2018-10-09 02:38:14 +11:00
Matthew Waters
7bf18ad258 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.
2018-10-08 21:56:31 +11:00
Aleix Conchillo Flaqué
c4fe52395b 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
2018-10-08 13:46:55 +11:00
Matthew Waters
d5da9e080a glvideomixer: fix the default blend modes for unpremultipled alpha
Alpha in GStreamer is unpremultiplied
2018-10-05 01:18:59 +10:00
Vivia Nikolaidou
d89104c57f 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
2018-10-04 12:40:45 +03:00
Matthew Waters
faf212cd3a tests/webrtcbin: add a couple more dependant element checks
Without the sctp elements, all the data channel tests will fail
2018-10-04 16:44:55 +10:00
Matthew Waters
ea355ca0a3 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
2018-10-04 14:32:14 +10:00
Sebastian Dröge
b5ae66ea1d glstereomix: Fix build after deprecating misnamed GST_TYPE_GL_STEREO_DOWNMIX_MODE_TYPE 2018-10-03 16:00:23 +03:00
Seungha Yang
f106a10994 msdk: Fix building on MSVC
And add missing #ifdef _WIN32 for MSVC build

https://bugzilla.gnome.org/show_bug.cgi?id=797211
2018-10-02 04:04:24 +05:30
Seungha Yang
44ecf53d1c 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
2018-10-02 04:04:24 +05:30
Mathieu Duponchelle
14b9a34f54 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
2018-09-27 17:34:10 +02:00
Matthew Waters
8e8eb41ddf webrtcdatachannel: take ref of data so it doesn't disappear 2018-09-26 16:01:57 +10:00
Sebastian Dröge
47b69bca12 glmixerbin: "latency" property on aggregator is uint64, not int64
Also update the property description and range with aggregator's values.
2018-09-24 23:26:52 +03:00
Tim-Philipp Müller
96ac822b67 player: fix deprecated api declaration 2018-09-24 14:46:40 +01:00
Tim-Philipp Müller
b6411ae74c 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
2018-09-24 14:45:56 +01:00
Tim-Philipp Müller
be3edc6ad6 docs: plugins: update for git master 2018-09-24 10:59:16 +01:00
Tim-Philipp Müller
287c419784 pkgconfig: generate sctp lib .pc file also with Meson build
and fix up autotools definition now that it's not conditional
any more.
2018-09-22 19:49:13 +01:00
Tim-Philipp Müller
05917e127d pkgconfig: sctp lib does not depend on external sctp library
So install .pc files unconditionally.
2018-09-22 17:37:42 +01:00
Tim-Philipp Müller
23feed7545 libs: dist new sctp lib 2018-09-21 16:37:41 +01:00
Vivia Nikolaidou
b1b4a04338 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
2018-09-21 17:31:25 +03:00
Edward Hervey
1d6814f54b gst-libs: Always build sctp mini-library
It doesn't depend on any external library
2018-09-21 14:57:35 +02:00
Matthew Waters
ce9e2a7b78 glvideomixer: fix constant alpha enum value for constant alpha 2018-09-21 19:45:13 +10:00
Matthew Waters
07e9374eff 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
2018-09-21 19:45:12 +10:00
Matthew Waters
cf46d49b1e webrtcbin: functionify dependent element checks 2018-09-21 19:36:52 +10:00
Matthew Waters
f0a4713932 webrtc/stats: rename debug category not to be ice related 2018-09-21 19:36:52 +10:00
Mathieu Duponchelle
01216845c7 sctp elements: avoid assertions on shutdown 2018-09-21 19:36:52 +10:00
Matthew Waters
1f662b24a2 sctp*meta: fix api define in gst_sctp_buffer_get_*_meta() 2018-09-21 19:36:52 +10:00
Matthew Waters
57accd7570 sctpassociation: don't join a NULL thread
Can occur if no connection is actually made and thus no connection
thread is created.
2018-09-21 19:36:52 +10:00
Matthew Waters
f30c8c0c92 sctpenc: don't require caps when requesting the pad
They can be set later
2018-09-21 19:36:52 +10:00
Matthew Waters
fb8f7c25de 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.
2018-09-21 19:36:52 +10:00
Matthew Waters
88b4ce9fc0 Update sctp plugin for the current build system
- Add meson build definitions
- Add necessary API decorators
2018-09-21 19:36:52 +10:00
George Kiagiadakis
e2f06326ea Add new SCTP plugins (sctpenc/sctpdec)
https://bugzilla.gnome.org/show_bug.cgi?id=744863
2018-09-21 19:36:52 +10:00
Mathieu Duponchelle
45fe050286 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
2018-09-19 16:17:24 +02:00
Mathieu Duponchelle
1d6160d59c 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
2018-09-19 16:17:24 +02:00
Tim-Philipp Müller
29c7f95884 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.
2018-09-19 12:02:19 +01:00
Tim-Philipp Müller
15c566cd35 meson: fix missing closing bracket in option descriptions 2018-09-19 12:01:47 +01:00
Sebastian Dröge
f8327f684c glvideomixer: Fix typo in property description 2018-09-19 10:28:56 +03:00
Sebastian Dröge
3812985a9e ccextractor: Use gst_caps_new_simple() instead of gst_caps_from_string() 2018-09-18 17:47:04 +03:00
Matthew Waters
17f0271aa0 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;
           ^
2018-09-12 22:38:56 +10:00
Matthew Waters
946cbbccc1 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
2018-09-12 21:17:13 +10:00
Matthew Waters
bf849e9a69 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
2018-09-12 21:16:27 +10:00
Matthew Waters
87077d20de decklinkaudiosink: fix debug string copy-paste error
Stopping != Starting
2018-09-12 20:37:47 +10:00
Seungha Yang
da7143078f 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
2018-09-10 22:36:59 -04:00
Seungha Yang
fd79d8d7a3 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
2018-09-10 22:36:59 -04:00
Seungha Yang
8b57392b92 h265parse: Don't discard first AU delimiter
Apply the commit 48a1f27

https://bugzilla.gnome.org/show_bug.cgi?id=754124
2018-09-10 22:36:59 -04:00
Seungha Yang
60d8b7184f h265parse: Consider SEI NALU as "HEADER" packets
Apply the commit 69c09c3

https://bugzilla.gnome.org/show_bug.cgi?id=754124
2018-09-10 22:36:59 -04:00
Seungha Yang
3ad30ef76e 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
2018-09-10 22:36:59 -04:00
Seungha Yang
27432ab067 h265parse: Reset the parser information when caps changes
Apply the commit 14f6fcd

https://bugzilla.gnome.org/show_bug.cgi?id=754124
2018-09-10 22:36:59 -04:00