Commit graph

6547 commits

Author SHA1 Message Date
Mathieu Duponchelle daaa1c3aa8 ccconverter: fix typo in framerate 2019-02-21 23:51:39 +01:00
Alex Ashley dbe0a8cbc3 curlhttpsrc: set BUFFER_OFFSET when creating GstBuffer
To make curlhttpsrc behave more like souphttpsrc, set the
BUFFER_OFFSET in its output buffers to match the segment
start. This means that in a HTTP RANGE request, the BUFFER_OFFSET
will match the value in the RANGE request.
2019-02-19 17:55:13 +00:00
Alex Ashley 2d806477d0 curlhttpsrc: export same HTTP error status as souphttpsrc
To make it closer to a drop-in replacement for souphttpsrc,
expose the same gst_error_message_with_details as souphttpsrc,
so that applications can received the HTTP status code and reason
when an error occurs.
2019-02-19 17:55:12 +00:00
Alex Ashley c2fe4e58ad curlhttpsrc: fix various leaks and thread safety issues
curlhttpsrc uses a single thread running the
gst_curl_http_src_curl_multi_loop() function to handle receiving
data and messages from libcurl. Each instance of curlhttpsrc adds
an entry into a queue in GstCurlHttpSrcMultiTaskContext and waits
for the multi_loop to perform the HTTP request.

Valgrind has shown up race conditions and memory leaks:
1. gst_curl_http_src_change_state() does not wait for the multi_loop
   to complete before going to the NULL state, which means that
   an instance of GstCurlHttpSrc can be released while
   gst_curl_http_src_curl_multi_loop() still has a reference to it.
2. if multiple elements try to be removed from the queue at once,
   only the last one is deleted.
3. source->caps is leaked
4. curl multi_handle is leaked
5. leak of curl_handle if URI not set
6. leak of http_headers when reusing element
7. null pointer dereference in negotiate caps
8. double-free of the default user-agent string
9. leak of multi_task_context.task

This commit changes the logic so that each element has a connection
status, which is used by the multi_loop to decide when to remove an
element from its queue. An instance of curlhttpsrc will not enter
the NULL state until its reference has been removed from the queue.

When shutting down the curl multi loop, the memory allocated from the
call to curl_multi_init() is now released.

When gstadaptivedemux uses a URI source element, it will re-use
it for multiple requests, moving it between READY and PLAYING
between each request. curlhttpsrc was leaking the http_headers
structure in this use case.

The gst_curl_http_src_negotiate_caps() function extracts the
"response-headers" field from the http_headers, but did not check
that this field might be NULL.

If the user-agent property is set, the global user-agent string
was freed. This caused a double-free error if the user-agent is
ever set a second time during the execution of the process.

There are situations within curlhttpsrc where the code needs
both the global multi_task_context mutex and the per-element
buffer_mutex. To avoid deadlocks, it is vital that the order in
which these are requested is always the same. This commit modifies
the locking order to always be in the order:
 1. multi_task_context.task_rec_mutex
 2. buffer_mutex

Fixes #876
2019-02-19 17:55:12 +00:00
Nirbheek Chauhan 81fd48bcb5 closedcaption: Use portable variadic macro syntax
args... is not understood by MSVC:

error C2010: '.': unexpected in macro parameter list
2019-02-15 23:50:11 +05:30
Nirbheek Chauhan a4323638b3 closedcaption: Port plugin to MSVC
pthread is not portable, so we can't use a pthread mutex use GMutex
instead.
2019-02-15 23:39:35 +05:30
Daniel Stone 68fa80e831 waylandsink: Don't create throwaway empty regions
Instead of creating a region, adding nothing to it, setting that as the
input region and destroying the region, you can instead just pass NULL
to wl_surface_set_input_region for the same effect.

Fixes #702
2019-02-15 12:03:48 +00:00
Matthew Waters 2a1176973a webrtc: fix rtx + bundle
If bundle was used in combination with rtx, only the bundled transport
stream would have correctly configured rtx parameters.

Iterate over the payloads upfront in the bundled case to ensure the
correct payload mapping is set for the RTX elements.
2019-02-15 08:19:51 +00:00
Edward Hervey 06b18defc7 dtls: Don't abort on non-fatal issues
OpenSSL will take care of returning valid context if there are
only non-fatal issues. Don't abort in those cases and instead just
print out the issues

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/811
2019-02-13 17:48:46 +00:00
Jan Alexander Steffens (heftig) 3bc9bd2b99
fdkaacenc: Fix draining with libfdk-aac v2.0.0
This release requires all buffer descriptor pointers to be valid, even
when we provide zero input buffers.
2019-02-13 16:12:03 +01:00
Sebastian Dröge 8006979109 ccconverter: Don't output empty buffers 2019-02-12 14:38:40 +02:00
Justin Kim e8fd000af0 srt: re-enable passphrase
With refactoring, supporting passphrase was removed accidently.
This commit re-enables srt encryption and validates 'passphrase'
by checking the return value of 'srt_setsockopt'.

fix: #694
2019-02-11 23:40:02 +00:00
Seungha Yang f1d5f1faab openh264dec: Fix build with msvc
Fix following build error
../subprojects/gst-plugins-bad/ext/openh264/gstopenh264dec.cpp(76): error C2121:

Note that msvc usually complains #if inside macro
2019-02-11 21:21:52 +09:00
Nirbheek Chauhan fffb2aa12f misc: Fix warnings on Cerbero MinGW
gstladspa.c:360:5: error: zero-length ms_printf format string [-Werror=format-zero-length]

vad_private.c:108:3: error: this decimal constant is unsigned only in ISO C90 [-Werror]

gstdecklinkvideosink.cpp:478:32: error: comparison between 'BMDTimecodeFormat {aka enum _BMDTimecodeFormat}' and 'enum GstDecklinkTimecodeFormat' [-Werror=enum-compare]

win/DeckLinkAPI_i.c:72:8: error: extra tokens at end of #endif directive [-Werror]

win/DeckLinkAPIDispatch.cpp:35:10: error: unused variable 'res' [-Werror=unused-variable]

gstwasapiutil.c:733:3: error: format '%x' expects argument of type 'unsigned int', but argument 8 has type 'DWORD' [-Werror=format]
gstwasapiutil.c:733:3: error: format '%x' expects argument of type 'unsigned int', but argument 9 has type 'guint64' [-Werror=format]

