Commit graph

26060 commits

Author SHA1 Message Date
Seungha Yang
82fb55bdff codecs: h264decoder: Make GstVideoCodecFrame hold the last reference of the buffer
... when gst_video_decoder_finish_frame() is called.

Some subclasses attach GstBuffer to GstH264Picture as an user data
which will increase reference count of the buffer. It would result
to buffer copy per every frame.

Background here is, GstVideoDecoder wants writable output buffer for
GstMeta handling, and if the output buffer is not writable
(i.e., reference count is not one), the buffer will be copied.
Even if underlying GstMemory wouldn't be copied, buffer copy operation
will introduce extra memory allocation overhead which is not optimal.

By this modification, subclass might be able to receive the last
reference to GstH264Picture

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1449>
2020-07-21 17:18:42 +09:00
Seungha Yang
e921a07715 codecs: h264decoder: Pass GstVideoCodecFrame to output_picture()
All subclasses are retrieving list to get target output frame, which
can be done by baseclass. And pass the ownership of the GstH264Picture
to subclass so that subclass can clear implementation dependent resources
before finishing the frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1449>
2020-07-21 17:18:42 +09:00
Seungha Yang
7a024a740f codecs: h264decoder: Don't attach extra ref of GstH264Picture to GstVideoCodecFrame
The lifecycle of GstH264Picture is being managed by our DPB
implementation. If it's still required, subclass can do that
by itself in the new_picture() method.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1449>
2020-07-21 17:18:42 +09:00
Seungha Yang
37aeb91d54 mfvideosrc: Don't error out when if we've found supported format
While retrieving supported formats by device, the last return might
not be S_OK in case that it's not supported one by us (e.g., H264, JPEG or so).
But if we've found at least one supported raw video format,
we can keep going on.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1451>
2020-07-20 16:13:37 +00:00
Seungha Yang
14f6799f93 codecs: h264decoder: Drop non-decodable frames
Otherwise GstVideoDecoder baseclass will hold the corresponding broken frames
until new reset event happens such as FLUSH or downwards state change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1450>
2020-07-20 21:00:48 +09:00
Matthew Waters
597c1b4ec6 webrtc: remove private properties/signals from the now public ice object
We don't want to expose all of the webrtcbin internals to the world.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1444>
2020-07-20 15:56:20 +10:00
Seungha Yang
c1093e3481 plugins: Use g_win32_error_message for HRESULT to string conversion
We don't need to duplicate a method for HRESULT error code to string
conversion. This patch is intended to
* Remove duplicated code
* Ensure FormatMessageW (Unicode version) and avoid FormatMessageA
  (ANSI version), as the ANSI format is not portable at all.
  Note that if "UNICODE" is not defined, FormatMessageA will be aliased
  as FormatMessage by default.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1442>
2020-07-18 11:05:52 +09:00
Seungha Yang
f68c8d853b wasapi2util: Fix wrong use of debug category
Haven't noticed so far since there is no debug statement in the source file.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1445>
2020-07-17 15:58:16 +09:00
Ederson de Souza
51d5aee94d avtp: Update documentation
- Mention that a new capability is required by "avtpsink" element;
 - Use "clockselect" element to change pipeline clock, instead of a
   gst-launch option that never saw the light of day.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1443>
2020-07-16 13:32:56 -07:00
Silvio Lazzeretti
3803fa29b2 wasapi: added missing lock release in case of error in gst_wasapi_xxx_reset
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1440>
2020-07-15 20:11:48 +00:00
Damian Hobson-Garcia
e6944da134 waylandsink: use GstMemory instead of GstBuffer for cache lookup
The GstMemory objects contained in a GstBuffer could be replaced
by an upstream element, which would break the association beteen
the GstBuffer and the wayland wl_buffer, make the cache lookup
results incorrect.
This patch changes the cache lookup to use the first GstMemory
in a buffer instead.  For multi-plane buffers, this assumes that
all of the GstMemory(s) will always be moved together as a set,
and that the same (first) GstMemory isn't used with different
combinations of other GstMemory(s).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1401>
2020-07-15 14:35:06 +00:00
Damian Hobson-Garcia
ff5f264045 waylandsink: Keep per display wayland buffer caches
Instead of attaching a single wayland wl_buffer to each GStBuffer as qdata,
keep a separate cache for each display.
A unique wl_buffer and associated metadata is created for each display.
This allows for sharing of GstBuffer objects between multiple
displays, such as when using tee elements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1401>
2020-07-15 14:35:06 +00:00
Nicolas Dufresne
7b3c101ced v4l2codecs: Enable 32x32 tiled NV12 support
This is used by Cedrus driver to support Allwinner VPU, also known as the
sunxi platforms.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1437>
2020-07-15 13:24:13 +00:00
Tim-Philipp Müller
99a0615592 docs: update for new pixel formats
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/753
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/754

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1441>
2020-07-15 12:43:20 +01:00
Jordan Petridis
43736a7800 opencv: suppress another warning about non-existent include dirs
Ammend to 92456967d0 !1427

