platform/upstream/gstreamer.git
4 years agohls: Check nettle version to ensure AES128 support
Seungha Yang [Fri, 10 Jan 2020 07:03:48 +0000 (16:03 +0900)]
hls: Check nettle version to ensure AES128 support

AES128 support was added since nettle version 3.0

../subprojects/gst-plugins-bad/ext/hls/gsthlsdemux.h:110:10: error: field ‘ctx’ has incomplete type
   struct CBC_CTX (struct aes128_ctx, AES_BLOCK_SIZE) aes_ctx;

4 years agoRevert "msdkdec: make sure to use video memory on Linux"
Haihao Xiang [Mon, 6 Jan 2020 04:59:36 +0000 (12:59 +0800)]
Revert "msdkdec: make sure to use video memory on Linux"

Commit a1584b6 caused big performance drop if the downstream element
is not a msdk element because it is very slow to read data from video
memory directly.

This reverts commit a1584b6f99caaf61812ac6a9654ec0e6da8240da.

4 years agotests: d3d11colorconvert: Add test cases for visual validation
Seungha Yang [Thu, 9 Jan 2020 12:00:47 +0000 (21:00 +0900)]
tests: d3d11colorconvert: Add test cases for visual validation

By default new test cases are disabled since it might be timed out
or test environment might not have render device.

4 years agod3d11colorconverter: Handle P016_LE format
Seungha Yang [Thu, 9 Jan 2020 10:39:59 +0000 (19:39 +0900)]
d3d11colorconverter: Handle P016_LE format

P016 format is no different than P010. Not much things to add code.

4 years agod3d11colorconverter: Add support for YUV to YUV conversion
Seungha Yang [Thu, 9 Jan 2020 10:32:38 +0000 (19:32 +0900)]
d3d11colorconverter: Add support for YUV to YUV conversion

4 years agod3d11colorconverter: Add support for RGB to YUV conversion
Seungha Yang [Wed, 8 Jan 2020 14:09:51 +0000 (23:09 +0900)]
d3d11colorconverter: Add support for RGB to YUV conversion

... and remove code for RGBx since it's not supported format
by our d3d11 implementation for now.

4 years agod3d11format: Remove invalid format from supported format list
Seungha Yang [Thu, 9 Jan 2020 02:14:47 +0000 (11:14 +0900)]
d3d11format: Remove invalid format from supported format list

4 years agodecklinkvideosink: Always configure 10 bit YUV for VANC frames
Sebastian Dröge [Wed, 8 Jan 2020 05:42:21 +0000 (07:42 +0200)]
decklinkvideosink: Always configure 10 bit YUV for VANC frames

If 8 bit are required by the device/mode then it will be converted internally
by the SDK, but the SDK won't automatically convert from 8 to 10 bit. As
such, always use 10 bit VANC.

Some devices require configuring also a 10 bit video format when using
10 bit VANC is required but those would fail regardless and the
application would have to configure the correct video format.

With newer versions of the SDK this information can be retrieved via the
BMDDeckLinkVANCRequires10BitYUVVideoFrames flag but we don't use a new
enough SDK version yet to extract this information.

4 years agowebrtc: Unmap all non-binary buffers received via the datachannel
Sebastian Dröge [Tue, 7 Jan 2020 18:17:12 +0000 (20:17 +0200)]
webrtc: Unmap all non-binary buffers received via the datachannel

Previously they were only unmapped in case of binary data, causing all
of them to be leaked.

4 years agozbar: remove useless conditional on passthrough
Stéphane Cerveau [Tue, 7 Jan 2020 09:05:33 +0000 (10:05 +0100)]
zbar: remove useless conditional on passthrough

seen that passthrough is never set for this element, no need
to allow to remove the 'transform' call

4 years agozxing: initial plugin revision
Stéphane Cerveau [Fri, 27 Sep 2019 21:02:38 +0000 (23:02 +0200)]
zxing: initial plugin revision

Status:
- scan QR code with low resolution
- Scan barcode with high resolution

4 years agotests: add h26xparse HDR SEI test
Stéphane Cerveau [Fri, 3 Jan 2020 17:14:48 +0000 (18:14 +0100)]
tests: add h26xparse HDR SEI test

Detect caps according to MDCV + CLLI SEI message

4 years agotest: add h265parse test
Stéphane Cerveau [Wed, 18 Dec 2019 09:05:05 +0000 (10:05 +0100)]
test: add h265parse test