kshelpers.c:446:3: error: missing braces around initializer [-Werror=missing-braces]
kshelpers.c:446:3: error: (near initialization for 'known_property_sets[0].guid.Data4') [-Werror=missing-braces]
2019-02-06 00:10:28 +05:30
Nicola Murino 1a96759a34 opencv cameraundistort: use G_GNUC_UNUSED for better portability 2019-02-02 18:34:10 +00:00
Nicola Murino 06d1b751ad opencv: remove deprecated headers
are not needed anymore
2019-02-02 18:34:10 +00:00
Nicola Murino 26cabf9b1f opencv: port to c++ 2019-02-02 18:34:10 +00:00
Jan Schmidt 19382f1e91 openh264: Conditionally support the main and high profiles
openh264 added main/high profile support upstream after the 1.8.0
release, so detect a version higher than that and support main/high
stream input
2019-01-30 14:53:02 +11:00
Jan Schmidt 40de7e5b98 openh264: Use DecodeFrameNoDelay() API instead of DecodeFrame2
Replace legacy usage of DecodeFrame2 API in favour of the
recommended DecodeFrameNoDelay()

This fixes problems with DecodeFrame2() not (currently) returning
all frames in main/high streams with B-frames, and reduces latency -
previously openh264 would not return a decoded frame until the next
call to DecodeFrame2(). DecodeFrameNoDelay() returns them immediately.
2019-01-30 14:53:02 +11:00
Jan Schmidt 278cd35695 openh264dec: Hook up openh264 messages to GStreamer logging
Use the OpenH264 callback to pass Openh264 internal warning/error
messages through the GStreamer logging framework
2019-01-30 14:53:02 +11:00
Jan Schmidt d4594c5c75 openh264dec: Handle B frame decoding
Support out-of-order decoding in OpenH264 by tracking
our internal frame reference in the OpenH264 timestamp
field.

Drain any pending frames at EOS.
2019-01-30 14:53:02 +11:00
Jan Schmidt e75e637531 Add OpenH264 version check macro 2019-01-30 14:43:22 +11:00
Jan Schmidt 984b150e65 openh264dec: Fix up EOS handling
If the last frame(s) produce errors, then we need to drop them
or else we spin forever failing to decode a frame and thinking
it'll get better if we wait for more data that's never coming.
2019-01-30 03:00:49 +11:00
Yeongjin Jeong 52e4a20b4e fdkaacdec: Fix build for fdkaac < 0.1.4
The fdkaac decoder supports 6.1 / 7.1 channels with downmixer
since v0.1.4. Old versions can use AAC_PCM_OUTPUT_CHANNELS
instead of AAC_PCM_MAX_OUTPUT_CHANNELS.

Fixes #873
2019-01-25 15:50:31 -05:00
Mathieu Duponchelle 85c75bb23b webrtc: expose ice-transport-policy property
This is the equivalent of iceTransportPolicy in the RTCConfiguration
dictionary.

Only two values are implemented:

* all: default behaviour
* relay: only gather relay candidates

The third member of the iceTransportPolicy enum, "public", is
obsolete.
2019-01-23 22:47:51 +00:00
Olivier Crête 73c6530d40 srt: Accepts URIs without host to go into listener mode
Just setting a URI without a hostname should directly go into listener mode.
2019-01-23 19:14:30 +00:00
Olivier Crête 5fee3a87c1 srt: Fix GClosure usage
One needs to set a marshaller as well as use the object setter when
setting objects.
2019-01-23 19:14:30 +00:00
Philippe Normand c34cd8c5e0 wpesrc: Plug WPE's exportable leak 2019-01-22 11:52:30 +00:00
Philippe Normand c357e12118 wpe: Add autotools build support 2019-01-22 11:13:13 +00:00
Justin Kim dc28105220 srt: Use default host and port if uri doesn't provide 2019-01-22 18:26:01 +09:00
Justin Kim 2bb907eb9c srt: Enable logs for srtobject 2019-01-22 12:44:07 +09:00
Justin Kim f63643fcbf srt: Fix property names
Property name and its enum should match.
2019-01-22 12:42:47 +09:00
Justin Kim b8610e72de srt: Fix a regression crash
Even in case that srt is working as a caller mode, uri can have no
hostname or ip address.

fix: #874
2019-01-22 11:35:03 +09:00
Tim-Philipp Müller dd4359d296 srt: dist enums header 2019-01-16 13:48:51 +00:00
Jan Alexander Steffens (heftig) 7a01e9a8cb
srt: Fix autotools build
0a350c610d broke the build by only
building enum types with meson. It also removed gstsrt.c from the list
of sources, causing the plugin to fail to load.

squash! srt: Fix autotools build
2019-01-14 16:01:40 +01:00
Jan Alexander Steffens (heftig) 484291b1b4
srt: Fix GCC function type error
gstsrtobject.c: In function ‘gst_srt_object_close’:
gstsrtobject.c:1036:7: error: function called through a non-compatible type [-Werror]
       (GDestroyNotify) g_closure_unref);
/usr/include/glib-2.0/glib/gmem.h:121:8: note: in definition of macro ‘g_clear_pointer’
       (destroy) (_ptr);                                                        \
        ^~~~~~~
gstsrtobject.c:1038:7: error: function called through a non-compatible type [-Werror]
       (GDestroyNotify) g_closure_unref);
/usr/include/glib-2.0/glib/gmem.h:121:8: note: in definition of macro ‘g_clear_pointer’
       (destroy) (_ptr);                                                        \
        ^~~~~~~

Arch Linux
gcc 8.2.1 20181127
glib 2.58.2
2019-01-14 14:48:50 +01:00
Justin Kim 0a350c610d srt: Integrate server and client element into one
We have srt{client,server}{src,sink} elements in accordance to the
norm of the connection oriented protocols. However, SRT connection
mode can be changed by uri parameters so it requires an integrated
element to handle the parameters.

fix: #740
2019-01-09 19:44:02 +00:00
Tim-Philipp Müller 9eb7f7cbc7 webrtc: include stdlib.h for atoi()
Fixes #857
2018-12-31 12:09:42 +00:00
Tim-Philipp Müller 88683e5a1e Remove openglmixers plugin, moved to -base
Merged into the existing opengl plugin in -base.
2018-12-28 13:48:29 +01:00
Tim-Philipp Müller b9e15fddb1 Remove GstVideoAggregator, moved into libgstvideo in -base
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/137
2018-12-26 19:06:33 +01:00
Tim-Philipp Müller ae194e99d9 opencv: fix disting of new header files
Fixes distcheck.
2018-12-25 16:58:40 +01:00
Justin Kim 2faa08ff28 openal: Fix AL header path for Mac OS X
OpenAL.framework doesn't provide 'alext.h'.
Thus, openal is enabled only if the dependency
is set by pkg-config.

