Overview
Submit package home:zait...sentials / gstreamer...d-codecs to package Essentials / gstreamer-plugins-bad-codecs
gstreamer-plugins-bad-codecs.changes
Changed
x
1
2
-------------------------------------------------------------------
3
+Mon Nov 20 13:08:00 UTC 2023 - Bjørn Lie <zaitor@opensuse.org>
4
+
5
+- Update to version 1.22.7
6
+
7
+-------------------------------------------------------------------
8
Fri Sep 22 17:25:19 UTC 2023 - Bjørn Lie <zaitor@opensuse.org>
9
10
- Update to version 1.22.6
11
gstreamer-plugins-bad-codecs.spec
Changed
10
1
2
%define _version 1.22.0
3
4
Name: gstreamer-plugins-bad-codecs
5
-Version: 1.22.6
6
+Version: 1.22.7
7
Release: 0
8
Summary: Codecs/plugins for gstreamer-plugins-bad
9
License: LGPL-2.1-or-later
10
gst-plugins-bad-1.22.6.tar.xz/ChangeLog -> gst-plugins-bad-1.22.7.tar.xz/ChangeLog
Changed
405
1
2
+=== release 1.22.7 ===
3
+
4
+2023-11-13 11:04:22 +0000 Tim-Philipp Müller <tim@centricular.com>
5
+
6
+ * NEWS:
7
+ * RELEASE:
8
+ * gst-plugins-bad.doap:
9
+ * meson.build:
10
+ Release 1.22.7
11
+
12
+2023-10-20 00:09:57 +0300 Sebastian Dröge <sebastian@centricular.com>
13
+
14
+ * gst/mxf/mxfdemux.c:
15
+ * gst/mxf/mxfdemux.h:
16
+ mxfdemux: Store GstMXFDemuxEssenceTrack in their own fixed allocation
17
+ Previously they were stored inline inside a GArray, but as references to
18
+ the tracks were stored in various other places although the array could
19
+ still be updated (and reallocated!), this could lead to dangling
20
+ references in various places.
21
+ Instead now store them in a GPtrArray in their own allocation so each
22
+ track's memory position stays fixed.
23
+ Fixes ZDI-CAN-22299
24
+ Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3055
25
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5638>
26
+
27
+2023-10-04 11:14:38 +0200 Benjamin Gaignard <benjamin.gaignard@collabora.com>
28
+
29
+ * gst-libs/gst/codecparsers/gstav1parser.c:
30
+ codecparsers: av1: Clip max tile rows and cols values
31
+ Clip tile rows and cols to 64 as describe in AV1 specification.
32
+ Fixes ZDI-CAN-22226 / CVE-2023-44429
33
+ Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3015
34
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5637>
35
+
36
+2023-10-06 13:49:15 +0200 Guillaume Desmottes <guillaume.desmottes@onestream.live>
37
+
38
+ * gst/audiobuffersplit/gstaudiobuffersplit.c:
39
+ audiobuffersplit: disable max-silence-time if set to 0
40
+ According to the property documentation max-silence-time is supposed to be
41
+ disabled when set to 0 but it was not.
42
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5632>
43
+
44
+2023-05-26 17:38:13 +0000 Balló György <ballogyor@gmail.com>
45
+
46
+ * gst-libs/gst/wayland/meson.build:
47
+ gstwayland: Don't depend on wayland-protocols
48
+ wayland-protocols are needed to build gstwayland, but not for dependent projects.
49
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5618>
50
+
51
+2023-11-04 19:36:06 +0900 Seungha Yang <seungha@centricular.com>
52
+
53
+ * sys/wasapi2/gstwasapi2client.cpp:
54
+ * sys/wasapi2/gstwasapi2client.h:
55
+ * sys/wasapi2/gstwasapi2device.c:
56
+ wasapi2device: Ignore activation failed device
57
+ Enumerates all devices even if activation error is detected
58
+ Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3090
59
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5609>
60
+
61
+2023-10-28 22:55:04 +0800 He Junyan <junyan.he@intel.com>
62
+
63
+ * docs/plugins/gst_plugins_cache.json:
64
+ * ext/libde265/libde265-dec.c:
65
+ libde265dec: Only decode the main profile
66
+ The src caps of the libde265 is now fixed to I420, and so if the
67
+ stream is other format, such as 4:4:4 or 10 bits format, the pipeline
68
+ will crash because the dowstream element accesses the video buffer as
69
+ I420 format.
70
+ We now restrain the input caps to "main" profile, which only contains
71
+ 4:2:0 8 bits stream.
72
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5596>
73
+
74
+2023-11-04 03:16:47 +0100 Marek Vasut <marex@denx.de>
75
+
76
+ * sys/v4l2codecs/gstv4l2decoder.c:
77
+ v4l2codecs: Avoid QBUF/DQBUF struct timeval .tv_usec wrap-around at frame 1000000
78
+ When decoding stream using hardware V4L2 decoder element, in any of the
79
+ currently supported formats, the decoding will fail once frame number
80
+ 1000000 is reached. The reported error clearly indicates a wrap-around
81
+ occured, instead of receiving decoded frame 1000000, frame 0 is received
82
+ from the hardware V4L2 decoder driver.
83
+ The problem is actually not in the driver itself, but rather in gstreamer,
84
+ which uses `struct v4l2_buffer` member `.timestamp` in a special way. The
85
+ timestamp of buffers with encoded data added to the SINK (input) queue of
86
+ the driver is copied by the driver into matching buffers with decoded data
87
+ added to the SOURCE (output) queue of the driver. In fact, the timestamp
88
+ is not a timestamp at all, but rather in this special case, only part of
89
+ it is used as an incrementing frame counter.
90
+ The `.timestamp` is of type `struct timeval`, which is defined in
91
+ `sys/time.h` 1. Only the `tv_usec` member of this structure is used
92
+ for the incrementing frame counter. However, suseconds_t tv_usec 2
93
+ may be limited to range -1, 1000000:
94
+ "
95
+ XSI The type suseconds_t shall be a signed integer type capable of
96
+ storing values at least in the range -1, 1000000.
97
+ "
98
+ Therefore, once frame 1000000 is reached, a rollover occurs and decoding
99
+ fails.
100
+ Fix this by using both `struct timeval` members, `.tv_sec` and `.tv_usec`
101
+ with matching modular arithmetic, this way the failure would occur again
102
+ just short of 2^84 frames, which should be plenty.
103
+ 1 https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_time.h.html
104
+ 2 https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html
105
+ A test case using stateless hardware h264 decoder, the WARN/ERROR output
106
+ in gstreamer log indicates a failure occurred. With this change, that
107
+ error no longer occurs and the WARN/ERROR are not present:
108
+ ```
109
+ pc$ gst-launch-1.0 videotestsrc num-buffers=1001001 pattern=6 ! \
110
+ video/x-raw,width=16,height=16,format=I420 ! \
111
+ x264enc ! filesink location=/tmp/test.h264
112
+ dut$ GST_DEBUG="*:3" gst-launch-1.0 filesrc location=/tmp/test.h264 ! \
113
+ h264parse ! v4l2slh264dec ! fakesink
114
+ ...
115
+ 0:03:51.393677606 12111 0x370df400 WARN \
116
+ v4l2codecs-decoder gstv4l2decoder.c:1157:gst_v4l2_request_set_done:<v4l2decoder2> \
117
+ Requested frame 1000000, but driver returned frame 0.
118
+ 0:03:51.394140597 12111 0x370df400 WARN \
119
+ v4l2codecs-decoder gstv4l2decoder.c:1157:gst_v4l2_request_set_done:<v4l2decoder2> \
120
+ Requested frame 1000001, but driver returned frame 1.
121
+ 0:03:51.394425216 12111 0x370df400 WARN \
122
+ v4l2codecs-decoder gstv4l2decoder.c:1157:gst_v4l2_request_set_done:<v4l2decoder2> \
123
+ Requested frame 1000002, but driver returned frame 2.
124
+ 0:03:51.394665211 12111 0x370df400 WARN \
125
+ v4l2codecs-decoder gstv4l2decoder.c:1157:gst_v4l2_request_set_done:<v4l2decoder2> \
126
+ Requested frame 1000003, but driver returned frame 3.
127
+ 0:03:51.394785833 12111 0x370df400 WARN \
128
+ v4l2codecs-h264dec gstv4l2codech264dec.c:1059:gst_v4l2_codec_h264_dec_output_picture:<v4l2slh264dec0> \
129
+ error: Failed to decode frame 1000000
130
+ ERROR: from element /GstPipeline:pipeline0/v4l2slh264dec:v4l2slh264dec0: Failed to decode frame 1000000
131
+ ```
132
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5603>
133
+
134
+2023-10-31 17:59:32 +0100 Kalev Lember <klember@redhat.com>
135
+
136
+ * ext/openh264/gstopenh264dec.cpp:
137
+ * ext/openh264/gstopenh264enc.cpp:
138
+ openh264: Fail gracefully if openh264 encoder/decoder creation fails
139
+ This can happen with the dummy "noopenh264" library that the freedesktop
140
+ flatpak runtime ships, and Fedora is planning on shipping as well. In
141
+ both cases the dummy implementation gets replaced with the actual
142
+ openh264 library that's downloaded directly from Cisco, but just to be
143
+ on safe side, this patch makes it careful to check the return values to
144
+ avoid crashing if the underlying library hasn't been swapped out yet.
145
+ The patch is taken from freedesktop-sdk and was originally written by
146
+ Valentin David <valentin.david@codethink.co.uk>.
147
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5586>
148
+
149
+2023-10-25 21:37:24 +0900 Seungha Yang <seungha@centricular.com>
150
+
151
+ * sys/wasapi2/gstwasapi2ringbuffer.cpp:
152
+ wasapi2: Don't use global volume control object
153
+ ISimpleAudioVolume controls volume of corresponding audio session
154
+ and there would be only single input/output audio session
155
+ in case of share-mode, which means that it controls audio volume of the
156
+ process. Instead, use IAudioStreamVolume interface which controls
157
+ volume of the stream.
158
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5579>
159
+
160
+2023-10-29 22:42:52 +0900 Seungha Yang <seungha@centricular.com>
161
+
162
+ * sys/d3d11/gstd3d11window_win32.cpp:
163
+ d3d11videosink: Fix window switching in case of fullscreen mode
164
+ Other Windows applications allow window switching even when
165
+ an application window is in fullscreen mode. Also fixing
166
+ regression introduced in 15248d8b84db9e79e6d4587b212b12ca82fc4a6b
167
+ which makes restored window is always located at topmost
168
+ since we do not call SetWindowPos() anymore when restoring
169
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5578>
170
+
171
+2023-10-28 01:23:36 +0900 Seungha Yang <seungha@centricular.com>
172
+
173
+ * sys/d3d11/gstd3d11screencapturesrc.cpp:
174
+ d3d11screencapturesrc: Fix mouse cursor blending
175
+ Ignore alpha component of source (mouse cursor texture)
176
+ when blending alpha channel, otherwise the background area of source
177
+ (which has zeros) will be written to render target. Then it will result
178
+ in black rectangle if output texture is converted to premultiplied alpha
179
+ texture
180
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5577>
181
+
182
+2023-10-25 23:19:51 +0900 Seungha Yang <seungha@centricular.com>
183
+
184
+ * sys/mediafoundation/gstmfvideoencoder.cpp:
185
+ mfvideoencoder: Fix typo in template caps
186
+ Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3058
187
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5556>
188
+
189
+2023-10-10 10:39:55 +0200 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
190
+
191
+ * gst/mpegtsmux/gstatscmux.c:
192
+ * gst/mpegtsmux/tsmux/tsmuxstream.c:
193
+ * gst/mpegtsmux/tsmux/tsmuxstream.h:
194
+ tsmux: Fix default get_es_descrs_func
195
+ `tsmux_stream_default_get_es_descrs` is missing the `user_data`
196
+ parameter and shouldn't be cast to `TsMuxStreamGetESDescriptorsFunc`.
197
+ Prefer not casting at all to make sure we don't miss such an issue.
198
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5516>
199
+
200
+2023-10-10 10:22:44 +0200 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
201
+
202
+ * gst/mpegtsmux/gstatscmux.c:
203
+ * gst/mpegtsmux/tsmux/tsmux.c:
204
+ * gst/mpegtsmux/tsmux/tsmux.h:
205
+ tsmux: Fix default new_stream_func
206
+ `tsmux_stream_new` is missing the `user_data` parameter and shouldn't be
207
+ cast to `TsMuxNewStreamFunc`.
208
+ Prefer not casting at all to make sure we don't miss such an issue.
209
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5516>
210
+
211
+2023-10-10 10:12:44 +0200 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
212
+
213
+ * gst/mpegtsmux/tsmux/tsmuxstream.h:
214
+ tsmux: Add missing include
215
+ We need `GstMpegtsPMTStream` here.
216
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5516>
217
+
218
+2023-10-17 00:57:56 +0200 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
219
+
220
+ * gst/mpegtsmux/tsmux/tsmux.c:
221
+ tsmux: Simplify tsmux_section_write_packet
222
+ - Don't try to make the parameters match `GHFunc`. Use a dedicated
223
+ callback for `g_hash_table_foreach`.
224
+ - Don't try to be clever with buffer memories. We're allocating a full
225
+ packet anyway, might as well memcpy and save on a lot of complexity.
226
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5516>
227
+
228
+2023-10-17 00:54:38 +0200 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
229
+
230
+ * gst/mpegtsmux/tsmux/tsmux.c:
231
+ tsmux: tsmux_packet_out should always consume its buffer
232
+ Consuming the buffer only when successful is an antipattern and easily
233
+ leads to leaks.
234
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5516>
235
+
236
+2023-10-16 23:54:20 +0200 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
237
+
238
+ * gst/mpegtsmux/tsmux/tsmux.c:
239
+ tsmux: Don't memset in pad_stream when writing a PCR packet
240
+ tsmux_write_ts_header will write a stuffing adaptation field, so we
241
+ don't need to prefill the buffer.
242
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5516>
243
+
244
+2023-10-16 23:52:48 +0200 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
245
+
246
+ * gst/mpegtsmux/tsmux/tsmux.c:
247
+ tsmux: Move out parameters of tsmux_write_ts_header
248
+ Move them to the end of the parameter list and also allow passing NULLs
249
+ to ignore the payload information, but assert that the payload length is
250
+ zero in this case.
251
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5516>
252
+
253
+2023-10-16 23:50:16 +0200 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
254
+
255
+ * gst/mpegtsmux/tsmux/tsmux.c:
256
+ tsmux: Fix two more uses of gst_buffer_map
257
+ The buffers should be used for writing.
258
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5516>
259
+
260
+2023-10-16 15:41:48 +0200 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
261
+
262
+ * gst/mpegtsmux/tsmux/tsmux.c:
263
+ tsmux: Fix error handling in pad_stream
264
+ Don't leak the map or the buffer if we encounter an error.
265
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5513>
266
+
267
+2023-10-16 15:31:04 +0200 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
268
+
269
+ * gst/mpegtsmux/tsmux/tsmux.c:
270
+ tsmux: Fill padding packets with stuffing bytes
271
+ Instead of leaving it uncleared, emitting probably old packet data but
272
+ potentially also random or sensitive application data.
273
+ Also fix the mapping mode.
274
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5513>
275
+
276
+2023-10-17 14:56:34 -0400 Nicolas Dufresne <nicolas.dufresne@collabora.com>
277
+
278
+ * sys/v4l2codecs/gstv4l2codech265dec.c:
279
+ v4l2codecs: h265: Fix entry_point_offsets array leak
280
+ This array was being leaked.
281
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5503>
282
+
283
+2023-10-17 12:42:59 -0400 Detlev Casanova <detlev.casanova@collabora.com>
284
+
285
+ * gst-libs/gst/codecs/gsth265decoder.c:
286
+ codecs: h265: Do not free slice header before using it
287
+ The v4l2codecs H.265 decoder uses the
288
+ GstH265SliceHdr::entry_point_offset_minus1 array so make sure that it is not
289
+ freed before decoding the frame.
290
+ Before this patch, some H.265 input would segfault in
291
+ gst_v4l2_codec_h265_dec_fill_slice_params() when executing the line:
292
+ guint32 entry_point_offset = slice_hdr->entry_point_offset_minus1i + 1;
293
+ Make sure that the array is not freed before using it.
294
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5503>
295
+
296
+2023-10-12 16:25:59 +0530 Rahul T R <r-ravikumar@ti.com>
297
+
298
+ * sys/kms/gstkmssink.c:
299
+ kmssink: Add TIDSS auto-detection
300
+ Add Texas Instruments TIDSS display controller into list of
301
+ auto-detected modules.
302
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5486>
303
+
304
+2023-10-15 20:30:22 +0900 Seungha Yang <seungha@centricular.com>
305
+
306
+ * gst-libs/gst/d3d11/gstd3d11converter.cpp:
307
+ d3d11converter: Fix 10/12bits planar output
308
+ Simple division can result in 10/12bits overflow.
309
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5484>
310
+
311
+2023-10-12 02:26:07 +0900 Seungha Yang <seungha@centricular.com>
312
+
313
+ * sys/d3d11/gstd3d11window_win32.cpp:
314
+ d3d11videosink: Fix rendering with initial fullscreen state
315
+ Change fullscreen mode once the swapchain is fully configured
316
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5466>
317
+
318
+2023-10-11 23:29:04 +0900 Seungha Yang <seungha@centricular.com>
319
+
320
+ * sys/d3d11/gstd3d11window_win32.cpp:
321
+ d3d11videosink: Fix toggling between fullscreen and maximized
322
+ Use GetWindowPlacement() and SetWindowPlacement() APIs
323
+ to remember and restore window status, such as maximized, position,
324
+ restore position, etc.
325
+ Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3016
326
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5466>
327
+
328
+2023-10-10 15:43:07 -0400 Nicolas Dufresne <nicolas.dufresne@collabora.com>
329
+
330
+ * sys/v4l2codecs/gstv4l2format.c:
331
+ v4l2codecs: Fix tiled formats stride conversion
332
+ While adding arbitrary tile support, a round up operation was badly
333
+ converter. This caused the Y component of the stride to be 0. This
334
+ eventually lead to a crash in glupoad preceded by the following
335
+ assertion.
336
+ gst_gl_buffer_allocation_params_new: assertion 'alloc_size > 0' failed
337
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5463>
338
+
339
+2023-10-09 19:09:15 +0900 Seungha Yang <seungha@centricular.com>
340
+
341
+ * sys/decklink/gstdecklink.h:
342
+ decklink: Fix broken COM string conversion
343
+ WideCharToMultiByte return is the string length without null terminate
344
+ character if passed "cchWideChar" does not include the null terminate
345
+ character size. Instead of passing the exact string length, pass -1 so that
346
+ the API can understand the input string is null terminated already and
347
+ returned value from the API includes the character.
348
+ Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3023
349
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5446>
350
+
351
+2023-10-05 13:34:14 +0800 James Oliver <james.oliver@icetana.com.au>
352
+
353
+ * sys/nvcodec/gstnvh265encoder.cpp:
354
+ nvh265encoder: fix bounds for auto-select GPU enumeration
355
+ Fixes the bounds-check for encoder auto-select GPU enumeration to be
356
+ between 0-7 instead of 0-6. This should allow 8-GPU machines to work
357
+ with nvautogpuh265enc for the last enumerated GPU.
358
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5439>
359
+
360
+2023-10-05 13:29:49 +0800 James Oliver <james.oliver@icetana.com.au>
361
+
362
+ * sys/nvcodec/gstnvh264encoder.cpp:
363
+ nvh264encoder: fix bounds for auto-select GPU enumeration
364
+ Fixes the bounds-check for encoder auto-select GPU enumeration to be
365
+ between 0-7 instead of 0-6. This should allow 8-GPU machines to work
366
+ with nvautogpuh264enc for the last enumerated GPU.
367
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5439>
368
+
369
+2023-09-27 12:33:39 +0200 Philippe Normand <philn@igalia.com>
370
+
371
+ * gst/inter/gstinteraudiosink.c:
372
+ interaudiosink: Ensure adapters don't store buffers with audio meta
373
+ The interaudiosrc might take buffers of different sizes from the audio adapter,
374
+ so keeping metas consistency would be an issue. So the sink now strips the audio
375
+ metas away and the src adds them back (for non-interleaved layouts only) when
376
+ taking buffers from the adapter.
377
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5416>
378
+
379
+2023-09-13 15:11:32 +0100 Philippe Normand <philn@igalia.com>
380
+
381
+ * gst/inter/gstinteraudiosrc.c:
382
+ interaudiosrc: Add audio meta to buffers containing non-interleaved samples
383
+ Without this a downstream audioconverter wouldn't be able to map the
384
+ GstAudioBuffer prior to conversion.
385
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5416>
386
+
387
+2023-09-27 01:12:01 +0900 Seungha Yang <seungha@centricular.com>
388
+
389
+ * sys/d3d11/gstd3d11decoder.cpp:
390
+ d3d11decoder: Fix crash on negotiate() when decoder is not configured
391
+ The negotiate() can be called by GstVideoDecoder baseclass on GAP event,
392
+ and decoder helper object might not be configured at the time
393
+ when negotiate() is called.
394
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5401>
395
+
396
+2023-09-20 19:41:00 +0100 Tim-Philipp Müller <tim@centricular.com>
397
+
398
+ * meson.build:
399
+ Back to development
400
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5371>
401
+
402
=== release 1.22.6 ===
403
404
2023-09-20 18:10:57 +0100 Tim-Philipp Müller <tim@centricular.com>
405
gst-plugins-bad-1.22.6.tar.xz/NEWS -> gst-plugins-bad-1.22.7.tar.xz/NEWS
Changed
241
1
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.5 and was
6
-released on 20 July 2023.
7
+The latest bug-fix release in the stable 1.22 series is 1.22.7 and was
8
+released on 13 November 2023.
9
10
See https://gstreamer.freedesktop.org/releases/1.22/ for the latest
11
version of this document.
12
13
-Last updated: Thursday 20 July 2023, 12:00 UTC (log)
14
+Last updated: Monday 13 November 2023, 10:00 UTC (log)
15
16
Introduction
17
18
19
- List of Merge Requests applied in 1.22.6
20
- List of Issues fixed in 1.22.6
21
22
+1.22.7
23
+
24
+The seventh 1.22 bug-fix release (1.22.7) was released on 13 November
25
+2023.
26
+
27
+This release only contains bugfixes and security fixes and it should be
28
+safe to update from 1.22.x.
29
+
30
+Highlighted bugfixes in 1.22.7
31
+
32
+- Security fixes for the MXF demuxer and AV1 codec parser
33
+- glfilter: Memory leak fix for OpenGL filter elements
34
+- d3d11videosink: Fix toggling between fullscreen and maximized, and
35
+ window switching in fullscreen mode
36
+- DASH / HLS adaptive streaming fixes
37
+- Decklink card device provider device name string handling fixes
38
+- interaudiosrc: handle non-interleaved audio properly
39
+- openh264: Fail gracefully if openh264 encoder/decoder creation fails
40
+- rtspsrc: improved whitespace handling in response headers by certain
41
+ cameras
42
+- v4l2codecs: avoid wrap-around after 1000000 frames; tiled formats
43
+ handling fixes
44
+- video-scaler, audio-resampler: downgraded “Can’t find exact taps”
45
+ debug log messages
46
+- wasapi2: Don’t use global volume control object
47
+- Rust plugins: various improvements in aws, fmp4mux, hlssink3,
48
+ livesync, ndisrc, rtpav1depay, rsfilesink, s3sink, sccparse
49
+- WebRTC: various webrtchttp, webrtcsrc, and webrtcsink improvements
50
+ and fixes
51
+- Cerbero build tools: recognise Windows 11; restrict parallelism of
52
+ gst-plugins-rs build on small systems
53
+- Packages: ca-certificates update; fix gio module loading and TLS
54
+ support on macOS
55
+
56
+gstreamer
57
+
58
+- debugutils: provide gst_debug_bin_to_dot_data() implementation even
59
+ if debug system is disabled
60
+
61
+gst-plugins-base
62
+
63
+- audioaggregator, audiomixer: Make access to the pad list thread-safe
64
+ while mixing
65
+- basetextoverlay: Fix overlay never rendering again if width reaches
66
+ 1px
67
+- glfiter: Protect GstGLContext access
68
+- glfilter: Only add parent meta if inbuf != outbuf
69
+- macOS: fix huge memory leak with glfilter-based elements
70
+- rtspconnection: Ignore trailing whitespace in rtsp headers
71
+- video-scaler, audio-resampler: downgrade ‘can’t find exact taps’ to
72
+ debug
73
+
74
+gst-plugins-good
75
+
76
+- adaptivedemux2: Do not submit_transfer when cancelled
77
+- adaptivedemux2: Call GTasks’s return functions for blocking tasks
78
+- flacenc: Correctly handle up to 255 cue entries
79
+- flvmux: set the src segment position as running time
80
+- imagesequencesrc: fix deadlock when feeding the same image in a loop
81
+- pngenc: output one frame only in snapshot mode and mark output
82
+ frames as I-frames
83
+- qmlglsrc: sync on the streaming thread
84
+- souphttpsrc: Chain up to finalize to fix memory leak
85
+- wavparse: fix buffer leak with adtl tag
86
+- v4l2codecs: Avoid QBUF/DQBUF struct timeval .tv_usec wrap-around at
87
+ frame 1000000
88
+- v4l2codecs: Fix tiled formats stride conversion
89
+
90
+gst-plugins-bad
91
+
92
+- audiobuffersplit: disable max-silence-time if set to 0
93
+- libde265: Do not decode the non 4:2:0 8 bits format
94
+- codecparsers: av1: Clip max tile rows and cols values
95
+- codecs: h265: Do not free slice header before using it
96
+- d3d11converter: Fix 10/12bits planar output
97
+- d3d11decoder: Fix crash on negotiate() when decoder is not
98
+ configured
99
+- d3d11videosink: Fix toggling between fullscreen and maximized
100
+- d3d11videosink: Fix window switching in case of fullscreen mode
101
+- d3d11screencapturesrc: Fix mouse cursor blending
102
+- decklink: Fix broken COM string conversion
103
+- decklink: Decklink Device Provider wrongly parses SDK strings
104
+- gstwayland: Don’t depend on wayland-protocols
105
+- interaudiosrc: Add audio meta to buffers containing non-interleaved
106
+ samples
107
+- kmssink: Add TIDSS auto-detection
108
+- mfvideoencoder: Fix typo in template caps
109
+- mxfdemux: Store GstMXFDemuxEssenceTrack in their own fixed
110
+ allocation
111
+- nvcodec: fix bounds for auto-select GPU enumeration
112
+- openh264: Fail gracefully if openh264 encoder/decoder creation fails
113
+- tsmux: More cleanups
114
+- tsmux: Fill padding packets with stuffing bytes
115
+- v4l2codecs: Fix tiled formats stride conversion
116
+- v4l2videodec: Correctly free caps to avoid memory leak
117
+- wasapi2: Don’t use global volume control object
118
+- wasapi2device: Ignore activation failed device
119
+
120
+gst-plugins-ugly
121
+
122
+- No changes
123
+
124
+gst-plugins-rs
125
+
126
+- aws: s3sink: Fix handling of special characters in key
127
+- aws: s3: Properly percent-decode GstS3Url
128
+- fmp4mux: Don’t overflow negative composition offset calculation
129
+- fmp4mux: specify the fragment duration unit
130
+- hlssink3: Use Path API for getting file name
131
+- hlssink3: Use sprintf for segment name formatting
132
+- hlssink3: Remove unused deps
133
+- hlssink3: Don’t remove old files if max-files is zero
134
+- hlssink3: Don’t remove uri from playlist if playlist-length is zero
135
+- hlssink3: Various cleanup
136
+- livesync: log new pending segments
137
+- livesync: display jitter when waiting on clock
138
+- livesync: Rename activatemode methods to *_activatemode
139
+- livesync: Simplify start_src_task and src_loop
140
+- livesync: Improve audio duration fixups
141
+- livesync: Log a category error when we are missing the segment
142
+- livesync: Clean up state handling
143
+- livesync: Replace an if-let with match
144
+- livesync: Move a notify closer to the interesting state change
145
+- livesync: Move num_in counting to the src task
146
+- livesync: Simplify num_duplicate counting
147
+- livesync: Handle flags and late buffer patching after queueing
148
+- livesync: Separate out_buffer duplicate status from GAP flag
149
+- livesync: Use fallback_duration for audio repeat buffers as well
150
+- livesync: example: Add identities single-segment=1
151
+- livesync: Split fallback_duration into in_ and out_duration
152
+- livesync: Keep existing buffer duration in some cases
153
+- livesync: Remove the stop from outgoing segments
154
+- ndisrc: Assume input with more than 8 raw audio channels is
155
+ unpositioned
156
+- rtpav1depay: Skip unexpected leading fragments
157
+- rtpav1depay: Don’t push stale temporal delimiters downstream
158
+- rsfilesink: set sync=false
159
+- s3sink: set sync=false
160
+- sccparse: Fix leading spaces between the tab and caption data
161
+- webrtchttp: Respect HTTP redirects
162
+- webrtcsrc: use @watch instead of @to-owned
163
+- webrtcsrc: add turn-servers property
164
+- webrtc: Fix paths in README
165
+- webrtcsink: don’t miss ice candidates
166
+
167
+gst-libav
168
+
169
+- No changes
170
+
171
+gst-rtsp-server
172
+
173
+- rtspclientsink: Don’t leak previous server_ip
174
+
175
+gstreamer-vaapi
176
+
177
+- No changes
178
+
179
+gstreamer-sharp
180
+
181
+- No changes
182
+
183
+gst-omx
184
+
185
+- No changes
186
+
187
+gst-python
188
+
189
+- No changes
190
+
191
+gst-editing-services
192
+
193
+- No changes
194
+
195
+gst-validate + gst-integration-testsuites
196
+
197
+- gst-validate: Fix compatibility with Python 3.12
198
+
199
+gst-examples
200
+
201
+- No changes
202
+
203
+Development build environment
204
+
205
+- No changes
206
+
207
+Cerbero build tool and packaging changes in 1.22.7
208
+
209
+- Add Windows 11 to the supported versions list
210
+- ca-certificates: Update to version from 2023-08-22
211
+- cargo: Restrict parallelism if a small system is detected (for
212
+ gst-plugins-rs build)
213
+- Fix venv setup on Python 3.11+
214
+- Fix unlinking of Android NDK directories if install fails midway
215
+- glib: Work around AppleClang + -Werror test build failure
216
+- glib: Re-add gio module loading patch for macOS, remove unused patch
217
+ files
218
+
219
+Contributors to 1.22.7
220
+
221
+Albert Sjölund, Arun Raghavan, Balló György, Benjamin Gaignard, Detlev
222
+Casanova, Doug Nazar, Eric, Florian Zwoch, François Laignel, Guillaume
223
+Desmottes, He Junyan, Hou Qi, James Oliver, Jan Alexander Steffens
224
+(heftig), Jan Schmidt, Johan Adam Nilsson, Jordan Yelloz, Kalev Lember,
225
+L. E. Segovia, Lieven Paulissen, Maksym Khomenko, Marek Vasut, Matthias
226
+Fuchs, Michiel Westerbeek, Nicolas Dufresne, Philippe Normand, Piotr
227
+Brzeziński, Rahul T R, Sean DuBois, Sebastian Dröge, Seungha Yang,
228
+Stéphane Cerveau, Thibault Saunier, Tim-Philipp Müller,
229
+
230
+… and many others who have contributed bug reports, translations, sent
231
+suggestions or helped testing. Thank you all!
232
+
233
+List of merge requests and issues fixed in 1.22.7
234
+
235
+- List of Merge Requests applied in 1.22.7
236
+- List of Issues fixed in 1.22.7
237
+
238
Schedule for 1.24
239
240
Our next major feature release will be 1.24, and 1.23 will be the
241
gst-plugins-bad-1.22.6.tar.xz/RELEASE -> gst-plugins-bad-1.22.7.tar.xz/RELEASE
Changed
7
1
2
-This is GStreamer gst-plugins-bad 1.22.6.
3
+This is GStreamer gst-plugins-bad 1.22.7.
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.6.tar.xz/docs/plugins/gst_plugins_cache.json -> gst-plugins-bad-1.22.7.tar.xz/docs/plugins/gst_plugins_cache.json
Changed
10
1
2
"long-name": "HEVC/H.265 decoder",
3
"pad-templates": {
4
"sink": {
5
- "caps": "video/x-h265:\n stream-format: { (string)hvc1, (string)hev1, (string)byte-stream }\n alignment: { (string)au, (string)nal }\n",
6
+ "caps": "video/x-h265:\n stream-format: { (string)hvc1, (string)hev1, (string)byte-stream }\n alignment: { (string)au, (string)nal }\n profile: main\n",
7
"direction": "sink",
8
"presence": "always"
9
},
10
gst-plugins-bad-1.22.6.tar.xz/ext/libde265/libde265-dec.c -> gst-plugins-bad-1.22.7.tar.xz/ext/libde265/libde265-dec.c
Changed
13
1
2
GST_PAD_ALWAYS,
3
GST_STATIC_CAPS
4
("video/x-h265, stream-format=(string) { hvc1, hev1, byte-stream }, "
5
- "alignment=(string) { au, nal }")
6
+ "alignment=(string) { au, nal }, "
7
+ /* TODO: Can support more profiles by adding the according
8
+ output formats in src caps. */
9
+ "profile=(string) main")
10
);
11
12
static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
13
gst-plugins-bad-1.22.6.tar.xz/ext/openh264/gstopenh264dec.cpp -> gst-plugins-bad-1.22.7.tar.xz/ext/openh264/gstopenh264dec.cpp
Changed
15
1
2
WelsDestroyDecoder (openh264dec->decoder);
3
openh264dec->decoder = NULL;
4
}
5
- WelsCreateDecoder (&(openh264dec->decoder));
6
+
7
+ if (WelsCreateDecoder (&(openh264dec->decoder)) != 0) {
8
+ GST_ELEMENT_ERROR (openh264dec, LIBRARY, INIT, (NULL),
9
+ ("Failed to create OpenH264 decoder."));
10
+ return FALSE;
11
+ }
12
13
#ifndef GST_DISABLE_GST_DEBUG
14
{
15
gst-plugins-bad-1.22.6.tar.xz/ext/openh264/gstopenh264enc.cpp -> gst-plugins-bad-1.22.7.tar.xz/ext/openh264/gstopenh264enc.cpp
Changed
16
1
2
WelsDestroySVCEncoder (openh264enc->encoder);
3
openh264enc->encoder = NULL;
4
}
5
- WelsCreateSVCEncoder (&openh264enc->encoder);
6
+
7
+ if (WelsCreateSVCEncoder (&openh264enc->encoder) != 0) {
8
+ GST_ELEMENT_ERROR (openh264enc, LIBRARY, INIT, (NULL),
9
+ ("Failed to create OpenH264 encoder."));
10
+ return FALSE;
11
+ }
12
+
13
unsigned int uiTraceLevel = WELS_LOG_ERROR;
14
openh264enc->encoder->SetOption (ENCODER_OPTION_TRACE_LEVEL, &uiTraceLevel);
15
16
gst-plugins-bad-1.22.6.tar.xz/gst-libs/gst/codecparsers/gstav1parser.c -> gst-plugins-bad-1.22.7.tar.xz/gst-libs/gst/codecparsers/gstav1parser.c
Changed
10
1
2
((parser->state.mi_cols + 31) >> 5) : ((parser->state.mi_cols + 15) >> 4);
3
sb_rows = seq_header->use_128x128_superblock ? ((parser->state.mi_rows +
4
31) >> 5) : ((parser->state.mi_rows + 15) >> 4);
5
+ sb_cols = MIN (GST_AV1_MAX_TILE_COLS, sb_cols);
6
+ sb_rows = MIN (GST_AV1_MAX_TILE_ROWS, sb_rows);
7
sb_shift = seq_header->use_128x128_superblock ? 5 : 4;
8
sb_size = sb_shift + 2;
9
max_tile_width_sb = GST_AV1_MAX_TILE_WIDTH >> sb_size;
10
gst-plugins-bad-1.22.6.tar.xz/gst-libs/gst/codecs/gsth265decoder.c -> gst-plugins-bad-1.22.7.tar.xz/gst-libs/gst/codecs/gsth265decoder.c
Changed
23
1
2
if (pres != GST_H265_PARSER_OK)
3
return pres;
4
5
- /* NOTE: gst_h265_parser_parse_slice_hdr() allocates array
6
- * GstH265SliceHdr::entry_point_offset_minus1 but we don't use it
7
- * in this h265decoder baseclass at the moment
8
- */
9
- gst_h265_slice_hdr_free (&slice.header);
10
slice.nalu = *nalu;
11
12
if (nalu->type >= GST_H265_NAL_SLICE_BLA_W_LP &&
13
14
if (!nalu)
15
return;
16
17
+ if (nalu->is_slice)
18
+ gst_h265_slice_hdr_free (&nalu->unit.slice.header);
19
+
20
memset (nalu, 0, sizeof (GstH265DecoderNalUnit));
21
}
22
23
gst-plugins-bad-1.22.6.tar.xz/gst-libs/gst/d3d11/gstd3d11converter.cpp -> gst-plugins-bad-1.22.7.tar.xz/gst-libs/gst/d3d11/gstd3d11converter.cpp
Changed
292
1
2
" return output;\n"
3
"}";
4
5
-static const gchar templ_OUTPUT_LUMA_SCALED =
6
+static const gchar templ_OUTPUT_LUMA_10 =
7
"PS_OUTPUT build_output (float4 sample)\n"
8
"{\n"
9
" PS_OUTPUT output;\n"
10
- " output.Plane_0 = float4 (sample.x / %d, 0.0, 0.0, 1.0);\n"
11
+ " output.Plane_0 = float4 (sample.x * 1023.0 / 65535.0, 0.0, 0.0, 1.0);\n"
12
+ " return output;\n"
13
+ "}";
14
+
15
+static const gchar templ_OUTPUT_LUMA_12 =
16
+ "PS_OUTPUT build_output (float4 sample)\n"
17
+ "{\n"
18
+ " PS_OUTPUT output;\n"
19
+ " output.Plane_0 = float4 (sample.x * 4095.0 / 65535.0, 0.0, 0.0, 1.0);\n"
20
" return output;\n"
21
"}";
22
23
24
" return output;\n"
25
"}";
26
27
-static const gchar templ_OUTPUT_CHROMA_PLANAR_SCALED =
28
+static const gchar templ_OUTPUT_CHROMA_PLANAR_10 =
29
+ "PS_OUTPUT build_output (float4 sample)\n"
30
+ "{\n"
31
+ " PS_OUTPUT output;\n"
32
+ " output.Plane_0 = float4 (sample.y * 1023.0 / 65535.0, 0.0, 0.0, 1.0);\n"
33
+ " output.Plane_1 = float4 (sample.z * 1023.0 / 65535.0, 0.0, 0.0, 1.0);\n"
34
+ " return output;\n"
35
+ "}";
36
+
37
+static const gchar templ_OUTPUT_CHROMA_PLANAR_12 =
38
"PS_OUTPUT build_output (float4 sample)\n"
39
"{\n"
40
" PS_OUTPUT output;\n"
41
- " output.Plane_0 = float4 (sample.%c / %d, 0.0, 0.0, 1.0);\n"
42
- " output.Plane_1 = float4 (sample.%c / %d, 0.0, 0.0, 1.0);\n"
43
+ " output.Plane_0 = float4 (sample.y * 4095.0 / 65535.0, 0.0, 0.0, 1.0);\n"
44
+ " output.Plane_1 = float4 (sample.z * 4095.0 / 65535.0, 0.0, 0.0, 1.0);\n"
45
" return output;\n"
46
"}";
47
48
49
" return output;\n"
50
"}";
51
52
-static const gchar templ_OUTPUT_PLANAR_SCALED =
53
+static const gchar templ_OUTPUT_PLANAR_10 =
54
+ "PS_OUTPUT build_output (float4 sample)\n"
55
+ "{\n"
56
+ " PS_OUTPUT output;\n"
57
+ " float3 scaled = sample.xyz * 1023.0 / 65535.0;\n"
58
+ " output.Plane_0 = float4 (scaled.%c, 0.0, 0.0, 1.0);\n"
59
+ " output.Plane_1 = float4 (scaled.%c, 0.0, 0.0, 1.0);\n"
60
+ " output.Plane_2 = float4 (scaled.%c, 0.0, 0.0, 1.0);\n"
61
+ " return output;\n"
62
+ "}";
63
+
64
+static const gchar templ_OUTPUT_PLANAR_12 =
65
"PS_OUTPUT build_output (float4 sample)\n"
66
"{\n"
67
" PS_OUTPUT output;\n"
68
- " float3 scaled = sample.xyz / %d;\n"
69
+ " float3 scaled = sample.xyz * 4095.0 / 65535.0;\n"
70
" output.Plane_0 = float4 (scaled.%c, 0.0, 0.0, 1.0);\n"
71
" output.Plane_1 = float4 (scaled.%c, 0.0, 0.0, 1.0);\n"
72
" output.Plane_2 = float4 (scaled.%c, 0.0, 0.0, 1.0);\n"
73
74
" return output;\n"
75
"}";
76
77
-static const gchar templ_OUTPUT_PLANAR_4_SCALED =
78
+static const gchar templ_OUTPUT_PLANAR_4_10 =
79
"PS_OUTPUT build_output (float4 sample)\n"
80
"{\n"
81
" PS_OUTPUT output;\n"
82
- " float4 scaled = sample / %d;\n"
83
+ " float4 scaled = sample * 1023.0 / 65535.0;\n"
84
+ " output.Plane_0 = float4 (scaled.%c, 0.0, 0.0, 1.0);\n"
85
+ " output.Plane_1 = float4 (scaled.%c, 0.0, 0.0, 1.0);\n"
86
+ " output.Plane_2 = float4 (scaled.%c, 0.0, 0.0, 1.0);\n"
87
+ " output.Plane_3 = float4 (scaled.%c, 0.0, 0.0, 1.0);\n"
88
+ " return output;\n"
89
+ "}";
90
+
91
+static const gchar templ_OUTPUT_PLANAR_4_12 =
92
+ "PS_OUTPUT build_output (float4 sample)\n"
93
+ "{\n"
94
+ " PS_OUTPUT output;\n"
95
+ " float4 scaled = sample * 4095.0 / 65535.0;\n"
96
" output.Plane_0 = float4 (scaled.%c, 0.0, 0.0, 1.0);\n"
97
" output.Plane_1 = float4 (scaled.%c, 0.0, 0.0, 1.0);\n"
98
" output.Plane_2 = float4 (scaled.%c, 0.0, 0.0, 1.0);\n"
99
100
get_planar_component (GstVideoFormat format, gchar * x, gchar * y, gchar * z,
101
gchar * w, guint * scale)
102
{
103
- switch (format) {
104
- case GST_VIDEO_FORMAT_I420_10LE:
105
- case GST_VIDEO_FORMAT_I422_10LE:
106
- case GST_VIDEO_FORMAT_Y444_10LE:
107
- case GST_VIDEO_FORMAT_GBR_10LE:
108
- case GST_VIDEO_FORMAT_GBRA_10LE:
109
- *scale = (1 << 6);
110
- break;
111
- case GST_VIDEO_FORMAT_I420_12LE:
112
- case GST_VIDEO_FORMAT_I422_12LE:
113
- case GST_VIDEO_FORMAT_Y444_12LE:
114
- case GST_VIDEO_FORMAT_GBR_12LE:
115
- case GST_VIDEO_FORMAT_GBRA_12LE:
116
- *scale = (1 << 4);
117
- break;
118
- default:
119
- *scale = 1;
120
- break;
121
+ if (scale) {
122
+ switch (format) {
123
+ case GST_VIDEO_FORMAT_I420_10LE:
124
+ case GST_VIDEO_FORMAT_I422_10LE:
125
+ case GST_VIDEO_FORMAT_Y444_10LE:
126
+ case GST_VIDEO_FORMAT_GBR_10LE:
127
+ case GST_VIDEO_FORMAT_GBRA_10LE:
128
+ *scale = (1 << 6);
129
+ break;
130
+ case GST_VIDEO_FORMAT_I420_12LE:
131
+ case GST_VIDEO_FORMAT_I422_12LE:
132
+ case GST_VIDEO_FORMAT_Y444_12LE:
133
+ case GST_VIDEO_FORMAT_GBR_12LE:
134
+ case GST_VIDEO_FORMAT_GBRA_12LE:
135
+ *scale = (1 << 4);
136
+ break;
137
+ default:
138
+ *scale = 1;
139
+ break;
140
+ }
141
}
142
143
switch (format) {
144
145
/* planar */
146
case GST_VIDEO_FORMAT_I420:
147
case GST_VIDEO_FORMAT_YV12:
148
- case GST_VIDEO_FORMAT_I420_10LE:
149
- case GST_VIDEO_FORMAT_I420_12LE:
150
case GST_VIDEO_FORMAT_Y42B:
151
- case GST_VIDEO_FORMAT_I422_10LE:
152
- case GST_VIDEO_FORMAT_I422_12LE:{
153
+ {
154
gchar y, u, v, w;
155
- guint scale;
156
157
- get_planar_component (format, &y, &u, &v, &w, &scale);
158
+ get_planar_component (format, &y, &u, &v, &w, nullptr);
159
160
cinfo->ps_output0 = &output_typesOUTPUT_SINGLE_PLANE;
161
cinfo->ps_output1 = &output_typesOUTPUT_TWO_PLANES;
162
163
- if (info->finfo->depth0 == 8) {
164
- cinfo->build_output_func0 = g_strdup (templ_OUTPUT_LUMA);
165
- cinfo->build_output_func1 =
166
- g_strdup_printf (templ_OUTPUT_CHROMA_PLANAR, u, v);
167
- } else {
168
- cinfo->build_output_func0 = g_strdup_printf (templ_OUTPUT_LUMA_SCALED,
169
- scale);
170
- cinfo->build_output_func1 =
171
- g_strdup_printf (templ_OUTPUT_CHROMA_PLANAR_SCALED,
172
- u, scale, v, scale);
173
- }
174
+ cinfo->build_output_func0 = g_strdup (templ_OUTPUT_LUMA);
175
+ cinfo->build_output_func1 =
176
+ g_strdup_printf (templ_OUTPUT_CHROMA_PLANAR, u, v);
177
+ break;
178
+ }
179
+ case GST_VIDEO_FORMAT_I420_10LE:
180
+ case GST_VIDEO_FORMAT_I422_10LE:
181
+ {
182
+ cinfo->ps_output0 = &output_typesOUTPUT_SINGLE_PLANE;
183
+ cinfo->ps_output1 = &output_typesOUTPUT_TWO_PLANES;
184
+
185
+ cinfo->build_output_func0 = g_strdup (templ_OUTPUT_LUMA_10);
186
+ cinfo->build_output_func1 = g_strdup (templ_OUTPUT_CHROMA_PLANAR_10);
187
+ break;
188
+ }
189
+ case GST_VIDEO_FORMAT_I420_12LE:
190
+ case GST_VIDEO_FORMAT_I422_12LE:
191
+ {
192
+ cinfo->ps_output0 = &output_typesOUTPUT_SINGLE_PLANE;
193
+ cinfo->ps_output1 = &output_typesOUTPUT_TWO_PLANES;
194
+
195
+ cinfo->build_output_func0 = g_strdup (templ_OUTPUT_LUMA_12);
196
+ cinfo->build_output_func1 = g_strdup (templ_OUTPUT_CHROMA_PLANAR_12);
197
break;
198
}
199
case GST_VIDEO_FORMAT_Y444:
200
- case GST_VIDEO_FORMAT_Y444_10LE:
201
- case GST_VIDEO_FORMAT_Y444_12LE:
202
case GST_VIDEO_FORMAT_Y444_16LE:
203
case GST_VIDEO_FORMAT_RGBP:
204
case GST_VIDEO_FORMAT_BGRP:
205
case GST_VIDEO_FORMAT_GBR:
206
+ {
207
+ gchar x, y, z, w;
208
+
209
+ get_planar_component (format, &x, &y, &z, &w, nullptr);
210
+
211
+ cinfo->ps_output0 = &output_typesOUTPUT_THREE_PLANES;
212
+ cinfo->build_output_func0 = g_strdup_printf (templ_OUTPUT_PLANAR,
213
+ x, y, z);
214
+ break;
215
+ }
216
+ case GST_VIDEO_FORMAT_Y444_10LE:
217
case GST_VIDEO_FORMAT_GBR_10LE:
218
+ {
219
+ gchar x, y, z, w;
220
+
221
+ get_planar_component (format, &x, &y, &z, &w, nullptr);
222
+
223
+ cinfo->ps_output0 = &output_typesOUTPUT_THREE_PLANES;
224
+ cinfo->build_output_func0 =
225
+ g_strdup_printf (templ_OUTPUT_PLANAR_10, x, y, z);
226
+ break;
227
+ }
228
+ case GST_VIDEO_FORMAT_Y444_12LE:
229
case GST_VIDEO_FORMAT_GBR_12LE:
230
{
231
gchar x, y, z, w;
232
- guint scale;
233
234
- get_planar_component (format, &x, &y, &z, &w, &scale);
235
+ get_planar_component (format, &x, &y, &z, &w, nullptr);
236
237
cinfo->ps_output0 = &output_typesOUTPUT_THREE_PLANES;
238
- if (info->finfo->depth0 == 8) {
239
- cinfo->build_output_func0 = g_strdup_printf (templ_OUTPUT_PLANAR,
240
- x, y, z);
241
- } else {
242
- cinfo->build_output_func0 =
243
- g_strdup_printf (templ_OUTPUT_PLANAR_SCALED, scale, x, y, z);
244
- }
245
+ cinfo->build_output_func0 =
246
+ g_strdup_printf (templ_OUTPUT_PLANAR_12, x, y, z);
247
break;
248
}
249
case GST_VIDEO_FORMAT_GBRA:
250
+ {
251
+ gchar x, y, z, w;
252
+
253
+ get_planar_component (format, &x, &y, &z, &w, nullptr);
254
+
255
+ cinfo->ps_output0 = &output_typesOUTPUT_FOUR_PLANES;
256
+ cinfo->build_output_func0 = g_strdup_printf (templ_OUTPUT_PLANAR_4,
257
+ x, y, z, w);
258
+ break;
259
+ }
260
case GST_VIDEO_FORMAT_GBRA_10LE:
261
+ {
262
+ gchar x, y, z, w;
263
+
264
+ get_planar_component (format, &x, &y, &z, &w, nullptr);
265
+
266
+ cinfo->ps_output0 = &output_typesOUTPUT_FOUR_PLANES;
267
+ cinfo->build_output_func0 = g_strdup_printf (templ_OUTPUT_PLANAR_4_10,
268
+ x, y, z, w);
269
+ break;
270
+ }
271
case GST_VIDEO_FORMAT_GBRA_12LE:
272
{
273
gchar x, y, z, w;
274
- guint scale;
275
276
- get_planar_component (format, &x, &y, &z, &w, &scale);
277
+ get_planar_component (format, &x, &y, &z, &w, nullptr);
278
279
cinfo->ps_output0 = &output_typesOUTPUT_FOUR_PLANES;
280
- if (info->finfo->depth0 == 8) {
281
- cinfo->build_output_func0 = g_strdup_printf (templ_OUTPUT_PLANAR_4,
282
- x, y, z, w);
283
- } else {
284
- cinfo->build_output_func0 =
285
- g_strdup_printf (templ_OUTPUT_PLANAR_4_SCALED, scale, x, y, z, w);
286
- }
287
+ cinfo->build_output_func0 = g_strdup_printf (templ_OUTPUT_PLANAR_4_12,
288
+ x, y, z, w);
289
break;
290
}
291
case GST_VIDEO_FORMAT_GRAY8:
292
gst-plugins-bad-1.22.6.tar.xz/gst-libs/gst/wayland/meson.build -> gst-plugins-bad-1.22.7.tar.xz/gst-libs/gst/wayland/meson.build
Changed
19
1
2
darwin_versions : osxversion,
3
install : true,
4
dependencies : gst_dep, gstallocators_dep, gstvideo_dep, libdrm_dep,
5
- wl_client_dep, wl_protocol_dep
6
+ wl_client_dep
7
)
8
9
pkg_name = 'gstreamer-wayland-1.0'
10
11
gstwayland_dep = declare_dependency(link_with : gstwayland,
12
include_directories : libsinc,
13
dependencies : gst_dep, gstallocators_dep, gstvideo_dep, libdrm_dep,
14
- wl_client_dep, wl_protocol_dep)
15
+ wl_client_dep)
16
17
install_headers(wl_headers, subdir: 'gstreamer-1.0/gst/wayland')
18
meson.override_dependency(pkg_name, gstwayland_dep)
19
gst-plugins-bad-1.22.6.tar.xz/gst-plugins-bad.doap -> gst-plugins-bad-1.22.7.tar.xz/gst-plugins-bad.doap
Changed
18
1
2
3
<release>
4
<Version>
5
+ <revision>1.22.7</revision>
6
+ <branch>1.22</branch>
7
+ <name></name>
8
+ <created>2023-11-13</created>
9
+ <file-release rdf:resource="https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.22.7.tar.xz" />
10
+ </Version>
11
+ </release>
12
+
13
+ <release>
14
+ <Version>
15
<revision>1.22.6</revision>
16
<branch>1.22</branch>
17
<name></name>
18
gst-plugins-bad-1.22.6.tar.xz/gst/audiobuffersplit/gstaudiobuffersplit.c -> gst-plugins-bad-1.22.7.tar.xz/gst/audiobuffersplit/gstaudiobuffersplit.c
Changed
10
1
2
GstClockTime silence_time =
3
gst_util_uint64_scale (silence_samples, GST_SECOND, rate);
4
5
- if (silence_time > self->max_silence_time) {
6
+ if (silence_time > self->max_silence_time && self->max_silence_time != 0) {
7
GST_DEBUG_OBJECT (self,
8
"Not inserting %" G_GUINT64_FORMAT " samples of silence (%"
9
GST_TIME_FORMAT " exceeds maximum %" GST_TIME_FORMAT ")",
10
gst-plugins-bad-1.22.6.tar.xz/gst/inter/gstinteraudiosink.c -> gst-plugins-bad-1.22.7.tar.xz/gst/inter/gstinteraudiosink.c
Changed
40
1
2
guint n, bpf;
3
guint64 period_time, buffer_time;
4
guint64 period_samples, buffer_samples;
5
+ GstBuffer *tmp;
6
7
GST_DEBUG_OBJECT (interaudiosink, "render %" G_GSIZE_FORMAT,
8
gst_buffer_get_size (buffer));
9
10
11
n = gst_adapter_available (interaudiosink->input_adapter);
12
if (period_samples * bpf > gst_buffer_get_size (buffer) + n) {
13
- gst_adapter_push (interaudiosink->input_adapter, gst_buffer_ref (buffer));
14
+ GstAudioMeta *audio_meta = NULL;
15
+
16
+ tmp = gst_buffer_copy_deep (buffer);
17
+ audio_meta = gst_buffer_get_audio_meta (tmp);
18
+ if (audio_meta != NULL)
19
+ gst_buffer_remove_meta (tmp, GST_META_CAST (audio_meta));
20
+
21
+ gst_adapter_push (interaudiosink->input_adapter, tmp);
22
} else {
23
- GstBuffer *tmp;
24
+ GstAudioMeta *audio_meta = NULL;
25
26
if (n > 0) {
27
tmp = gst_adapter_take_buffer (interaudiosink->input_adapter, n);
28
gst_adapter_push (interaudiosink->surface->audio_adapter, tmp);
29
}
30
- gst_adapter_push (interaudiosink->surface->audio_adapter,
31
- gst_buffer_ref (buffer));
32
+ tmp = gst_buffer_copy_deep (buffer);
33
+ audio_meta = gst_buffer_get_audio_meta (tmp);
34
+ if (audio_meta != NULL)
35
+ gst_buffer_remove_meta (tmp, GST_META_CAST (audio_meta));
36
+ gst_adapter_push (interaudiosink->surface->audio_adapter, tmp);
37
}
38
g_mutex_unlock (&interaudiosink->surface->mutex);
39
40
gst-plugins-bad-1.22.6.tar.xz/gst/inter/gstinteraudiosrc.c -> gst-plugins-bad-1.22.7.tar.xz/gst/inter/gstinteraudiosrc.c
Changed
14
1
2
}
3
n = period_samples;
4
5
+ /* audioconvert expects an audio meta for planar layout audio inputs. */
6
+ if (GST_AUDIO_INFO_LAYOUT (&interaudiosrc->info) ==
7
+ GST_AUDIO_LAYOUT_NON_INTERLEAVED) {
8
+ gst_buffer_add_audio_meta (buffer, &interaudiosrc->info, n, NULL);
9
+ }
10
+
11
GST_BUFFER_OFFSET (buffer) = interaudiosrc->n_samples;
12
GST_BUFFER_OFFSET_END (buffer) = interaudiosrc->n_samples + n;
13
GST_BUFFER_DTS (buffer) = GST_CLOCK_TIME_NONE;
14
gst-plugins-bad-1.22.6.tar.xz/gst/mpegtsmux/gstatscmux.c -> gst-plugins-bad-1.22.7.tar.xz/gst/mpegtsmux/gstatscmux.c
Changed
41
1
2
3
static void
4
gst_atsc_mux_stream_get_es_descrs (TsMuxStream * stream,
5
- GstMpegtsPMTStream * pmt_stream, GstBaseTsMux * mpegtsmux)
6
+ GstMpegtsPMTStream * pmt_stream, gpointer user_data)
7
{
8
GstMpegtsDescriptor *descriptor;
9
10
11
}
12
13
static TsMuxStream *
14
-gst_atsc_mux_create_new_stream (guint16 new_pid,
15
- TsMuxStreamType stream_type, GstBaseTsMux * mpegtsmux)
16
+gst_atsc_mux_create_new_stream (guint16 new_pid, TsMuxStreamType stream_type,
17
+ gpointer user_data)
18
{
19
TsMuxStream *ret = tsmux_stream_new (new_pid, stream_type);
20
21
22
}
23
24
tsmux_stream_set_get_es_descriptors_func (ret,
25
- (TsMuxStreamGetESDescriptorsFunc) gst_atsc_mux_stream_get_es_descrs,
26
- mpegtsmux);
27
+ gst_atsc_mux_stream_get_es_descrs, user_data);
28
29
return ret;
30
}
31
32
section = gst_mpegts_section_from_atsc_rrt (rrt);
33
tsmux_add_mpegts_si_section (ret, section);
34
35
- tsmux_set_new_stream_func (ret,
36
- (TsMuxNewStreamFunc) gst_atsc_mux_create_new_stream, mpegtsmux);
37
+ tsmux_set_new_stream_func (ret, gst_atsc_mux_create_new_stream, mpegtsmux);
38
39
return ret;
40
}
41
gst-plugins-bad-1.22.6.tar.xz/gst/mpegtsmux/tsmux/tsmux.c -> gst-plugins-bad-1.22.7.tar.xz/gst/mpegtsmux/tsmux/tsmux.c
Changed
428
1
2
static gint64 write_new_pcr (TsMux * mux, TsMuxStream * stream, gint64 cur_pcr,
3
gint64 next_pcr);
4
static gboolean tsmux_write_ts_header (TsMux * mux, guint8 * buf,
5
- TsMuxPacketInfo * pi, guint * payload_len_out, guint * payload_offset_out,
6
- guint stream_avail);
7
+ TsMuxPacketInfo * pi, guint stream_avail, guint * payload_len_out,
8
+ guint * payload_offset_out);
9
10
static void
11
tsmux_section_free (TsMuxSection * section)
12
13
g_slice_free (TsMuxSection, section);
14
}
15
16
+static TsMuxStream *
17
+tsmux_new_stream_default (guint16 pid, guint stream_type, gpointer user_data)
18
+{
19
+ return tsmux_stream_new (pid, stream_type);
20
+}
21
+
22
/**
23
* tsmux_new:
24
*
25
26
mux->si_sections = g_hash_table_new_full (g_direct_hash, g_direct_equal,
27
NULL, (GDestroyNotify) tsmux_section_free);
28
29
- mux->new_stream_func = (TsMuxNewStreamFunc) tsmux_stream_new;
30
+ mux->new_stream_func = tsmux_new_stream_default;
31
mux->new_stream_data = NULL;
32
33
mux->first_pcr_ts = G_MININT64;
34
35
static gboolean
36
tsmux_packet_out (TsMux * mux, GstBuffer * buf, gint64 pcr)
37
{
38
+ g_return_val_if_fail (buf, FALSE);
39
+
40
if (G_UNLIKELY (mux->write_func == NULL)) {
41
- if (buf)
42
- gst_buffer_unref (buf);
43
+ gst_buffer_unref (buf);
44
return TRUE;
45
}
46
47
48
new_pcr = write_new_pcr (mux, stream, cur_pcr, next_pcr);
49
50
if (new_pcr != -1) {
51
- GstBuffer *buf = NULL;
52
+ GstBuffer *pcr_buf = NULL;
53
GstMapInfo map;
54
- guint payload_len, payload_offs;
55
56
- if (!tsmux_get_buffer (mux, &buf)) {
57
+ if (!tsmux_get_buffer (mux, &pcr_buf)) {
58
goto error;
59
}
60
61
- gst_buffer_map (buf, &map, GST_MAP_READ);
62
- tsmux_write_ts_header (mux, map.data, &stream->pi, &payload_len,
63
- &payload_offs, 0);
64
- gst_buffer_unmap (buf, &map);
65
+ gst_buffer_map (pcr_buf, &map, GST_MAP_WRITE);
66
+ tsmux_write_ts_header (mux, map.data, &stream->pi, 0, NULL, NULL);
67
+ gst_buffer_unmap (pcr_buf, &map);
68
69
stream->pi.flags &= TSMUX_PACKET_FLAG_PES_FULL_HEADER;
70
- if (!tsmux_packet_out (mux, buf, new_pcr))
71
+ if (!tsmux_packet_out (mux, pcr_buf, new_pcr))
72
goto error;
73
}
74
}
75
76
return mux->write_func (buf, mux->write_func_data, pcr);
77
78
error:
79
+ gst_buffer_unref (buf);
80
return FALSE;
81
}
82
83
84
85
static gboolean
86
tsmux_write_ts_header (TsMux * mux, guint8 * buf, TsMuxPacketInfo * pi,
87
- guint * payload_len_out, guint * payload_offset_out, guint stream_avail)
88
+ guint stream_avail, guint * payload_len_out, guint * payload_offset_out)
89
{
90
guint8 *tmp;
91
guint8 adaptation_flag = 0;
92
93
94
/* The amount of packet data we wrote is the remaining space after
95
* the adaptation field */
96
- *payload_len_out = payload_len = TSMUX_PAYLOAD_LENGTH - adapt_len;
97
- *payload_offset_out = TSMUX_HEADER_LENGTH + adapt_len;
98
+ payload_len = TSMUX_PAYLOAD_LENGTH - adapt_len;
99
+
100
+ if (payload_len_out)
101
+ *payload_len_out = payload_len;
102
+ else
103
+ g_assert (payload_len == 0);
104
+
105
+ if (payload_offset_out)
106
+ *payload_offset_out = TSMUX_HEADER_LENGTH + adapt_len;
107
108
/* Now if we are going to write out some payload, flag that fact */
109
if (payload_len > 0 && stream_avail > 0) {
110
111
return TRUE;
112
}
113
114
-/* The unused_arg is needed for g_hash_table_foreach() */
115
static gboolean
116
-tsmux_section_write_packet (gpointer unused_arg,
117
- TsMuxSection * section, TsMux * mux)
118
+tsmux_section_write_packet (TsMux * mux, TsMuxSection * section)
119
{
120
- GstBuffer *section_buffer;
121
- GstBuffer *packet_buffer = NULL;
122
- GstMemory *mem;
123
- guint8 *packet;
124
guint8 *data;
125
- gsize data_size = 0;
126
- gsize payload_written;
127
- guint len = 0, offset = 0, payload_len = 0;
128
- guint extra_alloc_bytes = 0;
129
+ gsize data_size;
130
+ guint payload_written = 0;
131
+ gboolean ret = FALSE;
132
133
g_return_val_if_fail (section != NULL, FALSE);
134
g_return_val_if_fail (mux != NULL, FALSE);
135
136
- /* Mark the start of new PES unit */
137
- section->pi.packet_start_unit_indicator = TRUE;
138
-
139
data = gst_mpegts_section_packetize (section->section, &data_size);
140
-
141
if (!data) {
142
- TS_DEBUG ("Could not packetize section");
143
+ GST_WARNING ("Could not packetize section");
144
return FALSE;
145
}
146
147
+ /* Mark the start of new PES unit */
148
+ section->pi.packet_start_unit_indicator = TRUE;
149
+
150
/* Mark payload data size */
151
section->pi.stream_avail = data_size;
152
- payload_written = 0;
153
-
154
- /* Wrap section data in a buffer without free function.
155
- The data will be freed when the GstMpegtsSection is destroyed. */
156
- section_buffer = gst_buffer_new_wrapped_full (GST_MEMORY_FLAG_READONLY,
157
- data, data_size, 0, data_size, NULL, NULL);
158
-
159
- TS_DEBUG ("Section buffer with size %" G_GSIZE_FORMAT " created",
160
- gst_buffer_get_size (section_buffer));
161
162
while (section->pi.stream_avail > 0) {
163
+ GstBuffer *buf;
164
+ GstMapInfo map;
165
+ guint len, offset;
166
167
- packet = g_malloc (TSMUX_PACKET_LENGTH);
168
+ if (!tsmux_get_buffer (mux, &buf))
169
+ goto done;
170
171
- if (section->pi.packet_start_unit_indicator) {
172
- /* Wee need room for a pointer byte */
173
- section->pi.stream_avail++;
174
+ if (!gst_buffer_map (buf, &map, GST_MAP_WRITE)) {
175
+ gst_buffer_unref (buf);
176
+ goto done;
177
+ }
178
179
- if (!tsmux_write_ts_header (mux, packet, §ion->pi, &len, &offset,
180
- section->pi.stream_avail))
181
- goto fail;
182
+ if (section->pi.packet_start_unit_indicator) {
183
+ /* We need room for a pointer byte */
184
+ if (!tsmux_write_ts_header (mux, map.data, §ion->pi,
185
+ section->pi.stream_avail + 1, &len, &offset)) {
186
+ gst_buffer_unmap (buf, &map);
187
+ gst_buffer_unref (buf);
188
+ goto done;
189
+ }
190
191
/* Write the pointer byte */
192
- packetoffset++ = 0x00;
193
- payload_len = len - 1;
194
-
195
- } else {
196
- if (!tsmux_write_ts_header (mux, packet, §ion->pi, &len, &offset,
197
- section->pi.stream_avail))
198
- goto fail;
199
- payload_len = len;
200
+ map.dataoffset++ = 0x00;
201
+ len--;
202
+ } else if (!tsmux_write_ts_header (mux, map.data, §ion->pi,
203
+ section->pi.stream_avail, &len, &offset)) {
204
+ gst_buffer_unmap (buf, &map);
205
+ gst_buffer_unref (buf);
206
+ goto done;
207
}
208
209
- /* Wrap the TS header and adaption field in a GstMemory */
210
- mem = gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY,
211
- packet, TSMUX_PACKET_LENGTH, 0, offset, packet, g_free);
212
-
213
- TS_DEBUG ("Creating packet buffer at offset "
214
- "%" G_GSIZE_FORMAT " with length %u", payload_written, payload_len);
215
-
216
- /* If in M2TS mode, we will need to resize to 4 bytes after the end
217
- of the buffer. For performance reasons, we will now try to include
218
- 4 extra bytes from the source buffer, then resize down, to avoid
219
- having an extra 4 byte GstMemory appended. If the source buffer
220
- does not have enough data for this, a new GstMemory will be used */
221
- if (gst_buffer_get_size (section_buffer) - (payload_written +
222
- payload_len) >= 4) {
223
- /* enough space */
224
- extra_alloc_bytes = 4;
225
- } else {
226
- extra_alloc_bytes = 0;
227
- }
228
- packet_buffer = gst_buffer_copy_region (section_buffer, GST_BUFFER_COPY_ALL,
229
- payload_written, payload_len + extra_alloc_bytes);
230
-
231
- /* Prepend the header to the section data */
232
- gst_buffer_prepend_memory (packet_buffer, mem);
233
-
234
- /* add an extra 4 bytes if it could not be reserved already */
235
- if (extra_alloc_bytes == 4) {
236
- /* we allocated those already, resize */
237
- gst_buffer_set_size (packet_buffer,
238
- gst_buffer_get_size (packet_buffer) - extra_alloc_bytes);
239
- } else {
240
- void *ptr = g_malloc (4);
241
- GstMemory *extra =
242
- gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY, ptr, 4, 0, 0, ptr,
243
- g_free);
244
- gst_buffer_append_memory (packet_buffer, extra);
245
- }
246
+ GST_DEBUG ("Creating section packet for offset %u with length %u; %u bytes"
247
+ " remaining", payload_written, len, section->pi.stream_avail - len);
248
249
- TS_DEBUG ("Writing %d bytes to section. %d bytes remaining",
250
- len, section->pi.stream_avail - len);
251
+ memcpy (map.data + offset, data + payload_written, len);
252
+ gst_buffer_unmap (buf, &map);
253
254
/* Push the packet without PCR */
255
- if (G_UNLIKELY (!tsmux_packet_out (mux, packet_buffer, -1))) {
256
- /* Buffer given away */
257
- packet_buffer = NULL;
258
- goto fail;
259
- }
260
+ if (G_UNLIKELY (!tsmux_packet_out (mux, buf, -1)))
261
+ goto done;
262
263
- packet_buffer = NULL;
264
section->pi.stream_avail -= len;
265
- payload_written += payload_len;
266
+ payload_written += len;
267
section->pi.packet_start_unit_indicator = FALSE;
268
}
269
270
- gst_buffer_unref (section_buffer);
271
+ ret = TRUE;
272
273
- return TRUE;
274
-
275
-fail:
276
- g_free (packet);
277
- if (section_buffer)
278
- gst_buffer_unref (section_buffer);
279
- return FALSE;
280
+done:
281
+ return ret;
282
}
283
284
/**
285
286
tsmux_section.section = section;
287
tsmux_section.pi.pid = section->pid;
288
289
- ret = tsmux_section_write_packet (NULL, &tsmux_section, mux);
290
+ ret = tsmux_section_write_packet (mux, &tsmux_section);
291
gst_mpegts_section_unref (section);
292
293
return ret;
294
}
295
296
+static void
297
+tsmux_write_si_foreach (gpointer key, gpointer value, gpointer user_data)
298
+{
299
+ GstMpegtsSectionType section_type = GPOINTER_TO_INT (key);
300
+ TsMuxSection *section = value;
301
+ TsMux *mux = user_data;
302
+
303
+ if (!tsmux_section_write_packet (mux, section))
304
+ GST_WARNING ("Failed to send SI section (type %d)", section_type);
305
+}
306
+
307
static gboolean
308
tsmux_write_si (TsMux * mux)
309
{
310
- g_hash_table_foreach (mux->si_sections,
311
- (GHFunc) tsmux_section_write_packet, mux);
312
-
313
+ g_hash_table_foreach (mux->si_sections, tsmux_write_si_foreach, mux);
314
mux->si_changed = FALSE;
315
-
316
return TRUE;
317
-
318
}
319
320
static void
321
322
if (diff == 0)
323
goto done;
324
325
+ ret = FALSE;
326
start_n_bytes = mux->n_bytes;
327
do {
328
GST_LOG ("Transport stream bitrate: %" G_GUINT64_FORMAT " over %"
329
330
331
if (bitrate <= mux->bitrate) {
332
gint64 new_pcr;
333
- guint payload_len, payload_offs;
334
335
- if (!tsmux_get_buffer (mux, &buf)) {
336
- ret = FALSE;
337
+ if (!tsmux_get_buffer (mux, &buf))
338
goto done;
339
- }
340
341
- gst_buffer_map (buf, &map, GST_MAP_READ);
342
+ if (!gst_buffer_map (buf, &map, GST_MAP_WRITE)) {
343
+ gst_buffer_unref (buf);
344
+ goto done;
345
+ }
346
347
- if ((new_pcr =
348
- write_new_pcr (mux, stream, get_current_pcr (mux,
349
- cur_ts), get_next_pcr (mux, cur_ts)) != -1)) {
350
+ new_pcr = write_new_pcr (mux, stream, get_current_pcr (mux, cur_ts),
351
+ get_next_pcr (mux, cur_ts));
352
+ if (new_pcr != -1) {
353
GST_LOG ("Writing PCR-only packet on PID 0x%04x", stream->pi.pid);
354
- tsmux_write_ts_header (mux, map.data, &stream->pi, &payload_len,
355
- &payload_offs, 0);
356
+ tsmux_write_ts_header (mux, map.data, &stream->pi, 0, NULL, NULL);
357
} else {
358
GST_LOG ("Writing null stuffing packet");
359
if (!rewrite_si (mux, cur_ts)) {
360
- ret = FALSE;
361
+ gst_buffer_unmap (buf, &map);
362
+ gst_buffer_unref (buf);
363
goto done;
364
}
365
tsmux_write_null_ts_header (map.data);
366
+ memset (map.data + TSMUX_HEADER_LENGTH, 0xFF, TSMUX_PAYLOAD_LENGTH);
367
}
368
369
gst_buffer_unmap (buf, &map);
370
371
stream->pi.flags &= TSMUX_PACKET_FLAG_PES_FULL_HEADER;
372
-
373
- if (!(ret = tsmux_packet_out (mux, buf, new_pcr)))
374
+ if (!tsmux_packet_out (mux, buf, new_pcr))
375
goto done;
376
}
377
} while (bitrate < mux->bitrate);
378
379
GST_LOG ("Finished padding the mux");
380
}
381
382
+ ret = TRUE;
383
+
384
done:
385
return ret;
386
}
387
388
if (!tsmux_get_buffer (mux, &buf))
389
return FALSE;
390
391
- gst_buffer_map (buf, &map, GST_MAP_READ);
392
+ gst_buffer_map (buf, &map, GST_MAP_WRITE);
393
394
- if (!tsmux_write_ts_header (mux, map.data, pi, &payload_len, &payload_offs,
395
- pi->stream_avail))
396
+ if (!tsmux_write_ts_header (mux, map.data, pi, pi->stream_avail, &payload_len,
397
+ &payload_offs))
398
goto fail;
399
400
401
402
mux->pat_changed = FALSE;
403
}
404
405
- return tsmux_section_write_packet (NULL, &mux->pat, mux);
406
+ return tsmux_section_write_packet (mux, &mux->pat);
407
}
408
409
static gboolean
410
411
program->pmt.section->version_number = program->pmt_version++;
412
}
413
414
- return tsmux_section_write_packet (NULL, &program->pmt, mux);
415
+ return tsmux_section_write_packet (mux, &program->pmt);
416
}
417
418
static gboolean
419
420
{
421
/* SCTE-35 NULL section is created when PID is set */
422
GST_LOG ("Writing SCTE NULL packet");
423
- return tsmux_section_write_packet (NULL, program->scte35_null_section, mux);
424
+ return tsmux_section_write_packet (mux, program->scte35_null_section);
425
}
426
427
void
428
gst-plugins-bad-1.22.6.tar.xz/gst/mpegtsmux/tsmux/tsmux.h -> gst-plugins-bad-1.22.7.tar.xz/gst/mpegtsmux/tsmux/tsmux.h
Changed
10
1
2
3
typedef gboolean (*TsMuxWriteFunc) (GstBuffer * buf, void *user_data, gint64 new_pcr);
4
typedef void (*TsMuxAllocFunc) (GstBuffer ** buf, void *user_data);
5
-typedef TsMuxStream * (*TsMuxNewStreamFunc) (guint16 new_pid, guint stream_type, void *user_data);
6
+typedef TsMuxStream * (*TsMuxNewStreamFunc) (guint16 new_pid, guint stream_type, gpointer user_data);
7
8
struct TsMuxSection {
9
TsMuxPacketInfo pi;
10
gst-plugins-bad-1.22.6.tar.xz/gst/mpegtsmux/tsmux/tsmuxstream.c -> gst-plugins-bad-1.22.7.tar.xz/gst/mpegtsmux/tsmux/tsmuxstream.c
Changed
25
1
2
void *user_data;
3
};
4
5
+static void
6
+tsmux_stream_get_es_descrs_default (TsMuxStream * stream,
7
+ GstMpegtsPMTStream * pmt_stream, gpointer user_data)
8
+{
9
+ tsmux_stream_default_get_es_descrs (stream, pmt_stream);
10
+}
11
+
12
/**
13
* tsmux_stream_new:
14
* @pid: a PID
15
16
stream->pcr_ref = 0;
17
stream->next_pcr = -1;
18
19
- stream->get_es_descrs =
20
- (TsMuxStreamGetESDescriptorsFunc) tsmux_stream_default_get_es_descrs;
21
+ stream->get_es_descrs = tsmux_stream_get_es_descrs_default;
22
stream->get_es_descrs_data = NULL;
23
24
return stream;
25
gst-plugins-bad-1.22.6.tar.xz/gst/mpegtsmux/tsmux/tsmuxstream.h -> gst-plugins-bad-1.22.7.tar.xz/gst/mpegtsmux/tsmux/tsmuxstream.h
Changed
18
1
2
#define __TSMUXSTREAM_H__
3
4
#include <glib.h>
5
+#include <gst/mpegts/mpegts.h>
6
7
#include "tsmuxcommon.h"
8
9
10
typedef struct TsMuxStreamBuffer TsMuxStreamBuffer;
11
12
typedef void (*TsMuxStreamBufferReleaseFunc) (guint8 *data, void *user_data);
13
-typedef void (*TsMuxStreamGetESDescriptorsFunc) (TsMuxStream *stream, GstMpegtsPMTStream *pmt_stream, void *user_data);
14
+typedef void (*TsMuxStreamGetESDescriptorsFunc) (TsMuxStream *stream, GstMpegtsPMTStream *pmt_stream, gpointer user_data);
15
16
/* Stream type assignments
17
*
18
gst-plugins-bad-1.22.6.tar.xz/gst/mxf/mxfdemux.c -> gst-plugins-bad-1.22.7.tar.xz/gst/mxf/mxfdemux.c
Changed
280
1
2
}
3
4
static void
5
-gst_mxf_demux_reset_mxf_state (GstMXFDemux * demux)
6
+gst_mxf_demux_essence_track_free (GstMXFDemuxEssenceTrack * t)
7
{
8
- guint i;
9
+ if (t->offsets)
10
+ g_array_free (t->offsets, TRUE);
11
+
12
+ g_free (t->mapping_data);
13
+
14
+ if (t->tags)
15
+ gst_tag_list_unref (t->tags);
16
+
17
+ if (t->caps)
18
+ gst_caps_unref (t->caps);
19
+
20
+ g_free (t);
21
+}
22
23
+static void
24
+gst_mxf_demux_reset_mxf_state (GstMXFDemux * demux)
25
+{
26
GST_DEBUG_OBJECT (demux, "Resetting MXF state");
27
28
g_list_foreach (demux->partitions, (GFunc) gst_mxf_demux_partition_free,
29
30
demux->partitions = NULL;
31
32
demux->current_partition = NULL;
33
-
34
- for (i = 0; i < demux->essence_tracks->len; i++) {
35
- GstMXFDemuxEssenceTrack *t =
36
- &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, i);
37
-
38
- if (t->offsets)
39
- g_array_free (t->offsets, TRUE);
40
-
41
- g_free (t->mapping_data);
42
-
43
- if (t->tags)
44
- gst_tag_list_unref (t->tags);
45
-
46
- if (t->caps)
47
- gst_caps_unref (t->caps);
48
- }
49
- g_array_set_size (demux->essence_tracks, 0);
50
+ g_ptr_array_set_size (demux->essence_tracks, 0);
51
}
52
53
static void
54
55
56
for (i = 0; i < demux->essence_tracks->len; i++) {
57
GstMXFDemuxEssenceTrack *track =
58
- &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, i);
59
+ g_ptr_array_index (demux->essence_tracks, i);
60
61
track->source_package = NULL;
62
track->delta_id = -1;
63
64
65
for (i = 0; i < demux->essence_tracks->len; i++) {
66
GstMXFDemuxEssenceTrack *cand =
67
- &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, i);
68
+ g_ptr_array_index (demux->essence_tracks, i);
69
70
if (cand->body_sid != partition->partition.body_sid)
71
continue;
72
73
74
for (k = 0; k < demux->essence_tracks->len; k++) {
75
GstMXFDemuxEssenceTrack *tmp =
76
- &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack,
77
- k);
78
+ g_ptr_array_index (demux->essence_tracks, k);
79
80
if (tmp->track_number == track->parent.track_number &&
81
tmp->body_sid == edata->body_sid) {
82
83
}
84
85
if (!etrack) {
86
- GstMXFDemuxEssenceTrack tmp;
87
+ GstMXFDemuxEssenceTrack *tmp = g_new0 (GstMXFDemuxEssenceTrack, 1);
88
89
- memset (&tmp, 0, sizeof (tmp));
90
- tmp.body_sid = edata->body_sid;
91
- tmp.index_sid = edata->index_sid;
92
- tmp.track_number = track->parent.track_number;
93
- tmp.track_id = track->parent.track_id;
94
- memcpy (&tmp.source_package_uid, &package->parent.package_uid, 32);
95
+ tmp->body_sid = edata->body_sid;
96
+ tmp->index_sid = edata->index_sid;
97
+ tmp->track_number = track->parent.track_number;
98
+ tmp->track_id = track->parent.track_id;
99
+ memcpy (&tmp->source_package_uid, &package->parent.package_uid, 32);
100
101
if (demux->current_partition->partition.body_sid == edata->body_sid &&
102
demux->current_partition->partition.body_offset == 0)
103
- tmp.position = 0;
104
+ tmp->position = 0;
105
else
106
- tmp.position = -1;
107
+ tmp->position = -1;
108
109
- g_array_append_val (demux->essence_tracks, tmp);
110
+ g_ptr_array_add (demux->essence_tracks, tmp);
111
etrack =
112
- &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack,
113
+ g_ptr_array_index (demux->essence_tracks,
114
demux->essence_tracks->len - 1);
115
new = TRUE;
116
}
117
118
119
next:
120
if (new) {
121
- g_free (etrack->mapping_data);
122
- if (etrack->tags)
123
- gst_tag_list_unref (etrack->tags);
124
- if (etrack->caps)
125
- gst_caps_unref (etrack->caps);
126
-
127
- g_array_remove_index (demux->essence_tracks,
128
+ g_ptr_array_remove_index (demux->essence_tracks,
129
demux->essence_tracks->len - 1);
130
}
131
}
132
133
134
for (i = 0; i < demux->essence_tracks->len; i++) {
135
GstMXFDemuxEssenceTrack *etrack =
136
- &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, i);
137
+ g_ptr_array_index (demux->essence_tracks, i);
138
139
if (!etrack->source_package || !etrack->source_track || !etrack->caps) {
140
GST_ERROR_OBJECT (demux, "Failed to update essence track %u", i);
141
142
143
for (k = 0; k < demux->essence_tracks->len; k++) {
144
GstMXFDemuxEssenceTrack *tmp =
145
- &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, k);
146
+ g_ptr_array_index (demux->essence_tracks, k);
147
148
if (tmp->source_package == source_package &&
149
tmp->source_track == source_track) {
150
151
pad->current_essence_track = NULL;
152
153
for (k = 0; k < demux->essence_tracks->len; k++) {
154
- GstMXFDemuxEssenceTrack *tmp =
155
- &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, k);
156
+ GstMXFDemuxEssenceTrack *tmp = g_ptr_array_index (demux->essence_tracks, k);
157
158
if (tmp->source_package == source_package &&
159
tmp->source_track == source_track) {
160
161
if (!etrack) {
162
for (i = 0; i < demux->essence_tracks->len; i++) {
163
GstMXFDemuxEssenceTrack *tmp =
164
- &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, i);
165
+ g_ptr_array_index (demux->essence_tracks, i);
166
167
if (tmp->body_sid == demux->current_partition->partition.body_sid &&
168
(tmp->track_number == track_number || tmp->track_number == 0)) {
169
170
gst_mxf_demux_set_partition_for_offset (demux, demux->offset);
171
172
for (i = 0; i < demux->essence_tracks->len; i++) {
173
- GstMXFDemuxEssenceTrack *t =
174
- &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, i);
175
+ GstMXFDemuxEssenceTrack *t = g_ptr_array_index (demux->essence_tracks, i);
176
177
if (index_start_position != -1 && t == etrack)
178
t->position = index_start_position;
179
180
/* Handle EOS */
181
for (i = 0; i < demux->essence_tracks->len; i++) {
182
GstMXFDemuxEssenceTrack *t =
183
- &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack,
184
- i);
185
+ g_ptr_array_index (demux->essence_tracks, i);
186
187
if (t->position > 0)
188
t->duration = t->position;
189
190
guint i;
191
for (i = 0; i < demux->essence_tracks->len; i++) {
192
GstMXFDemuxEssenceTrack *etrack =
193
- &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack,
194
- i);
195
+ g_ptr_array_index (demux->essence_tracks, i);
196
197
if (etrack->body_sid != partition->partition.body_sid)
198
continue;
199
200
/* Get the corresponding essence track for the given source package and stream id */
201
for (i = 0; i < demux->essence_tracks->len; i++) {
202
GstMXFDemuxEssenceTrack *track =
203
- &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, i);
204
- GST_LOG_OBJECT (pad,
205
- "Looking at essence track body_sid:%d index_sid:%d",
206
+ g_ptr_array_index (demux->essence_tracks, i);
207
+ GST_LOG_OBJECT (pad, "Looking at essence track body_sid:%d index_sid:%d",
208
track->body_sid, track->index_sid);
209
if (clip->source_track_id == 0 || (track->track_id == clip->source_track_id
210
&& mxf_umid_is_equal (&clip->source_package_id,
211
212
}
213
214
for (i = 0; i < demux->essence_tracks->len; i++) {
215
- GstMXFDemuxEssenceTrack *t =
216
- &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, i);
217
+ GstMXFDemuxEssenceTrack *t = g_ptr_array_index (demux->essence_tracks, i);
218
t->position = -1;
219
}
220
221
222
}
223
224
for (i = 0; i < demux->essence_tracks->len; i++) {
225
- GstMXFDemuxEssenceTrack *t =
226
- &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, i);
227
+ GstMXFDemuxEssenceTrack *t = g_ptr_array_index (demux->essence_tracks, i);
228
t->position = -1;
229
}
230
231
232
233
for (i = 0; i < demux->essence_tracks->len; i++) {
234
GstMXFDemuxEssenceTrack *t =
235
- &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, i);
236
+ g_ptr_array_index (demux->essence_tracks, i);
237
238
if (t->position > 0)
239
t->duration = t->position;
240
241
242
for (i = 0; i < demux->essence_tracks->len; i++) {
243
GstMXFDemuxEssenceTrack *etrack =
244
- &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack,
245
- i);
246
+ g_ptr_array_index (demux->essence_tracks, i);
247
etrack->position = -1;
248
}
249
ret = TRUE;
250
251
252
for (i = 0; i < demux->essence_tracks->len; i++) {
253
GstMXFDemuxEssenceTrack *t =
254
- &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack,
255
- i);
256
+ g_ptr_array_index (demux->essence_tracks, i);
257
t->position = -1;
258
}
259
demux->current_partition = NULL;
260
261
262
g_ptr_array_free (demux->src, TRUE);
263
demux->src = NULL;
264
- g_array_free (demux->essence_tracks, TRUE);
265
+ g_ptr_array_free (demux->essence_tracks, TRUE);
266
demux->essence_tracks = NULL;
267
268
g_hash_table_destroy (demux->metadata);
269
270
g_rw_lock_init (&demux->metadata_lock);
271
272
demux->src = g_ptr_array_new ();
273
- demux->essence_tracks =
274
- g_array_new (FALSE, FALSE, sizeof (GstMXFDemuxEssenceTrack));
275
+ demux->essence_tracks = g_ptr_array_new_with_free_func ((GDestroyNotify)
276
+ gst_mxf_demux_essence_track_free);
277
278
gst_segment_init (&demux->segment, GST_FORMAT_TIME);
279
280
gst-plugins-bad-1.22.6.tar.xz/gst/mxf/mxfdemux.h -> gst-plugins-bad-1.22.7.tar.xz/gst/mxf/mxfdemux.h
Changed
10
1
2
GList *partitions;
3
GstMXFDemuxPartition *current_partition;
4
5
- GArray *essence_tracks;
6
+ GPtrArray *essence_tracks;
7
8
GList *pending_index_table_segments;
9
GList *index_tables; /* one per BodySID / IndexSID */
10
gst-plugins-bad-1.22.6.tar.xz/meson.build -> gst-plugins-bad-1.22.7.tar.xz/meson.build
Changed
8
1
2
project('gst-plugins-bad', 'c', 'cpp',
3
- version : '1.22.6',
4
+ version : '1.22.7',
5
meson_version : '>= 0.62',
6
default_options : 'warning_level=1',
7
'buildtype=debugoptimized' )
8
gst-plugins-bad-1.22.6.tar.xz/po/gst-plugins-bad-1.0.pot -> gst-plugins-bad-1.22.7.tar.xz/po/gst-plugins-bad-1.0.pot
Changed
13
1
2
#, fuzzy
3
msgid ""
4
msgstr ""
5
-"Project-Id-Version: gst-plugins-bad-1.22.6\n"
6
+"Project-Id-Version: gst-plugins-bad-1.22.7\n"
7
"Report-Msgid-Bugs-To: \n"
8
-"POT-Creation-Date: 2023-09-20 18:17+0100\n"
9
+"POT-Creation-Date: 2023-11-13 11:10+0000\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.6.tar.xz/po/gst-plugins-bad.pot -> gst-plugins-bad-1.22.7.tar.xz/po/gst-plugins-bad.pot
Changed
13
1
2
#, fuzzy
3
msgid ""
4
msgstr ""
5
-"Project-Id-Version: gst-plugins-bad-1.22.6\n"
6
+"Project-Id-Version: gst-plugins-bad-1.22.7\n"
7
"Report-Msgid-Bugs-To: \n"
8
-"POT-Creation-Date: 2023-09-20 18:17+0100\n"
9
+"POT-Creation-Date: 2023-11-13 11:10+0000\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.6.tar.xz/sys/d3d11/gstd3d11decoder.cpp -> gst-plugins-bad-1.22.7.tar.xz/sys/d3d11/gstd3d11decoder.cpp
Changed
13
1
2
info = &decoder->output_info;
3
input_state = decoder->input_state;
4
5
+ if (!decoder->configured) {
6
+ GST_WARNING_OBJECT (videodec, "Decoder is not configured");
7
+ return FALSE;
8
+ }
9
+
10
alternate_interlaced =
11
(GST_VIDEO_INFO_INTERLACE_MODE (info) ==
12
GST_VIDEO_INTERLACE_MODE_ALTERNATE);
13
gst-plugins-bad-1.22.6.tar.xz/sys/d3d11/gstd3d11screencapturesrc.cpp -> gst-plugins-bad-1.22.7.tar.xz/sys/d3d11/gstd3d11screencapturesrc.cpp
Changed
12
1
2
blend_desc.RenderTarget0.SrcBlend = D3D11_BLEND_SRC_ALPHA;
3
blend_desc.RenderTarget0.DestBlend = D3D11_BLEND_INV_SRC_ALPHA;
4
blend_desc.RenderTarget0.BlendOp = D3D11_BLEND_OP_ADD;
5
- blend_desc.RenderTarget0.SrcBlendAlpha = D3D11_BLEND_ONE;
6
- blend_desc.RenderTarget0.DestBlendAlpha = D3D11_BLEND_ZERO;
7
+ blend_desc.RenderTarget0.SrcBlendAlpha = D3D11_BLEND_ZERO;
8
+ blend_desc.RenderTarget0.DestBlendAlpha = D3D11_BLEND_ONE;
9
blend_desc.RenderTarget0.BlendOpAlpha = D3D11_BLEND_OP_ADD;
10
blend_desc.RenderTarget0.RenderTargetWriteMask =
11
D3D11_COLOR_WRITE_ENABLE_ALL;
12
gst-plugins-bad-1.22.6.tar.xz/sys/d3d11/gstd3d11window_win32.cpp -> gst-plugins-bad-1.22.7.tar.xz/sys/d3d11/gstd3d11window_win32.cpp
Changed
83
1
2
gint pending_move_window;
3
4
/* fullscreen related */
5
- RECT restore_rect;
6
LONG restore_style;
7
+ WINDOWPLACEMENT restore_placement;
8
9
/* Handle set_render_rectangle */
10
GstVideoRectangle render_rect;
11
12
gst_d3d11_window_win32_init (GstD3D11WindowWin32 * self)
13
{
14
self->main_context = g_main_context_new ();
15
+ self->restore_placement.length = sizeof (WINDOWPLACEMENT);
16
}
17
18
static void
19
20
/* Restore the window's attributes and size */
21
SetWindowLongA (hwnd, GWL_STYLE, self->restore_style);
22
23
- SetWindowPos (hwnd, HWND_NOTOPMOST,
24
- self->restore_rect.left,
25
- self->restore_rect.top,
26
- self->restore_rect.right - self->restore_rect.left,
27
- self->restore_rect.bottom - self->restore_rect.top,
28
- SWP_FRAMECHANGED | SWP_NOACTIVATE);
29
-
30
- ShowWindow (hwnd, SW_NORMAL);
31
+ SetWindowPlacement (hwnd, &self->restore_placement);
32
} else {
33
ComPtr < IDXGIOutput > output;
34
DXGI_OUTPUT_DESC output_desc;
35
IDXGISwapChain *swap_chain = window->swap_chain;
36
37
+ /* remember current placement to restore window later */
38
+ GetWindowPlacement (hwnd, &self->restore_placement);
39
+
40
/* show window before change style */
41
ShowWindow (hwnd, SW_SHOW);
42
43
- /* Save the old window rect so we can restore it when exiting
44
- * fullscreen mode */
45
- GetWindowRect (hwnd, &self->restore_rect);
46
self->restore_style = GetWindowLong (hwnd, GWL_STYLE);
47
48
/* Make the window borderless so that the client area can fill the screen */
49
SetWindowLongA (hwnd, GWL_STYLE,
50
self->restore_style &
51
~(WS_CAPTION | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SYSMENU |
52
- WS_THICKFRAME));
53
+ WS_THICKFRAME | WS_MAXIMIZE));
54
55
swap_chain->GetContainingOutput (&output);
56
output->GetDesc (&output_desc);
57
58
- SetWindowPos (hwnd, HWND_TOPMOST,
59
+ SetWindowPos (hwnd, HWND_TOP,
60
output_desc.DesktopCoordinates.left,
61
output_desc.DesktopCoordinates.top,
62
output_desc.DesktopCoordinates.right,
63
64
PostMessageA (self->internal_hwnd, WM_GST_D3D11_SHOW_WINDOW, 0, 0);
65
}
66
67
+ if (g_atomic_int_get (&self->pending_fullscreen_count) > 0)
68
+ PostMessageA (self->internal_hwnd, WM_GST_D3D11_FULLSCREEN, 0, 0);
69
+
70
self->visible = TRUE;
71
}
72
}
73
74
75
if (self->internal_hwnd) {
76
g_atomic_int_add (&self->pending_fullscreen_count, 1);
77
- PostMessageA (self->internal_hwnd, WM_GST_D3D11_FULLSCREEN, 0, 0);
78
+ if (self->visible)
79
+ PostMessageA (self->internal_hwnd, WM_GST_D3D11_FULLSCREEN, 0, 0);
80
}
81
}
82
83
gst-plugins-bad-1.22.6.tar.xz/sys/decklink/gstdecklink.h -> gst-plugins-bad-1.22.7.tar.xz/sys/decklink/gstdecklink.h
Changed
25
1
2
#define COMSTR_T BSTR
3
#define CONVERT_COM_STRING(s) G_STMT_START { \
4
BSTR _s = (BSTR)s; \
5
- int _s_length = ::SysStringLen(_s); \
6
- int _length = ::WideCharToMultiByte(CP_ACP, 0, (wchar_t*)_s, _s_length, NULL, 0, NULL, NULL); \
7
+ int _length = ::WideCharToMultiByte(CP_ACP, 0, (wchar_t*)_s, -1, NULL, 0, NULL, NULL); \
8
s = (char *) malloc(_length); \
9
- ::WideCharToMultiByte(CP_ACP, 0, (wchar_t*)_s, _s_length, s, _length, NULL, NULL); \
10
+ ::WideCharToMultiByte(CP_ACP, 0, (wchar_t*)_s, -1, s, _length, NULL, NULL); \
11
::SysFreeString(_s); \
12
} G_STMT_END
13
#define FREE_COM_STRING(s) free(s);
14
#define CONVERT_TO_COM_STRING(s) G_STMT_START { \
15
char * _s = (char *)s; \
16
- int _s_length = strlen((char*)_s); \
17
- int _length = ::MultiByteToWideChar(CP_ACP, 0, (char*)_s, _s_length, NULL, 0); \
18
+ int _length = ::MultiByteToWideChar(CP_ACP, 0, (char*)_s, -1, NULL, 0); \
19
s = ::SysAllocStringLen(NULL, _length); \
20
- ::MultiByteToWideChar(CP_ACP, 0, (char*)_s, _s_length, s, _length); \
21
+ ::MultiByteToWideChar(CP_ACP, 0, (char*)_s, -1, s, _length); \
22
g_free(_s); \
23
} G_STMT_END
24
#elif defined(__APPLE__)
25
gst-plugins-bad-1.22.6.tar.xz/sys/kms/gstkmssink.c -> gst-plugins-bad-1.22.7.tar.xz/sys/kms/gstkmssink.c
Changed
10
1
2
static const char *drivers = { "i915", "radeon", "nouveau", "vmwgfx",
3
"exynos", "amdgpu", "imx-drm", "imx-lcdif", "rockchip", "atmel-hlcdc",
4
"msm", "xlnx", "vc4", "meson", "stm", "sun4i-drm", "mxsfb-drm", "tegra",
5
- "xilinx_drm", /* DEPRECATED. Replaced by xlnx */
6
+ "tidss", "xilinx_drm", /* DEPRECATED. Replaced by xlnx */
7
};
8
int i, fd = -1;
9
10
gst-plugins-bad-1.22.6.tar.xz/sys/mediafoundation/gstmfvideoencoder.cpp -> gst-plugins-bad-1.22.7.tar.xz/sys/mediafoundation/gstmfvideoencoder.cpp
Changed
13
1
2
gst_value_set_int_range_step (&res_val, 64, 8192, 2);
3
4
gst_caps_set_value (sink_caps, "width", &res_val);
5
- gst_caps_set_value (sink_caps, "heigh", &res_val);
6
+ gst_caps_set_value (sink_caps, "height", &res_val);
7
gst_caps_set_value (src_caps, "width", &res_val);
8
- gst_caps_set_value (src_caps, "heigh", &res_val);
9
+ gst_caps_set_value (src_caps, "height", &res_val);
10
11
g_value_unset (&res_val);
12
13
gst-plugins-bad-1.22.6.tar.xz/sys/nvcodec/gstnvh264encoder.cpp -> gst-plugins-bad-1.22.7.tar.xz/sys/nvcodec/gstnvh264encoder.cpp
Changed
17
1
2
profiles.insert ((gchar *) walk->data);
3
4
if (cdata->device_mode == GST_NV_ENCODER_DEVICE_D3D11 &&
5
- adapter_luid_size < G_N_ELEMENTS (adapter_luid_list) - 1) {
6
+ adapter_luid_size <= G_N_ELEMENTS (adapter_luid_list) - 1) {
7
adapter_luid_listadapter_luid_size = cdata->adapter_luid;
8
adapter_luid_size++;
9
}
10
11
if (cdata->device_mode == GST_NV_ENCODER_DEVICE_CUDA &&
12
- cuda_device_id_size < G_N_ELEMENTS (cuda_device_id_list) - 1) {
13
+ cuda_device_id_size <= G_N_ELEMENTS (cuda_device_id_list) - 1) {
14
cuda_device_id_listcuda_device_id_size = cdata->cuda_device_id;
15
cuda_device_id_size++;
16
}
17
gst-plugins-bad-1.22.6.tar.xz/sys/nvcodec/gstnvh265encoder.cpp -> gst-plugins-bad-1.22.7.tar.xz/sys/nvcodec/gstnvh265encoder.cpp
Changed
17
1
2
profiles.insert ((gchar *) walk->data);
3
4
if (cdata->device_mode == GST_NV_ENCODER_DEVICE_D3D11 &&
5
- adapter_luid_size < G_N_ELEMENTS (adapter_luid_list) - 1) {
6
+ adapter_luid_size <= G_N_ELEMENTS (adapter_luid_list) - 1) {
7
adapter_luid_listadapter_luid_size = cdata->adapter_luid;
8
adapter_luid_size++;
9
}
10
11
if (cdata->device_mode == GST_NV_ENCODER_DEVICE_CUDA &&
12
- cuda_device_id_size < G_N_ELEMENTS (cuda_device_id_list) - 1) {
13
+ cuda_device_id_size <= G_N_ELEMENTS (cuda_device_id_list) - 1) {
14
cuda_device_id_listcuda_device_id_size = cdata->cuda_device_id;
15
cuda_device_id_size++;
16
}
17
gst-plugins-bad-1.22.6.tar.xz/sys/v4l2codecs/gstv4l2codech265dec.c -> gst-plugins-bad-1.22.7.tar.xz/sys/v4l2codecs/gstv4l2codech265dec.c
Changed
9
1
2
3
g_clear_object (&self->decoder);
4
g_clear_pointer (&self->slice_params, g_array_unref);
5
+ g_clear_pointer (&self->entry_point_offsets, g_array_unref);
6
7
G_OBJECT_CLASS (parent_class)->dispose (object);
8
}
9
gst-plugins-bad-1.22.6.tar.xz/sys/v4l2codecs/gstv4l2decoder.c -> gst-plugins-bad-1.22.7.tar.xz/sys/v4l2codecs/gstv4l2decoder.c
Changed
20
1
2
.type = self->sink_buf_type,
3
.memory = V4L2_MEMORY_MMAP,
4
.index = gst_v4l2_codec_memory_get_index (mem),
5
- .timestamp.tv_usec = frame_num,
6
+ .timestamp.tv_sec = frame_num / 1000000,
7
+ .timestamp.tv_usec = frame_num % 1000000,
8
.request_fd = request->fd,
9
.flags = V4L2_BUF_FLAG_REQUEST_FD | flags,
10
};
11
12
return FALSE;
13
}
14
15
- *out_frame_num = buf.timestamp.tv_usec;
16
+ *out_frame_num = buf.timestamp.tv_usec + buf.timestamp.tv_sec * 1000000;
17
18
GST_TRACE_OBJECT (self, "Dequeued picture buffer %i", buf.index);
19
20
gst-plugins-bad-1.22.6.tar.xz/sys/v4l2codecs/gstv4l2format.c -> gst-plugins-bad-1.22.7.tar.xz/sys/v4l2codecs/gstv4l2format.c
Changed
13
1
2
3
padded_height = GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (finfo, plane,
4
info->height);
5
- padded_height = (padded_height + tile_height - 1) / tile_height;
6
7
x_tiles = stride / GST_VIDEO_FORMAT_INFO_TILE_STRIDE (finfo, plane);
8
- y_tiles = padded_height / tile_height;
9
+ y_tiles = (padded_height + tile_height - 1) / tile_height;
10
info->strideplane = GST_VIDEO_TILE_MAKE_STRIDE (x_tiles, y_tiles);
11
} else {
12
info->strideplane = stride;
13
gst-plugins-bad-1.22.6.tar.xz/sys/wasapi2/gstwasapi2client.cpp -> gst-plugins-bad-1.22.7.tar.xz/sys/wasapi2/gstwasapi2client.cpp
Changed
209
1
2
3
typedef enum
4
{
5
+ GST_WASAPI2_CLIENT_ACTIVATE_NOT_FOUND = -2,
6
GST_WASAPI2_CLIENT_ACTIVATE_FAILED = -1,
7
GST_WASAPI2_CLIENT_ACTIVATE_INIT = 0,
8
GST_WASAPI2_CLIENT_ACTIVATE_WAIT,
9
10
}
11
/* *INDENT-ON* */
12
13
-static gboolean
14
+static void
15
gst_wasapi2_client_activate_async (GstWasapi2Client * self,
16
GstWasapiDeviceActivator * activator)
17
{
18
19
memset (&activation_params, 0, sizeof (GST_AUDIOCLIENT_ACTIVATION_PARAMS));
20
activation_params.ActivationType = GST_AUDIOCLIENT_ACTIVATION_TYPE_DEFAULT;
21
22
+ self->activate_state = GST_WASAPI2_CLIENT_ACTIVATE_NOT_FOUND;
23
+
24
if (self->device_class ==
25
GST_WASAPI2_CLIENT_DEVICE_CLASS_INCLUDE_PROCESS_LOOPBACK_CAPTURE ||
26
self->device_class ==
27
GST_WASAPI2_CLIENT_DEVICE_CLASS_EXCLUDE_PROCESS_LOOPBACK_CAPTURE) {
28
if (self->target_pid == 0) {
29
GST_ERROR_OBJECT (self, "Process loopback mode without PID");
30
- goto failed;
31
+ return;
32
}
33
34
if (!gst_wasapi2_can_process_loopback ()) {
35
GST_ERROR_OBJECT (self, "Process loopback is not supported");
36
- goto failed;
37
+ return;
38
}
39
40
process_loopback = TRUE;
41
42
default_device_id_wstring = gst_wasapi2_client_get_default_device_id (self);
43
if (default_device_id_wstring.empty ()) {
44
GST_WARNING_OBJECT (self, "Couldn't get default device id");
45
- goto failed;
46
+ return;
47
}
48
49
default_device_id = convert_wstring_to_string (default_device_id_wstring);
50
51
52
hr = GetActivationFactory (hstr_device_info.Get (), &device_info_static);
53
if (!gst_wasapi2_result (hr))
54
- goto failed;
55
+ return;
56
57
hr = device_info_static->FindAllAsyncDeviceClass (device_class, &async_op);
58
device_info_static.Reset ();
59
if (!gst_wasapi2_result (hr))
60
- goto failed;
61
+ return;
62
63
/* *INDENT-OFF* */
64
hr = SyncWait<DeviceInformationCollection*>(async_op.Get ());
65
/* *INDENT-ON* */
66
if (!gst_wasapi2_result (hr))
67
- goto failed;
68
+ return;
69
70
hr = async_op->GetResults (&device_list);
71
async_op.Reset ();
72
if (!gst_wasapi2_result (hr))
73
- goto failed;
74
+ return;
75
76
hr = device_list->get_Size (&count);
77
if (!gst_wasapi2_result (hr))
78
- goto failed;
79
+ return;
80
81
if (count == 0) {
82
GST_WARNING_OBJECT (self, "No available device");
83
- goto failed;
84
+ return;
85
}
86
87
/* device_index 0 will be assigned for default device
88
89
if (self->device_index >= 0 && self->device_index > (gint) count) {
90
GST_WARNING_OBJECT (self, "Device index %d is unavailable",
91
self->device_index);
92
- goto failed;
93
+ return;
94
}
95
96
GST_DEBUG_OBJECT (self, "Available device count: %d", count);
97
98
99
if (target_device_id_wstring.empty ()) {
100
GST_WARNING_OBJECT (self, "Couldn't find target device");
101
- goto failed;
102
+ return;
103
}
104
105
activate:
106
107
/* default device supports automatic stream routing */
108
self->can_auto_routing = use_default_device;
109
110
+ self->activate_state = GST_WASAPI2_CLIENT_ACTIVATE_INIT;
111
+
112
if (process_loopback) {
113
hr = activator->ActivateDeviceAsync (target_device_id_wstring,
114
&activation_params);
115
116
117
if (!gst_wasapi2_result (hr)) {
118
GST_WARNING_OBJECT (self, "Failed to activate device");
119
- goto failed;
120
+ self->activate_state = GST_WASAPI2_CLIENT_ACTIVATE_FAILED;
121
+ return;
122
}
123
124
g_mutex_lock (&self->lock);
125
if (self->activate_state == GST_WASAPI2_CLIENT_ACTIVATE_INIT)
126
self->activate_state = GST_WASAPI2_CLIENT_ACTIVATE_WAIT;
127
g_mutex_unlock (&self->lock);
128
-
129
- return TRUE;
130
-
131
-failed:
132
- self->activate_state = GST_WASAPI2_CLIENT_ACTIVATE_FAILED;
133
-
134
- return FALSE;
135
}
136
137
static const gchar *
138
activate_state_to_string (GstWasapi2ClientActivateState state)
139
{
140
switch (state) {
141
+ case GST_WASAPI2_CLIENT_ACTIVATE_NOT_FOUND:
142
+ return "NOT-FOUND";
143
case GST_WASAPI2_CLIENT_ACTIVATE_FAILED:
144
return "FAILED";
145
case GST_WASAPI2_CLIENT_ACTIVATE_INIT:
146
147
148
if (!gst_wasapi2_result (hr)) {
149
GST_ERROR_OBJECT (self, "Could not create activator object");
150
- self->activate_state = GST_WASAPI2_CLIENT_ACTIVATE_FAILED;
151
+ self->activate_state = GST_WASAPI2_CLIENT_ACTIVATE_NOT_FOUND;
152
goto run_loop;
153
}
154
155
156
* RoInitializeWrapper dtor is called */
157
core_dispatcher.Reset ();
158
159
- if (self->activate_state == GST_WASAPI2_CLIENT_ACTIVATE_FAILED) {
160
+ if (self->activate_state == GST_WASAPI2_CLIENT_ACTIVATE_FAILED ||
161
+ self->activate_state == GST_WASAPI2_CLIENT_ACTIVATE_NOT_FOUND) {
162
gst_object_unref (self);
163
return nullptr;
164
}
165
166
return self;
167
}
168
169
+GstWasapi2Result
170
+gst_wasapi2_client_enumerate (GstWasapi2ClientDeviceClass device_class,
171
+ gint device_index, GstWasapi2Client ** client)
172
+{
173
+ GstWasapi2Client *self;
174
+ /* *INDENT-OFF* */
175
+ ComPtr<ICoreDispatcher> core_dispatcher;
176
+ /* *INDENT-ON* */
177
+ /* Multiple COM init is allowed */
178
+ RoInitializeWrapper init_wrapper (RO_INIT_MULTITHREADED);
179
+
180
+ *client = nullptr;
181
+
182
+ find_dispatcher (&core_dispatcher);
183
+
184
+ self = (GstWasapi2Client *) g_object_new (GST_TYPE_WASAPI2_CLIENT,
185
+ "device-class", device_class, "device-index", device_index,
186
+ "dispatcher", core_dispatcher.Get (), nullptr);
187
+
188
+ /* Reset explicitly to ensure that it happens before
189
+ * RoInitializeWrapper dtor is called */
190
+ core_dispatcher.Reset ();
191
+
192
+ if (self->activate_state == GST_WASAPI2_CLIENT_ACTIVATE_NOT_FOUND) {
193
+ gst_object_unref (self);
194
+ return GST_WASAPI2_DEVICE_NOT_FOUND;
195
+ } else if (self->activate_state == GST_WASAPI2_CLIENT_ACTIVATE_FAILED) {
196
+ gst_object_unref (self);
197
+ return GST_WASAPI2_ACTIVATION_FAILED;
198
+ }
199
+
200
+ gst_object_ref_sink (self);
201
+
202
+ *client = self;
203
+ return GST_WASAPI2_OK;
204
+}
205
+
206
IAudioClient *
207
gst_wasapi2_client_get_handle (GstWasapi2Client * client)
208
{
209
gst-plugins-bad-1.22.6.tar.xz/sys/wasapi2/gstwasapi2client.h -> gst-plugins-bad-1.22.7.tar.xz/sys/wasapi2/gstwasapi2client.h
Changed
26
1
2
GST_WASAPI2_CLIENT_DEVICE_CLASS_EXCLUDE_PROCESS_LOOPBACK_CAPTURE,
3
} GstWasapi2ClientDeviceClass;
4
5
+typedef enum
6
+{
7
+ GST_WASAPI2_OK,
8
+ GST_WASAPI2_DEVICE_NOT_FOUND,
9
+ GST_WASAPI2_ACTIVATION_FAILED,
10
+} GstWasapi2Result;
11
+
12
static inline gboolean
13
gst_wasapi2_device_class_is_loopback (GstWasapi2ClientDeviceClass device_class)
14
{
15
16
17
GstCaps * gst_wasapi2_client_get_caps (GstWasapi2Client * client);
18
19
+GstWasapi2Result gst_wasapi2_client_enumerate (GstWasapi2ClientDeviceClass device_class,
20
+ gint device_index,
21
+ GstWasapi2Client ** client);
22
+
23
G_END_DECLS
24
25
#endif /* __GST_WASAPI2_CLIENT_H__ */
26
gst-plugins-bad-1.22.6.tar.xz/sys/wasapi2/gstwasapi2device.c -> gst-plugins-bad-1.22.7.tar.xz/sys/wasapi2/gstwasapi2device.c
Changed
20
1
2
GstCaps *caps = NULL;
3
gchar *device_id = NULL;
4
gchar *device_name = NULL;
5
+ GstWasapi2Result result;
6
7
- client = gst_wasapi2_client_new (client_class, i, NULL, 0, NULL);
8
-
9
- if (!client)
10
+ result = gst_wasapi2_client_enumerate (client_class, i, &client);
11
+ if (result == GST_WASAPI2_DEVICE_NOT_FOUND)
12
return;
13
+ else if (result == GST_WASAPI2_ACTIVATION_FAILED)
14
+ continue;
15
+
16
+ g_assert (client);
17
18
caps = gst_wasapi2_client_get_caps (client);
19
if (!caps) {
20
gst-plugins-bad-1.22.6.tar.xz/sys/wasapi2/gstwasapi2ringbuffer.cpp -> gst-plugins-bad-1.22.7.tar.xz/sys/wasapi2/gstwasapi2ringbuffer.cpp
Changed
175
1
2
#include <string.h>
3
#include <mfapi.h>
4
#include <wrl.h>
5
+#include <vector>
6
7
GST_DEBUG_CATEGORY_STATIC (gst_wasapi2_ring_buffer_debug);
8
#define GST_CAT_DEFAULT gst_wasapi2_ring_buffer_debug
9
10
GstWasapi2Client *loopback_client;
11
IAudioCaptureClient *capture_client;
12
IAudioRenderClient *render_client;
13
- ISimpleAudioVolume *volume_object;
14
+ IAudioStreamVolume *volume_object;
15
16
GstWasapiAsyncCallback *callback_object;
17
IMFAsyncResult *callback_result;
18
19
GST_WASAPI2_CLEAR_COM (self->render_client);
20
21
g_mutex_lock (&self->volume_lock);
22
- if (self->volume_object)
23
- self->volume_object->SetMute (FALSE, nullptr);
24
GST_WASAPI2_CLEAR_COM (self->volume_object);
25
g_mutex_unlock (&self->volume_lock);
26
27
28
return TRUE;
29
}
30
31
+static HRESULT
32
+gst_wasapi2_ring_buffer_set_channel_volumes (IAudioStreamVolume * iface,
33
+ float volume)
34
+{
35
+ float target;
36
+ HRESULT hr = S_OK;
37
+
38
+ if (!iface)
39
+ return hr;
40
+
41
+ target = CLAMP (volume, 0.0f, 1.0f);
42
+ UINT32 channel_count = 0;
43
+ hr = iface->GetChannelCount (&channel_count);
44
+ if (!gst_wasapi2_result (hr) || channel_count == 0)
45
+ return hr;
46
+
47
+ std::vector < float >volumes;
48
+ for (guint i = 0; i < channel_count; i++)
49
+ volumes.push_back (target);
50
+
51
+ return iface->SetAllVolumes (channel_count, &volumes0);
52
+}
53
+
54
static gboolean
55
gst_wasapi2_ring_buffer_acquire (GstAudioRingBuffer * buf,
56
GstAudioRingBufferSpec * spec)
57
58
IAudioClient *client_handle;
59
HRESULT hr;
60
WAVEFORMATEX *mix_format = nullptr;
61
- ComPtr < ISimpleAudioVolume > audio_volume;
62
+ ComPtr < IAudioStreamVolume > audio_volume;
63
GstAudioChannelPosition *position = nullptr;
64
guint period = 0;
65
66
67
} else {
68
g_mutex_lock (&self->volume_lock);
69
self->volume_object = audio_volume.Detach ();
70
+ float volume = (float) self->volume;
71
+ if (self->mute)
72
+ volume = 0.0f;
73
74
- if (self->mute_changed) {
75
- self->volume_object->SetMute (self->mute, nullptr);
76
- self->mute_changed = FALSE;
77
- } else {
78
- self->volume_object->SetMute (FALSE, nullptr);
79
- }
80
+ gst_wasapi2_ring_buffer_set_channel_volumes (self->volume_object, volume);
81
82
- if (self->volume_changed) {
83
- self->volume_object->SetMasterVolume (self->volume, nullptr);
84
- self->volume_changed = FALSE;
85
- }
86
+ self->mute_changed = FALSE;
87
+ self->volume_changed = FALSE;
88
g_mutex_unlock (&self->volume_lock);
89
}
90
91
92
93
g_mutex_lock (&buf->volume_lock);
94
buf->mute = mute;
95
- if (buf->volume_object)
96
- hr = buf->volume_object->SetMute (mute, nullptr);
97
- else
98
+ if (buf->volume_object) {
99
+ float volume = buf->volume;
100
+ if (mute)
101
+ volume = 0.0f;
102
+ hr = gst_wasapi2_ring_buffer_set_channel_volumes (buf->volume_object,
103
+ volume);
104
+ } else {
105
buf->mute_changed = TRUE;
106
+ }
107
g_mutex_unlock (&buf->volume_lock);
108
109
- return S_OK;
110
+ return hr;
111
}
112
113
HRESULT
114
gst_wasapi2_ring_buffer_get_mute (GstWasapi2RingBuffer * buf, gboolean * mute)
115
{
116
- BOOL mute_val;
117
- HRESULT hr = S_OK;
118
-
119
g_return_val_if_fail (GST_IS_WASAPI2_RING_BUFFER (buf), E_INVALIDARG);
120
g_return_val_if_fail (mute != nullptr, E_INVALIDARG);
121
122
- mute_val = buf->mute;
123
-
124
g_mutex_lock (&buf->volume_lock);
125
- if (buf->volume_object)
126
- hr = buf->volume_object->GetMute (&mute_val);
127
+ *mute = buf->mute;
128
g_mutex_unlock (&buf->volume_lock);
129
130
- *mute = mute_val ? TRUE : FALSE;
131
-
132
- return hr;
133
+ return S_OK;
134
}
135
136
HRESULT
137
138
139
g_mutex_lock (&buf->volume_lock);
140
buf->volume = volume;
141
- if (buf->volume_object)
142
- hr = buf->volume_object->SetMasterVolume (volume, nullptr);
143
- else
144
+ if (buf->volume_object) {
145
+ hr = gst_wasapi2_ring_buffer_set_channel_volumes (buf->volume_object,
146
+ volume);
147
+ } else {
148
buf->volume_changed = TRUE;
149
+ }
150
g_mutex_unlock (&buf->volume_lock);
151
152
return hr;
153
154
HRESULT
155
gst_wasapi2_ring_buffer_get_volume (GstWasapi2RingBuffer * buf, gfloat * volume)
156
{
157
- gfloat volume_val;
158
- HRESULT hr = S_OK;
159
-
160
g_return_val_if_fail (GST_IS_WASAPI2_RING_BUFFER (buf), E_INVALIDARG);
161
g_return_val_if_fail (volume != nullptr, E_INVALIDARG);
162
163
g_mutex_lock (&buf->volume_lock);
164
- volume_val = buf->volume;
165
- if (buf->volume_object)
166
- hr = buf->volume_object->GetMasterVolume (&volume_val);
167
+ *volume = buf->volume;
168
g_mutex_unlock (&buf->volume_lock);
169
170
- *volume = volume_val;
171
-
172
- return hr;
173
+ return S_OK;
174
}
175
Refresh
No build results available
Refresh
No rpmlint results available
Login required, please
login
or
signup
in order to comment