Commit graph

25314 commits

Author SHA1 Message Date
Seungha Yang
96f0f4b613 d3d11memory: Always use native DXGI format if device support it
Use consistent memory layout between dxva and other shader use case.
For example, use DXGI_FORMAT_NV12 texture format instead of
two textures with DXGI_FORMAT_R8_UNORM and DXGI_FORMAT_R8G8_UNORM.
2020-01-13 01:58:08 +00:00
Seungha Yang
9ee40679b5 Revert "d3d11: Add support for D3D11_USAGE_DYNAMIC"
This reverts commit ddd13fc7c0

Dynamic usage can reduce the number of copy per frame but make
things complicated and the benefit seems to not significant.
Also since we don't provide _map() method for the dynamic usage,
application cannot read buffers which make "last-sample" property
unusable in case of d3d11videosink.
2020-01-13 01:58:08 +00:00
Jan Schmidt
8e87fe42ad WebRTC: Support non-trickle ICE candidates in the SDP
Add any ICE candidates from the SDP before adding pending
trickle ICE candidates to support non-trickle peers

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/678
2020-01-13 02:30:44 +11:00
Seungha Yang
e188893963 d3d11: Don't register decoders if unavailable
DXVA requires a hardware interface but may not be available,
such as in the case of VMs or when the GPU vendor does not provide a decoder interface.
2020-01-11 17:42:04 +09:00
Seungha Yang
616082d14a d3d11decoder: Don't return not initialized object from _new() method
... and change some debug levels since initialization failure might not be fatal.
2020-01-11 17:42:04 +09:00
Shinya Saito
58b1f41f99 waylandsink: Fix xdg_shell fullscreen mode
xdg_shell fullscreen mode doesn't work for committing
xdg_surface without configure acknowledgement.

In addition, we can't set different surface setting from
acknowledged config in this mode.
2020-01-10 18:22:57 +00:00
Josep Torra
bebf20c906 h264parse: do not push wrong PTS with some raw files
Some raw h264 encoded files trigger the assignment of wrong PTS to buffers
when some SEI data is provided. This change prevents it to happen.