fixes: #852
2018-12-25 00:42:31 +09:00
Matthew Waters b4bdcf15b7 webrtc/receive-bin: block pads before dtlssrtpdec:
Fixes SSL errors in fast-start scenarios and whenever media stream may
be received before an answer is set.
2018-12-19 00:44:06 +00:00
Matthew Waters 26a5cbddbb webrtcbin: only change the receive state after setting the dtls-client
Doing so before will cause SSL errors with fast-start implementations
like Chrome or if media data arrives before an answer.
2018-12-19 00:44:06 +00:00
Matthew Waters 0a3f662ed6 webrtc: A couple of documentation fixes
set-*-description only takes the combined GstWebRTCSessionDescription
object
2018-12-19 00:44:06 +00:00
Sebastian Dröge 39381643c8 closedcaption: Add ccconverter element that can convert between different types of Closed Caption formats 2018-12-19 00:19:39 +02:00
Tim-Philipp Müller da7cf85e3c meson: fix opencv=disabled case if opencv is available on the system
ext/opencv/meson.build:103:2: ERROR:  Unknown variable "gstopencv_dep".
2018-12-17 18:58:52 +00:00
Tim-Philipp Müller a26cce1833 meson: wildmidi detection fixes
Need at least 0.4.2 apparently.

ext/wildmidi/meson.build:11:2: ERROR:  String '' cannot be converted to int
2018-12-17 17:11:00 +00:00
Jonathan Karlsson d49bc71f00 curlhttpsink: free content type before assigning it
Not doing this would result in a memory leak.
2018-12-17 15:56:08 +00:00
Jonathan Karlsson e8ec1c0143 curlbasesink: cleanup transfer immediately when done 2018-12-17 14:24:07 +00:00
Jan Alexander Steffens (heftig) f964fb38b6 fdkaac: Syntax tweaks to increase readability
Mostly move some assignments out of conditionals that gst-indent
completely destroys.
2018-12-17 12:39:13 +00:00
Jan Alexander Steffens (heftig) c5a17000b6 fdkaacdec: Enable 8-channel playback
The decoder seems to default to 6 channels max, downmixing 7.1 to 5.1.
Disable the channel limit to expose all channels to GStreamer.

In addition, none of the standard configurations use ACT_SIDE channels.
The rear channels of the 7.1 configuration have to be taken from
ACT_BACK. See the table in aacenc_lib.h, reproduced here:

----------------------------------------------------------------------------------------
 ChannelMode           | ChCfg | Height | front_El      | side_El  | back_El  | lfe_El
-----------------------+-------+--------+---------------+----------+----------+---------
MODE_1                 |     1 | NORM   | SCE           |          |          |
MODE_2                 |     2 | NORM   | CPE           |          |          |
MODE_1_2               |     3 | NORM   | SCE, CPE      |          |          |
MODE_1_2_1             |     4 | NORM   | SCE, CPE      |          | SCE      |
MODE_1_2_2             |     5 | NORM   | SCE, CPE      |          | CPE      |
MODE_1_2_2_1           |     6 | NORM   | SCE, CPE      |          | CPE      | LFE
MODE_1_2_2_2_1         |     7 | NORM   | SCE, CPE, CPE |          | CPE      | LFE
MODE_6_1               |    11 | NORM   | SCE, CPE      |          | CPE, SCE | LFE
MODE_7_1_BACK          |    12 | NORM   | SCE, CPE      |          | CPE, CPE | LFE
-----------------------+-------+--------+---------------+----------+----------+---------
MODE_7_1_TOP_FRONT     |    14 | NORM   | SCE, CPE      |          | CPE      | LFE
                       |       | TOP    | CPE           |          |          |
-----------------------+-------+--------+---------------+----------+----------+---------
MODE_7_1_REAR_SURROUND |     0 | NORM   | SCE, CPE      |          | CPE, CPE | LFE
MODE_7_1_FRONT_CENTER  |     0 | NORM   | SCE, CPE, CPE |          | CPE      | LFE
----------------------------------------------------------------------------------------
- NORM: Normal Height Layer.     - TOP: Top Height Layer.  - BTM: Bottom Height Layer.
- SCE: Single Channel Element.   - CPE: Channel Pair.      - LFE: Low Frequency Element.

Restores 8 channels to
https://www2.iis.fraunhofer.de/AAC/7.1auditionOutLeader_v2_rtb.mp4
2018-12-17 12:39:13 +00:00
Jan Alexander Steffens (heftig) 4ec3f2f193 fdkaacenc: Add support for v2.0.0 and its configurations
These are MPEG-standard configurations so should be checked first,
before the PCE clones added by v0.1.4.
2018-12-17 12:39:13 +00:00
Jan Alexander Steffens (heftig) bc3c5ea7b1 fdkaacenc: Add support for MPEG configuration 7 2018-12-17 12:39:13 +00:00
Jan Alexander Steffens (heftig) 3a9f5a76e8 fdkaacenc: Add a description of each configuration 2018-12-17 12:39:13 +00:00
Jan Alexander Steffens (heftig) 383fe6f81d fdkaacenc: Prefer REAR for surround channels
We (currently?) prefer to use the REAR positions for what MPEG calls
"surround" channels.
2018-12-17 12:39:13 +00:00
Tim-Philipp Müller d3f174f77f Remove daala plugin
Not so useful now that all effort is focused on AV1 instead.
Was only ever enabled with --enable-experimental anyway.

Fixes #848
2018-12-17 12:03:09 +00:00
Sebastian Dröge 38be1fb2db meson: Add libsinc to the CFLAGS
Otherwise gst-i18n-plugin.h can't be found.
2018-12-17 12:30:27 +02:00
Tim-Philipp Müller 2e6510b9e2 meson: build openni2 plugin 2018-12-17 09:12:53 +00:00
Tim-Philipp Müller 094478d248 meson: build openmpt plugin 2018-12-17 09:12:53 +00:00
Tim-Philipp Müller 79d8855d87 meson: build openexr plugin 2018-12-17 09:12:53 +00:00
Tim-Philipp Müller c23a1dc2b6 meson: build openal plugin 2018-12-17 09:12:53 +00:00
Tim-Philipp Müller dd529d0f5d meson: build sndfile plugin 2018-12-17 09:12:53 +00:00
Tim-Philipp Müller 0be8a5f8f4 meson: build voamrwbenc plugin 2018-12-17 09:12:53 +00:00
Tim-Philipp Müller 986f6cac45 meson: build teletext plugin 2018-12-17 09:12:53 +00:00
Tim-Philipp Müller cbf746782b meson: build modplug plugin 2018-12-17 09:12:53 +00:00
Tim-Philipp Müller 4130b08776 meson: build wildmidi plugin 2018-12-17 09:12:53 +00:00
Tim-Philipp Müller 56c65afff4 meson: build dc1394 plugin 2018-12-17 09:12:53 +00:00
Tim-Philipp Müller d7b7f2a9a5 meson: build ofa plugin 2018-12-17 09:12:53 +00:00
Tim-Philipp Müller 7c69abd918 meson: build gme plugin 2018-12-17 09:12:53 +00:00
Tim-Philipp Müller ee7e3f7bc7 Remove spc plugin
Replaced by gme plugin. Fixes #467
2018-12-16 23:35:58 +00:00
Sebastian Dröge aa72783b95 closedcaption: Use new API for converting GstVideoCaptionType from/to GstCaps 2018-12-15 21:31:28 +00:00
Sebastian Dröge 48f48cc4ba closedcaption: Replace GST_VIDEO_CAPTION_TYPE_CEA608_IN_CEA708_RAW with CEA608_S334_1A
As a side-effect we can now actually store the line offset in the
line21dec element, and have to perform fewer transformations in the
decklink elements (which were also buggy as they assumed a single byte
triplet per meta).
2018-12-15 21:31:28 +00:00
Sebastian Dröge f9e4ed99b0 line21dec: If CCs are not found at the previous line, reset and search from the beginning again 2018-12-15 21:31:28 +00:00
Sebastian Dröge 36ba1e80b6 line21dec: Don't read more lines than the height of the frame 2018-12-15 21:31:28 +00:00
Wonchul Lee 2ae381e2a3 waylandsink: Avoid race condition on multi-threaded client
When waylandsink is used on some other thread than the main wayland
client thread, the waylandsink implementation is vulnerable to a

