summaryrefslogtreecommitdiff
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* wasapideviceprovider: Add support for dynamic device add/removeSeungha Yang2021-09-2111-54/+783
| | | | | | | | | | | | | | | | | Adding IMMDeviceEnumerator::RegisterEndpointNotificationCallback in order to support device monitoring. On OnDeviceAdded(), OnDeviceRemoved(), and OnDefaultDeviceChanged() callback, wasapi device provider implementation will enumerate devices again and will notify newly added and removed device via GstDeviceProvider API. As a bonus point, this IMMDeviceEnumerator abstraction object will spawn a dedicated internal COM thread, so various COM thread related issues of WASAPI plugin can be resolved by this commit. Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1649 Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1110 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2484>
* kmssink: Add RGB16/BGR16 supportNicolas Dufresne2021-09-201-0/+6
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2530>
* kmssink: Sort format according to GST_VIDEO_FORMATS_ALLNicolas Dufresne2021-09-201-11/+27
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2530>
* kmssink: Remove big endian format inversionNicolas Dufresne2021-09-201-11/+0
| | | | | | | | | | This has been a bad interpretation of the DRM docuemntation. The formats are fixed regardless the CPU, but for some formats, they expressed in the opposite order as GStreamer. Same change was done in waylandsink 2 years ago. https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/commit/b393b650ab9bfb9654fc116163ab331907216d74 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2530>
* kmssink: Add NV61 supportNicolas Dufresne2021-09-201-0/+3
| | | | | | This identically handled to NV16, so no reason not to inclue it. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2530>
* kmssink: Add NV24 supportNicolas Dufresne2021-09-201-0/+5
| | | | | | This was tested on RK3566 platform, using vendor DRM driver. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2530>
* codecs: av1decoder: Use GstFlowReturn everywhereSeungha Yang2021-09-202-45/+56
| | | | | | The same modification as that of VP8 decoder Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2528>
* codecs: vp9decoder: Use GstFlowReturn everywhereSeungha Yang2021-09-203-56/+70
| | | | | | The same modification as that of VP8 decoder Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2528>
* codecs: vp8decoder: Use GstFlowReturn everywhereSeungha Yang2021-09-204-66/+83
| | | | | | | | | | boolean return value is not sufficient for representing the reason of error in most cases. For instance, any errors around new_sequence() would mean negotiation error, not just *ERROR*. And some subclasses will allocate buffer/memory/surface on new_picture() but it could be failed because of expected error, likely flushing Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2528>
* meson: va: Make AV1 support always optionalSeungha Yang2021-09-191-1/+2
| | | | | | | Otherwise meson configure with -Dva=enabled will be failed when installed libva version is < 1.8 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2532>
* va: caps: Don't use image formats for decoded frames.Víctor Manuel Jáquez Leal2021-09-191-54/+2
| | | | | | | | | | | | | | | | | Initially we tried to use the internal color conversion used in i965 and Gallium drivers when decoding. But this approach has showed limitations and problems. This patch removes completely the possible color conversion at decoding, since it show problems with deinterlacing, for example: gst-launch-1.0 filesrc location=interlaced.mpg2 ! parsebin ! vampeg2dec ! vadeinterlace ! xvimagesink Allowing only the surface formats when decoding is more stable. For color conversion is better to do it explicitly with vapostproc. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2531>
* sys: shm: Define shm_enable and shm_deps before escape meson subdirFabian Orccon2021-09-181-1/+2
| | | | | | | | Fixes meson configure in tests if the shm plugin is disabled Fixes #1664 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2534>
* d3d11videosink: Display title of content if possibleSeungha Yang2021-09-184-0/+94
| | | | | | | Update title text of window (currently it's always "Direct3D11 renderer") when we are rendering on internal HWND, not external HWND. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2529>
* d3d11videosink: Remove unused enum valueSeungha Yang2021-09-181-1/+0
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2529>
* msdkenc: Pass color properties to MediaSDK for encodingMengkejiergeli Ba2021-09-181-0/+21
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2523>
* msdkh265enc: Add profile main10 still picture for hevcMengkejiergeli Ba2021-09-182-2/+11
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2524>
* d3d11decoder: Refactor for more unified decoding flowSeungha Yang2021-09-1715-2698/+1801
| | | | | | | | | | | | | | | | | | | | | | | | | | ... and various code cleanup. * Move spreaded decoding API calls into one method Previously, decoding flow of most codecs are - Call DecoderBeginFrame() on start_picture() - Call {Get,Release}DecoderBuffer() on decode_slice() - Call SubmitDecoderBuffers() and DecoderEndFrame() on end_picture() Such spreaded API calls make it hard to keep track of status of decoding. Now it will be done at once in a new method. * Drop a code for non-zero wBadSliceChopping When bitstream buffer provided by driver is not sufficient to write compressed bitstream data, host decoder needs to make use of wBadSliceChopping so that driver can understand there are multiple bitstream buffer. But it's a bit unrealistic and not tested. Since FFMpeg's DXVA implemetaion doesn't support it, we might be able to ignore the case for now. * Make code more portable Consider common logic of GstCodecs -> DXVA translation for all D3D APIs (i,e., D3D9, D3D11, and D3D12). Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2525>
* d3d11decoder: Remove duplicated class_init and property related codeSeungha Yang2021-09-178-387/+190
| | | | | | Move them into the decoder helper code to remove duplication Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2525>
* d3d11: Get rid of "extern "C"" wrapping for GST_DEBUG_CATEGORY_EXTERNSeungha Yang2021-09-1723-133/+31
| | | | | | Instead, change the file defining debug category to cpp Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2525>
* va: h264dec: Try to use ConstrainedBaseline or Main to decode BaseLine.He Junyan2021-09-131-2/+10
| | | | | | | | | | In the h264, the Baseline profile is widely misused. A lot of streams declare that they are the Baseline, but in fact they just conform to ConstrainedBaseline. The features such as FMO and ASO are not used at all. If the decoder does not strictly conforms to the SPEC, we can just use Baseline or Main profile to decode it to avoid lots of streams failure. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2428>
* va: Update vapostproc documentation.Víctor Manuel Jáquez Leal2021-09-101-0/+9
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2495>
* va: Update todo lists, removing deinterlacing.Víctor Manuel Jáquez Leal2021-09-102-2/+0
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2495>
* Add vadeinterlace element.Víctor Manuel Jáquez Leal2021-09-104-1/+905
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2495>
* va: filter: Add past and future frames in GstVaSample.Víctor Manuel Jáquez Leal2021-09-102-0/+10
| | | | | | And add them in the pipeline structure if they are provided. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2495>
* va: filter: Add gst_va_filter_add_deinterlace_buffer()Víctor Manuel Jáquez Leal2021-09-102-0/+46
| | | | | | | This function decorates gst_va_filter_add_filter_buffer() to get the number of past and future frames to hold, given the method. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2495>
* va: filter: Add deinterlacing method parameter.Víctor Manuel Jáquez Leal2021-09-102-0/+134
| | | | | | | | For exposing that gobject parameter a new helper function is added: gst_va_filter_install_deinterlace_properties() Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2495>
* va: filter: Protect filters array of overwrite.Víctor Manuel Jáquez Leal2021-09-101-23/+24
| | | | | | | | It's possible to modify the filters array from another GStremer thread, and the post-processing operation is not atomic, so the filter array is reffed while the VA pipeline is processed. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2495>
* va: filter: Add helper function to query pipeline caps.Víctor Manuel Jáquez Leal2021-09-101-24/+41
| | | | | | | This function is going to be shared for future deinterlace filter processing. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2495>
* va: filter: Shuffle _destroy_filters_unlocked().Víctor Manuel Jáquez Leal2021-09-101-31/+31
| | | | | | In order to put it near to its caller. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2495>
* vapostproc: Move up color balance detection to plugin.Víctor Manuel Jáquez Leal2021-09-103-11/+24
| | | | | | | | | | | | | In order to install the color balance interface, a GstVaFilter is instantiated and queried to know if it supports color balance filter. It was done just after the GObject was registered. Now, it's done before. The reason of this change is that deinterlace element has to be registered only if deinterlace filter is available, using only one instantiate of GstVaFilter. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2495>
* va: basetransform: Update documentation.Víctor Manuel Jáquez Leal2021-09-101-0/+9
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2495>
* va: basetransform: Add autoptr clean up function.Víctor Manuel Jáquez Leal2021-09-101-0/+2
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2495>
* va: basetransform: Use copy_metadata() at buffer import.Víctor Manuel Jáquez Leal2021-09-101-4/+4
| | | | | | | Instead of using only gst_buffer_copy_into() use copy_metadata() vmethod to copy what's needed. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2495>
* vapostproc: don't chain up transform_meta()Víctor Manuel Jáquez Leal2021-09-101-2/+1
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2495>
* msdk: Adjust the plugin and factories description based on MFX_VERSION.Ung, Teng En2021-09-0919-34/+40
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2485>
* Revert "kmssink: Fix fallback path for driver not able to scale scenario"Nicolas Dufresne2021-08-271-4/+2
| | | | | | | | This reverts commit d2a7b763bef3ca51f0c84cdac52eeed85b0db8fb. After this change, non-scaled rendered were not centred as expected. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2496>
* d3d11bufferpool: Hide buffer_size field from headerSeungha Yang2021-08-229-25/+83
| | | | | | | | | | | | | | User can get the required buffer size by using buffer pool config. Since d3d11 implementation is a candidate for public library in the future, we need to hide everything from header as much as possible. Note that the total size of allocated d3d11 texture memory by GPU is not controllable factor. It depends on hardware specific alignment/padding requirement. So, GstD3D11 implementation updates actual buffer size by allocating D3D11 texture, since there's no way to get CPU accessible memory size without allocating real D3D11 texture. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2482>
* nvcodec: Fix various typosSeungha Yang2021-08-217-15/+15
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2481>
* nvcodec: Get rid of G_GNUC_INTERNALSeungha Yang2021-08-2114-123/+1
| | | | | | | Our default symbol visibility is hidden, so G_GNUC_INTERNAL is pointless Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2481>
* v4l2codecs: h264: Fix split field handlingNicolas Dufresne2021-08-201-34/+93
| | | | | | | | | | | Split fields ends up on multiple picture and requires accessing the other_field to complete the information (POC). This also cleanup the DPB from non-reference (was not useful) and skips properly merge field instead of keeping them duplicated. This fixes most of interlace decoding seen in fluster. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2474>
* v4l2codec: h264: Implement support for split fieldsNicolas Dufresne2021-08-201-1/+33
| | | | | | | | | | When a frame is composed of two fields, the base class now split the picture in two. In order to support this, we need to ensure that picture buffer is held in VB2 queue so that the second field get decoded into it. This also implements the new_field_picture() virtual and sets the previous request on the new picture. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2474>
* v4l2codecs: h264: Fix filling weight factorsNicolas Dufresne2021-08-201-2/+2
| | | | | | This was a typo, the wrong index was used to set l1 weight (b-frames). Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2480>
* mfvideosrc: Fix for negative MF strideSeungha Yang2021-08-193-20/+186
| | | | | | | | | | | | Negative stride value can be used in MediaFoundation to inform whether memory layout is top-down or bottom-up manner. Note that negative stride is allowed only for RGB, system memory. See also https://docs.microsoft.com/en-us/windows/win32/medfound/image-stride Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1646 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2473>
* v4l2slh264dec: Fix slice header bit size calculationNicolas Dufresne2021-08-181-2/+2
| | | | | | | | The emulation bytes need to be removed as bytes, not bit. This fixes decoding issues with files that have emulation bytes with the Cedrus driver. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2471>
* vapostproc: Use vapostproc as debug category name.Víctor Manuel Jáquez Leal2021-08-181-1/+1
| | | | | | Otherwise is difficult to remember the different name. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2470>
* vapostproc: Disable cropping in pass-through mode.Víctor Manuel Jáquez Leal2021-08-181-36/+14
| | | | | | | | | | | | | | | | | | | Originally, if a buffer arrives with crop meta but downstream doesn't handle crop allocation meta, vapostproc tried to reconfigure itself to non pass-through mode automatically. Sadly, this behavior was based on the wrong assumption that propose_allocation() vmethod would bring downstream allocation query, but it is not. Now, if vapostproc is in pass-through mode, the cropping is passed to downstream. Pass-through mode can be disabled via a parameter. Finally, if pass-through mode isn't enabled, it's assumed the buffer is going to be processed and, if cropping, downstream already negotiated the cropped frame size, thus it's required to do the cropping inside vapostproc to avoid artifacts because of the size of downstream allocated buffers. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2443>
* vapostproc: Update filters update_properties().Víctor Manuel Jáquez Leal2021-08-181-0/+1
| | | | | | | | | | Right after instantiating the VA filter and changing the element state, rebuild the image filters. This will fix a regression from f20b3b815, where properties in a gst-launch pipeline are not applied. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2443>
* decklinkvideosrc: Fix PAL/NTSC widescreen autodetection when switching back ↵Sebastian Dröge2021-08-181-6/+22
| | | | | | | | to non-widescreen Previously it would only switch to widescreen but never back. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2469>
* msdkvpp: Fix frc from lower fps to higher fpsMengkejiergeli Ba2021-08-181-11/+41
| | | | | | | | | | | | | | | | | | | | There are three framerate conversion algorithms described in <https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md>, interpolation is not implemented so far and thus distributed timestamp algorihtm is considered to be more practical which evenly distributes output timestamps according to output framerate. In this case, newly generated frames are inserted between current frame and previous one, timestamp is calculated by msdk API. This implementation first pushes newly generated buffers(outbuf_new) forward and the current buffer(outbuf) is handled at last round by base transform automatically. A flag "create_new_surface" is used to indicate if new surfaces have been generated and then push new outbuf forward accordingly. Considering the upstream element may not be the msdk element, it is necessary to always set the input surface timestamp as same as input buffer's timestamp and convert it to msdk timestamp. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2418>
* va: Use GST_CAPS_FEATURE_MEMORY_VA to replace "memory:VAMemory".He Junyan2021-08-1610-22/+35
| | | | | | | | "memory:VAMemory" is a commonly used string which notates our VA-kind memory type. We now used a definition in va lib to replace the simply string usage. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2466>