Overview

Request 5788 (accepted)

New stable release

Submit package home:zait...sentials / gstreamer...d-codecs to package Essentials / gstreamer-plugins-bad-codecs

gstreamer-plugins-bad-codecs.changes Changed
x
 
1
@@ -1,4 +1,9 @@
2
 -------------------------------------------------------------------
3
+Thu May 25 17:06:42 UTC 2023 - Bjørn Lie <zaitor@opensuse.org>
4
+
5
+- Update to version 1.22.3
6
+
7
+-------------------------------------------------------------------
8
 Mon Apr 24 13:16:44 UTC 2023 - Bjørn Lie <zaitor@opensuse.org>
9
 
10
 - Add pkgconfig(libopenaptx) BuildRequires, build the
11
gstreamer-plugins-bad-codecs.spec Changed
10
 
1
@@ -7,7 +7,7 @@
2
 %define _version 1.22.0
3
 
4
 Name:           gstreamer-plugins-bad-codecs
5
-Version:        1.22.2
6
+Version:        1.22.3
7
 Release:        0
8
 Summary:        Codecs/plugins for gstreamer-plugins-bad
9
 License:        LGPL-2.1-or-later
10
gst-plugins-bad-1.22.2.tar.xz/ChangeLog -> gst-plugins-bad-1.22.3.tar.xz/ChangeLog Changed
378
 
1
@@ -1,3 +1,376 @@
2
+=== release 1.22.3 ===
3
+
4
+2023-05-19 09:23:19 +0100  Tim-Philipp Müller <tim@centricular.com>
5
+
6
+   * NEWS:
7
+   * README.md:
8
+   * RELEASE:
9
+   * gst-plugins-bad.doap:
10
+   * meson.build:
11
+     Release 1.22.3
12
+
13
+2023-04-20 16:41:11 +0800  Haihua Hu <jared.hu@nxp.com>
14
+
15
+   * gst-libs/gst/play/gstplay.c:
16
+     gstplay: fix critical log when enable playbin3
17
+     when play rtsp stream with playbin3 enabled, there are some critical logs:
18
+     g_object_get_is_valid_property: object class 'GstPlayBin3' has no property named 'n-video'
19
+     g_object_get_is_valid_property: object class 'GstPlayBin3' has no property named 'n-audio'
20
+     g_object_get_is_valid_property: object class 'GstPlayBin3' has no property named 'n-text'
21
+     self->collection could be NULL when READY->PAUSED if the pipeline
22
+     is live, then it will fallback to query playbin2's property,
23
+     we can call gst_play_streams_info_create_from_collection
24
+     directly, it will check self->collection internal.
25
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4666>
26
+
27
+2023-03-02 18:09:54 +0800  Elliot Chen <elliot.chen@nxp.com>
28
+
29
+   * gst-libs/gst/play/gstplay.c:
30
+     gstplay: avoid getting property of playbin2 if subtitle_sid is null
31
+     There is a probability of getting "current-text" property
32
+     when play with playbin3, and this property is available
33
+     only in playbin2.
34
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4661>
35
+
36
+2023-05-16 22:56:15 +0900  Seungha Yang <seungha@centricular.com>
37
+
38
+   * sys/d3d11/gstd3d11convert.cpp:
39
+     d3d11convert: Fix for runtime property update
40
+     Every setup happens in set_caps() method but basetransform will not
41
+     call the set_caps() if in/out caps were not changed
42
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4652>
43
+
44
+2023-03-17 20:44:30 +0100  Aleksandr Slobodeniuk <aslobodeniuk@fluendo.com>
45
+
46
+   * sys/d3d11/gstd3d11convert.cpp:
47
+     d3d11convert: protect 'add-borders' with mutex
48
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4652>
49
+
50
+2023-05-15 13:47:16 +0200  Carlos Rafael Giani <crg7475@mailbox.org>
51
+
52
+   * sys/bluez/gstavdtputil.c:
53
+     avdtputil: Use int instead of int range for fixed bitpool values
54
+     Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1698
55
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4655>
56
+
57
+2023-05-16 16:17:05 +0100  Tim-Philipp Müller <tim@centricular.com>
58
+
59
+   * gst-libs/gst/webrtc/nice/nice.c:
60
+     Revert "webrtc/nice: support consent-freshness RFC7675"
61
+     This reverts commit 0161687505156f54ff38b976668804ac2763a863.
62
+     This causes problems when the connection is congested because
63
+     libnice uses a too agressive timeout contrary to the spec, so
64
+     it's easy for consent to lapse and streaming to stop if there's
65
+     packet loss.
66
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4649>
67
+
68
+2023-05-10 12:00:15 +0200  Johan Sternerup <johast@axis.com>
69
+
70
+   * ext/sctp/gstsctpenc.c:
71
+     sctpenc: Fix potential shutdown deadlock
72
+     When transitioning from state PAUSED to READY, the sctpenc element
73
+     could previously be stuck in an endless loop trying to resend data
74
+     in case the underlying sctp stream was in the process of
75
+     resetting. usrsctp_sendv() would repeatedly return EAGAIN with the
76
+     result that 0 bytes were sent and then sctpenc would retry forever.
77
+     To bring sctpenc out of the resend loop we just need to inform the
78
+     sink pad that it is flushing, which is already done for the associated
79
+     data queue, but we also need to set the bools associated with the
80
+     sinkpads that are used as the loop criterion.
81
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4636>
82
+
83
+2023-04-18 11:21:05 +0200  Daniel Moberg <daniemob@axis.com>
84
+
85
+   * ext/webrtc/webrtcdatachannel.c:
86
+     webrtc: do not tear down data channel before data is flushed
87
+     Current implementation can in some cases detect
88
+     that all data is sent but in reality it is not,
89
+     leading to a push to an unlinked pad.
90
+     This is a race between the probe used to track data sent and a
91
+     call to close.
92
+     This patch sends an EOS before starting the close procedure
93
+     and then waits for the EOS event to come through to the
94
+     src pad before commencing with tear down.
95
+     This ensures that any queued data before EOS is flushed.
96
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4633>
97
+
98
+2023-04-04 21:50:01 +1000  Jan Schmidt <jan@centricular.com>
99
+
100
+   * gst/mpegdemux/gstmpegdemux.c:
101
+   * gst/mpegdemux/gstmpegdemux.h:
102
+     mpegpsdemux: Rework gap sending
103
+     Take the gap logic from mpegtsdemux, and don't
104
+     send gap events on a stream that's outputting buffers with
105
+     no timestamps. Time isn't advancing, but the stream has
106
+     buffers - so it's not sparse.
107
+     Fixes #2374
108
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4623>
109
+
110
+2023-03-05 20:15:19 +0900  Seungha Yang <seungha@centricular.com>
111
+
112
+   * sys/va/gstvavp8dec.c:
113
+     vavp8dec: Fix return type of decode_picture()
114
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4614>
115
+
116
+2023-03-05 20:14:06 +0900  Seungha Yang <seungha@centricular.com>
117
+
118
+   * sys/va/gstjpegdecoder.h:
119
+     vajpegdec: Hide gst_jpeg_decoder_get_type() symbol
120
+     It's not a public symbol yet
121
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4614>
122
+
123
+2023-03-05 20:01:44 +0900  Seungha Yang <seungha@centricular.com>
124
+
125
+   * sys/va/gstvabaseenc.h:
126
+     vabaseenc: Fix return type of encode_frame vfunc
127
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4614>
128
+
129
+2023-03-05 19:53:37 +0900  Seungha Yang <seungha@centricular.com>
130
+
131
+   * sys/va/gstvaav1dec.c:
132
+   * sys/va/gstvafilter.c:
133
+   * sys/va/gstvah264enc.c:
134
+   * sys/va/gstvah265enc.c:
135
+   * sys/va/gstvavp8dec.c:
136
+   * sys/va/gstvavpp.c:
137
+     va: Fix struct empty initialization syntax
138
+     "struct Foo bar; bar = {};" is not a valid syntax. Also remove use
139
+     of __typeof__ which is GCC specific
140
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4614>
141
+
142
+2023-05-10 00:51:31 +0900  Seungha Yang <seungha@centricular.com>
143
+
144
+   * sys/d3d11/gstd3d11videosink.cpp:
145
+     d3d11videosink: Don't clear prepared buffer on unlock_stop()
146
+     That can be called between prepare() and render() which results in
147
+     unexpected error flow return
148
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4596>
149
+
150
+2023-05-06 04:14:49 +0900  Seungha Yang <seungha@centricular.com>
151
+
152
+   * gst-libs/gst/codecs/gsth264decoder.c:
153
+     h264decoder: Drop nonexisting picture silently without error
154
+     If end_picture() was not successful, we do drop corresponding
155
+     GstVideoCodecFrame and therefore gst_video_decoder_get_frame()
156
+     will return nullptr which is expected behavior.
157
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4586>
158
+
159
+2023-03-12 14:55:22 +0000  Philippe Normand <philn@igalia.com>
160
+
161
+   * ext/webrtc/gstwebrtcbin.c:
162
+   * ext/webrtc/webrtcdatachannel.c:
163
+   * ext/webrtc/webrtcdatachannel.h:
164
+     webrtcdatachannel: Bind to parent webrtcbin using a weak reference
165
+     The previous approach of using a simple pointer could lead to a use-after-free
166
+     in case a data-channel was created and its parent webrtcbin was disposed soon
167
+     after.
168
+     Fixes #2103
169
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4580>
170
+
171
+2023-05-04 16:30:09 +1000  Matthew Waters <matthew@centricular.com>
172
+
173
+   * gst-libs/gst/webrtc/nice/nice.c:
174
+     webrtc/nice: support consent-freshness RFC7675
175
+     As is supported by libwebrtc already.  This allows ICE components to
176
+     transition to failed if consent to send from the peer is revoked or if
177
+     multiple consent packets are lost.
178
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4575>
179
+
180
+2023-05-05 21:53:44 +0900  Seungha Yang <seungha@centricular.com>
181
+
182
+   * gst-libs/gst/d3d11/gstd3d11memory.cpp:
183
+     d3d11memory: Don't clear wrapped texture memory
184
+     The external texture may hold already rendered scene and therefore
185
+     it should not be cleared in alloc method
186
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4558>
187
+
188
+2023-05-04 04:44:31 +0900  Seungha Yang <seungha@centricular.com>
189
+
190
+   * sys/mediafoundation/gstmfvideoencoder.cpp:
191
+     mfvideoenc: Allow only even resolution numbers
192
+     Some H/W vendors support odd resolution if D3D11 texture is used
193
+     or via IMF2DBuffer, but not all vendors support it.
194
+     Also software MFT does not allow odd resolution.
195
+     Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1165
196
+     Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2537
197
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4548>
198
+
199
+2023-05-02 18:14:20 +0100  Philippe Normand <philn@igalia.com>
200
+
201
+   * ext/webrtc/gstwebrtcbin.c:
202
+     webrtcbin: Fix potential deadlock when closing before any data was sent
203
+     A blocking pad probe is added on new sink pads, it's usually removed after the
204
+     caps have been negotiated or the signaling state switched to stable, but if that
205
+     never happens and the pad is released we kept the pad probe active, leaving the
206
+     pad blocked, preventing clean disposal.
207
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4533>
208
+
209
+2023-05-01 17:46:25 +0100  Philippe Normand <philn@igalia.com>
210
+
211
+   * gst-libs/gst/webrtc/dtlstransport.c:
212
+     dtlstransport: Keep strong ref of dtls encoder/decoder
213
+     Otherwise get_property() calls for the client, certificate and/or
214
+     remote-certificate properties might access moved objects, since the encoder and
215
+     decoder are added to the transportsendbin.
216
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4526>
217
+
218
+2023-05-01 10:24:54 +0000  Mihail Ivanchev <contact@ivanchev.net>
219
+
220
+   * gst/codectimestamper/meson.build:
221
+     gstcodectimestamper: remove PC file generation from plugin's own meson.build
222
+     The file generated here is incomplete; it is generated for all plugins in a loop at an upper level.
223
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4520>
224
+
225
+2023-04-28 04:28:24 +0900  Seungha Yang <seungha@centricular.com>
226
+
227
+   * sys/wasapi2/gstwasapi2util.c:
228
+     wasapi2: Allows process loopback capture on Windows 10
229
+     As per MS documentation1, it requires Windows 10 Build 20348
230
+     but it seems to be supported by old versions too
231
+     1 https://learn.microsoft.com/en-us/windows/win32/api/audioclientactivationparams/
232
+     ns-audioclientactivationparams-audioclient_process_loopback_params
233
+     Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2524
234
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4517>
235
+
236
+2023-04-28 18:52:48 +0900  Seungha Yang <seungha@centricular.com>
237
+
238
+   * gst-libs/gst/cuda/gstcudamemory.c:
239
+     cudamemory: Fix for semi planar YUV memory size decision
240
+     UV plan of the semi planar format requires only half of Y plane size
241
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4506>
242
+
243
+2023-04-25 04:59:33 +0900  Seungha Yang <seungha@centricular.com>
244
+
245
+   * sys/d3d11/gstd3d11window_win32.cpp:
246
+     d3d11videosink: Fix for ignored initial render rectangle
247
+     Application can set target render rect before internal HWND
248
+     configuration
249
+     Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2518
250
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4496>
251
+
252
+2023-04-25 10:14:47 +0200  Stéphane Cerveau <scerveau@collabora.com>
253
+
254
+   * tests/check/meson.build:
255
+     bad: disable dtls test if openssl is not present
256
+     On MacOS with homebrew, the openssl library is not
257
+     properly detected with pkg-config.
258
+     So disable the test compilation if openssl
259
+     is not properly detected along with libcrypto.
260
+     libcrypto is detected but it uses the system one
261
+     which leads to the error:
262
+     your binary is not an allowed client of /usr/lib/libcrypto.dylib for
263
+     architecture x86_64
264
+     See more details from Apple:
265
+     https://developer.apple.com/forums/thread/124782
266
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4483>
267
+
268
+2023-04-19 16:59:01 +0200  Martin Nordholts <martn@axis.com>
269
+
270
+   * gst-libs/gst/webrtc/nice/nice.c:
271
+     webrtc: Plug leaks of resolved ICE addresses
272
+     The addresses we get from `resolve_host_finish()` (via
273
+     `resolve_host_async()`, `resolve_host_main_cb()`, `on_resolve_host()`,
274
+     `g_resolver_lookup_by_name_finish()`) must be freed. Otherwise we leak
275
+     memory.
276
+     Leak found and confirmed fixed with GCC AddressSanitizer.
277
+     Change-Id: If32d24452d626234f01b253b77a7d6d16eac1cee
278
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4482>
279
+
280
+2023-04-17 21:34:19 +0900  Seungha Yang <seungha@centricular.com>
281
+
282
+   * sys/d3d11/gstd3d11compositor.cpp:
283
+     d3d11compositor: Skip zero alpha input
284
+     Blending such input is a waste of resource since nothing will
285
+     be rendered
286
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4456>
287
+
288
+2023-03-30 10:11:11 +1100  Matthew Waters <matthew@centricular.com>
289
+
290
+   * ext/closedcaption/gstccconverter.c:
291
+     ccconverter: reintroduce frame count reset on cycle completion
292
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4453>
293
+
294
+2023-04-18 14:55:23 +0300  Sebastian Dröge <sebastian@centricular.com>
295
+
296
+   * gst/mpegtsdemux/tsdemux.c:
297
+     tsdemux: Set number of channels to 2 for dual mono Opus
298
+     Instead of leaving it at 0, which will then cause caps creation to fail.
299
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4446>
300
+
301
+2023-04-17 11:36:55 +0200  Guillaume Desmottes <guillaume.desmottes@onestream.live>
302
+
303
+   * ext/dash/gstmpdclient.c:
304
+     dash: mpdclient: fix divide by 0 if segment has no duration
305
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4441>
306
+
307
+2023-04-17 23:06:54 +0900  Seungha Yang <seungha@centricular.com>
308
+
309
+   * sys/d3d11/gstd3d11compositor.cpp:
310
+     d3d11compositor: Reconfigure resource only when output caps is changed
311
+     GstD3D11Converter setup is heavy operation since it requires
312
+     shader compile, GPU resource allocation, some math, mutex, etc.
313
+     We can avoid it if negotiated caps is not changed.
314
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4440>
315
+
316
+2018-07-19 17:21:22 +0200  Michael Olbrich <m.olbrich@pengutronix.de>
317
+
318
+   * ext/srtp/gstsrtpdec.c:
319
+     srtpdec: fix "srtp-key" check
320
+     The original code was:
321
+     if (!gst_structure_get (s, "srtp-key", GST_TYPE_BUFFER, &buf, NULL) || !buf) {
322
+     goto error;
323
+     } else {
324
+     stream->key = buf;
325
+     }
326
+     So use "srtp-key" if it is set so a non NULL buffer. The condition was
327
+     incorrectly inverted in ad7ffe64a66ab48d81671651031c449149db4973 to:
328
+     if (gst_structure_get (s, "srtp-key", GST_TYPE_BUFFER, &buf, NULL) || !buf) {
329
+     stream->key = buf;
330
+     } ...
331
+     Fix the condition so it works as originally intended and avoid accessing
332
+     'buf' uninitialised.
333
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4423>
334
+
335
+2023-03-27 09:20:27 +0200  Aleksandr Slobodeniuk <aslobodeniuk@fluendo.com>
336
+
337
+   * sys/d3d11/gstd3d11videosink.cpp:
338
+   * sys/d3d11/gstd3d11window_win32.cpp:
339
+     d3d11videosink: fix race conditions in win32 window
340
+     One race condition is the fact that the window object
341
+     can be destroyed while running some routine in the UI
342
+     thread (such as resizing). To avoid that situation we make
343
+     UI thread hold a reference on the window object while it's
344
+     running.
345
+     Other probpematic case is when the window handle is reused:
346
+     if we stop and start the pipeline very fast,
347
+     so the sink creates a new window object that is going to use
348
+     the same window handle as the previous one.
349
+     And finally the case when the pipeline is stopped immediatelly
350
+     right after starting, this one is also handled in this commit.
351
+     NOTE: a unit test that reproduces this cases have been added
352
+     in the previous commit.
353
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4417>
354
+
355
+2023-03-21 18:17:12 +0100  Aleksandr Slobodeniuk <aslobodeniuk@fluendo.com>
356
+
357
+   * tests/check/elements/d3d11videosink.c:
358
+   * tests/check/meson.build:
359
+     d3d11videosink: add gstcheck test for win32 window
360
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4417>
361
+
362
+2023-04-02 00:29:24 +0900  Seungha Yang <seungha@centricular.com>
363
+
364
+   * sys/d3d11/gstd3d11window_win32.cpp:
365
+     d3d11videosink: Enhancement for initial window size decision
366
+     Use AdjustWindowRect() method to calculate window size so that
367
+     video scene can be rendered on client area without black borders
368
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4416>
369
+
370
+2023-04-12 00:31:17 +0100  Tim-Philipp Müller <tim@centricular.com>
371
+
372
+   * meson.build:
373
+     Back to development
374
+
375
 === release 1.22.2 ===