condition related to registry and surface events which handled in
seperated event queue.

The race that may happen is that after a proxy is created, but
before the queue is set, events meant to be emitted via the yet to

set queue may already have been queued on the wrong queue.

Wayland 1.11 introduced new API that allows creating a proxy
wrappper which can help to avoid this race condition.
2018-12-13 17:20:04 +00:00
Sebastian Dröge 98b2c705c4 ccextractor: Copy over timecode meta from the input buffers to the outgoing caption buffers
Formats like SCC and MCC work based on timecodes so ideally we pass
through the timecodes when writing them.
2018-12-06 16:06:05 +00:00
Sebastian Dröge f0571a94fb ccextractor: Include framerate in the closedcaption caps
It depends on the framerate how many cc_data byte pairs are allowed per
frame, and the framerate is also needed for converting into the CDP or
MCC format as the framerate is part of the header metadata.
2018-12-06 16:06:05 +00:00
Patricia Muscalu e0adbee49a curlbasesink: Rename curl transfer thread
Some systems restrict the length of thread names to 16 bytes.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/838
2018-12-06 15:36:47 +00:00
Philippe Normand 5b8935bc77 wpe: Add a source element acting as a Web Browser based on WebKit WPE
The wpe element is used to produce a video texture representing a web page
rendered off-screen by WPE. This element can be used to overlay HTML on top of
another video stream for instance.
2018-12-06 12:38:52 +00:00
Jonathan Karlsson b025736899 curlhttpsink: Enable content type changes
Makes it possible to change content type without having to
reinitialize the element, typically after reset.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/41
2018-12-06 09:08:59 +00:00
Jan Alexander Steffens (heftig) 19d34f6b5e fdkaacdec: Use WAV channel mapping instead of interleave setting
The latter is going away in libfdk-aac 2.0.0. Instead, MPEG-style output
is always non-interleaved and WAV-style output is always interleaved.
Earlier libfdk-aac also defaults interleaving accordingly.

Since our reordering looks at the associated PCE indices instead of the
actual channel order, we're agnostic to the mapping.

For https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/825
2018-12-05 21:50:03 +00:00
Jan Alexander Steffens (heftig) f4fdb9770c fdkaacenc: Remove MODE_2_1
This is not a standard mode and no longer supported by fdk-aac 2.0.0.

For https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/825
2018-12-05 21:50:03 +00:00
Nirbheek Chauhan 9504fc7174 meson: Add missing gio dep to webrtcbin plugin
It's usually pulled in implicitly through gstsdp_dep, but it's
actually a private dependency there. Fixes a build failure on Windows
with newer Meson.
2018-12-05 19:58:44 +05:30
Tim-Philipp Müller 4f935e1e7f cc708overlay: fix deadlock
We would forget to unlock when a caption data buffer is deemed
out of segment, which makes everything lock up next time buffers
are received.
2018-11-29 11:24:39 +00:00
Jordan Petridis 1f562870ee Run gst-indent through the files
This is required before we enabled an indent test in the CI.

https://gitlab.freedesktop.org/gstreamer/gstreamer-project/issues/33
2018-11-28 14:18:26 +00:00
Seungha Yang 2c81a50c2c hlssink2: Fix string leak
Need to free allocated string memory on _finalize()
2018-11-27 16:08:17 +09:00
Nicola Murino 24d5c9b200 opencv: define CASCADE_DO_CANNY_PRUNING for opencv < 4 2018-11-26 13:29:03 +00:00
Nicola Murino b0773c6ea7 opencv: make compatible with opencv 4
Closed #826
2018-11-26 13:29:03 +00:00
Nicola Murino 890dbb560f opencv: fix indentation 2018-11-26 13:29:03 +00:00
Matthew Waters 57a006d8a5 tests/webrtc: use the existing functions in the plugin
Instead of redefining our own, use the function implementations in
webrtcsdp.c and utils.c
2018-11-26 17:13:08 +11:00
Matthew Waters 14ee6f9d35 webrtc: fix typo in RTCRemoteOutboundRTPStreamStats 2018-11-26 16:21:58 +11:00
Matthew Waters a42fdbb012 webrtc: add a few comments on bundle and src pad exposure 2018-11-26 16:21:19 +11:00
Matthew Waters 6f91a191de webrtcbin: factor out dtls fingerprint setting 2018-11-26 16:20:02 +11:00
Matthew Waters 3a2566c61f webrtc: remove extra 'pad' from log line 2018-11-26 16:12:03 +11:00
Matthew Waters 5ecca0bb22 webrtc: move some functions to the appropriate files 2018-11-26 16:07:57 +11:00
Harshad Khedkar 9ad618e487 Webrtcbin : Need to use 'host' from gst_uri_get_host s libnice agent expects it
Currently master code of gst1-plugins-bad use plain-string host name while passing it to
libnice agent: nice_agent_set_relay_info() in gstwebrtcice.c while adding turn_server(_add_turn_server).

It is observered that if we don't convert the host parameter by using gst_uri_get_host, it fails in libnice agent(0.1.14-1).

Code does, actually, set the host correctly but while passing params to nice_agent_set_relay_info, it uses incorrect one.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/823
2018-11-22 18:47:13 +05:30
Rosen Penev 29d48ce8a1 dtls: Fix compilation without deprecated APIs on OpenSSL 1.1.x 2018-11-14 14:55:37 -08:00
Justin Kim e76c61d74c cameracalibrate: Fix build error on Mac OSX
It fails to build only on Mac OSX with the following error.