4 years agoh26xparse: Handle state change on IDR first slice
Stéphane Cerveau [Tue, 17 Dec 2019 11:08:34 +0000 (12:08 +0100)]
h26xparse: Handle state change on IDR first slice

As the H265/H264 bitstream can support multiple slices,
mastering_display_info_state and content_light_level_state
should be changed only on first slice segment.

Fix #1152

4 years agoh265parse: use same algo for MDCV and CLL SEI management
Stéphane Cerveau [Thu, 5 Dec 2019 15:48:05 +0000 (16:48 +0100)]
h265parse: use same algo for MDCV and CLL SEI management

4 years agoh264parser: add MDCV and CLL SEI message parsing
Stéphane Cerveau [Thu, 28 Nov 2019 11:59:46 +0000 (12:59 +0100)]
h264parser: add MDCV and CLL SEI message parsing

Allow to parse SEI message for:
- mastering display colour volume
- Light level infomation

Set to caps if necessary.

Fix #958

4 years agodash: Remove spurious condition check and remove unused debug category
Seungha Yang [Mon, 6 Jan 2020 16:40:57 +0000 (01:40 +0900)]
dash: Remove spurious condition check and remove unused debug category

Note that uppercase debug category names are used for
core modules and should be redefined in lowercase for plugins if necessary.

4 years agofakevideosink: Use our pad template to create pad
Thibault Saunier [Mon, 6 Jan 2020 19:30:36 +0000 (16:30 -0300)]
fakevideosink: Use our pad template to create pad

4 years agod3d11: Add support for Universal Windows Platform
Seungha Yang [Mon, 30 Dec 2019 09:58:59 +0000 (18:58 +0900)]
d3d11: Add support for Universal Windows Platform

Initial UWP support via new window (CoreWindow and SwapChainPanel) implementation.

4 years agod3d11decoder: Fix build on non-desktop target
Seungha Yang [Tue, 31 Dec 2019 04:36:59 +0000 (13:36 +0900)]
d3d11decoder: Fix build on non-desktop target

Although the target platform of D3D11 decoding API are both desktop and UWP app,
DXVA header is blocked by "WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)"
which is meaning that that's only for desktop app.
To workaround this inconsistent annoyingness, we need to define WINAPI_PARTITION_DESKTOP
regardless of target WinAPI partition.

4 years agomsdkvp9enc: fix 10bit encoding
Haihao Xiang [Wed, 25 Dec 2019 05:21:11 +0000 (13:21 +0800)]
msdkvp9enc: fix 10bit encoding

The codec profile should be consistent with the frame fourcc code, this
fixes pipeline below:

gst-launch-1.0 videotestsrc ! \
video/x-raw,width=320,height=240,format=P010_10LE ! msdkvp9enc ! \
fakesink

4 years agomsdkvp9enc: fix width and height
Haihao Xiang [Wed, 25 Dec 2019 02:51:36 +0000 (10:51 +0800)]
msdkvp9enc: fix width and height

The frame width and height is rounded up to 128 and 32 since commit
8daac1c, so the width, height for initialization should be rounded up to
128 and 32 too because the MSDK VP9 encoder will do some check on width
and height.

Sample pipeline:
gst-launch-1.0 videotestsrc ! \
video/x-raw,width=320,height=240,format=NV12 ! msdkvp9enc ! fakesink

4 years agomsdk: make sure the found response meets the request
Haihao Xiang [Fri, 3 Jan 2020 07:27:30 +0000 (15:27 +0800)]
msdk: make sure the found response meets the request

Otherwise the re-used msdk response doesn't have enough frames so it is
possible the pipeline will be broken

4 years agomsdkenc: renegotiate when video info changes
Julien Isorce [Thu, 26 Dec 2019 21:31:50 +0000 (13:31 -0800)]
msdkenc: renegotiate when video info changes

Renegotiation was implemented for bitrate change. We can re-use
the same sequence when video info changes except that this can be
executed right away when receiving the new input format. I.e. no
need to wait for the next call to handle_frame.

4 years agodecklink: Fix crash when probing without driver
Philippe Normand [Sun, 5 Jan 2020 16:20:18 +0000 (16:20 +0000)]
decklink: Fix crash when probing without driver

If there is no decklink hardware/driver, the devices list is empty (NULL), so
this needs to be checked before iterating over the list.