376
 
377
 2023-04-11 17:29:28 +0100  Tim-Philipp Müller <tim@centricular.com>
378
gst-plugins-bad-1.22.2.tar.xz/NEWS -> gst-plugins-bad-1.22.3.tar.xz/NEWS Changed
208
 
1
@@ -2,13 +2,13 @@
2
 
3
 GStreamer 1.22.0 was originally released on 23 January 2023.
4
 
5
-The latest bug-fix release in the stable 1.22 series is 1.22.2 and was
6
-released on 11 April 2023.
7
+The latest bug-fix release in the stable 1.22 series is 1.22.3 and was
8
+released on 19 May 2023.
9
 
10
 See https://gstreamer.freedesktop.org/releases/1.22/ for the latest
11
 version of this document.
12
 
13
-Last updated: Tuesday 11 April 2023, 16:45 UTC (log)
14
+Last updated: Friday 19 May 2023, 01:00 UTC (log)
15
 
16
 Introduction
17
 
18
@@ -1648,6 +1648,189 @@
19
 -   List of Merge Requests applied in 1.22.2
20
 -   List of Issues fixed in 1.22.2
21
 
22
+1.22.3
23
+
24
+The third 1.22 bug-fix release (1.22.3) was released on 19 May 2023.
25
+
26
+This release only contains bugfixes and it should be safe to update from
27
+1.22.x.
28
+
29
+Highlighted bugfixes in 1.22.3
30
+
31
+-   avdec: fix occasional video decoder deadlock on seeking with FFmpeg
32
+    6.0
33
+-   decodebin3: fix regression handling input streams without CAPS or
34
+    TIME segment such as e.g. udpsrc or `pushfilesrc
35
+-   bluez: a2dpsink: fix Bluetooth SIG Certification test failures
36
+-   osxvideosink: fix deadlock upon closing output window
37
+-   qtdemux: fix edit list handling regression and AV1 codec box parsing
38
+-   qtmux: fix extraction of CEA608 closed caption data from S334-1A
39
+    packets
40
+-   rtspsrc: Fix handling of * control path
41
+-   splitmux: timestamp handling improvements
42
+-   v4l2videodec: Rework dynamic resolution change handling (needed for
43
+    IMX6 mainline codec)
44
+-   videoflip: fix regression with automatically rotating video based on
45
+    tags
46
+-   d3d11: many d3d11videosink and d3d11compositor fixes
47
+-   webrtc, rtp: numerous data race fixes and stability fixes
48
+-   various bug fixes, memory leak fixes, and other stability and
49
+    reliability improvements
50
+
51
+gstreamer
52
+
53
+-   tracing: Initialize tracing infrastructure even if the debug system
54
+    is not compiled in
55
+-   parse-launch: fix missing unref of looked-up child element
56
+-   gstutils: Add category and object to most logging messages
57
+
58
+gst-plugins-base
59
+
60
+-   allocators: Fix fdmem unit test with recent GLib versions
61
+-   audiotestsrc: Initialize all samples in wave=ticks mode
62
+-   decodebin3: Handle input streams without CAPS or TIME segment such
63
+    as e.g. udpsrc or pushfilesrc
64
+-   decodebin3: fix regression handling streams without caps
65
+-   decodebin3: fix random hang when remove failing stream
66
+-   uridecodebin3: Ensure atomic urisourcebin state change
67
+-   glvideoflip: fix leaked caps
68
+-   glcontext_wgl: fix missing unref
69
+-   playsink: Fix volume leak
70
+
71
+gst-plugins-good
72
+
73
+-   adaptivedemux2: fix critical when using an unsupported URI
74
+-   dashdemux2: mpdclient: fix divide by 0 if segment has no duration
75
+-   imagesequencesrc: Properly set default location
76
+-   multifile: error out if no filename was set
77
+-   osxvideosink: fix deadlock upon closing output window
78
+-   rtpmanager: rtpsession: data race leading to critical warnings
79
+-   rtpmanager: rtpsession: race conditions leading to critical warnings
80
+-   rtspsrc: Fix handling of * control path
81
+-   splitmuxsink: Catch invalid DTS to avoid running into problems later
82
+-   splitmuxsrc: Make PTS contiguous by preference
83
+-   qtdemux: emit no-more-pads after pruning old pads
84
+-   Revert “qtdemux: fix conditions for end of segment in reverse
85
+    playback” to fix edit list regression
86
+-   qtdemux: Fix av1C parsing
87
+-   qtmux: Fix extraction of CEA608 data from S334-1A packets
88
+-   qtwindow: unref caps in destructor
89
+-   v4l2: device provider: Fix GMainLoop leak
90
+-   v4l2: videodec: Rework dynamic resolution change handling
91
+-   v4l2: videodec: Prefer acquired caps over anything downstream
92
+-   videoflip: fix setting of method property at construction time
93
+-   videoflip 1.22.2 not rotating video when extracting frames
94
+
95
+gst-plugins-bad
96
+
97
+-   a2dpsink: Fails many tests in Bluetooth SIG Certification
98
+-   avdtputil: Use int instead of int range for fixed bitpool values
99
+-   ccconverter: reintroduce frame count reset on cycle completion
100
+-   ccconverter: integer overflow & crashing
101
+-   codectimestamper: remove PC file generation from plugin’s own
102
+    meson.build
103
+-   cudamemory: Fix for semi planar YUV memory size decision
104
+-   d3d11compositor: Reconfigure resource only when output caps is
105
+    changed
106
+-   d3d11compositor: Skip zero alpha input
107
+-   d3d11convert: Fix for runtime property update
108
+-   d3d11memory: Don’t clear wrapped texture memory
109
+-   d3d11videosink: Fix for ignored initial render rectangle
110
+-   d3d11videosink: fix race condition in window unprepare
111
+-   d3d11videosink: Enhancement for initial window size decision
112
+-   d3d11videosink: Don’t clear prepared buffer on unlock_stop()
113
+-   dashdemux: mpdclient: fix divide by 0 if segment has no duration
114
+-   dtlstransport: Keep strong ref of dtls encoder/decoder
115
+-   GstPlay: avoid getting property of playbin2 if subtitle_sid is null
116
+-   GstPlay: fix critical log when using playbin3
117
+-   h264decoder: Drop nonexisting picture silently without error
118
+-   dtmf: element classification improvements
119
+-   mfvideoenc: Allow only even resolution numbers
120
+-   sctpenc: Fix potential shutdown deadlock
121
+-   srtpdec: fix “srtp-key” check
122
+-   tests: disable dtls test if openssl is not present
123
+-   tsdemux: Set number of channels to 2 for dual mono Opus
124
+-   va: Various fixes for defects found with MSVC
125
+-   wasapi2: Allows process loopback capture on Windows 10
126
+-   webrtcdatachannel: Bind to parent webrtcbin using a weak reference
127
+-   webrtcbin: Fix potential deadlock when closing before any data was
128
+    sent
129
+-   webrtc: Plug leaks of resolved ICE addresses
130
+-   webrtc: do not tear down data channel before data is flushed
131
+
132
+gst-plugins-ugly
133
+
134
+-   mpegpsdemux: Rework gap sending
135
+
136
+gst-libav
137
+
138
+-   avviddec: Temporarily unlock stream lock while flushing buffers
139
+-   Random freeze and deadlock in ffmpegviddec flush and get_buffer
140
+    while seeking
141
+
142
+gst-rtsp-server
143
+
144
+-   No changes
145
+
146
+gstreamer-vaapi
147
+
148
+-   No changes
149
+
150
+gstreamer-sharp
151
+
152
+-   No changes
153
+
154
+gst-omx
155
+
156
+-   No changes
157
+
158
+gst-python
159
+
160
+-   No changes
161
+
162
+gst-editing-services
163
+
164
+-   ges: base-xml-formatter: Don’t pass non-GObject pointers to
165
+    GST_DEBUG_OBJECT
166
+
167
+gst-validate + gst-integration-testsuites
168
+
169
+-   No changes
170
+
171
+gst-examples
172
+
173
+-   No changes
174
+
175
+Development build environment
176
+
177
+-   No changes
178
+
179
+Cerbero build tool and packaging changes in 1.22.3
180
+
181
+-   glib: Ship Windows process spawning helpers
182
+-   recipes: add recipe for libltc for timecodestamper element
183
+-   Add support for RHEL9 and Rocky Linux
184
+
185
+Contributors to 1.22.3
186
+
187
+Aleksandr Slobodeniuk, Antonio Kevo, Arun Raghavan, Carlos Rafael Giani,
188
+Daniel Moberg, Edward Hervey, Elliot Chen, François Laignel, Guillaume
189
+Desmottes, Haihua Hu, Jan Alexander Steffens (heftig), Jan Beich, Jan
190
+Schmidt, Johan Sternerup, John King, Jordan Petridis, Juan Navarro, Lily
191
+Foster, Martin Nordholts, Mathieu Duponchelle, Matthew Waters, Matthias
192
+Fuchs, Michael Olbrich, Mihail Ivanchev, Nick Steel, Nicolas Dufresne,
193
+Nirbheek Chauhan, Patricia Muscalu, Philippe Normand, Piotr Brzeziński,
194
+Sanchayan Maity, Sebastian Dröge, Seungha Yang, Stéphane Cerveau,
195
+Thibault Saunier, Tim-Philipp Müller, Xabier Rodriguez Calvar,
196
+
197
+… and many others who have contributed bug reports, translations, sent
198
+suggestions or helped testing. Thank you all!
199
+
200
+List of merge requests and issues fixed in 1.22.3
201
+
202
+-   List of Merge Requests applied in 1.22.3
203
+-   List of Issues fixed in 1.22.3
204
+
205
 Schedule for 1.24
206
 
207
 Our next major feature release will be 1.24, and 1.23 will be the
208
gst-plugins-bad-1.22.2.tar.xz/README.md -> gst-plugins-bad-1.22.3.tar.xz/README.md Changed
7
 
1
@@ -1,4 +1,4 @@
2
-GStreamer 1.20.x stable series
3
+GStreamer 1.22.x stable series
4
 
5
 WHAT IT IS
6
 ----------
7
gst-plugins-bad-1.22.2.tar.xz/RELEASE -> gst-plugins-bad-1.22.3.tar.xz/RELEASE Changed
7
 
1
@@ -1,4 +1,4 @@
2
-This is GStreamer gst-plugins-bad 1.22.2.
3
+This is GStreamer gst-plugins-bad 1.22.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.22.2.tar.xz/ext/closedcaption/gstccconverter.c -> gst-plugins-bad-1.22.3.tar.xz/ext/closedcaption/gstccconverter.c Changed
25
 
1
@@ -591,6 +591,11 @@
2
   output_time_cmp = gst_util_fraction_compare (input_frame_n, input_frame_d,
3
       output_frame_n, output_frame_d);
4
 
5
+  if (output_time_cmp == 0) {
6
+    self->output_frames = 0;
7
+    self->input_frames = 0;
8
+  }
9
+
10
   in_fps_entry = cdp_fps_entry_from_fps (self->in_fps_n, self->in_fps_d);
11
   if (!in_fps_entry || in_fps_entry->fps_n == 0)
12
     g_assert_not_reached ();
13
@@ -1455,6 +1460,11 @@
14
   output_time_cmp = gst_util_fraction_compare (input_frame_n, input_frame_d,
15
       output_frame_n, output_frame_d);
16
 
17
+  if (output_time_cmp == 0) {
18
+    self->output_frames = 0;
19
+    self->input_frames = 0;
20
+  }
21
+
22
   /* if the next output frame is at or before the current input frame */
23
   if (output_time_cmp >= 0)
24
     return TRUE;
25
gst-plugins-bad-1.22.2.tar.xz/ext/dash/gstmpdclient.c -> gst-plugins-bad-1.22.3.tar.xz/ext/dash/gstmpdclient.c Changed
10
 
1
@@ -1768,7 +1768,7 @@
2
 
3
     g_return_val_if_fail (GST_MPD_MULT_SEGMENT_BASE_NODE
4
         (stream->cur_seg_template)->SegmentTimeline == NULL, FALSE);
5
-    if (!GST_CLOCK_TIME_IS_VALID (duration)) {
6
+    if (!GST_CLOCK_TIME_IS_VALID (duration) || duration == 0) {
7
       return FALSE;
8
     }
9
 
10
gst-plugins-bad-1.22.2.tar.xz/ext/sctp/gstsctpenc.c -> gst-plugins-bad-1.22.3.tar.xz/ext/sctp/gstsctpenc.c Changed
107
 
1
@@ -331,6 +331,34 @@
2
   }
3
 }
4
 
5
+static void
6
+flush_sinkpad (const GValue * item, gpointer user_data)
7
+{
8
+  GstSctpEncPad *sctpenc_pad = g_value_get_object (item);
9
+  gboolean flush = GPOINTER_TO_INT (user_data);
10
+
11
+  if (flush) {
12
+    g_mutex_lock (&sctpenc_pad->lock);
13
+    sctpenc_pad->flushing = TRUE;
14
+    g_cond_signal (&sctpenc_pad->cond);
15
+    g_mutex_unlock (&sctpenc_pad->lock);
16
+  } else {
17
+    sctpenc_pad->flushing = FALSE;
18
+  }
19
+}
20
+
21
+static void
22
+flush_sinkpads (GstSctpEnc * self, gboolean state)
23
+{
24
+  GstIterator *it;
25
+
26
+  it = gst_element_iterate_sink_pads (GST_ELEMENT (self));
27
+  while (gst_iterator_foreach (it, flush_sinkpad,
28
+          GINT_TO_POINTER (state)) == GST_ITERATOR_RESYNC)
29
+    gst_iterator_resync (it);
30
+  gst_iterator_free (it);
31
+}
32
+
33
 static GstStateChangeReturn
34
 gst_sctp_enc_change_state (GstElement * element, GstStateChange transition)
35
 {
36
@@ -351,6 +379,7 @@
37
       break;
38
     case GST_STATE_CHANGE_PAUSED_TO_READY:
39
       stop_srcpad_task (self->src_pad, self);
40
+      flush_sinkpads (self, TRUE);
41
       self->src_ret = GST_FLOW_FLUSHING;
42
       break;
43
     case GST_STATE_CHANGE_READY_TO_NULL:
44
@@ -764,22 +793,6 @@
45
   return ret;
46
 }
47
 
48
-static void
49
-flush_sinkpad (const GValue * item, gpointer user_data)
50
-{
51
-  GstSctpEncPad *sctpenc_pad = g_value_get_object (item);
52
-  gboolean flush = GPOINTER_TO_INT (user_data);
53
-
54
-  if (flush) {
55
-    g_mutex_lock (&sctpenc_pad->lock);
56
-    sctpenc_pad->flushing = TRUE;
57
-    g_cond_signal (&sctpenc_pad->cond);
58
-    g_mutex_unlock (&sctpenc_pad->lock);
59
-  } else {
60
-    sctpenc_pad->flushing = FALSE;
61
-  }
62
-}
63
-
64
 static gboolean
65
 gst_sctp_enc_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
66
 {
67
@@ -788,29 +801,17 @@
68
 
69
   switch (GST_EVENT_TYPE (event)) {
70
     case GST_EVENT_FLUSH_START:{
71
-      GstIterator *it;
72
-
73
       gst_data_queue_set_flushing (self->outbound_sctp_packet_queue, TRUE);
74
       gst_data_queue_flush (self->outbound_sctp_packet_queue);
75
 
76
-      it = gst_element_iterate_sink_pads (GST_ELEMENT (self));
77
-      while (gst_iterator_foreach (it, flush_sinkpad,
78
-              GINT_TO_POINTER (TRUE)) == GST_ITERATOR_RESYNC)
79
-        gst_iterator_resync (it);
80
-      gst_iterator_free (it);
81
+      flush_sinkpads (self, TRUE);
82
 
83
       ret = gst_pad_event_default (pad, parent, event);
84
       break;
85
     }
86
     case GST_EVENT_RECONFIGURE:
87
     case GST_EVENT_FLUSH_STOP:{
88
-      GstIterator *it;
89
-
90
-      it = gst_element_iterate_sink_pads (GST_ELEMENT (self));
91
-      while (gst_iterator_foreach (it, flush_sinkpad,
92
-              GINT_TO_POINTER (FALSE)) == GST_ITERATOR_RESYNC)
93
-        gst_iterator_resync (it);
94
-      gst_iterator_free (it);
95
+      flush_sinkpads (self, FALSE);
96
 
97
       gst_data_queue_set_flushing (self->outbound_sctp_packet_queue, FALSE);
98
       self->need_segment = TRUE;
99
@@ -977,7 +978,6 @@
100
 
101
   g_signal_handler_disconnect (self->sctp_association,
102
       self->signal_handler_state_changed);
103
-  stop_srcpad_task (self->src_pad, self);
104
   gst_sctp_association_force_close (self->sctp_association);
105
   g_object_unref (self->sctp_association);
106
   self->sctp_association = NULL;
107
gst-plugins-bad-1.22.2.tar.xz/ext/srtp/gstsrtpdec.c -> gst-plugins-bad-1.22.3.tar.xz/ext/srtp/gstsrtpdec.c Changed
10
 
1
@@ -606,7 +606,7 @@
2
     goto error;
3
   }
4
 
5
-  if (gst_structure_get (s, "srtp-key", GST_TYPE_BUFFER, &buf, NULL) || !buf) {
6
+  if (gst_structure_get (s, "srtp-key", GST_TYPE_BUFFER, &buf, NULL) && buf) {
7
 #ifdef HAVE_SRTP2
8
     GstBuffer *mki = NULL;
9
     guint i;
10
gst-plugins-bad-1.22.2.tar.xz/ext/webrtc/gstwebrtcbin.c -> gst-plugins-bad-1.22.3.tar.xz/ext/webrtc/gstwebrtcbin.c Changed
31
 
1
@@ -2543,7 +2543,7 @@
2
   if (!channel) {
3
     channel = g_object_new (WEBRTC_TYPE_DATA_CHANNEL, NULL);
4
     channel->parent.id = stream_id;
5
-    channel->webrtcbin = webrtc;
6
+    webrtc_data_channel_set_webrtcbin (channel, webrtc);
7
 
8
     g_signal_emit (webrtc, gst_webrtc_bin_signalsPREPARE_DATA_CHANNEL_SIGNAL,
9
         0, channel, FALSE);
10
@@ -7166,7 +7166,7 @@
11
   gst_element_sync_state_with_parent (ret->sink_bin);
12
 
13
   ret = gst_object_ref (ret);
14
-  ret->webrtcbin = webrtc;
15
+  webrtc_data_channel_set_webrtcbin (ret, webrtc);
16
   g_ptr_array_add (webrtc->priv->data_channels, ret);
17
   DC_UNLOCK (webrtc);
18
 
19
@@ -8184,6 +8184,11 @@
20
   gst_caps_replace (&webrtc_pad->received_caps, NULL);
21
   PC_UNLOCK (webrtc);
22
 
23
+  if (webrtc_pad->block_id) {
24
+    gst_pad_remove_probe (GST_PAD (pad), webrtc_pad->block_id);
25
+    webrtc_pad->block_id = 0;
26
+  }
27
+
28
   _remove_pad (webrtc, webrtc_pad);
29
 
30
   PC_LOCK (webrtc);
31
gst-plugins-bad-1.22.2.tar.xz/ext/webrtc/webrtcdatachannel.c -> gst-plugins-bad-1.22.3.tar.xz/ext/webrtc/webrtcdatachannel.c Changed
120
 
1
@@ -51,6 +51,7 @@
2
 
3
 struct task
4
 {
5
+  GstWebRTCBin *webrtcbin;
6
   GstWebRTCDataChannel *channel;
7
   ChannelTask func;
8
   gpointer user_data;
9
@@ -69,6 +70,7 @@
10
 static void
11
 _free_task (struct task *task)
12
 {
13
+  g_object_unref (task->webrtcbin);
14
   gst_object_unref (task->channel);
15
 
16
   if (task->notify)
17
@@ -80,14 +82,22 @@
18
 _channel_enqueue_task (WebRTCDataChannel * channel, ChannelTask func,
19
     gpointer user_data, GDestroyNotify notify)
20
 {
21
-  struct task *task = g_new0 (struct task, 1);
22
+  GstWebRTCBin *webrtcbin = NULL;
23
+  struct task *task = NULL;
24
 
25
+  webrtcbin = g_weak_ref_get (&channel->webrtcbin_weak);
26
+  if (!webrtcbin)
27
+    return;
28
+
29
+  task = g_new0 (struct task, 1);
30
+
31
+  task->webrtcbin = webrtcbin;
32
   task->channel = gst_object_ref (channel);
33
   task->func = func;
34
   task->user_data = user_data;
35
   task->notify = notify;
36
 
37
-  gst_webrtc_bin_enqueue_task (channel->webrtcbin,
38
+  gst_webrtc_bin_enqueue_task (task->webrtcbin,
39
       (GstWebRTCBinFunc) _execute_task, task, (GDestroyNotify) _free_task,
40
       NULL);
41
 }
42
@@ -427,11 +437,15 @@
43
     GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel);
44
     g_object_notify (G_OBJECT (channel), "ready-state");
45
 
46
-    GST_WEBRTC_DATA_CHANNEL_LOCK (channel);
47
-    if (channel->parent.buffered_amount <= 0) {
48
-      _channel_enqueue_task (channel, (ChannelTask) _close_sctp_stream,
49
-          NULL, NULL);
50
+    /* Make sure that all data enqueued gets properly sent before data channel is closed. */
51
+    GstFlowReturn ret =
52
+        gst_app_src_end_of_stream (GST_APP_SRC (WEBRTC_DATA_CHANNEL
53
+            (channel)->appsrc));
54
+    if (ret != GST_FLOW_OK) {
55
+      GST_WARNING_OBJECT (channel, "Send end of stream returned %i, %s", ret,
56
+          gst_flow_get_name (ret));
57
     }
58
+    return;
59
   }
60
 
61
   GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel);
62
@@ -1035,6 +1049,16 @@
63
   } else if (GST_PAD_PROBE_INFO_TYPE (info) & GST_PAD_PROBE_TYPE_BUFFER_LIST) {
64
     GstBufferList *list = GST_PAD_PROBE_INFO_BUFFER_LIST (info);
65
     size = gst_buffer_list_calculate_size (list);
66
+  } else if (GST_PAD_PROBE_INFO_TYPE (info) &
67
+      GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) {
68
+    GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info);
69
+    if (GST_EVENT_TYPE (event) == GST_EVENT_EOS
70
+        && channel->parent.ready_state ==
71
+        GST_WEBRTC_DATA_CHANNEL_STATE_CLOSING) {
72
+      _channel_enqueue_task (channel, (ChannelTask) _close_sctp_stream, NULL,
73
+          NULL);
74
+      return GST_PAD_PROBE_DROP;
75
+    }
76
   }
77
 
78
   if (size > 0) {
79
@@ -1053,11 +1077,6 @@
80
           NULL);
81
     }
82
 
83
-    if (channel->parent.ready_state == GST_WEBRTC_DATA_CHANNEL_STATE_CLOSING
84
-        && channel->parent.buffered_amount <= 0) {
85
-      _channel_enqueue_task (channel, (ChannelTask) _close_sctp_stream, NULL,
86
-          NULL);
87
-    }
88
     GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel);
89
     g_object_notify (G_OBJECT (&channel->parent), "buffered-amount");
90
   }
91
@@ -1130,6 +1149,8 @@
92
   g_clear_object (&channel->appsrc);
93
   g_clear_object (&channel->appsink);
94
 
95
+  g_weak_ref_clear (&channel->webrtcbin_weak);
96
+
97
   G_OBJECT_CLASS (parent_class)->finalize (object);
98
 }
99
 
100
@@ -1155,6 +1176,8 @@
101
   G_LOCK (outstanding_channels_lock);
102
   outstanding_channels = g_list_prepend (outstanding_channels, channel);
103
   G_UNLOCK (outstanding_channels_lock);
104
+
105
+  g_weak_ref_init (&channel->webrtcbin_weak, NULL);
106
 }
107
 
108
 static void
109
@@ -1204,3 +1227,10 @@
110
     }
111
   }
112
 }
113
+
114
+void
115
+webrtc_data_channel_set_webrtcbin (WebRTCDataChannel * channel,
116
+    GstWebRTCBin * webrtcbin)
117
+{
118
+  g_weak_ref_set (&channel->webrtcbin_weak, webrtcbin);
119
+}
120
gst-plugins-bad-1.22.2.tar.xz/ext/webrtc/webrtcdatachannel.h -> gst-plugins-bad-1.22.3.tar.xz/ext/webrtc/webrtcdatachannel.h Changed
21
 
1
@@ -51,7 +51,7 @@
2
   GstElement                       *sink_bin;
3
   GstElement                       *appsink;
4
 
5
-  GstWebRTCBin                     *webrtcbin;
6
+  GWeakRef                          webrtcbin_weak;
7
   gboolean                          opened;
8
   gulong                            src_probe;
9
   GError                           *stored_error;
10
@@ -72,6 +72,10 @@
11
 void    webrtc_data_channel_link_to_sctp (WebRTCDataChannel                 *channel,
12
                                           WebRTCSCTPTransport               *sctp_transport);
13
 
14
+G_GNUC_INTERNAL
15
+void    webrtc_data_channel_set_webrtcbin (WebRTCDataChannel                *channel,
16
+                                           GstWebRTCBin                     *webrtcbin);
17
+
18
 G_DECLARE_FINAL_TYPE (WebRTCErrorIgnoreBin, webrtc_error_ignore_bin, WEBRTC, ERROR_IGNORE_BIN, GstBin);
19
 
20
 G_END_DECLS
21
gst-plugins-bad-1.22.2.tar.xz/gst-libs/gst/codecs/gsth264decoder.c -> gst-plugins-bad-1.22.3.tar.xz/gst-libs/gst/codecs/gsth264decoder.c Changed
22
 
1
@@ -1792,10 +1792,16 @@
2
       picture->system_frame_number);
3
 
4
   if (!frame) {
5
-    GST_ERROR_OBJECT (self,
6
-        "No available codec frame with frame number %d",
7
-        picture->system_frame_number);
8
-    UPDATE_FLOW_RETURN (ret, GST_FLOW_ERROR);
9
+    /* The case where the end_picture() got failed and corresponding
10
+     * GstVideoCodecFrame was dropped already */
11
+    if (picture->nonexisting) {
12
+      GST_DEBUG_OBJECT (self, "Dropping non-existing picture %p", picture);
13
+    } else {
14
+      GST_ERROR_OBJECT (self,
15
+          "No available codec frame with frame number %d",
16
+          picture->system_frame_number);
17
+      UPDATE_FLOW_RETURN (ret, GST_FLOW_ERROR);
18
+    }
19
 
20
     gst_h264_picture_unref (picture);
21
 
22
gst-plugins-bad-1.22.2.tar.xz/gst-libs/gst/cuda/gstcudamemory.c -> gst-plugins-bad-1.22.3.tar.xz/gst-libs/gst/cuda/gstcudamemory.c Changed
16
 
1
@@ -518,11 +518,13 @@
2
     case GST_VIDEO_FORMAT_I420:
3
     case GST_VIDEO_FORMAT_YV12:
4
     case GST_VIDEO_FORMAT_I420_10LE:
5
+      alloc_height *= 2;
6
+      break;
7
     case GST_VIDEO_FORMAT_NV12:
8
     case GST_VIDEO_FORMAT_NV21:
9
     case GST_VIDEO_FORMAT_P010_10LE:
10
     case GST_VIDEO_FORMAT_P016_LE:
11
-      alloc_height *= 2;
12
+      alloc_height += alloc_height / 2;
13
       break;
14
     case GST_VIDEO_FORMAT_Y42B:
15
     case GST_VIDEO_FORMAT_I422_10LE:
16
gst-plugins-bad-1.22.2.tar.xz/gst-libs/gst/d3d11/gstd3d11memory.cpp -> gst-plugins-bad-1.22.3.tar.xz/gst-libs/gst/d3d11/gstd3d11memory.cpp Changed
29
 
1
@@ -1473,6 +1473,7 @@
2
   GstD3D11Memory *dmem;
3
   ID3D11RenderTargetView *rtv = nullptr;
4
   GstD3D11ClearRTVFunc clear_func = nullptr;
5
+  gboolean is_new_texture = TRUE;
6
 
7
   device_handle = gst_d3d11_device_get_device_handle (device);
8
 
9
@@ -1482,6 +1483,8 @@
10
       GST_ERROR_OBJECT (self, "Couldn't create texture");
11
       return nullptr;
12
     }
13
+  } else {
14
+    is_new_texture = FALSE;
15
   }
16
 
17
   mem =
18
@@ -1489,6 +1492,10 @@
19
   if (!mem)
20
     return nullptr;
21
 
22
+  /* Don't clear external texture */
23
+  if (!is_new_texture)
24
+    return mem;
25
+
26
   /* Clear with YUV black if needed and possible
27
    * TODO: do this using UAV if RTV is not allowed (e.g., packed YUV formats) */
28
   if ((desc->BindFlags & D3D11_BIND_RENDER_TARGET) == 0)
29
gst-plugins-bad-1.22.2.tar.xz/gst-libs/gst/play/gstplay.c -> gst-plugins-bad-1.22.3.tar.xz/gst-libs/gst/play/gstplay.c Changed
24
 
1
@@ -1762,9 +1762,11 @@
2
 
3
       g_object_get (G_OBJECT (self->playbin), "current-suburi", &suburi, NULL);
4
       if (suburi) {
5
-        if (self->use_playbin3 && self->subtitle_sid) {
6
-          if (g_str_equal (self->subtitle_sid, stream_info->stream_id))
7
+        if (self->use_playbin3) {
8
+          if (self->subtitle_sid &&
9
+              g_str_equal (self->subtitle_sid, stream_info->stream_id)) {
10
             info->language = g_path_get_basename (suburi);
11
+          }
12
         } else {
13
           g_object_get (G_OBJECT (self->playbin), "current-text", &text_index,
14
               NULL);
15
@@ -2387,7 +2389,7 @@
16
     gst_query_parse_seeking (query, NULL, &media_info->seekable, NULL, NULL);
17
   gst_query_unref (query);
18
 
19
-  if (self->use_playbin3 && self->collection) {
20
+  if (self->use_playbin3) {
21
     gst_play_streams_info_create_from_collection (self, media_info,
22
         self->collection);
23
   } else {
24
gst-plugins-bad-1.22.2.tar.xz/gst-libs/gst/webrtc/dtlstransport.c -> gst-plugins-bad-1.22.3.tar.xz/gst-libs/gst/webrtc/dtlstransport.c Changed
90
 
1
@@ -112,23 +112,35 @@
2
 
3
   switch (prop_id) {
4
     case PROP_SESSION_ID:
5
+      GST_OBJECT_LOCK (webrtc);
6
       g_value_set_uint (value, webrtc->session_id);
7
+      GST_OBJECT_UNLOCK (webrtc);
8
       break;
9
     case PROP_TRANSPORT:
10
+      GST_OBJECT_LOCK (webrtc);
11
       g_value_set_object (value, webrtc->transport);
12
+      GST_OBJECT_UNLOCK (webrtc);
13
       break;
14
     case PROP_STATE:
15
+      GST_OBJECT_LOCK (webrtc);
16
       g_value_set_enum (value, webrtc->state);
17
+      GST_OBJECT_UNLOCK (webrtc);
18
       break;
19
     case PROP_CLIENT:
20
+      GST_OBJECT_LOCK (webrtc);
21
       g_object_get_property (G_OBJECT (webrtc->dtlssrtpenc), "is-client",
22
           value);
23
+      GST_OBJECT_UNLOCK (webrtc);
24
       break;
25
     case PROP_CERTIFICATE:
26
+      GST_OBJECT_LOCK (webrtc);
27
       g_object_get_property (G_OBJECT (webrtc->dtlssrtpdec), "pem", value);
28
+      GST_OBJECT_UNLOCK (webrtc);
29
       break;
30
     case PROP_REMOTE_CERTIFICATE:
31
+      GST_OBJECT_LOCK (webrtc);
32
       g_object_get_property (G_OBJECT (webrtc->dtlssrtpdec), "peer-pem", value);
33
+      GST_OBJECT_UNLOCK (webrtc);
34
       break;
35
     default:
36
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
37
@@ -182,9 +194,13 @@
38
 static void
39
 gst_webrtc_dtls_transport_constructed (GObject * object)
40
 {
41
-  GstWebRTCDTLSTransport *webrtc = GST_WEBRTC_DTLS_TRANSPORT (object);
42
+  GstWebRTCDTLSTransport *webrtc = NULL;
43
   gchar *connection_id;
44
 
45
+  G_OBJECT_CLASS (parent_class)->constructed (object);
46
+
47
+  webrtc = GST_WEBRTC_DTLS_TRANSPORT (object);
48
+
49
   /* XXX: this may collide with another connection_id however this is only a
50
    * problem if multiple dtls element sets are being used within the same
51
    * process */
52
@@ -192,17 +208,28 @@
53
       g_random_int ());
54
 
55
   webrtc->dtlssrtpenc = gst_element_factory_make ("dtlssrtpenc", NULL);
56
+  gst_object_ref_sink (webrtc->dtlssrtpenc);
57
   g_object_set (webrtc->dtlssrtpenc, "connection-id", connection_id,
58
       "is-client", webrtc->client, "rtp-sync", FALSE, NULL);
59
 
60
   webrtc->dtlssrtpdec = gst_element_factory_make ("dtlssrtpdec", NULL);
61
+  gst_object_ref_sink (webrtc->dtlssrtpdec);
62
   g_object_set (webrtc->dtlssrtpdec, "connection-id", connection_id, NULL);
63
   g_free (connection_id);
64
 
65
   g_signal_connect (webrtc->dtlssrtpenc, "notify::connection-state",
66
       G_CALLBACK (on_connection_state_changed), webrtc);
67
+}
68
 
69
-  G_OBJECT_CLASS (parent_class)->constructed (object);
70
+static void
71
+gst_webrtc_dtls_transport_dispose (GObject * object)
72
+{
73
+  GstWebRTCDTLSTransport *webrtc = GST_WEBRTC_DTLS_TRANSPORT (object);
74
+
75
+  gst_clear_object (&webrtc->dtlssrtpdec);
76
+  gst_clear_object (&webrtc->dtlssrtpenc);
77
+
78
+  G_OBJECT_CLASS (parent_class)->dispose (object);
79
 }
80
 
81
 static void
82
@@ -211,6 +238,7 @@
83
   GObjectClass *gobject_class = (GObjectClass *) klass;
84
 
85
   gobject_class->constructed = gst_webrtc_dtls_transport_constructed;
86
+  gobject_class->dispose = gst_webrtc_dtls_transport_dispose;
87
   gobject_class->get_property = gst_webrtc_dtls_transport_get_property;
88
   gobject_class->set_property = gst_webrtc_dtls_transport_set_property;
89
   gobject_class->finalize = gst_webrtc_dtls_transport_finalize;
90
gst-plugins-bad-1.22.2.tar.xz/gst-libs/gst/webrtc/nice/nice.c -> gst-plugins-bad-1.22.3.tar.xz/gst-libs/gst/webrtc/nice/nice.c Changed
19
 
1
@@ -750,6 +750,8 @@
2
   }
3
 
4
   new_addr = g_inet_address_to_string (addresses->data);
5
+  g_resolver_free_addresses (addresses);
6
+  addresses = NULL;
7
 
8
   new_candv0 = rc->prefix;
9
   new_candv1 = new_addr;
10
@@ -1317,6 +1319,8 @@
11
 
12
   /* XXX: only the first IP is used */
13
   ip = g_inet_address_to_string (addresses->data);
14
+  g_resolver_free_addresses (addresses);
15
+  addresses = NULL;
16
 
17
   if (!ip) {
18
     GST_ERROR_OBJECT (ice, "failed to resolve host for proxy");
19
gst-plugins-bad-1.22.2.tar.xz/gst-plugins-bad.doap -> gst-plugins-bad-1.22.3.tar.xz/gst-plugins-bad.doap Changed
18
 
1
@@ -35,6 +35,16 @@
2
 
3
  <release>
4
   <Version>
5
+   <revision>1.22.3</revision>
6
+   <branch>1.22</branch>
7
+   <name></name>
8
+   <created>2023-05-19</created>
9
+   <file-release rdf:resource="https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.22.3.tar.xz" />
10
+  </Version>
11
+ </release>
12
+
13
+ <release>
14
+  <Version>
15
    <revision>1.22.2</revision>
16
    <branch>1.22</branch>
17
    <name></name>
18
gst-plugins-bad-1.22.2.tar.xz/gst/codectimestamper/meson.build -> gst-plugins-bad-1.22.3.tar.xz/gst/codectimestamper/meson.build Changed
7
 
1
@@ -13,5 +13,4 @@
2
   install : true,
3
   install_dir : plugins_install_dir,
4
 )
5
-pkgconfig.generate(gstcodectimestamper, install_dir : plugins_pkgconfig_install_dir)
6
 plugins += gstcodectimestamper
7
gst-plugins-bad-1.22.2.tar.xz/gst/mpegdemux/gstmpegdemux.c -> gst-plugins-bad-1.22.3.tar.xz/gst/mpegdemux/gstmpegdemux.c Changed
125
 
1
@@ -59,8 +59,8 @@
2
 #define SCAN_SCR_SZ                 12
3
 #define SCAN_PTS_SZ                 80
4
 
5
-#define SEGMENT_THRESHOLD (300*GST_MSECOND)
6
-#define VIDEO_SEGMENT_THRESHOLD (500*GST_MSECOND)
7
+#define DEFAULT_GAP_THRESHOLD (300*GST_MSECOND)
8
+#define VIDEO_GAP_THRESHOLD   (500*GST_MSECOND)
9
 
10
 #define DURATION_SCAN_LIMIT         4 * 1024 * 1024
11
 
12
@@ -417,7 +417,7 @@
13
   gchar *name;
14
   GstPsDemuxClass *klass = GST_PS_DEMUX_GET_CLASS (demux);
15
   GstCaps *caps;
16
-  GstClockTime threshold = SEGMENT_THRESHOLD;
17
+  GstClockTime gap_threshold = DEFAULT_GAP_THRESHOLD;
18
   GstEvent *event;
19
   gchar *stream_id;
20
 
21
@@ -449,7 +449,7 @@
22
           "mpegversion", G_TYPE_INT, mpeg_version,
23
           "systemstream", G_TYPE_BOOLEAN, FALSE,
24
           "parsed", G_TYPE_BOOLEAN, FALSE, NULL);
25
-      threshold = VIDEO_SEGMENT_THRESHOLD;
26
+      gap_threshold = VIDEO_GAP_THRESHOLD;
27
       break;
28
     }
29
     case ST_AUDIO_MPEG1:
30
@@ -488,14 +488,14 @@
31
       name = g_strdup_printf ("video_%02x", id);
32
       caps = gst_caps_new_simple ("video/x-h264",
33
           "stream-format", G_TYPE_STRING, "byte-stream", NULL);
34
-      threshold = VIDEO_SEGMENT_THRESHOLD;
35
+      gap_threshold = VIDEO_GAP_THRESHOLD;
36
       break;
37
     case ST_VIDEO_H265:
38
       template = klass->video_template;
39
       name = g_strdup_printf ("video_%02x", id);
40
       caps = gst_caps_new_simple ("video/x-h265",
41
           "stream-format", G_TYPE_STRING, "byte-stream", NULL);
42
-      threshold = VIDEO_SEGMENT_THRESHOLD;
43
+      gap_threshold = VIDEO_GAP_THRESHOLD;
44
       break;
45
 
46
     case ST_PS_AUDIO_AC3:
47
@@ -542,7 +542,11 @@
48
   stream->type = stream_type;
49
   stream->pending_tags = NULL;
50
   stream->pad = gst_pad_new_from_template (template, name);
51
-  stream->segment_thresh = threshold;
52
+  stream->gap_threshold = gap_threshold;
53
+  stream->nb_out_buffers = 0;
54
+  stream->gap_ref_buffers = 0;
55
+  stream->gap_ref_pts = GST_CLOCK_TIME_NONE;
56
+
57
   gst_pad_set_event_function (stream->pad,
58
       GST_DEBUG_FUNCPTR (gst_ps_demux_src_event));
59
   gst_pad_set_query_function (stream->pad,
60
@@ -766,6 +770,8 @@
61
       GST_TIME_FORMAT ", size %" G_GSIZE_FORMAT,
62
       stream->id, stream->type, GST_TIME_ARGS (pts), gst_buffer_get_size (buf));
63
   result = gst_pad_push (stream->pad, buf);
64
+  stream->nb_out_buffers += 1;
65
+
66
   GST_LOG_OBJECT (demux, "result: %s", gst_flow_get_name (result));
67
 
68
   return result;
69
@@ -1001,13 +1007,13 @@
70
 }
71
 
72
 static inline void
73
-gst_ps_demux_send_gap_updates (GstPsDemux * demux, GstClockTime new_start)
74
+gst_ps_demux_send_gap_updates (GstPsDemux * demux, GstClockTime time)
75
 {
76
   GstClockTime base_time, stop;
77
   gint i, count = demux->found_count;
78
   GstEvent *event = NULL;
79
 
80
-  if (new_start == GST_CLOCK_TIME_NONE)
81
+  if (time == GST_CLOCK_TIME_NONE)
82
     return;
83
 
84
   /* Advance all lagging streams by sending a gap event */
85
@@ -1018,7 +1024,7 @@
86
   if (stop != GST_CLOCK_TIME_NONE)
87
     stop += base_time;
88
 
89
-  if (new_start > stop)
90
+  if (time > stop)
91
     return;
92
 
93
   /* FIXME: Handle reverse playback */
94
@@ -1030,19 +1036,25 @@
95
           stream->last_ts < demux->src_segment.start + base_time)
96
         stream->last_ts = demux->src_segment.start + base_time;
97
 
98
-      if (stream->last_ts + stream->segment_thresh < new_start) {
99
+      if (stream->last_ts + stream->gap_threshold < time &&
100
+          stream->nb_out_buffers == stream->gap_ref_buffers &&
101
+          stream->gap_ref_pts != stream->last_ts) {
102
         /* should send segment info before gap event */
103
         gst_ps_demux_send_segment (demux, stream, GST_CLOCK_TIME_NONE);
104
 
105
         GST_LOG_OBJECT (demux,
106
             "Sending gap update to pad %s from time %" GST_TIME_FORMAT " to %"
107
             GST_TIME_FORMAT, GST_PAD_NAME (stream->pad),
108
-            GST_TIME_ARGS (stream->last_ts), GST_TIME_ARGS (new_start));
109
-        event =
110
-            gst_event_new_gap (stream->last_ts, new_start - stream->last_ts);
111
+            GST_TIME_ARGS (stream->last_ts), GST_TIME_ARGS (time));
112
+        event = gst_event_new_gap (stream->last_ts, time - stream->last_ts);
113
         gst_pad_push_event (stream->pad, event);
114
-        stream->last_ts = new_start;
115
+        stream->last_ts = time;
116
       }
117
+
118
+      /* Update GAP tracking vars so we don't re-check this stream for a while */
119
+      stream->gap_ref_pts = time;
120
+      if (stream->last_ts != GST_CLOCK_TIME_NONE && stream->last_ts > time)
121
+        stream->gap_ref_pts = stream->last_ts;
122
     }
123
   }
124
 }
125
gst-plugins-bad-1.22.2.tar.xz/gst/mpegdemux/gstmpegdemux.h -> gst-plugins-bad-1.22.3.tar.xz/gst/mpegdemux/gstmpegdemux.h Changed
18
 
1
@@ -92,7 +92,15 @@
2
   gint id;
3
   gint type;
4
 
5
-  GstClockTime segment_thresh;
6
+  /* Threshold for sending a GAP event on this stream */
7
+  GstClockTime gap_threshold;
8
+  /* Reference PTS used to detect gaps */
9
+  GstClockTime gap_ref_pts;
10
+  /* Number of outputted buffers */
11
+  guint32 nb_out_buffers;
12
+  /* Reference number of buffers for gaps */
13
+  guint32 gap_ref_buffers;
14
+
15
   GstClockTime last_ts;
16
 
17
   gboolean discont;
18
gst-plugins-bad-1.22.2.tar.xz/gst/mpegtsdemux/tsdemux.c -> gst-plugins-bad-1.22.3.tar.xz/gst/mpegtsdemux/tsdemux.c Changed
9
 
1
@@ -1545,6 +1545,7 @@
2
               channels = channel_config_code ? (channel_config_code & 0x0f) : 2;
3
               if (channel_config_code == 0 || channel_config_code == 0x80) {
4
                 /* Dual Mono */
5
+                channels = 2;
6
                 mapping_family = 255;
7
                 if (channel_config_code == 0) {
8
                   stream_count = 1;
9
gst-plugins-bad-1.22.2.tar.xz/meson.build -> gst-plugins-bad-1.22.3.tar.xz/meson.build Changed
8
 
1
@@ -1,5 +1,5 @@
2
 project('gst-plugins-bad', 'c', 'cpp',
3
-  version : '1.22.2',
4
+  version : '1.22.3',
5
   meson_version : '>= 0.62',
6
   default_options :  'warning_level=1',
7
                       'buildtype=debugoptimized' )
8
gst-plugins-bad-1.22.2.tar.xz/po/gst-plugins-bad-1.0.pot -> gst-plugins-bad-1.22.3.tar.xz/po/gst-plugins-bad-1.0.pot Changed
13
 
1
@@ -6,9 +6,9 @@
2
 #, fuzzy
3
 msgid ""
4
 msgstr ""
5
-"Project-Id-Version: gst-plugins-bad-1.22.2\n"
6
+"Project-Id-Version: gst-plugins-bad-1.22.3\n"
7
 "Report-Msgid-Bugs-To: \n"
8
-"POT-Creation-Date: 2023-04-11 17:33+0100\n"
9
+"POT-Creation-Date: 2023-05-19 09:26+0100\n"
10
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
11
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12
 "Language-Team: LANGUAGE <LL@li.org>\n"
13
gst-plugins-bad-1.22.2.tar.xz/po/gst-plugins-bad.pot -> gst-plugins-bad-1.22.3.tar.xz/po/gst-plugins-bad.pot Changed
13
 
1
@@ -6,9 +6,9 @@
2
 #, fuzzy
3
 msgid ""
4
 msgstr ""
5
-"Project-Id-Version: gst-plugins-bad-1.22.2\n"
6
+"Project-Id-Version: gst-plugins-bad-1.22.3\n"
7
 "Report-Msgid-Bugs-To: \n"
8
-"POT-Creation-Date: 2023-04-11 17:33+0100\n"
9
+"POT-Creation-Date: 2023-05-19 09:26+0100\n"
10
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
11
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12
 "Language-Team: LANGUAGE <LL@li.org>\n"
13
gst-plugins-bad-1.22.2.tar.xz/sys/bluez/gstavdtputil.c -> gst-plugins-bad-1.22.3.tar.xz/sys/bluez/gstavdtputil.c Changed
28
 
1
@@ -372,10 +372,22 @@
2
   g_value_reset (list);
3
 
4
   /* bitpool */
5
-  value = g_value_init (value, GST_TYPE_INT_RANGE);
6
-  gst_value_set_int_range (value,
7
-      MIN (sbc->min_bitpool, TEMPLATE_MAX_BITPOOL),
8
-      MIN (sbc->max_bitpool, TEMPLATE_MAX_BITPOOL));
9
+  /* The reported bitpool can be a fixed value instead
10
+   * of a range, but GStreamer ranges do not allow for
11
+   * the min == max case, so use int as value in such
12
+   * cases instead. The bitpool value is used by
13
+   * sbcenc, sbcdec, rtpsbcpay, and all of them use
14
+   * a fixated version of that value, so there is no
15
+   * problem with int vs. int-range type mismatches. */
16
+  if (sbc->min_bitpool == sbc->max_bitpool) {
17
+    value = g_value_init (value, G_TYPE_INT);
18
+    g_value_set_int (value, MIN (sbc->max_bitpool, TEMPLATE_MAX_BITPOOL));
19
+  } else {
20
+    value = g_value_init (value, GST_TYPE_INT_RANGE);
21
+    gst_value_set_int_range (value,
22
+        MIN (sbc->min_bitpool, TEMPLATE_MAX_BITPOOL),
23
+        MIN (sbc->max_bitpool, TEMPLATE_MAX_BITPOOL));
24
+  }
25
   gst_structure_set_value (structure, "bitpool", value);
26
   g_value_unset (value);
27
 
28
gst-plugins-bad-1.22.2.tar.xz/sys/d3d11/gstd3d11compositor.cpp -> gst-plugins-bad-1.22.3.tar.xz/sys/d3d11/gstd3d11compositor.cpp Changed
49
 
1
@@ -320,6 +320,7 @@
2
   GstD3D11Device *device;
3
 
4
   GstBuffer *fallback_buf;
5
+  GstCaps *negotiated_caps;
6
 
7
   GstD3D11CompositorQuad *checker_background;
8
   /* black/white/transparent */
9
@@ -765,6 +766,9 @@
10
    *     left unscaled)
11
    */
12
 
13
+  if (cpad->alpha == 0)
14
+    return TRUE;
15
+
16
   gst_d3d11_compositor_pad_get_output_size (cpad, GST_VIDEO_INFO_PAR_N (info),
17
       GST_VIDEO_INFO_PAR_D (info), &width, &height, &x_offset, &y_offset);
18
 
19
@@ -1261,6 +1265,7 @@
20
 
21
   g_clear_pointer (&self->checker_background, gst_d3d11_compositor_quad_free);
22
   gst_clear_object (&self->device);
23
+  gst_clear_caps (&self->negotiated_caps);
24
 
25
   return GST_AGGREGATOR_CLASS (parent_class)->stop (agg);
26
 }
27
@@ -1626,6 +1631,11 @@
28
     return FALSE;
29
   }
30
 
31
+  if (self->negotiated_caps && gst_caps_is_equal (self->negotiated_caps, caps)) {
32
+    GST_DEBUG_OBJECT (self, "Negotiated caps is not changed");
33
+    goto done;
34
+  }
35
+
36
   features = gst_caps_get_features (caps, 0);
37
   if (features
38
       && gst_caps_features_contains (features,
39
@@ -1682,6 +1692,9 @@
40
     gst_object_unref (pool);
41
   }
42
 
43
+  gst_caps_replace (&self->negotiated_caps, caps);
44
+
45
+done:
46
   return GST_AGGREGATOR_CLASS (parent_class)->negotiated_src_caps (agg, caps);
47
 }
48
 
49
gst-plugins-bad-1.22.2.tar.xz/sys/d3d11/gstd3d11convert.cpp -> gst-plugins-bad-1.22.3.tar.xz/sys/d3d11/gstd3d11convert.cpp Changed
200
 
1
@@ -71,9 +71,15 @@
2
 
3
   /* Updated by subclass */
4
   gboolean add_borders;
5
+  gboolean active_add_borders;
6
+
7
   guint64 border_color;
8
+
9
   GstVideoGammaMode gamma_mode;
10
+  GstVideoGammaMode active_gamma_mode;
11
+
12
   GstVideoPrimariesMode primaries_mode;
13
+  GstVideoPrimariesMode active_primaries_mode;
14
 
15
   /* orientation */
16
   /* method configured via property */
17
@@ -117,6 +123,8 @@
18
     GstBuffer ** buffer);
19
 static gboolean gst_d3d11_base_convert_transform_meta (GstBaseTransform * trans,
20
     GstBuffer * outbuf, GstMeta * meta, GstBuffer * inbuf);
21
+static void gst_d3d11_base_convert_before_transform (GstBaseTransform * trans,
22
+    GstBuffer * buffer);
23
 static GstFlowReturn gst_d3d11_base_convert_transform (GstBaseTransform *
24
     trans, GstBuffer * inbuf, GstBuffer * outbuf);
25
 static gboolean gst_d3d11_base_convert_set_info (GstD3D11BaseFilter * filter,
26
@@ -283,6 +291,8 @@
27
       GST_DEBUG_FUNCPTR (gst_d3d11_base_convert_generate_output);
28
   trans_class->transform_meta =
29
       GST_DEBUG_FUNCPTR (gst_d3d11_base_convert_transform_meta);
30
+  trans_class->before_transform =
31
+      GST_DEBUG_FUNCPTR (gst_d3d11_base_convert_before_transform);
32
   trans_class->transform = GST_DEBUG_FUNCPTR (gst_d3d11_base_convert_transform);
33
 
34
   bfilter_class->set_info = GST_DEBUG_FUNCPTR (gst_d3d11_base_convert_set_info);
35
@@ -294,10 +304,10 @@
36
 static void
37
 gst_d3d11_base_convert_init (GstD3D11BaseConvert * self)
38
 {
39
-  self->add_borders = DEFAULT_ADD_BORDERS;
40
+  self->add_borders = self->active_add_borders = DEFAULT_ADD_BORDERS;
41
   self->border_color = DEFAULT_BORDER_COLOR;
42
-  self->gamma_mode = DEFAULT_GAMMA_MODE;
43
-  self->primaries_mode = DEFAULT_PRIMARIES_MODE;
44
+  self->gamma_mode = self->active_gamma_mode = DEFAULT_GAMMA_MODE;
45
+  self->primaries_mode = self->active_primaries_mode = DEFAULT_PRIMARIES_MODE;
46
 }
47
 
48
 static void
49
@@ -1450,6 +1460,14 @@
50
 
51
   GstD3D11SRWLockGuard lk (&self->lock);
52
   self->active_method = self->selected_method;
53
+  self->active_add_borders = self->add_borders;
54
+  self->active_gamma_mode = self->gamma_mode;
55
+  self->active_primaries_mode = self->primaries_mode;
56
+
57
+  GST_DEBUG_OBJECT (self, "method %d, add-borders %d, gamma-mode %d, "
58
+      "primaries-mode %d", self->active_method,
59
+      self->active_add_borders, self->active_gamma_mode,
60
+      self->active_primaries_mode);
61
 
62
   if (self->active_method != GST_VIDEO_ORIENTATION_IDENTITY)
63
     need_flip = TRUE;
64
@@ -1492,7 +1510,7 @@
65
 
66
   self->borders_w = self->borders_h = 0;
67
   if (to_dar_n != from_dar_n || to_dar_d != from_dar_d) {
68
-    if (self->add_borders) {
69
+    if (self->active_add_borders) {
70
       gint n, d, to_h, to_w;
71
 
72
       if (from_dar_n != -1 && from_dar_d != -1
73
@@ -1539,9 +1557,9 @@
74
 
75
   config = gst_structure_new ("convert-config",
76
       GST_D3D11_CONVERTER_OPT_GAMMA_MODE,
77
-      GST_TYPE_VIDEO_GAMMA_MODE, self->gamma_mode,
78
+      GST_TYPE_VIDEO_GAMMA_MODE, self->active_gamma_mode,
79
       GST_D3D11_CONVERTER_OPT_PRIMARIES_MODE,
80
-      GST_TYPE_VIDEO_PRIMARIES_MODE, self->primaries_mode, nullptr);
81
+      GST_TYPE_VIDEO_PRIMARIES_MODE, self->active_primaries_mode, nullptr);
82
 
83
   self->converter = gst_d3d11_converter_new (filter->device, in_info, out_info,
84
       config);
85
@@ -1844,6 +1862,53 @@
86
       outbuf, meta, inbuf);
87
 }
88
 
89
+static void
90
+gst_d3d11_base_convert_before_transform (GstBaseTransform * trans,
91
+    GstBuffer * buffer)
92
+{
93
+  GstD3D11BaseConvert *self = GST_D3D11_BASE_CONVERT (trans);
94
+  GstCaps *in_caps;
95
+  GstCaps *out_caps;
96
+  GstBaseTransformClass *klass;
97
+  gboolean update = FALSE;
98
+
99
+  GST_BASE_TRANSFORM_CLASS (parent_class)->before_transform (trans, buffer);
100
+
101
+  AcquireSRWLockExclusive (&self->lock);
102
+  if (self->selected_method != self->active_method ||
103
+      self->add_borders != self->active_add_borders ||
104
+      self->gamma_mode != self->active_gamma_mode ||
105
+      self->primaries_mode != self->active_primaries_mode) {
106
+    update = TRUE;
107
+  }
108
+  ReleaseSRWLockExclusive (&self->lock);
109
+
110
+  if (!update)
111
+    return;
112
+
113
+  GST_DEBUG_OBJECT (self, "Updating caps for property change");
114
+
115
+  in_caps = gst_pad_get_current_caps (GST_BASE_TRANSFORM_SINK_PAD (trans));
116
+  if (!in_caps) {
117
+    GST_WARNING_OBJECT (trans, "sinkpad has no current caps");
118
+    return;
119
+  }
120
+
121
+  out_caps = gst_pad_get_current_caps (GST_BASE_TRANSFORM_SRC_PAD (trans));
122
+  if (!out_caps) {
123
+    GST_WARNING_OBJECT (trans, "srcpad has no current caps");
124
+    gst_caps_unref (in_caps);
125
+    return;
126
+  }
127
+
128
+  klass = GST_BASE_TRANSFORM_GET_CLASS (trans);
129
+  klass->set_caps (trans, in_caps, out_caps);
130
+  gst_caps_unref (in_caps);
131
+  gst_caps_unref (out_caps);
132
+
133
+  gst_base_transform_reconfigure_src (trans);
134
+}
135
+
136
 static GstFlowReturn
137
 gst_d3d11_base_convert_transform (GstBaseTransform * trans,
138
     GstBuffer * inbuf, GstBuffer * outbuf)
139
@@ -1889,10 +1954,10 @@
140
 gst_d3d11_base_convert_set_add_border (GstD3D11BaseConvert * self,
141
     gboolean add_border)
142
 {
143
-  gboolean prev = self->add_borders;
144
+  GstD3D11SRWLockGuard lk (&self->lock);
145
 
146
   self->add_borders = add_border;
147
-  if (prev != self->add_borders)
148
+  if (self->add_borders != self->active_add_borders)
149
     gst_base_transform_reconfigure_src (GST_BASE_TRANSFORM_CAST (self));
150
 }
151
 
152
@@ -1940,9 +2005,11 @@
153
     GstVideoGammaMode mode)
154
 {
155
   GstD3D11SRWLockGuard lk (&self->lock);
156
-  if (self->gamma_mode != mode) {
157
-    GST_DEBUG_OBJECT (self, "Gamma mode %d -> %d", self->gamma_mode, mode);
158
-    self->gamma_mode = mode;
159
+  GstVideoGammaMode prev_mode = self->gamma_mode;
160
+  self->gamma_mode = mode;
161
+
162
+  if (self->gamma_mode != self->active_gamma_mode) {
163
+    GST_DEBUG_OBJECT (self, "Gamma mode %d -> %d", prev_mode, self->gamma_mode);
164
     gst_base_transform_reconfigure_src (GST_BASE_TRANSFORM (self));
165
   }
166
 }
167
@@ -1952,23 +2019,26 @@
168
     GstVideoPrimariesMode mode)
169
 {
170
   GstD3D11SRWLockGuard lk (&self->lock);
171
-  if (self->primaries_mode != mode) {
172
+  GstVideoPrimariesMode prev_mode = self->primaries_mode;
173
+  self->primaries_mode = mode;
174
+
175
+  if (self->primaries_mode != self->active_primaries_mode) {
176
     gboolean prev_enabled = TRUE;
177
     gboolean new_enabled = TRUE;
178
 
179
     GST_DEBUG_OBJECT (self, "Primaries mode %d -> %d",
180
-        self->primaries_mode, mode);
181
+        prev_mode, self->primaries_mode);
182
 
183
-    if (self->primaries_mode == GST_VIDEO_PRIMARIES_MODE_NONE)
184
+    if (prev_mode == GST_VIDEO_PRIMARIES_MODE_NONE)
185
       prev_enabled = FALSE;
186
 
187
-    if (mode == GST_VIDEO_PRIMARIES_MODE_NONE)
188
+    if (self->primaries_mode == GST_VIDEO_PRIMARIES_MODE_NONE)
189
       new_enabled = FALSE;
190
 
191
-    self->primaries_mode = mode;
192
-
193
     if (prev_enabled != new_enabled)
194
       gst_base_transform_reconfigure_src (GST_BASE_TRANSFORM (self));
195
+    else
196
+      self->active_primaries_mode = self->primaries_mode;
197
   }
198
 }
199
 
200
gst-plugins-bad-1.22.2.tar.xz/sys/d3d11/gstd3d11videosink.cpp -> gst-plugins-bad-1.22.3.tar.xz/sys/d3d11/gstd3d11videosink.cpp Changed
27
 
1
@@ -834,6 +834,7 @@
2
     if (ret == GST_FLOW_FLUSHING) {
3
       GstD3D11CSLockGuard lk (&self->lock);
4
       GST_WARNING_OBJECT (self, "Couldn't prepare window but we are flushing");
5
+      gst_d3d11_window_unprepare (self->window);
6
       gst_clear_object (&self->window);
7
       gst_object_unref (window);
8
 
9
@@ -1227,8 +1228,6 @@
10
   if (self->window)
11
     gst_d3d11_window_unlock_stop (self->window);
12
 
13
-  gst_clear_buffer (&self->prepared_buffer);
14
-
15
   return TRUE;
16
 }
17
 
18
@@ -1441,6 +1440,8 @@
19
     ret = GST_FLOW_ERROR;
20
   }
21
 
22
+  gst_clear_buffer (&self->prepared_buffer);
23
+
24
   return ret;
25
 }
26
 
27
gst-plugins-bad-1.22.2.tar.xz/sys/d3d11/gstd3d11window_win32.cpp -> gst-plugins-bad-1.22.3.tar.xz/sys/d3d11/gstd3d11window_win32.cpp Changed
467
 
1
@@ -35,6 +35,7 @@
2
 #define GST_CAT_DEFAULT gst_d3d11_window_debug
3
 
4
 G_LOCK_DEFINE_STATIC (create_lock);
5
+G_LOCK_DEFINE_STATIC (get_instance_lock);
6
 
7
 #define EXTERNAL_PROC_PROP_NAME "d3d11_window_external_proc"
8
 #define D3D11_WINDOW_PROP_NAME "gst_d3d11_window_win32_object"
9
@@ -44,6 +45,7 @@
10
 #define WM_GST_D3D11_DESTROY_INTERNAL_WINDOW (WM_USER + 3)
11
 #define WM_GST_D3D11_MOVE_WINDOW (WM_USER + 4)
12
 #define WM_GST_D3D11_SHOW_WINDOW (WM_USER + 5)
13
+#define WS_GST_D3D11 (WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_OVERLAPPEDWINDOW)
14
 
15
 static LRESULT CALLBACK window_proc (HWND hWnd, UINT uMsg, WPARAM wParam,
16
     LPARAM lParam);
17
@@ -120,7 +122,8 @@
18
 static gboolean
19
 gst_d3d11_window_win32_create_internal_window (GstD3D11WindowWin32 * self);
20
 static void gst_d3d11_window_win32_destroy_internal_window (HWND hwnd);
21
-static void gst_d3d11_window_win32_release_external_handle (HWND hwnd);
22
+static void
23
+gst_d3d11_window_win32_release_external_handle (GstD3D11WindowWin32 * self);
24
 static void
25
 gst_d3d11_window_win32_on_resize (GstD3D11Window * window,
26
     guint width, guint height);
27
@@ -136,7 +139,8 @@
28
 static gboolean gst_d3d11_window_win32_unlock (GstD3D11Window * window);
29
 static gboolean gst_d3d11_window_win32_unlock_stop (GstD3D11Window * window);
30
 static GstFlowReturn
31
-gst_d3d11_window_win32_set_external_handle (GstD3D11WindowWin32 * self);
32
+gst_d3d11_window_win32_set_external_handle (GstD3D11WindowWin32 * self,
33
+    HWND hwnd);
34
 
35
 static void
36
 gst_d3d11_window_win32_class_init (GstD3D11WindowWin32Class * klass)
37
@@ -203,8 +207,8 @@
38
 static void
39
 gst_d3d11_window_win32_dispose (GObject * object)
40
 {
41
+  GST_DEBUG_OBJECT (object, "dispose");
42
   gst_d3d11_window_win32_unprepare (GST_D3D11_WINDOW (object));
43
-
44
   G_OBJECT_CLASS (parent_class)->dispose (object);
45
 }
46
 
47
@@ -229,11 +233,8 @@
48
     return GST_FLOW_ERROR;
49
   }
50
 
51
-  self->overlay_state = GST_D3D11_WINDOW_WIN32_OVERLAY_STATE_NONE;
52
-  self->external_hwnd = hwnd;
53
-
54
   GST_DEBUG_OBJECT (self, "Preparing external handle");
55
-  ret = gst_d3d11_window_win32_set_external_handle (self);
56
+  ret = gst_d3d11_window_win32_set_external_handle (self, hwnd);
57
   if (ret != GST_FLOW_OK) {
58
     gst_structure_free (config);
59
     if (ret == GST_FLOW_FLUSHING) {
60
@@ -260,9 +261,13 @@
61
 {
62
   GstD3D11WindowWin32 *self = GST_D3D11_WINDOW_WIN32 (window);
63
 
64
+  GST_DEBUG_OBJECT (self, "unprepare");
65
+
66
   if (self->external_hwnd) {
67
-    gst_d3d11_window_win32_release_external_handle (self->external_hwnd);
68
+    G_LOCK (get_instance_lock);
69
+    gst_d3d11_window_win32_release_external_handle (self);
70
     RemovePropA (self->internal_hwnd, D3D11_WINDOW_PROP_NAME);
71
+    G_UNLOCK (get_instance_lock);
72
 
73
     if (self->internal_hwnd_thread == g_thread_self ()) {
74
       /* State changing thread is identical to internal window thread.
75
@@ -270,10 +275,10 @@
76
 
77
       GST_INFO_OBJECT (self, "Closing internal window immediately");
78
       gst_d3d11_window_win32_destroy_internal_window (self->internal_hwnd);
79
-    } else {
80
+    } else if (self->internal_hwnd) {
81
       /* We cannot destroy internal window from non-window thread.
82
        * and we cannot use synchronously SendMessage() method at this point
83
-       * since window thread might be wait for current thread and SendMessage()
84
+       * since window thread might be waiting for current thread and SendMessage()
85
        * will be blocked until it's called from window thread.
86
        * Instead, posts message so that it can be closed from window thread
87
        * asynchronously */
88
@@ -307,15 +312,29 @@
89
   }
90
 }
91
 
92
+static GstD3D11WindowWin32 *
93
+gst_d3d11_window_win32_hwnd_get_instance (HWND hwnd)
94
+{
95
+  HANDLE handle;
96
+  G_LOCK (get_instance_lock);
97
+  handle = GetPropA (hwnd, D3D11_WINDOW_PROP_NAME);
98
+  if (handle)
99
+    handle = gst_object_ref (handle);
100
+  G_UNLOCK (get_instance_lock);
101
+
102
+  return (GstD3D11WindowWin32 *) handle;
103
+}
104
+
105
 static void
106
 gst_d3d11_window_win32_set_render_rectangle (GstD3D11Window * window,
107
     const GstVideoRectangle * rect)
108
 {
109
   GstD3D11WindowWin32 *self = GST_D3D11_WINDOW_WIN32 (window);
110
 
111
+  self->render_rect = *rect;
112
+
113
   if (self->external_hwnd && self->internal_hwnd) {
114
     g_atomic_int_add (&self->pending_move_window, 1);
115
-    self->render_rect = *rect;
116
 
117
     if (self->internal_hwnd_thread == g_thread_self ()) {
118
       /* We are on message pumping thread already, handle this synchroniously */
119
@@ -464,41 +483,47 @@
120
   if (!hwnd)
121
     return;
122
 
123
+  ShowWindow (hwnd, SW_HIDE);
124
   SetParent (hwnd, NULL);
125
 
126
   GST_INFO ("Destroying internal window %" G_GUINTPTR_FORMAT, (guintptr) hwnd);
127
 
128
   if (!DestroyWindow (hwnd))
129
-    GST_WARNING ("failed to destroy window %" G_GUINTPTR_FORMAT
130
+    g_critical ("failed to destroy window %" G_GUINTPTR_FORMAT
131
         ", 0x%x", (guintptr) hwnd, (guint) GetLastError ());
132
 }
133
 
134
 static GstFlowReturn
135
-gst_d3d11_window_win32_set_external_handle (GstD3D11WindowWin32 * self)
136
+gst_d3d11_window_win32_set_external_handle (GstD3D11WindowWin32 * self,
137
+    HWND hwnd)
138
 {
139
   WNDPROC external_window_proc;
140
   GstFlowReturn ret = GST_FLOW_OK;
141
 
142
-  external_window_proc =
143
-      (WNDPROC) GetWindowLongPtrA (self->external_hwnd, GWLP_WNDPROC);
144
+  GstD3D11SRWLockGuard lk (&self->lock);
145
+  self->overlay_state = GST_D3D11_WINDOW_WIN32_OVERLAY_STATE_NONE;
146
+  self->external_hwnd = hwnd;
147
+
148
+  G_LOCK (get_instance_lock);
149
+  external_window_proc = (WNDPROC) GetWindowLongPtrA (hwnd, GWLP_WNDPROC);
150
 
151
   GST_DEBUG_OBJECT (self, "set external window %" G_GUINTPTR_FORMAT
152
-      ", original window procedure %p", (guintptr) self->external_hwnd,
153
-      external_window_proc);
154
+      ", original window procedure %p", (guintptr) hwnd, external_window_proc);
155
+
156
+  g_assert (external_window_proc != sub_class_proc);
157
+  g_warn_if_fail (GetPropA (hwnd, EXTERNAL_PROC_PROP_NAME) == NULL);
158
+  g_warn_if_fail (GetPropA (hwnd, D3D11_WINDOW_PROP_NAME) == NULL);
159
 
160
-  SetPropA (self->external_hwnd, EXTERNAL_PROC_PROP_NAME,
161
-      (HANDLE) external_window_proc);
162
-  SetPropA (self->external_hwnd, D3D11_WINDOW_PROP_NAME, self);
163
-  SetWindowLongPtrA (self->external_hwnd, GWLP_WNDPROC,
164
-      (LONG_PTR) sub_class_proc);
165
+  SetPropA (hwnd, EXTERNAL_PROC_PROP_NAME, (HANDLE) external_window_proc);
166
+  SetPropA (hwnd, D3D11_WINDOW_PROP_NAME, self);
167
+
168
+  SetWindowLongPtrA (hwnd, GWLP_WNDPROC, (LONG_PTR) sub_class_proc);
169
+  G_UNLOCK (get_instance_lock);
170
 
171
   /* SendMessage() may cause deadlock if parent window thread is busy
172
    * for changing pipeline's state. Post our message instead, and wait for
173
    * the parent window's thread or flushing */
174
-  PostMessageA (self->external_hwnd, WM_GST_D3D11_CONSTRUCT_INTERNAL_WINDOW,
175
-      0, 0);
176
-
177
-  GstD3D11SRWLockGuard lk (&self->lock);
178
+  PostMessageA (hwnd, WM_GST_D3D11_CONSTRUCT_INTERNAL_WINDOW, 0, 0);
179
   while (self->external_hwnd &&
180
       self->overlay_state == GST_D3D11_WINDOW_WIN32_OVERLAY_STATE_NONE &&
181
       !self->flushing) {
182
@@ -516,27 +541,29 @@
183
 }
184
 
185
 static void
186
-gst_d3d11_window_win32_release_external_handle (HWND hwnd)
187
+gst_d3d11_window_win32_release_external_handle (GstD3D11WindowWin32 * self)
188
 {
189
   WNDPROC external_proc;
190
+  HWND hwnd = self->external_hwnd;
191
 
192
   if (!hwnd)
193
     return;
194
 
195
+  self->external_hwnd = NULL;
196
   external_proc = (WNDPROC) GetPropA (hwnd, EXTERNAL_PROC_PROP_NAME);
197
   if (!external_proc) {
198
-    GST_WARNING ("Failed to get original window procedure");
199
+    GST_WARNING_OBJECT (self, "Failed to get original window procedure");
200
     return;
201
   }
202
 
203
-  GST_DEBUG ("release external window %" G_GUINTPTR_FORMAT
204
+  GST_DEBUG_OBJECT (self, "release external window %" G_GUINTPTR_FORMAT
205
       ", original window procedure %p", (guintptr) hwnd, external_proc);
206
 
207
   RemovePropA (hwnd, EXTERNAL_PROC_PROP_NAME);
208
   RemovePropA (hwnd, D3D11_WINDOW_PROP_NAME);
209
 
210
   if (!SetWindowLongPtrA (hwnd, GWLP_WNDPROC, (LONG_PTR) external_proc))
211
-    GST_WARNING ("Couldn't restore original window procedure");
212
+    GST_WARNING_OBJECT (self, "Couldn't restore original window procedure");
213
 }
214
 
215
 static gboolean
216
@@ -581,8 +608,7 @@
217
 
218
   self->internal_hwnd = CreateWindowExA (0,
219
       "GSTD3D11",
220
-      "Direct3D11 renderer",
221
-      WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_OVERLAPPEDWINDOW,
222
+      "Direct3D11 renderer", WS_GST_D3D11,
223
       CW_USEDEFAULT, CW_USEDEFAULT,
224
       0, 0, (HWND) NULL, (HMENU) NULL, hinstance, self);
225
 
226
@@ -763,8 +789,8 @@
227
     case WM_CLOSE:
228
       if (self->internal_hwnd) {
229
         RemovePropA (self->internal_hwnd, D3D11_WINDOW_PROP_NAME);
230
-        ShowWindow (self->internal_hwnd, SW_HIDE);
231
-        gst_d3d11_window_win32_destroy_internal_window (self->internal_hwnd);
232
+        gst_d3d11_window_win32_destroy_internal_window (hWnd);
233
+        self->overlay_state = GST_D3D11_WINDOW_WIN32_OVERLAY_STATE_CLOSED;
234
         self->internal_hwnd = NULL;
235
         self->internal_hwnd_thread = NULL;
236
       }
237
@@ -840,6 +866,12 @@
238
 {
239
   GstD3D11WindowWin32 *self;
240
 
241
+  if (uMsg == WM_GST_D3D11_DESTROY_INTERNAL_WINDOW) {
242
+    GST_INFO ("Handle destroy window message");
243
+    gst_d3d11_window_win32_destroy_internal_window (hWnd);
244
+    return 0;
245
+  }
246
+
247
   if (uMsg == WM_CREATE) {
248
     self = GST_D3D11_WINDOW_WIN32 (((LPCREATESTRUCT) lParam)->lpCreateParams);
249
 
250
@@ -852,16 +884,7 @@
251
     ReleaseDC (hWnd, self->device_handle);
252
 
253
     SetPropA (hWnd, D3D11_WINDOW_PROP_NAME, self);
254
-  } else if (GetPropA (hWnd, D3D11_WINDOW_PROP_NAME)) {
255
-    HANDLE handle = GetPropA (hWnd, D3D11_WINDOW_PROP_NAME);
256
-
257
-    if (!GST_IS_D3D11_WINDOW_WIN32 (handle)) {
258
-      GST_WARNING ("%p is not d3d11window object", handle);
259
-      return DefWindowProcA (hWnd, uMsg, wParam, lParam);
260
-    }
261
-
262
-    self = GST_D3D11_WINDOW_WIN32 (handle);
263
-
264
+  } else if ((self = gst_d3d11_window_win32_hwnd_get_instance (hWnd))) {
265
     g_assert (self->internal_hwnd == hWnd);
266
 
267
     gst_d3d11_window_win32_handle_window_proc (self, hWnd, uMsg, wParam,
268
@@ -870,23 +893,22 @@
269
     switch (uMsg) {
270
       case WM_SIZE:
271
         /* We handled this event already */
272
+        gst_object_unref (self);
273
         return 0;
274
       case WM_NCHITTEST:
275
         /* To passthrough mouse event if external window is used.
276
          * Only hit-test succeeded window can receive/handle some mouse events
277
          * and we want such events to be handled by parent (application) window
278
          */
279
-        if (self->external_hwnd)
280
+        if (self->external_hwnd) {
281
+          gst_object_unref (self);
282
           return (LRESULT) HTTRANSPARENT;
283
+        }
284
         break;
285
       default:
286
         break;
287
     }
288
-  } else if (uMsg == WM_GST_D3D11_DESTROY_INTERNAL_WINDOW) {
289
-    GST_INFO ("Handle destroy window message");
290
-    gst_d3d11_window_win32_destroy_internal_window (hWnd);
291
-
292
-    return 0;
293
+    gst_object_unref (self);
294
   }
295
 
296
   return DefWindowProcA (hWnd, uMsg, wParam, lParam);
297
@@ -897,49 +919,89 @@
298
 {
299
   WNDPROC external_window_proc =
300
       (WNDPROC) GetPropA (hWnd, EXTERNAL_PROC_PROP_NAME);
301
-  GstD3D11WindowWin32 *self =
302
-      (GstD3D11WindowWin32 *) GetPropA (hWnd, D3D11_WINDOW_PROP_NAME);
303
+  GstD3D11WindowWin32 *self = gst_d3d11_window_win32_hwnd_get_instance (hWnd);
304
 
305
-  if (uMsg == WM_GST_D3D11_CONSTRUCT_INTERNAL_WINDOW) {
306
-    GstD3D11Window *window = GST_D3D11_WINDOW (self);
307
-    RECT rect;
308
+  if (self == NULL || self->flushing) {
309
+    GST_DEBUG ("No object attached to the window, chain up to default");
310
+    gst_clear_object (&self);
311
+    return CallWindowProcA (external_window_proc, hWnd, uMsg, wParam, lParam);
312
+  }
313
 
314
-    GST_DEBUG_OBJECT (self, "Create internal window");
315
+  switch (uMsg) {
316
+    case WM_GST_D3D11_CONSTRUCT_INTERNAL_WINDOW:{
317
+      GstD3D11Window *window = GST_D3D11_WINDOW (self);
318
+      RECT rect;
319
 
320
-    window->initialized = gst_d3d11_window_win32_create_internal_window (self);
321
+      GST_DEBUG_OBJECT (self, "Create internal window");
322
 
323
-    SetWindowLongPtrA (self->internal_hwnd, GWL_STYLE, WS_CHILD | WS_MAXIMIZE);
324
-    SetParent (self->internal_hwnd, self->external_hwnd);
325
+      GstD3D11SRWLockGuard lk (&self->lock);
326
+      if (self->internal_hwnd) {
327
+        GST_WARNING_OBJECT (self,
328
+            "Window already created, probably we have received 2 creation messages");
329
+        g_warn_if_fail (self->overlay_state ==
330
+            GST_D3D11_WINDOW_WIN32_OVERLAY_STATE_OPENED);
331
+        gst_object_unref (self);
332
+        return 0;
333
+      }
334
 
335
-    /* take changes into account: SWP_FRAMECHANGED */
336
-    GetClientRect (self->external_hwnd, &rect);
337
-    SetWindowPos (self->internal_hwnd, HWND_TOP, rect.left, rect.top,
338
-        rect.right, rect.bottom,
339
-        SWP_ASYNCWINDOWPOS | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
340
-        SWP_FRAMECHANGED | SWP_NOACTIVATE);
341
-    MoveWindow (self->internal_hwnd, rect.left, rect.top, rect.right,
342
-        rect.bottom, FALSE);
343
+      if (self->flushing) {
344
+        GST_DEBUG_OBJECT (self, "Flushing");
345
+        gst_object_unref (self);
346
+        return 0;
347
+      }
348
 
349
-    GstD3D11SRWLockGuard lk (&self->lock);
350
-    self->overlay_state = GST_D3D11_WINDOW_WIN32_OVERLAY_STATE_OPENED;
351
-    WakeAllConditionVariable (&self->cond);
352
+      window->initialized =
353
+          gst_d3d11_window_win32_create_internal_window (self);
354
 
355
-    /* don't need to be chained up to parent window procedure,
356
-     * as this is our custom message */
357
-    return 0;
358
-  } else if (self) {
359
-    if (uMsg == WM_SIZE) {
360
-      MoveWindow (self->internal_hwnd, 0, 0, LOWORD (lParam), HIWORD (lParam),
361
-          FALSE);
362
-    } else if (uMsg == WM_CLOSE || uMsg == WM_DESTROY) {
363
+      SetWindowLongPtrA (self->internal_hwnd, GWL_STYLE,
364
+          WS_CHILD | WS_MAXIMIZE);
365
+      SetParent (self->internal_hwnd, self->external_hwnd);
366
+
367
+      /* take changes into account: SWP_FRAMECHANGED */
368
+      GetClientRect (self->external_hwnd, &rect);
369
+
370
+      if (self->render_rect.x != 0 || self->render_rect.y != 0 ||
371
+          self->render_rect.w != 0 || self->render_rect.h != 0) {
372
+        rect.left = self->render_rect.x;
373
+        rect.top = self->render_rect.y;
374
+        rect.right = self->render_rect.x + self->render_rect.w;
375
+        rect.bottom = self->render_rect.y + self->render_rect.h;
376
+      }
377
+
378
+      SetWindowPos (self->internal_hwnd, HWND_TOP, rect.left, rect.top,
379
+          rect.right - rect.left, rect.bottom - rect.top,
380
+          SWP_ASYNCWINDOWPOS | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
381
+          SWP_FRAMECHANGED | SWP_NOACTIVATE);
382
+      MoveWindow (self->internal_hwnd, rect.left, rect.top,
383
+          rect.right - rect.left, rect.bottom - rect.top, FALSE);
384
+
385
+      self->overlay_state = GST_D3D11_WINDOW_WIN32_OVERLAY_STATE_OPENED;
386
+      WakeAllConditionVariable (&self->cond);
387
+
388
+      /* don't need to be chained up to parent window procedure,
389
+       * as this is our custom message */
390
+      gst_object_unref (self);
391
+      return 0;
392
+    }
393
+    case WM_SIZE:
394
+      if (self->render_rect.x != 0 || self->render_rect.y != 0 ||
395
+          self->render_rect.w != 0 || self->render_rect.h != 0) {
396
+        MoveWindow (self->internal_hwnd,
397
+            self->render_rect.x, self->render_rect.y,
398
+            self->render_rect.w, self->render_rect.h, FALSE);
399
+      } else {
400
+        MoveWindow (self->internal_hwnd, 0, 0, LOWORD (lParam), HIWORD (lParam),
401
+            FALSE);
402
+      }
403
+      break;
404
+    case WM_CLOSE:
405
+    case WM_DESTROY:{
406
       GstD3D11SRWLockGuard lk (&self->lock);
407
       GST_WARNING_OBJECT (self, "external window is closing");
408
-      gst_d3d11_window_win32_release_external_handle (self->external_hwnd);
409
-      self->external_hwnd = NULL;
410
+      gst_d3d11_window_win32_release_external_handle (self);
411
 
412
       if (self->internal_hwnd) {
413
         RemovePropA (self->internal_hwnd, D3D11_WINDOW_PROP_NAME);
414
-        ShowWindow (self->internal_hwnd, SW_HIDE);
415
         gst_d3d11_window_win32_destroy_internal_window (self->internal_hwnd);
416
       }
417
       self->internal_hwnd = NULL;
418
@@ -947,12 +1009,15 @@
419
 
420
       self->overlay_state = GST_D3D11_WINDOW_WIN32_OVERLAY_STATE_CLOSED;
421
       WakeAllConditionVariable (&self->cond);
422
-    } else {
423
+      break;
424
+    }
425
+    default:
426
       gst_d3d11_window_win32_handle_window_proc (self, hWnd, uMsg, wParam,
427
           lParam);
428
-    }
429
+      break;
430
   }
431
 
432
+  gst_object_unref (self);
433
   return CallWindowProcA (external_window_proc, hWnd, uMsg, wParam, lParam);
434
 }
435
 
436
@@ -1138,14 +1203,22 @@
437
     /* if no parent the real size has to be set now because this has not been done
438
      * when at window creation */
439
     if (!self->external_hwnd) {
440
-      RECT rect;
441
-      GetClientRect (self->internal_hwnd, &rect);
442
-      width += 2 * GetSystemMetrics (SM_CXSIZEFRAME);
443
-      height +=
444
-          2 * GetSystemMetrics (SM_CYSIZEFRAME) +
445
-          GetSystemMetrics (SM_CYCAPTION);
446
-      MoveWindow (self->internal_hwnd, rect.left, rect.top, width,
447
-          height, FALSE);
448
+      RECT rect = { 0, };
449
+
450
+      rect.right = width;
451
+      rect.bottom = height;
452
+
453
+      if (AdjustWindowRect (&rect, WS_GST_D3D11, FALSE)) {
454
+        width = rect.right - rect.left;
455
+        height = rect.bottom - rect.top;
456
+      } else {
457
+        width += 2 * GetSystemMetrics (SM_CXSIZEFRAME);
458
+        height +=
459
+            2 * GetSystemMetrics (SM_CYSIZEFRAME) +
460
+            GetSystemMetrics (SM_CYCAPTION);
461
+      }
462
+
463
+      MoveWindow (self->internal_hwnd, 0, 0, width, height, FALSE);
464
       ShowWindow (self->internal_hwnd, SW_SHOW);
465
     } else if (self->internal_hwnd) {
466
       /* ShowWindow will throw message to message pumping thread (app thread)
467
gst-plugins-bad-1.22.2.tar.xz/sys/mediafoundation/gstmfvideoencoder.cpp -> gst-plugins-bad-1.22.3.tar.xz/sys/mediafoundation/gstmfvideoencoder.cpp Changed
25
 
1
@@ -1697,12 +1697,17 @@
2
   sink_caps = gst_caps_new_empty_simple ("video/x-raw");
3
   /* FIXME: don't hardcode max resolution, but MF doesn't provide
4
    * API for querying supported max resolution... */
5
-  gst_caps_set_simple (sink_caps,
6
-      "width", GST_TYPE_INT_RANGE, 64, 8192,
7
-      "height", GST_TYPE_INT_RANGE, 64, 8192, nullptr);
8
-  gst_caps_set_simple (src_caps,
9
-      "width", GST_TYPE_INT_RANGE, 64, 8192,
10
-      "height", GST_TYPE_INT_RANGE, 64, 8192, nullptr);
11
+
12
+  GValue res_val = G_VALUE_INIT;
13
+  g_value_init (&res_val, GST_TYPE_INT_RANGE);
14
+  gst_value_set_int_range_step (&res_val, 64, 8192, 2);
15
+
16
+  gst_caps_set_value (sink_caps, "width", &res_val);
17
+  gst_caps_set_value (sink_caps, "heigh", &res_val);
18
+  gst_caps_set_value (src_caps, "width", &res_val);
19
+  gst_caps_set_value (src_caps, "heigh", &res_val);
20
+
21
+  g_value_unset (&res_val);
22
 
23
 #if GST_MF_HAVE_D3D11
24
   /* Check whether this MFT can support D3D11 */
25
gst-plugins-bad-1.22.2.tar.xz/sys/va/gstjpegdecoder.h -> gst-plugins-bad-1.22.3.tar.xz/sys/va/gstjpegdecoder.h Changed
9
 
1
@@ -139,7 +139,6 @@
2
 
3
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstJpegDecoder, gst_object_unref)
4
 
5
-GST_CODECS_API
6
 GType gst_jpeg_decoder_get_type (void);
7
 
8
 G_END_DECLS
9
gst-plugins-bad-1.22.2.tar.xz/sys/va/gstvaav1dec.c -> gst-plugins-bad-1.22.3.tar.xz/sys/va/gstvaav1dec.c Changed
25
 
1
@@ -680,7 +680,7 @@
2
   GstVaBaseDec *base = GST_VA_BASE_DEC (decoder);
3
   GstAV1FrameHeaderOBU *frame_header = &picture->frame_hdr;
4
   GstAV1SequenceHeaderOBU *seq_header = &self->seq;
5
-  VADecPictureParameterBufferAV1 pic_param = { };
6
+  VADecPictureParameterBufferAV1 pic_param = { 0, };
7
   GstVaDecodePicture *va_pic;
8
   guint i;
9
 
10
@@ -884,13 +884,11 @@
11
   GstAV1TileGroupOBU *tile_group = &tile->tile_group;
12
   GstVaDecodePicture *va_pic;
13
   guint i;
14
-  VASliceParameterBufferAV1 slice_paramGST_AV1_MAX_TILE_COUNT;
15
+  VASliceParameterBufferAV1 slice_paramGST_AV1_MAX_TILE_COUNT = { 0, };
16
 
17
   GST_TRACE_OBJECT (self, "-");
18
 
19
   for (i = 0; i < tile_group->tg_end - tile_group->tg_start + 1; i++) {
20
-    slice_parami = (VASliceParameterBufferAV1) {
21
-    };
22
     slice_parami.slice_data_size =
23
         tile_group->entrytile_group->tg_start + i.tile_size;
24
     slice_parami.slice_data_offset =
25
gst-plugins-bad-1.22.2.tar.xz/sys/va/gstvabaseenc.h -> gst-plugins-bad-1.22.3.tar.xz/sys/va/gstvabaseenc.h Changed
14
 
1
@@ -84,9 +84,9 @@
2
                               GstVideoCodecFrame * frame,
3
                               gboolean bump_all,
4
                               GstVideoCodecFrame ** out_frame);
5
-  gboolean (*encode_frame)   (GstVaBaseEnc * encoder,
6
-                              GstVideoCodecFrame * frame,
7
-                              gboolean is_last);
8
+  GstFlowReturn (*encode_frame) (GstVaBaseEnc * encoder,
9
+                                 GstVideoCodecFrame * frame,
10
+                                 gboolean is_last);
11
   void     (*prepare_output) (GstVaBaseEnc * encoder,
12
                               GstVideoCodecFrame * frame);
13
 
14
gst-plugins-bad-1.22.2.tar.xz/sys/va/gstvafilter.c -> gst-plugins-bad-1.22.3.tar.xz/sys/va/gstvafilter.c Changed
20
 
1
@@ -31,6 +31,7 @@
2
 
3
 #include "gstvacaps.h"
4
 #include "gstvadisplay_priv.h"
5
+#include <string.h>
6
 
7
 struct _GstVaFilter
8
 {
9
@@ -1260,9 +1261,7 @@
10
   if (worstscore == 0) {
11
     /* No properties specified, there's not a useful choice. */
12
     *std = VAProcColorStandardNone;
13
-    *props = (VAProcColorProperties) {
14
-    };
15
-
16
+    memset (props, 0, sizeof (VAProcColorProperties));
17
     return;
18
   }
19
 
20
gst-plugins-bad-1.22.2.tar.xz/sys/va/gstvah264enc.c -> gst-plugins-bad-1.22.3.tar.xz/sys/va/gstvah264enc.c Changed
19
 
1
@@ -2536,7 +2536,7 @@
2
 _insert_ref_pic_list_modification (GstH264SliceHdr * slice_hdr,
3
     GstVaH264EncFrame * list16, guint list_num, gboolean is_asc)
4
 {
5
-  GstVaH264EncFrame *list_by_pic_num16 = { };
6
+  GstVaH264EncFrame *list_by_pic_num16 = { NULL, };
7
   guint modification_num, i;
8
   GstH264RefPicListModification *ref_pic_list_modification = NULL;
9
   gint pic_num_diff, pic_num_lx_pred;
10
@@ -2716,7 +2716,7 @@
11
 _add_aud (GstVaH264Enc * self, GstVaH264EncFrame * frame)
12
 {
13
   GstVaBaseEnc *base = GST_VA_BASE_ENC (self);
14
-  guint8 aud_data8 = { };
15
+  guint8 aud_data8 = { 0, };
16
   guint size;
17
   guint8 primary_pic_type = 0;
18
 
19
gst-plugins-bad-1.22.2.tar.xz/sys/va/gstvah265enc.c -> gst-plugins-bad-1.22.3.tar.xz/sys/va/gstvah265enc.c Changed
68
 
1
@@ -538,7 +538,7 @@
2
     .profile_space = 0,
3
     .tier_flag = sequence->general_tier_flag,
4
     .profile_idc = sequence->general_profile_idc,
5
-    .profile_compatibility_flag = { },
6
+    .profile_compatibility_flag = { 0, },
7
     .progressive_source_flag = 1,
8
     .interlaced_source_flag = 0,
9
     .non_packed_constraint_flag = 0,
10
@@ -901,7 +901,7 @@
11
       .delta_palette_max_predictor_size = 32,
12
       .sps_palette_predictor_initializers_present_flag = 0,
13
       .sps_num_palette_predictor_initializer_minus1 = 0,
14
-      .sps_palette_predictor_initializer = { },
15
+      .sps_palette_predictor_initializer = {{ 0, }},
16
       .motion_vector_resolution_control_idc = 0,
17
       .intra_boundary_filtering_disabled_flag = 0,
18
     },
19
@@ -1050,7 +1050,7 @@
20
     .collocated_ref_idx = (slice_param->slice_type == GST_H265_I_SLICE ?
21
         0xFF : self->features.collocated_ref_idx),
22
     /* not used now. */
23
-    .pred_weight_table = { },
24
+    .pred_weight_table = { 0, },
25
     .five_minus_max_num_merge_cand = 5 - slice_param->max_num_merge_cand,
26
     .use_integer_mv_flag = 0,
27
     .qp_delta = slice_param->slice_qp_delta,
28
@@ -1261,7 +1261,7 @@
29
 _h265_add_aud (GstVaH265Enc * self, GstVaH265EncFrame * frame)
30
 {
31
   GstVaBaseEnc *base = GST_VA_BASE_ENC (self);
32
-  guint8 aud_data8 = { };
33
+  guint8 aud_data8 = { 0, };
34
   guint size;
35
   guint8 pic_type = 0;
36
 
37
@@ -1692,12 +1692,12 @@
38
     .delta_chroma_log2_weight_denom = 0,
39
     .delta_luma_weight_l0 = { 0, },
40
     .luma_offset_l0 = { 0, },
41
-    .delta_chroma_weight_l0 = { },
42
-    .chroma_offset_l0 = { },
43
-    .delta_luma_weight_l1 = { },
44
-    .luma_offset_l1 = { },
45
-    .delta_chroma_weight_l1 = { },
46
-    .chroma_offset_l1 = { },
47
+    .delta_chroma_weight_l0 = {{ 0, }},
48
+    .chroma_offset_l0 = {{ 0, }},
49
+    .delta_luma_weight_l1 = { 0, },
50
+    .luma_offset_l1 = { 0, },
51
+    .delta_chroma_weight_l1 = {{ 0, }},
52
+    .chroma_offset_l1 = {{ 0, }},
53
 
54
     .max_num_merge_cand = 5,
55
     .slice_qp_delta = slice_qp_delta,
56
@@ -1878,9 +1878,9 @@
57
   guint list_forward_num = 0;
58
   GstVaH265EncFrame *list_backward16 = { NULL, };
59
   guint list_backward_num = 0;
60
-  gint negative_pocs16 = { };
61
+  gint negative_pocs16 = { 0, };
62
   guint num_negative_pics = 0;
63
-  gint positive_pocs16 = { };
64
+  gint positive_pocs16 = { 0, };
65
   guint num_positive_pics = 0;
66
   gint collocated_poc = -1;
67
   gint i;
68
gst-plugins-bad-1.22.2.tar.xz/sys/va/gstvavp8dec.c -> gst-plugins-bad-1.22.3.tar.xz/sys/va/gstvavp8dec.c Changed
28
 
1
@@ -176,7 +176,7 @@
2
   GstVaBaseDec *base = GST_VA_BASE_DEC (decoder);
3
   GstVp8FrameHdr const *frame_hdr = &picture->frame_hdr;
4
   GstVp8Segmentation *const seg = &parser->segmentation;
5
-  VAIQMatrixBufferVP8 iq_matrix = { };
6
+  VAIQMatrixBufferVP8 iq_matrix = { 0, };
7
   const gint8 QI_MAX = 127;
8
   gint16 qi, qi_base;
9
   gint i;
10
@@ -214,7 +214,7 @@
11
 {
12
   GstVaBaseDec *base = GST_VA_BASE_DEC (decoder);
13
   GstVp8FrameHdr const *frame_hdr = &picture->frame_hdr;
14
-  VAProbabilityDataBufferVP8 prob_table = { };
15
+  VAProbabilityDataBufferVP8 prob_table = { 0, };
16
 
17
   /* Fill in VAProbabilityDataBufferVP8 */
18
   memcpy (prob_table.dct_coeff_probs, frame_hdr->token_probs.prob,
19
@@ -357,7 +357,7 @@
20
       sizeof (slice_param), (gpointer) picture->data, picture->size);
21
 }
22
 
23
-static gboolean
24
+static GstFlowReturn
25
 gst_va_vp8_dec_decode_picture (GstVp8Decoder * decoder, GstVp8Picture * picture,
26
     GstVp8Parser * parser)
27
 {
28
gst-plugins-bad-1.22.2.tar.xz/sys/va/gstvavpp.c -> gst-plugins-bad-1.22.3.tar.xz/sys/va/gstvavpp.c Changed
34
 
1
@@ -78,7 +78,11 @@
2
 #define GST_VA_VPP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G_TYPE_FROM_INSTANCE (obj), GstVaVppClass))
3
 #define GST_VA_VPP_CLASS(klass)    ((GstVaVppClass *) klass)
4
 
5
-#define SWAP(a, b) do { const __typeof__ (a) t = a; a = b; b = t; } while (0)
6
+#define SWAP_INT(a, b) G_STMT_START { \
7
+  gint __tmp = a; \
8
+  a = b; \
9
+  b = __tmp; \
10
+} G_STMT_END
11
 
12
 typedef struct _GstVaVpp GstVaVpp;
13
 typedef struct _GstVaVppClass GstVaVppClass;
14
@@ -494,7 +498,7 @@
15
       case GST_VIDEO_ORIENTATION_90L:
16
       case GST_VIDEO_ORIENTATION_UL_LR:
17
       case GST_VIDEO_ORIENTATION_UR_LL:
18
-        SWAP (from_dar_n, from_dar_d);
19
+        SWAP_INT (from_dar_n, from_dar_d);
20
         break;
21
       default:
22
         break;
23
@@ -1332,8 +1336,8 @@
24
       case GST_VIDEO_ORIENTATION_90L:
25
       case GST_VIDEO_ORIENTATION_UL_LR:
26
       case GST_VIDEO_ORIENTATION_UR_LL:
27
-        SWAP (from_w, from_h);
28
-        SWAP (from_par_n, from_par_d);
29
+        SWAP_INT (from_w, from_h);
30
+        SWAP_INT (from_par_n, from_par_d);
31
         break;
32
       default:
33
         break;
34
gst-plugins-bad-1.22.2.tar.xz/sys/wasapi2/gstwasapi2util.c -> gst-plugins-bad-1.22.3.tar.xz/sys/wasapi2/gstwasapi2util.c Changed
13
 
1
@@ -526,8 +526,10 @@
2
        * "Windows 11", since build number of "Windows 10 version 21H2" is
3
        * still 19044.XXX
4
        */
5
+
6
+      /* But other software enables this for build number 19041 or higher... */
7
       if (osverinfo.dwMajorVersion > 10 ||
8
-          (osverinfo.dwMajorVersion == 10 && osverinfo.dwBuildNumber >= 20348))
9
+          (osverinfo.dwMajorVersion == 10 && osverinfo.dwBuildNumber >= 19041))
10
         ret = TRUE;
11
     }
12
 
13
gst-plugins-bad-1.22.3.tar.xz/tests/check/elements/d3d11videosink.c Added
242
 
1
@@ -0,0 +1,240 @@
2
+/* GStreamer
3
+ *
4
+ * Unit test for d3d11videosink element
5
+ * Copyright (C) 2023 Alexander Slobodeniuk <aslobodeniuk@fluendo.com>
6
+ *
7
+ * This library is free software; you can redistribute it and/or
8
+ * modify it under the terms of the GNU Library General Public
9
+ * License as published by the Free Software Foundation; either
10
+ * version 2 of the License, or (at your option) any later version.
11
+ *
12
+ * This library is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
+ * Library General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU Library General Public
18
+ * License along with this library; if not, write to the
19
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
20
+ * Boston, MA 02110-1301, USA.
21
+ */
22
+
23
+#ifdef HAVE_CONFIG_H
24
+#include "config.h"
25
+#endif
26
+
27
+#include <gst/gst.h>
28
+#include <gst/check/gstcheck.h>
29
+#include <gst/video/video.h>
30
+#include <windows.h>
31
+
32
+#define WM_FIXTURE_RESTART (WM_USER + 123)
33
+#define WM_FIXTURE_TRICKY_RESTART (WM_FIXTURE_RESTART + 1)
34
+
35
+static struct
36
+{
37
+  HWND hwnd;
38
+  GstElement *pipeline;
39
+  gboolean ever_started;
40
+  volatile gboolean stopping;
41
+} fixture;
42
+
43
+static void
44
+fixture_sleep_approx_ms (guint ms)
45
+{
46
+  Sleep (g_random_int_range (0, ms));
47
+}
48
+
49
+static gpointer
50
+fixture_restart_playback (gpointer data)
51
+{
52
+  GST_DEBUG ("Restarting the pipeline");
53
+  gst_element_set_state (fixture.pipeline, GST_STATE_NULL);
54
+  GST_DEBUG ("Stopped");
55
+  gst_element_set_state (fixture.pipeline, GST_STATE_PLAYING);
56
+  GST_DEBUG ("Started");
57
+  return NULL;
58
+}
59
+
60
+
61
+static LRESULT CALLBACK
62
+test_win32window_window_proc (HWND hwnd, UINT message, WPARAM wParam,
63
+    LPARAM lParam)
64
+{
65
+  switch (message) {
66
+    case WM_FIXTURE_RESTART:
67
+      fixture_restart_playback (NULL);
68
+      break;
69
+    case WM_FIXTURE_TRICKY_RESTART:
70
+      /* Synchronous stop, but the sink will have to
71
+       * release it's internal window asynchronously */
72
+      g_thread_join (g_thread_new (NULL, fixture_restart_playback, NULL));
73
+      break;
74
+    case WM_DESTROY:
75
+      PostQuitMessage (0);
76
+      break;
77
+    default:
78
+      /* Simulate application load */
79
+      fixture_sleep_approx_ms (30);
80
+      return DefWindowProc (hwnd, message, wParam, lParam);
81
+  }
82
+  return 0;
83
+}
84
+
85
+static void
86
+test_win32window_create_window (void)
87
+{
88
+  HINSTANCE hinstance = GetModuleHandleA (NULL);
89
+  WNDCLASSEXA wc;
90
+  ATOM atom = 0;
91
+  const gchar *class_name = "d3d11videosink_test";
92
+
93
+  GST_DEBUG ("Creating a win32 window");
94
+  atom = GetClassInfoExA (hinstance, class_name, &wc);
95
+  if (atom == 0) {
96
+    ZeroMemory (&wc, sizeof (WNDCLASSEXA));
97
+    wc.cbSize = sizeof (WNDCLASSEX);
98
+
99
+    wc.style = CS_HREDRAW | CS_VREDRAW;
100
+    wc.lpfnWndProc = test_win32window_window_proc;
101
+    wc.hInstance = hinstance;
102
+    wc.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1);
103
+    wc.lpszClassName = class_name;
104
+
105
+    fail_unless (RegisterClassExA (&wc));
106
+  }
107
+
108
+  fixture.hwnd =
109
+      CreateWindowA (class_name, "d3d11videosink test", WS_OVERLAPPEDWINDOW,
110
+      CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hinstance, NULL);
111
+  fail_unless (fixture.hwnd);
112
+}
113
+
114
+static void
115
+test_win32window_msg_loop (void)
116
+{
117
+  MSG msg;
118
+  while (GetMessage (&msg, NULL, 0, 0)) {
119
+    TranslateMessage (&msg);
120
+    DispatchMessage (&msg);
121
+  }
122
+}
123
+
124
+static gpointer
125
+test_win32window_resize_thr2 (gpointer data)
126
+{
127
+  gint16 length = 0;
128
+  while (!fixture.stopping) {
129
+    if ((length += 1) > 164) {
130
+      length = 0;
131
+    }
132
+
133
+    MoveWindow (fixture.hwnd, 0, 0, length, length, 1);
134
+    fixture_sleep_approx_ms (10);
135
+  }
136
+  return NULL;
137
+}
138
+
139
+static gpointer
140
+test_win32window_resize_thr1 (gpointer data)
141
+{
142
+  gint i;
143
+  const gint NUM_REPETITIONS = 150;
144
+
145
+  GThread *thr = g_thread_new (NULL,
146
+      test_win32window_resize_thr2, NULL);
147
+
148
+  for (i = 0; i < NUM_REPETITIONS; i++) {
149
+    gst_element_set_state (fixture.pipeline, GST_STATE_PLAYING);
150
+    /* Pause in playback */
151
+    fixture_sleep_approx_ms (500);
152
+
153
+
154
+    if (0 == i % 4) {
155
+      GST_DEBUG ("Scheduling pipeline restart from the window thread");
156
+      PostMessageA (fixture.hwnd, WM_FIXTURE_RESTART, 0, 0);
157
+      fixture_sleep_approx_ms (500);
158
+    }
159
+
160
+    if (0 == i % 5) {
161
+      GST_DEBUG ("Scheduling pipeline restart blocking the window thread");
162
+      PostMessageA (fixture.hwnd, WM_FIXTURE_TRICKY_RESTART, 0, 0);
163
+      fixture_sleep_approx_ms (500);
164
+    }
165
+
166
+    gst_element_set_state (fixture.pipeline, GST_STATE_NULL);
167
+    /* Pause without playback */
168
+    fixture_sleep_approx_ms (100);
169
+  }
170
+
171
+  fixture.stopping = TRUE;
172
+  g_thread_join (thr);
173
+
174
+  GST_INFO ("Closing the window");
175
+  PostMessageA (fixture.hwnd, WM_CLOSE, 0, 0);
176
+  return NULL;
177
+}
178
+
179
+static GstBusSyncReply
180
+test_win32window_bus_sync_handle (GstBus * bus,
181
+    GstMessage * message, gpointer data)
182
+{
183
+  if (GST_MESSAGE_TYPE (message) != GST_MESSAGE_ELEMENT ||
184
+      !gst_is_video_overlay_prepare_window_handle_message (message)) {
185
+    return GST_BUS_PASS;
186
+  }
187
+
188
+  gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY
189
+      (GST_MESSAGE_SRC (message)), (guintptr) fixture.hwnd);
190
+  fixture.ever_started = TRUE;
191
+  return GST_BUS_DROP;
192
+}
193
+
194
+GST_START_TEST (test_win32window_resize)
195
+{
196
+  GstBus *bus;
197
+  GThread *thr;
198
+
199
+  GST_INFO ("Start resising test");
200
+  test_win32window_create_window ();
201
+
202
+  fixture.pipeline =
203
+      gst_parse_launch
204
+      ("videotestsrc ! video/x-raw, width=128, height=128 ! d3d11videosink sync=false",
205
+      NULL);
206
+  bus = gst_element_get_bus (fixture.pipeline);
207
+  gst_bus_set_sync_handler (bus, test_win32window_bus_sync_handle, NULL, NULL);
208
+  gst_object_unref (bus);
209
+  bus = NULL;
210
+
211
+  ShowWindow (fixture.hwnd, SW_SHOW);
212
+  UpdateWindow (fixture.hwnd);
213
+
214
+  thr = g_thread_new (NULL, test_win32window_resize_thr1, NULL);
215
+
216
+  test_win32window_msg_loop ();
217
+
218
+  g_thread_join (thr);
219
+  gst_object_unref (fixture.pipeline);
220
+  fixture.hwnd = NULL;
221
+
222
+  fail_unless (fixture.ever_started, "videosink didn't request window handle,"
223
+      "probably it couldn't start");
224
+  GST_INFO ("resising test ok");
225
+}
226
+
227
+GST_END_TEST;
228
+
229
+static Suite *
230
+d3d11videosink_suite (void)
231
+{
232
+  Suite *s = suite_create ("d3d11videosink");
233
+  TCase *tc_basic = tcase_create ("general");
234
+
235
+  suite_add_tcase (s, tc_basic);
236
+  tcase_add_test (tc_basic, test_win32window_resize);
237
+
238
+  return s;
239
+}
240
+
241
+GST_CHECK_MAIN (d3d11videosink);
242
gst-plugins-bad-1.22.2.tar.xz/tests/check/meson.build -> gst-plugins-bad-1.22.3.tar.xz/tests/check/meson.build Changed
18
 
1
@@ -35,6 +35,7 @@
2
   'elements/cudaconvert.c', false, gstgl_dep, gmodule_dep,
3
   'elements/cudafilter.c', false, gstgl_dep, gmodule_dep,
4
   'elements/d3d11colorconvert.c', host_machine.system() != 'windows', ,
5
+  'elements/d3d11videosink.c', host_machine.system() != 'windows', ,
6
   'elements/fdkaac.c', not fdkaac_dep.found(), ,
7
   'elements/gdpdepay.c', get_option('gdp').disabled(),
8
   'elements/gdppay.c', get_option('gdp').disabled(),
9
@@ -124,7 +125,7 @@
10
     'elements/curlftpsink.c', not curl_dep.found(), curl_dep,
11
     'elements/curlsmtpsink.c', not curl_dep.found(), curl_dep,
12
     'elements/dash_mpd.c', not xml2_dep.found(), xml2_dep,
13
-    'elements/dtls.c', not libcrypto_dep.found(), libcrypto_dep,
14
+    'elements/dtls.c', not libcrypto_dep.found() or not openssl_dep.found (), libcrypto_dep,
15
     'elements/faac.c',
16
         not faac_dep.found() or not cc.has_header_symbol('faac.h', 'faacEncOpen') or not cdata.has('HAVE_UNISTD_H'),
17
         faac_dep,
18
Refresh

No build results available

Refresh

No rpmlint results available

Request History
Bjørn Lie's avatar

zaitor created request almost 2 years ago

New stable release


Bjørn Lie's avatar

zaitor accepted request almost 2 years ago

Xin, gst 1.22.3 released in oss