In file included from ../subprojects/gst-plugins-bad/ext/opencv/gstopencv.cpp:45:
../subprojects/gst-plugins-bad/ext/opencv/gstcameracalibrate.h:96:38: error: a space is required between consecutive right angle brackets (use '> >')
  std::vector<std::vector<cv::Point2f>> imagePoints;
                                     ^~
                                     > >
1 error generated.

Fix: #817
2018-11-13 18:23:19 +09:00
Matthew Waters c78f81f410 build: link against the gnustl dependency on android for c++ plugins 2018-11-12 21:37:07 +11:00
Olivier Crête 75d4ede815 srtpenc: Add support for adding a MKI
https://bugzilla.gnome.org/show_bug.cgi?id=797305
2018-11-09 15:08:05 -05:00
Olivier Crête 46b5756d30 srtpdec: Add support for MKI
Add support for MKIs which allow multiple keys to be used with a single SRTP stream.

https://bugzilla.gnome.org/show_bug.cgi?id=797305
2018-11-09 15:06:27 -05:00
Jan Alexander Steffens (heftig) 84d3f58c4a
dtls: Link against winsock2 on Windows
Should fix the Windows build after
b1509b1047.
2018-11-06 18:48:44 +01:00
Jan Alexander Steffens (heftig) b1509b1047 dtlsconnection: Print out errno info for syscall errors
As suggested in [the SSL_get_error manpage][1]. Upgrade the message to a
warning if the errno isn't 0 (success). The latter apparently means the
transport encountered an EOF (shutdown) without the shut down handshake
on the (D)TLS level. This happens quite often for otherwise normal DTLS
connections.

[1]: https://www.openssl.org/docs/man1.1.1/man3/SSL_get_error.html
2018-11-06 16:23:50 +00:00
Andreas Frisch 51f0307900 dtls: Properly display all errors/warnings from ERR queue
Print out all errors from the OpenSSL error queue instead of just
looking at the topmost error. Using the callback interface also removes
the need for formatting using a buffer on the stack.
2018-11-06 16:23:50 +00:00
Jan Alexander Steffens (heftig) 7bb6ce352b dtlsconnection: Replace if-else chain with switch
A more idiomatic construct for testing a bunch of integers.
2018-11-06 16:23:50 +00:00
Jan Alexander Steffens (heftig) 49cc7b8091 dtlsconnection: Clear error queue before SSL_do_handshake
As documented on [the SSL_get_error manpage][1] we need to empty the
error queue before making any call that we check with SSL_get_error.

[1]: https://www.openssl.org/docs/man1.1.1/man3/SSL_get_error.html
2018-11-06 16:23:50 +00:00
Jan Alexander Steffens (heftig) fa92909d0d dtlsconnection: Lower BIO error log level to DEBUG
Periodic SSL_ERROR_SYSCALL errors with errno == 0 seem to be normal
behavior for DTLS connections.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/677
2018-11-06 16:23:50 +00:00
Jan Alexander Steffens (heftig) a9b9994738 dtlsconnection: Run gst-indent 2018-11-06 16:23:50 +00:00
Sebastian Dröge eb92865ea1 cccombiner: Add new closed caption combiner element
This is the inverse of ccextractor: it takes a video and closed caption
stream and places the closed caption metas on the video output buffers.
2018-11-06 16:21:42 +00:00
Sebastian Dröge 7ba9493ff1 ccextractor: Handle multiple caption metas per buffer 2018-11-06 16:21:06 +00:00
Tim-Philipp Müller 247cd2113e webrtc: update default libnice options
Uses feature options now.
2018-11-02 20:16:56 +00:00
Sebastian Dröge 7cfe6b0bf3 ccextractor: Support changes of the caption type
https://bugzilla.gnome.org/show_bug.cgi?id=797370
2018-11-02 12:22:15 +02:00
Tim-Philipp Müller a4cfb1fa14 meson: add 'curl-ssh2' option for curl libssh2 support
https://bugzilla.gnome.org/show_bug.cgi?id=797346
2018-10-28 11:53:42 +00:00
Xavier Claessens 8dfe0dd9ce meson: Use the 'curl' feature option
https://bugzilla.gnome.org/show_bug.cgi?id=797346
2018-10-28 11:51:34 +00:00
Luis de Bethencourt 16c1eee36f webrtcbin: options is a placeholder argument
Make it clear this unused argument is there for planned future use.
2018-10-26 15:15:57 +01:00
Luis de Bethencourt 83b29b813e webrtcbin: ws-semantic is not supported
Don't offer something that isn't supported.
2018-10-26 14:36:47 +01:00
Edward Hervey 4a24739a14 hls: Remove stray '\n' from debug statement 2018-10-22 09:59:24 +02:00
Olivier Crête a10c46a93a Revert "srtpdec: also check for "roc" in caps"
This reverts commit 73ebdb888e.

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 67ae35813b.

https://bugzilla.gnome.org/show_bug.cgi?id=765079
2018-10-17 18:34:31 -04:00
Matthew Waters 59f40eb1a0 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'
2018-10-17 21:07:36 +11:00
Mathieu Duponchelle 9f684a2f81 webrtcbin: implement support for group: BUNDLE 2018-10-15 14:17:35 +02:00
Wonchul Lee 51d5db3f47 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
2018-10-10 15:44:34 -04:00
Wonchul Lee cc9d65a512 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
2018-10-10 15:44:34 -04:00
Wonchul Lee 7d73307bc4 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
2018-10-10 15:44:34 -04: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
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
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
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 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
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
Nirbheek Chauhan 8875fe49ec meson: Don't pass GNU-like compiler wargs on MSVC
cl : Command line error D8021 : invalid numeric argument '/Wno-missing-include-dirs'
2018-09-05 21:31:22 +05:30
Nirbheek Chauhan 7397eb0cd4 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.
2018-09-05 20:47:05 +05:30
Matthew Waters 515e2d765a meson: add pkg-config file for the webrtc plugin 2018-08-31 18:08:55 +10:00
Seungha Yang 3bd3cc7bb0 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
2018-08-31 10:03:35 +03:00
Tim-Philipp Müller dabb2ef740 meson: build musepack plugin 2018-08-19 15:50:25 +01:00
Tim-Philipp Müller 70dd56d045 musepack: remove support for the 'old' API 2018-08-19 15:44:34 +01:00
Tim-Philipp Müller 40d13b47e3 meson: build neonhttpsrc 2018-08-19 01:11:38 +01:00
Nicolas Dufresne 694d9dcde5 dashdemux: Always create the adapter
Worst case it will be empty. This fixes a crash when the base class
calls data_received() when the stream is neither is_isobmff or
has_isoff_ondemand_profile.

