Projects
Essentials
gstreamer-plugins-bad-codecs
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 7
View file
gstreamer-plugins-bad-codecs.changes
Changed
@@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Sat Jun 25 13:49:39 UTC 2022 - Bjørn Lie <zaitor@opensuse.org> + +- Update to version 1.20.3 + +------------------------------------------------------------------- Tue May 17 16:38:34 UTC 2022 - Bjørn Lie <zaitor@opensuse.org> - Update to version 1.20.2
View file
gstreamer-plugins-bad-codecs.spec
Changed
@@ -7,7 +7,7 @@ %define _version 1.20.0 Name: gstreamer-plugins-bad-codecs -Version: 1.20.2 +Version: 1.20.3 Release: 0 Summary: Codecs/plugins for gstreamer-plugins-bad License: LGPL-2.1-or-later
View file
gst-plugins-bad-1.20.2.tar.xz/ChangeLog -> gst-plugins-bad-1.20.3.tar.xz/ChangeLog
Changed
@@ -1,7 +1,289 @@ +=== release 1.20.3 === + +2022-06-15 23:36:18 +0100 Tim-Philipp Müller <tim@centricular.com> + + * NEWS: + * RELEASE: + * gst-plugins-bad.doap: + * meson.build: + Release 1.20.3 + +2022-06-15 23:36:10 +0100 Tim-Philipp Müller <tim@centricular.com> + + * ChangeLog: + Update ChangeLogs for 1.20.3 + +2022-06-09 23:19:24 +0900 Seungha Yang <seungha@centricular.com> + + * sys/d3d11/gstd3d11decoder.cpp: + d3d11decoder: Fix for alternate interlacing signalling + Don't set d3d11+interlace caps feature. None of d3d11 elements + support it + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2584> + +2022-05-27 05:15:13 +1000 Jan Schmidt <jan@centricular.com> + + * sys/androidmedia/gstamc-constants.h: + * sys/androidmedia/gstamc.c: + * sys/androidmedia/gstamcvideoenc.c: + * sys/androidmedia/gstamcvideoenc.h: + amc: Add H.265 encoder mapping. + Add mime type mapping to enable the use of Android H.265 encoders + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2572> + +2022-05-30 16:31:38 -0400 Olivier Crête <olivier.crete@collabora.com> + + * ext/webrtc/gstwebrtcbin.c: + * tests/check/elements/webrtcbin.c: + webrtcbin: Reject answers that don't contain the same number of m-line as offer + Otherwise, it segfaults later. Also add test to validate this. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2561> + +2022-06-04 17:23:00 +0200 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com> + + * gst/rtmp2/rtmp/rtmpmessage.c: + rtmp2: Fix allocation of GstRtmpMeta + Use the right size. + On 64-bit platforms, `GstMetaInfo` is larger than `GstRtmpMeta`, which + masked this bug. On 32-bit platforms, it causes crashes. Thanks to + @maxatka for discovering this. + Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1721 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2564> + +2022-06-06 00:30:15 +0200 Jan Alexander Steffens (heftig) <heftig@archlinux.org> + + * ext/opencv/gstcvtracker.cpp: + * ext/opencv/gstcvtracker.h: + * ext/opencv/meson.build: + opencv: Allow building against 4.6.x + Replace the broken version checks with one modeled after + `GLIB_CHECK_VERSION`. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2558> + +2022-05-27 21:13:43 +0900 Seungha Yang <seungha@centricular.com> + + * gst-libs/gst/d3d11/gstd3d11memory.cpp: + * gst-libs/gst/d3d11/gstd3d11memory.h: + * sys/d3d11/gstd3d11decoder.cpp: + d3d11decoder: Work around Intel DXVA driver crash + Intel DXVA driver crashes sometimes (from GPU thread) if + ID3D11VideoDecoder is released while there are outstanding view objects. + To make sure the object life cycle, holds an ID3D11VideoDecoder refcount + in GstD3D11Memory object. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2513> + +2022-05-24 11:06:39 +0200 Erwann Gouesbet <erwann.gouesbet@blacknut.com> + + * sys/d3d11/gstd3d11screencapture.cpp: + d3d11screencapture: Fix missing/outdated cursor shape + d3d11screencapture can miss a cursor shape to draw or draw an outdated cursor shape. + - AcquireNextFrame only provides cursor shape when there is one update + - current d3d11screencapture skips cursor shape when mouse is not drawn + So, if a gstreamer application uses d3d11screencapture with cursor initially not drawn + "show-cursor"=false and then switches this property to true, the cursor will not be + actually drawn until AcquireNextFrame provides a new cursor shape. + This commit makes d3d11screencapture always update the cursor shape information, even + if the mouse is not drawn. d3d11screencapture will always have the latest cursor shape + when requested to draw it. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2488> + +2022-05-18 16:54:53 +0100 Philippe Normand <philn@igalia.com> + + * ext/webrtc/webrtcdatachannel.c: + datachannel: Notify low buffered amount according to spec + Quoting + https://www.w3.org/TR/webrtc/#dom-rtcdatachannel-bufferedamountlowthreshold + The bufferedAmountLowThreshold attribute sets the threshold at which the + bufferedAmount is considered to be low. When the bufferedAmount decreases from + above this threshold to **equal** or below it, the bufferedamountlow event fires. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2452> + +2022-05-17 14:15:40 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst/mpegtsmux/gstbasetsmux.c: + tsmux: Make sure to set srcpad caps under all conditions before outputting the first buffer + Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1218 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2446> + +2022-05-17 14:02:28 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst/sdp/gstsdpdemux.c: + sdpdemux: Release request pads from rtpbin when freeing a stream + Otherwise the pads of the rtpbin stay around forever and are leaked. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2445> + +2022-05-06 18:21:00 -0400 Olivier Crête <olivier.crete@ocrete.ca> + + * gst/pcapparse/gstpcapparse.c: + pcapparse: Set timestamp in DTS, not PTS + This matches the behaviour of basesrc, in particular, it matches the + behaviour of udpsrc, so it's easier to use to as a replacement to test + rtpjitterbuffer and other similar elements. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2424> + +2022-04-28 16:02:26 +0100 Diogo Goncalves <diogo@diporg.com> + + * sys/applemedia/avfvideosrc.m: + avfvideosrc: fix wrong framerate selected for caps + This fix solves an issue where a format that doesn't support the + requested framerate would be selected. It ensures that we use the first + format and framerate pair that supports the requested caps. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2418> + +2022-05-12 07:23:29 +0200 Edward Hervey <edward@centricular.com> + + * gst/mxf/mxfdemux.c: + mxfdemux: Handle files produced by legacy FFmpeg + Until March 2022, the FFmpeg MXF muxer would write the various index table + segments with the same instance ID, which should only be used if it is a + duplicate/repeated table. + In order to cope with those, we first compare the other index table segment + properties (body/index SID, start position) before comparing the instance + ID. This will ensure that we don't consider them as duplicate, but can still + detect "real" duplicates (which would have the same other properties). + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2408> + +2022-05-06 17:53:51 +0200 Víctor Manuel Jáquez Leal <vjaquez@igalia.com> + + * gst-libs/gst/va/gstvadisplay_drm.c: + libs: va: Add O_CLOEXEC flag at opening drm device. + So any other potential subprocess won't have access to it. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2391> + +2022-05-05 20:35:57 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst/mxf/mxfmux.c: + mxfmux: Disable aggregator's default negotiation + mxfmux can't negotiate caps with upstream/downstream and always outputs + specific caps based on the input streams. This will always happen before + it produces the first buffers. + By having the default aggregator negotiation enabled the same caps + would be pushed twice in the beginning, and again every time a + reconfigure event is received. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2381> + +2022-05-05 20:35:49 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst/mpegtsmux/gstbasetsmux.c: + mpegtsmux: Disable aggregator's default negotiation + mpegtsmux can't negotiate caps with upstream/downstream and always outputs + specific caps based on the input streams. This will always happen before + it produces the first buffers. + By having the default aggregator negotiation enabled the same caps + would be pushed twice in the beginning, and again every time a + reconfigure event is received. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2381> + +2022-05-05 00:24:26 +0900 Seungha Yang <seungha@centricular.com> + + * gst-libs/gst/codecs/gsth264decoder.c: + h264decoder: Fix for unhandled low-delay decoding case + Baseclass calls get_preferred_output_delay() in a chain of + sequence header parsing and then new_sequence() is called + with required DPB size (includes render-delay) information. + Thus latency query should happen before the sequence header + parsing for subclass to report required render-delay accordingly + via get_preferred_output_delay() method. + (e.g., zero delay in case of live pipeline) + This commit is to fix wrong liveness signalling in case of + upstream packetized format. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2380> + +2022-05-04 23:36:30 +0900 Seungha Yang <seungha@centricular.com> + + * sys/nvcodec/gstnvh264dec.c: + * sys/nvcodec/gstnvh265dec.c: + nvh264dec,nvh265dec: Don't realloc bitstream buffer per slice + Allocated memory size has not been updated which results in + realloc per slice. Fixing it and also release bitstream buffer + on ::close(), not finalize. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2379> + +2022-05-05 02:16:54 +0900 Seungha Yang <seungha@centricular.com> + + * sys/d3d11/gstd3d11screencapture.cpp: + * sys/d3d11/gstd3d11screencapture.h: + * sys/d3d11/gstd3d11screencapturesrc.cpp: + * tests/examples/d3d11/d3d11screencapturesrc.cpp: + d3d11screencapturesrc: Fix crash when d3d11 device is different from owned one + GstD3D11ScreenCapture object is pipeline-independent global object + and the object can be shared by multiple src elements, + in order to overcome a limitation of DXGI Desktop Duplication API. + Note that the API allows only single capture session in a process for + a monitor. + Therefore GstD3D11ScreenCapture object must be able to handle a case + where a src element holds different GstD3D11Device object. Which can + happen when GstD3D11Device context is not shared by pipelines. + What's changed: + * Allocates capture texture with D3D11_RESOURCE_MISC_SHARED for the + texture to be able to copied into other device's texture + * Holds additional shader objects per src element and use it when drawing + mouse + Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1197 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2378> + +2022-04-17 23:55:55 +0900 Seungha Yang <seungha@centricular.com> + + * sys/d3d11/gstd3d11decoder.cpp: + d3d11decoder: Do not preallocate texture using downstream d3d11 buffer pool + Our decoder implementation does not use downstream d3d11 pool for + decoding because of special requirement of D3D11/DXVA. So preallocation + using the downstream buffer pool will waste GPU memory in most cases. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2377> + +2022-04-16 21:27:57 +0900 Seungha Yang <seungha@centricular.com> + + * sys/d3d11/gstd3d11decoder.cpp: + d3d11decoder: Copy HDR10 related caps field manually + If negotiate() is called from the set_format() chain, sinkpad may not + hold caps yet, so baseclass cannot copy it over to srcpad caps. + Copy them manually. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2376> + +2022-04-29 20:28:53 +0200 Jakub Adam <jakub.adam@collabora.com> + + * sys/d3d11/gstd3d11screencapture.cpp: + d3d11screencapture: Set viewport when drawing mouse cursor + If there weren't any moved/dirty regions in the captured frame, the + viewport of the ID3D11DeviceContext would be left at whatever previous + value it had, which could lead to the cursor being drawn in a wrong + position and/or in an incorrect size. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2371> + +2022-04-22 12:29:29 +0200 Corentin Damman <c.damman@intopix.com> + + * sys/nvcodec/cuda-converter.c: + cuda-converter: fix nvrtc compilation on non-English locale systems + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2367> + +2022-03-07 08:46:57 -0500 Xavier Claessens <xavier.claessens@collabora.com> + + * gst-libs/gst/vulkan/meson.build: + * sys/msdk/meson.build: + Meson: Fix deprecation warnings + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2358> + +2021-11-12 20:13:10 +0100 Ruben Gonzalez <rgonzalez@fluendo.com> + + * docs/plugins/gst_plugins_cache.json: + gst_plugin_load_file: force plugin reload if diff filename + If a file includes a new version of a plugin that exits in the + registry, the output of gst-inspect is incorrect. The output has the + correct version but incorrect filename, and element description. + This seems to have also fixed some documentation issues. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2357> + +2022-05-03 00:39:09 +0100 Tim-Philipp Müller <tim@centricular.com> + + * meson.build: + Back to development + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2347> + === release 1.20.2 === 2022-05-02 23:29:25 +0100 Tim-Philipp Müller <tim@centricular.com> + * ChangeLog: * NEWS: * RELEASE: * gst-plugins-bad.doap:
View file
gst-plugins-bad-1.20.2.tar.xz/NEWS -> gst-plugins-bad-1.20.3.tar.xz/NEWS
Changed
@@ -2,13 +2,13 @@ GStreamer 1.20.0 was originally released on 3 February 2022. -The latest bug-fix release in the 1.20 series is 1.20.2 and was released -on 2 May 2022. +The latest bug-fix release in the 1.20 series is 1.20.3 and was released +on 15 June 2022. See https://gstreamer.freedesktop.org/releases/1.20/ for the latest version of this document. -Last updated: Monday 2 May 2022, 0:30 UTC (log) +Last updated: Monday 15 June 2022, 17:00 UTC (log) Introduction @@ -2291,6 +2291,218 @@ - List of Merge Requests applied in 1.20.2 - List of Issues fixed in 1.20.2 +1.20.3 + +The third 1.20 bug-fix release (1.20.3) was released on 15 June 2022. + +This release only contains bugfixes and it should be safe to upgrade +from 1.20.x. + +Highlighted bugfixes in 1.20.3 + +- Security fixes in Matroska, MP4 and AVI demuxers +- Fix scrambled video playback with hardware-accelerated VA-API + decoders on certain Intel hardware +- playbin3/decodebin3 regression fix for unhandled streams +- Fragmented MP4 playback fixes +- Android H.265 encoder mapping +- Playback of MXF files produced by FFmpeg before March 2022 +- Fix rtmp2sink crashes on 32-bit platforms +- WebRTC improvements +- D3D11 video decoder and screen recorder fixes +- Performance improvements +- Support for building against OpenCV 4.6 and other build fixes +- Miscellaneous bug fixes, memory leak fixes, and other stability and + reliability improvements + +gstreamer + +- clock: Avoid creating a weakref with every entry (performance + improvement) +- plugin: add Apache 2 license to list of known licenses to avoid + warning +- gst_plugin_load_file: force plugin reload if filename differs +- Add support for LoongArch + +Base Libraries + +- aggregator: Only send events up to CAPS event from + gst_aggregator_set_src_caps(), don’t send multiple caps events with + the same caps and fix negotiation in muxers +- basetransform: handle gst_base_transform_query_caps() returning NULL +- basetransform: fix critical if transform_caps() returned NULL +- queuearray: Fix potential heap overflow when expanding GstQueueArray + +Core Elements + +- multiqueue: fix potential crash on shutdown +- multiqueue: fix warning: ‘is_query’ may be used uninitialized in + this function +- multiqueue: SegFault during flushing with gcc11 + +gst-plugins-base + +- audioconvert: If no channel-mask can be fixated then use a NONE + channel layout +- playbin3: Configure combiner on pad-added if needed +- parsebin: Fix assertions/regression when dealing with un-handled + streams (fixes regression in 1.20.2) +- appsink: Fix race condition on caps handling +- oggdemux: Protect against invalid framerates +- rtcpbuffer: Allow padding on first reduced size packets +- gl: check for xlib-xcb.h header to fix build of tests on macOS with + homebrew +- videoaggregator: unref temporary caps +- v4l2videoenc: Setup crop rectangle if needed + +Tools + +- gst-play-1.0: Print position even if duration is unknown +- gst-device-monitor-1.0: Print string property as-is without + additional escaping + +gst-plugins-good + +- aacparse: Avoid mismatch between src_caps and output_header_type +- avidemux: Fix integer overflow resulting in heap corruption in DIB + buffer inversion code (Security fix) +- deinterlace: Clean up error handling code +- flvdemux: Actually make use of the debug category +- gtkglsink: Fix double-free when OpenGL can’t be initialised +- jack: Add support for detecting libjack on Windows +- matroskademux: Avoid integer-overflow resulting in heap corruption + in WavPack header handling code (Security fix) +- matroskademux, qtdemux: Fix integer overflows in zlib/bz2/etc + decompression code (Security fix) +- qtdemux: Don’t use tfdt for parsing subsequent trun boxes +- rtpbin: Avoid holding GST_RTP_BIN_LOCK when emitting pad-added + signal (to avoid deadlocks) +- rtpptdemux: Don’t GST_FLOW_ERROR when ignoring invalid packets +- smpte: Fix integer overflow with possible heap corruption in GstMask + creation. (Security fix) +- smpte: integer overflow with possible heap corruption in GstMask + creation (Security fix) +- soup: fix soup debug category initialisation +- soup: Fix plugin/element init +- v4l2: Reset transfer in gst_v4l2_object_acquire_format() +- vpxenc: fix crash if encoder produces unmatching timestamp +- wavparse: ensure that any pending segment is sent before an EOS + event is sent + +gst-plugins-bad + +- androidmedia: Add H.265 encoder mapping +- avfvideosrc: fix wrong framerate selected for caps +- d3d11decoder: Fix for alternate interlacing signalling +- d3d11decoder: Do not preallocate texture using downstream d3d11 + buffer pool +- d3d11decoder: Copy HDR10 related caps field manually +- d3d11decoder: Work around Intel DXVA driver crash +- d3d11screencapture: Set viewport when drawing mouse cursor +- d3d11screencapture: Fix missing/outdated cursor shape +- d3d11screencapturesrc: Fix crash when d3d11 device is different from + owned one +- h264decoder: Fix for unhandled low-delay decoding case +- matroskademux, qtdemux: Fix integer overflows in zlib/bz2/etc + decompression code (Security fix) +- mpegtsmux: Make sure to set srcpad caps under all conditions before + outputting the first buffer +- mpegtsmux: sends segment before caps +- mxfdemux: Handle files produced by legacy FFmpeg +- nvh264dec,nvh265dec: Don’t realloc bitstream buffer per slice +- nvcodec: cuda-converter: fix nvrtc compilation on non-English locale + systems +- opencv: Allow building against 4.6.x +- pcapparse: Set timestamp in DTS, not PTS +- rtmp2: fix allocation of GstRtmpMeta which caused crashes on 32-bit + platforms +- rtmp2sink crash on Android arm 32 - cerbero 1.20.2.0 +- sdpdemux: Release request pads from rtpbin when freeing a stream +- va: Add O_CLOEXEC flag at opening drm device (so subprocesses won’t + have access to it) +- webrtcbin: Reject answers that don’t contain the same number of + m-line as offer +- webrtc: datachannel: Notify low buffered amount according to spec + +gst-plugins-ugly + +- No changes + +gst-libav + +- No changes + +gst-rtsp-server + +- No changes + +gstreamer-vaapi + +- vaapi: Do not disable the whole vpp when some va operations not + available +- vaapidecode, vaapipostproc: Disable DMAbuf from caps negotiation +- scrambled video with some Intel graphics cards + +gstreamer-sharp + +- No changes + +gst-omx + +- No changes + +gst-python + +- No changes + +gst-editing-services + +- ges/videourisource: handle non-1/1 PAR source videos + +gst-examples: + +- No changes + +Development build environment + gst-full build + +- Update libnice subproject wrap to 0.1.19 +- meson: use better zlib dependency fallback +- meson: Fix deprecation warnings + +Cerbero build tool and packaging changes in 1.20.3 + +- Set GSTREAMER_1_0_ROOT_MSVC_X86_64 root environment variable in + System section (not User section) +- bootstrap: Add perl-FindBin dep needed by openssl (which is not + installed by default on RedHat systems) +- Also add build-tools/local/bin to PATH on Linux +- Add a variant to control building of the JACK plugin +- libnice: update to 0.1.19 (fixes some WebRTC issues) +- zlib: update to 1.2.12 + +Bindings + +- No changes + +Contributors to 1.20.3 + +Adam Doupe, Alicia Boya García, Bastien Nocera, Corentin Damman, Damian +Hobson-Garcia, Diogo Goncalves, Edward Hervey, Eli Schwartz, Erwann +Gouesbet, Guillaume Desmottes, He Junyan, Hou Qi, Jakub Adam, James +Hilliard, Jan Alexander Steffens (heftig), Jan Schmidt, Matthew Waters, +Nicolas Dufresne, Nirbheek Chauhan, Olivier Crête, Philippe Normand, +Rabindra Harlalka, Ruben Gonzalez, Sebastian Dröge, Seungha Yang, +Stéphane Cerveau, Thibault Saunier, Tim-Philipp Müller, Tom Schuring, U. +Artie Eoff, Víctor Manuel Jáquez Leal, WANG Xuerui, Xavier Claessens, + +… and many others who have contributed bug reports, translations, sent +suggestions or helped testing. Thank you all! + +List of merge requests and issues fixed in 1.20.3 + +- List of Merge Requests applied in 1.20.3 +- List of Issues fixed in 1.20.3 + Schedule for 1.22 Our next major feature release will be 1.22, and 1.21 will be the
View file
gst-plugins-bad-1.20.2.tar.xz/RELEASE -> gst-plugins-bad-1.20.3.tar.xz/RELEASE
Changed
@@ -1,4 +1,4 @@ -This is GStreamer gst-plugins-bad 1.20.2. +This is GStreamer gst-plugins-bad 1.20.3. The GStreamer team is thrilled to announce a new major feature release of your favourite cross-platform multimedia framework!
View file
gst-plugins-bad-1.20.2.tar.xz/docs/plugins/gst_plugins_cache.json -> gst-plugins-bad-1.20.3.tar.xz/docs/plugins/gst_plugins_cache.json
Changed
@@ -211889,7 +211889,7 @@ "construct": false, "construct-only": false, "controllable": false, - "default": "true", + "default": "false", "mutable": "null", "readable": true, "type": "gboolean",
View file
gst-plugins-bad-1.20.2.tar.xz/ext/opencv/gstcvtracker.cpp -> gst-plugins-bad-1.20.3.tar.xz/ext/opencv/gstcvtracker.cpp
Changed
@@ -233,7 +233,7 @@ filter->y = DEFAULT_PROP_INITIAL_Y; filter->width = DEFAULT_PROP_INITIAL_WIDTH; filter->height = DEFAULT_PROP_INITIAL_HEIGHT; -#if CV_VERSION_MAJOR == 4 && CV_VERSION_MINOR >= 5 && CV_VERSION_REVISION >= 1 +#if GST_OPENCV_CHECK_VERSION(4, 5, 1) filter->tracker = cv::legacy::upgradeTrackingAPI( cv::legacy::TrackerMedianFlow::create()); #else @@ -283,7 +283,7 @@ { switch (filter->algorithm) { case GST_OPENCV_TRACKER_ALGORITHM_BOOSTING: -#if CV_VERSION_MAJOR == 4 && CV_VERSION_MINOR >= 5 && CV_VERSION_REVISION >= 1 +#if GST_OPENCV_CHECK_VERSION(4, 5, 1) filter->tracker = cv::legacy::upgradeTrackingAPI( cv::legacy::TrackerBoosting::create()); #else @@ -297,7 +297,7 @@ filter->tracker = cv::TrackerKCF::create (); break; case GST_OPENCV_TRACKER_ALGORITHM_MEDIANFLOW: -#if CV_VERSION_MAJOR == 4 && CV_VERSION_MINOR >= 5 && CV_VERSION_REVISION >= 1 +#if GST_OPENCV_CHECK_VERSION(4, 5, 1) filter->tracker = cv::legacy::upgradeTrackingAPI( cv::legacy::TrackerMedianFlow::create()); #else @@ -308,7 +308,7 @@ filter->tracker = cv::TrackerMIL::create (); break; case GST_OPENCV_TRACKER_ALGORITHM_MOSSE: -#if CV_VERSION_MAJOR == 4 && CV_VERSION_MINOR >= 5 && CV_VERSION_REVISION >= 1 +#if GST_OPENCV_CHECK_VERSION(4, 5, 1) filter->tracker = cv::legacy::upgradeTrackingAPI( cv::legacy::TrackerMOSSE::create()); #else @@ -316,7 +316,7 @@ #endif break; case GST_OPENCV_TRACKER_ALGORITHM_TLD: -#if CV_VERSION_MAJOR == 4 && CV_VERSION_MINOR >= 5 && CV_VERSION_REVISION >= 1 +#if GST_OPENCV_CHECK_VERSION(4, 5, 1) filter->tracker = cv::legacy::upgradeTrackingAPI( cv::legacy::TrackerTLD::create()); #else @@ -366,7 +366,7 @@ GstMessage *msg; if (filter->roi.empty ()) { -#if CV_VERSION_MAJOR == 4 && CV_VERSION_MINOR >= 5 && CV_VERSION_REVISION >= 1 +#if GST_OPENCV_CHECK_VERSION(4, 5, 1) filter->roi = new (cv::Rect); #else filter->roi = new (cv::Rect2d); @@ -378,7 +378,7 @@ create_cvtracker (filter); filter->tracker->init (img, *filter->roi); } else if (filter->tracker->update (img, *filter->roi)) { -#if (!(CV_VERSION_MAJOR == 4 && CV_VERSION_MINOR >= 5 && CV_VERSION_REVISION >= 1)) +#if !GST_OPENCV_CHECK_VERSION(4, 5, 1) /* Round values to avoid inconsistencies depending on the OpenCV version. */ filter->roi->x = cvRound (filter->roi->x); filter->roi->y = cvRound (filter->roi->y);
View file
gst-plugins-bad-1.20.2.tar.xz/ext/opencv/gstcvtracker.h -> gst-plugins-bad-1.20.3.tar.xz/ext/opencv/gstcvtracker.h
Changed
@@ -50,7 +50,14 @@ #include <opencv2/core.hpp> #include <opencv2/imgproc.hpp> #include <opencv2/tracking.hpp> -#if CV_VERSION_MAJOR == 4 && CV_VERSION_MINOR >= 5 && CV_VERSION_REVISION >= 1 + +#define GST_OPENCV_CHECK_VERSION(major,minor,revision) \ + (CV_VERSION_MAJOR > (major) || \ + (CV_VERSION_MAJOR == (major) && CV_VERSION_MINOR > (minor)) || \ + (CV_VERSION_MAJOR == (major) && CV_VERSION_MINOR == (minor) && \ + CV_VERSION_REVISION >= (revision))) + +#if GST_OPENCV_CHECK_VERSION(4, 5, 1) #include <opencv2/tracking/tracking_legacy.hpp> #endif @@ -84,7 +91,7 @@ gboolean post_debug_info; cv::Ptr<cv::Tracker> tracker; -#if CV_VERSION_MAJOR == 4 && CV_VERSION_MINOR >= 5 && CV_VERSION_REVISION >= 1 +#if GST_OPENCV_CHECK_VERSION(4, 5, 1) cv::Ptr<cv::Rect> roi; #else cv::Ptr<cv::Rect2d> roi;
View file
gst-plugins-bad-1.20.2.tar.xz/ext/opencv/meson.build -> gst-plugins-bad-1.20.3.tar.xz/ext/opencv/meson.build
Changed
@@ -71,7 +71,7 @@ endif if not opencv_found - opencv_dep = dependency('opencv4', version : '>= 4.0.0', '< 4.6.0', required : false) + opencv_dep = dependency('opencv4', version : '>= 4.0.0', '< 4.7.0', required : false) opencv_found = opencv_dep.found() if opencv_found foreach h : libopencv4_headers
View file
gst-plugins-bad-1.20.2.tar.xz/ext/webrtc/gstwebrtcbin.c -> gst-plugins-bad-1.20.3.tar.xz/ext/webrtc/gstwebrtcbin.c
Changed
@@ -5396,18 +5396,16 @@ return ret; } -static gboolean -check_transceivers_not_removed (GstWebRTCBin * webrtc, +static gint +transceivers_media_num_cmp (GstWebRTCBin * webrtc, GstWebRTCSessionDescription * previous, GstWebRTCSessionDescription * new) { if (!previous) - return TRUE; + return 0; - if (gst_sdp_message_medias_len (previous->sdp) > - gst_sdp_message_medias_len (new->sdp)) - return FALSE; + return gst_sdp_message_medias_len (new->sdp) - + gst_sdp_message_medias_len (previous->sdp); - return TRUE; } static gboolean @@ -5495,6 +5493,35 @@ return NULL; } +static GstWebRTCSessionDescription * +get_last_generated_description (GstWebRTCBin * webrtc, SDPSource source, + GstWebRTCSDPType type) +{ + switch (type) { + case GST_WEBRTC_SDP_TYPE_OFFER: + if (source == SDP_REMOTE) + return webrtc->priv->last_generated_answer; + else + return webrtc->priv->last_generated_offer; + break; + case GST_WEBRTC_SDP_TYPE_PRANSWER: + case GST_WEBRTC_SDP_TYPE_ANSWER: + if (source == SDP_LOCAL) + return webrtc->priv->last_generated_answer; + else + return webrtc->priv->last_generated_offer; + case GST_WEBRTC_SDP_TYPE_ROLLBACK: + return NULL; + default: + /* other values mean memory corruption/uninitialized! */ + g_assert_not_reached (); + break; + } + + return NULL; +} + + /* http://w3c.github.io/webrtc-pc/#set-description */ static GstStructure * _set_description_task (GstWebRTCBin * webrtc, struct set_description *sd) @@ -5535,9 +5562,9 @@ } } - if (!check_transceivers_not_removed (webrtc, + if (transceivers_media_num_cmp (webrtc, get_previous_description (webrtc, sd->source, sd->sdp->type), - sd->sdp)) { + sd->sdp) < 0) { g_set_error_literal (&error, GST_WEBRTC_ERROR, GST_WEBRTC_ERROR_SDP_SYNTAX_ERROR, "m=lines removed from the SDP. Processing a completely new connection " @@ -5545,6 +5572,17 @@ goto out; } + if ((sd->sdp->type == GST_WEBRTC_SDP_TYPE_PRANSWER || + sd->sdp->type == GST_WEBRTC_SDP_TYPE_ANSWER) && + transceivers_media_num_cmp (webrtc, + get_last_generated_description (webrtc, sd->source, sd->sdp->type), + sd->sdp) != 0) { + g_set_error_literal (&error, GST_WEBRTC_ERROR, + GST_WEBRTC_ERROR_SDP_SYNTAX_ERROR, + "Answer doesn't have the same number of m-lines as the offer."); + goto out; + } + if (!check_locked_mlines (webrtc, sd->sdp, &error)) goto out;
View file
gst-plugins-bad-1.20.2.tar.xz/ext/webrtc/webrtcdatachannel.c -> gst-plugins-bad-1.20.3.tar.xz/ext/webrtc/webrtcdatachannel.c
Changed
@@ -918,7 +918,7 @@ channel->parent.buffered_amount_low_threshold, channel->parent.buffered_amount); if (prev_amount >= channel->parent.buffered_amount_low_threshold - && channel->parent.buffered_amount < + && channel->parent.buffered_amount <= channel->parent.buffered_amount_low_threshold) { _channel_enqueue_task (channel, (ChannelTask) _emit_low_threshold, NULL, NULL);
View file
gst-plugins-bad-1.20.2.tar.xz/gst-libs/gst/codecs/gsth264decoder.c -> gst-plugins-bad-1.20.3.tar.xz/gst-libs/gst/codecs/gsth264decoder.c
Changed
@@ -1410,6 +1410,16 @@ self->input_state = gst_video_codec_state_ref (state); + /* in case live streaming, we will run on low-latency mode */ + priv->is_live = FALSE; + query = gst_query_new_latency (); + if (gst_pad_peer_query (GST_VIDEO_DECODER_SINK_PAD (self), query)) + gst_query_parse_latency (query, &priv->is_live, NULL, NULL); + gst_query_unref (query); + + if (priv->is_live) + GST_DEBUG_OBJECT (self, "Live source, will run on low-latency mode"); + if (state->caps) { GstStructure *str; const GValue *codec_data_value; @@ -1479,16 +1489,6 @@ gst_buffer_unmap (priv->codec_data, &map); } - /* in case live streaming, we will run on low-latency mode */ - priv->is_live = FALSE; - query = gst_query_new_latency (); - if (gst_pad_peer_query (GST_VIDEO_DECODER_SINK_PAD (self), query)) - gst_query_parse_latency (query, &priv->is_live, NULL, NULL); - gst_query_unref (query); - - if (priv->is_live) - GST_DEBUG_OBJECT (self, "Live source, will run on low-latency mode"); - return TRUE; }
View file
gst-plugins-bad-1.20.2.tar.xz/gst-libs/gst/d3d11/gstd3d11memory.cpp -> gst-plugins-bad-1.20.3.tar.xz/gst-libs/gst/d3d11/gstd3d11memory.cpp
Changed
@@ -260,6 +260,8 @@ guint num_render_target_views; ID3D11VideoDecoderOutputView *decoder_output_view; + ID3D11VideoDecoder *decoder_handle; + ID3D11VideoProcessorInputView *processor_input_view; ID3D11VideoProcessorOutputView *processor_output_view; @@ -961,7 +963,8 @@ static gboolean gst_d3d11_memory_ensure_decoder_output_view (GstD3D11Memory * mem, - ID3D11VideoDevice * video_device, GUID * decoder_profile) + ID3D11VideoDevice * video_device, ID3D11VideoDecoder * decoder, + const GUID * decoder_profile) { GstD3D11MemoryPrivate *dmem_priv = mem->priv; GstD3D11Allocator *allocator; @@ -980,13 +983,15 @@ GST_D3D11_MEMORY_LOCK (mem); if (dmem_priv->decoder_output_view) { dmem_priv->decoder_output_view->GetDesc (&desc); - if (IsEqualGUID (desc.DecodeProfile, *decoder_profile)) { + if (IsEqualGUID (desc.DecodeProfile, *decoder_profile) && + dmem_priv->decoder_handle == decoder) { goto succeeded; } else { /* Shouldn't happen, but try again anyway */ GST_WARNING_OBJECT (allocator, "Existing view has different decoder profile"); GST_D3D11_CLEAR_COM (dmem_priv->decoder_output_view); + GST_D3D11_CLEAR_COM (dmem_priv->decoder_handle); } } @@ -1005,6 +1010,12 @@ goto done; } + /* XXX: decoder output view is bound to video device, not decoder handle + * from API point of view. But some driver seems to be unhappy + * when decoder handle is released while there are outstanding view objects */ + dmem_priv->decoder_handle = decoder; + decoder->AddRef (); + succeeded: ret = TRUE; @@ -1017,6 +1028,9 @@ /** * gst_d3d11_memory_get_decoder_output_view: * @mem: a #GstD3D11Memory + * @video_device: (transfer none): a ID3D11VideoDevice handle + * @decoder: (transfer none): a ID3D11VideoDecoder handle + * @decoder_profile: a DXVA decoder profile GUID * * Returns: (transfer none) (nullable): a pointer to the * ID3D11VideoDecoderOutputView or %NULL if ID3D11VideoDecoderOutputView is @@ -1026,14 +1040,16 @@ */ ID3D11VideoDecoderOutputView * gst_d3d11_memory_get_decoder_output_view (GstD3D11Memory * mem, - ID3D11VideoDevice * video_device, GUID * decoder_profile) + ID3D11VideoDevice * video_device, ID3D11VideoDecoder * decoder, + const GUID * decoder_profile) { g_return_val_if_fail (gst_is_d3d11_memory (GST_MEMORY_CAST (mem)), NULL); g_return_val_if_fail (video_device != NULL, NULL); + g_return_val_if_fail (decoder != NULL, NULL); g_return_val_if_fail (decoder_profile != NULL, NULL); if (!gst_d3d11_memory_ensure_decoder_output_view (mem, - video_device, decoder_profile)) + video_device, decoder, decoder_profile)) return NULL; return mem->priv->decoder_output_view; @@ -1365,6 +1381,8 @@ GST_D3D11_CLEAR_COM (dmem_priv->texture); GST_D3D11_CLEAR_COM (dmem_priv->staging); + GST_D3D11_CLEAR_COM (dmem_priv->decoder_handle); + gst_clear_object (&dmem->device); g_mutex_clear (&dmem_priv->lock); g_free (dmem->priv);
View file
gst-plugins-bad-1.20.2.tar.xz/gst-libs/gst/d3d11/gstd3d11memory.h -> gst-plugins-bad-1.20.3.tar.xz/gst-libs/gst/d3d11/gstd3d11memory.h
Changed
@@ -192,7 +192,8 @@ GST_D3D11_API ID3D11VideoDecoderOutputView * gst_d3d11_memory_get_decoder_output_view (GstD3D11Memory * mem, ID3D11VideoDevice * video_device, - GUID * decoder_profile); + ID3D11VideoDecoder * decoder, + const GUID * decoder_profile); GST_D3D11_API ID3D11VideoProcessorInputView * gst_d3d11_memory_get_processor_input_view (GstD3D11Memory * mem,
View file
gst-plugins-bad-1.20.2.tar.xz/gst-libs/gst/va/gstvadisplay_drm.c -> gst-plugins-bad-1.20.3.tar.xz/gst-libs/gst/va/gstvadisplay_drm.c
Changed
@@ -135,7 +135,7 @@ int fd, saved_errno = 0; GstVaDisplayDrm *self = GST_VA_DISPLAY_DRM (display); - fd = open (self->path, O_RDWR); + fd = open (self->path, O_CLOEXEC | O_RDWR); saved_errno = errno; if (fd < 0) { GST_WARNING_OBJECT (self, "Failed to open %s: %s", self->path,
View file
gst-plugins-bad-1.20.2.tar.xz/gst-libs/gst/vulkan/meson.build -> gst-plugins-bad-1.20.3.tar.xz/gst-libs/gst/vulkan/meson.build
Changed
@@ -98,7 +98,7 @@ foreach option : vulkan_conf_options - vulkan_conf.set10(option, false) + vulkan_conf.set(option, 0) endforeach if 'ios', 'darwin'.contains(host_system) @@ -168,7 +168,7 @@ optional_deps += xcb_dep, xkbcommon_dep, xkbcommon_x11_dep vulkan_windowing = true - vulkan_conf.set10('GST_VULKAN_HAVE_WINDOW_XCB', 1) + vulkan_conf.set('GST_VULKAN_HAVE_WINDOW_XCB', 1) enabled_vulkan_winsys += 'xcb' endif @@ -189,7 +189,7 @@ optional_deps += wayland_client_dep vulkan_windowing = true - vulkan_conf.set10('GST_VULKAN_HAVE_WINDOW_WAYLAND', 1) + vulkan_conf.set('GST_VULKAN_HAVE_WINDOW_WAYLAND', 1) enabled_vulkan_winsys += 'wayland' endif @@ -219,7 +219,7 @@ ) optional_deps += cocoa_dep vulkan_windowing = true - vulkan_conf.set10('GST_VULKAN_HAVE_WINDOW_COCOA', 1) + vulkan_conf.set('GST_VULKAN_HAVE_WINDOW_COCOA', 1) enabled_vulkan_winsys += 'cocoa' endif endif @@ -234,7 +234,7 @@ ) optional_deps += uikit_dep vulkan_windowing = true - vulkan_conf.set10('GST_VULKAN_HAVE_WINDOW_IOS', 1) + vulkan_conf.set('GST_VULKAN_HAVE_WINDOW_IOS', 1) enabled_vulkan_winsys += 'ios' endif endif @@ -247,7 +247,7 @@ vulkan_priv_sources += 'win32/gstvkwindow_win32.c' optional_deps += gdi_dep vulkan_windowing = true - vulkan_conf.set10('GST_VULKAN_HAVE_WINDOW_WIN32', 1) + vulkan_conf.set('GST_VULKAN_HAVE_WINDOW_WIN32', 1) enabled_vulkan_winsys += 'win32' endif endif @@ -259,7 +259,7 @@ 'android/gstvkwindow_android.c', ) vulkan_windowing = true - vulkan_conf.set10('GST_VULKAN_HAVE_WINDOW_ANDROID', 1) + vulkan_conf.set('GST_VULKAN_HAVE_WINDOW_ANDROID', 1) enabled_vulkan_winsys += 'android' endif endif
View file
gst-plugins-bad-1.20.2.tar.xz/gst-plugins-bad.doap -> gst-plugins-bad-1.20.3.tar.xz/gst-plugins-bad.doap
Changed
@@ -35,6 +35,16 @@ <release> <Version> + <revision>1.20.3</revision> + <branch>1.20</branch> + <name></name> + <created>2022-06-15</created> + <file-release rdf:resource="https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.20.3.tar.xz" /> + </Version> + </release> + + <release> + <Version> <revision>1.20.2</revision> <branch>1.20</branch> <name></name>
View file
gst-plugins-bad-1.20.2.tar.xz/gst/mpegtsmux/gstbasetsmux.c -> gst-plugins-bad-1.20.3.tar.xz/gst/mpegtsmux/gstbasetsmux.c
Changed
@@ -263,15 +263,14 @@ GValue value = { 0 }; GstCaps *caps; - caps = gst_pad_get_current_caps (GST_AGGREGATOR_SRC_PAD (mux)); - - /* If we have no caps, we are possibly shutting down */ - if (!caps) - return; + caps = gst_pad_get_pad_template_caps (GST_AGGREGATOR_SRC_PAD (mux)); caps = gst_caps_make_writable (caps); structure = gst_caps_get_structure (caps, 0); + gst_structure_set (structure, "packetsize", G_TYPE_INT, mux->packet_size, + NULL); + g_value_init (&array, GST_TYPE_ARRAY); GST_LOG_OBJECT (mux, "setting %u packets into streamheader", @@ -2249,20 +2248,6 @@ return ret; } -static GstFlowReturn -gst_base_ts_mux_update_src_caps (GstAggregator * agg, GstCaps * caps, - GstCaps ** ret) -{ - GstBaseTsMux *mux = GST_BASE_TS_MUX (agg); - GstStructure *s; - - *ret = gst_caps_copy (caps); - s = gst_caps_get_structure (*ret, 0); - gst_structure_set (s, "packetsize", G_TYPE_INT, mux->packet_size, NULL); - - return GST_FLOW_OK; -} - static GstBaseTsMuxPad * gst_base_ts_mux_find_best_pad (GstAggregator * aggregator) { @@ -2334,6 +2319,21 @@ GstBaseTsMux *mux = GST_BASE_TS_MUX (agg); GstFlowReturn ret = GST_FLOW_OK; GstBaseTsMuxPad *best = gst_base_ts_mux_find_best_pad (agg); + GstCaps *caps; + + /* set caps on the srcpad if no caps were set yet */ + if (!(caps = gst_pad_get_current_caps (agg->srcpad))) { + GstStructure *structure; + + caps = gst_pad_get_pad_template_caps (GST_AGGREGATOR_SRC_PAD (mux)); + caps = gst_caps_make_writable (caps); + structure = gst_caps_get_structure (caps, 0); + gst_structure_set (structure, "packetsize", G_TYPE_INT, mux->packet_size, + NULL); + + gst_aggregator_set_src_caps (GST_AGGREGATOR (mux), caps); + } + gst_caps_unref (caps); if (best) { GstBuffer *buffer; @@ -2629,7 +2629,7 @@ gstelement_class->release_pad = gst_base_ts_mux_release_pad; gstelement_class->send_event = gst_base_ts_mux_send_event; - gstagg_class->update_src_caps = gst_base_ts_mux_update_src_caps; + gstagg_class->negotiate = NULL; gstagg_class->aggregate = gst_base_ts_mux_aggregate; gstagg_class->clip = gst_base_ts_mux_clip; gstagg_class->sink_event = gst_base_ts_mux_sink_event;
View file
gst-plugins-bad-1.20.2.tar.xz/gst/mxf/mxfdemux.c -> gst-plugins-bad-1.20.3.tar.xz/gst/mxf/mxfdemux.c
Changed
@@ -3320,16 +3320,22 @@ compare_index_table_segment (MXFIndexTableSegment * sa, MXFIndexTableSegment * sb) { - if (mxf_uuid_is_equal (&sa->instance_id, &sb->instance_id)) - return 0; if (sa->body_sid != sb->body_sid) return (sa->body_sid < sb->body_sid) ? -1 : 1; if (sa->index_sid != sb->index_sid) return (sa->index_sid < sb->index_sid) ? -1 : 1; - /* Finally sort by index start position */ - if (sa->index_start_position < sb->index_start_position) - return -1; - return (sa->index_start_position != sb->index_start_position); + if (sa->index_start_position != sb->index_start_position) + return (sa->index_start_position < sb->index_start_position) ? -1 : 1; + + /* If all the above are equal ... the index table segments are only equal if + * their instance ID are equal. Until March 2022 the FFmpeg MXF muxer would + * write the same instance id for the various (different) index table + * segments, we therefore only check instance ID *after* all the above + * properties to make sure they are really different. */ + if (mxf_uuid_is_equal (&sa->instance_id, &sb->instance_id)) + return 0; + + return 1; } #if !GLIB_CHECK_VERSION(2, 62, 0) @@ -3340,7 +3346,7 @@ for (i = 0; i < segments->len; i++) { MXFIndexTableSegment *cand = &g_array_index (segments, MXFIndexTableSegment, i); - if (mxf_uuid_is_equal (&cand->instance_id, &target->instance_id)) + if (compare_index_table_segment (cand, target) == 0) return TRUE; } return FALSE;
View file
gst-plugins-bad-1.20.2.tar.xz/gst/mxf/mxfmux.c -> gst-plugins-bad-1.20.3.tar.xz/gst/mxf/mxfmux.c
Changed
@@ -173,6 +173,7 @@ gstaggregator_class->sink_event = GST_DEBUG_FUNCPTR (gst_mxf_mux_sink_event); gstaggregator_class->stop = GST_DEBUG_FUNCPTR (gst_mxf_mux_stop); gstaggregator_class->aggregate = GST_DEBUG_FUNCPTR (gst_mxf_mux_aggregate); + gstaggregator_class->negotiate = NULL; gst_element_class_add_static_pad_template_with_gtype (gstelement_class, &src_templ, GST_TYPE_MXF_MUX_PAD);
View file
gst-plugins-bad-1.20.2.tar.xz/gst/pcapparse/gstpcapparse.c -> gst-plugins-bad-1.20.3.tar.xz/gst/pcapparse/gstpcapparse.c
Changed
@@ -559,7 +559,7 @@ self->cur_ts += self->offset; } } - GST_BUFFER_TIMESTAMP (out_buf) = self->cur_ts; + GST_BUFFER_DTS (out_buf) = self->cur_ts; if (list == NULL)
View file
gst-plugins-bad-1.20.2.tar.xz/gst/rtmp2/rtmp/rtmpmessage.c -> gst-plugins-bad-1.20.3.tar.xz/gst/rtmp2/rtmp/rtmpmessage.c
Changed
@@ -207,7 +207,7 @@ if (g_once_init_enter (&rtmp_meta_info)) { const GstMetaInfo *meta = gst_meta_register (GST_RTMP_META_API_TYPE, - "GstRtmpMeta", sizeof *meta, gst_rtmp_meta_init, NULL, + "GstRtmpMeta", sizeof (GstRtmpMeta), gst_rtmp_meta_init, NULL, gst_rtmp_meta_transform); g_once_init_leave (&rtmp_meta_info, meta); }
View file
gst-plugins-bad-1.20.2.tar.xz/gst/sdp/gstsdpdemux.c -> gst-plugins-bad-1.20.3.tar.xz/gst/sdp/gstsdpdemux.c
Changed
@@ -313,18 +313,34 @@ for (i = 0; i < 2; i++) { GstElement *udpsrc = stream->udpsrci; + GstPad *channelpad = stream->channelpadi; if (udpsrc) { gst_element_set_state (udpsrc, GST_STATE_NULL); gst_bin_remove (GST_BIN_CAST (demux), udpsrc); stream->udpsrci = NULL; } + + if (channelpad) { + if (demux->session) { + gst_element_release_request_pad (demux->session, channelpad); + } + gst_object_unref (channelpad); + stream->channelpadi = NULL; + } } if (stream->udpsink) { gst_element_set_state (stream->udpsink, GST_STATE_NULL); gst_bin_remove (GST_BIN_CAST (demux), stream->udpsink); stream->udpsink = NULL; } + if (stream->rtcppad) { + if (demux->session) { + gst_element_release_request_pad (demux->session, stream->rtcppad); + } + gst_object_unref (stream->rtcppad); + stream->rtcppad = NULL; + } if (stream->srcpad) { gst_pad_set_active (stream->srcpad, FALSE); if (stream->added) { @@ -842,7 +858,7 @@ gst_sdp_demux_stream_configure_udp_sink (GstSDPDemux * demux, GstSDPStream * stream) { - GstPad *pad, *sinkpad; + GstPad *sinkpad; gint port; GSocket *socket; gchar *destination, *uri, *name; @@ -894,21 +910,19 @@ /* get session RTCP pad */ name = g_strdup_printf ("send_rtcp_src_%u", stream->id); - pad = gst_element_request_pad_simple (demux->session, name); + stream->rtcppad = gst_element_request_pad_simple (demux->session, name); g_free (name); /* and link */ - if (pad) { + if (stream->rtcppad) { sinkpad = gst_element_get_static_pad (stream->udpsink, "sink"); - gst_pad_link (pad, sinkpad); - gst_object_unref (pad); + gst_pad_link (stream->rtcppad, sinkpad); gst_object_unref (sinkpad); } else { /* not very fatal, we just won't be able to send RTCP */ GST_WARNING_OBJECT (demux, "could not get session RTCP pad"); } - return TRUE; /* ERRORS */
View file
gst-plugins-bad-1.20.2.tar.xz/meson.build -> gst-plugins-bad-1.20.3.tar.xz/meson.build
Changed
@@ -1,5 +1,5 @@ project('gst-plugins-bad', 'c', 'cpp', - version : '1.20.2', + version : '1.20.3', meson_version : '>= 0.59', default_options : 'warning_level=1', 'buildtype=debugoptimized' )
View file
gst-plugins-bad-1.20.2.tar.xz/po/gst-plugins-bad-1.0.pot -> gst-plugins-bad-1.20.3.tar.xz/po/gst-plugins-bad-1.0.pot
Changed
@@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: gst-plugins-bad-1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-02 23:30+0100\n" +"POT-Creation-Date: 2022-06-15 23:37+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
View file
gst-plugins-bad-1.20.2.tar.xz/sys/androidmedia/gstamc-constants.h -> gst-plugins-bad-1.20.3.tar.xz/sys/androidmedia/gstamc-constants.h
Changed
@@ -148,7 +148,8 @@ HEVCHighTierLevel6 = 0x200000, HEVCMainTierLevel61 = 0x400000, HEVCHighTierLevel61 = 0x800000, - HEVCMainTierLevel62 = 0x1000000 + HEVCMainTierLevel62 = 0x1000000, + HEVCHighTierLevel62 = 0x2000000 }; enum
View file
gst-plugins-bad-1.20.2.tar.xz/sys/androidmedia/gstamc.c -> gst-plugins-bad-1.20.3.tar.xz/sys/androidmedia/gstamc.c
Changed
@@ -1141,7 +1141,8 @@ HEVCHighTierLevel51, "high", "5.1"}, { HEVCHighTierLevel52, "high", "5.2"}, { HEVCHighTierLevel6, "high", "6"}, { - HEVCHighTierLevel61, "high", "6.1"} + HEVCHighTierLevel61, "high", "6.1"}, { + HEVCHighTierLevel62, "high", "6.2"} }; const gchar * @@ -2334,35 +2335,40 @@ tmp2 = gst_structure_copy (tmp); gst_structure_set (tmp2, "profile", G_TYPE_STRING, profile, NULL); - /* FIXME: Implement tier/level support here */ -#if 0 if (codec_info->is_encoder) { const gchar *level, *tier; gint k; - GValue va = { 0, }; GValue v = { 0, }; - g_value_init (&va, GST_TYPE_LIST); g_value_init (&v, G_TYPE_STRING); for (k = 1; k <= type->profile_levelsj.level && k != 0; k <<= 1) { level = gst_amc_hevc_tier_level_to_string (k, &tier); - if (!level) + if (!level || !tier) continue; + tmp3 = gst_structure_copy (tmp2); + + g_value_set_string (&v, tier); + gst_structure_set_value (tmp3, "tier", &v); + g_value_reset (&v); + g_value_set_string (&v, level); - gst_value_list_append_value (&va, &v); + gst_structure_set_value (tmp3, "level", &v); g_value_reset (&v); - } - gst_structure_set_value (tmp2, "level", &va); + encoded_ret = gst_caps_merge_structure (encoded_ret, tmp3); - g_value_unset (&va); - g_value_unset (&v); + have_profile_level = TRUE; + } + } + + if (have_profile_level) { + gst_structure_free (tmp2); + } else { + encoded_ret = gst_caps_merge_structure (encoded_ret, tmp2); } -#endif - encoded_ret = gst_caps_merge_structure (encoded_ret, tmp2); have_profile_level = TRUE; } }
View file
gst-plugins-bad-1.20.2.tar.xz/sys/androidmedia/gstamcvideoenc.c -> gst-plugins-bad-1.20.3.tar.xz/sys/androidmedia/gstamcvideoenc.c
Changed
@@ -213,6 +213,21 @@ amc_level.key = "level"; /* named level ? */ amc_level.id = gst_amc_avc_level_from_string (level_string); } + } else if (strcmp (name, "video/x-h265") == 0) { + const gchar *tier_string = gst_structure_get_string (s, "tier"); + + mime = "video/hevc"; + + if (profile_string) { + amc_profile.key = "profile"; /* named profile ? */ + amc_profile.id = gst_amc_hevc_profile_from_string (profile_string); + } + + if (level_string && tier_string) { + amc_level.key = "level"; /* named level ? */ + amc_level.id = + gst_amc_hevc_tier_level_from_string (tier_string, level_string); + } } else if (strcmp (name, "video/x-vp8") == 0) { mime = "video/x-vnd.on2.vp8"; } else if (strcmp (name, "video/x-vp9") == 0) { @@ -414,6 +429,32 @@ gst_caps_set_simple (caps, "level", G_TYPE_STRING, level_string, NULL); } + } else if (strcmp (mime, "video/hevc") == 0) { + const gchar *profile_string, *level_string, *tier_string; + + caps = + gst_caps_new_simple ("video/x-h265", + "stream-format", G_TYPE_STRING, "byte-stream", NULL); + + if (gst_amc_format_get_int (amc_format, "profile", &amc_profile, NULL)) { + profile_string = gst_amc_avc_profile_to_string (amc_profile, NULL); + if (!profile_string) + goto unsupported_profile; + + gst_caps_set_simple (caps, "profile", G_TYPE_STRING, profile_string, + NULL); + } + + if (gst_amc_format_get_int (amc_format, "level", &amc_level, NULL)) { + level_string = + gst_amc_hevc_tier_level_to_string (amc_profile, &tier_string); + if (!level_string || !tier_string) + goto unsupported_level; + + gst_caps_set_simple (caps, + "level", G_TYPE_STRING, level_string, + "tier", G_TYPE_STRING, tier_string, NULL); + } } else if (strcmp (mime, "video/x-vnd.on2.vp8") == 0) { caps = gst_caps_new_empty_simple ("video/x-vp8"); } else if (strcmp (mime, "video/x-vnd.on2.vp9") == 0) { @@ -847,6 +888,7 @@ { GstCaps *caps; GstVideoCodecState *output_state; + GstStructure *s; caps = caps_from_amc_format (format); if (!caps) { @@ -871,6 +913,17 @@ if (!gst_video_encoder_negotiate (GST_VIDEO_ENCODER (self))) return FALSE; + output_state = gst_video_encoder_get_output_state (GST_VIDEO_ENCODER (self)); + s = gst_caps_get_structure (output_state->caps, 0); + + if (!strcmp (gst_structure_get_name (s), "video/x-h264") || + !strcmp (gst_structure_get_name (s), "video/x-h265")) { + self->codec_data_in_bytestream = TRUE; + } else { + self->codec_data_in_bytestream = FALSE; + } + gst_video_codec_state_unref (output_state); + return TRUE; } @@ -906,14 +959,8 @@ * gstomxvideoenc.c and gstomxh264enc.c */ if ((buffer_info->flags & BUFFER_FLAG_CODEC_CONFIG) && buffer_info->size > 0) { - GstStructure *s; - GstVideoCodecState *state; - - state = gst_video_encoder_get_output_state (encoder); - s = gst_caps_get_structure (state->caps, 0); - if (!strcmp (gst_structure_get_name (s), "video/x-h264")) { - gst_video_codec_state_unref (state); + if (self->codec_data_in_bytestream) { if (buffer_info->size > 4 && GST_READ_UINT32_BE (buf->data + buffer_info->offset) == 0x00000001) { GList *l = NULL; @@ -933,14 +980,16 @@ } } else { GstBuffer *codec_data; + GstVideoCodecState *output_state = + gst_video_encoder_get_output_state (GST_VIDEO_ENCODER (self)); GST_DEBUG_OBJECT (self, "Handling codec data"); codec_data = gst_buffer_new_and_alloc (buffer_info->size); gst_buffer_fill (codec_data, 0, buf->data + buffer_info->offset, buffer_info->size); - state->codec_data = codec_data; - gst_video_codec_state_unref (state); + output_state->codec_data = codec_data; + gst_video_codec_state_unref (output_state); if (!gst_video_encoder_negotiate (encoder)) { gst_video_codec_frame_unref (frame);
View file
gst-plugins-bad-1.20.2.tar.xz/sys/androidmedia/gstamcvideoenc.h -> gst-plugins-bad-1.20.3.tar.xz/sys/androidmedia/gstamcvideoenc.h
Changed
@@ -56,6 +56,10 @@ GstAmcCodec *codec; GstAmcFormat *amc_format; + /* Set to TRUE if codec headers should be placed + * in the stream, or FALSE if they go in the headers */ + gboolean codec_data_in_bytestream; + GstVideoCodecState *input_state; /* Input format of the codec */
View file
gst-plugins-bad-1.20.2.tar.xz/sys/applemedia/avfvideosrc.m -> gst-plugins-bad-1.20.3.tar.xz/sys/applemedia/avfvideosrc.m
Changed
@@ -671,6 +671,10 @@ break; } } + + if (found_framerate) { + break; + } } } if (!found_format) {
View file
gst-plugins-bad-1.20.2.tar.xz/sys/d3d11/gstd3d11decoder.cpp -> gst-plugins-bad-1.20.3.tar.xz/sys/d3d11/gstd3d11decoder.cpp
Changed
@@ -409,7 +409,7 @@ mem = (GstD3D11Memory *) gst_buffer_peek_memory (buffer, 0); if (!gst_d3d11_memory_get_decoder_output_view (mem, self->video_device, - &self->decoder_profile)) { + self->decoder_handle, &self->decoder_profile)) { GST_ERROR_OBJECT (self, "Decoder output view is unavailable"); return FALSE; } @@ -1364,7 +1364,7 @@ dmem = (GstD3D11Memory *) mem; view = gst_d3d11_memory_get_decoder_output_view (dmem, decoder->video_device, - &decoder->decoder_profile); + decoder->decoder_handle, &decoder->decoder_profile); if (!view) { GST_ERROR_OBJECT (decoder, "Decoder output view is unavailable"); @@ -1602,7 +1602,11 @@ gboolean alternate_interlaced; gboolean alternate_supported = FALSE; gboolean d3d11_supported = FALSE; + /* No d3d11 element supports alternate now */ + gboolean d3d11_alternate_supported = FALSE; GstVideoCodecState *input_state; + GstStructure *s; + const gchar *str; g_return_val_if_fail (GST_IS_D3D11_DECODER (decoder), FALSE); g_return_val_if_fail (GST_IS_VIDEO_DECODER (videodec), FALSE); @@ -1634,10 +1638,13 @@ if (gst_caps_features_contains (features, GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY)) { d3d11_supported = TRUE; + + if (gst_caps_features_contains (features, + GST_CAPS_FEATURE_FORMAT_INTERLACED)) { + d3d11_alternate_supported = TRUE; + } } - /* FIXME: software deinterlace element will not return interlaced caps - * feature... We should fix it */ if (gst_caps_features_contains (features, GST_CAPS_FEATURE_FORMAT_INTERLACED)) { alternate_supported = TRUE; @@ -1655,7 +1662,7 @@ GST_FIXME_OBJECT (videodec, "Implement alternating interlaced stream for D3D11"); - if (alternate_supported) { + if (d3d11_alternate_supported || (!d3d11_supported && alternate_supported)) { gint height = GST_VIDEO_INFO_HEIGHT (info); /* Set caps resolution with display size, that's how we designed @@ -1694,6 +1701,19 @@ state->caps = gst_video_info_to_caps (&state->info); + s = gst_caps_get_structure (input_state->caps, 0); + str = gst_structure_get_string (s, "mastering-display-info"); + if (str) { + gst_caps_set_simple (state->caps, + "mastering-display-info", G_TYPE_STRING, str, nullptr); + } + + str = gst_structure_get_string (s, "content-light-level"); + if (str) { + gst_caps_set_simple (state->caps, + "content-light-level", G_TYPE_STRING, str, nullptr); + } + g_clear_pointer (&decoder->output_state, gst_video_codec_state_unref); decoder->output_state = state; @@ -1834,6 +1854,10 @@ } GST_DEBUG_OBJECT (videodec, "Downstream min buffres: %d", min); + + /* We will not use downstream pool for decoding, and therefore preallocation + * is unnecessary. So, Non-zero min buffer will be a waste of GPU memory */ + min = 0; } gst_buffer_pool_set_config (pool, config);
View file
gst-plugins-bad-1.20.2.tar.xz/sys/d3d11/gstd3d11screencapture.cpp -> gst-plugins-bad-1.20.3.tar.xz/sys/d3d11/gstd3d11screencapture.cpp
Changed
@@ -280,7 +280,8 @@ texture_desc.BindFlags = D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE; texture_desc.CPUAccessFlags = 0; - texture_desc.MiscFlags = 0; + /* source element may hold different d3d11 device object */ + texture_desc.MiscFlags = D3D11_RESOURCE_MISC_SHARED; hr = device_handle->CreateTexture2D (&texture_desc, nullptr, &shared_texture_); @@ -295,7 +296,7 @@ } GstFlowReturn - Capture (gboolean draw_mouse) + Capture () { GstFlowReturn ret; bool timeout = false; @@ -314,14 +315,12 @@ return GST_FLOW_OK; } - if (draw_mouse) { - GST_TRACE ("Getting mouse pointer info"); - ret = GetMouse (&ptr_info_, &frame_info); - if (ret != GST_FLOW_OK) { - GST_WARNING ("Couldn't get mouse pointer info"); - dupl_->ReleaseFrame (); - return ret; - } + GST_TRACE ("Getting mouse pointer info"); + ret = GetMouse (&ptr_info_, &frame_info); + if (ret != GST_FLOW_OK) { + GST_WARNING ("Couldn't get mouse pointer info"); + dupl_->ReleaseFrame (); + return ret; } ret = ProcessFrame (texture.Get(), shared_texture_.Get(), @@ -344,7 +343,11 @@ return GST_FLOW_OK; } - bool DrawMouse (ID3D11RenderTargetView * rtv) + bool + DrawMouse (GstD3D11Device * device, ID3D11RenderTargetView * rtv, + ID3D11VertexShader * vs, ID3D11PixelShader * ps, + ID3D11InputLayout * layout, ID3D11SamplerState * sampler, + ID3D11BlendState * blend) { GST_TRACE ("Drawing mouse"); @@ -359,9 +362,9 @@ D3D11_SUBRESOURCE_DATA InitData; D3D11_TEXTURE2D_DESC Desc; D3D11_SHADER_RESOURCE_VIEW_DESC SDesc; - ID3D11Device *device_handle = gst_d3d11_device_get_device_handle (device_); + ID3D11Device *device_handle = gst_d3d11_device_get_device_handle (device); ID3D11DeviceContext *context_handle = - gst_d3d11_device_get_device_context_handle (device_); + gst_d3d11_device_get_device_context_handle (device); VERTEX VerticesNUMVERTICES = { @@ -462,7 +465,7 @@ // Create mouseshape as texture HRESULT hr = device_handle->CreateTexture2D(&Desc, &InitData, &MouseTex); - if (!gst_d3d11_result (hr, device_)) { + if (!gst_d3d11_result (hr, device)) { GST_ERROR ("Failed to create texture for rendering mouse"); return false; } @@ -470,7 +473,7 @@ // Create shader resource from texture hr = device_handle->CreateShaderResourceView(MouseTex.Get(), &SDesc, &ShaderRes); - if (!gst_d3d11_result (hr, device_)) { + if (!gst_d3d11_result (hr, device)) { GST_ERROR ("Failed to create shader resource view for rendering mouse"); return false; } @@ -487,7 +490,7 @@ // Create vertex buffer hr = device_handle->CreateBuffer(&BDesc, &InitData, &VertexBufferMouse); - if (!gst_d3d11_result (hr, device_)) { + if (!gst_d3d11_result (hr, device)) { GST_ERROR ("Failed to create vertex buffer for rendering mouse"); return false; } @@ -495,19 +498,27 @@ FLOAT BlendFactor4 = {0.f, 0.f, 0.f, 0.f}; UINT Stride = sizeof(VERTEX); UINT Offset = 0; - ID3D11SamplerState *samplers = sampler_.Get(); ID3D11ShaderResourceView *srv = ShaderRes.Get(); ID3D11Buffer *vert_buf = VertexBufferMouse.Get(); context_handle->IASetVertexBuffers(0, 1, &vert_buf, &Stride, &Offset); - context_handle->OMSetBlendState(blend_.Get(), BlendFactor, 0xFFFFFFFF); + context_handle->OMSetBlendState(blend, BlendFactor, 0xFFFFFFFF); context_handle->OMSetRenderTargets(1, &rtv, nullptr); - context_handle->VSSetShader(vs_.Get(), nullptr, 0); - context_handle->PSSetShader(ps_.Get(), nullptr, 0); + context_handle->VSSetShader(vs, nullptr, 0); + context_handle->PSSetShader(ps, nullptr, 0); context_handle->PSSetShaderResources(0, 1, &srv); - context_handle->PSSetSamplers(0, 1, &samplers); + context_handle->PSSetSamplers(0, 1, &sampler); context_handle->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST); - context_handle->IASetInputLayout(layout_.Get()); + context_handle->IASetInputLayout(layout); + + D3D11_VIEWPORT VP; + VP.Width = static_cast<FLOAT>(FullDesc.Width); + VP.Height = static_cast<FLOAT>(FullDesc.Height); + VP.MinDepth = 0.0f; + VP.MaxDepth = 1.0f; + VP.TopLeftX = 0.0f; + VP.TopLeftY = 0.0f; + context_handle->RSSetViewports(1, &VP); context_handle->Draw(NUMVERTICES, 0); @@ -522,14 +533,60 @@ return true; } - void - CopyToTexture (ID3D11Texture2D * texture) + GstFlowReturn + CopyToTexture (GstD3D11Device * device, ID3D11Texture2D * texture) { - ID3D11DeviceContext *context_handle = - gst_d3d11_device_get_device_context_handle (device_); + ID3D11DeviceContext *context_handle = nullptr; + ComPtr <ID3D11Texture2D> tex; + ComPtr < ID3D11Query > query; + HRESULT hr; + + context_handle = gst_d3d11_device_get_device_context_handle (device); + + if (device == device_) { + tex = shared_texture_; + } else { + ID3D11Device *device_handle = nullptr; + ComPtr < IDXGIResource > dxgi_resource; + D3D11_QUERY_DESC query_desc; + HANDLE shared_handle; + + device_handle = gst_d3d11_device_get_device_handle (device); + + hr = shared_texture_.As (&dxgi_resource); + if (!gst_d3d11_result (hr, device_)) + return GST_FLOW_ERROR; + + hr = dxgi_resource->GetSharedHandle (&shared_handle); + if (!gst_d3d11_result (hr, device_)) + return GST_FLOW_ERROR; + + hr = device_handle->OpenSharedResource (shared_handle, + IID_PPV_ARGS (&tex)); + if (!gst_d3d11_result (hr, device)) + return GST_FLOW_ERROR; + + query_desc.Query = D3D11_QUERY_EVENT; + query_desc.MiscFlags = 0; + + hr = device_handle->CreateQuery (&query_desc, &query); + if (!gst_d3d11_result (hr, device)) + return GST_FLOW_ERROR; + } context_handle->CopySubresourceRegion (texture, 0, 0, 0, 0, - shared_texture_.Get(), 0, nullptr); + tex.Get(), 0, nullptr); + + if (query) { + BOOL sync_done = FALSE; + + do { + hr = context_handle->GetData (query.Get (), + &sync_done, sizeof (BOOL), 0); + } while (!sync_done && (hr == S_OK || hr == S_FALSE)); + } + + return GST_FLOW_OK; } void @@ -619,33 +676,11 @@ return false; } - /* For blending mouse pointer texture */ - D3D11_BLEND_DESC blend_desc; - blend_desc.AlphaToCoverageEnable = FALSE; - blend_desc.IndependentBlendEnable = FALSE; - blend_desc.RenderTarget0.BlendEnable = TRUE; - blend_desc.RenderTarget0.SrcBlend = D3D11_BLEND_SRC_ALPHA; - blend_desc.RenderTarget0.DestBlend = D3D11_BLEND_INV_SRC_ALPHA; - blend_desc.RenderTarget0.BlendOp = D3D11_BLEND_OP_ADD; - blend_desc.RenderTarget0.SrcBlendAlpha = D3D11_BLEND_ONE; - blend_desc.RenderTarget0.DestBlendAlpha = D3D11_BLEND_ZERO; - blend_desc.RenderTarget0.BlendOpAlpha = D3D11_BLEND_OP_ADD; - blend_desc.RenderTarget0.RenderTargetWriteMask = - D3D11_COLOR_WRITE_ENABLE_ALL; - - ComPtr<ID3D11BlendState> blend; - hr = device_handle->CreateBlendState (&blend_desc, &blend); - if (!gst_d3d11_result (hr, device)) { - GST_ERROR ("Failed to create blend state, hr 0x%x", (guint) hr); - return false; - } - /* Everything is prepared now */ vs_ = vs; ps_ = ps; layout_ = layout; sampler_ = sampler; - blend_ = blend; return true; } @@ -726,10 +761,6 @@ ptr_info->LastTimeStamp = frame_info->LastMouseUpdateTime; ptr_info->Visible = frame_info->PointerPosition.Visible != 0; - /* Mouse is invisible */ - if (!ptr_info->Visible) - return GST_FLOW_OK; - /* No new shape */ if (frame_info->PointerShapeBufferSize == 0) return GST_FLOW_OK; @@ -737,7 +768,9 @@ /* Realloc buffer if needed */ ptr_info->MaybeReallocBuffer (frame_info->PointerShapeBufferSize); - /* Get shape */ + /* Must always get shape of cursor, even if not drawn at the moment. + * Shape of cursor is not repeated by the AcquireNextFrame and can be + * requested to be drawn any time later */ UINT dummy; HRESULT hr = dupl_->GetFramePointerShape(frame_info->PointerShapeBufferSize, (void *) ptr_info->PtrShapeBuffer, &dummy, &ptr_info->shape_info); @@ -1436,7 +1469,6 @@ ComPtr<ID3D11InputLayout> layout_; ComPtr<ID3D11SamplerState> sampler_; ComPtr<IDXGIOutputDuplication> dupl_; - ComPtr<ID3D11BlendState> blend_; /* frame metadata */ BYTE *metadata_buffer_; @@ -1470,6 +1502,7 @@ HMONITOR monitor_handle; RECT desktop_coordinates; gboolean prepared; + gint64 adapter_luid; GRecMutex lock; }; @@ -1614,6 +1647,8 @@ self->desktop_coordinates.right, self->desktop_coordinates.bottom, self->cached_width, self->cached_height); + g_object_get (self->device, "adapter-luid", &self->adapter_luid, nullptr); + ret = TRUE; out: @@ -1789,16 +1824,33 @@ GstFlowReturn gst_d3d11_screen_capture_do_capture (GstD3D11ScreenCapture * capture, - ID3D11Texture2D * texture, ID3D11RenderTargetView * rtv, - gboolean draw_mouse) + GstD3D11Device * device, ID3D11Texture2D * texture, + ID3D11RenderTargetView * rtv, ID3D11VertexShader * vs, + ID3D11PixelShader * ps, ID3D11InputLayout * layout, + ID3D11SamplerState * sampler, ID3D11BlendState * blend, gboolean draw_mouse) { GstFlowReturn ret = GST_FLOW_OK; D3D11_TEXTURE2D_DESC desc; + gboolean shared_device = FALSE; guint width, height; g_return_val_if_fail (GST_IS_D3D11_SCREEN_CAPTURE (capture), GST_FLOW_ERROR); g_return_val_if_fail (texture != nullptr, GST_FLOW_ERROR); + if (device != capture->device) { + gint64 luid; + + g_object_get (device, "adapter-luid", &luid, nullptr); + /* source element must hold d3d11 device for the same GPU already + * by DXGI duplication API design */ + if (luid != capture->adapter_luid) { + GST_ERROR_OBJECT (capture, "Trying to capture from different device"); + return GST_FLOW_ERROR; + } + + shared_device = TRUE; + } + g_rec_mutex_lock (&capture->lock); if (!capture->prepared) ret = gst_d3d11_screen_capture_prepare (capture); @@ -1822,7 +1874,7 @@ } gst_d3d11_device_lock (capture->device); - ret = capture->dupl_obj->Capture (draw_mouse); + ret = capture->dupl_obj->Capture (); if (ret != GST_FLOW_OK) { gst_d3d11_device_unlock (capture->device); @@ -1842,14 +1894,24 @@ } GST_LOG_OBJECT (capture, "Capture done"); + if (shared_device) + gst_d3d11_device_lock (device); + + ret = capture->dupl_obj->CopyToTexture (device, texture); + if (ret != GST_FLOW_OK) + goto out; - capture->dupl_obj->CopyToTexture (texture); if (draw_mouse) - capture->dupl_obj->DrawMouse (rtv); + capture->dupl_obj->DrawMouse (device, rtv, vs, ps, layout, sampler, blend); + +out: + if (shared_device) + gst_d3d11_device_unlock (device); + gst_d3d11_device_unlock (capture->device); g_rec_mutex_unlock (&capture->lock); - return GST_FLOW_OK; + return ret; } HRESULT
View file
gst-plugins-bad-1.20.2.tar.xz/sys/d3d11/gstd3d11screencapture.h -> gst-plugins-bad-1.20.3.tar.xz/sys/d3d11/gstd3d11screencapture.h
Changed
@@ -44,8 +44,14 @@ guint * height); GstFlowReturn gst_d3d11_screen_capture_do_capture (GstD3D11ScreenCapture * capture, + GstD3D11Device * device, ID3D11Texture2D * texture, - ID3D11RenderTargetView *rtv, + ID3D11RenderTargetView * rtv, + ID3D11VertexShader * vs, + ID3D11PixelShader * ps, + ID3D11InputLayout * layout, + ID3D11SamplerState * sampler, + ID3D11BlendState * blend, gboolean draw_mouse); HRESULT gst_d3d11_screen_capture_find_output_for_monitor (HMONITOR monitor,
View file
gst-plugins-bad-1.20.2.tar.xz/sys/d3d11/gstd3d11screencapturesrc.cpp -> gst-plugins-bad-1.20.3.tar.xz/sys/d3d11/gstd3d11screencapturesrc.cpp
Changed
@@ -39,6 +39,7 @@ #include "gstd3d11screencapturesrc.h" #include "gstd3d11screencapture.h" #include "gstd3d11pluginutils.h" +#include "gstd3d11shader.h" #include <wrl.h> #include <string.h> @@ -92,6 +93,12 @@ GstClockTime max_latency; gboolean downstream_supports_d3d11; + + ID3D11VertexShader *vs; + ID3D11PixelShader *ps; + ID3D11InputLayout *layout; + ID3D11SamplerState *sampler; + ID3D11BlendState *blend; }; static void gst_d3d11_screen_capture_src_dispose (GObject * object); @@ -504,6 +511,118 @@ } static gboolean +gst_d3d11_screen_capture_prepare_shader (GstD3D11ScreenCaptureSrc * self) +{ + /* *INDENT-OFF* */ + static const gchar vs_str = + "struct VS_INPUT {\n" + " float4 Position: POSITION;\n" + " float2 Texture: TEXCOORD;\n" + "};\n" + "\n" + "struct VS_OUTPUT {\n" + " float4 Position: SV_POSITION;\n" + " float2 Texture: TEXCOORD;\n" + "};\n" + "\n" + "VS_OUTPUT main (VS_INPUT input)\n" + "{\n" + " return input;\n" + "}"; + static const gchar ps_str = + "Texture2D shaderTexture;\n" + "SamplerState samplerState;\n" + "\n" + "struct PS_INPUT {\n" + " float4 Position: SV_POSITION;\n" + " float2 Texture: TEXCOORD;\n" + "};\n" + "\n" + "struct PS_OUTPUT {\n" + " float4 Plane: SV_Target;\n" + "};\n" + "\n" + "PS_OUTPUT main(PS_INPUT input)\n" + "{\n" + " PS_OUTPUT output;\n" + " output.Plane = shaderTexture.Sample(samplerState, input.Texture);\n" + " return output;\n" + "}"; + /* *INDENT-ON* */ + D3D11_INPUT_ELEMENT_DESC input_desc = { + {"POSITION", + 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0}, + {"TEXCOORD", + 0, DXGI_FORMAT_R32G32_FLOAT, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0} + }; + ComPtr < ID3D11VertexShader > vs; + ComPtr < ID3D11InputLayout > layout; + ComPtr < ID3D11PixelShader > ps; + ComPtr < ID3D11SamplerState > sampler; + ComPtr < ID3D11BlendState > blend; + D3D11_SAMPLER_DESC sampler_desc; + D3D11_BLEND_DESC blend_desc; + ID3D11Device *device_handle; + HRESULT hr; + + device_handle = gst_d3d11_device_get_device_handle (self->device); + + if (!gst_d3d11_create_vertex_shader (self->device, + vs_str, input_desc, G_N_ELEMENTS (input_desc), &vs, &layout)) { + GST_ERROR_OBJECT (self, "Failed to create vertex shader"); + return FALSE; + } + + if (!gst_d3d11_create_pixel_shader (self->device, ps_str, &ps)) { + GST_ERROR_OBJECT (self, "Failed to create pixel shader"); + return FALSE; + } + + memset (&sampler_desc, 0, sizeof (D3D11_SAMPLER_DESC)); + sampler_desc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR; + sampler_desc.AddressU = D3D11_TEXTURE_ADDRESS_CLAMP; + sampler_desc.AddressV = D3D11_TEXTURE_ADDRESS_CLAMP; + sampler_desc.AddressW = D3D11_TEXTURE_ADDRESS_CLAMP; + sampler_desc.ComparisonFunc = D3D11_COMPARISON_NEVER; + sampler_desc.MinLOD = 0; + sampler_desc.MaxLOD = D3D11_FLOAT32_MAX; + + hr = device_handle->CreateSamplerState (&sampler_desc, &sampler); + if (!gst_d3d11_result (hr, self->device)) { + GST_ERROR_OBJECT (self, + "Failed to create sampler state, hr 0x%x", (guint) hr); + return FALSE; + } + + blend_desc.AlphaToCoverageEnable = FALSE; + blend_desc.IndependentBlendEnable = FALSE; + blend_desc.RenderTarget0.BlendEnable = TRUE; + blend_desc.RenderTarget0.SrcBlend = D3D11_BLEND_SRC_ALPHA; + blend_desc.RenderTarget0.DestBlend = D3D11_BLEND_INV_SRC_ALPHA; + blend_desc.RenderTarget0.BlendOp = D3D11_BLEND_OP_ADD; + blend_desc.RenderTarget0.SrcBlendAlpha = D3D11_BLEND_ONE; + blend_desc.RenderTarget0.DestBlendAlpha = D3D11_BLEND_ZERO; + blend_desc.RenderTarget0.BlendOpAlpha = D3D11_BLEND_OP_ADD; + blend_desc.RenderTarget0.RenderTargetWriteMask = + D3D11_COLOR_WRITE_ENABLE_ALL; + + hr = device_handle->CreateBlendState (&blend_desc, &blend); + if (!gst_d3d11_result (hr, self->device)) { + GST_ERROR_OBJECT (self, + "Failed to create blend state, hr 0x%x", (guint) hr); + return FALSE; + } + + self->vs = vs.Detach (); + self->ps = ps.Detach (); + self->layout = layout.Detach (); + self->sampler = sampler.Detach (); + self->blend = blend.Detach (); + + return TRUE; +} + +static gboolean gst_d3d11_screen_capture_src_start (GstBaseSrc * bsrc) { GstD3D11ScreenCaptureSrc *self = GST_D3D11_SCREEN_CAPTURE_SRC (bsrc); @@ -559,6 +678,9 @@ goto error; } + if (!gst_d3d11_screen_capture_prepare_shader (self)) + goto error; + self->last_frame_no = -1; self->min_latency = self->max_latency = GST_CLOCK_TIME_NONE; @@ -594,6 +716,12 @@ gst_clear_object (&self->pool); } + GST_D3D11_CLEAR_COM (self->vs); + GST_D3D11_CLEAR_COM (self->ps); + GST_D3D11_CLEAR_COM (self->layout); + GST_D3D11_CLEAR_COM (self->sampler); + GST_D3D11_CLEAR_COM (self->blend); + gst_clear_object (&self->capture); gst_clear_object (&self->device); @@ -807,9 +935,9 @@ texture = (ID3D11Texture2D *) info.data; before_capture = gst_clock_get_time (clock); - ret = - gst_d3d11_screen_capture_do_capture (self->capture, texture, rtv, - draw_mouse); + ret = gst_d3d11_screen_capture_do_capture (self->capture, self->device, + texture, rtv, self->vs, self->ps, self->layout, self->sampler, + self->blend, draw_mouse); gst_memory_unmap (mem, &info); switch (ret) {
View file
gst-plugins-bad-1.20.2.tar.xz/sys/msdk/meson.build -> gst-plugins-bad-1.20.3.tar.xz/sys/msdk/meson.build
Changed
@@ -100,7 +100,7 @@ if use_onevpl or cxx.has_header('mfxvp9.h', args: '-I' + mfx_incdir) msdk_sources += 'gstmsdkvp9dec.c' - cdata.set10('USE_MSDK_VP9_DEC', 1) + cdata.set('USE_MSDK_VP9_DEC', 1) endif # Usually MFX_VERSION 1026+ is required to support raw VP9 stream, however Fedora 30 has MFX_VERSION==1026 @@ -120,7 +120,7 @@ if have_mfx_ver126 msdk_sources += 'gstmsdkvp9enc.c' - cdata.set10('USE_MSDK_VP9_ENC', 1) + cdata.set('USE_MSDK_VP9_ENC', 1) endif mfx_ver134_check_code = ''' @@ -135,7 +135,7 @@ if have_mfx_ver134 msdk_sources += 'gstmsdkav1dec.c' - cdata.set10('USE_MSDK_AV1_DEC', 1) + cdata.set('USE_MSDK_AV1_DEC', 1) endif if host_machine.system() == 'windows'
View file
gst-plugins-bad-1.20.2.tar.xz/sys/nvcodec/cuda-converter.c -> gst-plugins-bad-1.20.3.tar.xz/sys/nvcodec/cuda-converter.c
Changed
@@ -184,10 +184,10 @@ /* CUDA kernel source for from YUV to YUV conversion and scale */ static const gchar templ_YUV_TO_YUV = "extern \"C\"{\n" -"__constant__ float SCALE_H = %f;\n" -"__constant__ float SCALE_V = %f;\n" -"__constant__ float CHROMA_SCALE_H = %f;\n" -"__constant__ float CHROMA_SCALE_V = %f;\n" +"__constant__ float SCALE_H = %s;\n" +"__constant__ float SCALE_V = %s;\n" +"__constant__ float CHROMA_SCALE_H = %s;\n" +"__constant__ float CHROMA_SCALE_V = %s;\n" "__constant__ int WIDTH = %d;\n" "__constant__ int HEIGHT = %d;\n" "__constant__ int CHROMA_WIDTH = %d;\n" @@ -274,15 +274,15 @@ /* CUDA kernel source for from YUV to RGB conversion and scale */ static const gchar templ_YUV_TO_RGB = "extern \"C\"{\n" -"__constant__ float offset3 = {%f, %f, %f};\n" -"__constant__ float rcoeff3 = {%f, %f, %f};\n" -"__constant__ float gcoeff3 = {%f, %f, %f};\n" -"__constant__ float bcoeff3 = {%f, %f, %f};\n" +"__constant__ float offset3 = {%s, %s, %s};\n" +"__constant__ float rcoeff3 = {%s, %s, %s};\n" +"__constant__ float gcoeff3 = {%s, %s, %s};\n" +"__constant__ float bcoeff3 = {%s, %s, %s};\n" "\n" -"__constant__ float SCALE_H = %f;\n" -"__constant__ float SCALE_V = %f;\n" -"__constant__ float CHROMA_SCALE_H = %f;\n" -"__constant__ float CHROMA_SCALE_V = %f;\n" +"__constant__ float SCALE_H = %s;\n" +"__constant__ float SCALE_V = %s;\n" +"__constant__ float CHROMA_SCALE_H = %s;\n" +"__constant__ float CHROMA_SCALE_V = %s;\n" "__constant__ int WIDTH = %d;\n" "__constant__ int HEIGHT = %d;\n" "__constant__ int CHROMA_WIDTH = %d;\n" @@ -489,15 +489,15 @@ /* CUDA kernel source for from RGB to YUV conversion and scale */ static const gchar templ_RGB_TO_YUV = "extern \"C\"{\n" -"__constant__ float offset3 = {%f, %f, %f};\n" -"__constant__ float ycoeff3 = {%f, %f, %f};\n" -"__constant__ float ucoeff3 = {%f, %f, %f};\n" -"__constant__ float vcoeff3 = {%f, %f, %f};\n" +"__constant__ float offset3 = {%s, %s, %s};\n" +"__constant__ float ycoeff3 = {%s, %s, %s};\n" +"__constant__ float ucoeff3 = {%s, %s, %s};\n" +"__constant__ float vcoeff3 = {%s, %s, %s};\n" "\n" -"__constant__ float SCALE_H = %f;\n" -"__constant__ float SCALE_V = %f;\n" -"__constant__ float CHROMA_SCALE_H = %f;\n" -"__constant__ float CHROMA_SCALE_V = %f;\n" +"__constant__ float SCALE_H = %s;\n" +"__constant__ float SCALE_V = %s;\n" +"__constant__ float CHROMA_SCALE_H = %s;\n" +"__constant__ float CHROMA_SCALE_V = %s;\n" "__constant__ int WIDTH = %d;\n" "__constant__ int HEIGHT = %d;\n" "__constant__ int CHROMA_WIDTH = %d;\n" @@ -635,8 +635,8 @@ /* CUDA kernel source for from RGB to RGB conversion and scale */ static const gchar templ_RGB_to_RGB = "extern \"C\"{\n" -"__constant__ float SCALE_H = %f;\n" -"__constant__ float SCALE_V = %f;\n" +"__constant__ float SCALE_H = %s;\n" +"__constant__ float SCALE_V = %s;\n" "__constant__ int WIDTH = %d;\n" "__constant__ int HEIGHT = %d;\n" "__constant__ int IN_DEPTH = %d;\n" @@ -1752,55 +1752,101 @@ cuda_converter_generate_yuv_to_yuv_kernel_code (GstCudaConverter * convert, GstCudaKernelTempl * templ) { - return g_strdup_printf (templ_YUV_TO_YUV, - templ->scale_h, templ->scale_v, templ->chroma_scale_h, - templ->chroma_scale_v, templ->width, templ->height, templ->chroma_width, - templ->chroma_height, templ->in_depth, templ->out_depth, templ->pstride, - templ->chroma_pstride, templ->in_shift, templ->out_shift, templ->mask, - templ->swap_uv, templ->read_chroma, templ->write_chroma); + gchar scale_h_strG_ASCII_DTOSTR_BUF_SIZE; + gchar scale_v_strG_ASCII_DTOSTR_BUF_SIZE; + gchar chroma_scale_h_strG_ASCII_DTOSTR_BUF_SIZE; + gchar chroma_scale_v_strG_ASCII_DTOSTR_BUF_SIZE; + g_ascii_formatd (scale_h_str, G_ASCII_DTOSTR_BUF_SIZE, "%f", templ->scale_h); + g_ascii_formatd (scale_v_str, G_ASCII_DTOSTR_BUF_SIZE, "%f", templ->scale_v); + g_ascii_formatd (chroma_scale_h_str, G_ASCII_DTOSTR_BUF_SIZE, "%f", + templ->chroma_scale_h); + g_ascii_formatd (chroma_scale_v_str, G_ASCII_DTOSTR_BUF_SIZE, "%f", + templ->chroma_scale_v); + return g_strdup_printf (templ_YUV_TO_YUV, scale_h_str, scale_v_str, + chroma_scale_h_str, chroma_scale_v_str, templ->width, templ->height, + templ->chroma_width, templ->chroma_height, templ->in_depth, + templ->out_depth, templ->pstride, templ->chroma_pstride, templ->in_shift, + templ->out_shift, templ->mask, templ->swap_uv, templ->read_chroma, + templ->write_chroma); } static gchar * cuda_converter_generate_yuv_to_rgb_kernel_code (GstCudaConverter * convert, GstCudaKernelTempl * templ, MatrixData * matrix) { - return g_strdup_printf (templ_YUV_TO_RGB, - matrix->dm03, matrix->dm13, matrix->dm23, - matrix->dm00, matrix->dm01, matrix->dm02, - matrix->dm10, matrix->dm11, matrix->dm12, - matrix->dm20, matrix->dm21, matrix->dm22, - templ->scale_h, templ->scale_v, templ->chroma_scale_h, - templ->chroma_scale_v, templ->width, templ->height, templ->chroma_width, - templ->chroma_height, templ->in_depth, templ->out_depth, templ->pstride, - templ->chroma_pstride, templ->in_shift, templ->out_shift, templ->mask, - templ->swap_uv, templ->max_in_val, templ->rgb_order.R, - templ->rgb_order.G, templ->rgb_order.B, templ->rgb_order.A, - templ->rgb_order.X, templ->read_chroma); + gchar matrix_dm44G_ASCII_DTOSTR_BUF_SIZE; + gchar scale_h_strG_ASCII_DTOSTR_BUF_SIZE; + gchar scale_v_strG_ASCII_DTOSTR_BUF_SIZE; + gchar chroma_scale_h_strG_ASCII_DTOSTR_BUF_SIZE; + gchar chroma_scale_v_strG_ASCII_DTOSTR_BUF_SIZE; + gint i, j; + for (i = 0; i < 4; i++) { + for (j = 0; j < 4; j++) { + g_ascii_formatd (matrix_dmij, G_ASCII_DTOSTR_BUF_SIZE, "%f", + matrix->dmij); + } + } + g_ascii_formatd (scale_h_str, G_ASCII_DTOSTR_BUF_SIZE, "%f", templ->scale_h); + g_ascii_formatd (scale_v_str, G_ASCII_DTOSTR_BUF_SIZE, "%f", templ->scale_v); + g_ascii_formatd (chroma_scale_h_str, G_ASCII_DTOSTR_BUF_SIZE, "%f", + templ->chroma_scale_h); + g_ascii_formatd (chroma_scale_v_str, G_ASCII_DTOSTR_BUF_SIZE, "%f", + templ->chroma_scale_v); + return g_strdup_printf (templ_YUV_TO_RGB, matrix_dm03, matrix_dm13, + matrix_dm23, matrix_dm00, matrix_dm01, matrix_dm02, + matrix_dm10, matrix_dm11, matrix_dm12, matrix_dm20, + matrix_dm21, matrix_dm22, scale_h_str, scale_v_str, + chroma_scale_h_str, chroma_scale_v_str, templ->width, templ->height, + templ->chroma_width, templ->chroma_height, templ->in_depth, + templ->out_depth, templ->pstride, templ->chroma_pstride, templ->in_shift, + templ->out_shift, templ->mask, templ->swap_uv, templ->max_in_val, + templ->rgb_order.R, templ->rgb_order.G, templ->rgb_order.B, + templ->rgb_order.A, templ->rgb_order.X, templ->read_chroma); } static gchar * cuda_converter_generate_rgb_to_yuv_kernel_code (GstCudaConverter * convert, GstCudaKernelTempl * templ, MatrixData * matrix) { - return g_strdup_printf (templ_RGB_TO_YUV, - matrix->dm03, matrix->dm13, matrix->dm23, - matrix->dm00, matrix->dm01, matrix->dm02, - matrix->dm10, matrix->dm11, matrix->dm12, - matrix->dm20, matrix->dm21, matrix->dm22, - templ->scale_h, templ->scale_v, templ->chroma_scale_h, - templ->chroma_scale_v, templ->width, templ->height, templ->chroma_width, - templ->chroma_height, templ->in_depth, templ->out_depth, templ->pstride, - templ->chroma_pstride, templ->in_shift, templ->out_shift, templ->mask, - templ->swap_uv, templ->unpack_function, templ->read_chroma, - templ->write_chroma); + gchar matrix_dm44G_ASCII_DTOSTR_BUF_SIZE; + gchar scale_h_strG_ASCII_DTOSTR_BUF_SIZE; + gchar scale_v_strG_ASCII_DTOSTR_BUF_SIZE; + gchar chroma_scale_h_strG_ASCII_DTOSTR_BUF_SIZE; + gchar chroma_scale_v_strG_ASCII_DTOSTR_BUF_SIZE; + gint i, j; + for (i = 0; i < 4; i++) { + for (j = 0; j < 4; j++) { + g_ascii_formatd (matrix_dmij, G_ASCII_DTOSTR_BUF_SIZE, "%f", + matrix->dmij); + } + } + g_ascii_formatd (scale_h_str, G_ASCII_DTOSTR_BUF_SIZE, "%f", templ->scale_h); + g_ascii_formatd (scale_v_str, G_ASCII_DTOSTR_BUF_SIZE, "%f", templ->scale_v); + g_ascii_formatd (chroma_scale_h_str, G_ASCII_DTOSTR_BUF_SIZE, "%f", + templ->chroma_scale_h); + g_ascii_formatd (chroma_scale_v_str, G_ASCII_DTOSTR_BUF_SIZE, "%f", + templ->chroma_scale_v); + return g_strdup_printf (templ_RGB_TO_YUV, matrix_dm03, matrix_dm13, + matrix_dm23, matrix_dm00, matrix_dm01, matrix_dm02, + matrix_dm10, matrix_dm11, matrix_dm12, matrix_dm20, + matrix_dm21, matrix_dm22, scale_h_str, scale_v_str, + chroma_scale_h_str, chroma_scale_v_str, templ->width, templ->height, + templ->chroma_width, templ->chroma_height, templ->in_depth, + templ->out_depth, templ->pstride, templ->chroma_pstride, templ->in_shift, + templ->out_shift, templ->mask, templ->swap_uv, templ->unpack_function, + templ->read_chroma, templ->write_chroma); } static gchar * cuda_converter_generate_rgb_to_rgb_kernel_code (GstCudaConverter * convert, GstCudaKernelTempl * templ) { + gchar scale_h_strG_ASCII_DTOSTR_BUF_SIZE; + gchar scale_v_strG_ASCII_DTOSTR_BUF_SIZE; + g_ascii_formatd (scale_h_str, G_ASCII_DTOSTR_BUF_SIZE, "%f", templ->scale_h); + g_ascii_formatd (scale_v_str, G_ASCII_DTOSTR_BUF_SIZE, "%f", templ->scale_v); return g_strdup_printf (templ_RGB_to_RGB, - templ->scale_h, templ->scale_v, + scale_h_str, scale_v_str, templ->width, templ->height, templ->in_depth, templ->out_depth, templ->pstride, templ->rgb_order.R, templ->rgb_order.G,
View file
gst-plugins-bad-1.20.2.tar.xz/sys/nvcodec/gstnvh264dec.c -> gst-plugins-bad-1.20.3.tar.xz/sys/nvcodec/gstnvh264dec.c
Changed
@@ -125,7 +125,6 @@ G_DEFINE_TYPE (GstNvH264Dec, gst_nv_h264_dec, GST_TYPE_H264_DECODER); static void gst_nv_h264_decoder_dispose (GObject * object); -static void gst_nv_h264_decoder_finalize (GObject * object); static void gst_nv_h264_dec_set_context (GstElement * element, GstContext * context); static gboolean gst_nv_h264_dec_open (GstVideoDecoder * decoder); @@ -171,7 +170,6 @@ */ object_class->dispose = gst_nv_h264_decoder_dispose; - object_class->finalize = gst_nv_h264_decoder_finalize; element_class->set_context = GST_DEBUG_FUNCPTR (gst_nv_h264_dec_set_context); @@ -225,17 +223,6 @@ } static void -gst_nv_h264_decoder_finalize (GObject * object) -{ - GstNvH264Dec *self = GST_NV_H264_DEC (object); - - g_free (self->bitstream_buffer); - g_free (self->slice_offsets); - - G_OBJECT_CLASS (parent_class)->finalize (object); -} - -static void gst_nv_h264_dec_set_context (GstElement * element, GstContext * context) { GstNvH264Dec *self = GST_NV_H264_DEC (element); @@ -304,6 +291,12 @@ gst_clear_object (&self->decoder); gst_clear_object (&self->context); + g_clear_pointer (&self->bitstream_buffer, g_free); + g_clear_pointer (&self->slice_offsets, g_free); + + self->bitstream_buffer_alloc_size = 0; + self->slice_offsets_alloc_len = 0; + return TRUE; } @@ -821,8 +814,10 @@ GST_LOG_OBJECT (self, "Decode slice, nalu size %u", slice->nalu.size); if (self->slice_offsets_alloc_len < self->num_slices + 1) { + self->slice_offsets_alloc_len = 2 * (self->num_slices + 1); + self->slice_offsets = (guint *) g_realloc_n (self->slice_offsets, - self->num_slices + 1, sizeof (guint)); + self->slice_offsets_alloc_len, sizeof (guint)); } self->slice_offsetsself->num_slices = self->bitstream_buffer_offset; GST_LOG_OBJECT (self, "Slice offset %u for slice %d", @@ -832,8 +827,10 @@ new_size = self->bitstream_buffer_offset + slice->nalu.size + 3; if (self->bitstream_buffer_alloc_size < new_size) { - self->bitstream_buffer = - (guint8 *) g_realloc (self->bitstream_buffer, new_size); + self->bitstream_buffer_alloc_size = 2 * new_size; + + self->bitstream_buffer = (guint8 *) g_realloc (self->bitstream_buffer, + self->bitstream_buffer_alloc_size); } self->bitstream_bufferself->bitstream_buffer_offset = 0;
View file
gst-plugins-bad-1.20.2.tar.xz/sys/nvcodec/gstnvh265dec.c -> gst-plugins-bad-1.20.3.tar.xz/sys/nvcodec/gstnvh265dec.c
Changed
@@ -119,7 +119,6 @@ #define gst_nv_h265_dec_parent_class parent_class G_DEFINE_TYPE (GstNvH265Dec, gst_nv_h265_dec, GST_TYPE_H265_DECODER); -static void gst_nv_h265_decoder_finalize (GObject * object); static void gst_nv_h265_dec_set_context (GstElement * element, GstContext * context); static gboolean gst_nv_h265_dec_open (GstVideoDecoder * decoder); @@ -148,7 +147,6 @@ static void gst_nv_h265_dec_class_init (GstNvH265DecClass * klass) { - GObjectClass *object_class = G_OBJECT_CLASS (klass); GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstVideoDecoderClass *decoder_class = GST_VIDEO_DECODER_CLASS (klass); GstH265DecoderClass *h265decoder_class = GST_H265_DECODER_CLASS (klass); @@ -159,8 +157,6 @@ * Since: 1.18 */ - object_class->finalize = gst_nv_h265_decoder_finalize; - element_class->set_context = GST_DEBUG_FUNCPTR (gst_nv_h265_dec_set_context); decoder_class->open = GST_DEBUG_FUNCPTR (gst_nv_h265_dec_open); @@ -195,17 +191,6 @@ } static void -gst_nv_h265_decoder_finalize (GObject * object) -{ - GstNvH265Dec *self = GST_NV_H265_DEC (object); - - g_free (self->bitstream_buffer); - g_free (self->slice_offsets); - - G_OBJECT_CLASS (parent_class)->finalize (object); -} - -static void gst_nv_h265_dec_set_context (GstElement * element, GstContext * context) { GstNvH265Dec *self = GST_NV_H265_DEC (element); @@ -258,6 +243,12 @@ gst_clear_object (&self->decoder); gst_clear_object (&self->context); + g_clear_pointer (&self->bitstream_buffer, g_free); + g_clear_pointer (&self->slice_offsets, g_free); + + self->bitstream_buffer_alloc_size = 0; + self->slice_offsets_alloc_len = 0; + return TRUE; } @@ -870,8 +861,10 @@ GST_LOG_OBJECT (self, "Decode slice, nalu size %u", slice->nalu.size); if (self->slice_offsets_alloc_len < self->num_slices + 1) { + self->slice_offsets_alloc_len = 2 * (self->num_slices + 1); + self->slice_offsets = (guint *) g_realloc_n (self->slice_offsets, - self->num_slices + 1, sizeof (guint)); + self->slice_offsets_alloc_len, sizeof (guint)); } self->slice_offsetsself->num_slices = self->bitstream_buffer_offset; GST_LOG_OBJECT (self, "Slice offset %u for slice %d", @@ -881,8 +874,10 @@ new_size = self->bitstream_buffer_offset + slice->nalu.size + 3; if (self->bitstream_buffer_alloc_size < new_size) { - self->bitstream_buffer = - (guint8 *) g_realloc (self->bitstream_buffer, new_size); + self->bitstream_buffer_alloc_size = 2 * new_size; + + self->bitstream_buffer = (guint8 *) g_realloc (self->bitstream_buffer, + self->bitstream_buffer_alloc_size); } self->bitstream_bufferself->bitstream_buffer_offset = 0;
View file
gst-plugins-bad-1.20.2.tar.xz/tests/check/elements/webrtcbin.c -> gst-plugins-bad-1.20.3.tar.xz/tests/check/elements/webrtcbin.c
Changed
@@ -4371,6 +4371,74 @@ GST_END_TEST; +static void +add_media_line (struct test_webrtc *t, GstElement * element, + GstWebRTCSessionDescription * desc, gpointer user_data) +{ + GstSDPMedia *media = NULL; + const GstSDPMedia *existing_media; + GstSDPResult res; + + existing_media = gst_sdp_message_get_media (desc->sdp, 0); + + res = gst_sdp_media_copy (existing_media, &media); + fail_unless (res == GST_SDP_OK); + res = gst_sdp_message_add_media (desc->sdp, media); + fail_unless (res == GST_SDP_OK); + gst_sdp_media_free (media); +} + +static void +on_answer_set_rejected (struct test_webrtc *t, GstElement * element, + GstPromise * promise, gpointer user_data) +{ + const GstStructure *s; + GError *error = NULL; + GError *compare_error = user_data; + + s = gst_promise_get_reply (promise); + fail_unless (s != NULL); + gst_structure_get (s, "error", G_TYPE_ERROR, &error, NULL); + fail_unless (g_error_matches (error, compare_error->domain, + compare_error->code)); + fail_unless_equals_string (compare_error->message, error->message); + g_clear_error (&error); +} + +GST_START_TEST (test_invalid_add_media_in_answer) +{ + struct test_webrtc *t = create_audio_test (); + VAL_SDP_INIT (no_duplicate_payloads, on_sdp_media_no_duplicate_payloads, + NULL, NULL); + guint media_format_count = { 1 }; + VAL_SDP_INIT (media_formats, on_sdp_media_count_formats, + media_format_count, &no_duplicate_payloads); + VAL_SDP_INIT (count, _count_num_sdp_media, GUINT_TO_POINTER (1), + &media_formats); + const gchar *expected_offer_setup = { "actpass", }; + VAL_SDP_INIT (offer_setup, on_sdp_media_setup, expected_offer_setup, &count); + const gchar *expected_offer_direction = { "sendrecv", }; + VAL_SDP_INIT (offer, on_sdp_media_direction, expected_offer_direction, + &offer_setup); + VAL_SDP_INIT (answer, add_media_line, NULL, NULL); + GError answer_set_error = { GST_WEBRTC_ERROR, + GST_WEBRTC_ERROR_SDP_SYNTAX_ERROR, + (gchar *) "Answer doesn't have the same number of m-lines as the offer." + }; + + /* Ensure that if the answer has more m-lines than the offer, it gets + * rejected. + */ + + t->on_answer_set = on_answer_set_rejected; + t->answer_set_data = &answer_set_error; + + test_validate_sdp (t, &offer, &answer); + test_webrtc_free (t); +} + +GST_END_TEST; + static Suite * webrtcbin_suite (void) { @@ -4425,6 +4493,7 @@ tcase_add_test (tc, test_codec_preferences_no_duplicate_extmaps); tcase_add_test (tc, test_codec_preferences_incompatible_extmaps); tcase_add_test (tc, test_codec_preferences_invalid_extmap); + tcase_add_test (tc, test_invalid_add_media_in_answer); if (sctpenc && sctpdec) { tcase_add_test (tc, test_data_channel_create); tcase_add_test (tc, test_data_channel_remote_notify);
View file
gst-plugins-bad-1.20.2.tar.xz/tests/examples/d3d11/d3d11screencapturesrc.cpp -> gst-plugins-bad-1.20.3.tar.xz/tests/examples/d3d11/d3d11screencapturesrc.cpp
Changed
@@ -143,9 +143,12 @@ main (gint argc, gchar ** argv) { GstElement *pipeline, *src, *queue, *sink; + GstElement *pipeline_1 = nullptr, *src_1, *queue_1, *sink_1; GMainLoop *loop; gboolean ret; gboolean show_devices = FALSE; + gboolean multi_pipelines = FALSE; + gboolean show_cursor = FALSE; gint64 hmonitor = 0; gint monitor_index = -1; GError *err = nullptr; @@ -158,6 +161,10 @@ "Address of HMONITOR handle", nullptr}, {"index", 0, 0, G_OPTION_ARG_INT, &monitor_index, "Monitor index to capture (-1 for primary monitor)", nullptr}, + {"multi-pipelines", 0, 0, G_OPTION_ARG_NONE, &multi_pipelines, + "Run two separate pipelines for capturing a single monitor", nullptr}, + {"show-cursor", 0, 0, G_OPTION_ARG_NONE, &show_cursor, + "Draw mouse cursor", nullptr}, {nullptr} }; @@ -185,12 +192,25 @@ } src = gst_device_create_element (device, nullptr); - gst_object_unref (device); if (!src) { g_warning ("Failed to create d3d11screencapture element"); return 1; } + g_object_set (src, "show-cursor", show_cursor, nullptr); + + if (multi_pipelines) { + src_1 = gst_device_create_element (device, nullptr); + if (!src_1) { + g_warning ("Failed to create second d3d11screencapture element"); + return 1; + } + + g_object_set (src_1, "show-cursor", show_cursor, nullptr); + } + + gst_object_unref (device); + loop = g_main_loop_new (nullptr, FALSE); pipeline = gst_pipeline_new (nullptr); @@ -203,12 +223,31 @@ gst_bus_add_watch (GST_ELEMENT_BUS (pipeline), (GstBusFunc) bus_msg, loop); gst_element_set_state (pipeline, GST_STATE_PLAYING); + if (multi_pipelines) { + pipeline_1 = gst_pipeline_new (nullptr); + + queue_1 = gst_element_factory_make ("queue", nullptr); + sink_1 = gst_element_factory_make ("d3d11videosink", nullptr); + + gst_bin_add_many (GST_BIN (pipeline_1), src_1, queue_1, sink_1, nullptr); + gst_element_link_many (src_1, queue_1, sink_1, nullptr); + + gst_bus_add_watch (GST_ELEMENT_BUS (pipeline_1), (GstBusFunc) bus_msg, loop); + gst_element_set_state (pipeline_1, GST_STATE_PLAYING); + } + g_main_loop_run (loop); gst_element_set_state (pipeline, GST_STATE_NULL); gst_bus_remove_watch (GST_ELEMENT_BUS (pipeline)); - gst_object_unref (pipeline); + + if (multi_pipelines) { + gst_element_set_state (pipeline_1, GST_STATE_NULL); + gst_bus_remove_watch (GST_ELEMENT_BUS (pipeline)); + gst_object_unref (pipeline_1); + } + g_main_loop_unref (loop); return 0;
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.