4 years agodashsink: Add new sink to produce DASH content
Stéphane Cerveau [Thu, 16 May 2019 17:42:37 +0000 (19:42 +0200)]
dashsink: Add new sink to produce DASH content

Add static or dynamic mpd with:
- baseURL
- period
- adaptation_set
- representaton
- SegmentList
- SegmentURL
- SegmentTemplate

Support multiple audio and video streams.
Pass conformance test with DashIF.org

4 years agogstxmlhelper: fix xmlOutputBufferFlush ignored ret
Stéphane Cerveau [Mon, 9 Dec 2019 14:10:00 +0000 (15:10 +0100)]
gstxmlhelper: fix xmlOutputBufferFlush ignored ret

fix CID #1456553

4 years agodash: add set/get property for nodes
Stéphane Cerveau [Mon, 2 Sep 2019 12:52:53 +0000 (14:52 +0200)]
dash: add set/get property for nodes

Add a way to set/get properties for given nodes:

- root
- baseurl
- representation

4 years agodash: Generate an XML content from object.
Stéphane Cerveau [Wed, 4 Dec 2019 16:25:24 +0000 (17:25 +0100)]
dash: Generate an XML content from object.

Add mpd node base class to provide
xml generation facilities for child
objects.

4 years agomsdkdec: trigger renegotiation if video info changes
Julien Isorce [Thu, 26 Dec 2019 19:24:37 +0000 (11:24 -0800)]
msdkdec: trigger renegotiation if video info changes

Useful when framerate changes. Previously it was only checking
for resolution change but renego should happen if any video
info changes.

4 years agovulkansink: Fix null pointer exception
Seungha Yang [Mon, 23 Dec 2019 06:17:07 +0000 (15:17 +0900)]
vulkansink: Fix null pointer exception

context query might happen before creating swapper.

4 years agomsdkdec: make sure to use video memory on Linux
Julien Isorce [Wed, 18 Dec 2019 00:10:53 +0000 (16:10 -0800)]
msdkdec: make sure to use video memory on Linux

The block that sets use_video_memory flag is after the
the condition `if gst_msdk_context_prepare` but it
always returns false when there is no other msdk elements.
So the decoder ends up with use_video_memory as FALSE.
Note that msdkvpp always set use_video_memory as TRUE.