https://bugzilla.gnome.org/show_bug.cgi?id=796745
2018-08-16 15:59:42 -04:00
Wim Taymans cb16d0b239 curlhhtpsrc: avoid invalid memory references
gst_curl_http_src_remove_queue_item() can free qelement and then
we get an invalid memory reference when we do qelement->next a
couple of lines below. Take the next pointer earlier so that we can
safely free.
2018-08-16 11:44:27 +02:00
Nicolas Dufresne 6ff5eb44cb makefile: opencv: Fix header names in noinst_HEADERS
This should fix missing gstcameracalibrate.h and gstcameraundistort.h
missing into generated tarballs.
2018-08-14 16:00:41 -04:00
Michael Drake bba33533ab assrender: fix multiple subtitles on screen simultaneously
This fixes an issue with SSA/ASS subtitles, where subtitles
would fail to appear if there was already a subtitle on screen.

This was because `struct _GstAssRender` had a single
`GstBuffer *subtitle_pending` member.  This meant that
the assrender context could only be aware of one subtitle
at a time.

This patch changes the subtitle_pending member to a
linked list of pending subtitles.

The `gst_ass_render_chain_text` function no longer needs
to care about whether there are already subtitles pending,
it simply appends new subtitles to the list.

The `gst_ass_render_chain_video` function has been modified
to handle the list of pending subtitles.

Finally, the `gst_ass_render_pop_text` function has been
modified to pop the entire list of pending subtitles.

https://bugzilla.gnome.org/show_bug.cgi?id=735944
2018-08-14 23:00:34 +10:00
Víctor Manuel Jáquez Leal 85f142a8e2 closedcaption: comment out unused function
When compiling with clang-6 this error raises:

raw_decoder.c:411:1: error: unused function 'cpr1204_crc'
[-Werror,-Wunused-function]

This patch only comments it out.

https://bugzilla.gnome.org/show_bug.cgi?id=796957
2018-08-14 13:31:49 +02:00
Víctor Manuel Jáquez Leal 808b404e88 closedcaption: avoid implicit convertion of enums
When compiling with clang-6 this error pops out:

raw_decoder.c:1011:62: error: implicit conversion from enumeration
type 'const vbi_modulation' to different enumeration type
'vbi3_modulation' [-Werror,-Wenum-conversion]

This is because function vbi3_bit_slicer_set_params() sets
vbi3_modulation as enum type parameter, nonetheless vbi_modulation
enum is passed. Both enums looks semantically equal, thus the fix is a
simple cast.

https://bugzilla.gnome.org/show_bug.cgi?id=796957
2018-08-14 13:31:49 +02:00
Nirbheek Chauhan c54e4b6305 meson: Add gnustl dep for webrtcdsp on Android
Needed for C++ headers. Without this, webrtcdsp can't find <algorithm>
2018-08-11 04:32:34 +05:30
Nicolas Dufresne bdd1dd04ea webrtcdsp: Avoid redefinition of GST_USE_UNSTABLE_API 2018-08-03 07:57:02 -04:00
George Kiagiadakis d299c27892 webrtcdsp: add support for using F32/non-interleaved buffers
This is the native format that is in use by the webrtc audio processing
library internally, so this avoids internal {de,}interleaving and
format conversion (S16->F32 and back)

https://bugzilla.gnome.org/show_bug.cgi?id=793605
2018-08-03 13:20:12 +03:00
Thibault Saunier 760cbc4059 rsvg: Also accept </svg:svg> as ending tag
Some SVG files created by inkscape use that, such as:
https://gitlab.gnome.org/GNOME/pitivi/uploads/8dd8d9d988b5eb6cc38f871196caac6f/Titel-Tafel3.2_anim.svg

This is a first patch for https://bugzilla.gnome.org/show_bug.cgi?id=796909
but it is not enough to support animated gifs.
2018-08-02 21:11:14 -04:00
Nicolas Dufresne d2ee9b16fa opencv: Fixup include to follow new standard
This uses the new path for OpenCV headers. OpenCV now have
master headers files per modules, which reduce the amount of
required includes. Note that HIGHGUI was included to get the
imgcodecs includes, which I fixed, though the master header is
missing the C headers, so I included that directly. All the
image stuff should be ported to C++ eventually. Finally, this
patch also update the header checks to reflect the modules that
are really being used.
2018-08-02 11:31:34 -04:00
Nicolas Dufresne 9c91282ba6 opencv: Updated to use new header path 2018-08-02 11:31:34 -04:00
Nicolas Dufresne cabf875098 opencv: Bump requirement to 3.0.0+
And removes all the ifdef code to support the 2.X APIs.
2018-08-02 11:31:34 -04:00
Sebastian Dröge f028f817e3 ceaccoverlay: Initialize debug category 2018-08-02 16:19:55 +03:00
Nicolas Dufresne 1f65a3aa13 cameracalibrtate: Fix opencv2 core.hpp path
This is to support older release of OpenCV2

https://bugzilla.gnome.org/show_bug.cgi?id=789075
2018-08-02 08:14:31 -04:00
Philippe Renon f460448198 opencv: new cameracalibrate and cameraundistort elements
https://bugzilla.gnome.org/show_bug.cgi?id=789075
2018-08-01 22:04:17 -04:00
Seungha Yang 231524cbbc srt: Allow the host name "localhost"
Add support "srt://localhost:port" style uri, and change the
default host to "localhost"

https://bugzilla.gnome.org/show_bug.cgi?id=796842
2018-07-30 16:53:52 -04:00
Seungha Yang fa75487e98 srtclientsink: Fix SRT socket option setting
SRTClientSink is sender

https://bugzilla.gnome.org/show_bug.cgi?id=796842
2018-07-30 16:50:10 -04:00
Seungha Yang 32140dcb84 srt: Do not ignore SRT socket error event
... and set SRT_EPOLL_IN flag if the client is not sender
(i.e., source element) since waiting readable event for
srt_recvmsg() makes more sense.

https://bugzilla.gnome.org/show_bug.cgi?id=796842
2018-07-30 16:50:10 -04:00
Seungha Yang f46af953c1 srtbasesrc: Use GstBaseSrc's timestamp impl.
... instead of doing it ourselves. Otherwise, we should add more
logic here (such as checking GstClock and etc) which was already provided by
GstBaseSrc.

https://bugzilla.gnome.org/show_bug.cgi?id=796842
2018-07-30 16:50:10 -04:00
Seungha Yang 728b116fdb srt: Add "const" keyword to a function argument
Given "passphrase" shouldn't be modified