The .pc file of opencv4 seems to be broken

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1438>
2020-07-15 09:49:07 +00:00
Haihao Xiang
e7160a97cf msdkh265enc: add the missing comma
Otherwise main-444 and main-444-10 are concatenated

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1436>
2020-07-15 08:38:07 +08:00
Nicolas Dufresne
2778fd7e31 doc: Updated cache file for the new pixel format
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1433>
2020-07-14 17:06:59 -04:00
Nicolas Dufresne
782dc857e0 rtpsrc: Add domain name support
This add domain name resolution (similar to udpsrc does) to the rtpsrc
element.

Fixes 1352

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1433>
2020-07-14 20:48:04 +00:00
Nicolas Dufresne
19c632f4e8 ristsrc: Add support for domain name
This add domain name resolution (similar to udpsrc does) to the ristsrc
element.

Fixes 1352

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1433>
2020-07-14 20:48:04 +00:00
Nicolas Dufresne
f6ac2e44bb rtpsrc: Always set rtcp socket address
Regardless if it's multicast or not, set the address property to match
the element address. This is the address of the interface to listen to,
which is expected to be ANY in most cases, but should be honnored even
for RTCP non-multicast case.

This also fixes an assertion if the address is not a parsable IPv4 or
IPv6 string.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1433>
2020-07-14 20:48:04 +00:00
Nicolas Dufresne
82fe23f212 rtpsink: Fix error handling on bad DNS
This will properly print the DNS being attempted to resolved and avoid
trying to unref a NULL pointer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1433>
2020-07-14 20:48:04 +00:00
Nicolas Dufresne
89fbcc71d9 ristsink: Fix error handling on bad DNS
This will properly print the DNS being attempted to resolved and avoid
trying to unref a NULL pointer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1433>
2020-07-14 20:48:04 +00:00
Seungha Yang
a43d6f6cd9 mfvideosrc: Enable WinRT capture impl. for desktop target
... if target OS version was specified as Windows 10.
When enabled, desktop application can select target capture
implementation between WinRT and Win32
via GST_USE_MF_WINRT_CAPTURE environment
(e,g., GST_USE_MF_WINRT_CAPTURE=1 for WinRT impl.).
Default is Win32 implementation in case of desktop target.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1434>
2020-07-14 16:59:06 +00:00
Seungha Yang
2d71ad49f8 h265parser: Fix possible invalid memory access
... and do more strict validation for num_tile_columns_minus1 and
num_tile_rows_minus1.

As per specification Table A.8, allowed maximum number of tile rows
and tile columns are 22 and 20, respectively. So we should adjust the size
of each array.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1372>
2020-07-14 16:34:46 +00:00
Seungha Yang
495ed45d05 d3d11decoder: Disable zero-copy for Qualcomm devices
Qualcomm driver looks buggy in zero-copy scenario. Even if we disable
zero-copy, device-to-device memory copy will be used with d3d11videosink
which should be fast enough.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1432>
2020-07-12 01:40:45 +09:00
Haihao Xiang
c0e809d6b8 msdkh265enc: add support for screen content coding extension
Because the valid input formats for screen content coding extension is
a subset of input formats for range extension, user must specify the
profile for screen content coding extension in the caps filter

Example:
gst-launch-1.0 videotestsrc ! video/x-raw,format=NV12 ! msdkh265enc
low-power=1 ! video/x-h265,profile=screen-extended-main ! fakesink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1389>
2020-07-11 23:42:52 +08:00
Haihao Xiang
e1d1cb07a6 msdkh265enc: allow user to choose profile
Example:
gst-launch-1.0 videotestsrc ! video/x-raw,format=NV12 ! msdkh265enc !
video/x-h265,profile=main-444 ! fakesink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1389>
2020-07-11 23:42:52 +08:00
Haihao Xiang
55f3590317 msdkenc: support tune property in msdkh264enc and msdkh265enc
Introduce a new property for encoding mode selection, the default value
for this new property allows the SDK to decide what to do. In addition,
low-power is marked as deprecated since this fix

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1426>
2020-07-11 13:57:52 +00:00
Haihao Xiang
3ecb2a82be Revert "msdkh265enc: let MSDK select the encoding mode by default"
This reverts commit 9e977832c1.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1426>
2020-07-11 13:57:52 +00:00
Tim-Philipp Müller
395ecb3d2f avtp: rename tstamp-mode to timestamp-mode
I thnk w cn spre the xtra lttrs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1397>
2020-07-11 00:14:44 +01:00
Mathieu Duponchelle
13376f88fe basetsmux: make use of gst_aggregator_finish_buffer_list
Fixes #1276

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1429>
2020-07-10 20:12:11 +00:00
Tim-Philipp Müller
510e8ef8cb docs: fix element names in section headers
Hopefully that'll make hotdoc pick up the docs for these elements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1428>
2020-07-10 19:22:29 +00:00
Tim-Philipp Müller
92456967d0 opencv: suppress warnings about non-existent include dirs
Looks like opencv4 ships with a broken .pc file.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1427>
2020-07-10 14:57:44 +01:00
Tim-Philipp Müller
e86a549b5d docs: fix up for errorignore convert-error signal removal
The commit that added that was reverted. Need to remove this
from docs cache manually.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1422>
2020-07-08 23:50:35 +01:00
Seungha Yang
ad8529caf7 d3d11: Disable D3D11Debug and DXGIDebug layer for UWP build
WACK (Windows App Certification Kit) doesn't seem to be happy with
the DXGIGetDebugInterface1 symbol.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1421>
2020-07-08 21:11:31 +00:00
Tim-Philipp Müller
5247e2319c meson: set release date from .doap file for releases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1420>
2020-07-08 19:14:24 +00:00
Vivia Nikolaidou
bf38898af8 cccombiner: Update segment according to video sink pad
Otherwise the following pipeline would preroll after 1000 hours:
gst-launch-1.0 videotestsrc ! x264enc ! cccombiner ! fakesink silent=0 sync=1 -v

