summaryrefslogtreecommitdiff
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
...
* va: Use MEMORY_DMABUF definition to replace "memory:DMABuf" strings.He Junyan2021-08-162-2/+2
| | | | | | | GST_CAPS_FEATURE_MEMORY_DMABUF is already a common definition, we should just use it rather than use the "memory:DMABuf" strings by ourselves. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2466>
* wasapi2: Increase rank to primary + 1Seungha Yang2021-08-131-5/+1
| | | | | | | | | | | | | | | | | wasapi2 plugin should be preferred than old wasapi plugin if available because: * wasapi2 supports automatic stream routing, and it's highly recommended feature for application by MS. See also https://docs.microsoft.com/en-us/windows/win32/coreaudio/automatic-stream-routing * This implementation must be various COM threading issue free by design since wasapi2 plugin spawns a new dedicated COM thread and all COM objects' life-cycles are managed correctly. There are unsolved COM issues around old wasapi plugin. Such issues are very tricky to be solved unless old wasapi plugin's threading model is re-designed. Note that, in case of UWP, wasapi2 plugin's rank is primary + 1 already Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2314>
* va: caps: Make the template raw video caps classified by features.He Junyan2021-08-111-1/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current output of raw video caps is not good. When we have multi profiles and each profile support different formats, the output of gst-inspect may like: SRC template: 'src' Availability: Always Capabilities: video/x-raw(memory:VAMemory) width: [ 1, 16384 ] height: [ 1, 16384 ] format: NV12 video/x-raw width: [ 1, 16384 ] height: [ 1, 16384 ] format: NV12 video/x-raw(memory:VAMemory) width: [ 1, 16384 ] height: [ 1, 16384 ] format: P010_10LE video/x-raw width: [ 1, 16384 ] height: [ 1, 16384 ] format: P010_10LE video/x-raw(memory:VAMemory) width: [ 1, 16384 ] height: [ 1, 16384 ] format: P012_LE video/x-raw width: [ 1, 16384 ] height: [ 1, 16384 ] format: P012_LE The gst_caps_simplify does not classify the caps by same features, but just leave them interweaved. We need to handle them manually here, the result should be: SRC template: 'src' Availability: Always Capabilities: video/x-raw width: [ 1, 16384 ] height: [ 1, 16384 ] format: { (string)P010_10LE, (string)P012_LE, (string)NV12 } video/x-raw(memory:VAMemory) width: [ 1, 16384 ] height: [ 1, 16384 ] format: { (string)P010_10LE, (string)P012_LE, (string)NV12 } Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2456>
* vapostproc: Inherit from GstVaBaseTransform.Víctor Manuel Jáquez Leal2021-08-101-745/+58
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2442>
* va: Add base transform class.Víctor Manuel Jáquez Leal2021-08-103-0/+898
| | | | | | | | This base transform class is a derivable class for VA-based filters, for example vapostproc right now, but it will be used also for future elements such as vadeinterlace. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2442>
* va: pool: Add gst_va_pool_new_with_config().Víctor Manuel Jáquez Leal2021-08-102-0/+32
| | | | | | It is a function helper. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2442>
* d3d11window: Misc code cleanupSeungha Yang2021-08-105-41/+25
| | | | | | | | | | * Remove unnecessary upcasting. We are now dealing with C++ class objects and don't need explicit C-style casting in C++ world * Use helper macro IID_PPV_ARGS() everywhere. It will make code a little short. * Use ComPtr smart pointer instead of calling manual IUnknown::Release() Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2461>
* d3d11compositor: Fix indentSeungha Yang2021-08-101-1/+1
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2461>
* Use g_memdup2() where available and add fallback for older GLib versionsTim-Philipp Müller2021-08-055-6/+6
| | | | | | | g_memdup() is deprecated since GLib 2.68 and we want to avoid deprecation warnings with recent versions of GLib. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2280>
* msdk: make sure child context is destroyed firstHaihao Xiang2021-08-041-4/+5
| | | | | | | | | | | | The parent context shares some resources with child context, so the child context should be destroyed first, otherwise the command below will trigger a segmentation fault $> gst-launch-1.0 videotestsrc num-buffers=100 ! msdkh264enc ! \ msdkh264dec ! fakesink videotestsrc num-buffers=50 ! \ msdkh264enc ! msdkh264dec ! fakesink Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2435>
* d3d11videosink: Fix warning around GstVideoOverlay::expose()Seungha Yang2021-08-023-21/+12
| | | | | | | When expose() is called, d3d11videosink needs to redraw using cached buffer, so gst_d3d11_window_render() should allow null buffer. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2450>
* d3d11videosink: Forward navigation event without modificationSeungha Yang2021-08-021-44/+5
| | | | | | | | | Current implementation for translating native coordinate and video coordinate is very wrong because d3d11videosink doesn't understand native HWND's coordinate. That should be handled by GstD3D11Window implementation as an enhancement. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2450>
* d3d11videosink: Add support for GstVideoOverlay::set_render_rectangleSeungha Yang2021-08-024-18/+95
| | | | | | | | | | | | | | | | | | | | | Inspired by an MR https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2382 The idea is that we can make use of MoveWindow() in WIN32 d3d11window implementation safely because WIN32 d3d11window implementation creates internal HWND even when external HWND is set and then subclassing is used to draw on internal HWND in any case. So the coordinates passed to MoveWindow() will be relative to parent HWND, and it meets well to the concept of set_render_rectangle(). On MoveWindow() event, WM_SIZE event will be generated by OS and then GstD3D11WindowWin32 implementation will update render area including swapchain correspondingly, as if it's normal window move/resize case. But in case of UWP (CoreWindow or SwapChainPanel), we need more research to meet expected behavior of set_render_rectangle() Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1416 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2450>
* va: vp8: fix the overflow in _fill_quant_matrix().He Junyan2021-07-291-1/+1
| | | | | | | The gint8 of qi and qi_base may overflow when calculation the matrix parameters and change the decoding result. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2447>
* decklink: Don't print error for dlopen failureSeungha Yang2021-07-281-1/+1
| | | | | | This is not a fatal error on systems without decklink Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2441>
* applemedia: silence a couple of MoltenVK warningsMatthew Waters2021-07-282-3/+20
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2433>
* va: filter: refactor convert_surface() to process()Víctor Manuel Jáquez Leal2021-07-273-4/+3
| | | | | | | | The idea of this change is to add, in the future, process_with_generator(), when multiple input surfaces are processed, for blending. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2431>
* va: filter: Refactor set_formats() to set_video_info().Víctor Manuel Jáquez Leal2021-07-273-4/+4
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2431>
* vapostproc: Don't add video alignment option in buffer pool.Víctor Manuel Jáquez Leal2021-07-271-2/+0
| | | | | | | vapostproc will not call gst_buffer_pool_config_set_video_alignment(), thus this option is not required. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2431>
* Introduce Steinberg ASIO (Audio Streaming Input/Output) pluginSeungha Yang2021-07-2615-0/+4083
| | | | | | | | | | | | | | | Adds a new plugin for ASIO devices. Although there is a standard low-level audio API, WASAPI, on Windows, ASIO is still being broadly used for audio devices which are aiming to professional use case. In case of such devices, ASIO API might be able to show better quality and latency performance depending on manufacturer's driver implementation. In order to build this plugin, user should provide path to ASIO SDK as a build option, "asio-sdk-path". Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2309>
* kmssink: Fix fallback path for driver not able to scale scenarioDevarsh Thakkar2021-07-231-2/+4
| | | | | | | | | | | | | | | | | | When driver return error on update plane request, kmssink disables the scaling and retries plane update. While doing so kmssink was matching the source rectangle dimensions to the target rectangle dimensions which were calculated as per scaling but this is incorrect, instead what we want here is that target rectangle dimensions should match the source rectangle dimensions as scaling is disabled now and so we match result rectangle dimensions with source rectangle dimensions. While at it, also match the result rectangle coordinates for horizontal and vertical offsets with source rectange coordinates, as since there is no scaling being done so no recentering is required. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2415>
* va: h265dec: Do not assign the frame->output_buffer until output_picture.He Junyan2021-07-231-3/+14
| | | | | | | | | | | We may need to drop the slices such as RASL pictures with the NoRaslOutputFlag, so the current picture of h265decoder may be freed. We should not assign the frame-> output_buffer too early until we really output it. Or, the later coming slices will allocate another picture and trigger the assert of: gst_video_decoder_allocate_output_frame_with_params: assertion 'frame->output_buffer == NULL' failed Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2421>
* va: H265: Add odd bit depth and chroma depth in get_rtformat.He Junyan2021-07-221-4/+9
| | | | | | | | | In H265, the stream may have odd bit depth such as 9 or 11. And the bit depth of luma and chroma may differ. For example, the stream with luma depth of 8 and chroma depth of 9 should use the 10 bit rtformat as the decoded picture format. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2420>
* va: vp9dec: Minor cleanups.Víctor Manuel Jáquez Leal2021-07-171-4/+8
| | | | | | | Added a comment with a future to-do, enhanced another comment and fixed a typo in an error log message. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2417>
* va: decoder: Group decoder methods.Víctor Manuel Jáquez Leal2021-07-172-27/+28
| | | | | | | Move up gst_va_decoder_get_config() to group decoders function in the same file area. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2417>
* va: Refactor _format_changed() to _config_is_equal().Víctor Manuel Jáquez Leal2021-07-178-23/+30
| | | | | | | | | | | Change gst_va_decoder_format_changed() to gst_va_decoder_config_is_equal(), which is more similar with other GStreamer API. The function call is replaced but it has to be negated because the return value is the opposite. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2417>
* va: Refactor _change_resolution() to _update_frame_size().Víctor Manuel Jáquez Leal2021-07-173-4/+6
| | | | | | | | | | | Rename gst_va_decoder_change_resolution() to gst_va_decoder_update_frame_size() which resembles gst_va_decoder_set_frame_size(). Also added a comment to clarify the function use and makes more specific the error message. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2417>
* va: Refactor _set_format() to _set_frame_size().Víctor Manuel Jáquez Leal2021-07-178-16/+26
| | | | | | | | | | | | | Renamed gst_va_decoder_set_format() to gst_va_decoder_set_frame_size_with_surfaces() which resembles better the passed parameters. Internally it creates the vaContext. Added gst_va_decoder_set_frame_size() which is an alias of gst_va_decoder_set_frame_size_with_surfaces() without surfaces. This is the function which replaces gst_va_decoder_set_format() where used. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2417>
* codecs: h265decoder: Fix a typo of NumPocTotalCurr when process ref pic list.He Junyan2021-07-161-1/+1
| | | | | | | | | | | We should use the NumPocTotalCurr value stored in decoder, which is a calculated valid value, rather than use the invalid value in the slice header. Most of the time, the NumPocTotalCurr is 0 and make the tmp_refs a very short length, and causes the decoder's wrong result. By the way, the NumPocTotalCurr is not the correct name specified in H265 spec, its name should be NumPicTotalCurr. We change it to the correct name. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2414>
* va: h265dec: Do not add non reference frames into ref list.He Junyan2021-07-161-3/+10
| | | | | | | The VA's ReferenceFrames should only contain the reference frame, we should not add the non reference frames into this list. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2414>
* mfvideoenc: Disable RGB format supportSeungha Yang2021-07-151-0/+8
| | | | | | | | | | Some GPUs support BGRA format and it will be converted to subsampled YUV format by GPU internally. Disable this implicit conversion since the conversion parameters such as input/output colorimetry are not exposed nor it's written in bitstream (e.g., VUI). We prefer explicit conversion via our conversion elements. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2410>
* va: h265dec: Fix a temp var overflow bug when write pred weight table.He Junyan2021-07-151-2/+2
| | | | | | | | The temp guint8 var of delta_chroma_offset_l0 and delta_chroma_offset_l1 can not cover the full range of delta_chroma_weight_l0/1 in the slice header. When overflow happens, the decoder result is wrong. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2412>
* va: vp9dec: We need to check the resolution changes for every frame.He Junyan2021-07-151-0/+27
| | | | | | | | | | | | | | | The VP9 streams have the ability to change the resolution dynamically at any time point. It does not send ad KEY frame before change the resolution, even the INTER frame can change the resolution immediately. So we need to check the resolution change for each frame and do the re-negiotiation if needed. Some insaned stream may play in resolution A first and then dynamically changes to B, and after 1 or 2 frames, it use a show_existing_frame to repeat the old frame of resolution A before. So, not only new_picture(), but also duplicate_picture() need to check this. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2407>
* va: vp9dec: Do not re-create context for dynamical resolution change.He Junyan2021-07-151-8/+35
| | | | | | | | The driver for VP9 should have the ability to handle the dynamical resolution changes. So if only the resolution changes, we should not re-create the config and context in negotiation. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2407>
* va: decoder: Add helper functions to get and change the resolution.He Junyan2021-07-152-0/+57
| | | | | | | | | Some codecs such as VP9, its config and context have the ability to dynamically. When we only change the width and height, no need to re-create the config and context. The helper function can just change the resolution without re-creating config and context. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2407>
* wasapi2ringbuffer: Close IAudioClient on GstAudioRingBuffer::releaseSeungha Yang2021-07-131-3/+43
| | | | | | | IAudioClient interface is not reusable once it's initialized. So we should close the handle and reopen it. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2402>
* wasapi2ringbuffer: Run gst-indentSeungha Yang2021-07-131-2/+2
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2402>
* wasapi: fix reinit of audioclient in prepare()Jakub Janků2021-07-121-1/+9
| | | | | | | | | | | | | When the sink goes from PLAYING to READY and then back to PLAYING, the initialization of the audioclient in prepare() fails with the error AUDCLNT_E_ALREADY_INITIALIZED. As a result, the playback stops. To fix this, we need to drop the AudioClient in unprepare() and grab a new one in prepare() to be able to initialize it again with the new buffer spec. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2096>
* wasapi: split gst_wasapi_util_get_device_client()Jakub Janků2021-07-124-20/+42
| | | | | | | | | | | The functionality now resides in gst_wasapi_util_get_device() and gst_wasapi_util_get_audio_client(). This is a preparatory patch. It will be used in the following patch to init/deinit the AudioClient separately from the device. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2096>
* msdkvpp: use NV12 as default format on srcpadYinhang Liu2021-07-091-2/+2
| | | | | | | | By default, sinkpad is NV12 format and srcpad is BGRA format, the different format will trigger an implicit format conversion in msdkvpp, which will cause performance drop. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2394>
* va: vpp: Improve the color properties setting.He Junyan2021-07-081-48/+69
| | | | | | | | | | | | The current setting of color properties are not very correct and we will get some kind of "unknown Color Standard for YUV format" warnings printed out by drivers. The video-color already provides some standard APIs for us, and we can use them directly. We also change the logic to: Finding the exactly match or explicit standard first. If not found, we continue to find the most similar one. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2385>
* mfvideosrc: Fix negotiation when interlace-mode is specifiedSeungha Yang2021-07-082-2/+2
| | | | | | | | Given caps does not need to be strictly subset of device caps. Allow accept it if device caps and requested caps can intersect Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1619 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2384>
* mfvideobuffer: Don't error for unexpected Unlock/Unlock2D callSeungha Yang2021-07-072-15/+64
| | | | | | | | Some GPU vendor's MFT implementation calls IMFMediaBuffer::Unlock() without previous IMFMediaBuffer::Lock() call. Which is obviously driver bug but we can ignore the Unlock call. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2381>
* va: basedec: Fix some artifact when do the crop copy.He Junyan2021-07-051-0/+6
| | | | | | | | The default video converter setting will add some artifact into the picture for 10/12 bits conversion. This make the MD5 checksum change from the original picture. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2379>
* d3d11decoder: Enable zero-copy for QualcommSeungha Yang2021-07-051-3/+0
| | | | | | | | | Qualcomm GPU works fine with current implementation now. Noticeable difference between when it was disabled and current d3d11 implementation is that we now support GstD3D11Memory pool, so there will be no more frequent re-binding decoder surface anymore. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2377>
* d3d11vp9dec: Fix for incorrect use_prev_in_find_mv_refs settingSeungha Yang2021-07-051-0/+21
| | | | | | | | Set use_prev_in_find_mv_refs depending on context. The value seems to be used by AMD and Qualcomm (Intel and NVIDIA doesn't make difference as per test) Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2376>
* gstmsdkvpp: add RGBP and BGRP in src padHaihao Xiang2021-07-056-1/+75
| | | | | | It requires MFX version 2.4+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2234>
* mediafoundation: Port to IID_PPV_ARGSSeungha Yang2021-07-042-5/+3
| | | | | | Make code short where possible Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2375>
* mfaudioenc: Remove pointless enumerating for hardware audio encoderSeungha Yang2021-07-042-40/+2
| | | | | | | | Hardware audio encoder can exist in theory, but it's untested and we are not sure whether it can be preferred over software implementation which is implemented by MS Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2375>
* mediafoundation: Fix typosSeungha Yang2021-07-045-5/+5
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2375>