https://bugzilla.gnome.org/show_bug.cgi?id=796842
2018-07-30 16:50:10 -04:00
Seungha Yang 82467a49b9 srt: Remove duplicated code for setting server socket
https://bugzilla.gnome.org/show_bug.cgi?id=796842
2018-07-30 16:50:10 -04:00
Seungha Yang 8e18175080 srt: Fix signal args mismatch
client-added and client-{removed,closed} signals were defined
to be emitted with two arguments (socket fd and address)

https://bugzilla.gnome.org/show_bug.cgi?id=796842
2018-07-30 16:50:09 -04:00
Seungha Yang d8015586b5 srtserversrc: Emit client-closed signal in _stop()
... instead of client-added

https://bugzilla.gnome.org/show_bug.cgi?id=796842
2018-07-30 16:44:51 -04:00
Seungha Yang f5de8db140 srtclientsink: Do not leak string
https://bugzilla.gnome.org/show_bug.cgi?id=796842
2018-07-30 16:44:51 -04:00
Seungha Yang b609184701 srtclient: Fix bind-port and rendez-vous property getter
https://bugzilla.gnome.org/show_bug.cgi?id=796842
2018-07-30 16:44:51 -04:00
Seungha Yang 85d04e9335 srt: Reduce useless call depth
Providing simplified _client_connect() is not required for now.

https://bugzilla.gnome.org/show_bug.cgi?id=796842
2018-07-30 16:44:51 -04:00
Seungha Yang aafdfdb5e4 srt: Remove white space
https://bugzilla.gnome.org/show_bug.cgi?id=796842
2018-07-30 16:44:51 -04:00
Nicolas Dufresne cc746e336a meson: mjpegtools_api should be 20K for mplex too
This error was duplicated.
2018-07-27 22:36:40 -04:00
Nicolas Dufresne c259b8878e meson: mjpegtools_api should have been 20K not 2K
This was miss-ported when the options got added. The requires version was
properly set to 2000 before.
2018-07-27 22:33:47 -04:00
Nirbheek Chauhan b55dfb5313 Add feature options for almost all plugins
The only plugins remaining are those that haven't been ported to Meson
yet, and msdk. Also, the tests are still automagic.

https://bugzilla.gnome.org/show_bug.cgi?id=795107
2018-07-27 19:04:38 +05:30
Nirbheek Chauhan 7ef303fa28 meson: Add feature options for many plugins
The rest will be converted later, these are necessary for gst-build to
set options correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=795107
2018-07-27 18:43:52 +05:30
Olivier Crête 8908260c1f av1enc: Implement latency setting 2018-07-26 11:19:41 -04:00
Olivier Crête 576c0b2a69 av1enc: Propagate flags from encoder to GstBuffer 2018-07-26 10:48:34 -04:00
Olivier Crête 7c2170a63a av1enc: Implement finish for EOS
Call the encode function repeatedly until nothing comes out.

https://bugzilla.gnome.org/show_bug.cgi?id=796727
2018-07-26 10:34:29 -04:00
Olivier Crête 187783354a av1enc: Return downstream error from push 2018-07-26 10:34:29 -04:00
Matteo Valdina e0535b44d4 waylandsink: relaxed wl_shell check and added zwp_fullscreen_shell.
Relaxed the wl_shell interface constrains, so application that
pass via GstContext the wl_surface can use waylandsink in a
compositor without wl_surface and zwp_fullscreen_shell.

Added support for zwp_fullscreen_shell.

https://bugzilla.gnome.org/show_bug.cgi?id=796772
2018-07-25 07:53:09 -04:00
Jan Schmidt 14ab3972ef ladspa: Only scan LADSPA subdir APPDATA and COMMONPROGRAMFILES
Don't scan the entire APPDATA and COMMONPROGRAMFILES
path tree, just the LADSPA sub-directory inside them, if any.

https://bugzilla.gnome.org/show_bug.cgi?id=796450
2018-07-22 10:39:30 +10:00
Jan Schmidt ff736c730d ladspa: Don't try and load every file as a plugin
When scanning paths for LADSPA plugins, don't try and load
every random file as a module, as g_module_open ends up throwing
errors on Windows.

Use a G_MODULE_SUFFIX and GST_EXTRA_MODULE_SUFFIX suffix check as
we do for GStreamer plugins.

https://bugzilla.gnome.org/show_bug.cgi?id=796450
2018-07-22 10:39:30 +10:00
Sam Gigliotti 1b095e9609 webrtc: fix memory leak
When it parses SDP, it doesn't free the error object.

https://bugzilla.gnome.org/show_bug.cgi?id=796830
2018-07-19 14:30:55 +01:00
Jonathan Karlsson d74ceb343a curlhttpsink: Support for multipart/form-data Content-Type
Add support to set multipart/form-data as Content-Type by sending a
caps event to the curlhttpsink with a field named "boundary".

https://bugzilla.gnome.org/show_bug.cgi?id=796618
2018-07-17 16:57:06 +03:00
Jan Schmidt e6a564216d webrtc: Add a warning in sdp_media_from_transceiver()
When generating caps with no ssrc, at least throw a
warning instead of using an uninitialised stack variable

https://bugzilla.gnome.org/show_bug.cgi?id=796810
2018-07-15 23:07:21 +10:00
Jan Schmidt 76a93da2a7 webrtc: Fix memory leak
Fix a leaked string when building RTX info.
2018-07-14 23:20:13 +10:00
Jan Schmidt 15d3bc9870 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.
2018-07-14 23:20:13 +10:00
Jan Schmidt cb750efd6c 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.
2018-07-14 23:18:50 +10:00
Thibault Saunier c247745faa 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);
                                        ^~~~~~