Also ensure this behavior is being tested.
2020-01-10 15:03:38 +00:00
Sebastian Dröge
a4c925f694 timecodestamper: Skip over invalid LTC timecodes immediately 2020-01-10 15:59:27 +02:00
Sebastian Dröge
a1443518e0 timecodestamper: Clean up old LTC timecodes on LTC discontinuity
We might have some old timecodes that are in the future now and have to
drop those to make sure that our queue is correctly ordered and we don't
have multiple timecodes for the same running time.
2020-01-10 15:59:26 +02:00
Sebastian Dröge
bbdb392abe timecodestamper: Fix waiting for the first video frame in case of live video input 2020-01-10 15:59:25 +02:00
Sebastian Dröge
d7bb5b8a16 timecodestamper: Fix up handling/queueing of LTC timecodes
Directly read them out of the decoder as soon as we passed audio and
then store them in a queue that we handle internally together with their
timestamps. This cleans up memory management and gives us proper control
over the queue instead of guessing how the queue inside the LTC decoder
actually works and when it overflows.
2020-01-10 15:59:24 +02:00
Sebastian Dröge
0a53f6560a timecodestamper: Only allow requesting LTC audio pad in NULL/READY states
And don't introduce any latency at all if not LTC audio pad was
requested.
2020-01-10 15:59:21 +02:00
Sebastian Dröge
0a499242e9 timecodestamper: In live mode wait correctly for the latency to pass
And also introduce 6 instead of 2 frames of latency compared to the LTC
audio input as that seems to be an upper bound for how much the LTC
library is lagging behind.
2020-01-10 15:58:29 +02:00
Sebastian Dröge
31d7862051 timecodestamper: Use the internal LTC timecode tracker instead of the last one we retrieved
Otherwise we don't interpolate between LTC timecodes but only ever put
an LTC timecode on buffers once we actually received one.
2020-01-10 15:58:06 +02:00
Nicolas Dufresne
6d6e897762 decklink: Silence no driver / no SO messages
This g_once() is called everywhere, even in provider. This cause
spurious error when device monitor is used. Just silence or remove
the spurious logs.
2020-01-10 08:00:05 +00:00
Seungha Yang
4fc3aa6ef4 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;
2020-01-10 16:03:48 +09:00
Haihao Xiang
bdf9a76226 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 a1584b6f99.
2020-01-10 01:36:40 +00:00
Seungha Yang
ce3b035a53 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.
2020-01-09 16:29:47 +00:00
Seungha Yang
49a1f022fd d3d11colorconverter: Handle P016_LE format
P016 format is no different than P010. Not much things to add code.
2020-01-09 16:29:47 +00:00
Seungha Yang
bbab229905 d3d11colorconverter: Add support for YUV to YUV conversion 2020-01-09 16:29:47 +00:00
Seungha Yang
a122f305f9 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.
2020-01-09 16:29:47 +00:00
Seungha Yang
da50cc4d92 d3d11format: Remove invalid format from supported format list 2020-01-09 16:29:47 +00:00
Sebastian Dröge
e4389146d9 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.
2020-01-09 12:54:04 +02:00
Sebastian Dröge
04c5a550ad 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.
2020-01-07 21:15:20 +00:00
Stéphane Cerveau
db06f8e9da zbar: remove useless conditional on passthrough
seen that passthrough is never set for this element, no need
to allow to remove the 'transform' call
2020-01-07 17:24:50 +00:00
Stéphane Cerveau
e8fb7fc046 zxing: initial plugin revision
Status:
- scan QR code with low resolution
- Scan barcode with high resolution
2020-01-07 17:24:50 +00:00
Stéphane Cerveau
f065cdebc1 tests: add h26xparse HDR SEI test
Detect caps according to MDCV + CLLI SEI message
2020-01-07 08:55:28 +00:00
Stéphane Cerveau
f22e516639 test: add h265parse test 2020-01-07 08:55:28 +00:00
Stéphane Cerveau
4b8c47ee37 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
2020-01-07 08:55:28 +00:00
Stéphane Cerveau
d414e90eff h265parse: use same algo for MDCV and CLL SEI management 2020-01-07 08:55:28 +00:00
Stéphane Cerveau
b481edd745 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
2020-01-07 08:55:28 +00:00
Seungha Yang
6d09b2039d 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.
2020-01-07 04:11:27 +00:00
Thibault Saunier
1e5c117c7c fakevideosink: Use our pad template to create pad 2020-01-06 20:35:00 +00:00
Seungha Yang
e4daa2ef43 d3d11: Add support for Universal Windows Platform
Initial UWP support via new window (CoreWindow and SwapChainPanel) implementation.
2020-01-06 20:14:51 +09:00
Seungha Yang
43a8eb9e92 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.
2020-01-06 18:45:56 +09:00
Haihao Xiang
9064de27f9 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
2020-01-06 03:54:57 +00:00
Haihao Xiang
da22ff3846 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
2020-01-06 03:54:57 +00:00
Haihao Xiang
d6fbec5a44 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
2020-01-06 02:16:53 +00:00
Julien Isorce
f578eab6fd 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.
2020-01-06 01:13:28 +00:00
Philippe Normand
9f1fbd3649 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.
2020-01-05 16:20:18 +00:00
Stéphane Cerveau
982072ce1d 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
2020-01-03 20:50:27 +00:00
Stéphane Cerveau
1238a32bfd gstxmlhelper: fix xmlOutputBufferFlush ignored ret
fix CID #1456553
2020-01-03 20:50:27 +00:00
Stéphane Cerveau
d1b3b19088 dash: add set/get property for nodes
Add a way to set/get properties for given nodes:

- root
- baseurl
- representation
2020-01-03 20:50:27 +00:00
Stéphane Cerveau
ac74b042ec dash: Generate an XML content from object.
Add mpd node base class to provide
xml generation facilities for child
objects.
2020-01-03 20:50:27 +00:00
Julien Isorce
4e6a1b9634 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.
2020-01-03 10:19:57 -08:00
Seungha Yang
b8ef3801bc vulkansink: Fix null pointer exception
context query might happen before creating swapper.
2020-01-03 08:45:12 +00:00
Julien Isorce
a1584b6f99 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)
2020-01-03 07:08:23 +00:00
Seungha Yang
b88af2e4fe 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.
2020-01-02 12:22:07 +09:00
Haihao Xiang
a819f05851 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()
2020-01-02 00:43:36 +00:00
Sebastian Dröge
66775f3e72 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.
2019-12-31 13:23:17 +00:00