When use_video_memory is FALSE then the msdkdec allocates
the output frames with posix_memalign (see gstmsdksystemmemory.c).
The result is then copied back to the GstVideoPool's buffers
(or to the downstream pool's buffers if any).
When use_video_memory is TRUE then the msdkdec uses vaCreateSurfaces
to create vaapi surfaces for the hw decoder to decode into
(see gstmsdkvideomemory.c). The result is then copied to either
the internal GstVideoPool and to the downstream pool if any.
(vaDeriveImage/vaMapBuffer is used in order to read the surfaces)

4 years agomsdkdec: Correct return value of GstVideoDecoder::flush()
Seungha Yang [Thu, 2 Jan 2020 03:22:07 +0000 (12:22 +0900)]
msdkdec: Correct return value of GstVideoDecoder::flush()

Use boolean instead of GstFlowReturn as declared.
Note that since base class does not check return value of GstVideoDecoder::flush(),
this would not cause any change of behavior.

4 years agomsdkdec: free unlocked msdk surface before output buffer allocation
Haihao Xiang [Mon, 23 Dec 2019 06:09:25 +0000 (14:09 +0800)]
msdkdec: free unlocked msdk surface before output buffer allocation

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/924
is trying to use video memory for decoding on Linux, which reveals a
hidden bug in msdkdec.

For video memory, it is possible that a locked mfx surface is not used
indeed and it will be un-locked later in MSDK, so we have to check the
associated MSDK surface to find out and free un-used surfaces, otherwise
it is easy to exhaust all pre-allocated mfx surfaces and get errors below:

0:00:00.777324879 27290 0x564b65a510a0 ERROR                default
gstmsdkvideomemory.c:77:gst_msdk_video_allocator_get_surface: failed to
get surface available
0:00:00.777429079 27290 0x564b65a510a0 ERROR         msdkbufferpool
gstmsdkbufferpool.c:260:gst_msdk_buffer_pool_alloc_buffer:<msdkbufferpool0>
failed to create new MSDK memory

Note the sample code in MSDK does similar thing in
CBuffering::SyncFrameSurfaces()

4 years agohlssink2: Add signals for allowing custom playlist/fragment handling
Sebastian Dröge [Thu, 12 Dec 2019 17:02:25 +0000 (19:02 +0200)]
hlssink2: Add signals for allowing custom playlist/fragment handling

Instead of always going through the file system API we allow the
application to modify the behaviour. For the playlist itself and
fragments, the application can provide a GOutputStream. In addition the
sink notifies the application whenever a fragment can be deleted.

4 years agowebrtc: Actually make use of promise created one line before
Sebastian Dröge [Tue, 31 Dec 2019 10:41:25 +0000 (12:41 +0200)]
webrtc: Actually make use of promise created one line before

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1042

4 years agompegtsdemux: resurrect actual and efficient seeking of all kinds
Mark Nauwelaerts [Mon, 30 Dec 2019 18:50:29 +0000 (19:50 +0100)]
mpegtsdemux: resurrect actual and efficient seeking of all kinds

... by seeking to target offset determined by new seek segment,
rather than that of the previous segment.  The latter would typically
seek back to start for a non-accurate seek, and lead to a lot
of skipping in case of an accurate seek.

4 years agod3d11: Add h265 decoder element
Seungha Yang [Thu, 26 Dec 2019 05:28:03 +0000 (14:28 +0900)]
d3d11: Add h265 decoder element

Some DPB management implementation is taken from gstreamer-vaapi

4 years agod3d11: Add vp9 decoder element
Seungha Yang [Fri, 20 Dec 2019 14:05:52 +0000 (23:05 +0900)]
d3d11: Add vp9 decoder element

Based on gstreamer-vaapi and Chromium implemetation.

4 years agod3d11: Add h264 decoder element
Seungha Yang [Thu, 26 Dec 2019 05:24:46 +0000 (14:24 +0900)]
d3d11: Add h264 decoder element

New decoder implementation based on dxva2 on d3d11 APIs. The DPB
management implementation is taken from Chromium.

4 years agod3d11: Add support for Array typed texture memory
Seungha Yang [Fri, 20 Dec 2019 13:50:55 +0000 (22:50 +0900)]
d3d11: Add support for Array typed texture memory

A ID3D11Texture2D memory can consist of multiple planes with array.
For array typed memory, GstD3D11Allocator will allocate new GstD3D11Memory
with increased reference count to the ID3D11Texture2D but different array index.

4 years agobad: use of g_value_dup_string
Stéphane Cerveau [Wed, 18 Dec 2019 14:37:03 +0000 (15:37 +0100)]
bad: use of g_value_dup_string

Use helper method to get string from GValue.

4 years agodtlsenc: Don't warn on GST_FLOW_FLUSHING or GST_FLOW_EOS
Sebastian Dröge [Mon, 30 Dec 2019 10:52:20 +0000 (12:52 +0200)]
dtlsenc: Don't warn on GST_FLOW_FLUSHING or GST_FLOW_EOS

Only warn if pushing a buffer returns an actual error to not pollute
logs with confusing warnings.

4 years agotimecodestamper: Refactor LTC audio waiting and properly handle live inputs
Sebastian Dröge [Fri, 27 Dec 2019 14:56:32 +0000 (16:56 +0200)]
timecodestamper: Refactor LTC audio waiting and properly handle live inputs

If one of the inputs is live, add a latency of 2 frames to the video
stream and wait on the clock for that much time to pass to allow for the
LTC audio to be ahead.

In case of live LTC, don't do any waiting but only ensure that we don't
overflow the LTC queue.

Also in non-live LTC audio mode, flush too old items from the LTC queue
if the video is actually ahead instead of potentially waiting forever.
This could've happened if there was a bigger gap in the video stream.

4 years agotests: Add simple d3d11colorconvert unit test
Seungha Yang [Thu, 26 Dec 2019 11:10:55 +0000 (20:10 +0900)]
tests: Add simple d3d11colorconvert unit test

4 years agod3d11: Aggregate d3d11 memory usage query for dynamic-usage type decision
Seungha Yang [Thu, 26 Dec 2019 10:55:40 +0000 (19:55 +0900)]
d3d11: Aggregate d3d11 memory usage query for dynamic-usage type decision

Even if one of downstream d3d11 elements can support dynamic-usage memory,
another one might not support it. Also, to support dynamic-usage,
both upstream and downstream d3d11device must be the same object.

4 years agod3d11colorconvert: Remove device type dependent behavior
Seungha Yang [Thu, 26 Dec 2019 08:00:52 +0000 (17:00 +0900)]
d3d11colorconvert: Remove device type dependent behavior

If d3d11colorconvert element is configured, do color space conversion
regardless of the device type whether it's S/W emulation or real H/W.
Since d3d11colorconvert is no more a child of d3d11videosinkbin,
we don't need this behavior. Note that previous code was added to
avoid color space conversion from d3d11videosink if no hardware
device is available (S/W emulation of d3d11 is too slow).

4 years agod3d11colorconverter: Fix unmatched lock/unlock pair
Seungha Yang [Thu, 26 Dec 2019 07:43:35 +0000 (16:43 +0900)]
d3d11colorconverter: Fix unmatched lock/unlock pair

4 years agod3d11upload: Don't hard overwrite caps features to support d3d11 memory passthrough
Seungha Yang [Thu, 26 Dec 2019 07:03:31 +0000 (16:03 +0900)]
d3d11upload: Don't hard overwrite caps features to support d3d11 memory passthrough

d3d11upload should be able to support upstream d3d11 memory, not only system memory.

Fix for following pipeline
d3d11upload ! "video/x-raw(memory:D3D11Memory)" ! d3d11videosink

4 years agoopencv: allow compilation against 4.2.x
Nicola Murino [Thu, 26 Dec 2019 21:43:35 +0000 (22:43 +0100)]
opencv: allow compilation against 4.2.x

4 years agod3d11window: Make use of partial presentation with IDXGISwapChain1::Present1
Seungha Yang [Tue, 24 Dec 2019 05:00:15 +0000 (14:00 +0900)]
d3d11window: Make use of partial presentation with IDXGISwapChain1::Present1

Since we might draw on partial area of backbuffer in case of force-aspect-ratio,
presenting only updated area is more efficient way.

See also https://docs.microsoft.com/ko-kr/windows/win32/direct3ddxgi/dxgi-1-2-presentation-improvements

4 years agod3d11videosink: Add support for overlay composition
Seungha Yang [Tue, 24 Dec 2019 06:54:57 +0000 (15:54 +0900)]
d3d11videosink: Add support for overlay composition

Add d3d11overlaycompositor object to draw overlay image
on render target using Blend method.

4 years agod3d11: Enable dxgi debug layer and always try to pop d3d11/dxgi debug message if...
Seungha Yang [Fri, 20 Dec 2019 09:56:08 +0000 (18:56 +0900)]
d3d11: Enable dxgi debug layer and always try to pop d3d11/dxgi debug message if possible

Note that dxgi and d3d11 sdk debug will be enabled on debug build

4 years agonvcodec: Refactor plugin initialization
Seungha Yang [Thu, 28 Nov 2019 09:54:31 +0000 (18:54 +0900)]
nvcodec: Refactor plugin initialization

Create CUDA context per device, instead of per codec and encoder/decoder.
Allocating CUDA context is heavy operation so we should reuse it
as much as possible.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1130

4 years agovulkan/window/win32: Don't post any WinProc message to parent window
Seungha Yang [Fri, 20 Dec 2019 03:37:51 +0000 (12:37 +0900)]
vulkan/window/win32: Don't post any WinProc message to parent window

Posting any message to parent seems to be pointless. That might break
parent window.
Regardless of the posting, parent window can catch mouse event
and also any keyboard events will be handled by parent window by default.

4 years agoopenjpegenc: add support for sub-frame encoding
Aaron Boxer [Mon, 11 Nov 2019 14:47:00 +0000 (09:47 -0500)]
openjpegenc: add support for sub-frame encoding

Following the standard for low latency JPEG 2000 encoding
https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-H.222.0-200701-S!Amd1!PDF-E&type=items
we divide the image into stripes of a specified height, and encode
each stripe as a self-contained JPEG 2000 image. This MR is based on
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/merge_requests/429

4 years agosvthevcenc: Add new SVT-HEVC encoder element
Yeongjin Jeong [Sat, 23 Mar 2019 12:01:51 +0000 (21:01 +0900)]
svthevcenc: Add new SVT-HEVC encoder element

The SVT-HEVC (Scalable Video Technology[0] for HEVC) Encoder is an
open source video coding technology[1] that is highly optimized for
Intel Xeon Scalable processors and Intel Xeon D processors.

[0] https://01.org/svt
[1] https://github.com/OpenVisualCloud/SVT-HEVC

4 years agoh265parser: Add simple GstH265Profile/string public utilites
Yeongjin Jeong [Mon, 30 Sep 2019 07:29:50 +0000 (16:29 +0900)]
h265parser: Add simple GstH265Profile/string public utilites

It makes more simplifies the conversion between GstH265Profile and string.

4 years agod3d11videosink: Use dynamic texture for fallback buffer
Seungha Yang [Thu, 19 Dec 2019 15:01:26 +0000 (00:01 +0900)]
d3d11videosink: Use dynamic texture for fallback buffer

Upload CPU memory to texture directly by using dynamic usage texture.
This will reduce at least one step of staging copy per frame.

4 years agod3d11colorconvert: Set TRANSFER_NEED_DOWNLOAD flag to output memory for later cpu...
Seungha Yang [Thu, 19 Dec 2019 14:58:17 +0000 (23:58 +0900)]
d3d11colorconvert: Set TRANSFER_NEED_DOWNLOAD flag to output memory for later cpu access

Otherwise CPU cannot access texture via gst_memory_map()

4 years agod3d11colorconvert: Use shader resource and render target bind flags together
Seungha Yang [Thu, 19 Dec 2019 13:07:42 +0000 (22:07 +0900)]
d3d11colorconvert: Use shader resource and render target bind flags together

The output of d3d11colorconvert would be used for rendering (i.e., shader resource)

4 years agod3d11window: Change aspect-ratio mode from window thread
Seungha Yang [Thu, 19 Dec 2019 12:47:57 +0000 (21:47 +0900)]
d3d11window: Change aspect-ratio mode from window thread

Call DXGI API from window thread as much as possible

4 years agoexamples: Add example for d3d11videosink
Seungha Yang [Tue, 17 Dec 2019 11:49:52 +0000 (20:49 +0900)]
examples: Add example for d3d11videosink

This is fork of win32-videooverlay in -base but more d3d11videosink specific one.

4 years agod3d11videosink: Add support for full screen mode
Seungha Yang [Sun, 15 Dec 2019 10:29:10 +0000 (19:29 +0900)]
d3d11videosink: Add support for full screen mode

borderless top-most style full screen mode support.
Basically fullscreen toggle mode is disabled by default. To enable it
use "fullscreen-toggle-mode" property to allow fullscreen mode change
by user input and/or property.

4 years agod3d11: Use GRecMutex to protect immediate context and dxgi API call
Seungha Yang [Thu, 19 Dec 2019 15:17:33 +0000 (00:17 +0900)]
d3d11: Use GRecMutex to protect immediate context and dxgi API call

In some cases, rendering and dxgi (e.g., swapchain) APIs should be
called from window message pump thread, but current design (dedicated d3d11 thread)
make it impossible. To solve it, change concurrency model to locking based one
from single-thread model.

4 years agod3d11window: Prefer to use flip-sequential over discard
Seungha Yang [Wed, 18 Dec 2019 11:55:01 +0000 (20:55 +0900)]
d3d11window: Prefer to use flip-sequential over discard

flip-sequential is more efficient than discard

4 years agod3d11window: Don't hold backbuffer interface
Seungha Yang [Wed, 18 Dec 2019 11:36:32 +0000 (20:36 +0900)]
d3d11window: Don't hold backbuffer interface

We don't need to hold it

4 years agod3d11window: Use CreateSwapChainForHwnd if available
Seungha Yang [Wed, 18 Dec 2019 05:23:03 +0000 (14:23 +0900)]
d3d11window: Use CreateSwapChainForHwnd if available

That's recommended way from MS and CreateSwapChainForHwnd supports
more options than CreateSwapChain

4 years agod3d11: Use configuration file for dxgi header version check
Seungha Yang [Wed, 18 Dec 2019 04:21:31 +0000 (13:21 +0900)]
d3d11: Use configuration file for dxgi header version check

4 years agod3d11window: Use allow-tearing mode if device supports it
Seungha Yang [Tue, 17 Dec 2019 04:47:24 +0000 (13:47 +0900)]
d3d11window: Use allow-tearing mode if device supports it

As the recommendation from MS.

4 years agod3d11window: Disable fullscreen mode change by alt + enter
Seungha Yang [Sun, 15 Dec 2019 09:30:22 +0000 (18:30 +0900)]
d3d11window: Disable fullscreen mode change by alt + enter

Disable full screen mode change until proper handling is implemented

4 years agod3d11videosink: Remove resizing window hack and unify resizing flow
Seungha Yang [Sun, 15 Dec 2019 07:23:00 +0000 (16:23 +0900)]
d3d11videosink: Remove resizing window hack and unify resizing flow

In earlier implementation of d3d11videosink where no shader was implemented,
the aspect ratio and render size were adjusted by manipulating the backbuffer size
with unintuitive formula. Since now we do color conversion and resize using
shader, we can remove the hack.

4 years agod3d11: Pass GstD3D11Memory object to ensure_{shader_resource,render_target}_view...
Seungha Yang [Sun, 15 Dec 2019 06:50:19 +0000 (15:50 +0900)]
d3d11: Pass GstD3D11Memory object to ensure_{shader_resource,render_target}_view methods

The method name indicates it should be d3d11memory, so passing
GstD3D11Memory seems to make more sense than GstMemory.

4 years agod3d11videosink: Don't specify crop meta to allocation query
Seungha Yang [Sun, 15 Dec 2019 06:44:20 +0000 (15:44 +0900)]
d3d11videosink: Don't specify crop meta to allocation query

d3d11videosink could not handle it for now

4 years agoautoconvert: Fix lock-less exchange or free condition
Nicolas Dufresne [Thu, 19 Dec 2019 20:19:29 +0000 (15:19 -0500)]
autoconvert: Fix lock-less exchange or free condition

Before this change, we would free the list we just have saved.

Fixes #1158

4 years agogstsrtsink: Add `wait-for-connection` property to `srtsink`
Francisco Javier Velázquez-García (francisv) [Tue, 12 Nov 2019 11:27:51 +0000 (12:27 +0100)]
gstsrtsink: Add `wait-for-connection` property to `srtsink`

Add `wait-for-connection` property to `srtsink` element.  This
property allows the element to process packets even when no clients
are connected.

4 years agod3dvideosink: hold class lock for entire duration of class destruction
Aaron Boxer [Sat, 7 Dec 2019 15:56:28 +0000 (09:56 -0600)]
d3dvideosink: hold class lock for entire duration of class destruction

This avoids a race condition currently when temporarily releasing the
lock and then re-acquiring.

4 years agod3dvideosink: improve concurrency on hidden window create/destroy
Aaron Boxer [Sat, 7 Dec 2019 15:54:49 +0000 (09:54 -0600)]
d3dvideosink: improve concurrency on hidden window create/destroy

4 years agod3dvideosink: use thread pool to handle events from hidden window event queue
Aaron Boxer [Sat, 7 Dec 2019 20:51:28 +0000 (14:51 -0600)]
d3dvideosink: use thread pool to handle events from hidden window event queue

window event queue now does not lock on the class lock, so we can now shut
it down without releasing the class lock, thus avoiding a potential race when
stopping the sink.

4 years agod3dvideosink: improve concurrency on internal window create/destroy
Aaron Boxer [Sat, 7 Dec 2019 15:53:20 +0000 (09:53 -0600)]
d3dvideosink: improve concurrency on internal window create/destroy

Remove timeout and rely on condition variable instead to indicate thread
start.

4 years agod3dvideosink: only warn about HWND already set if new HWND is not NULL
Aaron Boxer [Sat, 7 Dec 2019 15:34:55 +0000 (09:34 -0600)]
d3dvideosink: only warn about HWND already set if new HWND is not NULL

4 years agod3dvideosink: add more null checks
Aaron Boxer [Sat, 7 Dec 2019 06:25:05 +0000 (00:25 -0600)]
d3dvideosink: add more null checks

4 years agod3dvideosink: check ref count and device before resetting display
Aaron Boxer [Sat, 7 Dec 2019 06:01:47 +0000 (00:01 -0600)]
d3dvideosink: check ref count and device before resetting display

4 years agod3dvideosink: use class lock when checking d3d formats, and cache format list
Aaron Boxer [Sat, 7 Dec 2019 15:41:32 +0000 (09:41 -0600)]
d3dvideosink: use class lock when checking d3d formats, and cache format list

4 years agod3dvideosink: destroy device just before final d3d release call
Aaron Boxer [Sat, 7 Dec 2019 05:50:50 +0000 (23:50 -0600)]
d3dvideosink: destroy device just before final d3d release call

and free overlays after swap chain is released

4 years agod3dvideosink: add two forward declarations
Aaron Boxer [Sat, 7 Dec 2019 05:26:34 +0000 (23:26 -0600)]
d3dvideosink: add two forward declarations

4 years agod3dvideosink: use class lock when setting pool config
Aaron Boxer [Sat, 7 Dec 2019 05:24:57 +0000 (23:24 -0600)]
d3dvideosink: use class lock when setting pool config

4 years agod3dvideosink: use class lock when allocating pool buffer
Aaron Boxer [Sat, 7 Dec 2019 05:23:45 +0000 (23:23 -0600)]
d3dvideosink: use class lock when allocating pool buffer

4 years agod3dvideosink: use class lock when creating overlay textures
Aaron Boxer [Sat, 7 Dec 2019 05:19:11 +0000 (23:19 -0600)]
d3dvideosink: use class lock when creating overlay textures

4 years agod3dvideosinnk: check d3d device exists before creating overlay vertex buffer
Aaron Boxer [Sat, 7 Dec 2019 05:16:05 +0000 (23:16 -0600)]
d3dvideosinnk: check d3d device exists before creating overlay vertex buffer

4 years agod3dvideosink: pass hidden window hwnd to GST_DEBUG, rather than NULL
Aaron Boxer [Sat, 7 Dec 2019 05:14:06 +0000 (23:14 -0600)]
d3dvideosink: pass hidden window hwnd to GST_DEBUG, rather than NULL

4 years agod3dvideosink: fix typo
Aaron Boxer [Sat, 7 Dec 2019 05:11:11 +0000 (23:11 -0600)]
d3dvideosink: fix typo

4 years agoh264parse: Align GST_H264_PROFILE_HIGH_422 to H264 standards
Stéphane Cerveau [Wed, 18 Dec 2019 03:03:40 +0000 (03:03 +0000)]
h264parse: Align GST_H264_PROFILE_HIGH_422 to H264 standards

According to H264 ITU standards from 06/19, GST_H264_PROFILE_HIGH_422
(profile_idc = 122) with constraint_set1_flag = 0 and
constraint_set3_flag = 0 can be mapped to high-4:2:2 or high-4:4:4.
GST_H264_PROFILE_HIGH_422 with constraint_set1_flag = 0 and
constraint_set3_flag = 1 can be mapped to high-4:2:2, high-4:4:4,
high-4:2:2-intra or high-4:4:4-intra.

4 years agoRevert "videoparseutils: support two new EIA 608 closed caption formats"
Olivier Crête [Tue, 17 Dec 2019 21:44:10 +0000 (16:44 -0500)]
Revert "videoparseutils: support two new EIA 608 closed caption formats"

This reverts commit f5c1c90122840396f3a34f787bd66a672be21c3b.

4 years agoRevert "ccextractor: support new CEA 608 formats"
Olivier Crête [Tue, 17 Dec 2019 21:43:54 +0000 (16:43 -0500)]
Revert "ccextractor: support new CEA 608 formats"

This reverts commit 80dd7b2d3d871f1cf456bda249bc90e4eeeb53b1.

4 years agoccextractor: support new CEA 608 formats
Aaron Boxer [Thu, 2 May 2019 17:20:29 +0000 (13:20 -0400)]
ccextractor: support new CEA 608 formats

4 years agovideoparseutils: support two new EIA 608 closed caption formats
Aaron Boxer [Fri, 25 Oct 2019 02:06:59 +0000 (22:06 -0400)]
videoparseutils: support two new EIA 608 closed caption formats

4 years agowlvideoformat: clean up video formats
Wonchul Lee [Sat, 9 Nov 2019 10:37:10 +0000 (19:37 +0900)]
wlvideoformat: clean up video formats

It cleans up videoFormat by combining the wl_shm_formats and
drm_formats into a single table that represents the same format.
In addition, it adds NV61 format to the waylandsink.

4 years agod3d11window: Always draw to internal window
Seungha Yang [Mon, 16 Dec 2019 07:59:07 +0000 (16:59 +0900)]
d3d11window: Always draw to internal window

... and use SetParent() WIN32 API when external window is used.
Depending on DXGI swap effect, the external window might not be
reusable by another backend. To preserve the external window's property
and setting, drawing to internal window seems to be safer way.

4 years agod3d11window: Always set error reason to GError object
Seungha Yang [Sat, 14 Dec 2019 12:41:01 +0000 (21:41 +0900)]
d3d11window: Always set error reason to GError object