2018-07-14 08:01:27 -04:00
Mathieu Duponchelle 6fd3e2a400 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
2018-07-12 21:39:41 +02:00
Matthew Waters e47cf9abe1 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
2018-07-12 12:48:39 +10:00
Daniel Klamt b8442dd6ab 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
2018-07-12 12:46:40 +10:00
Nicolas Dufresne 0327579460 glvideomixer: Fix coding style 2018-07-10 09:45:31 -04:00
Nicolas Dufresne 672fa010dc glvideomixer: Add missing string.h include 2018-07-10 09:42:47 -04:00
Matthew Waters bd2920ca2d 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
2018-07-10 20:31:26 +10:00
Daniel Klamt 969089f7a8 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
2018-07-10 20:31:26 +10:00
Arun Raghavan c6f19511b5 closedcaption: Fix compilation on older compilers
For when -std=c99 (or later) is not the default.
2018-07-09 06:40:29 +05:30
Jan Schmidt 27b28f3aec 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.
2018-07-01 10:44:45 +10:00
Jan Schmidt 0fca02bb5e 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.
2018-06-30 01:07:32 +10:00
Sean-Der 10a37e0c35 aomenc: Handle 8 bit_depth images with AOM_IMG_FMT_HIGHBITDEPTH enabled
https://bugzilla.gnome.org/show_bug.cgi?id=791674
2018-06-29 07:47:59 +02:00
Sean-Der 1d96d9e842 aomenc: Add support for 10/12bit decoding
https://bugzilla.gnome.org/show_bug.cgi?id=791674
2018-06-29 07:47:59 +02:00
Thibault Saunier a387f4bc33 meson: Add fallback for openh264 dependency 2018-06-28 15:21:54 -04:00
Jan Schmidt bc128d6100 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).
2018-06-27 22:44:26 +10:00
Jan Schmidt ed90d3b2ec 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
2018-06-27 22:44:26 +10:00
Tim-Philipp Müller d57dc6534f gl: Update for g_type_class_add_private() deprecation in recent GLib 2018-06-24 01:37:08 +02:00
Tim-Philipp Müller a862c0aa85 vulkan: Update for g_type_class_add_private() deprecation in recent GLib 2018-06-24 01:25:04 +02:00
Tim-Philipp Müller bde76a7dd0 soundtouch: Update for g_type_class_add_private() deprecation in recent GLib 2018-06-24 01:15:59 +02:00
Tim-Philipp Müller 3c6f642fa6 dtls: Update for g_type_class_add_private() deprecation in recent GLib 2018-06-24 01:06:24 +02:00
Tim-Philipp Müller 6f46792f0f webrtc: Update for g_type_class_add_private() deprecation in recent GLib 2018-06-24 00:17:26 +02:00
Olivier Crête bfcc073ed4 ext/closedcaption/misc.h: Transform into UTF-8 2018-06-21 08:49:01 -04:00
Mathieu Duponchelle 85406b9827 pitch: remove trailing whitespaces from previous commit 2018-06-18 23:42:04 +02:00
Suhas Nayak 68052a7bc3 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
2018-06-18 23:39:47 +02:00
Mathieu Duponchelle 44f0814855 pitch: preserve seek event seqnums
This was wreaking havoc when used with a downstream audiomixer.

https://bugzilla.gnome.org/show_bug.cgi?id=796603
2018-06-16 18:38:46 +02:00
Mathieu Duponchelle 0b03b47193 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
2018-06-16 18:38:46 +02:00
Mathieu Duponchelle 5f020be6cd 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
2018-06-16 18:38:46 +02:00
Matthew Waters 52e3db3371 vulkaninstance: add missing precondition to _open() 2018-06-13 20:23:22 +10:00
Mathieu Duponchelle 33c7af8845 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
2018-05-29 13:07:30 +02:00
Edward Hervey 5d697cd804 closedcaption: Fix compilation without debugging 2018-05-28 15:55:57 +02:00
Edward Hervey a41fb3c6df 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
2018-05-28 15:29:01 +02:00
Tim-Philipp Müller aab111b979 closedcaption: fix meson build 2018-05-28 14:17:05 +01:00
Edward Hervey 2a1553cb88 closedcaption: Add new "line 21 VBI" CC decoder
Allows detecting and extracting CEA608 closed caption present on
the VBI of analog NTSC SD signals.
2018-05-28 15:03:57 +02:00
Edward Hervey 9ee58b5aeb closedcaption: zvbi: Add gst-debug category to zvbi code
And adapt their logging system to go through it
2018-05-28 15:04:24 +02:00
Edward Hervey af9e9d613a closedcaption: zvbi: Disable unused legacy bit slicer
The code only uses the new 'optimized' bit slicer
2018-05-28 15:04:19 +02:00
Edward Hervey 61334a38a3 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.
2018-05-28 15:04:14 +02:00
Edward Hervey 7ea93b9f94 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
2018-05-28 15:04:02 +02:00
Edward Hervey c3a9835c05 closedcaption: zvbi: Remove dead code
* RGB8 is never used
* some inline functions were never used
2018-05-28 15:03:57 +02:00
Edward Hervey b0b02e7cb5 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
2018-05-28 14:50:01 +02:00
Tim-Philipp Müller 483892d16a closedcaption: add meson build files 2018-05-28 11:09:45 +01:00
Edward Hervey 2550718f59 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.
2018-05-28 11:54:17 +02:00
Tim-Philipp Müller ed7a98d45b webrtcbin: rtpstorage takes a 64-bit integer for "size-time" property
https://bugzilla.gnome.org/show_bug.cgi?id=796429
2018-05-28 10:43:37 +01:00
Tim-Philipp Müller 88fec19ba2 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
2018-05-28 10:43:37 +01:00
Tim-Philipp Müller 2227ef1304 meson: fix libnice fallback options 2018-05-21 14:42:56 +01:00
Tim-Philipp Müller 69fcd6391a webrtc: add some default options for libnice fallback
The tests are not very reliable, so disable for now.
2018-05-19 12:25:02 +01:00
Seungha Yang 9956f22537 dashdemux: Fix sync of updated manifest from previous one
_get_next_fragment_timestamp() returns relative timestamp to period start.
But gst_mpd_client_stream_seek() uses absolute MPD timeline.

https://bugzilla.gnome.org/show_bug.cgi?id=781183
2018-05-12 09:27:46 +02:00
Olivier Crête 67ae35813b srtp: Add "roc" caps field to the gst-launch example
The currrent example was broken since 1.8.3 it seems.

https://bugzilla.gnome.org/show_bug.cgi?id=786304
2018-05-11 20:55:10 +02:00
Edward Hervey 45d6256dad opencv: Fix memcpy within C++
Explicitly cast to void* because GCC 8 is (rightfully) upset that this is
"writing to an object of type ‘...’ with no trivial copy-assignment".

Caused by the new "class-memaccess" warning
2018-05-11 09:54:22 +02:00
Mathieu Duponchelle 5c450c5992 webrtcbin: implement support for FEC and RTX
https://bugzilla.gnome.org/show_bug.cgi?id=795044
2018-05-09 14:46:14 +02:00
Sebastian Dröge 4249cb5768 videoaggregator: Rename get_output_buffer() to create_output_buffer()
For consistency with GstAudioAggregator.
2018-05-06 16:05:28 +02:00
Sebastian Dröge ea5de0d757 videoaggregator: Switch to a GstVideoAggregatorConvertPad subclass
This moves all the conversion related code to a single place, allows
less code-duplication inside compositor and makes the glmixer code less
awkward. It's also the same pattern as used by GstAudioAggregator.
2018-05-06 15:22:51 +02:00
Fabien Dessenne f777c66dcc waylandsink: support fullscreen
Add the fullscreen property that makes the sink displayed all across
the output.

https://bugzilla.gnome.org/show_bug.cgi?id=688190
2018-05-06 15:13:59 +02:00