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
+Fri Dec 23 20:13:27 UTC 2022 - Bjørn Lie <zaitor@opensuse.org>
4
+
5
+- Update to version 1.20.5
6
+
7
+-------------------------------------------------------------------
8
Wed Oct 26 13:32:09 UTC 2022 - Bjørn Lie <zaitor@opensuse.org>
9
10
- Update to version 1.20.4
11
gstreamer-plugins-bad-codecs.spec
Changed
10
1
2
%define _version 1.20.0
3
4
Name: gstreamer-plugins-bad-codecs
5
-Version: 1.20.4
6
+Version: 1.20.5
7
Release: 0
8
Summary: Codecs/plugins for gstreamer-plugins-bad
9
License: LGPL-2.1-or-later
10
gst-plugins-bad-1.20.4.tar.xz/ChangeLog -> gst-plugins-bad-1.20.5.tar.xz/ChangeLog
Changed
452
1
2
+=== release 1.20.5 ===
3
+
4
+2022-12-19 23:34:42 +0000 Tim-Philipp Müller <tim@centricular.com>
5
+
6
+ * NEWS:
7
+ * RELEASE:
8
+ * gst-plugins-bad.doap:
9
+ * meson.build:
10
+ Release 1.20.5
11
+
12
+2022-12-19 23:34:34 +0000 Tim-Philipp Müller <tim@centricular.com>
13
+
14
+ * ChangeLog:
15
+ Update ChangeLogs for 1.20.5
16
+
17
+2022-12-16 15:03:12 +0100 Edward Hervey <edward@centricular.com>
18
+
19
+ * gst/mpegtsdemux/mpegtsbase.c:
20
+ mpegts: Always clear packetizer on DISCONT push mode
21
+ If a discontinuity is detected in push mode, we need to clear the cached section
22
+ observations since they might have potentially changed.
23
+ This was only done properly when operating with TIME segments (dvb, udp,
24
+ adaptive demuxers, ...) but not with BYTE segments (such as with custom app/fd
25
+ sources).
26
+ We still don't want to flush out the PCR observations, since this might be
27
+ needed for seeking in push-based BYTE sources.
28
+ Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1650
29
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3600>
30
+
31
+2022-12-17 20:04:01 +0900 Seungha Yang <seungha@centricular.com>
32
+
33
+ * sys/d3d11/gstd3d11window_win32.cpp:
34
+ d3d11videosink: Fixing focus lost on desktop layout change
35
+ Watch all message on the window thread, instead of internal window only.
36
+ Otherwise, some global window messages, such as desktop layout change,
37
+ wouldn't be handled by our window.
38
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3594>
39
+
40
+2022-12-17 01:01:00 +0530 Nirbheek Chauhan <nirbheek@centricular.com>
41
+
42
+ * sys/applemedia/avfvideosrc.m:
43
+ avfvideosrc: Report latency when doing screen capture
44
+ There is no `device` when doing screen capture, but there is always an
45
+ `input`, so use that to decide when we can reply to a latency query.
46
+ Without this, the latency query just fails.
47
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3591>
48
+
49
+2022-12-16 21:42:50 +0900 Seungha Yang <seungha@centricular.com>
50
+
51
+ * sys/d3d11/gstd3d11window_win32.cpp:
52
+ d3d11videosink: Call ShowWindow() from window thread
53
+ ... when rendering on external HWND. ShowWindow() will cause
54
+ synchronous message passing to window thread and then can be blocked.
55
+ At the same time, window thread can wait for GStreamer thread.
56
+ Instead of the synchronous call, queue the task to window message
57
+ and performs from the window thread.
58
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3588>
59
+
60
+2022-12-15 01:15:10 +0900 Seungha Yang <seungha@centricular.com>
61
+
62
+ * sys/d3d11/gstd3d11videosink.cpp:
63
+ * sys/d3d11/gstd3d11window.cpp:
64
+ * sys/d3d11/gstd3d11window.h:
65
+ * sys/d3d11/gstd3d11window_dummy.cpp:
66
+ * sys/d3d11/gstd3d11window_win32.cpp:
67
+ d3d11videosink: Fix deadlock when parent window is busy
68
+ Deadlock sequence:
69
+ * From a streaming thread, d3d11videosink sends synchronous message
70
+ to the parent window, so that internal (child) window can be
71
+ constructed on the parent window's thread
72
+ * App thread (parent window thread) is waiting for pipeline's
73
+ state change (to GST_STATE_NULL) but streaming thread is
74
+ blocked and waiting for app thread
75
+ To avoid the deadlock, GstD3D11WindowWin32 should send message
76
+ to the parent window asynchronously.
77
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3573>
78
+
79
+2022-12-15 20:11:30 +0900 Seungha Yang <seungha@centricular.com>
80
+
81
+ * sys/d3d11/gstd3d11window.cpp:
82
+ d3d11videosink: Error out if RTV is unavailable
83
+ Add RTV pointer validation
84
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3573>
85
+
86
+2022-07-03 01:18:19 +0900 Seungha Yang <seungha@centricular.com>
87
+
88
+ * sys/d3d11/gstd3d11videosink.cpp:
89
+ * sys/d3d11/gstd3d11videosink.h:
90
+ d3d11videosink: Protect window with lock at every place
91
+ Access to the object should be thread safe to support runtime
92
+ property update
93
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3573>
94
+
95
+2022-10-21 22:46:16 -0500 A. Wilcox <AWilcox@Wilcox-Tech.com>
96
+
97
+ * gst-libs/gst/mpegts/gstmpegtsdescriptor.c:
98
+ * tests/check/libs/mpegts.c:
99
+ mpegts: Handle when iconv doesn't support ISO 6937
100
+ Systems like musl libc don't support ISO 6937 in iconv. This ensures
101
+ that the MPEG-TS plugin can cope with that. There is existing support
102
+ in the plugin for other methods, so it seems to have been the original
103
+ intent anyway.
104
+ Fixes: #1314
105
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3563>
106
+
107
+2022-12-06 11:30:47 +0100 Edward Hervey <edward@centricular.com>
108
+
109
+ * gst/mpegtsdemux/mpegtspacketizer.c:
110
+ mpegts: Check continuity counter on section streams
111
+ This wasn't really done, and is needed in order to detect potential section
112
+ changes for sections that have got identical information (such as when switching
113
+ between streams that have the same PAT/PMT pid and subtable information).
114
+ Other checks exist in tsbase to detect if the "new" PAT/PMT really is an update or not.
115
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3556>
116
+
117
+2022-12-01 19:35:07 +0200 Marek Olejnik <molejnik@fluendo.com>
118
+
119
+ * gst-libs/gst/codecs/gsth265decoder.c:
120
+ h265decoder: Do not abort when failed to prepare ref pic set
121
+ Currently the element calls abort when failed to prepare reference
122
+ picture set. This can happent when the input stream is somehow
123
+ corrupted, like a rtsp strem with lost packets. Now it will only
124
+ return with GST_FLOW_ERROR instead of terminating whole process.
125
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3542>
126
+
127
+2022-12-07 10:21:52 +0200 Sebastian Dröge <sebastian@centricular.com>
128
+
129
+ * gst/dvbsubenc/gstdvbsubenc.c:
130
+ dvbsubenc: Forward GAP events as-is if we wouldn't produce an end packet and are not in the middle of an existing subtitle
131
+ An end packet is only produced once for the last subtitle, so multiple
132
+ GAP events between subtitles would result only in a single end packet
133
+ and nothing else otherwise. This would potentially starve downstream
134
+ then, so instead forward the GAP events in that case.
135
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3536>
136
+
137
+2022-12-05 19:30:43 +0530 Nirbheek Chauhan <nirbheek@centricular.com>
138
+
139
+ * sys/dshowvideosink/dshowvideosink.cpp:
140
+ directshow: Fix build error with glib 2.75 and newer
141
+ Starting with glib 2.75, `NULL` is `nullptr`, which cannot be
142
+ implicitly coerced to `0`, unlike `NULL`. So explicitly pass `0`.
143
+ ```
144
+ 3206/4524 Compiling C++ object subprojects/gst-plugins-bad/sys/directshow/gstdirectshow.dll.p/dshowvideosink.cpp.obj
145
+ FAILED: subprojects/gst-plugins-bad/sys/directshow/gstdirectshow.dll.p/dshowvideosink.cpp.obj
146
+ "cl" "-Isubprojects\gst-plugins-bad\sys\directshow\gstdirectshow.dll.p" "-Isubprojects\gst-plugins-bad\sys\directshow" "-I..\subprojects\gst-plugins-bad\sys\directshow" "-Isubprojects\gst-plugins-bad" "-I..\subprojects\gst-plugins-bad" "-Isubprojects\gst-plugins-base\gst-libs" "-I..\subprojects\gst-plugins-base\gst-libs" "-Isubprojects\gstreamer\libs" "-I..\subprojects\gstreamer\libs" "-Isubprojects\gstreamer" "-I..\subprojects\gstreamer" "-Isubprojects\orc" "-I..\subprojects\orc" "-I..\subprojects\gst-plugins-bad\sys\directshow\strmbase\baseclasses" "-Isubprojects\gst-plugins-base\gst-libs\gst\video" "-Isubprojects\gstreamer\gst" "-Isubprojects\gst-plugins-base\gst-libs\gst\audio" "-Isubprojects\gst-plugins-base\gst-libs\gst\tag" "-IC:/gst-install/include/glib-2.0" "-IC:/gst-install/lib/glib-2.0/include" "-IC:/gst-install/include" "/MD" "/nologo" "/showIncludes" "/utf-8" "/W2" "/EHsc" "/O2" "/Zi" "/wd4018" "/wd4146" "/wd4244" "/wd4305" "/utf-8" "/we4002" "/we4003" "/we4013" "/we4020" "/we4027" "/we4029" "/we4033" "/we4045" "/we4047" "/we4053" "/we4062" "/we4098" "/we4101" "/we4189" "/utf-8" "-D_MBCS" "/wd4189" "/wd4456" "/wd4701" "/wd4703" "/wd4706" "/wd4996" "-DHAVE_CONFIG_H" "/Fdsubprojects\gst-plugins-bad\sys\directshow\gstdirectshow.dll.p\dshowvideosink.cpp.pdb" /Fosubprojects/gst-plugins-bad/sys/directshow/gstdirectshow.dll.p/dshowvideosink.cpp.obj "/c" ../subprojects/gst-plugins-bad/sys/directshow/dshowvideosink.cpp
147
+ ../subprojects/gst-plugins-bad/sys/directshow/dshowvideosink.cpp(62): warning C5051: attribute 'noinline' requires at least '/std:c++20'; ignored
148
+ ../subprojects/gst-plugins-bad/sys/directshow/dshowvideosink.cpp(123): error C2664: 'LRESULT SendMessageA(HWND,UINT,WPARAM,LPARAM)': cannot convert argument 3 from 'nullptr' to 'WPARAM'
149
+ ../subprojects/gst-plugins-bad/sys/directshow/dshowvideosink.cpp(123): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type
150
+ C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winuser.h(3690): note: see declaration of 'SendMessageA'
151
+ ../subprojects/gst-plugins-bad/sys/directshow/dshowvideosink.cpp(635): error C2664: 'BOOL SystemParametersInfoA(UINT,UINT,PVOID,UINT)': cannot convert argument 2 from 'nullptr' to 'UINT'
152
+ ../subprojects/gst-plugins-bad/sys/directshow/dshowvideosink.cpp(635): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type
153
+ C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winuser.h(13153): note: see declaration of 'SystemParametersInfoA'
154
+ ../subprojects/gst-plugins-bad/sys/directshow/dshowvideosink.cpp(1593): error C2664: 'LRESULT SendMessageA(HWND,UINT,WPARAM,LPARAM)': cannot convert argument 3 from 'nullptr' to 'WPARAM'
155
+ ../subprojects/gst-plugins-bad/sys/directshow/dshowvideosink.cpp(1593): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type
156
+ C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winuser.h(3690): note: see declaration of 'SendMessageA'
157
+ ```
158
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3533>
159
+
160
+2022-11-29 02:22:50 +0900 Seungha Yang <seungha@centricular.com>
161
+
162
+ * sys/mediafoundation/gstmfvideosrc.c:
163
+ mfvideosrc: Fix buffer leak
164
+ The allocated buffer should be released
165
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3496>
166
+
167
+2022-11-29 02:10:42 +0900 Seungha Yang <seungha@centricular.com>
168
+
169
+ * sys/mediafoundation/gstmfsourcereader.cpp:
170
+ * sys/mediafoundation/gstwin32devicewatcher.cpp:
171
+ mediafoundation: Chain up from GObject::constructed
172
+ ... so that GstTracer can trace it
173
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3496>
174
+
175
+2022-11-29 02:06:11 +0900 Seungha Yang <seungha@centricular.com>
176
+
177
+ * sys/d3d11/gstd3d11videosink.cpp:
178
+ * sys/d3d11/gstd3d11window_corewindow.cpp:
179
+ * sys/d3d11/gstd3d11window_dummy.cpp:
180
+ * sys/d3d11/gstd3d11window_swapchainpanel.cpp:
181
+ * sys/d3d11/gstd3d11window_win32.cpp:
182
+ d3d11: Use correct ref/unref methods
183
+ Those objects are GstObject subclasses
184
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3496>
185
+
186
+2022-11-25 18:38:27 +0800 He Junyan <junyan.he@intel.com>
187
+
188
+ * gst-libs/gst/codecparsers/gsth264parser.c:
189
+ h264parser: Fix a typo in pred_weight_table parsing.
190
+ When setting default values, the reference list number of l1 is wrong.
191
+ Fix: https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/336
192
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3468>
193
+
194
+2022-11-21 19:40:35 +0200 Sebastian Dröge <sebastian@centricular.com>
195
+
196
+ * gst/dvbsubenc/gstdvbsubenc-util.c:
197
+ * gst/dvbsubenc/gstdvbsubenc.c:
198
+ * gst/dvbsubenc/gstdvbsubenc.h:
199
+ dvbsubenc: Write Display Definition Segment if a non-default width/height is used
200
+ Otherwise it can't be rendered by dvbsuboverlay or ffmpeg at least.
201
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3459>
202
+
203
+2022-11-16 09:42:08 +0100 Edward Hervey <bilboed@bilboed.com>
204
+
205
+ * gst/mpegtsdemux/mpegtspacketizer.c:
206
+ Revert "mpegtspacketizer: memcmp potentially seen_before data"
207
+ This reverts commit fcad4cc646a23e4e621ec5e8485958ab78d98090.
208
+ This was wrong is so many ways.
209
+ * The memcmp was badly used (it should use == 0 to check the data is identical,
210
+ and not != 0)
211
+ * There was no boundary checks on the present stream section_data when passing
212
+ it to memcmp.
213
+ * The return value should have been TRUE (i.e. we have done all checks, none of
214
+ them failed, therefore the section has been seen before)
215
+ * stream->section_data would *always* be NULL if the section had already been
216
+ processed
217
+ Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1559
218
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3427>
219
+
220
+2022-11-16 09:29:59 +0100 Edward Hervey <edward@centricular.com>
221
+
222
+ * gst/mpegtsdemux/mpegtsbase.c:
223
+ mpegts: Check is program is identical before updating
224
+ There is no need to update the program if it's identical :)
225
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3427>
226
+
227
+2022-11-08 19:26:39 +0900 Seungha Yang <seungha@centricular.com>
228
+
229
+ * sys/d3d11/gstd3d11screencapturedevice.cpp:
230
+ * sys/d3d11/gstd3d11screencapturesrc.cpp:
231
+ d3d11screencapturesrc: Specify PAR 1/1 to template caps
232
+ ... otherwise PAR can be wrongly signalled during the negotiation
233
+ Fixing below pipeline when desktop resolution is not 640x480
234
+ gst-launch-1.0.exe \
235
+ d3d11screencapturesrc ! videoscale !
236
+ video/x-raw,width=640,height=480,pixel-aspect-ratio=1/1 ! d3d11videosink
237
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3372>
238
+
239
+2022-11-15 00:11:15 +1100 Jan Schmidt <jan@centricular.com>
240
+
241
+ * ext/aes/gstaesdec.c:
242
+ aesdec: Fix padding removal for per-buffer-padding=FALSE
243
+ When per-buffer-padding is FALSE, the OpenSSL context needs
244
+ to be told to remove any padding at the end of the ciphertext
245
+ Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1243
246
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3411>
247
+
248
+2021-12-01 16:23:41 +0100 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
249
+
250
+ * gst/rtmp2/gstrtmp2sink.c:
251
+ * gst/rtmp2/gstrtmp2src.c:
252
+ * gst/rtmp2/rtmp/rtmpclient.c:
253
+ rtmp2: Improve error messages
254
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368>
255
+
256
+2021-12-01 16:04:24 +0100 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
257
+
258
+ * gst/rtmp2/gstrtmp2sink.c:
259
+ * gst/rtmp2/gstrtmp2src.c:
260
+ * gst/rtmp2/rtmp/rtmpclient.c:
261
+ * gst/rtmp2/rtmp/rtmpconnection.c:
262
+ rtmp2/connection: Pass triggering GError in 'error' signal
263
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368>
264
+
265
+2021-12-01 16:02:53 +0100 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
266
+
267
+ * gst/rtmp2/rtmp/rtmpconnection.c:
268
+ rtmp2/connection: Pass triggering GError to _emit_error
269
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368>
270
+
271
+2021-12-01 16:01:10 +0100 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
272
+
273
+ * gst/rtmp2/rtmp/rtmpconnection.c:
274
+ rtmp2/connection: Discern reasons for cancelling all commands
275
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368>
276
+
277
+2021-12-01 15:53:13 +0100 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
278
+
279
+ * gst/rtmp2/rtmp/rtmpconnection.c:
280
+ rtmp2/connection: Handle EOF like error
281
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368>
282
+
283
+2021-12-01 15:49:22 +0100 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
284
+
285
+ * gst/rtmp2/rtmp/rtmpclient.c:
286
+ rtmp2/client: Make sure 'salt' is not NULL
287
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368>
288
+
289
+2021-12-01 15:46:42 +0100 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
290
+
291
+ * gst/rtmp2/rtmp/rtmpclient.c:
292
+ rtmp2/client: Make sure 'reason' is not NULL
293
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368>
294
+
295
+2021-12-01 16:13:42 +0100 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
296
+
297
+ * gst/rtmp2/rtmp/rtmpclient.c:
298
+ rtmp2/client: Make sure 'desc' is not NULL
299
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368>
300
+
301
+2021-12-01 16:11:31 +0100 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
302
+
303
+ * gst/rtmp2/rtmp/rtmpclient.c:
304
+ rtmp2/client: Make sure 'code' is not NULL
305
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368>
306
+
307
+2022-11-06 03:26:31 +0900 Seungha Yang <seungha@centricular.com>
308
+
309
+ * sys/d3d11/gstd3d11window.cpp:
310
+ d3d11videosink: Always clear back buffer on resize
311
+ Swapchain may not need to be resized if the size of backbuffer
312
+ is equal to the previous size. Then previously rendered frame will be stay
313
+ on the screen. Do clear back buffer whenever resize() is called
314
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3342>
315
+
316
+2022-07-27 15:59:35 +0200 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
317
+
318
+ * ext/srt/gstsrtobject.c:
319
+ srt: Remove callers for which srt_bstats fails
320
+ This keeps them from accumulating in the element and in the stats while
321
+ the sink is not being fed, as long as we at least periodically grab
322
+ stats.
323
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3329>
324
+
325
+2022-07-29 11:53:18 +0200 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
326
+
327
+ * ext/srt/gstsrtobject.c:
328
+ srt: Use simpler list operations for callers
329
+ Avoid `g_list_append` and `g_list_remove` (which have to scan the list)
330
+ and replace them with `g_list_prepend` and `g_list_delete_link`.
331
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3329>
332
+
333
+2020-11-10 10:06:37 +0100 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
334
+
335
+ * ext/srt/gstsrtobject.c:
336
+ srt: Clean up poll/sock lifecycle
337
+ Make sure `srtobject->poll_id` is never invalid as long as `srtobject`
338
+ exists. Only remove our caller socket from it when the socket becomes
339
+ invalid.
340
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3329>
341
+
342
+2022-06-08 16:35:54 +0200 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
343
+
344
+ * ext/srt/gstsrtobject.c:
345
+ srt: Clean up error handling
346
+ - Make the srt_epoll_wait loops more uniform.
347
+ - Error only via GError when possible; let the element send the error
348
+ message. Avoids a second error message.
349
+ - Return 0 when cancelled. Avoids an error message from the element.
350
+ - Don't send an error message from send_headers when we're a server
351
+ sink.
352
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3329>
353
+
354
+2022-10-11 11:14:59 +0200 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
355
+
356
+ * ext/srt/gstsrtobject.c:
357
+ srt: Simplify socket stats
358
+ Don't hide stats depending on whether we're a sending or receiving
359
+ socket. While we're here, add some more debug logs.
360
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3329>
361
+
362
+2020-10-05 19:50:13 +0200 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
363
+
364
+ * ext/srt/gstsrtobject.c:
365
+ * ext/srt/gstsrtobject.h:
366
+ srt: Replace stats accumulation with naive byte counting
367
+ srt_bstats cannot be used to get the stats of closed connections, so the
368
+ best we can do is keep the running count ourselves.
369
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3329>
370
+
371
+2022-10-25 08:14:18 -0400 Nicolas Dufresne <nicolas.dufresne@collabora.com>
372
+
373
+ * gst/codecalpha/gstalphacombine.c:
374
+ alphacombine: Add missing query handler for gaps
375
+ The gap handling was in place, but there was no event handler to trigger it.
376
+ Implement the alpha sink event handler for the gaps. This fixes handling of
377
+ valid streams which may not refresh the alpha frames for every video frames.
378
+ It will also allow a clean error if the stream was missing the initial
379
+ alpha frame, at least until we find a better way to handle these
380
+ invalid frames.
381
+ Related to #1518
382
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3279>
383
+
384
+2022-10-26 11:47:43 +0200 Ignacio Casal Quinteiro <qignacio@amazon.com>
385
+
386
+ * sys/applemedia/avfdeviceprovider.m:
387
+ avfdeviceprovider: do not leak the properties
388
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3278>
389
+
390
+2022-10-21 21:50:01 +0530 Nirbheek Chauhan <nirbheek@centricular.com>
391
+
392
+ * gst-libs/gst/vulkan/cocoa/gstvkcocoa_utils.h:
393
+ * gst-libs/gst/vulkan/cocoa/gstvkwindow_cocoa.m:
394
+ * gst-libs/gst/vulkan/ios/gstvkios_utils.h:
395
+ * gst-libs/gst/vulkan/ios/gstvkwindow_ios.m:
396
+ gl/vulkan: Fix static linking on macOS
397
+ duplicate symbol '__invoke_on_main' in:
398
+ /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstvulkan-1.0.a(cocoa_gstvkwindow_cocoa.m.o)
399
+ /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstgl-1.0.a(cocoa_gstglwindow_cocoa.m.o)
400
+ ld: 1 duplicate symbol for architecture x86_64
401
+ clang: error: linker command failed with exit code 1 (use -v to see invocation)
402
+ Also make the same change in iOS for consistency.
403
+ Continuation of https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1132
404
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3263>
405
+
406
+2022-10-21 10:50:36 +1100 Matthew Waters <matthew@centricular.com>
407
+
408
+ * ext/webrtc/gstwebrtcbin.c:
409
+ webrtcbin: also add rtcp-fb ccm fir for video mlines by default
410
+ In addition to the 'nack pli' already added. Both are supported by
411
+ rtpbin/rtpsession by default already.
412
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3247>
413
+
414
+2022-10-14 18:51:43 +0200 Mathieu Duponchelle <mathieu@centricular.com>
415
+
416
+ * ext/webrtc/gstwebrtcice.c:
417
+ webrtc/nice: fix small leak of split strings
418
+ g_strfreev previously stopped at our manual NULL-termination. Fix by
419
+ restoring the pointer after joining.
420
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3190>
421
+
422
+2022-10-14 16:21:07 -0400 Arun Raghavan <arun@asymptotic.io>
423
+
424
+ * gst/rtmp2/gstrtmp2sink.c:
425
+ rtmp2sink: Correctly return GST_FLOW_ERROR on error
426
+ If there is an error while connecting, the streaming task will be stopped, and
427
+ is_running() will be false, causing a GST_FLOW_FLUSHING to be returned. Instead,
428
+ we perform the error check (!self->connection) first, to return an error if
429
+ that's what occured.
430
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3192>
431
+
432
+2022-10-07 08:30:05 +0200 Wojciech Kapsa <wojciech.kapsa@medvc.eu>
433
+
434
+ * sys/decklink/gstdecklinkvideosrc.cpp:
435
+ * sys/decklink/gstdecklinkvideosrc.h:
436
+ decklink: reset calculation of gst_decklink_video_src_update_time_mapping on no_signal. When the HDMI cable was disconnected for a long time, the calculation took too much time. SDI cable works fine.
437
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3168>
438
+
439
+2022-10-12 18:40:25 +0100 Tim-Philipp Müller <tim@centricular.com>
440
+
441
+ * meson.build:
442
+ Back to development
443
+
444
=== release 1.20.4 ===
445
446
2022-10-12 16:39:47 +0100 Tim-Philipp Müller <tim@centricular.com>
447
448
+ * ChangeLog:
449
* NEWS:
450
* RELEASE:
451
* gst-plugins-bad.doap:
452
gst-plugins-bad-1.20.4.tar.xz/NEWS -> gst-plugins-bad-1.20.5.tar.xz/NEWS
Changed
302
1
2
3
GStreamer 1.20.0 was originally released on 3 February 2022.
4
5
-The latest bug-fix release in the 1.20 series is 1.20.4 and was released
6
-on 12 October 2022.
7
+The latest bug-fix release in the 1.20 series is 1.20.5 and was released
8
+on 19 December 2022.
9
10
See https://gstreamer.freedesktop.org/releases/1.20/ for the latest
11
version of this document.
12
13
-Last updated: Wednesday 12 October 2022, 15:00 UTC (log)
14
+Last updated: Monday 19 December 2022, 19:00 UTC (log)
15
16
Introduction
17
18
19
20
Known Issues
21
22
+- GStreamer may fail to build the hotdoc documentation with the Meson
23
+ 0.64.0 release owing to a Meson bug. This should only affect systems
24
+ where hotdoc is installed, and will be fixed in Meson 0.64.1 by this
25
+ Meson PR in combination with this GStreamer MR. In the meantime,
26
+ users can pass -Ddoc=disabledor downgrade to an older Meson version
27
+ (< 0.64.0).
28
+
29
- nothing in particular at this point (but also see possibly breaking
30
changes section above)
31
32
33
chroma (Y41B, YUV9, YVU9 and IYU9)
34
- macOS build and packaging fixes, in particular fix finding of gio
35
modules on macOS for https/TLS support
36
+- Fix consuming of the macOS package as a framework in XCode
37
- Performance improvements
38
- Miscellaneous bug fixes, memory leak fixes, and other stability and
39
reliability improvements
40
41
- List of Merge Requests applied in 1.20.4
42
- List of Issues fixed in 1.20.4
43
44
+1.20.5
45
+
46
+The fifth 1.20 bug-fix release (1.20.5) was released on 19 December
47
+2022.
48
+
49
+This release only contains bugfixes and it should be safe to upgrade
50
+from 1.20.x.
51
+
52
+Highlighted bugfixes in 1.20.5
53
+
54
+- systemclock waiting fixes for certain 32-bit platforms/libcs
55
+- alphacombine: robustness improvements for corner case scenarios
56
+- avfvideosrc: Report latency when doing screen capture
57
+- d3d11videosink: various thread-safety and stability fixes
58
+- decklink: fix performance issue when HDMI signal has been lost for a
59
+ long time
60
+- flacparse: Fix handling of headers advertising 32 bits per sample
61
+- mpegts: Handle when iconv doesn’t support ISO 6937 (e.g. musl libc)
62
+- opengl: fix automatic dispmanx detection for rpi4 and fix usage of
63
+ eglCreate/DestroyImage
64
+- opusdec: Various channel-related fixes
65
+- textrender: event handling fixes, esp. for GAP event
66
+- subparse: Fix non-closed tag handling
67
+- videoscale: fix handling of unknown buffer metas
68
+- videosink: reverse playback handling fixes
69
+- qtmux: Prefill mode fixes, especially for raw audio
70
+- multiudpsink: allow binding to IPv6 address
71
+- rtspsrc: Fix usage of IPv6 connections in SETUP
72
+- rtspsrc: Only EOS on timeout if all streams are timed out/EOS
73
+- splitmuxsrc: fix playback stall if there are unlinked pads
74
+- v4l2: Fix SIGSEGV on state change during format changes
75
+- wavparse robustness fixes
76
+- Fix static linking on macOS (opengl, vulkan)
77
+- gstreamer-vaapi: fix headless build against mesa >= 22.3.0
78
+- GStreamer Editing Services library: Fix build with tools disabled
79
+- webrtc example/demo fixes
80
+- unit test fixes for aesdec and rtpjitterbuffer
81
+- Cerbero: Fix ios cross-compile with cmake on M1; some recipe updates
82
+ and other build fixes
83
+- Binary packages: pkg-config file fixes for various recipes (ffmpeg,
84
+ taglib, gstreamer)
85
+- Binary packages: Enable high bitdepth support for libvpx (VP8/VP9
86
+ encoding/decoding)
87
+- Binary packages: ship aes plugin
88
+- Miscellaneous bug fixes, memory leak fixes, and other stability and
89
+ reliability improvements
90
+- Performance improvements
91
+
92
+gstreamer
93
+
94
+- allocator: Copy allocator name in gst_allocator_register()
95
+- miniobject: support higher refcount values
96
+- pads: Fix non-serialized sticky event push, e.g. instant change rate
97
+ events
98
+- padtemplate: Fix annotations
99
+- systemclock: Use futex_time64 syscall on x32 and other platforms
100
+ that always…
101
+- Fix build of 1.20 branch with Meson 0.64.1 for those who have hotdoc
102
+ installed on their system.
103
+- meson: fix check for pthread_setname_np()
104
+- -Wimplicit-function-declaration in pthread_setname_np check (missing
105
+ _GNU_SOURCE)
106
+- gst-inspect: Don’t leak list
107
+
108
+Core Elements
109
+
110
+- concat: Properly propagate EOS seqnum
111
+- fakesrc: avoid time overflow with datarate
112
+
113
+gst-plugins-base
114
+
115
+- audioconvert, audioresample, audiofilter: fix divide by 0 for input
116
+ buffer without caps
117
+- cdparanoia: Ignore compiler warning coming from the cdparanoia
118
+ header
119
+- oggdemux, parsebin: More leak fixes
120
+- opengl: fix automatic dispmanx detection for rpi4
121
+- opengl: Fix usage of eglCreate/DestroyImage
122
+- opengl: Fix static linking on macOS
123
+- opusdec: Various channel-related fixes
124
+- textrender: Negotiate caps on a GAP event if none were negotiated
125
+ yet
126
+- textrender: Don’t blindly forward all events and don’t blindly
127
+ forward all events
128
+- timeoverlay: fix pad leak
129
+- oggdemux: Don’t leak incoming EOS event
130
+- subparse: Fix non-closed tag handling.
131
+- videodecoder: Only post latency message if it changed
132
+- videoscale: buffer meta handling fixes (NULL-terminate array of
133
+ valid meta tags)
134
+- videosink: Don’t return unknown end-time from get_times()
135
+- Bump core requirement in 1.20 branch to 1.20.4
136
+
137
+Tools
138
+
139
+- gst-play: Don’t leak the stream collection
140
+
141
+gst-plugins-good
142
+
143
+- flacparse: Fix handling of headers advertising 32bps
144
+- qt5: deactivate context if fill_info fails
145
+- qt5: initialize GError properly in gst_qt_get_gl_wrapcontext()
146
+- qtdemux: check return value from gst_structure_get in PIFF box
147
+- qtdemux: use unsigned int types to store result of QT_UINT32
148
+- qtmux: Prefill mode fixes
149
+- oss4: Fix debug category initialization
150
+- multiudpsink: allow binding to IPv6 address
151
+- rtpjitterbuffer tests: Cast drop-messages-interval type properly
152
+ (fixing it on 32-bit architectures)
153
+- rtspsrc: fix seek event leaks
154
+- rtspsrc: Don’t replace 404 errors with “no auth protocol found”
155
+- rtspsrc: Only EOS on timeout if all streams are timed out/EOS
156
+- rtspsrc: Fix usage of IPv6 connections in SETUP
157
+- splitmuxsrc: don’t queue data on unlinked pads
158
+- v4l2: Fix SIGSEGV on ‘change state’ during ‘format change’
159
+- v4l2videodec: Fix activation of internal pool
160
+- wavparse: Avoid occasional crash due to referencing freed buffer.
161
+- wavparse: Fix crash that occurs in push mode when header chunks are
162
+ corrupted in certain ways.
163
+
164
+gst-plugins-bad
165
+
166
+- aesdec: Fix padding removal for per-buffer-padding=FALSE
167
+- aesdec test failing in gst-plugins-bad
168
+- alphacombine: Add missing query handler for gaps
169
+- avfdeviceprovider: do not leak the properties
170
+- avfvideosrc: Report latency when doing screen capture
171
+- d3d11screencapturesrc: Specify PAR 1/1 to template caps
172
+- d3d11videosink: Fixing focus lost on desktop layout change
173
+- d3d11videosink: Call ShowWindow() from window thread
174
+- d3d11videosink: Fix deadlock when parent window is busy
175
+- d3d11videosink: Always clear back buffer on resize
176
+- decklink: reset calculation of time_mapping to fix clipping HDMI
177
+ video
178
+- directshow: Fix build error with glib 2.75 and newer
179
+- dvbsubenc: Forward GAP events as-is if we wouldn’t produce an end
180
+ packet and…
181
+- dvbsubenc: Write Display Definition Segment if a non-default
182
+ width/height is used
183
+- h265decoder: Do not abort when failed to prepare ref pic set
184
+- h264parser: Fix a typo in pred_weight_table parsing.
185
+- mediafoundation, d3d11: Fix memory leak and make leak tracer happy
186
+- mpegts: Handle when iconv doesn’t support ISO 6937 (e.g. musl libc)
187
+- mpegts: Check continuity counter on section streams
188
+- mpegts: Revert “mpegtspacketizer: memcmp potentially seen_before
189
+ data”
190
+- mpegtspacketizer: memcmp potentially seen_before data
191
+- mpegtsdemux: Always clear packetizer on DISCONT push mode
192
+- srt: various fixes - improve stats and error handling
193
+- rtmp2: Improve error messages
194
+- rtmp2sink: Correctly return GST_FLOW_ERROR on error
195
+- vulkan: Fix static linking on macOS
196
+- webrtcbin: also add rtcp-fb ccm fir for video mlines by default
197
+- webrtc/nice: fix small leak of split strings
198
+
199
+gst-plugins-ugly
200
+
201
+- No changes
202
+
203
+gst-libav
204
+
205
+- avdec_h265: Fix endless renegotiation with alternate interlacing
206
+- avviddec: Avoid flushing on framerate changes
207
+
208
+gst-rtsp-server
209
+
210
+- rtsp-server: Free client if no connection could be created
211
+
212
+gstreamer-vaapi
213
+
214
+- vaapi: prefix internal USE_X11 define to fix build with mesa 22.3.0
215
+- vaapi: libs: context: use queried value for attrib
216
+- gstreamer-vaapi cannot be built without X11 with recent mesa
217
+
218
+gstreamer-sharp
219
+
220
+- No changes
221
+
222
+gst-omx
223
+
224
+- No changes
225
+
226
+gst-python
227
+
228
+- No changes
229
+
230
+gst-editing-services
231
+
232
+- Fix building ges with tools disabled
233
+- Fix leaks and minor races in GES
234
+
235
+gst-examples:
236
+
237
+- webrtc: Fix double free in webrtc-recvonly-h264 demo
238
+- webrtc: Fix critical in webrtc-recvonly-h264 example
239
+- webrtc/signalling examples: Fix compatibility with Python 3.10
240
+
241
+Development build environment + gst-full build
242
+
243
+- No major changes
244
+
245
+Cerbero build tool and packaging changes in 1.20.5
246
+
247
+- oven: output status line at least every minute
248
+- Unconditionally set CMAKE_SYSTEM_NAME on Windows
249
+- Fix ios cross-compile with cmake on M1
250
+- Speed up downloads on Windows drastically
251
+- Fix tar usage on bsdtar and print progress while compressing
252
+- Actually print the sha for which the cache was not found
253
+
254
+Recipes
255
+
256
+- ffmpeg: add patch to generate the pc files properly
257
+- taglib: add patch to generate the pc files properly
258
+- fontconfig: update to 2.14.1
259
+- Windows: Crash on GStreamer 1.20.x x86_64 MSVC + MS-Windows due to
260
+ libfontconfig fonts.conf file invalid.
261
+- openssl: Fix compile errors on upgrades
262
+- moltenvk: Also ship the static library on macOS
263
+- gstreamer: Add some missing pkgconfig files
264
+- gst-plugins-good: Fix post_install failure when qt5 is enabled
265
+- gst-plugins-bad: Ship AES plugin
266
+- libvpx: Enable high bitdepth support
267
+- openssl: update to 1.1.1s
268
+- glib: Update patch to auto-detect modules on macOS
269
+
270
+Contributors to 1.20.5
271
+
272
+Aleksandr Slobodeniuk, Arun Raghavan, A. Wilcox, Bo Elmgreen, Boyuan
273
+Zhang, Bunio FH, Célestin Marot, Devin Anderson, Edward Hervey, He
274
+Junyan, Ignacio Casal Quinteiro, Jacek Skiba, Jan Alexander Steffens
275
+(heftig), Jan Schmidt, Jonas Bonn, Jordan Petridis, Justin Chadwell,
276
+Linus Svensson, Marek Olejnik, Mathieu Duponchelle, Matthew Waters,
277
+Nicolas Dufresne, Nirbheek Chauhan, Patrick Griffis, Pawel Stawicki,
278
+Philippe Normand, Ruben Gonzalez, Sam Van Den Berge, Sebastian Dröge,
279
+Seungha Yang, Stéphane Cerveau, Tim-Philipp Müller, Vivia Nikolaidou,
280
+Wojciech Kapsa, Xavier Claessens,
281
+
282
+… and many others who have contributed bug reports, translations, sent
283
+suggestions or helped testing. Thank you all!
284
+
285
+List of merge requests and issues fixed in 1.20.5
286
+
287
+- List of Merge Requests applied in 1.20.5
288
+- List of Issues fixed in 1.20.5
289
+
290
Schedule for 1.22
291
292
Our next major feature release will be 1.22, and 1.21 will be the
293
294
development of 1.21/1.22 will happen in the git main branch.
295
296
The plan for the 1.22 development cycle is now confirmed, and we aim for
297
-a 1.22.0 release in December 2022.
298
+a 1.22.0 release in December 2022 or early January 2023.
299
300
1.22 will be backwards-compatible to the stable 1.20, 1.18, 1.16, 1.14,
301
1.12, 1.10, 1.8, 1.6, 1.4, 1.2 and 1.0 release series.
302
gst-plugins-bad-1.20.4.tar.xz/RELEASE -> gst-plugins-bad-1.20.5.tar.xz/RELEASE
Changed
7
1
2
-This is GStreamer gst-plugins-bad 1.20.4.
3
+This is GStreamer gst-plugins-bad 1.20.5.
4
5
The GStreamer team is thrilled to announce a new major feature release
6
of your favourite cross-platform multimedia framework!
7
gst-plugins-bad-1.20.4.tar.xz/ext/aes/gstaesdec.c -> gst-plugins-bad-1.20.5.tar.xz/ext/aes/gstaesdec.c
Changed
17
1
2
GST_ERROR_OBJECT (filter, "Could not initialize openssl cipher");
3
return FALSE;
4
}
5
- if (filter->per_buffer_padding) {
6
- if (!EVP_CIPHER_CTX_set_padding (filter->evp_ctx, 0)) {
7
- GST_ERROR_OBJECT (filter, "Could not set padding");
8
- return FALSE;
9
- }
10
+ if (!EVP_CIPHER_CTX_set_padding (filter->evp_ctx,
11
+ filter->per_buffer_padding ? 0 : 1)) {
12
+ GST_ERROR_OBJECT (filter, "Could not set padding");
13
+ return FALSE;
14
}
15
16
return TRUE;
17
gst-plugins-bad-1.20.4.tar.xz/ext/srt/gstsrtobject.c -> gst-plugins-bad-1.20.5.tar.xz/ext/srt/gstsrtobject.c
Changed
727
1
2
#define GST_CAT_DEFAULT gst_debug_srtobject
3
4
#if SRT_VERSION_VALUE > 0x10402
5
-#define SRTSOCK_ERROR_DEBUG ("libsrt reported: %s", srt_rejectreason_str (reason))
6
+#define REASON_FORMAT "s"
7
+#define REASON_ARGS(reason) srt_rejectreason_str (reason)
8
#else
9
/* srt_rejectreason_str() is unavailable in libsrt 1.4.2 and prior due to
10
* unexported symbol. See https://github.com/Haivision/srt/pull/1728. */
11
-#define SRTSOCK_ERROR_DEBUG ("libsrt reported reject reason code %d", reason)
12
+#define REASON_FORMAT "s %d"
13
+#define REASON_ARGS(reason) "reject reason code", (reason)
14
#endif
15
16
/* Define options added in later revisions */
17
18
#define SRTO_RETRANSMITALGO 61
19
#endif
20
21
-#define ELEMENT_WARNING_SRTSOCK_ERROR(code, reason) \
22
- GST_ELEMENT_WARNING (srtobject->element, RESOURCE, code, \
23
- ("Error on SRT socket. Trying to reconnect."), SRTSOCK_ERROR_DEBUG)
24
-
25
enum
26
{
27
PROP_URI = 1,
28
29
gboolean sent_headers;
30
} SRTCaller;
31
32
-static GstStructure *gst_srt_object_accumulate_stats (GstSRTObject * srtobject,
33
- SRTSOCKET srtsock);
34
-
35
static SRTCaller *
36
srt_caller_new (void)
37
{
38
39
static void
40
srt_caller_signal_removed (SRTCaller * caller, GstSRTObject * srtobject)
41
{
42
- GstStructure *stats;
43
-
44
- stats = gst_srt_object_accumulate_stats (srtobject, caller->sock);
45
-
46
- /* FIXME: These are the final statistics for the caller before we close its
47
- * socket. Deliver the stats to the app before we throw them away. */
48
- gst_structure_free (stats);
49
-
50
g_signal_emit_by_name (srtobject->element, "caller-removed", 0,
51
caller->sockaddr);
52
}
53
54
{
55
g_return_if_fail (srtobject != NULL);
56
57
- if (srtobject->poll_id != SRT_ERROR) {
58
- srt_epoll_release (srtobject->poll_id);
59
- srtobject->poll_id = SRT_ERROR;
60
+ if (srtobject->sock != SRT_INVALID_SOCK) {
61
+ srt_close (srtobject->sock);
62
}
63
64
+ srt_epoll_release (srtobject->poll_id);
65
+
66
g_cond_clear (&srtobject->sock_cond);
67
68
GST_DEBUG_OBJECT (srtobject->element, "Destroying srtobject");
69
70
71
GST_DEBUG_OBJECT (srtobject->element, "Waiting a request from caller");
72
73
- if (srt_epoll_wait (srtobject->listener_poll_id, &rsock,
74
- &rsocklen, 0, 0, poll_timeout, NULL, 0, NULL, 0) < 0) {
75
+ if (srt_epoll_wait (srtobject->listener_poll_id, &rsock, &rsocklen, 0, 0,
76
+ poll_timeout, NULL, 0, NULL, 0) < 0) {
77
gint srt_errno = srt_getlasterror (NULL);
78
79
if (srtobject->listener_poll_id == SRT_ERROR)
80
return NULL;
81
- if (srt_errno == SRT_ETIMEOUT) {
82
+
83
+ if (srt_errno == SRT_ETIMEOUT)
84
continue;
85
- } else {
86
- GST_ELEMENT_ERROR (srtobject->element, RESOURCE, FAILED,
87
- ("abort polling: %s", srt_getlasterror_str ()), (NULL));
88
- return NULL;
89
- }
90
+
91
+ GST_ELEMENT_ERROR (srtobject->element, RESOURCE, FAILED,
92
+ ("abort polling: %s", srt_getlasterror_str ()), (NULL));
93
+ return NULL;
94
}
95
96
caller_sock =
97
98
caller->sock);
99
100
g_mutex_lock (&srtobject->sock_lock);
101
- srtobject->callers = g_list_append (srtobject->callers, caller);
102
+ srtobject->callers = g_list_prepend (srtobject->callers, caller);
103
g_cond_signal (&srtobject->sock_cond);
104
g_mutex_unlock (&srtobject->sock_lock);
105
106
107
if (sock == SRT_INVALID_SOCK) {
108
g_set_error (error, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_INIT, "%s",
109
srt_getlasterror_str ());
110
- goto failed;
111
+ return FALSE;
112
}
113
114
if (!gst_srt_object_set_common_params (sock, srtobject, error)) {
115
116
if (srt_connect (sock, sa, sa_len) == SRT_ERROR) {
117
g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_OPEN_READ, "%s",
118
srt_getlasterror_str ());
119
+ srt_epoll_remove_usock (srtobject->poll_id, sock);
120
goto failed;
121
}
122
123
124
return TRUE;
125
126
failed:
127
-
128
- if (srtobject->poll_id != SRT_ERROR) {
129
- srt_epoll_release (srtobject->poll_id);
130
- }
131
-
132
- if (sock != SRT_INVALID_SOCK) {
133
- srt_close (sock);
134
- }
135
-
136
- srtobject->poll_id = SRT_ERROR;
137
- srtobject->sock = SRT_INVALID_SOCK;
138
-
139
+ srt_close (sock);
140
return FALSE;
141
}
142
143
144
gst_srt_object_open (GstSRTObject * srtobject, GCancellable * cancellable,
145
GError ** error)
146
{
147
- srtobject->previous_bytes = 0;
148
+ srtobject->bytes = 0;
149
150
return gst_srt_object_open_internal (srtobject, cancellable, error);
151
}
152
153
g_mutex_lock (&srtobject->sock_lock);
154
155
if (srtobject->sock != SRT_INVALID_SOCK) {
156
- GstStructure *stats;
157
-
158
- if (srtobject->poll_id != SRT_ERROR) {
159
- srt_epoll_remove_usock (srtobject->poll_id, srtobject->sock);
160
- }
161
-
162
- stats = gst_srt_object_accumulate_stats (srtobject, srtobject->sock);
163
-
164
- /* FIXME: These are the final statistics for the socket before we close it.
165
- * Deliver the stats to the app before we throw them away. */
166
- gst_structure_free (stats);
167
+ srt_epoll_remove_usock (srtobject->poll_id, srtobject->sock);
168
169
GST_DEBUG_OBJECT (srtobject->element, "Closing SRT socket (0x%x)",
170
srtobject->sock);
171
172
173
static gboolean
174
gst_srt_object_wait_caller (GstSRTObject * srtobject,
175
- GCancellable * cancellable, GError ** error)
176
+ GCancellable * cancellable)
177
{
178
gboolean ret;
179
180
g_mutex_lock (&srtobject->sock_lock);
181
182
- if (srtobject->callers == NULL) {
183
+ ret = (srtobject->callers != NULL);
184
+ if (!ret) {
185
GST_INFO_OBJECT (srtobject->element, "Waiting for connection");
186
-
187
- while (!g_cancellable_is_cancelled (cancellable)) {
188
- ret = (srtobject->callers != NULL);
189
- if (ret) {
190
- GST_DEBUG_OBJECT (srtobject->element, "Got a connection");
191
- break;
192
- }
193
-
194
+ while (!ret && !g_cancellable_is_cancelled (cancellable)) {
195
g_cond_wait (&srtobject->sock_cond, &srtobject->sock_lock);
196
+ ret = (srtobject->callers != NULL);
197
}
198
- } else {
199
- ret = TRUE;
200
}
201
202
g_mutex_unlock (&srtobject->sock_lock);
203
204
- if (!ret) {
205
- g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_FAILED,
206
- "Canceled waiting for a connection.");
207
+ if (ret) {
208
+ GST_DEBUG_OBJECT (srtobject->element, "Got a connection");
209
}
210
211
return ret;
212
213
GST_OBJECT_UNLOCK (srtobject->element);
214
215
if (connection_mode == GST_SRT_CONNECTION_MODE_LISTENER) {
216
- if (!gst_srt_object_wait_caller (srtobject, cancellable, error))
217
- return -1;
218
+ if (!gst_srt_object_wait_caller (srtobject, cancellable))
219
+ return 0;
220
221
g_mutex_lock (&srtobject->sock_lock);
222
if (srtobject->callers) {
223
224
poll_timeout, NULL, 0, NULL, 0) < 0) {
225
gint srt_errno = srt_getlasterror (NULL);
226
227
- if (srt_errno != SRT_ETIMEOUT) {
228
+#if SRT_VERSION_VALUE >= 0x010402
229
+ if (srt_errno == SRT_EPOLLEMPTY)
230
return 0;
231
- }
232
- continue;
233
+#endif
234
+
235
+ if (srt_errno == SRT_ETIMEOUT)
236
+ continue;
237
+
238
+ g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_WRITE,
239
+ "Failed to poll socket: %s", srt_getlasterror_str ());
240
+ return -1;
241
}
242
243
if (wsocklen == 1 && rsocklen == 1) {
244
/* Socket reported in wsock AND rsock signifies an error. */
245
gint reason = srt_getrejectreason (wsock);
246
- gboolean is_auth_error = (reason == SRT_REJ_BADSECRET
247
- || reason == SRT_REJ_UNSECURE);
248
249
- if (is_auth_error) {
250
- ELEMENT_WARNING_SRTSOCK_ERROR (NOT_AUTHORIZED, reason);
251
- }
252
+ if (reason == SRT_REJ_BADSECRET || reason == SRT_REJ_UNSECURE) {
253
+ if (connection_mode == GST_SRT_CONNECTION_MODE_LISTENER) {
254
+ GST_ELEMENT_WARNING (srtobject->element, RESOURCE, NOT_AUTHORIZED,
255
+ ("Caller failed to authenticate: %" REASON_FORMAT,
256
+ REASON_ARGS (reason)), (NULL));
257
+ return 0;
258
+ }
259
260
- if (connection_mode == GST_SRT_CONNECTION_MODE_LISTENER) {
261
- /* Caller has disappeared. */
262
- return 0;
263
+ GST_ELEMENT_WARNING (srtobject->element, RESOURCE, NOT_AUTHORIZED,
264
+ ("Failed to authenticate: %" REASON_FORMAT ". Trying to reconnect",
265
+ REASON_ARGS (reason)), (NULL));
266
} else {
267
- if (!is_auth_error) {
268
- ELEMENT_WARNING_SRTSOCK_ERROR (READ, reason);
269
+ if (connection_mode == GST_SRT_CONNECTION_MODE_LISTENER) {
270
+ /* Caller has disappeared. */
271
+ return 0;
272
}
273
274
- gst_srt_object_close (srtobject);
275
- if (!gst_srt_object_open_internal (srtobject, cancellable, error)) {
276
- return -1;
277
- }
278
+ GST_ELEMENT_WARNING (srtobject->element, RESOURCE, READ,
279
+ ("Error on SRT socket: %" REASON_FORMAT ". Trying to reconnect",
280
+ REASON_ARGS (reason)), (NULL));
281
+ }
282
+
283
+ gst_srt_object_close (srtobject);
284
+ if (!gst_srt_object_open_internal (srtobject, cancellable, error)) {
285
+ return -1;
286
}
287
continue;
288
}
289
290
return -1;
291
}
292
}
293
+
294
+ srtobject->bytes += len;
295
break;
296
}
297
298
299
300
/* Removing all socket descriptors from the monitoring list
301
* wakes up SRT's threads. We only have one to remove. */
302
- if (srtobject->sock != SRT_INVALID_SOCK && srtobject->poll_id != SRT_ERROR) {
303
+ if (srtobject->sock != SRT_INVALID_SOCK) {
304
srt_epoll_remove_usock (srtobject->poll_id, srtobject->sock);
305
}
306
307
308
static gboolean
309
gst_srt_object_send_headers (GstSRTObject * srtobject, SRTSOCKET sock,
310
gint poll_id, gint poll_timeout, GstBufferList * headers,
311
- GCancellable * cancellable)
312
+ GCancellable * cancellable, GError ** error)
313
{
314
guint size, i;
315
316
317
for (i = 0; i < size; i++) {
318
SRTSOCKET wsock = sock;
319
gint wsocklen = 1;
320
+ gint sent;
321
322
GstBuffer *buffer = gst_buffer_list_get (headers, i);
323
GstMapInfo mapinfo;
324
325
if (g_cancellable_is_cancelled (cancellable)) {
326
- return FALSE;
327
+ return TRUE;
328
}
329
330
- if (poll_id > 0 && srt_epoll_wait (poll_id, 0, 0, &wsock,
331
- &wsocklen, poll_timeout, NULL, 0, NULL, 0) < 0) {
332
- continue;
333
+ if (poll_id >= 0 && srt_epoll_wait (poll_id, 0, 0, &wsock, &wsocklen,
334
+ poll_timeout, NULL, 0, NULL, 0) < 0) {
335
+ gint srt_errno = srt_getlasterror (NULL);
336
+
337
+#if SRT_VERSION_VALUE >= 0x010402
338
+ if (srt_errno == SRT_EPOLLEMPTY)
339
+ return TRUE;
340
+#endif
341
+
342
+ if (srt_errno == SRT_ETIMEOUT)
343
+ continue;
344
+
345
+ g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_WRITE,
346
+ "Failed to poll socket: %s", srt_getlasterror_str ());
347
+ return FALSE;
348
}
349
350
GST_TRACE_OBJECT (srtobject->element, "sending header %u %" GST_PTR_FORMAT,
351
i, buffer);
352
353
if (!gst_buffer_map (buffer, &mapinfo, GST_MAP_READ)) {
354
- GST_ELEMENT_ERROR (srtobject->element, RESOURCE, READ,
355
- ("Could not map the input stream"), (NULL));
356
+ g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_WRITE,
357
+ "Failed to map header buffer");
358
return FALSE;
359
}
360
361
- if (srt_sendmsg2 (wsock, (char *) mapinfo.data, mapinfo.size,
362
- 0) == SRT_ERROR) {
363
- GST_ELEMENT_ERROR (srtobject->element, RESOURCE, WRITE, NULL,
364
- ("%s", srt_getlasterror_str ()));
365
+ sent = srt_sendmsg2 (wsock, (char *) mapinfo.data, mapinfo.size, 0);
366
+ if (sent == SRT_ERROR) {
367
+ g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_WRITE, "%s",
368
+ srt_getlasterror_str ());
369
gst_buffer_unmap (buffer, &mapinfo);
370
return FALSE;
371
}
372
373
+ srtobject->bytes += sent;
374
+
375
gst_buffer_unmap (buffer, &mapinfo);
376
}
377
378
379
static gssize
380
gst_srt_object_write_to_callers (GstSRTObject * srtobject,
381
GstBufferList * headers,
382
- const GstMapInfo * mapinfo, GCancellable * cancellable, GError ** error)
383
+ const GstMapInfo * mapinfo, GCancellable * cancellable)
384
{
385
- GList *callers;
386
+ GList *item, *next;
387
388
g_mutex_lock (&srtobject->sock_lock);
389
- callers = srtobject->callers;
390
- while (callers != NULL) {
391
+ for (item = srtobject->callers, next = NULL; item; item = next) {
392
+ SRTCaller *caller = item->data;
393
gssize len = 0;
394
const guint8 *msg = mapinfo->data;
395
gint sent;
396
gint payload_size, optlen = sizeof (payload_size);
397
398
- SRTCaller *caller = callers->data;
399
- callers = callers->next;
400
+ next = item->next;
401
402
if (g_cancellable_is_cancelled (cancellable)) {
403
goto cancelled;
404
}
405
406
if (!caller->sent_headers) {
407
- if (!gst_srt_object_send_headers (srtobject, caller->sock, -1,
408
- -1, headers, cancellable)) {
409
+ GError *error = NULL;
410
+
411
+ if (!gst_srt_object_send_headers (srtobject, caller->sock, -1, 0,
412
+ headers, cancellable, &error)) {
413
+ GST_WARNING_OBJECT (srtobject->element,
414
+ "Failed to send headers to caller %d: %s",
415
+ caller->sock, error->message);
416
+ g_error_free (error);
417
goto err;
418
}
419
+
420
caller->sent_headers = TRUE;
421
}
422
423
424
goto err;
425
}
426
len += sent;
427
+ srtobject->bytes += sent;
428
}
429
430
continue;
431
432
err:
433
- srtobject->callers = g_list_remove (srtobject->callers, caller);
434
+ srtobject->callers = g_list_delete_link (srtobject->callers, item);
435
srt_caller_signal_removed (caller, srtobject);
436
srt_caller_free (caller);
437
}
438
439
440
cancelled:
441
g_mutex_unlock (&srtobject->sock_lock);
442
- return -1;
443
+ return 0;
444
}
445
446
static gssize
447
448
449
if (!srtobject->sent_headers) {
450
if (!gst_srt_object_send_headers (srtobject, srtobject->sock,
451
- srtobject->poll_id, poll_timeout, headers, cancellable)) {
452
+ srtobject->poll_id, poll_timeout, headers, cancellable, error)) {
453
return -1;
454
}
455
+
456
srtobject->sent_headers = TRUE;
457
}
458
459
460
461
if (srt_epoll_wait (srtobject->poll_id, &rsock, &rsocklen, &wsock,
462
&wsocklen, poll_timeout, NULL, 0, NULL, 0) < 0) {
463
- continue;
464
+ gint srt_errno = srt_getlasterror (NULL);
465
+
466
+#if SRT_VERSION_VALUE >= 0x010402
467
+ if (srt_errno == SRT_EPOLLEMPTY)
468
+ return 0;
469
+#endif
470
+
471
+ if (srt_errno == SRT_ETIMEOUT)
472
+ continue;
473
+
474
+ g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_WRITE,
475
+ "Failed to poll socket: %s", srt_getlasterror_str ());
476
+ return -1;
477
}
478
479
if (wsocklen == 1 && rsocklen == 1) {
480
481
gint reason = srt_getrejectreason (wsock);
482
483
if (reason == SRT_REJ_BADSECRET || reason == SRT_REJ_UNSECURE) {
484
- ELEMENT_WARNING_SRTSOCK_ERROR (NOT_AUTHORIZED, reason);
485
+ GST_ELEMENT_WARNING (srtobject->element, RESOURCE, NOT_AUTHORIZED,
486
+ ("Failed to authenticate: %" REASON_FORMAT ". Trying to reconnect",
487
+ REASON_ARGS (reason)), (NULL));
488
} else {
489
- ELEMENT_WARNING_SRTSOCK_ERROR (WRITE, reason);
490
+ GST_ELEMENT_WARNING (srtobject->element, RESOURCE, WRITE,
491
+ ("Error on SRT socket: %" REASON_FORMAT ". Trying to reconnect",
492
+ REASON_ARGS (reason)), (NULL));
493
}
494
495
gst_srt_object_close (srtobject);
496
497
}
498
499
if (srt_getsockflag (wsock, SRTO_PAYLOADSIZE, &payload_size, &optlen)) {
500
- GST_ELEMENT_ERROR (srtobject->element, RESOURCE, WRITE, NULL,
501
- ("%s", srt_getlasterror_str ()));
502
- break;
503
+ g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_WRITE, "%s",
504
+ srt_getlasterror_str ());
505
+ return -1;
506
}
507
508
rest = MIN (mapinfo->size - len, payload_size);
509
510
sent = srt_sendmsg2 (wsock, (char *) (msg + len), rest, 0);
511
if (sent < 0) {
512
- GST_ELEMENT_ERROR (srtobject->element, RESOURCE, WRITE, NULL,
513
- ("%s", srt_getlasterror_str ()));
514
- break;
515
+ g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_WRITE, "%s",
516
+ srt_getlasterror_str ());
517
+ return -1;
518
}
519
len += sent;
520
+ srtobject->bytes += sent;
521
}
522
523
return len;
524
525
526
if (connection_mode == GST_SRT_CONNECTION_MODE_LISTENER) {
527
if (wait_for_connection) {
528
- if (!gst_srt_object_wait_caller (srtobject, cancellable, error))
529
- return -1;
530
+ if (!gst_srt_object_wait_caller (srtobject, cancellable))
531
+ return 0;
532
}
533
len =
534
gst_srt_object_write_to_callers (srtobject, headers, mapinfo,
535
- cancellable, error);
536
+ cancellable);
537
} else {
538
len =
539
gst_srt_object_write_one (srtobject, headers, mapinfo, cancellable,
540
541
}
542
543
static GstStructure *
544
-get_stats_for_srtsock (SRTSOCKET srtsock, gboolean is_sender, guint64 * bytes)
545
+get_stats_for_srtsock (GstSRTObject * srtobject, SRTSOCKET srtsock)
546
{
547
- GstStructure *s = gst_structure_new_empty ("application/x-srt-statistics");
548
+ GstStructure *s;
549
int ret;
550
SRT_TRACEBSTATS stats;
551
552
ret = srt_bstats (srtsock, &stats, 0);
553
-
554
- if (ret >= 0) {
555
- if (is_sender) {
556
- gst_structure_set (s,
557
- /* number of sent data packets, including retransmissions */
558
- "packets-sent", G_TYPE_INT64, stats.pktSent,
559
- /* number of lost packets (sender side) */
560
- "packets-sent-lost", G_TYPE_INT, stats.pktSndLoss,
561
- /* number of retransmitted packets */
562
- "packets-retransmitted", G_TYPE_INT, stats.pktRetrans,
563
- /* number of received ACK packets */
564
- "packet-ack-received", G_TYPE_INT, stats.pktRecvACK,
565
- /* number of received NAK packets */
566
- "packet-nack-received", G_TYPE_INT, stats.pktRecvNAK,
567
- /* time duration when UDT is sending data (idle time exclusive) */
568
- "send-duration-us", G_TYPE_INT64, stats.usSndDuration,
569
- /* number of sent data bytes, including retransmissions */
570
- "bytes-sent", G_TYPE_UINT64, stats.byteSent,
571
- /* number of retransmitted bytes */
572
- "bytes-retransmitted", G_TYPE_UINT64, stats.byteRetrans,
573
- /* number of too-late-to-send dropped bytes */
574
- "bytes-sent-dropped", G_TYPE_UINT64, stats.byteSndDrop,
575
- /* number of too-late-to-send dropped packets */
576
- "packets-sent-dropped", G_TYPE_INT, stats.pktSndDrop,
577
- /* sending rate in Mb/s */
578
- "send-rate-mbps", G_TYPE_DOUBLE, stats.mbpsSendRate,
579
- /* busy sending time (i.e., idle time exclusive) */
580
- "send-duration-us", G_TYPE_UINT64, stats.usSndDuration,
581
- "negotiated-latency-ms", G_TYPE_INT, stats.msSndTsbPdDelay, NULL);
582
- *bytes += stats.byteSent;
583
- } else {
584
- gst_structure_set (s,
585
- "packets-received", G_TYPE_INT64, stats.pktRecvTotal,
586
- "packets-received-lost", G_TYPE_INT, stats.pktRcvLossTotal,
587
- /* number of sent ACK packets */
588
- "packet-ack-sent", G_TYPE_INT, stats.pktSentACK,
589
- /* number of sent NAK packets */
590
- "packet-nack-sent", G_TYPE_INT, stats.pktSentNAK,
591
- "bytes-received", G_TYPE_UINT64, stats.byteRecvTotal,
592
- "bytes-received-lost", G_TYPE_UINT64, stats.byteRcvLossTotal,
593
- "receive-rate-mbps", G_TYPE_DOUBLE, stats.mbpsRecvRate,
594
- "negotiated-latency-ms", G_TYPE_INT, stats.msRcvTsbPdDelay, NULL);
595
- *bytes += stats.byteRecvTotal;
596
- }
597
-
598
- gst_structure_set (s,
599
- /* estimated bandwidth, in Mb/s */
600
- "bandwidth-mbps", G_TYPE_DOUBLE, stats.mbpsBandwidth,
601
- "rtt-ms", G_TYPE_DOUBLE, stats.msRTT, NULL);
602
-
603
+ if (ret < 0) {
604
+ GST_WARNING_OBJECT (srtobject->element,
605
+ "failed to retrieve stats for socket %d (reason %s)",
606
+ srtsock, srt_getlasterror_str ());
607
+ return NULL;
608
}
609
610
+ s = gst_structure_new ("application/x-srt-statistics",
611
+ /* number of sent data packets, including retransmissions */
612
+ "packets-sent", G_TYPE_INT64, stats.pktSent,
613
+ /* number of lost packets (sender side) */
614
+ "packets-sent-lost", G_TYPE_INT, stats.pktSndLoss,
615
+ /* number of retransmitted packets */
616
+ "packets-retransmitted", G_TYPE_INT, stats.pktRetrans,
617
+ /* number of received ACK packets */
618
+ "packet-ack-received", G_TYPE_INT, stats.pktRecvACK,
619
+ /* number of received NAK packets */
620
+ "packet-nack-received", G_TYPE_INT, stats.pktRecvNAK,
621
+ /* time duration when UDT is sending data (idle time exclusive) */
622
+ "send-duration-us", G_TYPE_INT64, stats.usSndDuration,
623
+ /* number of sent data bytes, including retransmissions */
624
+ "bytes-sent", G_TYPE_UINT64, stats.byteSent,
625
+ /* number of retransmitted bytes */
626
+ "bytes-retransmitted", G_TYPE_UINT64, stats.byteRetrans,
627
+ /* number of too-late-to-send dropped bytes */
628
+ "bytes-sent-dropped", G_TYPE_UINT64, stats.byteSndDrop,
629
+ /* number of too-late-to-send dropped packets */
630
+ "packets-sent-dropped", G_TYPE_INT, stats.pktSndDrop,
631
+ /* sending rate in Mb/s */
632
+ "send-rate-mbps", G_TYPE_DOUBLE, stats.mbpsSendRate,
633
+ /* busy sending time (i.e., idle time exclusive) */
634
+ "send-duration-us", G_TYPE_UINT64, stats.usSndDuration,
635
+ "negotiated-latency-ms", G_TYPE_INT, stats.msSndTsbPdDelay,
636
+ "packets-received", G_TYPE_INT64, stats.pktRecvTotal,
637
+ "packets-received-lost", G_TYPE_INT, stats.pktRcvLossTotal,
638
+ /* number of sent ACK packets */
639
+ "packet-ack-sent", G_TYPE_INT, stats.pktSentACK,
640
+ /* number of sent NAK packets */
641
+ "packet-nack-sent", G_TYPE_INT, stats.pktSentNAK,
642
+ "bytes-received", G_TYPE_UINT64, stats.byteRecvTotal,
643
+ "bytes-received-lost", G_TYPE_UINT64, stats.byteRcvLossTotal,
644
+ "receive-rate-mbps", G_TYPE_DOUBLE, stats.mbpsRecvRate,
645
+ "negotiated-latency-ms", G_TYPE_INT, stats.msRcvTsbPdDelay,
646
+ /* estimated bandwidth, in Mb/s */
647
+ "bandwidth-mbps", G_TYPE_DOUBLE, stats.mbpsBandwidth,
648
+ "rtt-ms", G_TYPE_DOUBLE, stats.msRTT, NULL);
649
+
650
+ GST_DEBUG_OBJECT (srtobject->element,
651
+ "retreived stats for socket %d: %" GST_PTR_FORMAT, srtsock, s);
652
return s;
653
}
654
655
656
{
657
GstStructure *s = NULL;
658
gboolean is_sender = GST_IS_BASE_SINK (srtobject->element);
659
- guint64 bytes;
660
661
g_mutex_lock (&srtobject->sock_lock);
662
663
- bytes = srtobject->previous_bytes;
664
-
665
if (srtobject->sock != SRT_INVALID_SOCK) {
666
- s = get_stats_for_srtsock (srtobject->sock, is_sender, &bytes);
667
- goto done;
668
+ s = get_stats_for_srtsock (srtobject, srtobject->sock);
669
}
670
671
- s = gst_structure_new_empty ("application/x-srt-statistics");
672
+ if (s == NULL) {
673
+ s = gst_structure_new_empty ("application/x-srt-statistics");
674
+ }
675
676
if (srtobject->callers) {
677
GValueArray *callers_stats = g_value_array_new (1);
678
GValue callers_stats_v = G_VALUE_INIT;
679
- GList *item;
680
+ GList *item, *next;
681
682
- for (item = srtobject->callers; item; item = item->next) {
683
+ for (item = srtobject->callers, next = NULL; item; item = next) {
684
SRTCaller *caller = item->data;
685
GstStructure *tmp;
686
GValue *v;
687
688
- tmp = get_stats_for_srtsock (caller->sock, is_sender, &bytes);
689
+ next = item->next;
690
+
691
+ tmp = get_stats_for_srtsock (srtobject, caller->sock);
692
+ if (tmp == NULL) {
693
+ srtobject->callers = g_list_delete_link (srtobject->callers, item);
694
+ srt_caller_signal_removed (caller, srtobject);
695
+ srt_caller_free (caller);
696
+ continue;
697
+ }
698
699
gst_structure_set (tmp, "caller-address", G_TYPE_SOCKET_ADDRESS,
700
caller->sockaddr, NULL);
701
702
gst_structure_take_value (s, "callers", &callers_stats_v);
703
}
704
705
-done:
706
gst_structure_set (s, is_sender ? "bytes-sent-total" : "bytes-received-total",
707
- G_TYPE_UINT64, bytes, NULL);
708
+ G_TYPE_UINT64, srtobject->bytes, NULL);
709
710
g_mutex_unlock (&srtobject->sock_lock);
711
712
return s;
713
}
714
-
715
-static GstStructure *
716
-gst_srt_object_accumulate_stats (GstSRTObject * srtobject, SRTSOCKET srtsock)
717
-{
718
- gboolean is_sender = GST_IS_BASE_SINK (srtobject->element);
719
- GstStructure *stats;
720
- guint64 bytes = 0;
721
-
722
- stats = get_stats_for_srtsock (srtsock, is_sender, &bytes);
723
- srtobject->previous_bytes += bytes;
724
-
725
- return stats;
726
-}
727
gst-plugins-bad-1.20.4.tar.xz/ext/srt/gstsrtobject.h -> gst-plugins-bad-1.20.5.tar.xz/ext/srt/gstsrtobject.h
Changed
10
1
2
3
gboolean authentication;
4
5
- guint64 previous_bytes;
6
+ guint64 bytes;
7
};
8
9
GstSRTObject *gst_srt_object_new (GstElement *element);
10
gst-plugins-bad-1.20.4.tar.xz/ext/webrtc/gstwebrtcbin.c -> gst-plugins-bad-1.20.5.tar.xz/ext/webrtc/gstwebrtcbin.c
Changed
17
1
2
if (!gst_structure_has_field (s, "rtcp-fb-nack"))
3
gst_structure_set (s, "rtcp-fb-nack", G_TYPE_BOOLEAN, TRUE, NULL);
4
5
- if (kind == GST_WEBRTC_KIND_VIDEO
6
- && !gst_structure_has_field (s, "rtcp-fb-nack-pli"))
7
- gst_structure_set (s, "rtcp-fb-nack-pli", G_TYPE_BOOLEAN, TRUE, NULL);
8
+ if (kind == GST_WEBRTC_KIND_VIDEO) {
9
+ if (!gst_structure_has_field (s, "rtcp-fb-nack-pli"))
10
+ gst_structure_set (s, "rtcp-fb-nack-pli", G_TYPE_BOOLEAN, TRUE, NULL);
11
+ if (!gst_structure_has_field (s, "rtcp-fb-ccm-fir"))
12
+ gst_structure_set (s, "rtcp-fb-ccm-fir", G_TYPE_BOOLEAN, TRUE, NULL);
13
+ }
14
if (!gst_structure_has_field (s, "rtcp-fb-transport-cc"))
15
gst_structure_set (s, "rtcp-fb-transport-cc", G_TYPE_BOOLEAN, TRUE, NULL);
16
17
gst-plugins-bad-1.20.4.tar.xz/ext/webrtc/gstwebrtcice.c -> gst-plugins-bad-1.20.5.tar.xz/ext/webrtc/gstwebrtcice.c
Changed
29
1
2
gchar ** address, gchar ** postfix)
3
{
4
char **tokens = NULL;
5
+ char *tmp_address = NULL;
6
7
if (!g_str_has_prefix (candidate, "a=candidate:")) {
8
GST_ERROR ("candidate \"%s\" does not start with \"a=candidate:\"",
9
10
goto failure;
11
}
12
13
+ tmp_address = tokens4;
14
if (address)
15
- *address = g_strdup (tokens4);
16
+ *address = g_strdup (tmp_address);
17
tokens4 = NULL;
18
+
19
if (prefix)
20
*prefix = g_strjoinv (" ", tokens);
21
if (postfix)
22
*postfix = g_strdup (tokens5);
23
24
+ tokens4 = tmp_address;
25
+
26
g_strfreev (tokens);
27
return TRUE;
28
29
gst-plugins-bad-1.20.4.tar.xz/gst-libs/gst/codecparsers/gsth264parser.c -> gst-plugins-bad-1.20.5.tar.xz/gst-libs/gst/codecparsers/gsth264parser.c
Changed
10
1
2
p->chroma_weight_l0i1 = default_chroma_weight;
3
}
4
if (GST_H264_IS_B_SLICE (slice)) {
5
- for (i = 0; i <= slice->num_ref_idx_l0_active_minus1; i++) {
6
+ for (i = 0; i <= slice->num_ref_idx_l1_active_minus1; i++) {
7
p->chroma_weight_l1i0 = default_chroma_weight;
8
p->chroma_weight_l1i1 = default_chroma_weight;
9
}
10
gst-plugins-bad-1.20.4.tar.xz/gst-libs/gst/codecs/gsth265decoder.c -> gst-plugins-bad-1.20.5.tar.xz/gst-libs/gst/codecs/gsth265decoder.c
Changed
26
1
2
stRefPic =
3
&sps->short_term_ref_pic_setslice_hdr->short_term_ref_pic_set_idx;
4
5
- g_assert (stRefPic != NULL);
6
+ if (stRefPic == NULL)
7
+ return FALSE;
8
9
GST_LOG_OBJECT (self,
10
"NumDeltaPocs: %d, NumNegativePics: %d, NumPositivePics %d",
11
12
return GST_FLOW_OK;
13
}
14
15
- gst_h265_decoder_prepare_rps (self, &priv->current_slice,
16
- priv->current_picture);
17
+ if (!gst_h265_decoder_prepare_rps (self, &priv->current_slice,
18
+ priv->current_picture)) {
19
+ GST_WARNING_OBJECT (self, "Failed to prepare ref pic set");
20
+ gst_h265_picture_clear (&priv->current_picture);
21
+ return GST_FLOW_ERROR;
22
+ }
23
24
ret = gst_h265_decoder_dpb_init (self,
25
&priv->current_slice, priv->current_picture);
26
gst-plugins-bad-1.20.4.tar.xz/gst-libs/gst/mpegts/gstmpegtsdescriptor.c -> gst-plugins-bad-1.20.5.tar.xz/gst-libs/gst/mpegts/gstmpegtsdescriptor.c
Changed
20
1
2
dvb_text_from_utf8 (const gchar * text, gsize * out_size)
3
{
4
GError *error = NULL;
5
- gchar *out_text;
6
+ gchar *out_text = NULL;
7
guint8 *out_buffer;
8
guint encoding;
9
GIConv giconv = (GIConv) - 1;
10
11
/* We test character maps one-by-one. Start with the default */
12
encoding = _ICONV_ISO6937;
13
giconv = _get_iconv (_ICONV_UTF8, encoding);
14
- out_text = g_convert_with_iconv (text, -1, giconv, NULL, out_size, &error);
15
+ if (giconv != (GIConv) - 1)
16
+ out_text = g_convert_with_iconv (text, -1, giconv, NULL, out_size, &error);
17
18
if (out_text) {
19
GST_DEBUG ("Using default ISO6937 encoding");
20
gst-plugins-bad-1.20.4.tar.xz/gst-libs/gst/vulkan/cocoa/gstvkcocoa_utils.h -> gst-plugins-bad-1.20.5.tar.xz/gst-libs/gst/vulkan/cocoa/gstvkcocoa_utils.h
Changed
10
1
2
typedef void (*GstVulkanWindowFunc) (gpointer data);
3
4
G_GNUC_INTERNAL
5
-void _invoke_on_main (GstVulkanWindowFunc func, gpointer data, GDestroyNotify notify);
6
+void _gst_vk_invoke_on_main (GstVulkanWindowFunc func, gpointer data, GDestroyNotify notify);
7
8
G_END_DECLS
9
10
gst-plugins-bad-1.20.4.tar.xz/gst-libs/gst/vulkan/cocoa/gstvkwindow_cocoa.m -> gst-plugins-bad-1.20.5.tar.xz/gst-libs/gst/vulkan/cocoa/gstvkwindow_cocoa.m
Changed
41
1
2
GstVulkanWindowCocoaPrivate *priv = GET_PRIV (window_cocoa);
3
4
if (!priv->visible)
5
- _invoke_on_main ((GstVulkanWindowFunc) _show_window, gst_object_ref (window),
6
- (GDestroyNotify) gst_object_unref);
7
+ _gst_vk_invoke_on_main ((GstVulkanWindowFunc) _show_window,
8
+ gst_object_ref (window), (GDestroyNotify) gst_object_unref);
9
}
10
11
static void
12
13
gboolean
14
gst_vulkan_window_cocoa_create_window (GstVulkanWindowCocoa * window_cocoa)
15
{
16
- _invoke_on_main ((GstVulkanWindowFunc) _create_window,
17
+ _gst_vk_invoke_on_main ((GstVulkanWindowFunc) _create_window,
18
gst_object_ref (window_cocoa), gst_object_unref);
19
20
g_usleep(1000000);
21
22
static void
23
gst_vulkan_window_cocoa_close (GstVulkanWindow * window)
24
{
25
- _invoke_on_main ((GstVulkanWindowFunc) _close_window, gst_object_ref (window),
26
- (GDestroyNotify) gst_object_unref);
27
+ _gst_vk_invoke_on_main ((GstVulkanWindowFunc) _close_window,
28
+ gst_object_ref (window), (GDestroyNotify) gst_object_unref);
29
30
GST_VULKAN_WINDOW_CLASS (parent_class)->close (window);
31
}
32
33
@end
34
35
void
36
-_invoke_on_main (GstVulkanWindowFunc func, gpointer data, GDestroyNotify notify)
37
+_gst_vk_invoke_on_main (GstVulkanWindowFunc func, gpointer data, GDestroyNotify notify)
38
{
39
if (NSThread isMainThread) {
40
func (data);
41
gst-plugins-bad-1.20.4.tar.xz/gst-libs/gst/vulkan/ios/gstvkios_utils.h -> gst-plugins-bad-1.20.5.tar.xz/gst-libs/gst/vulkan/ios/gstvkios_utils.h
Changed
10
1
2
typedef void (*GstVulkanWindowFunc) (gpointer data);
3
4
G_GNUC_INTERNAL
5
-void _invoke_on_main (GstVulkanWindowFunc func, gpointer data, GDestroyNotify notify);
6
+void _gst_vk_invoke_on_main (GstVulkanWindowFunc func, gpointer data, GDestroyNotify notify);
7
8
G_END_DECLS
9
10
gst-plugins-bad-1.20.4.tar.xz/gst-libs/gst/vulkan/ios/gstvkwindow_ios.m -> gst-plugins-bad-1.20.5.tar.xz/gst-libs/gst/vulkan/ios/gstvkwindow_ios.m
Changed
19
1
2
return FALSE;
3
}
4
5
- _invoke_on_main ((GstVulkanWindowFunc) _create_window,
6
+ _gst_vk_invoke_on_main ((GstVulkanWindowFunc) _create_window,
7
gst_object_ref (window_ios), gst_object_unref);
8
9
/* XXX: Maybe we need an async create_window/get_surface()? */
10
11
@end
12
13
void
14
-_invoke_on_main (GstVulkanWindowFunc func, gpointer data, GDestroyNotify notify)
15
+_gst_vk_invoke_on_main (GstVulkanWindowFunc func, gpointer data, GDestroyNotify notify)
16
{
17
if (NSThread isMainThread) {
18
func (data);
19
gst-plugins-bad-1.20.4.tar.xz/gst-plugins-bad.doap -> gst-plugins-bad-1.20.5.tar.xz/gst-plugins-bad.doap
Changed
18
1
2
3
<release>
4
<Version>
5
+ <revision>1.20.5</revision>
6
+ <branch>1.20</branch>
7
+ <name></name>
8
+ <created>2022-12-19</created>
9
+ <file-release rdf:resource="https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.20.5.tar.xz" />
10
+ </Version>
11
+ </release>
12
+
13
+ <release>
14
+ <Version>
15
<revision>1.20.4</revision>
16
<branch>1.20</branch>
17
<name></name>
18
gst-plugins-bad-1.20.4.tar.xz/gst/codecalpha/gstalphacombine.c -> gst-plugins-bad-1.20.5.tar.xz/gst/codecalpha/gstalphacombine.c
Changed
29
1
2
return TRUE;
3
}
4
5
+static void
6
+gst_alpha_combine_handle_gap (GstAlphaCombine * self)
7
+{
8
+ GstBuffer *gap_buffer = gst_buffer_new ();
9
+ GST_BUFFER_FLAG_SET (gap_buffer, GST_BUFFER_FLAG_GAP);
10
+ gst_alpha_combine_push_alpha_buffer (self, gap_buffer);
11
+}
12
+
13
static gboolean
14
gst_alpha_combine_sink_event (GstPad * pad, GstObject * object,
15
GstEvent * event)
16
17
GstCaps *caps;
18
gst_event_parse_caps (event, &caps);
19
gst_alpha_combine_set_alpha_format (self, caps);
20
+ break;
21
+ }
22
+ case GST_EVENT_GAP:
23
+ {
24
+ gst_alpha_combine_handle_gap (self);
25
+ break;
26
}
27
default:
28
break;
29
gst-plugins-bad-1.20.4.tar.xz/gst/dvbsubenc/gstdvbsubenc-util.c -> gst-plugins-bad-1.20.5.tar.xz/gst/dvbsubenc/gstdvbsubenc-util.c
Changed
51
1
2
gst_byte_writer_set_pos (b, pos);
3
}
4
5
+static void
6
+dvbenc_write_display_definition_segment (GstByteWriter * b, int object_version,
7
+ int page_id, guint16 width, guint16 height)
8
+{
9
+ guint seg_size_pos, pos;
10
+
11
+ gst_byte_writer_put_uint8 (b, DVB_SEGMENT_SYNC_BYTE);
12
+ gst_byte_writer_put_uint8 (b, DVB_SEGMENT_TYPE_DISPLAY_DEFINITION);
13
+ gst_byte_writer_put_uint16_be (b, page_id);
14
+
15
+ /* Size placeholder */
16
+ seg_size_pos = gst_byte_writer_get_pos (b);
17
+ gst_byte_writer_put_uint16_be (b, 0);
18
+
19
+ /* version number, display window flag, reserved bits */
20
+ gst_byte_writer_put_uint8 (b, (object_version << 4) | (0 << 3) | 0x07);
21
+ gst_byte_writer_put_uint16_be (b, width);
22
+ gst_byte_writer_put_uint16_be (b, height);
23
+
24
+ /* Re-write the size field */
25
+ pos = gst_byte_writer_get_pos (b);
26
+ gst_byte_writer_set_pos (b, seg_size_pos);
27
+ gst_byte_writer_put_uint16_be (b, pos - (seg_size_pos + 2));
28
+ gst_byte_writer_set_pos (b, pos);
29
+}
30
+
31
GstBuffer *
32
-gst_dvbenc_encode (int object_version, int page_id, SubpictureRect * s,
33
- guint num_subpictures)
34
+gst_dvbenc_encode (int object_version, int page_id, int display_version,
35
+ guint16 width, guint16 height, SubpictureRect * s, guint num_subpictures)
36
{
37
GstByteWriter b;
38
guint seg_size_pos, pos;
39
40
* 0x20 0x00 prefixed */
41
gst_byte_writer_put_uint16_be (&b, 0x2000);
42
43
+ /* If non-default width/height are used, write a display definiton segment */
44
+ if (width != 720 || height != 576)
45
+ dvbenc_write_display_definition_segment (&b, display_version, page_id,
46
+ width, height);
47
+
48
/* Page Composition Segment */
49
gst_byte_writer_put_uint8 (&b, DVB_SEGMENT_SYNC_BYTE);
50
gst_byte_writer_put_uint8 (&b, DVB_SEGMENT_TYPE_PAGE_COMPOSITION);
51
gst-plugins-bad-1.20.4.tar.xz/gst/dvbsubenc/gstdvbsubenc.c -> gst-plugins-bad-1.20.5.tar.xz/gst/dvbsubenc/gstdvbsubenc.c
Changed
114
1
2
s.x = left;
3
s.y = top;
4
5
- packet = gst_dvbenc_encode (enc->object_version & 0xF, 1, &s, 1);
6
+ packet =
7
+ gst_dvbenc_encode (enc->object_version & 0xF, 1, enc->display_version,
8
+ enc->in_info.width, enc->in_info.height, &s, 1);
9
if (packet == NULL) {
10
gst_video_frame_unmap (&ayuv8p_frame);
11
goto fail;
12
13
GST_DEBUG_OBJECT (enc, "Outputting end of page at TS %" GST_TIME_FORMAT,
14
GST_TIME_ARGS (enc->current_end_time));
15
16
- packet = gst_dvbenc_encode (enc->object_version & 0xF, 1, NULL, 0);
17
+ packet =
18
+ gst_dvbenc_encode (enc->object_version & 0xF, 1, enc->display_version,
19
+ enc->in_info.width, enc->in_info.height, NULL, 0);
20
if (packet == NULL) {
21
GST_ELEMENT_ERROR (enc, STREAM, FAILED,
22
("Internal data stream error."),
23
24
{
25
GstDvbSubEnc *enc = GST_DVB_SUB_ENC (gst_pad_get_parent (pad));
26
gboolean ret = FALSE;
27
+ GstVideoInfo in_info;
28
GstCaps *out_caps = NULL;
29
30
GST_DEBUG_OBJECT (enc, "setcaps called with %" GST_PTR_FORMAT, caps);
31
- if (!gst_video_info_from_caps (&enc->in_info, caps)) {
32
+ if (!gst_video_info_from_caps (&in_info, caps)) {
33
GST_ERROR_OBJECT (enc, "Failed to parse input caps");
34
return FALSE;
35
}
36
37
- out_caps = gst_caps_new_simple ("subpicture/x-dvb",
38
- "width", G_TYPE_INT, enc->in_info.width,
39
- "height", G_TYPE_INT, enc->in_info.height,
40
- "framerate", GST_TYPE_FRACTION, enc->in_info.fps_n, enc->in_info.fps_d,
41
- NULL);
42
+ if (!enc->in_info.finfo || !gst_video_info_is_equal (&in_info, &enc->in_info)) {
43
+ enc->in_info = in_info;
44
+ enc->display_version++;
45
+
46
+ out_caps = gst_caps_new_simple ("subpicture/x-dvb",
47
+ "width", G_TYPE_INT, enc->in_info.width,
48
+ "height", G_TYPE_INT, enc->in_info.height,
49
+ "framerate", GST_TYPE_FRACTION, enc->in_info.fps_n, enc->in_info.fps_d,
50
+ NULL);
51
+
52
+ if (!gst_pad_set_caps (enc->srcpad, out_caps)) {
53
+ GST_WARNING_OBJECT (enc, "failed setting downstream caps");
54
+ gst_caps_unref (out_caps);
55
+ goto beach;
56
+ }
57
58
- if (!gst_pad_set_caps (enc->srcpad, out_caps)) {
59
- GST_WARNING_OBJECT (enc, "failed setting downstream caps");
60
gst_caps_unref (out_caps);
61
- goto beach;
62
}
63
64
- gst_caps_unref (out_caps);
65
ret = TRUE;
66
67
beach:
68
69
}
70
case GST_EVENT_GAP:
71
{
72
- GstClockTime start, duration;
73
-
74
- gst_event_parse_gap (event, &start, &duration);
75
- if (GST_CLOCK_TIME_IS_VALID (start)) {
76
- if (GST_CLOCK_TIME_IS_VALID (duration))
77
- start += duration;
78
- /* we do not expect another buffer until after gap,
79
- * so that is our position now */
80
- GST_DEBUG_OBJECT (enc,
81
- "Got GAP event, advancing time to %" GST_TIME_FORMAT,
82
- GST_TIME_ARGS (start));
83
- gst_dvb_sub_enc_generate_end_packet (enc, start);
84
+ if (!GST_CLOCK_TIME_IS_VALID (enc->current_end_time)) {
85
+ ret = gst_pad_event_default (pad, parent, event);
86
} else {
87
- GST_WARNING_OBJECT (enc, "Got GAP event with invalid position");
88
+ GstClockTime start, duration;
89
+
90
+ gst_event_parse_gap (event, &start, &duration);
91
+
92
+ if (GST_CLOCK_TIME_IS_VALID (start)) {
93
+ if (GST_CLOCK_TIME_IS_VALID (duration))
94
+ start += duration;
95
+ /* we do not expect another buffer until after gap,
96
+ * so that is our position now */
97
+ GST_DEBUG_OBJECT (enc,
98
+ "Got GAP event, advancing time to %" GST_TIME_FORMAT,
99
+ GST_TIME_ARGS (start));
100
+ gst_dvb_sub_enc_generate_end_packet (enc, start);
101
+ } else {
102
+ GST_WARNING_OBJECT (enc, "Got GAP event with invalid position");
103
+ }
104
+
105
+ gst_event_unref (event);
106
+ ret = TRUE;
107
}
108
-
109
- gst_event_unref (event);
110
- ret = TRUE;
111
break;
112
}
113
case GST_EVENT_SEGMENT:
114
gst-plugins-bad-1.20.4.tar.xz/gst/dvbsubenc/gstdvbsubenc.h -> gst-plugins-bad-1.20.5.tar.xz/gst/dvbsubenc/gstdvbsubenc.h
Changed
15
1
2
GstElement element;
3
4
GstVideoInfo in_info;
5
+ int display_version;
6
GstPad *sinkpad;
7
GstPad *srcpad;
8
9
10
11
gboolean gst_dvbsubenc_ayuv_to_ayuv8p (GstVideoFrame * src, GstVideoFrame * dest, int max_colours, guint32 *out_num_colours);
12
13
-GstBuffer *gst_dvbenc_encode (int object_version, int page_id, SubpictureRect *s, guint num_subpictures);
14
+GstBuffer *gst_dvbenc_encode (int object_version, int page_id, int display_version, guint16 width, guint16 height, SubpictureRect *s, guint num_subpictures);
15
gst-plugins-bad-1.20.4.tar.xz/gst/mpegtsdemux/mpegtsbase.c -> gst-plugins-bad-1.20.5.tar.xz/gst/mpegtsdemux/mpegtsbase.c
Changed
50
1
2
if (G_UNLIKELY (old_program == NULL))
3
goto no_program;
4
5
+ if (G_UNLIKELY (mpegts_base_is_same_program (base, old_program, section->pid,
6
+ pmt)))
7
+ goto same_program;
8
+
9
if (base->streams_aware
10
&& mpegts_base_is_program_update (base, old_program, section->pid, pmt)) {
11
GST_FIXME ("We are streams_aware and new program is an update");
12
13
goto beach;
14
}
15
16
- if (G_UNLIKELY (mpegts_base_is_same_program (base, old_program, section->pid,
17
- pmt)))
18
- goto same_program;
19
-
20
/* If the current program is active, this means we have a new program */
21
if (old_program->active) {
22
MpegTSBaseClass *klass = GST_MPEGTS_BASE_GET_CLASS (base);
23
24
return res;
25
26
mpegts_base_flush (base, FALSE);
27
- /* In the case of discontinuities in push-mode with TIME segment
28
- * we want to drop all previous observations (hard:TRUE) from
29
- * the packetizer */
30
- if (base->mode == BASE_MODE_PUSHING
31
- && base->segment.format == GST_FORMAT_TIME) {
32
- mpegts_packetizer_flush (base->packetizer, TRUE);
33
+ if (base->mode == BASE_MODE_PUSHING) {
34
+ if (base->segment.format == GST_FORMAT_TIME) {
35
+ /* In the case of discontinuities in push-mode with TIME segment
36
+ * we want to drop all previous observations (hard:TRUE) from
37
+ * the packetizer */
38
+ mpegts_packetizer_flush (base->packetizer, TRUE);
39
+ }
40
+ /* In all cases, we clear observations when we get a discontinuity in
41
+ * push-mode to re-check if the sections (PAT/PMT) changed or not */
42
mpegts_packetizer_clear (base->packetizer);
43
- } else
44
+ } else {
45
mpegts_packetizer_flush (base->packetizer, FALSE);
46
+ }
47
}
48
49
mpegts_packetizer_push (base->packetizer, buf);
50
gst-plugins-bad-1.20.4.tar.xz/gst/mpegtsdemux/mpegtspacketizer.c -> gst-plugins-bad-1.20.5.tar.xz/gst/mpegtsdemux/mpegtspacketizer.c
Changed
99
1
2
static gboolean
3
seen_section_before (MpegTSPacketizerStream * stream, guint8 table_id,
4
guint16 subtable_extension, guint8 version_number, guint8 section_number,
5
- guint8 last_section_number, guint8 * data_start, gsize to_read)
6
+ guint8 last_section_number)
7
{
8
MpegTSPacketizerStreamSubtable *subtable;
9
10
11
return FALSE;
12
}
13
/* Finally return whether we saw that section or not */
14
- if (!MPEGTS_BIT_IS_SET (subtable->seen_section, section_number)) {
15
- GST_DEBUG ("Different section_number");
16
- return FALSE;
17
- }
18
-
19
- if (stream->section_data) {
20
- /* Everything else is the same, fall back to memcmp */
21
- return (memcmp (stream->section_data, data_start, to_read) != 0);
22
- }
23
-
24
- return FALSE;
25
+ return MPEGTS_BIT_IS_SET (subtable->seen_section, section_number);
26
}
27
28
static MpegTSPacketizerStreamSubtable *
29
30
guint8 packet_cc;
31
GList *others = NULL;
32
guint8 version_number, section_number, last_section_number;
33
+ gboolean cc_discont = FALSE;
34
35
data = packet->data;
36
packet_cc = FLAGS_CONTINUITY_COUNTER (packet->scram_afc_cc);
37
38
*
39
**/
40
41
- if (packet->payload_unit_start_indicator) {
42
+ if (packet->payload_unit_start_indicator)
43
pointer = *data++;
44
- /* If the pointer is zero, we're guaranteed to be able to handle it */
45
- if (pointer == 0) {
46
- GST_LOG
47
- ("PID 0x%04x PUSI and pointer == 0, skipping straight to section_start parsing",
48
- packet->pid);
49
- mpegts_packetizer_clear_section (stream);
50
- goto section_start;
51
- }
52
- }
53
54
if (stream->continuity_counter == CONTINUITY_UNSET ||
55
(stream->continuity_counter + 1) % 16 != packet_cc) {
56
- if (stream->continuity_counter != CONTINUITY_UNSET)
57
+ if (stream->continuity_counter != CONTINUITY_UNSET) {
58
GST_WARNING ("PID 0x%04x section discontinuity (%d vs %d)", packet->pid,
59
stream->continuity_counter, packet_cc);
60
+ cc_discont = TRUE;
61
+ }
62
mpegts_packetizer_clear_section (stream);
63
+ stream->continuity_counter = packet_cc;
64
/* If not a PUSI, not much we can do */
65
if (!packet->payload_unit_start_indicator) {
66
GST_LOG ("PID 0x%04x continuity discont/unset and not PUSI, bailing out",
67
68
goto section_start;
69
}
70
71
+ if (packet->payload_unit_start_indicator && pointer == 0) {
72
+ /* If the pointer is zero, we're guaranteed to be able to handle it */
73
+ GST_LOG
74
+ ("PID 0x%04x PUSI and pointer == 0, skipping straight to section_start parsing",
75
+ packet->pid);
76
+ mpegts_packetizer_clear_section (stream);
77
+ stream->continuity_counter = packet_cc;
78
+ goto section_start;
79
+ }
80
+
81
+ stream->continuity_counter = packet_cc;
82
+
83
+
84
GST_LOG ("Accumulating data from beginning of packet");
85
86
data_start = data;
87
88
* * same last_section_number
89
* * same section_number was seen
90
*/
91
- if (seen_section_before (stream, table_id, subtable_extension,
92
- version_number, section_number, last_section_number, data_start,
93
- to_read)) {
94
+ if (!cc_discont && seen_section_before (stream, table_id, subtable_extension,
95
+ version_number, section_number, last_section_number)) {
96
GST_DEBUG
97
("PID 0x%04x Already processed table_id:0x%02x subtable_extension:0x%04x, version_number:%d, section_number:%d",
98
packet->pid, table_id, subtable_extension, version_number,
99
gst-plugins-bad-1.20.4.tar.xz/gst/rtmp2/gstrtmp2sink.c -> gst-plugins-bad-1.20.5.tar.xz/gst/rtmp2/gstrtmp2sink.c
Changed
72
1
2
g_cond_wait (&self->cond, &self->lock);
3
}
4
5
- if (G_UNLIKELY (!is_running (self))) {
6
- gst_buffer_unref (message);
7
- ret = GST_FLOW_FLUSHING;
8
- } else if (G_UNLIKELY (!self->connection)) {
9
+ if (G_UNLIKELY (!self->connection)) {
10
gst_buffer_unref (message);
11
/* send_connect_error has sent an ERROR message */
12
ret = GST_FLOW_ERROR;
13
+ } else if (G_UNLIKELY (!is_running (self))) {
14
+ gst_buffer_unref (message);
15
+ ret = GST_FLOW_FLUSHING;
16
} else {
17
send_streamheader (self);
18
send_message (self, message);
19
20
}
21
22
static void
23
-error_callback (GstRtmpConnection * connection, GstRtmp2Sink * self)
24
+error_callback (GstRtmpConnection * connection, const GError * error,
25
+ GstRtmp2Sink * self)
26
{
27
g_mutex_lock (&self->lock);
28
if (self->cancellable) {
29
g_cancellable_cancel (self->cancellable);
30
} else if (self->loop) {
31
- GST_ELEMENT_ERROR (self, RESOURCE, WRITE, ("Connection error"), (NULL));
32
+ GST_ELEMENT_ERROR (self, RESOURCE, WRITE,
33
+ ("Connection error: %s", error->message),
34
+ ("domain %s, code %d", g_quark_to_string (error->domain), error->code));
35
stop_task (self);
36
}
37
g_mutex_unlock (&self->lock);
38
39
}
40
41
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
42
- GST_DEBUG_OBJECT (self, "Connection was cancelled (%s)",
43
- GST_STR_NULL (error->message));
44
+ GST_DEBUG_OBJECT (self, "Connection was cancelled: %s", error->message);
45
return;
46
}
47
48
- GST_ERROR_OBJECT (self, "Failed to connect (%s:%d): %s",
49
- g_quark_to_string (error->domain), error->code,
50
- GST_STR_NULL (error->message));
51
+ GST_ERROR_OBJECT (self, "Failed to connect: %s %d %s",
52
+ g_quark_to_string (error->domain), error->code, error->message);
53
54
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED)) {
55
GST_ELEMENT_ERROR (self, RESOURCE, NOT_AUTHORIZED,
56
- ("Not authorized to connect"), ("%s", GST_STR_NULL (error->message)));
57
+ ("Not authorized to connect: %s", error->message), (NULL));
58
} else if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CONNECTION_REFUSED)) {
59
GST_ELEMENT_ERROR (self, RESOURCE, OPEN_READ,
60
- ("Could not connect"), ("%s", GST_STR_NULL (error->message)));
61
+ ("Connection refused: %s", error->message), (NULL));
62
} else {
63
GST_ELEMENT_ERROR (self, RESOURCE, FAILED,
64
- ("Failed to connect"),
65
- ("error %s:%d: %s", g_quark_to_string (error->domain), error->code,
66
- GST_STR_NULL (error->message)));
67
+ ("Failed to connect: %s", error->message),
68
+ ("domain %s, code %d", g_quark_to_string (error->domain), error->code));
69
}
70
}
71
72
gst-plugins-bad-1.20.4.tar.xz/gst/rtmp2/gstrtmp2src.c -> gst-plugins-bad-1.20.5.tar.xz/gst/rtmp2/gstrtmp2src.c
Changed
53
1
2
}
3
4
static void
5
-error_callback (GstRtmpConnection * connection, GstRtmp2Src * self)
6
+error_callback (GstRtmpConnection * connection, const GError * error,
7
+ GstRtmp2Src * self)
8
{
9
g_mutex_lock (&self->lock);
10
if (self->cancellable) {
11
g_cancellable_cancel (self->cancellable);
12
} else if (self->loop) {
13
- GST_INFO_OBJECT (self, "Connection error");
14
+ GST_INFO_OBJECT (self, "Connection error: %s %d %s",
15
+ g_quark_to_string (error->domain), error->code, error->message);
16
stop_task (self);
17
}
18
g_mutex_unlock (&self->lock);
19
20
}
21
22
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
23
- GST_DEBUG_OBJECT (self, "Connection was cancelled (%s)",
24
- GST_STR_NULL (error->message));
25
+ GST_DEBUG_OBJECT (self, "Connection was cancelled: %s", error->message);
26
return;
27
}
28
29
- GST_ERROR_OBJECT (self, "Failed to connect (%s:%d): %s",
30
- g_quark_to_string (error->domain), error->code,
31
- GST_STR_NULL (error->message));
32
+ GST_ERROR_OBJECT (self, "Failed to connect: %s %d %s",
33
+ g_quark_to_string (error->domain), error->code, error->message);
34
35
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED)) {
36
GST_ELEMENT_ERROR (self, RESOURCE, NOT_AUTHORIZED,
37
- ("Not authorized to connect"), ("%s", GST_STR_NULL (error->message)));
38
+ ("Not authorized to connect: %s", error->message), (NULL));
39
} else if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CONNECTION_REFUSED)) {
40
GST_ELEMENT_ERROR (self, RESOURCE, OPEN_READ,
41
- ("Could not connect"), ("%s", GST_STR_NULL (error->message)));
42
+ ("Connection refused: %s", error->message), (NULL));
43
} else {
44
GST_ELEMENT_ERROR (self, RESOURCE, FAILED,
45
- ("Failed to connect"),
46
- ("error %s:%d: %s", g_quark_to_string (error->domain), error->code,
47
- GST_STR_NULL (error->message)));
48
+ ("Failed to connect: %s", error->message),
49
+ ("domain %s, code %d", g_quark_to_string (error->domain), error->code));
50
}
51
}
52
53
gst-plugins-bad-1.20.4.tar.xz/gst/rtmp2/rtmp/rtmpclient.c -> gst-plugins-bad-1.20.5.tar.xz/gst/rtmp2/rtmp/rtmpclient.c
Changed
264
1
2
static void send_secure_token_response (GTask * task,
3
GstRtmpConnection * connection, const gchar * challenge);
4
static void connection_error (GstRtmpConnection * connection,
5
- gpointer user_data);
6
+ const GError * error, gpointer user_data);
7
8
#define DEFAULT_TIMEOUT 5
9
10
11
}
12
13
static void
14
-connection_error (GstRtmpConnection * connection, gpointer user_data)
15
+connection_error (GstRtmpConnection * connection, const GError * error,
16
+ gpointer user_data)
17
{
18
GTask *task = user_data;
19
+
20
if (!g_task_had_error (task))
21
- g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED,
22
- "error during connection attempt");
23
+ g_task_return_error (task, g_error_copy (error));
24
}
25
26
static gchar *
27
28
29
if (!args) {
30
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED,
31
- "connect failed: %s", command_name);
32
+ "'connect' cmd failed: %s", command_name);
33
g_object_unref (task);
34
return;
35
}
36
37
if (args->len < 2) {
38
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED,
39
- "connect failed; not enough return arguments");
40
+ "'connect' cmd failed; not enough return arguments");
41
g_object_unref (task);
42
return;
43
}
44
45
optional_args = g_ptr_array_index (args, 1);
46
47
node = gst_amf_node_get_field (optional_args, "code");
48
- if (!node) {
49
+ code = node ? gst_amf_node_peek_string (node, NULL) : NULL;
50
+ if (!code) {
51
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED,
52
- "result code missing from connect cmd result");
53
+ "'connect' cmd failed; no status code");
54
g_object_unref (task);
55
return;
56
}
57
58
- code = gst_amf_node_peek_string (node, NULL);
59
- GST_INFO ("connect result: %s", GST_STR_NULL (code));
60
+ GST_INFO ("connect result: %s", code);
61
62
if (g_str_equal (code, "NetConnection.Connect.Success")) {
63
node = gst_amf_node_get_field (optional_args, "secureToken");
64
65
GstUri *query;
66
67
node = gst_amf_node_get_field (optional_args, "description");
68
- if (!node) {
69
+ desc = node ? gst_amf_node_peek_string (node, NULL) : NULL;
70
+ if (!desc) {
71
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
72
- "Connect rejected; no description");
73
+ "'connect' cmd returned '%s'; no description", code);
74
g_object_unref (task);
75
return;
76
}
77
78
- desc = gst_amf_node_peek_string (node, NULL);
79
- GST_DEBUG ("connect result desc: %s", GST_STR_NULL (desc));
80
+ GST_DEBUG ("connect result desc: %s", desc);
81
82
if (authmod == GST_RTMP_AUTHMOD_AUTO && strstr (desc, "code=403 need auth")) {
83
if (strstr (desc, "authmod=adobe")) {
84
85
}
86
87
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
88
- "unhandled authentication mode: %s", desc);
89
+ "'connect' cmd returned unhandled authmod: %s", desc);
90
g_object_unref (task);
91
return;
92
}
93
94
if (!g_regex_match (auth_regex, desc, 0, &match_info)) {
95
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
96
- "failed to parse auth rejection: %s", desc);
97
+ "'connect' cmd returned '%s': %s", code, desc);
98
g_object_unref (task);
99
return;
100
}
101
102
{
103
const gchar *reason = gst_uri_get_query_value (query, "reason");
104
105
+ if (!reason) {
106
+ g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
107
+ "authentication failed; no reason: %s", desc);
108
+ g_object_unref (task);
109
+ gst_uri_unref (query);
110
+ return;
111
+ }
112
+
113
if (g_str_equal (reason, "authfailed")) {
114
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
115
- "authentication failed! wrong credentials?");
116
+ "authentication failed; wrong credentials?: %s", desc);
117
g_object_unref (task);
118
gst_uri_unref (query);
119
return;
120
121
122
if (!g_str_equal (reason, "needauth")) {
123
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
124
- "unhandled rejection reason '%s'", reason ? reason : "");
125
+ "authentication failed; reason '%s': %s", reason, desc);
126
g_object_unref (task);
127
gst_uri_unref (query);
128
return;
129
}
130
}
131
132
- g_warn_if_fail (!data->auth_query);
133
- data->auth_query = do_adobe_auth (data->location.username,
134
- data->location.password, gst_uri_get_query_value (query, "salt"),
135
- gst_uri_get_query_value (query, "opaque"),
136
- gst_uri_get_query_value (query, "challenge"));
137
+ {
138
+ const gchar *salt, *opaque, *challenge;
139
+
140
+ salt = gst_uri_get_query_value (query, "salt");
141
+ if (!salt) {
142
+ g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
143
+ "salt missing from auth request: %s", desc);
144
+ g_object_unref (task);
145
+ gst_uri_unref (query);
146
+ return;
147
+ }
148
+
149
+ opaque = gst_uri_get_query_value (query, "opaque");
150
+ challenge = gst_uri_get_query_value (query, "challenge");
151
+
152
+ g_warn_if_fail (!data->auth_query);
153
+ data->auth_query = do_adobe_auth (data->location.username,
154
+ data->location.password, salt, opaque, challenge);
155
+ }
156
157
gst_uri_unref (query);
158
159
if (!data->auth_query) {
160
+ /* do_adobe_auth should not fail; send_connect tests if username
161
+ * and password are provided */
162
+ g_warn_if_reached ();
163
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED,
164
- "couldn't generate adobe style authentication query");
165
+ "internal error: failed to generate adobe auth query");
166
g_object_unref (task);
167
return;
168
}
169
170
}
171
172
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED,
173
- "unhandled connect result code: %s", GST_STR_NULL (code));
174
+ "'connect' cmd returned '%s'", code);
175
g_object_unref (task);
176
}
177
178
179
180
if (!data->location.secure_token || !data->location.secure_token0) {
181
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
182
- "server requires secure token authentication");
183
+ "server requires secureToken but no token provided");
184
g_object_unref (task);
185
return;
186
}
187
188
189
if (!args) {
190
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED,
191
- "createStream failed: %s", command_name);
192
+ "'createStream' cmd failed: %s", command_name);
193
g_object_unref (task);
194
return;
195
}
196
197
if (args->len < 2) {
198
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED,
199
- "createStream failed; not enough return arguments");
200
+ "'createStream' cmd failed; not enough return arguments");
201
g_object_unref (task);
202
return;
203
}
204
205
gst_amf_node_dump (result, -1, error_dump);
206
207
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED,
208
- "createStream failed: %s", error_dump->str);
209
+ "'createStream' cmd failed: %s: %s", command_name, error_dump->str);
210
g_object_unref (task);
211
212
g_string_free (error_dump, TRUE);
213
214
215
if (data->id == 0) {
216
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_INVALID_DATA,
217
- "createStream returned ID 0");
218
+ "'createStream' cmd returned ID 0");
219
g_object_unref (task);
220
return;
221
}
222
223
224
if (!args) {
225
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED,
226
- "%s failed: %s", command, command_name);
227
+ "'%s' cmd failed: %s", command, command_name);
228
g_object_unref (task);
229
return;
230
}
231
232
if (args->len < 2) {
233
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED,
234
- "%s failed; not enough return arguments", command);
235
+ "'%s' cmd failed; not enough return arguments", command);
236
g_object_unref (task);
237
return;
238
}
239
240
241
if (g_strcmp0 (code, "NetStream.Publish.BadName") == 0) {
242
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_EXISTS,
243
- "publish denied: stream already exists: %s", info_dump->str);
244
+ "publish denied; stream already exists: %s", info_dump->str);
245
goto out;
246
}
247
248
249
250
if (g_strcmp0 (code, "NetStream.Play.StreamNotFound") == 0) {
251
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
252
- "play denied: stream not found: %s", info_dump->str);
253
+ "play denied; stream not found: %s", info_dump->str);
254
goto out;
255
}
256
}
257
258
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED,
259
- "unhandled %s result: %s", command, info_dump->str);
260
+ "'%s' cmd failed: %s: %s", command, command_name, info_dump->str);
261
262
out:
263
g_string_free (info_dump, TRUE);
264
gst-plugins-bad-1.20.4.tar.xz/gst/rtmp2/rtmp/rtmpconnection.c -> gst-plugins-bad-1.20.5.tar.xz/gst/rtmp2/rtmp/rtmpconnection.c
Changed
119
1
2
static void gst_rtmp_connection_finalize (GObject * object);
3
static void gst_rtmp_connection_set_cancellable (GstRtmpConnection * self,
4
GCancellable * cancellable);
5
-static void gst_rtmp_connection_emit_error (GstRtmpConnection * self);
6
+static void gst_rtmp_connection_emit_error (GstRtmpConnection * self,
7
+ GError * error);
8
static gboolean gst_rtmp_connection_input_ready (GInputStream * is,
9
gpointer user_data);
10
static void gst_rtmp_connection_start_write (GstRtmpConnection * self);
11
12
gobject_class->finalize = gst_rtmp_connection_finalize;
13
14
signalsSIGNAL_ERROR = g_signal_new ("error", G_TYPE_FROM_CLASS (klass),
15
- G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 0);
16
+ G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 1, G_TYPE_ERROR);
17
18
signalsSIGNAL_STREAM_CONTROL = g_signal_new ("stream-control",
19
G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL,
20
21
}
22
23
static void
24
-cancel_all_commands (GstRtmpConnection * self)
25
+cancel_all_commands (GstRtmpConnection * self, const gchar * reason)
26
{
27
GList *l;
28
29
30
Transaction *cc = l->data;
31
GST_LOG_OBJECT (self, "calling transaction callback %s",
32
GST_DEBUG_FUNCPTR_NAME (cc->func));
33
- cc->func ("<cancelled>", NULL, cc->user_data);
34
+ cc->func (reason, NULL, cc->user_data);
35
}
36
g_list_free_full (self->transactions, transaction_free);
37
self->transactions = NULL;
38
39
ExpectedCommand *cc = l->data;
40
GST_LOG_OBJECT (self, "calling expected command callback %s",
41
GST_DEBUG_FUNCPTR_NAME (cc->func));
42
- cc->func ("<cancelled>", NULL, cc->user_data);
43
+ cc->func (reason, NULL, cc->user_data);
44
}
45
g_list_free_full (self->expected_commands, expected_command_free);
46
self->expected_commands = NULL;
47
48
}
49
50
g_cancellable_cancel (self->cancellable);
51
- cancel_all_commands (self);
52
+ cancel_all_commands (self, "connection closed locally");
53
54
if (self->input_source) {
55
g_source_destroy (self->input_source);
56
57
sc->input_bytes->data + oldsize, READ_SIZE, sc->cancellable, &error);
58
g_byte_array_set_size (sc->input_bytes, oldsize + (ret > 0 ? ret : 0));
59
60
+ if (ret == 0) {
61
+ error = g_error_new (G_IO_ERROR, G_IO_ERROR_CONNECTION_CLOSED,
62
+ "connection closed remotely");
63
+ ret = -1;
64
+ }
65
+
66
if (ret < 0) {
67
gint code = error->code;
68
69
70
71
GST_ERROR_OBJECT (sc, "read error: %s %d %s",
72
g_quark_to_string (error->domain), code, error->message);
73
- g_error_free (error);
74
- } else if (ret == 0) {
75
- GST_INFO_OBJECT (sc, "read EOF");
76
- }
77
78
- if (ret <= 0) {
79
- gst_rtmp_connection_emit_error (sc);
80
+ gst_rtmp_connection_emit_error (sc, error);
81
return G_SOURCE_REMOVE;
82
}
83
84
85
}
86
87
static void
88
-gst_rtmp_connection_emit_error (GstRtmpConnection * self)
89
+gst_rtmp_connection_emit_error (GstRtmpConnection * self, GError * error)
90
{
91
- if (self->error) {
92
- return;
93
+ if (!self->error) {
94
+ self->error = TRUE;
95
+ cancel_all_commands (self, error->message);
96
+ g_signal_emit (self, signalsSIGNAL_ERROR, 0, error);
97
}
98
99
- GST_INFO_OBJECT (self, "connection error");
100
- self->error = TRUE;
101
-
102
- cancel_all_commands (self);
103
-
104
- g_signal_emit (self, signalsSIGNAL_ERROR, 0);
105
+ g_error_free (error);
106
}
107
108
static void
109
110
"write error: %s (wrote %" G_GSIZE_FORMAT " bytes)",
111
error->message, bytes_written);
112
}
113
- gst_rtmp_connection_emit_error (self);
114
- g_error_free (error);
115
+ gst_rtmp_connection_emit_error (self, error);
116
g_object_unref (self);
117
return;
118
}
119
gst-plugins-bad-1.20.4.tar.xz/meson.build -> gst-plugins-bad-1.20.5.tar.xz/meson.build
Changed
8
1
2
project('gst-plugins-bad', 'c', 'cpp',
3
- version : '1.20.4',
4
+ version : '1.20.5',
5
meson_version : '>= 0.59',
6
default_options : 'warning_level=1',
7
'buildtype=debugoptimized' )
8
gst-plugins-bad-1.20.4.tar.xz/po/gst-plugins-bad-1.0.pot -> gst-plugins-bad-1.20.5.tar.xz/po/gst-plugins-bad-1.0.pot
Changed
19
1
2
msgstr ""
3
"Project-Id-Version: gst-plugins-bad-1.0\n"
4
"Report-Msgid-Bugs-To: \n"
5
-"POT-Creation-Date: 2022-10-12 16:40+0100\n"
6
+"POT-Creation-Date: 2022-12-19 23:38+0000\n"
7
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9
"Language-Team: LANGUAGE <LL@li.org>\n"
10
11
msgstr ""
12
13
#: gst-libs/gst/adaptivedemux/gstadaptivedemux.c:4102
14
-#: gst/mpegtsdemux/mpegtsbase.c:1757
15
+#: gst/mpegtsdemux/mpegtsbase.c:1761
16
msgid "Internal data stream error."
17
msgstr ""
18
19
gst-plugins-bad-1.20.4.tar.xz/sys/applemedia/avfdeviceprovider.m -> gst-plugins-bad-1.20.5.tar.xz/sys/applemedia/avfdeviceprovider.m
Changed
18
1
2
"avf.has_torch", G_TYPE_BOOLEAN, device hasTorch,
3
NULL);
4
5
+ g_free (unique_id);
6
+ g_free (model_id);
7
+
8
#if !HAVE_IOS
9
char *manufacturer = g_strdup (device manufacturer UTF8String);
10
gst_structure_set (props,
11
"avf.manufacturer", G_TYPE_STRING, manufacturer,
12
NULL);
13
+
14
+ g_free (manufacturer);
15
#endif
16
17
return props;
18
gst-plugins-bad-1.20.4.tar.xz/sys/applemedia/avfvideosrc.m -> gst-plugins-bad-1.20.5.tar.xz/sys/applemedia/avfvideosrc.m
Changed
10
1
2
BOOL result = NO;
3
4
if (GST_QUERY_TYPE (query) == GST_QUERY_LATENCY) {
5
- if (device != nil && caps != NULL) {
6
+ if (input != nil && caps != NULL) {
7
GstClockTime min_latency, max_latency;
8
9
min_latency = max_latency = latency;
10
gst-plugins-bad-1.20.4.tar.xz/sys/d3d11/gstd3d11screencapturedevice.cpp -> gst-plugins-bad-1.20.5.tar.xz/sys/d3d11/gstd3d11screencapturedevice.cpp
Changed
12
1
2
3
static GstStaticCaps template_caps =
4
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
5
- (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, "BGRA") ";"
6
- GST_VIDEO_CAPS_MAKE ("BGRA"));
7
+ (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, "BGRA") ", pixel-aspect-ratio = 1/1;"
8
+ GST_VIDEO_CAPS_MAKE ("BGRA") ", pixel-aspect-ratio = 1/1");
9
10
enum
11
{
12
gst-plugins-bad-1.20.4.tar.xz/sys/d3d11/gstd3d11screencapturesrc.cpp -> gst-plugins-bad-1.20.5.tar.xz/sys/d3d11/gstd3d11screencapturesrc.cpp
Changed
12
1
2
3
static GstStaticCaps template_caps =
4
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
5
- (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, "BGRA") ";"
6
- GST_VIDEO_CAPS_MAKE ("BGRA"));
7
+ (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, "BGRA") ", pixel-aspect-ratio = 1/1;"
8
+ GST_VIDEO_CAPS_MAKE ("BGRA") ", pixel-aspect-ratio = 1/1");
9
10
struct _GstD3D11ScreenCaptureSrc
11
{
12
gst-plugins-bad-1.20.4.tar.xz/sys/d3d11/gstd3d11videosink.cpp -> gst-plugins-bad-1.20.5.tar.xz/sys/d3d11/gstd3d11videosink.cpp
Changed
446
1
2
/* For drawing on user texture */
3
gboolean drawing;
4
GstBuffer *current_buffer;
5
- GRecMutex draw_lock;
6
+ GRecMutex lock;
7
8
gchar *title;
9
};
10
11
+#define GST_D3D11_VIDEO_SINK_GET_LOCK(d) (&(GST_D3D11_VIDEO_SINK_CAST(d)->lock))
12
+#define GST_D3D11_VIDEO_SINK_LOCK(d) G_STMT_START { \
13
+ GST_TRACE_OBJECT (d, "Locking from thread %p", g_thread_self()); \
14
+ g_rec_mutex_lock (GST_D3D11_VIDEO_SINK_GET_LOCK (d)); \
15
+ GST_TRACE_OBJECT (d, "Locked from thread %p", g_thread_self()); \
16
+ } G_STMT_END
17
+
18
+#define GST_D3D11_VIDEO_SINK_UNLOCK(d) G_STMT_START { \
19
+ GST_TRACE_OBJECT (d, "Unlocking from thread %p", g_thread_self()); \
20
+ g_rec_mutex_unlock (GST_D3D11_VIDEO_SINK_GET_LOCK (d)); \
21
+ } G_STMT_END
22
+
23
static void gst_d3d11_videosink_set_property (GObject * object, guint prop_id,
24
const GValue * value, GParamSpec * pspec);
25
static void gst_d3d11_videosink_get_property (GObject * object, guint prop_id,
26
27
self->fullscreen = DEFAULT_FULLSCREEN;
28
self->draw_on_shared_texture = DEFAULT_DRAW_ON_SHARED_TEXTURE;
29
30
- g_rec_mutex_init (&self->draw_lock);
31
+ g_rec_mutex_init (&self->lock);
32
}
33
34
static void
35
36
{
37
GstD3D11VideoSink *self = GST_D3D11_VIDEO_SINK (object);
38
39
- GST_OBJECT_LOCK (self);
40
+ GST_D3D11_VIDEO_SINK_LOCK (self);
41
switch (prop_id) {
42
case PROP_ADAPTER:
43
self->adapter = g_value_get_int (value);
44
45
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
46
break;
47
}
48
- GST_OBJECT_UNLOCK (self);
49
+ GST_D3D11_VIDEO_SINK_UNLOCK (self);
50
}
51
52
static void
53
54
{
55
GstD3D11VideoSink *self = GST_D3D11_VIDEO_SINK (object);
56
57
+ GST_D3D11_VIDEO_SINK_LOCK (self);
58
switch (prop_id) {
59
case PROP_ADAPTER:
60
g_value_set_int (value, self->adapter);
61
62
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
63
break;
64
}
65
+ GST_D3D11_VIDEO_SINK_UNLOCK (self);
66
}
67
68
static void
69
70
{
71
GstD3D11VideoSink *self = GST_D3D11_VIDEO_SINK (object);
72
73
- g_rec_mutex_clear (&self->draw_lock);
74
+ g_rec_mutex_clear (&self->lock);
75
g_free (self->title);
76
77
G_OBJECT_CLASS (parent_class)->finalize (object);
78
79
return TRUE;
80
}
81
82
-static gboolean
83
+static GstFlowReturn
84
gst_d3d11_video_sink_update_window (GstD3D11VideoSink * self, GstCaps * caps)
85
{
86
gint video_width, video_height;
87
88
gint display_par_n = 1, display_par_d = 1; /* display's PAR */
89
guint num, den;
90
GError *error = NULL;
91
+ GstD3D11Window *window;
92
+ GstFlowReturn ret = GST_FLOW_OK;
93
94
GST_DEBUG_OBJECT (self, "Updating window with caps %" GST_PTR_FORMAT, caps);
95
96
self->caps_updated = FALSE;
97
98
- if (!gst_d3d11_video_sink_prepare_window (self))
99
- goto no_window;
100
+ GST_D3D11_VIDEO_SINK_LOCK (self);
101
+ if (!gst_d3d11_video_sink_prepare_window (self)) {
102
+ GST_D3D11_VIDEO_SINK_UNLOCK (self);
103
+
104
+ GST_ELEMENT_ERROR (self, RESOURCE, NOT_FOUND, (nullptr),
105
+ ("Failed to open window."));
106
107
- if (!gst_video_info_from_caps (&self->info, caps))
108
- goto invalid_format;
109
+ return GST_FLOW_ERROR;
110
+ }
111
+
112
+ if (!gst_video_info_from_caps (&self->info, caps)) {
113
+ GST_DEBUG_OBJECT (self,
114
+ "Could not locate image format from caps %" GST_PTR_FORMAT, caps);
115
+ GST_D3D11_VIDEO_SINK_UNLOCK (self);
116
+ return GST_FLOW_ERROR;
117
+ }
118
119
video_width = GST_VIDEO_INFO_WIDTH (&self->info);
120
video_height = GST_VIDEO_INFO_HEIGHT (&self->info);
121
122
* convert video width and height to a display width and height
123
* using wd / hd = wv / hv * PARv / PARd */
124
125
- /* TODO: Get display PAR */
126
-
127
if (!gst_video_calculate_display_ratio (&num, &den, video_width,
128
- video_height, video_par_n, video_par_d, display_par_n, display_par_d))
129
- goto no_disp_ratio;
130
+ video_height, video_par_n, video_par_d, display_par_n,
131
+ display_par_d)) {
132
+ GST_D3D11_VIDEO_SINK_UNLOCK (self);
133
+
134
+ GST_ELEMENT_ERROR (self, CORE, NEGOTIATION, (nullptr),
135
+ ("Error calculating the output display ratio of the video."));
136
+ return GST_FLOW_ERROR;
137
+ }
138
139
GST_DEBUG_OBJECT (self,
140
"video width/height: %dx%d, calculated display ratio: %d/%d format: %s",
141
142
self->video_width = video_width;
143
self->video_height = video_height;
144
145
- if (GST_VIDEO_SINK_WIDTH (self) <= 0 || GST_VIDEO_SINK_HEIGHT (self) <= 0)
146
- goto no_display_size;
147
+ if (GST_VIDEO_SINK_WIDTH (self) <= 0 || GST_VIDEO_SINK_HEIGHT (self) <= 0) {
148
+ GST_D3D11_VIDEO_SINK_UNLOCK (self);
149
+
150
+ GST_ELEMENT_ERROR (self, CORE, NEGOTIATION, (nullptr),
151
+ ("Error calculating the output display ratio of the video."));
152
+ return GST_FLOW_ERROR;
153
+ }
154
155
- GST_OBJECT_LOCK (self);
156
if (self->pending_render_rect) {
157
GstVideoRectangle rect = self->render_rect;
158
159
self->pending_render_rect = FALSE;
160
- GST_OBJECT_UNLOCK (self);
161
-
162
gst_d3d11_window_set_render_rectangle (self->window, &rect);
163
- } else {
164
- GST_OBJECT_UNLOCK (self);
165
}
166
167
self->have_video_processor = FALSE;
168
- if (!gst_d3d11_window_prepare (self->window, GST_VIDEO_SINK_WIDTH (self),
169
- GST_VIDEO_SINK_HEIGHT (self), caps, &self->have_video_processor,
170
- &error)) {
171
+ window = (GstD3D11Window *) gst_object_ref (self->window);
172
+ GST_D3D11_VIDEO_SINK_UNLOCK (self);
173
+
174
+ ret = gst_d3d11_window_prepare (window, GST_VIDEO_SINK_WIDTH (self),
175
+ GST_VIDEO_SINK_HEIGHT (self), caps, &self->have_video_processor, &error);
176
+ if (ret != GST_FLOW_OK) {
177
GstMessage *error_msg;
178
179
+ if (ret == GST_FLOW_FLUSHING) {
180
+ GST_D3D11_VIDEO_SINK_LOCK (self);
181
+ GST_WARNING_OBJECT (self, "Couldn't prepare window but we are flushing");
182
+ gst_clear_object (&self->window);
183
+ gst_object_unref (window);
184
+ GST_D3D11_VIDEO_SINK_UNLOCK (self);
185
+
186
+ return GST_FLOW_FLUSHING;
187
+ }
188
+
189
GST_ERROR_OBJECT (self, "cannot create swapchain");
190
error_msg = gst_message_new_error (GST_OBJECT_CAST (self),
191
error, "Failed to prepare d3d11window");
192
g_clear_error (&error);
193
gst_element_post_message (GST_ELEMENT (self), error_msg);
194
+ gst_object_unref (window);
195
196
- return FALSE;
197
+ return GST_FLOW_ERROR;
198
}
199
200
if (self->fallback_pool) {
201
202
203
if (!self->fallback_pool) {
204
GST_ERROR_OBJECT (self, "Failed to configure fallback pool");
205
- return FALSE;
206
+ gst_object_unref (window);
207
+ return GST_FLOW_ERROR;
208
}
209
210
self->processor_in_use = FALSE;
211
212
if (self->title) {
213
- gst_d3d11_window_set_title (self->window, self->title);
214
+ gst_d3d11_window_set_title (window, self->title);
215
g_clear_pointer (&self->title, g_free);
216
}
217
218
- return TRUE;
219
+ gst_object_unref (window);
220
221
- /* ERRORS */
222
-invalid_format:
223
- {
224
- GST_DEBUG_OBJECT (self,
225
- "Could not locate image format from caps %" GST_PTR_FORMAT, caps);
226
- return FALSE;
227
- }
228
-no_window:
229
- {
230
- GST_ELEMENT_ERROR (self, RESOURCE, NOT_FOUND, (NULL),
231
- ("Failed to open window."));
232
- return FALSE;
233
- }
234
-no_disp_ratio:
235
- {
236
- GST_ELEMENT_ERROR (self, CORE, NEGOTIATION, (NULL),
237
- ("Error calculating the output display ratio of the video."));
238
- return FALSE;
239
- }
240
-no_display_size:
241
- {
242
- GST_ELEMENT_ERROR (self, CORE, NEGOTIATION, (NULL),
243
- ("Error calculating the output display ratio of the video."));
244
- return FALSE;
245
- }
246
+ return GST_FLOW_OK;
247
}
248
249
static void
250
251
return TRUE;
252
}
253
254
+/* called with lock */
255
static gboolean
256
gst_d3d11_video_sink_prepare_window (GstD3D11VideoSink * self)
257
{
258
259
return FALSE;
260
}
261
262
- GST_OBJECT_LOCK (self);
263
g_object_set (self->window,
264
"force-aspect-ratio", self->force_aspect_ratio,
265
"fullscreen-toggle-mode", self->fullscreen_toggle_mode,
266
"fullscreen", self->fullscreen,
267
"enable-navigation-events", self->enable_navigation_events, NULL);
268
- GST_OBJECT_UNLOCK (self);
269
270
g_signal_connect (self->window, "key-event",
271
G_CALLBACK (gst_d3d11_video_sink_key_event), self);
272
g_signal_connect (self->window, "mouse-event",
273
G_CALLBACK (gst_d3d11_video_mouse_key_event), self);
274
275
+ GST_DEBUG_OBJECT (self,
276
+ "Have prepared window %" GST_PTR_FORMAT, self->window);
277
+
278
return TRUE;
279
}
280
281
282
self->fallback_pool = NULL;
283
}
284
285
+ GST_D3D11_VIDEO_SINK_LOCK (self);
286
if (self->window)
287
gst_d3d11_window_unprepare (self->window);
288
289
- gst_clear_object (&self->device);
290
gst_clear_object (&self->window);
291
+ GST_D3D11_VIDEO_SINK_UNLOCK (self);
292
+
293
+ gst_clear_object (&self->device);
294
295
g_clear_pointer (&self->title, g_free);
296
297
298
* on window-resize event */
299
gst_query_add_allocation_pool (query, pool, size, 2, 0);
300
if (pool)
301
- g_object_unref (pool);
302
+ gst_object_unref (pool);
303
304
gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL);
305
gst_query_add_allocation_meta (query,
306
307
{
308
GstD3D11VideoSink *self = GST_D3D11_VIDEO_SINK (sink);
309
310
+ GST_D3D11_VIDEO_SINK_LOCK (self);
311
if (self->window)
312
gst_d3d11_window_unlock (self->window);
313
+ GST_D3D11_VIDEO_SINK_UNLOCK (self);
314
315
return TRUE;
316
}
317
318
{
319
GstD3D11VideoSink *self = GST_D3D11_VIDEO_SINK (sink);
320
321
+ GST_D3D11_VIDEO_SINK_LOCK (self);
322
if (self->window)
323
gst_d3d11_window_unlock_stop (self->window);
324
+ GST_D3D11_VIDEO_SINK_UNLOCK (self);
325
326
return TRUE;
327
}
328
329
title_string = std::string (title);
330
}
331
332
+ GST_D3D11_VIDEO_SINK_LOCK (self);
333
if (self->window) {
334
gst_d3d11_window_set_title (self->window, title_string.c_str ());
335
} else {
336
g_free (self->title);
337
self->title = g_strdup (title_string.c_str ());
338
}
339
+ GST_D3D11_VIDEO_SINK_UNLOCK (self);
340
341
g_free (title);
342
}
343
344
345
if (self->caps_updated || !self->window) {
346
GstCaps *caps = gst_pad_get_current_caps (GST_BASE_SINK_PAD (sink));
347
- gboolean update_ret;
348
349
/* shouldn't happen */
350
if (!caps)
351
return GST_FLOW_NOT_NEGOTIATED;
352
353
- update_ret = gst_d3d11_video_sink_update_window (self, caps);
354
+ ret = gst_d3d11_video_sink_update_window (self, caps);
355
gst_caps_unref (caps);
356
357
- if (!update_ret)
358
- return GST_FLOW_NOT_NEGOTIATED;
359
+ if (ret != GST_FLOW_OK)
360
+ return ret;
361
}
362
363
if (!gst_d3d11_buffer_can_access_device (buf, device_handle)) {
364
365
gst_d3d11_window_show (self->window);
366
367
if (self->draw_on_shared_texture) {
368
- g_rec_mutex_lock (&self->draw_lock);
369
+ GST_D3D11_VIDEO_SINK_LOCK (self);
370
self->current_buffer = fallback_buf ? fallback_buf : buf;
371
self->drawing = TRUE;
372
373
374
GST_LOG_OBJECT (self, "End drawing");
375
self->drawing = FALSE;
376
self->current_buffer = NULL;
377
- g_rec_mutex_unlock (&self->draw_lock);
378
+ GST_D3D11_VIDEO_SINK_UNLOCK (self);
379
} else {
380
ret = gst_d3d11_window_render (self->window,
381
fallback_buf ? fallback_buf : buf);
382
383
GST_DEBUG_OBJECT (self,
384
"render rect x: %d, y: %d, width: %d, height %d", x, y, width, height);
385
386
- GST_OBJECT_LOCK (self);
387
+ GST_D3D11_VIDEO_SINK_LOCK (self);
388
if (self->window) {
389
GstVideoRectangle rect;
390
391
392
rect.h = height;
393
394
self->render_rect = rect;
395
- GST_OBJECT_UNLOCK (self);
396
397
gst_d3d11_window_set_render_rectangle (self->window, &rect);
398
} else {
399
400
self->render_rect.w = width;
401
self->render_rect.h = height;
402
self->pending_render_rect = TRUE;
403
- GST_OBJECT_UNLOCK (self);
404
}
405
+
406
+ GST_D3D11_VIDEO_SINK_UNLOCK (self);
407
}
408
409
static void
410
411
{
412
GstD3D11VideoSink *self = GST_D3D11_VIDEO_SINK (overlay);
413
414
- if (self->window && self->window->swap_chain) {
415
- gst_d3d11_window_render (self->window, NULL);
416
- }
417
+ GST_D3D11_VIDEO_SINK_LOCK (self);
418
+ if (self->window && self->window->swap_chain)
419
+ gst_d3d11_window_render (self->window, nullptr);
420
+ GST_D3D11_VIDEO_SINK_UNLOCK (self);
421
}
422
423
static void
424
425
return FALSE;
426
}
427
428
- g_rec_mutex_lock (&self->draw_lock);
429
+ GST_D3D11_VIDEO_SINK_LOCK (self);
430
if (!self->drawing || !self->current_buffer) {
431
GST_WARNING_OBJECT (self, "Nothing to draw");
432
- g_rec_mutex_unlock (&self->draw_lock);
433
+ GST_D3D11_VIDEO_SINK_UNLOCK (self);
434
return FALSE;
435
}
436
437
438
ret = gst_d3d11_window_render_on_shared_handle (self->window,
439
self->current_buffer, shared_handle, texture_misc_flags, acquire_key,
440
release_key);
441
- g_rec_mutex_unlock (&self->draw_lock);
442
+ GST_D3D11_VIDEO_SINK_UNLOCK (self);
443
444
return ret == GST_FLOW_OK;
445
}
446
gst-plugins-bad-1.20.4.tar.xz/sys/d3d11/gstd3d11videosink.h -> gst-plugins-bad-1.20.5.tar.xz/sys/d3d11/gstd3d11videosink.h
Changed
9
1
2
#define GST_IS_D3D11_VIDEO_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_D3D11_VIDEO_SINK))
3
#define GST_IS_D3D11_VIDEO_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_D3D11_VIDEO_SINK))
4
#define GST_D3D11_VIDEO_SINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_D3D11_VIDEO_SINK, GstD3D11VideoSinkClass))
5
+#define GST_D3D11_VIDEO_SINK_CAST(obj) ((GstD3D11VideoSink *) obj)
6
7
typedef struct _GstD3D11VideoSink GstD3D11VideoSink;
8
typedef struct _GstD3D11VideoSinkClass GstD3D11VideoSinkClass;
9
gst-plugins-bad-1.20.4.tar.xz/sys/d3d11/gstd3d11window.cpp -> gst-plugins-bad-1.20.5.tar.xz/sys/d3d11/gstd3d11window.cpp
Changed
91
1
2
ID3D11RenderTargetView * rtv);
3
static void gst_d3d11_window_on_resize_default (GstD3D11Window * window,
4
guint width, guint height);
5
-static gboolean gst_d3d11_window_prepare_default (GstD3D11Window * window,
6
+static GstFlowReturn gst_d3d11_window_prepare_default (GstD3D11Window * window,
7
guint display_width, guint display_height, GstCaps * caps,
8
gboolean * video_processor_available, GError ** error);
9
10
11
ID3D11Texture2D *backbuffer = NULL;
12
GstVideoRectangle src_rect, dst_rect, rst_rect;
13
IDXGISwapChain *swap_chain;
14
+ ID3D11DeviceContext *context;
15
+ const FLOAT clear_color = { 0.0, 0.0, 0.0, 1.0 };
16
17
gst_d3d11_device_lock (window->device);
18
if (!window->swap_chain)
19
20
goto done;
21
}
22
23
+ context = gst_d3d11_device_get_device_context_handle (window->device);
24
+ context->ClearRenderTargetView (window->rtv, clear_color);
25
+
26
if (window->processor) {
27
D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC pov_desc;
28
29
30
gboolean supported;
31
} GstD3D11WindowDisplayFormat;
32
33
-gboolean
34
+GstFlowReturn
35
gst_d3d11_window_prepare (GstD3D11Window * window, guint display_width,
36
guint display_height, GstCaps * caps, gboolean * video_processor_available,
37
GError ** error)
38
{
39
GstD3D11WindowClass *klass;
40
41
- g_return_val_if_fail (GST_IS_D3D11_WINDOW (window), FALSE);
42
+ g_return_val_if_fail (GST_IS_D3D11_WINDOW (window), GST_FLOW_ERROR);
43
44
klass = GST_D3D11_WINDOW_GET_CLASS (window);
45
g_assert (klass->prepare != NULL);
46
47
video_processor_available, error);
48
}
49
50
-static gboolean
51
+static GstFlowReturn
52
gst_d3d11_window_prepare_default (GstD3D11Window * window, guint display_width,
53
guint display_height, GstCaps * caps, gboolean * video_processor_available,
54
GError ** error)
55
56
GST_ERROR_OBJECT (window, "Cannot determine render format");
57
g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_FAILED,
58
"Cannot determine render format");
59
- return FALSE;
60
+ return GST_FLOW_ERROR;
61
}
62
63
for (i = 0; i < GST_VIDEO_INFO_N_COMPONENTS (&window->info); i++) {
64
65
66
GST_DEBUG_OBJECT (window, "New swap chain 0x%p created", window->swap_chain);
67
68
- return TRUE;
69
+ return GST_FLOW_OK;
70
71
error:
72
gst_d3d11_device_unlock (window->device);
73
74
- return FALSE;
75
+ return GST_FLOW_ERROR;
76
}
77
78
void
79
80
if (!buffer)
81
return GST_FLOW_OK;
82
83
+ if (!rtv) {
84
+ GST_ERROR_OBJECT (self, "RTV is unavailable");
85
+ return GST_FLOW_ERROR;
86
+ }
87
+
88
{
89
GstMapInfo infosGST_VIDEO_MAX_PLANES;
90
ID3D11ShaderResourceView *srvGST_VIDEO_MAX_PLANES;
91
gst-plugins-bad-1.20.4.tar.xz/sys/d3d11/gstd3d11window.h -> gst-plugins-bad-1.20.5.tar.xz/sys/d3d11/gstd3d11window.h
Changed
19
1
2
guint width,
3
guint height);
4
5
- gboolean (*prepare) (GstD3D11Window * window,
6
+ GstFlowReturn (*prepare) (GstD3D11Window * window,
7
guint display_width,
8
guint display_height,
9
GstCaps * caps,
10
11
void gst_d3d11_window_set_title (GstD3D11Window * window,
12
const gchar *title);
13
14
-gboolean gst_d3d11_window_prepare (GstD3D11Window * window,
15
+GstFlowReturn gst_d3d11_window_prepare (GstD3D11Window * window,
16
guint display_width,
17
guint display_height,
18
GstCaps * caps,
19
gst-plugins-bad-1.20.4.tar.xz/sys/d3d11/gstd3d11window_corewindow.cpp -> gst-plugins-bad-1.20.5.tar.xz/sys/d3d11/gstd3d11window_corewindow.cpp
Changed
10
1
2
return NULL;
3
}
4
5
- g_object_ref_sink (window);
6
+ gst_object_ref_sink (window);
7
8
return window;
9
}
10
gst-plugins-bad-1.20.4.tar.xz/sys/d3d11/gstd3d11window_dummy.cpp -> gst-plugins-bad-1.20.5.tar.xz/sys/d3d11/gstd3d11window_dummy.cpp
Changed
43
1
2
3
static void gst_d3d11_window_dummy_on_resize (GstD3D11Window * window,
4
guint width, guint height);
5
-static gboolean gst_d3d11_window_dummy_prepare (GstD3D11Window * window,
6
+static GstFlowReturn gst_d3d11_window_dummy_prepare (GstD3D11Window * window,
7
guint display_width, guint display_height, GstCaps * caps,
8
gboolean * video_processor_available, GError ** error);
9
static void gst_d3d11_window_dummy_unprepare (GstD3D11Window * window);
10
11
{
12
}
13
14
-static gboolean
15
+static GstFlowReturn
16
gst_d3d11_window_dummy_prepare (GstD3D11Window * window,
17
guint display_width, guint display_height, GstCaps * caps,
18
gboolean * video_processor_available, GError ** error)
19
20
21
gst_d3d11_device_unlock (window->device);
22
23
- return TRUE;
24
+ return GST_FLOW_OK;
25
26
error:
27
gst_d3d11_device_unlock (window->device);
28
29
- return FALSE;
30
+ return GST_FLOW_ERROR;
31
}
32
33
static void
34
35
g_object_new (GST_TYPE_D3D11_WINDOW_DUMMY, "d3d11device", device, NULL);
36
37
window->initialized = TRUE;
38
- g_object_ref_sink (window);
39
+ gst_object_ref_sink (window);
40
41
return window;
42
}
43
gst-plugins-bad-1.20.4.tar.xz/sys/d3d11/gstd3d11window_swapchainpanel.cpp -> gst-plugins-bad-1.20.5.tar.xz/sys/d3d11/gstd3d11window_swapchainpanel.cpp
Changed
10
1
2
return NULL;
3
}
4
5
- g_object_ref_sink (window);
6
+ gst_object_ref_sink (window);
7
8
return window;
9
}
10
gst-plugins-bad-1.20.4.tar.xz/sys/d3d11/gstd3d11window_win32.cpp -> gst-plugins-bad-1.20.5.tar.xz/sys/d3d11/gstd3d11window_win32.cpp
Changed
303
1
2
#define WM_GST_D3D11_CONSTRUCT_INTERNAL_WINDOW (WM_USER + 2)
3
#define WM_GST_D3D11_DESTROY_INTERNAL_WINDOW (WM_USER + 3)
4
#define WM_GST_D3D11_MOVE_WINDOW (WM_USER + 4)
5
+#define WM_GST_D3D11_SHOW_WINDOW (WM_USER + 5)
6
7
static LRESULT CALLBACK window_proc (HWND hWnd, UINT uMsg, WPARAM wParam,
8
LPARAM lParam);
9
10
11
/* Handle set_render_rectangle */
12
GstVideoRectangle render_rect;
13
+
14
+ gboolean flushing;
15
+ gboolean setup_external_hwnd;
16
};
17
18
#define gst_d3d11_window_win32_parent_class parent_class
19
20
static void gst_d3d11_window_win32_destroy_internal_window (HWND hwnd);
21
static void gst_d3d11_window_win32_release_external_handle (HWND hwnd);
22
static void
23
-gst_d3d11_window_win32_set_window_handle (GstD3D11WindowWin32 * self,
24
- guintptr handle);
25
-static void
26
gst_d3d11_window_win32_on_resize (GstD3D11Window * window,
27
guint width, guint height);
28
+static GstFlowReturn gst_d3d11_window_win32_prepare (GstD3D11Window * window,
29
+ guint display_width, guint display_height, GstCaps * caps,
30
+ gboolean * video_processor_available, GError ** error);
31
static void gst_d3d11_window_win32_unprepare (GstD3D11Window * window);
32
static void
33
gst_d3d11_window_win32_set_render_rectangle (GstD3D11Window * window,
34
const GstVideoRectangle * rect);
35
static void gst_d3d11_window_win32_set_title (GstD3D11Window * window,
36
const gchar * title);
37
+static gboolean gst_d3d11_window_win32_unlock (GstD3D11Window * window);
38
+static gboolean gst_d3d11_window_win32_unlock_stop (GstD3D11Window * window);
39
+static GstFlowReturn
40
+gst_d3d11_window_win32_set_external_handle (GstD3D11WindowWin32 * self);
41
42
static void
43
gst_d3d11_window_win32_class_init (GstD3D11WindowWin32Class * klass)
44
45
window_class->present = GST_DEBUG_FUNCPTR (gst_d3d11_window_win32_present);
46
window_class->on_resize =
47
GST_DEBUG_FUNCPTR (gst_d3d11_window_win32_on_resize);
48
+ window_class->prepare = GST_DEBUG_FUNCPTR (gst_d3d11_window_win32_prepare);
49
window_class->unprepare =
50
GST_DEBUG_FUNCPTR (gst_d3d11_window_win32_unprepare);
51
window_class->set_render_rectangle =
52
GST_DEBUG_FUNCPTR (gst_d3d11_window_win32_set_render_rectangle);
53
window_class->set_title =
54
GST_DEBUG_FUNCPTR (gst_d3d11_window_win32_set_title);
55
+ window_class->unlock = GST_DEBUG_FUNCPTR (gst_d3d11_window_win32_unlock);
56
+ window_class->unlock_stop =
57
+ GST_DEBUG_FUNCPTR (gst_d3d11_window_win32_unlock_stop);
58
}
59
60
static void
61
62
GstD3D11WindowWin32 *self = GST_D3D11_WINDOW_WIN32 (object);
63
64
if (window->external_handle) {
65
- gst_d3d11_window_win32_set_window_handle (self, window->external_handle);
66
+ /* Will setup internal child window on ::prepare() */
67
+ self->setup_external_hwnd = TRUE;
68
+ window->initialized = TRUE;
69
goto done;
70
}
71
72
73
G_OBJECT_CLASS (parent_class)->dispose (object);
74
}
75
76
+static GstFlowReturn
77
+gst_d3d11_window_win32_prepare (GstD3D11Window * window, guint display_width,
78
+ guint display_height, GstCaps * caps, gboolean * video_processor_available,
79
+ GError ** error)
80
+{
81
+ GstD3D11WindowWin32 *self = GST_D3D11_WINDOW_WIN32 (window);
82
+ HWND hwnd;
83
+ GstFlowReturn ret;
84
+
85
+ if (!self->setup_external_hwnd)
86
+ goto done;
87
+
88
+ hwnd = (HWND) window->external_handle;
89
+ if (!IsWindow (hwnd)) {
90
+ GST_ERROR_OBJECT (self, "Invalid window handle");
91
+ g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_FAILED,
92
+ "Invalid window handle");
93
+ return GST_FLOW_ERROR;
94
+ }
95
+
96
+ self->overlay_state = GST_D3D11_WINDOW_WIN32_OVERLAY_STATE_NONE;
97
+ self->external_hwnd = hwnd;
98
+
99
+ GST_DEBUG_OBJECT (self, "Preparing external handle");
100
+ ret = gst_d3d11_window_win32_set_external_handle (self);
101
+ if (ret != GST_FLOW_OK) {
102
+ if (ret == GST_FLOW_FLUSHING) {
103
+ GST_WARNING_OBJECT (self, "Flushing");
104
+ return GST_FLOW_FLUSHING;
105
+ }
106
+
107
+ GST_ERROR_OBJECT (self, "Couldn't configure internal window");
108
+ g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_FAILED,
109
+ "Window handle configuration failed");
110
+ return GST_FLOW_ERROR;
111
+ }
112
+
113
+ GST_DEBUG_OBJECT (self, "External handle got prepared");
114
+ self->setup_external_hwnd = FALSE;
115
+
116
+done:
117
+ return GST_D3D11_WINDOW_CLASS (parent_class)->prepare (window, display_width,
118
+ display_height, caps, video_processor_available, error);
119
+}
120
+
121
static void
122
gst_d3d11_window_win32_unprepare (GstD3D11Window * window)
123
{
124
125
}
126
127
static gboolean
128
+gst_d3d11_window_win32_unlock (GstD3D11Window * window)
129
+{
130
+ GstD3D11WindowWin32 *self = GST_D3D11_WINDOW_WIN32 (window);
131
+ g_mutex_lock (&self->lock);
132
+
133
+ GST_DEBUG_OBJECT (self, "Unlock");
134
+
135
+ self->flushing = TRUE;
136
+ g_cond_broadcast (&self->cond);
137
+ g_mutex_unlock (&self->lock);
138
+
139
+ return TRUE;
140
+}
141
+
142
+static gboolean
143
+gst_d3d11_window_win32_unlock_stop (GstD3D11Window * window)
144
+{
145
+ GstD3D11WindowWin32 *self = GST_D3D11_WINDOW_WIN32 (window);
146
+ g_mutex_lock (&self->lock);
147
+
148
+ GST_DEBUG_OBJECT (self, "Unlock stop");
149
+
150
+ self->flushing = FALSE;
151
+ g_cond_broadcast (&self->cond);
152
+ g_mutex_unlock (&self->lock);
153
+
154
+ return TRUE;
155
+}
156
+
157
+static gboolean
158
running_cb (gpointer user_data)
159
{
160
GstD3D11WindowWin32 *self = GST_D3D11_WINDOW_WIN32 (user_data);
161
162
163
window->initialized = gst_d3d11_window_win32_create_internal_window (self);
164
165
- self->msg_io_channel =
166
- g_io_channel_win32_new_messages ((guintptr) self->internal_hwnd);
167
+ /* Watching and dispatching all messages on this thread */
168
+ self->msg_io_channel = g_io_channel_win32_new_messages (0);
169
self->msg_source = g_io_create_watch (self->msg_io_channel, G_IO_IN);
170
g_source_set_callback (self->msg_source, (GSourceFunc) msg_cb, self, NULL);
171
g_source_attach (self->msg_source, self->main_context);
172
173
", 0x%x", (guintptr) hwnd, (guint) GetLastError ());
174
}
175
176
-static void
177
+static GstFlowReturn
178
gst_d3d11_window_win32_set_external_handle (GstD3D11WindowWin32 * self)
179
{
180
WNDPROC external_window_proc;
181
+ GstFlowReturn ret = GST_FLOW_OK;
182
183
external_window_proc =
184
(WNDPROC) GetWindowLongPtrA (self->external_hwnd, GWLP_WNDPROC);
185
186
SetWindowLongPtrA (self->external_hwnd, GWLP_WNDPROC,
187
(LONG_PTR) sub_class_proc);
188
189
- /* Will create our internal window on parent window's thread */
190
- SendMessageA (self->external_hwnd, WM_GST_D3D11_CONSTRUCT_INTERNAL_WINDOW,
191
+ /* SendMessage() may cause deadlock if parent window thread is busy
192
+ * for changing pipeline's state. Post our message instead, and wait for
193
+ * the parent window's thread or flushing */
194
+ PostMessageA (self->external_hwnd, WM_GST_D3D11_CONSTRUCT_INTERNAL_WINDOW,
195
0, 0);
196
+
197
+ g_mutex_lock (&self->lock);
198
+ while (self->external_hwnd &&
199
+ self->overlay_state == GST_D3D11_WINDOW_WIN32_OVERLAY_STATE_NONE &&
200
+ !self->flushing) {
201
+ g_cond_wait (&self->cond, &self->lock);
202
+ }
203
+
204
+ if (self->overlay_state != GST_D3D11_WINDOW_WIN32_OVERLAY_STATE_OPENED) {
205
+ if (self->flushing)
206
+ ret = GST_FLOW_FLUSHING;
207
+ else
208
+ ret = GST_FLOW_ERROR;
209
+ }
210
+ g_mutex_unlock (&self->lock);
211
+
212
+ return ret;
213
}
214
215
static void
216
217
}
218
}
219
break;
220
+ case WM_GST_D3D11_SHOW_WINDOW:
221
+ ShowWindow (self->internal_hwnd, SW_SHOW);
222
+ break;
223
default:
224
break;
225
}
226
227
MoveWindow (self->internal_hwnd, rect.left, rect.top, rect.right,
228
rect.bottom, FALSE);
229
230
+ g_mutex_lock (&self->lock);
231
+ self->overlay_state = GST_D3D11_WINDOW_WIN32_OVERLAY_STATE_OPENED;
232
+ g_cond_broadcast (&self->cond);
233
+ g_mutex_unlock (&self->lock);
234
+
235
/* don't need to be chained up to parent window procedure,
236
* as this is our custom message */
237
return 0;
238
239
gst_d3d11_window_win32_release_external_handle (self->external_hwnd);
240
self->external_hwnd = NULL;
241
242
- RemovePropA (self->internal_hwnd, D3D11_WINDOW_PROP_NAME);
243
- ShowWindow (self->internal_hwnd, SW_HIDE);
244
- gst_d3d11_window_win32_destroy_internal_window (self->internal_hwnd);
245
+ if (self->internal_hwnd) {
246
+ RemovePropA (self->internal_hwnd, D3D11_WINDOW_PROP_NAME);
247
+ ShowWindow (self->internal_hwnd, SW_HIDE);
248
+ gst_d3d11_window_win32_destroy_internal_window (self->internal_hwnd);
249
+ }
250
self->internal_hwnd = NULL;
251
self->internal_hwnd_thread = NULL;
252
253
self->overlay_state = GST_D3D11_WINDOW_WIN32_OVERLAY_STATE_CLOSED;
254
+ g_cond_broadcast (&self->cond);
255
g_mutex_unlock (&self->lock);
256
} else {
257
gst_d3d11_window_win32_handle_window_proc (self, hWnd, uMsg, wParam,
258
259
}
260
261
static void
262
-gst_d3d11_window_win32_set_window_handle (GstD3D11WindowWin32 * self,
263
- guintptr handle)
264
-{
265
- self->overlay_state = GST_D3D11_WINDOW_WIN32_OVERLAY_STATE_NONE;
266
-
267
- self->external_hwnd = (HWND) handle;
268
- gst_d3d11_window_win32_set_external_handle (self);
269
-
270
- self->overlay_state = GST_D3D11_WINDOW_WIN32_OVERLAY_STATE_OPENED;
271
-}
272
-
273
-static void
274
gst_d3d11_window_win32_show (GstD3D11Window * window)
275
{
276
GstD3D11WindowWin32 *self = GST_D3D11_WINDOW_WIN32 (window);
277
278
GetSystemMetrics (SM_CYCAPTION);
279
MoveWindow (self->internal_hwnd, rect.left, rect.top, width,
280
height, FALSE);
281
+ ShowWindow (self->internal_hwnd, SW_SHOW);
282
+ } else if (self->internal_hwnd) {
283
+ /* ShowWindow will throw message to message pumping thread (app thread)
284
+ * synchroniously, which can be blocked at the moment.
285
+ * Post message to internal hwnd and do that from message pumping thread
286
+ */
287
+ PostMessageA (self->internal_hwnd, WM_GST_D3D11_SHOW_WINDOW, 0, 0);
288
}
289
290
- ShowWindow (self->internal_hwnd, SW_SHOW);
291
self->visible = TRUE;
292
}
293
}
294
295
return NULL;
296
}
297
298
- g_object_ref_sink (window);
299
+ gst_object_ref_sink (window);
300
301
return window;
302
}
303
gst-plugins-bad-1.20.4.tar.xz/sys/decklink/gstdecklinkvideosrc.cpp -> gst-plugins-bad-1.20.5.tar.xz/sys/decklink/gstdecklinkvideosrc.cpp
Changed
65
1
2
#define ABSDIFF(x, y) ( (x) > (y) ? ((x) - (y)) : ((y) - (x)) )
3
#endif
4
5
+#define NO_SIGNL_RESET_COUNT (10)
6
+
7
enum
8
{
9
PROP_0,
10
11
}
12
13
static void
14
+gst_decklink_reset_time_mapping(GstDecklinkVideoSrc * self)
15
+{
16
+ self->window_fill = 0;
17
+ self->window_filled = FALSE;
18
+ self->window_skip = 1;
19
+ self->window_skip_count = 0;
20
+ self->current_time_mapping.xbase = 0;
21
+ self->current_time_mapping.b = 0;
22
+ self->current_time_mapping.num = 1;
23
+ self->current_time_mapping.den = 1;
24
+ self->next_time_mapping.xbase = 0;
25
+ self->next_time_mapping.b = 0;
26
+ self->next_time_mapping.num = 1;
27
+ self->next_time_mapping.den = 1;
28
+}
29
+
30
+static void
31
gst_decklink_video_src_update_time_mapping (GstDecklinkVideoSrc * self,
32
GstClockTime capture_time, GstClockTime stream_time)
33
{
34
35
return;
36
}
37
38
+ if (no_signal)
39
+ self->no_signal_count++;
40
+
41
if (self->drop_no_signal_frames && no_signal) {
42
CaptureFrame f;
43
memset (&f, 0, sizeof (f));
44
45
return;
46
}
47
48
+ if (!no_signal) {
49
+ if (self->no_signal_count > NO_SIGNL_RESET_COUNT) {
50
+ gst_decklink_reset_time_mapping(self);
51
+ }
52
+ self->no_signal_count = 0;
53
+ }
54
+
55
gst_decklink_video_src_update_time_mapping (self, capture_time, stream_time);
56
if (self->output_stream_time) {
57
timestamp = stream_time;
58
59
out:
60
61
return ret;
62
-}
63
+}
64
\ No newline at end of file
65
gst-plugins-bad-1.20.4.tar.xz/sys/decklink/gstdecklinkvideosrc.h -> gst-plugins-bad-1.20.5.tar.xz/sys/decklink/gstdecklinkvideosrc.h
Changed
9
1
2
guint64 processed;
3
guint64 dropped;
4
guint64 first_stream_time;
5
+ guint64 no_signal_count;
6
7
GstVideoInfo info;
8
GstDecklinkVideoFormat video_format;
9
gst-plugins-bad-1.20.4.tar.xz/sys/dshowvideosink/dshowvideosink.cpp -> gst-plugins-bad-1.20.5.tar.xz/sys/dshowvideosink/dshowvideosink.cpp
Changed
28
1
2
3
if (sink->is_new_window) {
4
/* If we created a new window */
5
- SendMessage (previous_window, WM_CLOSE, NULL, NULL);
6
+ SendMessage (previous_window, WM_CLOSE, 0, 0);
7
sink->is_new_window = FALSE;
8
sink->window_closed = FALSE;
9
} else {
10
11
height = vi->rcTarget.bottom + GetSystemMetrics (SM_CYCAPTION) +
12
(GetSystemMetrics (SM_CYSIZEFRAME) * 2);
13
14
- SystemParametersInfo (SPI_GETWORKAREA, NULL, &rect, 0);
15
+ SystemParametersInfo (SPI_GETWORKAREA, 0, &rect, 0);
16
int screenwidth = rect.right - rect.left;
17
int screenheight = rect.bottom - rect.top;
18
offx = rect.left;
19
20
/* If we created a new window, send the close message and wait until
21
* it's closed in the window thread */
22
if (sink->is_new_window) {
23
- SendMessage (sink->window_id, WM_CLOSE, NULL, NULL);
24
+ SendMessage (sink->window_id, WM_CLOSE, 0, 0);
25
while (!sink->window_closed);
26
sink->is_new_window = FALSE;
27
}
28
gst-plugins-bad-1.20.4.tar.xz/sys/mediafoundation/gstmfsourcereader.cpp -> gst-plugins-bad-1.20.5.tar.xz/sys/mediafoundation/gstmfsourcereader.cpp
Changed
10
1
2
while (!g_main_loop_is_running (self->loop))
3
g_cond_wait (&self->cond, &self->lock);
4
g_mutex_unlock (&self->lock);
5
+
6
+ G_OBJECT_CLASS (parent_class)->constructed (object);
7
}
8
9
static gboolean
10
gst-plugins-bad-1.20.4.tar.xz/sys/mediafoundation/gstmfvideosrc.c -> gst-plugins-bad-1.20.5.tar.xz/sys/mediafoundation/gstmfvideosrc.c
Changed
24
1
2
ret = GST_BASE_SRC_CLASS (parent_class)->alloc (GST_BASE_SRC (self), 0,
3
GST_VIDEO_INFO_SIZE (&self->info), &buf);
4
5
- if (ret != GST_FLOW_OK)
6
+ if (ret != GST_FLOW_OK) {
7
+ gst_clear_buffer (&buf);
8
return ret;
9
+ }
10
11
ret = gst_mf_source_object_fill (self->source, buf);
12
} else {
13
ret = gst_mf_source_object_create (self->source, &buf);
14
}
15
16
- if (ret != GST_FLOW_OK)
17
+ if (ret != GST_FLOW_OK) {
18
+ gst_clear_buffer (&buf);
19
return ret;
20
+ }
21
22
GST_BUFFER_OFFSET (buf) = self->n_frames;
23
GST_BUFFER_OFFSET_END (buf) = GST_BUFFER_OFFSET (buf) + 1;
24
gst-plugins-bad-1.20.4.tar.xz/sys/mediafoundation/gstwin32devicewatcher.cpp -> gst-plugins-bad-1.20.5.tar.xz/sys/mediafoundation/gstwin32devicewatcher.cpp
Changed
10
1
2
while (!g_main_loop_is_running (self->loop))
3
g_cond_wait (&self->cond, &self->lock);
4
g_mutex_unlock (&self->lock);
5
+
6
+ G_OBJECT_CLASS (parent_class)->constructed (object);
7
}
8
9
static void
10
gst-plugins-bad-1.20.4.tar.xz/tests/check/libs/mpegts.c -> gst-plugins-bad-1.20.5.tar.xz/tests/check/libs/mpegts.c
Changed
96
1
2
0xc0, 0x00, 0xc4, 0x86, 0x56, 0xa5
3
};
4
5
+static gboolean
6
+_has_iso6937_iconv (void)
7
+{
8
+ gboolean supported;
9
+ GIConv test = g_iconv_open ("iso6937", "utf-8");
10
+ supported = (test != (GIConv) - 1);
11
+ g_iconv_close (test);
12
+ return supported;
13
+}
14
+
15
GST_START_TEST (test_scte_sit)
16
{
17
GstMpegtsSCTESIT *sit;
18
19
20
fail_if (data == NULL);
21
22
- for (i = 0; i < data_size; i++) {
23
- if (datai != nit_data_checki)
24
- fail ("0x%X != 0x%X in byte %d of NIT section", datai,
25
- nit_data_checki, i);
26
+ if (_has_iso6937_iconv ()) {
27
+ for (i = 0; i < data_size; i++) {
28
+ if (datai != nit_data_checki)
29
+ fail ("0x%X != 0x%X in byte %d of NIT section", datai,
30
+ nit_data_checki, i);
31
+ }
32
}
33
34
/* Check assertion on bad CRC. Reset parsed data, and make the CRC corrupt */
35
36
37
fail_if (data == NULL);
38
39
- for (i = 0; i < data_size; i++) {
40
- if (datai != sdt_data_checki)
41
- fail ("0x%X != 0x%X in byte %d of SDT section", datai,
42
- sdt_data_checki, i);
43
+ if (_has_iso6937_iconv ()) {
44
+ for (i = 0; i < data_size; i++) {
45
+ if (datai != sdt_data_checki)
46
+ fail ("0x%X != 0x%X in byte %d of SDT section", datai,
47
+ sdt_data_checki, i);
48
+ }
49
}
50
51
/* Check assertion on bad CRC. Reset parsed data, and make the CRC corrupt */
52
53
/* Check creation of descriptor */
54
desc = gst_mpegts_descriptor_from_dvb_network_name ("Name");
55
fail_if (desc == NULL);
56
- fail_unless (desc->length == 4);
57
+ if (_has_iso6937_iconv ())
58
+ fail_unless (desc->length == 4);
59
fail_unless (desc->tag == 0x40);
60
61
- for (i = 0; i < 6; i++) {
62
- if (desc->datai != network_name_descriptori)
63
- fail ("0x%X != 0x%X in byte %d of network name descriptor",
64
- desc->datai, network_name_descriptori, i);
65
+ if (_has_iso6937_iconv ()) {
66
+ for (i = 0; i < 6; i++) {
67
+ if (desc->datai != network_name_descriptori)
68
+ fail ("0x%X != 0x%X in byte %d of network name descriptor",
69
+ desc->datai, network_name_descriptori, i);
70
+ }
71
}
72
73
/* Check parsing of descriptor */
74
75
desc = gst_mpegts_descriptor_from_dvb_service
76
(GST_DVB_SERVICE_DIGITAL_TELEVISION, "Name", "Provider");
77
fail_if (desc == NULL);
78
- fail_unless (desc->length == 15);
79
+ if (_has_iso6937_iconv ())
80
+ fail_unless (desc->length == 15);
81
fail_unless (desc->tag == 0x48);
82
83
- for (i = 0; i < 17; i++) {
84
- if (desc->datai != service_descriptori)
85
- fail ("0x%X != 0x%X in byte %d of service descriptor",
86
- desc->datai, service_descriptori, i);
87
+ if (_has_iso6937_iconv ()) {
88
+ for (i = 0; i < 17; i++) {
89
+ if (desc->datai != service_descriptori)
90
+ fail ("0x%X != 0x%X in byte %d of service descriptor",
91
+ desc->datai, service_descriptori, i);
92
+ }
93
}
94
95
/* Check parsing of descriptor with data */
96
Refresh
No build results available
Refresh
No rpmlint results available
Login required, please
login
or
signup
in order to comment
Request History
zaitor created request over 2 years ago
New stable release
zaitor accepted request over 2 years ago
Xin