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