Fixes #1355

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1419>
2020-07-08 17:11:38 +00:00
Andreas Frisch
0e075b4dbf mpegtsmux: Don't assume English for ISO-639 language descriptor
Previously, "en" (should have actually been "eng") was assumed
for the ISO-639 language descriptor if no language was explicitely given.
Neither ETSI EN 300 468 nor ATSC A/52 mandate for a language descriptor,
so we should simply not set it, if it's unknown.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1386>
2020-07-08 13:37:12 +00:00
Jan Schmidt
46cc64e09f mpegtsmux: Fix handling of MPEG-2 AAC
The audio/mpeg,mpegversion=2 caps in GStreamer refer to
MPEG-2 AAC (ISO 13818-7), not to the extended MP3 (ISO 13818-3),
which is audio/mpeg,mpegversion=1,mpegaudioversion=2/3

Fix the caps, and add handling for MPEG-2 AAC in both ADTS and raw
form, adding ADTS headers for the latter.
2020-07-08 12:24:13 +00:00
Tim-Philipp Müller
4c4b3dfc76 meson: Fix up update-orc-dist target for the case where there are no orc targets
All those plugins might have been disabled, in which case meson
would complain about alias_target() needing at least two arguments.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1418>
2020-07-08 11:39:58 +01:00
Tim-Philipp Müller
b428b7357e pkgconfig: fix meson warning about waylandlib not being in the config data
meson.build:58: WARNING: The variable(s) 'waylandlibdir' in the input file 'subprojects/gst-plugins-bad/pkgconfig/gstreamer-plugins-bad-uninstalled.pc.in' are not present in the given configuration data.

We don't provide a .pc file for this lib nor install its headers,
so no need for this path to be in the uninstalled .pc file really.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1417>
2020-07-08 10:54:49 +01:00
Tim-Philipp Müller
f3fdd76683 rtmp, transcodebin: fix i18n header includes
Fixes #1351

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1416>
2020-07-07 19:55:00 +01:00
Nicolas Dufresne
af741f0723 rist: Use g_signal_connect_object()
rtpbin can still emit signals when it is being disposed, and while
rtpbin is inside ristsrc/ristsink it can still live longer.

So we either have disconnect all signals at some point, or let GObject
take care of that automatically.

Related to !1412

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1413>
2020-07-07 15:37:57 +00:00
Josep Torra
7346e7c1e2 scenechange: use orc to compute score
Add an orc implementation for SAD operation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1024>
2020-07-07 15:06:55 +01:00
Sebastian Dröge
b812d1c743 rtpsrc/sink: Use g_signal_connect_object()
rtpbin can still emit signals when it is being disposed, and while
rtpbin is inside rtpsrc/rtpsink it can still live longer.

So we either have disconnect all signals at some point, or let GObject
take care of that automatically.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1412>
2020-07-07 12:42:36 +00:00
Jan Alexander Steffens (heftig)
9c2982d22c tests: mpegtsmux: Test we don't crash releasing unused pad
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1411>
2020-07-07 14:05:04 +02:00
Jan Alexander Steffens (heftig)
076189e2dc tests: mpegtsmux: Avoid use-after-unref
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1411>
2020-07-07 14:05:04 +02:00
Jan Alexander Steffens (heftig)
cba9ba9b38 mpegtsmux: Avoid crash releasing pad with NULL prog
If we release a pad while the muxer is running which has never been used
for aggregation (thus it does not have an assigned program), `prog` is
NULL.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1411>
2020-07-07 14:05:04 +02:00
Haihao Xiang
9e977832c1 msdkh265enc: let MSDK select the encoding mode by default
MSDK may support lowpower and non-lowpower modes, some features are
available only under one of the two modes, which is hard to know for
user, so let MSDK select the mode by default.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1405>
2020-07-06 14:43:31 +00:00
Matthew Waters
d6635346a2 build: remove obsolete 'bad-transcoder' pc file
Replaced by 'transcoder' pc files.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1409>
2020-07-06 14:17:34 +00:00