Changes of Revision 12

gstreamer-plugins-bad-codecs.changes Changed
x
 
1
@@ -1,4 +1,9 @@
2
 -------------------------------------------------------------------
3
+Mon Mar 13 09:59:44 UTC 2023 - Bjørn Lie <zaitor@opensuse.org>
4
+
5
+- Update to version 1.22.1
6
+
7
+-------------------------------------------------------------------
8
 Tue Feb  7 15:38:26 UTC 2023 - Simon Vogl <simon.vogl@gmx.net>
9
 
10
 - Removed the openh264 gstreamer plugin as openSUSE now ships the
11
gstreamer-plugins-bad-codecs.spec Changed
10
 
1
@@ -7,7 +7,7 @@
2
 %define _version 1.22.0
3
 
4
 Name:           gstreamer-plugins-bad-codecs
5
-Version:        1.22.0
6
+Version:        1.22.1
7
 Release:        0
8
 Summary:        Codecs/plugins for gstreamer-plugins-bad
9
 License:        LGPL-2.1-or-later
10
gst-plugins-bad-1.22.0.tar.xz/ChangeLog -> gst-plugins-bad-1.22.1.tar.xz/ChangeLog Changed
201
 
1
@@ -1,3 +1,462 @@
2
+=== release 1.22.1 ===
3
+
4
+2023-03-04 13:42:32 +0000  Tim-Philipp Müller <tim@centricular.com>
5
+
6
+   * NEWS:
7
+   * RELEASE:
8
+   * gst-plugins-bad.doap:
9
+   * meson.build:
10
+     Release 1.22.1
11
+
12
+2023-02-23 14:14:57 +0100  Piotr Brzeziński <piotr@centricular.com>
13
+
14
+   * sys/applemedia/meson.build:
15
+   * sys/applemedia/vtdec.c:
16
+   * sys/applemedia/vtdec.h:
17
+     vtdec: Correctly retrieve reorder queue length from SPS
18
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4110>
19
+
20
+2023-03-01 06:36:15 +1100  Jan Schmidt <jan@centricular.com>
21
+
22
+   * sys/applemedia/avfvideosrc.m:
23
+     avfvideosrc: Fix description and trailing whitespace
24
+     Minor fix to mention that the element is also useful on MacOS,
25
+     and remove some trailing whitespace
26
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4096>
27
+
28
+2023-03-01 06:32:19 +1100  Jan Schmidt <jan@centricular.com>
29
+
30
+   * sys/applemedia/avfvideosrc.m:
31
+     avfvideosrc: Don't wait on main thread for permissions request
32
+     Recursively invoking the NSMainLoop can cause crashes in
33
+     applications that don't expect it. Instead of waiting for
34
+     permission to be granted, move the wait later - until we
35
+     actually need device permissions when starting the capture
36
+     session. That moves the wait into the streaming thread
37
+     instead of the application thread that's setting the pipeline
38
+     state to READY.
39
+     Instead of a manual state change implementation to open
40
+     and close the device, use the basesrc start/stop methods that
41
+     are intended for the purpose.
42
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4096>
43
+
44
+2023-02-28 15:26:45 +0100  Piotr Brzeziński <piotr@centricular.com>
45
+
46
+   * sys/applemedia/vtenc.c:
47
+     vtenc: Fix checking for certain CPU variants when running in VMs
48
+     These checks were introduced to prevent exposing ARGB64/RGBA64 in the caps
49
+     when running on M1 Pro/Max with macOS <13 because of a bug in VideoToolbox.
50
+     Unfortunately, the initial buffer size of 15 is too short when running
51
+     in a VM - the CPU brand string there looks like "Apple M1 Pro (Virtual)",
52
+     which due to its length causes sysctlbyname to return -1, resulting in
53
+     broken formats still showing up in the caps.
54
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4082>
55
+
56
+2023-01-28 02:32:13 +0900  Seungha Yang <seungha@centricular.com>
57
+
58
+   * tools/gst-transcoder.c:
59
+     tools: Make sure UTF-8 encoded command line arguments on Windows
60
+     On Windows, arguments passed in main() are system codepage
61
+     encoded and might not be valid UTF-8 string.
62
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4072>
63
+
64
+2023-02-20 03:20:46 +0900  Seungha Yang <seungha@centricular.com>
65
+
66
+   * sys/nvcodec/gstnvencoder.cpp:
67
+     nvencoder: Fix b-frame encoding on Linux
68
+     On Windows, Win32 event handle is used to wait for encoded output,
69
+     but it's not available on Linux. We should delay bitstream locking
70
+     if encoder returns "need-more-input"
71
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4008>
72
+
73
+2023-02-22 00:47:09 +0900  Seungha Yang <seungha@centricular.com>
74
+
75
+   * gst/videoparsers/gsth265parse.c:
76
+   * tests/check/elements/h265parse.c:
77
+     h265parse: Always set profile on src caps
78
+     h265parse should provide profile for autoplugging
79
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4068>
80
+
81
+2023-02-24 21:58:00 +0800  He Junyan <junyan.he@intel.com>
82
+
83
+   * sys/va/gstjpegdecoder.c:
84
+     jpegdecoder: fail early if no input caps have been provided
85
+     The jpegdecoder class does not implement the ->parse() virtual function,
86
+     and we always need to add the jpegparse element before it. So we should
87
+     set_needs_format of the decoder to TRUE, then if no parse before it, it
88
+     can fail with a "not-negotiated" error early, rather than go on and
89
+     generate unexpected error.
90
+     Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1829
91
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4066>
92
+
93
+2023-02-24 21:49:27 +0800  He Junyan <junyan.he@intel.com>
94
+
95
+   * gst-libs/gst/codecs/gstav1decoder.c:
96
+     av1decoder: fail early if no input caps have been provided
97
+     The av1decoder class does not implement the ->parse() virtual function,
98
+     and we always need to add the av1parse element before it. So we should
99
+     set_needs_format of the decoder to TRUE, then if no parse before it, it
100
+     can fail with a "not-negotiated" error early, rather than go on and
101
+     generate unexpected error.
102
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4066>
103
+
104
+2023-02-24 21:38:48 +0800  He Junyan <junyan.he@intel.com>
105
+
106
+   * gst-libs/gst/codecs/gstvp9decoder.c:
107
+     vp9decoder: fail early if no input caps have been provided
108
+     The vp9decoder class does not implement the ->parse() virtual function,
109
+     and we always need to add the vp9parse element before it. So we should
110
+     set_needs_format of the decoder to TRUE, then if no parse before it, it
111
+     can fail with a "not-negotiated" error early, rather than go on and
112
+     generate unexpected error.
113
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4066>
114
+
115
+2023-02-24 21:27:27 +0800  He Junyan <junyan.he@intel.com>
116
+
117
+   * gst-libs/gst/codecs/gstvp8decoder.c:
118
+     vp8decoder: fail early if no input caps have been provided
119
+     The vp8decoder class does not implement the ->parse() virtual function,
120
+     it can only accepts frame aligned data. If some element such as filesrc
121
+     feed it with unaligned data, the behaviour is undecided. So we should
122
+     set_needs_format of the decoder to TRUE, then it can fail with a
123
+     "not-negotiated" error early, rather than go on and generate unexpected
124
+     error.
125
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4066>
126
+
127
+2023-02-24 21:12:40 +0800  He Junyan <junyan.he@intel.com>
128
+
129
+   * gst-libs/gst/codecs/gstmpeg2decoder.c:
130
+     mpeg2decoder: fail early if no input caps have been provided
131
+     The mpeg2decoder class does not implement the ->parse() virtual function,
132
+     and we always need to add the mpegvideoparse element before it. So we should
133
+     set_needs_format of the decoder to TRUE, then if no parse before it, it
134
+     can fail with a "not-negotiated" error early, rather than go on and
135
+     generate unexpected error.
136
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4066>
137
+
138
+2023-02-24 21:09:31 +0800  He Junyan <junyan.he@intel.com>
139
+
140
+   * gst-libs/gst/codecs/gsth264decoder.c:
141
+     h264decoder: fail early if no input caps have been provided
142
+     The h264decoder class does not implement the ->parse() virtual function,
143
+     and we always need to add the h264parse element before it. So we should
144
+     set_needs_format of the decoder to TRUE, then if no parse before it, it
145
+     can fail with a "not-negotiated" error early, rather than go on and
146
+     generate unexpected error.
147
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4066>
148
+
149
+2023-02-24 20:15:20 +0800  He Junyan <junyan.he@intel.com>
150
+
151
+   * gst-libs/gst/codecs/gsth265decoder.c:
152
+     h265decoder: fail early if no input caps have been provided
153
+     The h265decoder class does not implement the ->parse() virtual function,
154
+     and we always need to add the h265parse element before it. So we should
155
+     set_needs_format of the decoder to TRUE, then if no parse before it, it
156
+     can fail with a "not-negotiated" error early, rather than go on and
157
+     generate unexpected error.
158
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4066>
159
+
160
+2023-01-27 12:45:10 +0100  Robert Rosengren <robertr@axis.com>
161
+
162
+   * ext/curl/gstcurlhttpsrc.c:
163
+     curlhttpsrc: Add curl anyauth option
164
+     Add curl anyauth option to support http request to endpoints not using
165
+     only basic authentication (as default in curl). Also aligning with
166
+     curlhttpsink that already uses this option.
167
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4065>
168
+
169
+2023-02-22 15:18:12 +0100  Célestin Marot <c.marot@intopix.com>
170
+
171
+   * sys/d3d11/gstd3d11overlaycompositor.cpp:
172
+     d3d11overlaycompositor: fix texture width and height
173
+     The dimension of the overlay texture directly corresponds to the size of the overlay **buffer** which is given by its video meta.
174
+     The dimension at which the overlay should be displayed directly correspond to the overlay `render_width`and `render_height`.
175
+     This match the behavior of glimagesink
176
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4053>
177
+
178
+2023-02-22 11:52:38 +0000  Tim-Philipp Müller <tim@centricular.com>
179
+
180
+   * po/fur.po:
181
+     gst-plugins-bad: update translations
182
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4041>
183
+
184
+2023-02-16 15:03:25 +0800  Mengkejiergeli Ba <mengkejiergeli.ba@intel.com>
185
+
186
+   * gst-libs/gst/va/gstvaallocator.c:
187
+     vaallocator: Check return value from va_sync_surface
188
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4007>
189
+
190
+2023-02-09 16:54:16 +0800  Mengkejiergeli Ba <mengkejiergeli.ba@intel.com>
191
+
192
+   * sys/va/gstvaav1dec.c:
193
+   * sys/va/gstvabaseenc.c:
194
+   * sys/va/gstvabasetransform.c:
195
+   * sys/va/gstvaencoder.c:
196
+   * sys/va/gstvah264enc.c:
197
+     va: Fix some code defects
198
+     Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4007>
199
+
200
+2022-12-22 10:17:42 +0000  Philippe Normand <philn@igalia.com>
201
gst-plugins-bad-1.22.0.tar.xz/NEWS -> gst-plugins-bad-1.22.1.tar.xz/NEWS Changed
201
 
1
@@ -2,10 +2,13 @@
2
 
3
 GStreamer 1.22.0 was originally released on 23 January 2023.
4
 
5
+The latest bug-fix release in the stable 1.22 series is 1.22.1 and was
6
+released on 04 March 2023.
7
+
8
 See https://gstreamer.freedesktop.org/releases/1.22/ for the latest
9
 version of this document.
10
 
11
-Last updated: Monday 23 January 2023, 17:00 UTC (log)
12
+Last updated: Monday 04 March 2023, 13:00 UTC (log)
13
 
14
 Introduction
15
 
16
@@ -298,8 +301,8 @@
17
     -   This is enabled by setting the instant-uri property to true,
18
         setting the URI to switch to immediately, and then disabling the
19
         instant-uri property again afterwards.
20
--   playbin3, decodebin3, uridecodebin3, parsebin, and urisrc are no
21
-    longer experimental
22
+-   playbin3, decodebin3, uridecodebin3, parsebin, and urisourcebin are
23
+    no longer experimental
24
     -   They were originally marked as ‘technology preview’ but have
25
         since seen extensive usage in production settings, so are
26
         considered ready for general use now.
27
@@ -819,9 +822,9 @@
28
 
29
 New MP4 muxer + Fragmented MP4 muxer
30
 
31
--   fmp4mux: New fragmented MP4/ISOBMFF/CMAF muxer for generating
32
-    e.g. DASH/HLS media fragments.
33
--   isomp4mux: New non-fragmented, normal MP4 muxer.
34
+-   isofmp4mux, cmafmux, dashmp4mux, onviffmp4mux: New fragmented
35
+    MP4/ISOBMFF/CMAF muxer for generating e.g. DASH/HLS media fragments.
36
+-   isomp4mux, onvifmp4mux: New non-fragmented, normal MP4 muxer.
37
 
38
 Both plugins provides elements that replace the existing qtmux/mp4mux
39
 element from gst-plugins-good. While not feature-equivalent yet, the new
40
@@ -1217,6 +1220,240 @@
41
 
42
 1.22.0 was originally released on 23 January 2023.
43
 
44
+1.22.1
45
+
46
+The first 1.22 bug-fix release (1.22.1) was released on 04 March 2023.
47
+
48
+This release only contains bugfixes and it should be safe to update from
49
+1.22.0.
50
+
51
+Highlighted bugfixes in 1.22.1
52
+
53
+-   audio channel-mix: allow up to 64 channels (instead of up to 63
54
+    channels)
55
+-   avfvideosrc: Don’t wait on main thread for permissions request
56
+-   avvidenc: avoid generating inaccurate output timestamps, especially
57
+    with variable framerate streams
58
+-   AV1 video codec caps signalling improvements in various elements
59
+-   codectimestamper: Fix timestamping on sequence update
60
+-   d3d11overlaycompositor: fix texture width and height
61
+-   d3d11videosink: Fix rendering on external handle
62
+-   dashdemux2: fix seek operation taking a log time to finish for some
63
+    streams
64
+-   nvencoder: Fix B-frame encoding on Linux and min buffers in auto GPU
65
+    mode
66
+-   playbin3: fixing buffering for live pipelines
67
+-   playbin: fix potential deadlock when stopping stream with subtitles
68
+    visible
69
+-   redenc: fix setting of extension ID for twcc
70
+-   rtspsrc: improved compatibility with more broken RTSP servers
71
+-   v4l2h264dec: Fix Raspberry Pi4 will not play video in application
72
+-   vtdec: fix jittery playback of H.264 Level 4.1 movies in macOS
73
+-   vtdec: Fix non-deterministic frame output after flushing seeks
74
+-   vtenc: fix handling of interlaced ProRes on Apple M1 hardware
75
+-   vtenc: don’t advertise ARGB/RGBA64 input caps on M1 Pro/Max with
76
+    macOS <13
77
+-   wasapi2src: Fix loopback capture on Windows 10 Anniversary Update
78
+-   tools: better handling of non-ASCII command line arguments on
79
+    Windows
80
+-   gst-libav: fix build against newer ffmpeg versions
81
+-   gst-python: Use arch-specific install dir for gi overrides
82
+-   cerbero: Fix setuptools site.py breakage in Python 3.11
83
+-   macOS packages: Fix broken binaries on macos < 11.0
84
+-   various bug fixes, memory leak fixes, and other stability and
85
+    reliability improvements
86
+
87
+gstreamer
88
+
89
+-   buffer: fix copy meta reference debug log formatting
90
+-   bin: Don’t unlock unlocked mutex in gst_bin_remove_func()
91
+-   pad: Don’t leak user_data in gst_pad_start_task()
92
+-   aggregator: Always lock aggpad around update_time_level
93
+-   inputselector: Avoid potential deadlock when shutting down,
94
+    e.g. playbin with subtitles
95
+-   multiqueue: Handle use-interleave latency live pipelines, fixing
96
+    buffering for live pipelines in playbin3
97
+-   GstBaseSrc: fix transfer annotation for fixate() virtual method
98
+-   GstBaseSrc, GstPushSrc: add nullable annotations to virtual methods
99
+-   tools: Make sure UTF-8 encoded command line arguments on Windows
100
+
101
+gst-plugins-base
102
+
103
+-   alsasink: Fix stall when going from PLAYING to NULL (stucked at
104
+    PAUSED) with uac1 gadget
105
+-   appsrc: Don’t chain up BaseSrc::negotiate()
106
+-   audio: channel-mix: Fix channel count limit to be able to equal 64
107
+-   gldisplay: Mark gst_gl_display_create_context() other_context
108
+    parameter as nullable
109
+-   gldisplay: Remove unused code
110
+-   gstglwindow_x11.c: Fix colormap leak
111
+-   gl/cocoa: Return a strong ref to the parent GstGLContext
112
+-   rtspconnection: Annotate RTSP message and RTSP events parameters
113
+    correctly
114
+-   sdp, typefind: Fix some annotations
115
+-   sdp: gstmikey: gst_mikey_message_to_caps: extract ROC from first
116
+    crypto session
117
+-   subparse: Properly forward segment seqnum
118
+-   uridecodebin: Set source element to READY before querying it
119
+-   uritranscodebin: Fix unref of NULL
120
+-   gst-play-1.0: Don’t force accurate seeking
121
+
122
+gst-plugins-good
123
+
124
+-   adaptivedemux2: Fix buffering threshold initialization
125
+-   dashdemux2: the seek operation takes a log time to finish for some
126
+    streams
127
+-   glvideomixer: Keep a reference to the underlying pad
128
+-   qtdemux: Don’t emit GstSegment correcting start time when in MSE
129
+    mode
130
+-   qtdemux: Handle moov atom length=0 case by reading until the end
131
+-   qtdemux, qtmux: Drop av1C version 0 parsing and implement version 1
132
+    parsing/writing
133
+-   qtmux: Fix assertion on caps update
134
+-   redenc: fix setting of extension ID for twcc
135
+-   rtspsrc: Use the correct vfunc for the push-backchannel-sample
136
+    action signal
137
+-   rtpssrcdemux: set different stream-id on each src pad
138
+-   udpsrc: GstSocketTimestampMessage only for SCM_TIMESTAMPNS
139
+-   v4l2h264dec: Fix Raspberry Pi4 will not play video in application
140
+
141
+gst-plugins-bad
142
+
143
+-   aom: Include stream-format and alignment in the AV1 caps
144
+-   av1parser, h265parser: Fix some code defects
145
+-   av1parser: Don’t consider unknown metadata OBUs a bitstream error
146
+-   avfvideosrc: Don’t wait on main thread for permissions request
147
+-   ccconverter: don’t debug a potentially freed filter caps
148
+-   codectimestamper: Fix timestamping on sequence update
149
+-   codecparsers: {h264, h265}bitwriter: Remove redundant condition
150
+    checks
151
+-   codecs: decoders: fail early if no input caps have been provided for
152
+    all new decoder base classes
153
+-   closedcaption: Don’t leak caps event
154
+-   curlhttpsrc: Add curl anyauth option
155
+-   d3d11overlaycompositor: fix texture width and height
156
+-   d3d11videosink: Fix rendering on external handle
157
+-   h265parse: Always set profile on src caps
158
+-   msdkav1enc: fix the category for msdkav1enc debug
159
+-   nvcodec: improve error reporting on plugin init
160
+-   nvencoder: Fix b-frame encoding on Linux
161
+-   nvencoder: Fix min buffers parameter of allocation query in auto GPU
162
+    mode
163
+-   nvvp9dec: Fix return value
164
+-   qsvav1enc, amfav1enc: Set stream-format on caps
165
+-   vtdec: Jittery playback of H.264 Level 4.1 movies in macOS (both
166
+    x86_64 and arm64)
167
+-   vtdec: Fix DPB size calculations not taking values from SPS into
168
+    account
169
+-   vtdec: Fix not waiting for async frames when flushing
170
+-   vtenc: Disable ARGB/RGBA64 caps on M1 Pro/Max with macOS <13
171
+-   vtenc: Fix checking for certain CPU variants when running in VMs
172
+-   vtenc: Disable HW acceleration for interlaced ProRes
173
+-   va: Avoid the array index overflow when filling 8x8 scaling list.
174
+-   va: Fix some code defects
175
+-   vah265enc: Use helper to update properties.
176
+-   vulkan: memory: Flush non coherent memory after write.
177
+-   wasapi2src: Fix loopback capture on Windows 10 Anniversary Update
178
+-   webrtcbin: small stats improvements
179
+-   win32ipcutils: Add missing include
180
+-   wpe: Logging fixes for the WebExtension
181
+
182
+gst-plugins-ugly
183
+
184
+-   mpegpsdemux: Ignore DTS if PTS < DTS
185
+
186
+gst-libav
187
+
188
+-   avauddec, avviddec: Free packet side data after usage
189
+-   avviddec: change
190
+    AV_CODEC_CAP_AUTO_THREADS->AV_CODEC_CAP_OTHER_THREADS to fix build
191
+    against newer ffmpeg versions
192
+-   Memory leak in ’ av_packet_add_side_data’ in
193
+    /lib/x86_64-linux-gnu/libavcodec.so reading the file
194
+    clock_odd_size_RLE_g1597902.avi
195
+-   avvidenc: Don’t take ffmpeg timestamps verbatim but only use them to
196
+    calculate DTS
197
+
198
+gst-rtsp-server
199
+
200
+-   No changes
201
gst-plugins-bad-1.22.0.tar.xz/RELEASE -> gst-plugins-bad-1.22.1.tar.xz/RELEASE Changed
7
 
1
@@ -1,4 +1,4 @@
2
-This is GStreamer gst-plugins-bad 1.22.0.
3
+This is GStreamer gst-plugins-bad 1.22.1.
4
 
5
 The GStreamer team is thrilled to announce a new major feature release
6
 of your favourite cross-platform multimedia framework!
7
gst-plugins-bad-1.22.0.tar.xz/docs/plugins/gst_plugins_cache.json -> gst-plugins-bad-1.22.1.tar.xz/docs/plugins/gst_plugins_cache.json Changed
28
 
1
@@ -1113,7 +1113,7 @@
2
                 "long-name": "AV1 Decoder",
3
                 "pad-templates": {
4
                     "sink": {
5
-                        "caps": "video/x-av1:\n",
6
+                        "caps": "video/x-av1:\n  stream-format: obu-stream\n      alignment: tu\n",
7
                         "direction": "sink",
8
                         "presence": "always"
9
                     },
10
@@ -1149,7 +1149,7 @@
11
                         "presence": "always"
12
                     },
13
                     "src": {
14
-                        "caps": "video/x-av1:\n      alignment: tu\n",
15
+                        "caps": "video/x-av1:\n  stream-format: obu-stream\n      alignment: tu\n",
16
                         "direction": "src",
17
                         "presence": "always"
18
                     }
19
@@ -225397,7 +225397,7 @@
20
                         "presence": "always"
21
                     },
22
                     "src": {
23
-                        "caps": "video/x-av1:\n          width:  16, 8192 \n         height:  16, 8192 \n      alignment: tu\n",
24
+                        "caps": "video/x-av1:\n          width:  16, 8192 \n         height:  16, 8192 \n  stream-format: obu-stream\n      alignment: tu\n",
25
                         "direction": "src",
26
                         "presence": "always"
27
                     }
28
gst-plugins-bad-1.22.0.tar.xz/ext/aom/gstav1dec.c -> gst-plugins-bad-1.22.1.tar.xz/ext/aom/gstav1dec.c Changed
11
 
1
@@ -44,7 +44,8 @@
2
 GST_STATIC_PAD_TEMPLATE ("sink",
3
     GST_PAD_SINK,
4
     GST_PAD_ALWAYS,
5
-    GST_STATIC_CAPS ("video/x-av1")
6
+    GST_STATIC_CAPS ("video/x-av1, "
7
+        "stream-format = (string) obu-stream, " "alignment = (string) tu")
8
     );
9
 
10
 static GstStaticPadTemplate gst_av1_dec_src_pad_template =
11
gst-plugins-bad-1.22.0.tar.xz/ext/aom/gstav1enc.c -> gst-plugins-bad-1.22.1.tar.xz/ext/aom/gstav1enc.c Changed
11
 
1
@@ -285,7 +285,8 @@
2
 GST_STATIC_PAD_TEMPLATE ("src",
3
     GST_PAD_SRC,
4
     GST_PAD_ALWAYS,
5
-    GST_STATIC_CAPS ("video/x-av1, alignment = (string) tu")
6
+    GST_STATIC_CAPS ("video/x-av1, "
7
+        "stream-format = (string) obu-stream, " "alignment = (string) tu")
8
     );
9
 
10
 static void
11
gst-plugins-bad-1.22.0.tar.xz/ext/closedcaption/gstccconverter.c -> gst-plugins-bad-1.22.1.tar.xz/ext/closedcaption/gstccconverter.c Changed
18
 
1
@@ -352,7 +352,6 @@
2
 
3
     tmp = gst_caps_intersect_full (filter, res, GST_CAPS_INTERSECT_FIRST);
4
     gst_caps_unref (res);
5
-    gst_caps_unref (filter);
6
     res = tmp;
7
   }
8
 
9
@@ -363,6 +362,8 @@
10
   GST_DEBUG_OBJECT (self, "filter %" GST_PTR_FORMAT, filter);
11
   GST_DEBUG_OBJECT (self, "to %" GST_PTR_FORMAT, res);
12
 
13
+  gst_clear_caps (&filter);
14
+
15
   return res;
16
 }
17
 
18
gst-plugins-bad-1.22.0.tar.xz/ext/closedcaption/gstceaccoverlay.c -> gst-plugins-bad-1.22.1.tar.xz/ext/closedcaption/gstceaccoverlay.c Changed
54
 
1
@@ -1000,7 +1000,6 @@
2
             ("received non-TIME newsegment event on text input"));
3
       }
4
 
5
-      gst_event_unref (event);
6
       ret = TRUE;
7
 
8
       /* wake up the video chain, it might be waiting for a text buffer or
9
@@ -1027,7 +1026,6 @@
10
       GST_CEA_CC_OVERLAY_BROADCAST (overlay);
11
       GST_CEA_CC_OVERLAY_UNLOCK (overlay);
12
 
13
-      gst_event_unref (event);
14
       ret = TRUE;
15
       break;
16
     }
17
@@ -1039,7 +1037,6 @@
18
       gst_cea_cc_overlay_pop_text (overlay);
19
       gst_segment_init (&overlay->cc_segment, GST_FORMAT_TIME);
20
       GST_CEA_CC_OVERLAY_UNLOCK (overlay);
21
-      gst_event_unref (event);
22
       ret = TRUE;
23
       break;
24
     case GST_EVENT_FLUSH_START:
25
@@ -1048,7 +1045,6 @@
26
       overlay->cc_flushing = TRUE;
27
       GST_CEA_CC_OVERLAY_BROADCAST (overlay);
28
       GST_CEA_CC_OVERLAY_UNLOCK (overlay);
29
-      gst_event_unref (event);
30
       ret = TRUE;
31
       break;
32
     case GST_EVENT_EOS:
33
@@ -1059,14 +1055,18 @@
34
        * a text segment update */
35
       GST_CEA_CC_OVERLAY_BROADCAST (overlay);
36
       GST_CEA_CC_OVERLAY_UNLOCK (overlay);
37
-      gst_event_unref (event);
38
       ret = TRUE;
39
       break;
40
     default:
41
-      ret = gst_pad_event_default (pad, parent, event);
42
       break;
43
   }
44
 
45
+  if (ret) {
46
+    gst_event_unref (event);
47
+  } else {
48
+    ret = gst_pad_event_default (pad, parent, event);
49
+  }
50
+
51
   return ret;
52
 }
53
 
54
gst-plugins-bad-1.22.0.tar.xz/ext/curl/gstcurlhttpsrc.c -> gst-plugins-bad-1.22.1.tar.xz/ext/curl/gstcurlhttpsrc.c Changed
9
 
1
@@ -1116,6 +1116,7 @@
2
   gst_curl_setopt_str (s, handle, CURLOPT_NOPROXY, s->no_proxy_list);
3
   gst_curl_setopt_str (s, handle, CURLOPT_PROXYUSERNAME, s->proxy_user);
4
   gst_curl_setopt_str (s, handle, CURLOPT_PROXYPASSWORD, s->proxy_pass);
5
+  gst_curl_setopt_generic (s, handle, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
6
 
7
   for (i = 0; i < s->number_cookies; i++) {
8
     gst_curl_setopt_str (s, handle, CURLOPT_COOKIELIST, s->cookiesi);
9
gst-plugins-bad-1.22.0.tar.xz/ext/webrtc/gstwebrtcstats.c -> gst-plugins-bad-1.22.1.tar.xz/ext/webrtc/gstwebrtcstats.c Changed
19
 
1
@@ -792,6 +792,9 @@
2
 
3
   if (wpad->received_caps)
4
     caps = gst_caps_ref (wpad->received_caps);
5
+  else
6
+    caps = gst_pad_get_current_caps (pad);
7
+
8
   GST_DEBUG_OBJECT (pad, "Pad caps are: %" GST_PTR_FORMAT, caps);
9
   if (caps && gst_caps_is_fixed (caps)) {
10
     GstStructure *caps_s = gst_caps_get_structure (caps, 0);
11
@@ -974,6 +977,7 @@
12
       ts_stats.source_stats->n_values, ts_stats.stream->transport);
13
 
14
   ts_stats.s = s;
15
+  ts_stats.clock_rate = clock_rate;
16
 
17
   transport_stream_find_ssrc_map_item (ts_stats.stream, &ts_stats,
18
       (FindSsrcMapFunc) webrtc_stats_get_from_transport);
19
gst-plugins-bad-1.22.0.tar.xz/ext/wpe/WPEThreadedView.cpp -> gst-plugins-bad-1.22.1.tar.xz/ext/wpe/WPEThreadedView.cpp Changed
9
 
1
@@ -296,6 +296,7 @@
2
     GVariant *params = webkit_user_message_get_parameters (message);
3
     gboolean res = TRUE;
4
 
5
+    GST_TRACE_OBJECT(src, "Handling message %s", name);
6
     if (!g_strcmp0(name, "gstwpe.new_stream")) {
7
         guint32 id = g_variant_get_uint32 (g_variant_get_child_value (params, 0));
8
         const gchar *capsstr = g_variant_get_string (g_variant_get_child_value (params, 1), NULL);
9
gst-plugins-bad-1.22.0.tar.xz/ext/wpe/wpe-extension/gstwpeextension.c -> gst-plugins-bad-1.22.1.tar.xz/ext/wpe/wpe-extension/gstwpeextension.c Changed
29
 
1
@@ -30,6 +30,9 @@
2
 #include <gio/gunixfdlist.h>
3
 #include <wpe/webkit-web-extension.h>
4
 
5
+GST_DEBUG_CATEGORY_STATIC (wpe_extension_debug);
6
+#define GST_CAT_DEFAULT wpe_extension_debug
7
+
8
 G_MODULE_EXPORT void webkit_web_extension_initialize (WebKitWebExtension *
9
     extension);
10
 
11
@@ -42,13 +45,16 @@
12
 
13
   gst_init (NULL, NULL);
14
 
15
+  GST_DEBUG_CATEGORY_INIT (wpe_extension_debug, "wpewebextension", 0,
16
+      "GstWPE WebExtension");
17
+
18
   /* Register our own audio sink to */
19
   gst_element_register (NULL, "gstwpeaudiosink", GST_RANK_PRIMARY + 500,
20
       gst_wpe_audio_sink_get_type ());
21
   gst_object_unref (g_object_new (gst_wpe_bus_msg_forwarder_get_type (), NULL));
22
 
23
   global_extension = extension;
24
-  GST_INFO_OBJECT (global_extension, "Setting as global extension.");
25
+  GST_INFO ("Setting as global extension.");
26
 }
27
 
28
 void
29
gst-plugins-bad-1.22.0.tar.xz/gst-libs/gst/codecparsers/gstav1parser.c -> gst-plugins-bad-1.22.1.tar.xz/gst-libs/gst/codecparsers/gstav1parser.c Changed
20
 
1
@@ -697,7 +697,7 @@
2
   }
3
 
4
   if (!size) {
5
-    return ret = GST_AV1_PARSER_NO_MORE_DATA;
6
+    ret = GST_AV1_PARSER_NO_MORE_DATA;
7
     goto error;
8
   }
9
 
10
@@ -1781,7 +1781,8 @@
11
           &bit_reader, &(metadata->timecode));
12
       break;
13
     default:
14
-      return GST_AV1_PARSER_BITSTREAM_ERROR;
15
+      GST_WARNING ("Unknown metadata type %u", metadata->metadata_type);
16
+      return GST_AV1_PARSER_OK;
17
   }
18
 
19
   if (retval != GST_AV1_PARSER_OK)
20
gst-plugins-bad-1.22.0.tar.xz/gst-libs/gst/codecparsers/gsth264bitwriter.c -> gst-plugins-bad-1.22.1.tar.xz/gst-libs/gst/codecparsers/gsth264bitwriter.c Changed
11
 
1
@@ -1492,8 +1492,7 @@
2
   gboolean have_space = TRUE;
3
   GstBitWriter bw;
4
 
5
-  g_return_val_if_fail (primary_pic_type >= 0
6
-      && primary_pic_type <= 7, GST_H264_BIT_WRITER_ERROR);
7
+  g_return_val_if_fail (primary_pic_type <= 7, GST_H264_BIT_WRITER_ERROR);
8
   g_return_val_if_fail (data != NULL, GST_H264_BIT_WRITER_ERROR);
9
   g_return_val_if_fail (size != NULL, GST_H264_BIT_WRITER_ERROR);
10
   g_return_val_if_fail (*size > 0, GST_H264_BIT_WRITER_ERROR);
11
gst-plugins-bad-1.22.0.tar.xz/gst-libs/gst/codecparsers/gsth265bitwriter.c -> gst-plugins-bad-1.22.1.tar.xz/gst-libs/gst/codecparsers/gsth265bitwriter.c Changed
12
 
1
@@ -1792,8 +1792,8 @@
2
   g_return_val_if_fail (data != NULL, GST_H265_BIT_WRITER_ERROR);
3
   g_return_val_if_fail (size != NULL, GST_H265_BIT_WRITER_ERROR);
4
   g_return_val_if_fail (*size > 0, GST_H265_BIT_WRITER_ERROR);
5
-  g_return_val_if_fail (nal_type >= GST_H265_NAL_SLICE_TRAIL_N &&
6
-      nal_type <= GST_H265_NAL_SLICE_CRA_NUT, GST_H265_BIT_WRITER_ERROR);
7
+  g_return_val_if_fail (nal_type <= GST_H265_NAL_SLICE_CRA_NUT,
8
+      GST_H265_BIT_WRITER_ERROR);
9
 
10
   gst_bit_writer_init_with_data (&bw, data, *size, FALSE);
11
 
12
gst-plugins-bad-1.22.0.tar.xz/gst-libs/gst/codecparsers/gsth265parser.c -> gst-plugins-bad-1.22.1.tar.xz/gst-libs/gst/codecparsers/gsth265parser.c Changed
24
 
1
@@ -1889,7 +1889,8 @@
2
     for (j = 0; j <= vps->max_layer_id; j++) {
3
       /* layer_id_included_flagij */
4
       /* FIXME: need to parse this when we can support parsing multi-layer info. */
5
-      nal_reader_skip (&nr, 1);
6
+      if (!nal_reader_skip (&nr, 1))
7
+        goto error;
8
     }
9
   }
10
 
11
@@ -2762,8 +2763,10 @@
12
   }
13
 
14
   if (!slice->dependent_slice_segment_flag) {
15
-    for (i = 0; i < pps->num_extra_slice_header_bits; i++)
16
-      nal_reader_skip (&nr, 1);
17
+    for (i = 0; i < pps->num_extra_slice_header_bits; i++) {
18
+      if (!nal_reader_skip (&nr, 1))
19
+        goto error;
20
+    }
21
     READ_UE_MAX (&nr, slice->type, 63);
22
 
23
     if (pps->output_flag_present_flag)
24
gst-plugins-bad-1.22.0.tar.xz/gst-libs/gst/codecs/gstav1decoder.c -> gst-plugins-bad-1.22.1.tar.xz/gst-libs/gst/codecs/gstav1decoder.c Changed
9
 
1
@@ -119,6 +119,7 @@
2
   GstAV1DecoderPrivate *priv;
3
 
4
   gst_video_decoder_set_packetized (GST_VIDEO_DECODER (self), TRUE);
5
+  gst_video_decoder_set_needs_format (GST_VIDEO_DECODER (self), TRUE);
6
 
7
   self->priv = priv = gst_av1_decoder_get_instance_private (self);
8
 
9
gst-plugins-bad-1.22.0.tar.xz/gst-libs/gst/codecs/gsth264decoder.c -> gst-plugins-bad-1.22.1.tar.xz/gst-libs/gst/codecs/gsth264decoder.c Changed
9
 
1
@@ -340,6 +340,7 @@
2
   GstH264DecoderPrivate *priv;
3
 
4
   gst_video_decoder_set_packetized (GST_VIDEO_DECODER (self), TRUE);
5
+  gst_video_decoder_set_needs_format (GST_VIDEO_DECODER (self), TRUE);
6
 
7
   self->priv = priv = gst_h264_decoder_get_instance_private (self);
8
 
9
gst-plugins-bad-1.22.0.tar.xz/gst-libs/gst/codecs/gsth265decoder.c -> gst-plugins-bad-1.22.1.tar.xz/gst-libs/gst/codecs/gsth265decoder.c Changed
9
 
1
@@ -218,6 +218,7 @@
2
   GstH265DecoderPrivate *priv;
3
 
4
   gst_video_decoder_set_packetized (GST_VIDEO_DECODER (self), TRUE);
5
+  gst_video_decoder_set_needs_format (GST_VIDEO_DECODER (self), TRUE);
6
 
7
   self->priv = priv = gst_h265_decoder_get_instance_private (self);
8
 
9
gst-plugins-bad-1.22.0.tar.xz/gst-libs/gst/codecs/gstmpeg2decoder.c -> gst-plugins-bad-1.22.1.tar.xz/gst-libs/gst/codecs/gstmpeg2decoder.c Changed
9
 
1
@@ -329,6 +329,7 @@
2
 gst_mpeg2_decoder_init (GstMpeg2Decoder * self)
3
 {
4
   gst_video_decoder_set_packetized (GST_VIDEO_DECODER (self), TRUE);
5
+  gst_video_decoder_set_needs_format (GST_VIDEO_DECODER (self), TRUE);
6
 
7
   self->priv = gst_mpeg2_decoder_get_instance_private (self);
8
 
9
gst-plugins-bad-1.22.0.tar.xz/gst-libs/gst/codecs/gstvp8decoder.c -> gst-plugins-bad-1.22.1.tar.xz/gst-libs/gst/codecs/gstvp8decoder.c Changed
9
 
1
@@ -102,6 +102,7 @@
2
 gst_vp8_decoder_init (GstVp8Decoder * self)
3
 {
4
   gst_video_decoder_set_packetized (GST_VIDEO_DECODER (self), TRUE);
5
+  gst_video_decoder_set_needs_format (GST_VIDEO_DECODER (self), TRUE);
6
 
7
   self->priv = gst_vp8_decoder_get_instance_private (self);
8
 }
9
gst-plugins-bad-1.22.0.tar.xz/gst-libs/gst/codecs/gstvp9decoder.c -> gst-plugins-bad-1.22.1.tar.xz/gst-libs/gst/codecs/gstvp9decoder.c Changed
9
 
1
@@ -140,6 +140,7 @@
2
 gst_vp9_decoder_init (GstVp9Decoder * self)
3
 {
4
   gst_video_decoder_set_packetized (GST_VIDEO_DECODER (self), TRUE);
5
+  gst_video_decoder_set_needs_format (GST_VIDEO_DECODER (self), TRUE);
6
 
7
   self->priv = gst_vp9_decoder_get_instance_private (self);
8
 
9
gst-plugins-bad-1.22.0.tar.xz/gst-libs/gst/va/gstvaallocator.c -> gst-plugins-bad-1.22.1.tar.xz/gst-libs/gst/va/gstvaallocator.c Changed
11
 
1
@@ -414,7 +414,8 @@
2
     return NULL;
3
   }
4
 
5
-  va_sync_surface (self->display, surface);
6
+  if (!va_sync_surface (self->display, surface))
7
+    return NULL;
8
 
9
   return self->parent_map (gmem, maxsize, flags);
10
 }
11
gst-plugins-bad-1.22.0.tar.xz/gst-libs/gst/vulkan/gstvkmemory.c -> gst-plugins-bad-1.22.1.tar.xz/gst-libs/gst/vulkan/gstvkmemory.c Changed
29
 
1
@@ -142,6 +142,27 @@
2
 static void
3
 _vk_mem_unmap_full (GstVulkanMemory * mem, GstMapInfo * info)
4
 {
5
+  if ((info->flags & GST_MAP_WRITE)
6
+      && !(mem->properties & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT)) {
7
+    GError *error = NULL;
8
+    VkResult err;
9
+    VkMappedMemoryRange range = {
10
+      .sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE,
11
+      /* .pNext = */
12
+      .memory = mem->mem_ptr,
13
+      .offset = mem->vk_offset,
14
+      .size = mem->mem.size,
15
+    };
16
+
17
+    err = vkFlushMappedMemoryRanges (mem->device->device, 1u, &range);
18
+    if (gst_vulkan_error_to_g_error (err, &error,
19
+            "vkFlushMappedMemoryRanges") < 0) {
20
+      GST_CAT_WARNING (GST_CAT_VULKAN_MEMORY, "Failed to flush memory: %s",
21
+          error->message);
22
+      g_clear_error (&error);
23
+    }
24
+  }
25
+
26
   vkUnmapMemory (mem->device->device, mem->mem_ptr);
27
 }
28
 
29
gst-plugins-bad-1.22.0.tar.xz/gst-plugins-bad.doap -> gst-plugins-bad-1.22.1.tar.xz/gst-plugins-bad.doap Changed
18
 
1
@@ -35,6 +35,16 @@
2
 
3
  <release>
4
   <Version>
5
+   <revision>1.22.1</revision>
6
+   <branch>1.22</branch>
7
+   <name></name>
8
+   <created>2023-03-04</created>
9
+   <file-release rdf:resource="https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.22.1.tar.xz" />
10
+  </Version>
11
+ </release>
12
+
13
+ <release>
14
+  <Version>
15
    <revision>1.22.0</revision>
16
    <branch>main</branch>
17
    <name></name>
18
gst-plugins-bad-1.22.0.tar.xz/gst/codectimestamper/gstcodectimestamper.c -> gst-plugins-bad-1.22.1.tar.xz/gst/codectimestamper/gstcodectimestamper.c Changed
78
 
1
@@ -445,7 +445,7 @@
2
   GST_BUFFER_PTS (frame->buffer) = frame->pts;
3
   GST_BUFFER_DTS (frame->buffer) = dts;
4
 
5
-  GST_TRACE_OBJECT (self, "Output %" GST_PTR_FORMAT, frame->buffer);
6
+  GST_LOG_OBJECT (self, "Output %" GST_PTR_FORMAT, frame->buffer);
7
 
8
   ret = gst_pad_push (self->srcpad, g_steal_pointer (&frame->buffer));
9
 
10
@@ -477,15 +477,15 @@
11
 {
12
   GstCodecTimestamperPrivate *priv = self->priv;
13
 
14
+  GST_DEBUG_OBJECT (self, "Draining");
15
+
16
   while (gst_queue_array_get_length (priv->queue) > 0) {
17
     GstCodecTimestamperFrame *frame = (GstCodecTimestamperFrame *)
18
         gst_queue_array_pop_head_struct (priv->queue);
19
     gst_codec_timestamper_output_frame (self, frame);
20
   }
21
 
22
-  priv->time_adjustment = GST_CLOCK_TIME_NONE;
23
-  priv->last_dts = GST_CLOCK_TIME_NONE;
24
-  priv->last_pts = GST_CLOCK_TIME_NONE;
25
+  GST_DEBUG_OBJECT (self, "Drained");
26
 }
27
 
28
 static gint
29
@@ -509,7 +509,7 @@
30
 
31
   gst_codec_timestamper_frame_init (&frame);
32
 
33
-  GST_TRACE_OBJECT (self, "Handle %" GST_PTR_FORMAT, buffer);
34
+  GST_LOG_OBJECT (self, "Handle %" GST_PTR_FORMAT, buffer);
35
 
36
   pts = GST_BUFFER_PTS (buffer);
37
   dts = GST_BUFFER_DTS (buffer);
38
@@ -517,15 +517,24 @@
39
   if (!GST_CLOCK_TIME_IS_VALID (priv->time_adjustment)) {
40
     GstClockTime start_time = GST_CLOCK_TIME_NONE;
41
 
42
-    if (GST_CLOCK_TIME_IS_VALID (pts))
43
+    if (GST_CLOCK_TIME_IS_VALID (pts)) {
44
+      GST_DEBUG_OBJECT (self, "Got valid PTS: %" GST_TIME_FORMAT,
45
+          GST_TIME_ARGS (pts));
46
       start_time = MAX (pts, priv->in_segment.start);
47
-    else if (GST_CLOCK_TIME_IS_VALID (dts))
48
+    } else if (GST_CLOCK_TIME_IS_VALID (dts)) {
49
+      GST_DEBUG_OBJECT (self, "Got valid DTS: %" GST_TIME_FORMAT,
50
+          GST_TIME_ARGS (dts));
51
       start_time = MAX (dts, priv->in_segment.start);
52
-    else
53
+    } else {
54
+      GST_WARNING_OBJECT (self, "Both PTS and DTS are invalid");
55
       start_time = priv->in_segment.start;
56
+    }
57
 
58
-    if (start_time < min_pts)
59
+    if (start_time < min_pts) {
60
       priv->time_adjustment = min_pts - start_time;
61
+      GST_DEBUG_OBJECT (self, "Updating time-adjustment %" GST_TIME_FORMAT,
62
+          GST_TIME_ARGS (priv->time_adjustment));
63
+    }
64
   }
65
 
66
   if (GST_CLOCK_TIME_IS_VALID (priv->time_adjustment)) {
67
@@ -557,6 +566,10 @@
68
   frame.events = priv->current_frame_events;
69
   priv->current_frame_events = NULL;
70
 
71
+  GST_LOG_OBJECT (self, "Enqueue frame, buffer pts %" GST_TIME_FORMAT
72
+      ", adjusted pts %" GST_TIME_FORMAT,
73
+      GST_TIME_ARGS (GST_BUFFER_PTS (buffer)), GST_TIME_ARGS (pts));
74
+
75
   gst_queue_array_push_tail_struct (priv->queue, &frame);
76
   if (GST_CLOCK_TIME_IS_VALID (frame.pts)) {
77
     g_array_append_val (priv->timestamp_queue, frame.pts);
78
gst-plugins-bad-1.22.0.tar.xz/gst/mpegdemux/gstmpegdemux.c -> gst-plugins-bad-1.22.1.tar.xz/gst/mpegdemux/gstmpegdemux.c Changed
18
 
1
@@ -712,6 +712,16 @@
2
 
3
   gst_ps_demux_send_segment (demux, stream, pts);
4
 
5
+  /* Ignores DTS if PTS < DTS. Maybe additional sanity checking is possible
6
+   * by comparing 33bits timestap rollover case, but PTS < DTS is already
7
+   * invalid case */
8
+  if (GST_CLOCK_TIME_IS_VALID (pts) && GST_CLOCK_TIME_IS_VALID (dts) &&
9
+      dts > pts) {
10
+    GST_WARNING_OBJECT (demux, "PTS (%" GST_TIME_FORMAT ") < DTS (%"
11
+        GST_TIME_FORMAT ")", GST_TIME_ARGS (pts), GST_TIME_ARGS (dts));
12
+    dts = GST_CLOCK_TIME_NONE;
13
+  }
14
+
15
   /* OK, sent new segment now prepare the buffer for sending */
16
   GST_BUFFER_PTS (buf) = pts;
17
   GST_BUFFER_DTS (buf) = dts;
18
gst-plugins-bad-1.22.0.tar.xz/gst/transcode/gsturitranscodebin.c -> gst-plugins-bad-1.22.1.tar.xz/gst/transcode/gsturitranscodebin.c Changed
17
 
1
@@ -603,13 +603,13 @@
2
       break;
3
     case PROP_AUDIO_FILTER:
4
       GST_OBJECT_LOCK (self);
5
-      gst_object_unref (self->audio_filter);
6
+      gst_clear_object (&self->audio_filter);
7
       self->audio_filter = g_value_dup_object (value);
8
       GST_OBJECT_UNLOCK (self);
9
       break;
10
     case PROP_VIDEO_FILTER:
11
       GST_OBJECT_LOCK (self);
12
-      gst_object_unref (self->video_filter);
13
+      gst_clear_object (&self->video_filter);
14
       self->video_filter = g_value_dup_object (value);
15
       GST_OBJECT_UNLOCK (self);
16
       break;
17
gst-plugins-bad-1.22.0.tar.xz/gst/videoparsers/gsth265parse.c -> gst-plugins-bad-1.22.1.tar.xz/gst/videoparsers/gsth265parse.c Changed
62
 
1
@@ -2368,6 +2368,60 @@
2
       GstH265Profile p;
3
 
4
       p = gst_h265_get_profile_from_sps (sps);
5
+      /* gst_h265_get_profile_from_sps() method will determine profile
6
+       * as defined in spec, with allowing slightly broken profile-tier-level
7
+       * bits, then it might not be able to cover all cases.
8
+       * If it's still unknown, do guess again */
9
+      if (p == GST_H265_PROFILE_INVALID) {
10
+        GST_WARNING_OBJECT (h265parse, "Unknown profile, guessing");
11
+        switch (sps->chroma_format_idc) {
12
+          case 0:
13
+            if (sps->bit_depth_luma_minus8 == 0) {
14
+              p = GST_H265_PROFILE_MONOCHROME;
15
+            } else if (sps->bit_depth_luma_minus8 <= 2) {
16
+              p = GST_H265_PROFILE_MONOCHROME_10;
17
+            } else if (sps->bit_depth_luma_minus8 <= 4) {
18
+              p = GST_H265_PROFILE_MONOCHROME_12;
19
+            } else {
20
+              p = GST_H265_PROFILE_MONOCHROME_16;
21
+            }
22
+            break;
23
+          case 1:
24
+            if (sps->bit_depth_luma_minus8 == 0) {
25
+              p = GST_H265_PROFILE_MAIN;
26
+            } else if (sps->bit_depth_luma_minus8 <= 2) {
27
+              p = GST_H265_PROFILE_MAIN_10;
28
+            } else if (sps->bit_depth_luma_minus8 <= 4) {
29
+              p = GST_H265_PROFILE_MAIN_12;
30
+            } else {
31
+              p = GST_H265_PROFILE_MAIN_444_16_INTRA;
32
+            }
33
+            break;
34
+          case 2:
35
+            if (sps->bit_depth_luma_minus8 <= 2) {
36
+              p = GST_H265_PROFILE_MAIN_422_10;
37
+            } else if (sps->bit_depth_luma_minus8 <= 4) {
38
+              p = GST_H265_PROFILE_MAIN_422_12;
39
+            } else {
40
+              p = GST_H265_PROFILE_MAIN_444_16_INTRA;
41
+            }
42
+            break;
43
+          case 3:
44
+            if (sps->bit_depth_luma_minus8 == 0) {
45
+              p = GST_H265_PROFILE_MAIN_444;
46
+            } else if (sps->bit_depth_luma_minus8 <= 2) {
47
+              p = GST_H265_PROFILE_MAIN_444_10;
48
+            } else if (sps->bit_depth_luma_minus8 <= 4) {
49
+              p = GST_H265_PROFILE_MAIN_444_12;
50
+            } else {
51
+              p = GST_H265_PROFILE_MAIN_444_16_INTRA;
52
+            }
53
+            break;
54
+          default:
55
+            break;
56
+        }
57
+      }
58
+
59
       profile = gst_h265_profile_to_string (p);
60
 
61
       if (s && gst_structure_has_field (s, "profile")) {
62
gst-plugins-bad-1.22.0.tar.xz/meson.build -> gst-plugins-bad-1.22.1.tar.xz/meson.build Changed
8
 
1
@@ -1,5 +1,5 @@
2
 project('gst-plugins-bad', 'c', 'cpp',
3
-  version : '1.22.0',
4
+  version : '1.22.1',
5
   meson_version : '>= 0.62',
6
   default_options :  'warning_level=1',
7
                       'buildtype=debugoptimized' )
8
gst-plugins-bad-1.22.0.tar.xz/po/fur.po -> gst-plugins-bad-1.22.1.tar.xz/po/fur.po Changed
49
 
1
@@ -1,25 +1,26 @@
2
 # Friulian translation for gst-plugins-bad package of GStreamer project
3
 # This file is put in the public domain.
4
-# Fabio Tomat <f.t.public@gmail.com>, 2016.
5
+# Fabio Tomat <f.t.public@gmail.com>, 2023.
6
 #
7
 msgid ""
8
 msgstr ""
9
-"Project-Id-Version: gst-plugins-bad 1.10.0\n"
10
+"Project-Id-Version: gst-plugins-bad 1.21.90\n"
11
 "Report-Msgid-Bugs-To: \n"
12
-"POT-Creation-Date: 2021-10-25 01:02+0100\n"
13
-"PO-Revision-Date: 2016-12-30 13:28+0100\n"
14
-"Last-Translator: Fabio Tomat <f.t.public@gmail.com>\n"
15
+"POT-Creation-Date: 2023-02-22 11:52+0000\n"
16
+"PO-Revision-Date: 2023-01-24 22:38+0000\n"
17
+"Last-Translator: Fabio T. <f.t.public@gmail.com>\n"
18
 "Language-Team: Friulian <f.t.public@gmail.com>\n"
19
 "Language: fur\n"
20
 "MIME-Version: 1.0\n"
21
 "Content-Type: text/plain; charset=UTF-8\n"
22
 "Content-Transfer-Encoding: 8bit\n"
23
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
24
 "X-Bugs: Report translation errors to the Language-Team address.\n"
25
+"X-Editor: HaiPO 1.4 beta\n"
26
 "X-Generator: Poedit 1.8.11\n"
27
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
28
 
29
 msgid "No URL set."
30
-msgstr ""
31
+msgstr "Nissun URL configurât."
32
 
33
 msgid "OpenCV failed to load template image"
34
 msgstr "OpenCV nol è rivât a cjariâ la imagjin model"
35
@@ -152,13 +153,11 @@
36
 #~ msgid "No file name specified for writing."
37
 #~ msgstr "Nissun non di file specificât pe scriture."
38
 
39
-#, c-format
40
 #~ msgid ""
41
 #~ "Given file name \"%s\" can't be converted to local file name encoding."
42
 #~ msgstr ""
43
 #~ "Il non di file furnît \"%s\" nol pues jessi convertît te codifiche non "
44
 #~ "file locâl."
45
 
46
-#, c-format
47
 #~ msgid "Could not open file \"%s\" for writing."
48
 #~ msgstr "Impussibil vierzi il file \"%s\" pe scriture."
49
gst-plugins-bad-1.22.0.tar.xz/po/gst-plugins-bad-1.0.pot -> gst-plugins-bad-1.22.1.tar.xz/po/gst-plugins-bad-1.0.pot Changed
22
 
1
@@ -6,9 +6,9 @@
2
 #, fuzzy
3
 msgid ""
4
 msgstr ""
5
-"Project-Id-Version: gst-plugins-bad-1.22.0\n"
6
+"Project-Id-Version: gst-plugins-bad-1.22.1\n"
7
 "Report-Msgid-Bugs-To: \n"
8
-"POT-Creation-Date: 2023-01-23 19:35+0000\n"
9
+"POT-Creation-Date: 2023-03-04 13:47+0000\n"
10
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
11
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12
 "Language-Team: LANGUAGE <LL@li.org>\n"
13
@@ -17,7 +17,7 @@
14
 "Content-Type: text/plain; charset=CHARSET\n"
15
 "Content-Transfer-Encoding: 8bit\n"
16
 
17
-#: ext/curl/gstcurlhttpsrc.c:1439
18
+#: ext/curl/gstcurlhttpsrc.c:1440
19
 msgid "No URL set."
20
 msgstr ""
21
 
22
gst-plugins-bad-1.22.0.tar.xz/po/gst-plugins-bad.pot -> gst-plugins-bad-1.22.1.tar.xz/po/gst-plugins-bad.pot Changed
22
 
1
@@ -6,9 +6,9 @@
2
 #, fuzzy
3
 msgid ""
4
 msgstr ""
5
-"Project-Id-Version: gst-plugins-bad-1.22.0\n"
6
+"Project-Id-Version: gst-plugins-bad-1.22.1\n"
7
 "Report-Msgid-Bugs-To: \n"
8
-"POT-Creation-Date: 2023-01-23 19:35+0000\n"
9
+"POT-Creation-Date: 2023-03-04 13:47+0000\n"
10
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
11
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12
 "Language-Team: LANGUAGE <LL@li.org>\n"
13
@@ -17,7 +17,7 @@
14
 "Content-Type: text/plain; charset=CHARSET\n"
15
 "Content-Transfer-Encoding: 8bit\n"
16
 
17
-#: ext/curl/gstcurlhttpsrc.c:1439
18
+#: ext/curl/gstcurlhttpsrc.c:1440
19
 msgid "No URL set."
20
 msgstr ""
21
 
22
gst-plugins-bad-1.22.0.tar.xz/sys/amfcodec/gstamfav1enc.cpp -> gst-plugins-bad-1.22.1.tar.xz/sys/amfcodec/gstamfav1enc.cpp Changed
30
 
1
@@ -283,7 +283,7 @@
2
 
3
 #define DOC_SRC_CAPS \
4
     "video/x-av1, width = (int)  128, 4096 , height = (int)  128, 4096 , " \
5
-    "profile = (string) main, alignment= (string) tu"
6
+    "profile = (string) main, stream-format = (string) obu-stream, alignment= (string) tu"
7
 
8
 typedef struct _GstAmfAv1Enc
9
 {
10
@@ -824,7 +824,7 @@
11
   GstTagList *tags;
12
 
13
   caps = gst_caps_from_string ("video/x-av1, profile = (string) main, "
14
-      "alignment = (string) tu");
15
+      "stream-format = (string) obu-stream, alignment = (string) tu");
16
   output_state = gst_video_encoder_set_output_state (GST_VIDEO_ENCODER (self),
17
       caps, state);
18
 
19
@@ -1081,8 +1081,8 @@
20
       + ", " + std::to_string (max_height) + " ";
21
 
22
   sink_caps_str = "video/x-raw, format = (string) NV12, " + resolution_str;
23
-  src_caps_str = "video/x-av1, " + resolution_str + ", profile = (string) main, "
24
-      "alignment = (string) tu";
25
+  src_caps_str = "video/x-av1, " + resolution_str + ", profile = (string) main"
26
+      ", stream-format = (string) obu-stream, alignment = (string) tu";
27
 
28
   system_caps = gst_caps_from_string (sink_caps_str.c_str ());
29
   sink_caps = gst_caps_copy (system_caps);
30
gst-plugins-bad-1.22.0.tar.xz/sys/applemedia/avfvideosrc.m -> gst-plugins-bad-1.22.1.tar.xz/sys/applemedia/avfvideosrc.m Changed
201
 
1
@@ -176,6 +176,10 @@
2
   AVCaptureConnection *connection;
3
   CMClockRef inputClock;
4
 
5
+  NSCondition *permissionCond;
6
+  BOOL permissionRequestPending;
7
+  BOOL permissionStopRequest;
8
+
9
   dispatch_queue_t mainQueue;
10
   dispatch_queue_t workerQueue;
11
   NSConditionLock *bufQueueLock;
12
@@ -244,7 +248,6 @@
13
 - (BOOL)unlockStop;
14
 - (BOOL)query:(GstQuery *)query;
15
 - (void)setContext:(GstContext *)context;
16
-- (GstStateChangeReturn)changeState:(GstStateChange)transition;
17
 - (GstFlowReturn)create:(GstBuffer **)buf;
18
 - (GstCaps *)fixate:(GstCaps *)caps;
19
 - (BOOL)decideAllocation:(GstQuery *)query;
20
@@ -332,6 +335,8 @@
21
     workerQueue =
22
         dispatch_queue_create ("org.freedesktop.gstreamer.avfvideosrc.output", NULL);
23
 
24
+    permissionCond = NSCondition alloc init;
25
+
26
     gst_base_src_set_live (baseSrc, TRUE);
27
     gst_base_src_set_format (baseSrc, GST_FORMAT_TIME);
28
   }
29
@@ -343,6 +348,8 @@
30
 {
31
   mainQueue = NULL;
32
   workerQueue = NULL;
33
+
34
+  permissionCond = nil;
35
 }
36
 
37
 - (BOOL)openDeviceInput
38
@@ -350,6 +357,52 @@
39
   NSString *mediaType = AVMediaTypeVideo;
40
   NSError *err;
41
 
42
+  // Since Mojave, permissions are now supposed to be explicitly granted
43
+  // before capturing from the camera
44
+  if (@available(macOS 10.14, *)) {
45
+    // Check if permission has already been granted (or denied)
46
+    AVAuthorizationStatus authStatus = AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo;
47
+    switch (authStatus) {
48
+      case AVAuthorizationStatusDenied:
49
+        // The user has explicitly denied permission for media capture.
50
+        GST_ELEMENT_ERROR (element, RESOURCE, NOT_AUTHORIZED,
51
+          ("Device video access permission has been explicitly denied before"), ("Authorization status: %d", (int)authStatus));
52
+          return NO;
53
+      case AVAuthorizationStatusRestricted:
54
+        // The user is not allowed to access media capture devices.
55
+        GST_ELEMENT_ERROR (element, RESOURCE, NOT_AUTHORIZED,
56
+          ("Device video access permission cannot be granted by the user"), ("Authorization status: %d", (int)authStatus));
57
+        return NO;
58
+      case AVAuthorizationStatusAuthorized:
59
+        // The user has explicitly granted permission for media capture,
60
+        // or explicit user permission is not necessary for the media type in question.
61
+        GST_DEBUG_OBJECT (element, "Device video access permission has already been granted");
62
+        break;
63
+      case AVAuthorizationStatusNotDetermined:
64
+        // Explicit user permission is required for media capture,
65
+        // but the user has not yet granted or denied such permission.
66
+        GST_DEBUG_OBJECT (element, "Requesting device video access permission");
67
+
68
+        permissionCond lock;
69
+        permissionRequestPending = YES;
70
+        permissionCond unlock;
71
+
72
+        AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo completionHandler:^(BOOL granted) {
73
+          GST_DEBUG_OBJECT (element, "Device video access permission %s", granted ? "granted" : "not granted");
74
+          // Check if permission has been granted
75
+          if (!granted) {
76
+             GST_ELEMENT_ERROR (element, RESOURCE, NOT_AUTHORIZED,
77
+               ("Device video access permission has been denied"), ("Authorization status: %d", (int)AVAuthorizationStatusDenied));
78
+          }
79
+          permissionCond lock;
80
+          permissionRequestPending = NO;
81
+          permissionCond broadcast;
82
+          permissionCond unlock;
83
+        };
84
+        break;
85
+    }
86
+  }
87
+
88
   if (deviceIndex == DEFAULT_DEVICE_INDEX) {
89
 #ifdef HAVE_IOS
90
     if (deviceType != DEFAULT_DEVICE_TYPE && position != DEFAULT_POSITION) {
91
@@ -453,60 +506,6 @@
92
 
93
   GST_DEBUG_OBJECT (element, "Opening device");
94
 
95
-  // Since Mojave, permissions are now supposed to be explicitly granted 
96
-  // before performing anything on a device
97
-  if (@available(macOS 10.14, *)) {
98
-    if (captureScreen)
99
-      goto checked;
100
-
101
-    // Check if permission has already been granted (or denied)
102
-    AVAuthorizationStatus authStatus = AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo;
103
-    switch (authStatus) {
104
-      case AVAuthorizationStatusDenied:
105
-        // The user has explicitly denied permission for media capture.
106
-        GST_ELEMENT_ERROR (element, RESOURCE, NOT_AUTHORIZED,
107
-          ("Device video access permission has been explicitly denied before"), ("Authorization status: %d", (int)authStatus));
108
-          return success;
109
-      case AVAuthorizationStatusRestricted:
110
-        // The user is not allowed to access media capture devices.
111
-        GST_ELEMENT_ERROR (element, RESOURCE, NOT_AUTHORIZED,
112
-          ("Device video access permission cannot be granted by the user"), ("Authorization status: %d", (int)authStatus));
113
-        return success;
114
-      case AVAuthorizationStatusAuthorized:
115
-        // The user has explicitly granted permission for media capture,
116
-        // or explicit user permission is not necessary for the media type in question.
117
-        GST_DEBUG_OBJECT (element, "Device video access permission has already been granted");
118
-        break;
119
-      case AVAuthorizationStatusNotDetermined:
120
-        ;
121
-        // Explicit user permission is required for media capture,
122
-        // but the user has not yet granted or denied such permission.
123
-        dispatch_semaphore_t sema = dispatch_semaphore_create(0);
124
-        dispatch_sync (mainQueue, ^{
125
-          AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo completionHandler:^(BOOL granted) {
126
-            GST_DEBUG_OBJECT (element, "Device video access permission %s", granted ? "granted" : "not granted");
127
-            dispatch_semaphore_signal(sema);
128
-          };
129
-        });
130
-        // Block on dialog being answered
131
-        if (!NSThread isMainThread) {
132
-            dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
133
-        } else {
134
-            while (dispatch_semaphore_wait(sema, DISPATCH_TIME_NOW)) {
135
-                NSRunLoop currentRunLoop runMode:NSDefaultRunLoopMode beforeDate:NSDate dateWithTimeIntervalSinceNow:0;
136
-            }
137
-        }
138
-        // Check if permission has been granted
139
-        AVAuthorizationStatus videoAuthorizationStatus = AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo;
140
-        if (videoAuthorizationStatus != AVAuthorizationStatusAuthorized) {
141
-          GST_ELEMENT_ERROR (element, RESOURCE, NOT_AUTHORIZED,
142
-            ("Device video access permission has just been denied"), ("Authorization status: %d", (int)videoAuthorizationStatus));
143
-          return success;
144
-        }
145
-    }
146
-  }
147
-
148
-checked:
149
   dispatch_sync (mainQueue, ^{
150
     BOOL ret;
151
 
152
@@ -535,11 +534,10 @@
153
       connection.videoOrientation = GstAVFVideoSourceOrientation2AVCaptureVideoOrientation(orientation);
154
 #endif
155
     inputClock = ((AVCaptureInputPort *)connection.inputPorts0).clock;
156
-
157
     *successPtr = YES;
158
   });
159
 
160
-  GST_DEBUG_OBJECT (element, "Opening device %s", success ? "succeed" : "failed");
161
+  GST_DEBUG_OBJECT (element, "Opening device %s", success ? "succeeded" : "failed");
162
 
163
   return success;
164
 }
165
@@ -915,8 +913,24 @@
166
     gst_caps_replace (&caps, new_caps);
167
     GST_INFO_OBJECT (element, "configured caps %"GST_PTR_FORMAT, caps);
168
 
169
-    if (!session isRunning)
170
-      session startRunning;
171
+    if (!session isRunning) {
172
+      BOOL stopping = NO;
173
+
174
+      /* If permissions are still pending, wait for a response before
175
+       * starting the capture running, or else we'll get black frames */
176
+      permissionCond lock;
177
+      if (permissionRequestPending && !permissionStopRequest) {
178
+        GST_DEBUG_OBJECT (element, "Waiting for pending device access permission.");
179
+        do {
180
+          permissionCond wait;
181
+        } while (permissionRequestPending && !permissionStopRequest);
182
+      }
183
+      stopping = permissionStopRequest;
184
+      permissionCond unlock;
185
+
186
+      if (!stopping)
187
+        session startRunning;
188
+    }
189
 
190
     /* Unlock device configuration only after session is started so the session
191
      * won't reset the capture formats */
192
@@ -928,6 +942,14 @@
193
 
194
 - (BOOL)start
195
 {
196
+  permissionCond lock;
197
+  permissionRequestPending = NO;
198
+  permissionStopRequest = NO;
199
+  permissionCond unlock;
200
+
201
gst-plugins-bad-1.22.0.tar.xz/sys/applemedia/meson.build -> gst-plugins-bad-1.22.1.tar.xz/sys/applemedia/meson.build Changed
10
 
1
@@ -115,7 +115,7 @@
2
         objcpp_args : gst_plugins_bad_args + applemedia_args + applemedia_objc_args + applemedia_objcpp_args,
3
         link_args : noseh_link_args,
4
         include_directories : configinc, libsinc,
5
-        dependencies : gstvideo_dep, gstaudio_dep, gstpbutils_dep, gst_dep, gstbase_dep, gstgl_dep, gstglproto_dep + applemedia_frameworks,
6
+        dependencies : gstvideo_dep, gstaudio_dep, gstpbutils_dep, gst_dep, gstbase_dep, gstgl_dep, gstglproto_dep, gstcodecparsers_dep + applemedia_frameworks,
7
         override_options : 'cpp_std=c++11',
8
         install : true,
9
         install_dir : plugins_install_dir,
10
gst-plugins-bad-1.22.0.tar.xz/sys/applemedia/vtdec.c -> gst-plugins-bad-1.22.1.tar.xz/sys/applemedia/vtdec.c Changed
201
 
1
@@ -169,7 +169,7 @@
2
   {
3
     GstCaps *caps = gst_caps_from_string (VIDEO_SRC_CAPS);
4
     /* RGBA64_LE is kCVPixelFormatType_64RGBALE, only available on macOS 11.3+ */
5
-    if (GST_VTUTIL_HAVE_64ARGBALE)
6
+    if (GST_VTUTIL_HAVE_64RGBALE)
7
       caps = gst_vtutil_caps_append_video_format (caps, "RGBA64_LE");
8
     gst_element_class_add_pad_template (element_class,
9
         gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, caps));
10
@@ -299,7 +299,7 @@
11
           return vfmt;
12
         break;
13
       case GST_VIDEO_FORMAT_RGBA64_LE:
14
-        if (GST_VTUTIL_HAVE_64ARGBALE) {
15
+        if (GST_VTUTIL_HAVE_64RGBALE) {
16
           if (prores)
17
             return vfmt;
18
         } else {
19
@@ -697,7 +697,7 @@
20
       cv_format = kCVPixelFormatType_64ARGB;
21
       break;
22
     case GST_VIDEO_FORMAT_RGBA64_LE:
23
-      if (GST_VTUTIL_HAVE_64ARGBALE)
24
+      if (GST_VTUTIL_HAVE_64RGBALE)
25
         cv_format = kCVPixelFormatType_64RGBALE;
26
       else
27
         /* Codepath will never be hit on macOS older than Big Sur (11.3) */
28
@@ -1033,7 +1033,7 @@
29
     }
30
   }
31
 
32
-  if (drain)
33
+  if (drain || flush)
34
     VTDecompressionSessionWaitForAsynchronousFrames (vtdec->session);
35
 
36
   /* push a buffer if there are enough frames to guarantee that we push in PTS
37
@@ -1066,54 +1066,6 @@
38
   return ret;
39
 }
40
 
41
-static gboolean
42
-parse_h264_profile_and_level_from_codec_data (GstVtdec * vtdec,
43
-    GstBuffer * codec_data, int *profile, int *level)
44
-{
45
-  GstMapInfo map;
46
-  guint8 *data;
47
-  gint size;
48
-  gboolean ret = TRUE;
49
-
50
-  gst_buffer_map (codec_data, &map, GST_MAP_READ);
51
-  data = map.data;
52
-  size = map.size;
53
-
54
-  /* parse the avcC data */
55
-  if (size < 7)
56
-    goto avcc_too_small;
57
-
58
-  /* parse the version, this must be 1 */
59
-  if (data0 != 1)
60
-    goto wrong_version;
61
-
62
-  /* AVCProfileIndication */
63
-  /* profile_compat */
64
-  /* AVCLevelIndication */
65
-  if (profile)
66
-    *profile = data1;
67
-
68
-  if (level)
69
-    *level = data3;
70
-
71
-out:
72
-  gst_buffer_unmap (codec_data, &map);
73
-
74
-  return ret;
75
-
76
-avcc_too_small:
77
-  GST_ELEMENT_ERROR (vtdec, STREAM, DECODE, (NULL),
78
-      ("invalid codec_data buffer length"));
79
-  ret = FALSE;
80
-  goto out;
81
-
82
-wrong_version:
83
-  GST_ELEMENT_ERROR (vtdec, STREAM, DECODE, (NULL),
84
-      ("wrong avcC version in codec_data"));
85
-  ret = FALSE;
86
-  goto out;
87
-}
88
-
89
 static int
90
 get_dpb_max_mb_s_from_level (GstVtdec * vtdec, int level)
91
 {
92
@@ -1170,47 +1122,126 @@
93
     vtdec->reorder_queue_length = 0;
94
   }
95
 
96
+  GST_DEBUG_OBJECT (vtdec, "Reorder queue length: %d",
97
+      vtdec->reorder_queue_length);
98
+  return TRUE;
99
+}
100
+
101
+static gboolean
102
+parse_h264_decoder_config_record (GstVtdec * vtdec, GstBuffer * codec_data,
103
+    GstH264DecoderConfigRecord ** config)
104
+{
105
+  GstH264NalParser *parser = gst_h264_nal_parser_new ();
106
+  GstMapInfo map;
107
+  gboolean ret = TRUE;
108
+
109
+  gst_buffer_map (codec_data, &map, GST_MAP_READ);
110
+
111
+  if (gst_h264_parser_parse_decoder_config_record (parser, map.data, map.size,
112
+          config) != GST_H264_PARSER_OK) {
113
+    GST_WARNING_OBJECT (vtdec, "Failed to parse codec-data");
114
+    ret = FALSE;
115
+  }
116
+
117
+  gst_h264_nal_parser_free (parser);
118
+  gst_buffer_unmap (codec_data, &map);
119
+  return ret;
120
+}
121
+
122
+static gboolean
123
+get_h264_dpb_size_from_sps (GstVtdec * vtdec, GstH264NalUnit * nalu,
124
+    gint * dpb_size)
125
+{
126
+  GstH264ParserResult result;
127
+  GstH264SPS sps;
128
+  gint width_mb, height_mb;
129
+  gint max_dpb_frames, max_dpb_size, max_dpb_mbs;
130
+
131
+  result = gst_h264_parse_sps (nalu, &sps);
132
+  if (result != GST_H264_PARSER_OK) {
133
+    GST_WARNING_OBJECT (vtdec, "Failed to parse SPS, result %d", result);
134
+    return FALSE;
135
+  }
136
+
137
+  max_dpb_mbs = get_dpb_max_mb_s_from_level (vtdec, sps.level_idc);
138
+  if (max_dpb_mbs == -1) {
139
+    GST_ELEMENT_ERROR (vtdec, STREAM, DECODE, (NULL),
140
+        ("invalid level found in SPS, could not compute max_dpb_mbs"));
141
+    gst_h264_sps_clear (&sps);
142
+    return FALSE;
143
+  }
144
+
145
+  /* This formula is specified in sections A.3.1.h and A.3.2.f of the 2009
146
+   * edition of the standard */
147
+  width_mb = sps.width / 16;
148
+  height_mb = sps.height / 16;
149
+  max_dpb_frames = MIN (max_dpb_mbs / (width_mb * height_mb),
150
+      GST_VTDEC_DPB_MAX_SIZE);
151
+
152
+  if (sps.vui_parameters_present_flag
153
+      && sps.vui_parameters.bitstream_restriction_flag)
154
+    max_dpb_frames = MAX (1, sps.vui_parameters.max_dec_frame_buffering);
155
+
156
+  /* Some non-conforming H264 streams may request a number of frames 
157
+   * larger than the calculated limit.
158
+   * See https://chromium-review.googlesource.com/c/chromium/src/+/760276/
159
+   */
160
+  max_dpb_size = MAX (max_dpb_frames, sps.num_ref_frames);
161
+  if (max_dpb_size > GST_VTDEC_DPB_MAX_SIZE) {
162
+    GST_WARNING_OBJECT (vtdec, "Too large calculated DPB size %d",
163
+        max_dpb_size);
164
+    max_dpb_size = GST_VTDEC_DPB_MAX_SIZE;
165
+  }
166
+
167
+  *dpb_size = max_dpb_size;
168
+
169
+  gst_h264_sps_clear (&sps);
170
   return TRUE;
171
 }
172
 
173
 static gboolean
174
 compute_h264_decode_picture_buffer_length (GstVtdec * vtdec,
175
-    GstBuffer * codec_data, int *length)
176
+    GstBuffer * codec_data, gint * length)
177
 {
178
-  int profile, level;
179
-  int dpb_mb_size = 16;
180
-  int max_dpb_size_frames = 16;
181
-  int max_dpb_mb_s = -1;
182
-  int width_in_mb_s = GST_ROUND_UP_16 (vtdec->video_info.width) / dpb_mb_size;
183
-  int height_in_mb_s = GST_ROUND_UP_16 (vtdec->video_info.height) / dpb_mb_size;
184
+  GstH264DecoderConfigRecord *config = NULL;
185
+  GstH264NalUnit *nalu;
186
+  guint8 profile, level;
187
+  gboolean ret = TRUE;
188
+  gint new_length;
189
+  guint i;
190
 
191
   *length = 0;
192
 
193
-  if (!parse_h264_profile_and_level_from_codec_data (vtdec, codec_data,
194
-          &profile, &level))
195
+  if (vtdec->video_info.width == 0 || vtdec->video_info.height == 0)
196
     return FALSE;
197
 
198
-  if (vtdec->video_info.width == 0 || vtdec->video_info.height == 0)
199
+  if (!parse_h264_decoder_config_record (vtdec, codec_data, &config))
200
     return FALSE;
201
gst-plugins-bad-1.22.0.tar.xz/sys/applemedia/vtdec.h -> gst-plugins-bad-1.22.1.tar.xz/sys/applemedia/vtdec.h Changed
19
 
1
@@ -30,6 +30,8 @@
2
 #if defined(APPLEMEDIA_MOLTENVK)
3
 #include <gst/vulkan/vulkan.h>
4
 #endif
5
+#define GST_USE_UNSTABLE_API
6
+#include <gst/codecparsers/gsth264parser.h>
7
 
8
 G_BEGIN_DECLS
9
 
10
@@ -42,6 +44,8 @@
11
 typedef struct _GstVtdec GstVtdec;
12
 typedef struct _GstVtdecClass GstVtdecClass;
13
 
14
+#define GST_VTDEC_DPB_MAX_SIZE 16
15
+
16
 struct _GstVtdec
17
 {
18
   GstVideoDecoder base_vtdec;
19
gst-plugins-bad-1.22.0.tar.xz/sys/applemedia/vtenc.c -> gst-plugins-bad-1.22.1.tar.xz/sys/applemedia/vtenc.c Changed
93
 
1
@@ -70,6 +70,7 @@
2
 #include "corevideobuffer.h"
3
 #include "vtutil.h"
4
 #include <gst/pbutils/codec-utils.h>
5
+#include <sys/sysctl.h>
6
 
7
 #define VTENC_DEFAULT_BITRATE     0
8
 #define VTENC_DEFAULT_FRAME_REORDERING TRUE
9
@@ -201,8 +202,7 @@
10
 GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ NV12, I420 }"));
11
 #else
12
 static GstStaticCaps sink_caps =
13
-GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE
14
-    ("{ AYUV64, UYVY, NV12, I420, ARGB64_BE }"));
15
+GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ AYUV64, UYVY, NV12, I420 }"));
16
 #endif
17
 
18
 
19
@@ -231,9 +231,37 @@
20
 
21
   {
22
     GstCaps *caps = gst_static_caps_get (&sink_caps);
23
-    /* RGBA64_LE is kCVPixelFormatType_64RGBALE, only available on macOS 11.3+ */
24
-    if (GST_VTUTIL_HAVE_64ARGBALE)
25
-      caps = gst_vtutil_caps_append_video_format (caps, "RGBA64_LE");
26
+#ifndef HAVE_IOS
27
+    gboolean enable_argb = TRUE;
28
+    int retval;
29
+    char cpu_name30;
30
+    size_t cpu_len = 30;
31
+
32
+    if (__builtin_available (macOS 13.0, *)) {
33
+      /* Can't negate a __builtin_available check */
34
+    } else {
35
+      /* Disable ARGB64/RGBA64 if we're on M1 Pro/Max and macOS < 13.0 
36
+       * due to a bug within VideoToolbox which causes encoding to fail. */
37
+      retval = sysctlbyname ("machdep.cpu.brand_string", &cpu_name, &cpu_len,
38
+          NULL, 0);
39
+
40
+      if (retval == 0 &&
41
+          (strstr (cpu_name, "M1 Pro") != NULL ||
42
+              strstr (cpu_name, "M1 Max") != NULL)) {
43
+        GST_WARNING
44
+            ("Disabling ARGB64/RGBA64 caps due to a bug in VideoToolbox "
45
+            "on M1 Pro/Max running macOS < 13.0.");
46
+        enable_argb = FALSE;
47
+      }
48
+    }
49
+
50
+    if (enable_argb) {
51
+      caps = gst_vtutil_caps_append_video_format (caps, "ARGB64_BE");
52
+      /* RGBA64_LE is kCVPixelFormatType_64RGBALE, only available on macOS 11.3+ */
53
+      if (GST_VTUTIL_HAVE_64RGBALE)
54
+        caps = gst_vtutil_caps_append_video_format (caps, "RGBA64_LE");
55
+    }
56
+#endif
57
     gst_element_class_add_pad_template (element_class,
58
         gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, caps));
59
   }
60
@@ -1208,11 +1236,22 @@
61
   const GstVTEncoderDetails *codec_details =
62
       GST_VTENC_CLASS_GET_CODEC_DETAILS (G_OBJECT_GET_CLASS (self));
63
 
64
+  /* Apple's M1 hardware encoding fails when provided with an interlaced ProRes source.
65
+   * It's most likely a bug in VideoToolbox, as no such limitation has been officially mentioned anywhere.
66
+   * For now let's disable HW encoding entirely when such case occurs. */
67
+  gboolean enable_hw = !(GST_VIDEO_INFO_IS_INTERLACED (&self->video_info)
68
+      && codec_details->format_id == GST_kCMVideoCodecType_Some_AppleProRes);
69
+
70
+  if (!enable_hw)
71
+    GST_WARNING_OBJECT (self,
72
+        "Interlaced content detected, disabling HW-accelerated encoding due to https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1429");
73
+
74
   encoder_spec =
75
       CFDictionaryCreateMutable (NULL, 0, &kCFTypeDictionaryKeyCallBacks,
76
       &kCFTypeDictionaryValueCallBacks);
77
   gst_vtutil_dict_set_boolean (encoder_spec,
78
-      kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder, true);
79
+      kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder,
80
+      enable_hw);
81
   if (codec_details->require_hardware)
82
     gst_vtutil_dict_set_boolean (encoder_spec,
83
         kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder,
84
@@ -1706,7 +1745,7 @@
85
           pixel_format_type = kCVPixelFormatType_4444AYpCbCr16;
86
           break;
87
         case GST_VIDEO_FORMAT_RGBA64_LE:
88
-          if (GST_VTUTIL_HAVE_64ARGBALE)
89
+          if (GST_VTUTIL_HAVE_64RGBALE)
90
             pixel_format_type = kCVPixelFormatType_64RGBALE;
91
           else
92
             /* Codepath will never be hit on macOS older than Big Sur (11.3) */
93
gst-plugins-bad-1.22.0.tar.xz/sys/applemedia/vtutil.h -> gst-plugins-bad-1.22.1.tar.xz/sys/applemedia/vtutil.h Changed
10
 
1
@@ -35,7 +35,7 @@
2
 #if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED < 110300
3
 #define kCVPixelFormatType_64RGBALE 'l64r'
4
 #endif
5
-#define GST_VTUTIL_HAVE_64ARGBALE __builtin_available(macOS 11.3, *)
6
+#define GST_VTUTIL_HAVE_64RGBALE __builtin_available(macOS 11.3, *)
7
 
8
 G_BEGIN_DECLS
9
 
10
gst-plugins-bad-1.22.0.tar.xz/sys/d3d11/gstd3d11overlaycompositor.cpp -> gst-plugins-bad-1.22.1.tar.xz/sys/d3d11/gstd3d11overlaycompositor.cpp Changed
12
 
1
@@ -211,8 +211,8 @@
2
   subresource_data.SysMemPitch = stride;
3
   subresource_data.SysMemSlicePitch = 0;
4
 
5
-  texture_desc.Width = width;
6
-  texture_desc.Height = height;
7
+  texture_desc.Width = vmeta->width;
8
+  texture_desc.Height = vmeta->height;
9
   texture_desc.MipLevels = 1;
10
   texture_desc.ArraySize = 1;
11
   texture_desc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
12
gst-plugins-bad-1.22.0.tar.xz/sys/d3d11/gstd3d11videosink.cpp -> gst-plugins-bad-1.22.1.tar.xz/sys/d3d11/gstd3d11videosink.cpp Changed
9
 
1
@@ -1430,6 +1430,7 @@
2
     GST_LOG_OBJECT (self, "End drawing");
3
     self->drawing = FALSE;
4
   } else {
5
+    gst_d3d11_window_show (self->window);
6
     ret = gst_d3d11_window_render (self->window, self->prepared_buffer);
7
   }
8
 
9
gst-plugins-bad-1.22.0.tar.xz/sys/d3d11/gstd3d11window.cpp -> gst-plugins-bad-1.22.1.tar.xz/sys/d3d11/gstd3d11window.cpp Changed
21
 
1
@@ -815,6 +815,19 @@
2
 }
3
 
4
 void
5
+gst_d3d11_window_show (GstD3D11Window * window)
6
+{
7
+  GstD3D11WindowClass *klass;
8
+
9
+  g_return_if_fail (GST_IS_D3D11_WINDOW (window));
10
+
11
+  klass = GST_D3D11_WINDOW_GET_CLASS (window);
12
+
13
+  if (klass->show)
14
+    klass->show (window);
15
+}
16
+
17
+void
18
 gst_d3d11_window_set_render_rectangle (GstD3D11Window * window,
19
     const GstVideoRectangle * rect)
20
 {
21
gst-plugins-bad-1.22.0.tar.xz/sys/d3d11/gstd3d11window.h -> gst-plugins-bad-1.22.1.tar.xz/sys/d3d11/gstd3d11window.h Changed
19
 
1
@@ -121,6 +121,8 @@
2
 {
3
   GstObjectClass object_class;
4
 
5
+  void          (*show)                   (GstD3D11Window * window);
6
+
7
   void          (*update_swap_chain)      (GstD3D11Window * window);
8
 
9
   void          (*change_fullscreen_mode) (GstD3D11Window * window);
10
@@ -168,6 +170,8 @@
11
 
12
 GType         gst_d3d11_window_get_type             (void);
13
 
14
+void          gst_d3d11_window_show                 (GstD3D11Window * window);
15
+
16
 void          gst_d3d11_window_set_render_rectangle (GstD3D11Window * window,
17
                                                      const GstVideoRectangle * rect);
18
 
19
gst-plugins-bad-1.22.0.tar.xz/sys/d3d11/gstd3d11window_win32.cpp -> gst-plugins-bad-1.22.1.tar.xz/sys/d3d11/gstd3d11window_win32.cpp Changed
148
 
1
@@ -43,6 +43,7 @@
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
@@ -66,6 +67,8 @@
10
   GMainContext *main_context;
11
   GMainLoop *loop;
12
 
13
+  gboolean visible;
14
+
15
   GSource *msg_source;
16
   GIOChannel *msg_io_channel;
17
 
18
@@ -102,6 +105,7 @@
19
 static void gst_d3d11_window_win32_constructed (GObject * object);
20
 static void gst_d3d11_window_win32_dispose (GObject * object);
21
 
22
+static void gst_d3d11_window_win32_show (GstD3D11Window * window);
23
 static void gst_d3d11_window_win32_update_swap_chain (GstD3D11Window * window);
24
 static void
25
 gst_d3d11_window_win32_change_fullscreen_mode (GstD3D11Window * window);
26
@@ -143,6 +147,7 @@
27
   gobject_class->constructed = gst_d3d11_window_win32_constructed;
28
   gobject_class->dispose = gst_d3d11_window_win32_dispose;
29
 
30
+  window_class->show = GST_DEBUG_FUNCPTR (gst_d3d11_window_win32_show);
31
   window_class->update_swap_chain =
32
       GST_DEBUG_FUNCPTR (gst_d3d11_window_win32_update_swap_chain);
33
   window_class->change_fullscreen_mode =
34
@@ -211,32 +216,9 @@
35
   GstD3D11WindowWin32 *self = GST_D3D11_WINDOW_WIN32 (window);
36
   HWND hwnd;
37
   GstFlowReturn ret;
38
-  gint width, height;
39
-
40
-  switch (window->method) {
41
-    case GST_VIDEO_ORIENTATION_90R:
42
-    case GST_VIDEO_ORIENTATION_90L:
43
-    case GST_VIDEO_ORIENTATION_UL_LR:
44
-    case GST_VIDEO_ORIENTATION_UR_LL:
45
-      width = display_height;
46
-      height = display_width;
47
-      break;
48
-    default:
49
-      width = display_width;
50
-      height = display_height;
51
-      break;
52
-  }
53
 
54
-  if (!self->setup_external_hwnd) {
55
-    RECT rect;
56
-    GetClientRect (self->internal_hwnd, &rect);
57
-    width += 2 * GetSystemMetrics (SM_CXSIZEFRAME);
58
-    height +=
59
-        2 * GetSystemMetrics (SM_CYSIZEFRAME) + GetSystemMetrics (SM_CYCAPTION);
60
-    MoveWindow (self->internal_hwnd, rect.left, rect.top, width, height, FALSE);
61
-    ShowWindow (self->internal_hwnd, SW_SHOW);
62
+  if (!self->setup_external_hwnd)
63
     goto done;
64
-  }
65
 
66
   hwnd = (HWND) window->external_handle;
67
   if (!IsWindow (hwnd)) {
68
@@ -592,6 +574,9 @@
69
   }
70
 
71
   self->device_handle = 0;
72
+  self->internal_hwnd = 0;
73
+  self->visible = FALSE;
74
+
75
   self->internal_hwnd = CreateWindowExA (0,
76
       "GSTD3D11",
77
       "Direct3D11 renderer",
78
@@ -838,6 +823,9 @@
79
         }
80
       }
81
       break;
82
+    case WM_GST_D3D11_SHOW_WINDOW:
83
+      ShowWindow (self->internal_hwnd, SW_SHOW);
84
+      break;
85
     default:
86
       break;
87
   }
88
@@ -929,7 +917,6 @@
89
         SWP_FRAMECHANGED | SWP_NOACTIVATE);
90
     MoveWindow (self->internal_hwnd, rect.left, rect.top, rect.right,
91
         rect.bottom, FALSE);
92
-    ShowWindow (self->internal_hwnd, SW_SHOW);
93
 
94
     GstD3D11SRWLockGuard lk (&self->lock);
95
     self->overlay_state = GST_D3D11_WINDOW_WIN32_OVERLAY_STATE_OPENED;
96
@@ -1125,6 +1112,51 @@
97
   return TRUE;
98
 }
99
 
100
+static void
101
+gst_d3d11_window_win32_show (GstD3D11Window * window)
102
+{
103
+  GstD3D11WindowWin32 *self = GST_D3D11_WINDOW_WIN32 (window);
104
+  gint width, height;
105
+
106
+  switch (window->method) {
107
+    case GST_VIDEO_ORIENTATION_90R:
108
+    case GST_VIDEO_ORIENTATION_90L:
109
+    case GST_VIDEO_ORIENTATION_UL_LR:
110
+    case GST_VIDEO_ORIENTATION_UR_LL:
111
+      width = GST_VIDEO_INFO_HEIGHT (&window->render_info);
112
+      height = GST_VIDEO_INFO_WIDTH (&window->render_info);
113
+      break;
114
+    default:
115
+      width = GST_VIDEO_INFO_WIDTH (&window->render_info);
116
+      height = GST_VIDEO_INFO_HEIGHT (&window->render_info);
117
+      break;
118
+  }
119
+
120
+  if (!self->visible) {
121
+    /* if no parent the real size has to be set now because this has not been done
122
+     * when at window creation */
123
+    if (!self->external_hwnd) {
124
+      RECT rect;
125
+      GetClientRect (self->internal_hwnd, &rect);
126
+      width += 2 * GetSystemMetrics (SM_CXSIZEFRAME);
127
+      height +=
128
+          2 * GetSystemMetrics (SM_CYSIZEFRAME) +
129
+          GetSystemMetrics (SM_CYCAPTION);
130
+      MoveWindow (self->internal_hwnd, rect.left, rect.top, width,
131
+          height, FALSE);
132
+      ShowWindow (self->internal_hwnd, SW_SHOW);
133
+    } else if (self->internal_hwnd) {
134
+      /* ShowWindow will throw message to message pumping thread (app thread)
135
+       * synchroniously, which can be blocked at the moment.
136
+       * Post message to internal hwnd and do that from message pumping thread
137
+       */
138
+      PostMessageA (self->internal_hwnd, WM_GST_D3D11_SHOW_WINDOW, 0, 0);
139
+    }
140
+
141
+    self->visible = TRUE;
142
+  }
143
+}
144
+
145
 static GstFlowReturn
146
 gst_d3d11_window_win32_present (GstD3D11Window * window, guint present_flags)
147
 {
148
gst-plugins-bad-1.22.0.tar.xz/sys/msdk/gstmsdk.c -> gst-plugins-bad-1.22.1.tar.xz/sys/msdk/gstmsdk.c Changed
10
 
1
@@ -141,7 +141,7 @@
2
   GST_DEBUG_CATEGORY_INIT (gst_msdkvp9dec_debug, "msdkvp9dec", 0, "msdkvp9dec");
3
   GST_DEBUG_CATEGORY_INIT (gst_msdkvp9enc_debug, "msdkvp9enc", 0, "msdkvp9enc");
4
   GST_DEBUG_CATEGORY_INIT (gst_msdkav1dec_debug, "msdkav1dec", 0, "msdkav1dec");
5
-  GST_DEBUG_CATEGORY_INIT (gst_msdkav1dec_debug, "msdkav1enc", 0, "msdkav1enc");
6
+  GST_DEBUG_CATEGORY_INIT (gst_msdkav1enc_debug, "msdkav1enc", 0, "msdkav1enc");
7
 
8
   plugin_add_dependencies (plugin);
9
 
10
gst-plugins-bad-1.22.0.tar.xz/sys/nvcodec/gstnvencoder.cpp -> gst-plugins-bad-1.22.1.tar.xz/sys/nvcodec/gstnvencoder.cpp Changed
115
 
1
@@ -73,6 +73,7 @@
2
   NV_ENC_INITIALIZE_PARAMS init_params;
3
   NV_ENC_CONFIG config;
4
   gpointer session;
5
+  guint lookahead;
6
 
7
   GstVideoCodecState *input_state;
8
 
9
@@ -84,6 +85,7 @@
10
   GArray *task_pool;
11
 
12
   GQueue free_tasks;
13
+  GQueue pending_tasks;
14
   GQueue output_tasks;
15
 
16
   GMutex lock;
17
@@ -171,6 +173,7 @@
18
       (GDestroyNotify) gst_nv_encoder_task_clear);
19
 
20
   g_queue_init (&priv->free_tasks);
21
+  g_queue_init (&priv->pending_tasks);
22
   g_queue_init (&priv->output_tasks);
23
 
24
   g_mutex_init (&priv->lock);
25
@@ -253,6 +256,7 @@
26
   }
27
 
28
   g_queue_clear (&priv->free_tasks);
29
+  g_queue_clear (&priv->pending_tasks);
30
   g_queue_clear (&priv->output_tasks);
31
 
32
   priv->last_flow = GST_FLOW_OK;
33
@@ -349,6 +353,7 @@
34
   NV_ENC_PIC_PARAMS pic_params = { 0, };
35
   NVENCSTATUS status;
36
   GstNvEncoderTask *task;
37
+  GstNvEncoderTask *pending_task;
38
 
39
   if (!priv->session || !priv->encoding_thread)
40
     return TRUE;
41
@@ -380,6 +385,12 @@
42
   gst_nv_encoder_device_unlock (self);
43
 
44
   GST_NV_ENCODER_LOCK (self);
45
+  while ((pending_task =
46
+          (GstNvEncoderTask *) g_queue_pop_head (&priv->pending_tasks)) !=
47
+      nullptr) {
48
+    g_queue_push_tail (&priv->output_tasks, pending_task);
49
+  }
50
+
51
   g_queue_push_tail (&priv->output_tasks, task);
52
   g_cond_broadcast (&priv->cond);
53
   GST_NV_ENCODER_UNLOCK (self);
54
@@ -578,6 +589,11 @@
55
 
56
   features = gst_caps_get_features (caps, 0);
57
   min_buffers = gst_nv_encoder_get_task_size (self);
58
+  if (min_buffers == 0) {
59
+    GstNvEncoderClass *klass = GST_NV_ENCODER_GET_CLASS (self);
60
+
61
+    min_buffers = klass->calculate_min_buffers (self);
62
+  }
63
 
64
   switch (priv->subclass_device_mode) {
65
     case GST_NV_ENCODER_DEVICE_AUTO_SELECT:
66
@@ -873,8 +889,38 @@
67
   }
68
 
69
   gst_video_codec_frame_set_user_data (frame, task, NULL);
70
-  g_queue_push_tail (&priv->output_tasks, task);
71
-  g_cond_broadcast (&priv->cond);
72
+
73
+  /* On Windows and if async encoding is enabled, output thread will wait
74
+   * for completion event. But on Linux, async encoding is not supported.
75
+   * So, we should wait for NV_ENC_SUCCESS in case of sync mode
76
+   * (it would introduce latency though).
77
+   * Otherwise nvEncLockBitstream() will return error */
78
+  if (task->event_handle) {
79
+    /* Windows only path */
80
+    g_queue_push_tail (&priv->output_tasks, task);
81
+    g_cond_broadcast (&priv->cond);
82
+  } else {
83
+    g_queue_push_tail (&priv->pending_tasks, task);
84
+    if (status == NV_ENC_SUCCESS) {
85
+      bool notify = false;
86
+
87
+      /* XXX: nvEncLockBitstream() will return NV_ENC_ERR_INVALID_PARAM
88
+       * if lookahead is enabled. See also
89
+       * https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/494
90
+       */
91
+      while (g_queue_get_length (&priv->pending_tasks) > priv->lookahead) {
92
+        GstNvEncoderTask *pending_task =
93
+            (GstNvEncoderTask *) g_queue_pop_head (&priv->pending_tasks);
94
+
95
+        g_queue_push_tail (&priv->output_tasks, pending_task);
96
+        notify = true;
97
+      }
98
+
99
+      if (notify)
100
+        g_cond_broadcast (&priv->cond);
101
+    }
102
+  }
103
+
104
   GST_NV_ENCODER_UNLOCK (self);
105
 
106
   return GST_FLOW_OK;
107
@@ -1283,6 +1329,7 @@
108
     }
109
   }
110
 
111
+  priv->lookahead = priv->config.rcParams.lookaheadDepth;
112
   task_pool_size = gst_nv_encoder_calculate_task_pool_size (self,
113
       &priv->config);
114
   g_array_set_size (priv->task_pool, task_pool_size);
115
gst-plugins-bad-1.22.0.tar.xz/sys/nvcodec/gstnvencoder.h -> gst-plugins-bad-1.22.1.tar.xz/sys/nvcodec/gstnvencoder.h Changed
10
 
1
@@ -222,6 +222,8 @@
2
                                        const GstVideoInfo * info,
3
                                        GstBuffer * buffer,
4
                                        GstNvEncoderDeviceData * data);
5
+
6
+  guint       (*calculate_min_buffers) (GstNvEncoder * encoder);
7
 };
8
 
9
 GType gst_nv_encoder_get_type (void);
10
gst-plugins-bad-1.22.0.tar.xz/sys/nvcodec/gstnvh264encoder.cpp -> gst-plugins-bad-1.22.1.tar.xz/sys/nvcodec/gstnvh264encoder.cpp Changed
43
 
1
@@ -227,6 +227,7 @@
2
 static gboolean gst_nv_h264_encoder_select_device (GstNvEncoder * encoder,
3
     const GstVideoInfo * info, GstBuffer * buffer,
4
     GstNvEncoderDeviceData * data);
5
+static guint gst_nv_h264_encoder_calculate_min_buffers (GstNvEncoder * encoder);
6
 
7
 static void
8
 gst_nv_h264_encoder_class_init (GstNvH264EncoderClass * klass, gpointer data)
9
@@ -467,6 +468,8 @@
10
       GST_DEBUG_FUNCPTR (gst_nv_h264_encoder_check_reconfigure);
11
   nvenc_class->select_device =
12
       GST_DEBUG_FUNCPTR (gst_nv_h264_encoder_select_device);
13
+  nvenc_class->calculate_min_buffers =
14
+      GST_DEBUG_FUNCPTR (gst_nv_h264_encoder_calculate_min_buffers);
15
 
16
   klass->device_caps = cdata->device_caps;
17
   klass->cuda_device_id = cdata->cuda_device_id;
18
@@ -1738,6 +1741,24 @@
19
   return TRUE;
20
 }
21
 
22
+static guint
23
+gst_nv_h264_encoder_calculate_min_buffers (GstNvEncoder * encoder)
24
+{
25
+  GstNvH264Encoder *self = GST_NV_H264_ENCODER (encoder);
26
+  guint num_buffers;
27
+
28
+  /* At least 4 surfaces are required as documented by Nvidia Encoder guide */
29
+  num_buffers = 4;
30
+
31
+  /* lookahead depth */
32
+  num_buffers += self->rc_lookahead;
33
+
34
+  /* B frames + 1 */
35
+  num_buffers += self->bframes + 1;
36
+
37
+  return num_buffers;
38
+}
39
+
40
 static GstNvEncoderClassData *
41
 gst_nv_h264_encoder_create_class_data (GstObject * device, gpointer session,
42
     GstNvEncoderDeviceMode device_mode)
43
gst-plugins-bad-1.22.0.tar.xz/sys/nvcodec/gstnvh265encoder.cpp -> gst-plugins-bad-1.22.1.tar.xz/sys/nvcodec/gstnvh265encoder.cpp Changed
43
 
1
@@ -232,6 +232,7 @@
2
 static gboolean gst_nv_h265_encoder_select_device (GstNvEncoder * encoder,
3
     const GstVideoInfo * info, GstBuffer * buffer,
4
     GstNvEncoderDeviceData * data);
5
+static guint gst_nv_h265_encoder_calculate_min_buffers (GstNvEncoder * encoder);
6
 
7
 static void
8
 gst_nv_h265_encoder_class_init (GstNvH265EncoderClass * klass, gpointer data)
9
@@ -468,6 +469,8 @@
10
       GST_DEBUG_FUNCPTR (gst_nv_h265_encoder_check_reconfigure);
11
   nvenc_class->select_device =
12
       GST_DEBUG_FUNCPTR (gst_nv_h265_encoder_select_device);
13
+  nvenc_class->calculate_min_buffers =
14
+      GST_DEBUG_FUNCPTR (gst_nv_h265_encoder_calculate_min_buffers);
15
 
16
   klass->device_caps = cdata->device_caps;
17
   klass->cuda_device_id = cdata->cuda_device_id;
18
@@ -1750,6 +1753,24 @@
19
   return TRUE;
20
 }
21
 
22
+static guint
23
+gst_nv_h265_encoder_calculate_min_buffers (GstNvEncoder * encoder)
24
+{
25
+  GstNvH265Encoder *self = GST_NV_H265_ENCODER (encoder);
26
+  guint num_buffers;
27
+
28
+  /* At least 4 surfaces are required as documented by Nvidia Encoder guide */
29
+  num_buffers = 4;
30
+
31
+  /* lookahead depth */
32
+  num_buffers += self->rc_lookahead;
33
+
34
+  /* B frames + 1 */
35
+  num_buffers += self->bframes + 1;
36
+
37
+  return num_buffers;
38
+}
39
+
40
 static GstNvEncoderClassData *
41
 gst_nv_h265_encoder_create_class_data (GstObject * device, gpointer session,
42
     GstNvEncoderDeviceMode device_mode)
43
gst-plugins-bad-1.22.0.tar.xz/sys/nvcodec/gstnvvp9dec.c -> gst-plugins-bad-1.22.1.tar.xz/sys/nvcodec/gstnvvp9dec.c Changed
10
 
1
@@ -480,7 +480,7 @@
2
           dpb->pic_listi);
3
       if (!other_frame) {
4
         GST_ERROR_OBJECT (self, "Couldn't get decoder frame from picture");
5
-        return FALSE;
6
+        return GST_FLOW_ERROR;
7
       }
8
 
9
       ref_frame_mapi = other_frame->index;
10
gst-plugins-bad-1.22.0.tar.xz/sys/nvcodec/plugin.c -> gst-plugins-bad-1.22.1.tar.xz/sys/nvcodec/plugin.c Changed
51
 
1
@@ -65,6 +65,7 @@
2
 plugin_init (GstPlugin * plugin)
3
 {
4
   CUresult cuda_ret;
5
+  const char *err_name = NULL, *err_desc = NULL;
6
   gint dev_count = 0;
7
   guint i;
8
   gboolean nvdec_available = TRUE;
9
@@ -102,7 +103,8 @@
10
   }
11
 
12
   if (!gst_cuvid_load_library (api_major_ver, api_minor_ver)) {
13
-    GST_WARNING ("Failed to load nvdec library");
14
+    GST_WARNING ("Failed to load nvdec library version %u.%u", api_major_ver,
15
+        api_minor_ver);
16
     nvdec_available = FALSE;
17
   }
18
 
19
@@ -111,12 +113,19 @@
20
 
21
   cuda_ret = CuInit (0);
22
   if (cuda_ret != CUDA_SUCCESS) {
23
-    GST_WARNING ("Failed to init cuda, ret: 0x%x", (gint) cuda_ret);
24
+    CuGetErrorName (cuda_ret, &err_name);
25
+    CuGetErrorString (cuda_ret, &err_desc);
26
+    GST_ERROR ("Failed to init cuda, cuInit ret: 0x%x: %s: %s",
27
+        (int) cuda_ret, err_name, err_desc);
28
     return TRUE;
29
   }
30
 
31
-  if (CuDeviceGetCount (&dev_count) != CUDA_SUCCESS || !dev_count) {
32
-    GST_WARNING ("No available device, ret: 0x%x", (gint) cuda_ret);
33
+  cuda_ret = CuDeviceGetCount (&dev_count);
34
+  if (cuda_ret != CUDA_SUCCESS || !dev_count) {
35
+    CuGetErrorName (cuda_ret, &err_name);
36
+    CuGetErrorString (cuda_ret, &err_desc);
37
+    GST_ERROR ("No available device, cuDeviceGetCount ret: 0x%x: %s %s",
38
+        (int) cuda_ret, err_name, err_desc);
39
     return TRUE;
40
   }
41
 
42
@@ -152,7 +161,7 @@
43
     CUcontext cuda_ctx;
44
 
45
     if (!context) {
46
-      GST_WARNING ("Failed to create context for deevice %d", i);
47
+      GST_WARNING ("Failed to create context for device %d", i);
48
       continue;
49
     }
50
 
51
gst-plugins-bad-1.22.0.tar.xz/sys/qsv/gstqsvav1enc.cpp -> gst-plugins-bad-1.22.1.tar.xz/sys/qsv/gstqsvav1enc.cpp Changed
28
 
1
@@ -122,7 +122,7 @@
2
 
3
 #define DOC_SRC_CAPS \
4
     "video/x-av1, width = (int)  16, 8192 , height = (int)  16, 8192 , " \
5
-    "alignment = (string) tu"
6
+    "stream-format = (string) obu-stream, alignment = (string) tu"
7
 
8
 typedef struct _GstQsvAV1EncClassData
9
 {
10
@@ -561,7 +561,7 @@
11
   }
12
 
13
   caps = gst_caps_from_string ("video/x-av1, profile = (string) main, "
14
-      "alignment= (string) tu");
15
+      "stream-format = (string) obu-stream, alignment= (string) tu");
16
   out_state = gst_video_encoder_set_output_state (GST_VIDEO_ENCODER (encoder),
17
       caps, state);
18
   gst_video_codec_state_unref (out_state);
19
@@ -778,7 +778,7 @@
20
 #endif
21
 
22
   std::string src_caps_str = "video/x-av1, profile = (string) main, "
23
-      "alignment = (string) tu";
24
+      "stream-format = (string) obu-stream, alignment = (string) tu";
25
   src_caps_str += ", width=(int)  16, " + std::to_string (resolution) + " ";
26
   src_caps_str += ", height=(int)  16, " + std::to_string (resolution) + " ";
27
 
28
gst-plugins-bad-1.22.0.tar.xz/sys/va/gstjpegdecoder.c -> gst-plugins-bad-1.22.1.tar.xz/sys/va/gstjpegdecoder.c Changed
10
 
1
@@ -90,6 +90,8 @@
2
 gst_jpeg_decoder_init (GstJpegDecoder * self)
3
 {
4
   gst_video_decoder_set_packetized (GST_VIDEO_DECODER (self), TRUE);
5
+  gst_video_decoder_set_needs_format (GST_VIDEO_DECODER (self), TRUE);
6
+
7
   self->priv = gst_jpeg_decoder_get_instance_private (self);
8
 }
9
 
10
gst-plugins-bad-1.22.0.tar.xz/sys/va/gstvaav1dec.c -> gst-plugins-bad-1.22.1.tar.xz/sys/va/gstvaav1dec.c Changed
14
 
1
@@ -300,7 +300,11 @@
2
     return NULL;
3
   }
4
 
5
-  gst_buffer_pool_set_active (pool, TRUE);
6
+  if (!gst_buffer_pool_set_active (pool, TRUE)) {
7
+    GST_WARNING_OBJECT (self, "Failed to activate internal pool");
8
+    gst_object_unref (pool);
9
+    return NULL;
10
+  }
11
 
12
   return pool;
13
 }
14
gst-plugins-bad-1.22.0.tar.xz/sys/va/gstvabaseenc.c -> gst-plugins-bad-1.22.1.tar.xz/sys/va/gstvabaseenc.c Changed
26
 
1
@@ -229,7 +229,10 @@
2
 
3
   gst_object_unref (allocator);
4
 
5
-  gst_buffer_pool_set_active (base->priv->raw_pool, TRUE);
6
+  if (!gst_buffer_pool_set_active (base->priv->raw_pool, TRUE)) {
7
+    GST_WARNING_OBJECT (base, "Failed to activate sinkpad pool");
8
+    return NULL;
9
+  }
10
 
11
   return base->priv->raw_pool;
12
 }
13
@@ -690,8 +693,10 @@
14
   {
15
     GST_ELEMENT_ERROR (venc, STREAM, ENCODE,
16
         ("Failed to reorder the input frame."), (NULL));
17
-    gst_clear_buffer (&frame->output_buffer);
18
-    gst_video_encoder_finish_frame (venc, frame);
19
+    if (frame) {
20
+      gst_clear_buffer (&frame->output_buffer);
21
+      gst_video_encoder_finish_frame (venc, frame);
22
+    }
23
     return GST_FLOW_ERROR;
24
   }
25
 error_encode:
26
gst-plugins-bad-1.22.0.tar.xz/sys/va/gstvabasetransform.c -> gst-plugins-bad-1.22.1.tar.xz/sys/va/gstvabasetransform.c Changed
13
 
1
@@ -768,7 +768,10 @@
2
 
3
   if (self->priv->sinkpad_caps) {
4
     caps = self->priv->sinkpad_caps;
5
-    gst_video_info_from_caps (&in_info, caps);
6
+    if (!gst_video_info_from_caps (&in_info, caps)) {
7
+      GST_ERROR_OBJECT (self, "Cannot parse caps %" GST_PTR_FORMAT, caps);
8
+      return NULL;
9
+    }
10
   } else {
11
     caps = self->in_caps;
12
     in_info = self->in_info;
13
gst-plugins-bad-1.22.0.tar.xz/sys/va/gstvaencoder.c -> gst-plugins-bad-1.22.1.tar.xz/sys/va/gstvaencoder.c Changed
14
 
1
@@ -397,7 +397,11 @@
2
     GST_ERROR_OBJECT (self, "Failed to create reconstruct pool");
3
     goto error;
4
   }
5
-  gst_buffer_pool_set_active (recon_pool, TRUE);
6
+
7
+  if (!gst_buffer_pool_set_active (recon_pool, TRUE)) {
8
+    GST_ERROR_OBJECT (self, "Failed to activate reconstruct pool");
9
+    goto error;
10
+  }
11
 
12
   status = vaCreateContext (dpy, config, coded_width, coded_height,
13
       VA_PROGRESSIVE, NULL, 0, &context);
14
gst-plugins-bad-1.22.0.tar.xz/sys/va/gstvah264dec.c -> gst-plugins-bad-1.22.1.tar.xz/sys/va/gstvah264dec.c Changed
29
 
1
@@ -363,7 +363,7 @@
2
   GstVaDecodePicture *va_pic;
3
   VAIQMatrixBufferH264 iq_matrix = { 0, };
4
   VAPictureParameterBufferH264 pic_param;
5
-  guint i, n;
6
+  guint i;
7
   GArray *ref_list = self->ref_list;
8
 
9
   va_pic = gst_h264_picture_get_user_data (picture);
10
@@ -454,9 +454,15 @@
11
 
12
   /* We need the first 2 entries (Y intra and Y inter for YCbCr 4:2:2 and
13
    * less, and the full 6 entries for 4:4:4, see Table 7-2 of the spec for
14
-   * more details */
15
-  n = (pps->sequence->chroma_format_idc == 3) ? 6 : 2;
16
-  for (i = 0; i < n; i++) {
17
+   * more details.
18
+   * But VA API only define the first 2 entries, so we may lose scaling
19
+   * list info for 4:4:4 stream. */
20
+  if (pps->sequence->chroma_format_idc == 3)
21
+    GST_WARNING_OBJECT (self, "We do not have scaling list entries "
22
+        "for U/V planes in 4:4:4 stream. It may have artifact if "
23
+        "those scaling lists are not default value.");
24
+
25
+  for (i = 0; i < 2; i++) {
26
     gst_h264_quant_matrix_8x8_get_raster_from_zigzag (iq_matrix.ScalingList8x8
27
         i, pps->scaling_lists_8x8i);
28
   }
29
gst-plugins-bad-1.22.0.tar.xz/sys/va/gstvah264enc.c -> gst-plugins-bad-1.22.1.tar.xz/sys/va/gstvah264enc.c Changed
15
 
1
@@ -1200,11 +1200,13 @@
2
         BitDepthC = 10;
3
         MbWidthC = 8;
4
         MbHeightC = 8;
5
+        break;
6
       case VA_RT_FORMAT_YUV422_10:
7
         BitDepthY = 10;
8
         BitDepthC = 10;
9
         MbWidthC = 8;
10
         MbHeightC = 16;
11
+        break;
12
       case VA_RT_FORMAT_YUV444_10:
13
         BitDepthY = 10;
14
         BitDepthC = 10;
15
gst-plugins-bad-1.22.0.tar.xz/sys/va/gstvah265enc.c -> gst-plugins-bad-1.22.1.tar.xz/sys/va/gstvah265enc.c Changed
24
 
1
@@ -3382,8 +3382,7 @@
2
 
3
     GST_INFO_OBJECT (self, "target bitrate computed to %u kbps", bitrate);
4
 
5
-    self->prop.bitrate = bitrate;
6
-    g_object_notify_by_pspec (G_OBJECT (self), propertiesPROP_BITRATE);
7
+    update_property_uint (base, &self->prop.bitrate, bitrate, PROP_BITRATE);
8
   }
9
 
10
   /* Adjust the setting based on RC mode. */
11
@@ -4284,10 +4283,8 @@
12
     self->features.use_trellis = FALSE;
13
   }
14
 
15
-  if (self->prop.use_trellis != self->features.use_trellis) {
16
-    self->prop.use_trellis = self->features.use_trellis;
17
-    g_object_notify_by_pspec (G_OBJECT (self), propertiesPROP_TRELLIS);
18
-  }
19
+  update_property_bool (base, &self->prop.use_trellis,
20
+      self->features.use_trellis, PROP_TRELLIS);
21
 }
22
 
23
 /* We need to decide the profile and entrypoint before call this.
24
gst-plugins-bad-1.22.0.tar.xz/sys/wasapi2/gstwasapi2ringbuffer.cpp -> gst-plugins-bad-1.22.1.tar.xz/sys/wasapi2/gstwasapi2ringbuffer.cpp Changed
71
 
1
@@ -713,7 +713,10 @@
2
   }
3
 
4
   if (self->running) {
5
-    if (gst_wasapi2_result (hr)) {
6
+    if (gst_wasapi2_result (hr) &&
7
+        /* In case of normal loopback capture, this method is called from
8
+         * silence feeding thread. Don't schedule again in that case */
9
+        self->device_class != GST_WASAPI2_CLIENT_DEVICE_CLASS_LOOPBACK_CAPTURE) {
10
       hr = MFPutWaitingWorkItem (self->event_handle, 0, self->callback_result,
11
           &self->callback_key);
12
 
13
@@ -761,17 +764,16 @@
14
   if (!gst_wasapi2_result (hr))
15
     return hr;
16
 
17
-  if (padding_frames >= self->buffer_size) {
18
+  if (padding_frames >= self->loopback_buffer_size) {
19
     GST_INFO_OBJECT (self,
20
         "Padding size %d is larger than or equal to buffer size %d",
21
-        padding_frames, self->buffer_size);
22
+        padding_frames, self->loopback_buffer_size);
23
     return S_OK;
24
   }
25
 
26
-  can_write = self->buffer_size - padding_frames;
27
+  can_write = self->loopback_buffer_size - padding_frames;
28
 
29
-  GST_TRACE_OBJECT (self,
30
-      "Writing %d silent frames offset at %" G_GUINT64_FORMAT, can_write);
31
+  GST_TRACE_OBJECT (self, "Writing %d silent frames", can_write);
32
 
33
   hr = render_client->GetBuffer (can_write, &data);
34
   if (!gst_wasapi2_result (hr))
35
@@ -797,6 +799,12 @@
36
 
37
   hr = gst_wasapi2_ring_buffer_fill_loopback_silence (self);
38
 
39
+  /* On Windows versions prior to Windows 10, a pull-mode capture client will
40
+   * not receive any events when a stream is initialized with event-driven
41
+   * buffering */
42
+  if (gst_wasapi2_result (hr))
43
+    hr = gst_wasapi2_ring_buffer_io_callback (self);
44
+
45
   if (self->running) {
46
     if (gst_wasapi2_result (hr)) {
47
       hr = MFPutWaitingWorkItem (self->loopback_event_handle, 0,
48
@@ -1229,13 +1237,15 @@
49
     goto error;
50
   }
51
 
52
-  hr = MFPutWaitingWorkItem (self->event_handle, 0, self->callback_result,
53
-      &self->callback_key);
54
-  if (!gst_wasapi2_result (hr)) {
55
-    GST_ERROR_OBJECT (self, "Failed to put waiting item");
56
-    client_handle->Stop ();
57
-    self->running = FALSE;
58
-    goto error;
59
+  if (self->device_class != GST_WASAPI2_CLIENT_DEVICE_CLASS_LOOPBACK_CAPTURE) {
60
+    hr = MFPutWaitingWorkItem (self->event_handle, 0, self->callback_result,
61
+        &self->callback_key);
62
+    if (!gst_wasapi2_result (hr)) {
63
+      GST_ERROR_OBJECT (self, "Failed to put waiting item");
64
+      client_handle->Stop ();
65
+      self->running = FALSE;
66
+      goto error;
67
+    }
68
   }
69
 
70
   return TRUE;
71
gst-plugins-bad-1.22.0.tar.xz/sys/win32ipc/protocol/win32ipcutils.cpp -> gst-plugins-bad-1.22.1.tar.xz/sys/win32ipc/protocol/win32ipcutils.cpp Changed
9
 
1
@@ -23,6 +23,7 @@
2
  */
3
 
4
 #include "win32ipcutils.h"
5
+#include <cctype>
6
 #include <string>
7
 #include <locale>
8
 #include <codecvt>
9
gst-plugins-bad-1.22.0.tar.xz/tests/check/elements/h265parse.c -> gst-plugins-bad-1.22.1.tar.xz/tests/check/elements/h265parse.c Changed
80
 
1
@@ -332,6 +332,70 @@
2
 
3
 GST_END_TEST;
4
 
5
+/* 8bits 4:4:4 encoded stream, and profile-level-tier is not spec compliant.
6
+ * extracted from the file reported at
7
+ * https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1009
8
+ */
9
+static const guint8 broken_profile_codec_data = {
10
+  0x01, 0x24, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
11
+  0x99, 0xf0, 0x00, 0xfc, 0xff, 0xf8, 0xf8, 0x00, 0x00, 0x0f, 0x03, 0x20,
12
+  0x00, 0x01, 0x00, 0x18, 0x40, 0x01, 0x0c, 0x01, 0xff, 0xff, 0x24, 0x08,
13
+  0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03,
14
+  0x00, 0x99, 0xac, 0x09, 0x21, 0x00, 0x01, 0x00, 0x2c, 0x42, 0x01, 0x01,
15
+  0x24, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x00,
16
+  0x00, 0x03, 0x00, 0x99, 0x90, 0x00, 0x3c, 0x04, 0x00, 0x44, 0x0f, 0x84,
17
+  0x72, 0xd6, 0x94, 0x84, 0xb2, 0x5c, 0x40, 0x20, 0x00, 0x00, 0x03, 0x00,
18
+  0x20, 0x00, 0x00, 0x07, 0x81, 0x22, 0x00, 0x01, 0x00, 0x08, 0x44, 0x01,
19
+  0xc0, 0xf7, 0x18, 0x30, 0x0c, 0xc9
20
+};
21
+
22
+GST_START_TEST (test_parse_fallback_profile)
23
+{
24
+  GstHarness *h = gst_harness_new ("h265parse");
25
+  GstCaps *caps;
26
+  GstBuffer *codec_data;
27
+  GstEvent *event;
28
+
29
+  codec_data = gst_buffer_new_memdup (broken_profile_codec_data,
30
+      sizeof (broken_profile_codec_data));
31
+
32
+  caps = gst_caps_from_string ("video/x-h265, stream-format=(string)hvc1, "
33
+      "alignment=(string)au");
34
+  gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER, codec_data, NULL);
35
+  gst_buffer_unref (codec_data);
36
+
37
+  gst_harness_set_src_caps (h, caps);
38
+  while ((event = gst_harness_pull_event (h)) != NULL) {
39
+    GstStructure *s;
40
+    const gchar *profile;
41
+
42
+    if (GST_EVENT_TYPE (event) != GST_EVENT_CAPS) {
43
+      gst_event_unref (event);
44
+      continue;
45
+    }
46
+
47
+    gst_event_parse_caps (event, &caps);
48
+    s = gst_caps_get_structure (caps, 0);
49
+    profile = gst_structure_get_string (s, "profile");
50
+
51
+    /* h265parse must provide profile */
52
+    fail_unless (profile);
53
+
54
+    /* must not be main profile at least.
55
+     * main-444 is expected but we might update the profile parsing
56
+     * logic later. At least it should not be main profile
57
+     */
58
+    fail_if (g_strcmp0 (profile, "main") == 0);
59
+
60
+    gst_event_unref (event);
61
+    break;
62
+  }
63
+
64
+  gst_harness_teardown (h);
65
+}
66
+
67
+GST_END_TEST;
68
+
69
 static Suite *
70
 h265parse_suite (void)
71
 {
72
@@ -344,6 +408,7 @@
73
   tcase_add_test (tc_chain, test_parse_split);
74
   tcase_add_test (tc_chain, test_parse_detect_stream);
75
   tcase_add_test (tc_chain, test_parse_detect_stream_with_hdr_sei);
76
+  tcase_add_test (tc_chain, test_parse_fallback_profile);
77
 
78
   return s;
79
 }
80
gst-plugins-bad-1.22.0.tar.xz/tools/gst-transcoder.c -> gst-plugins-bad-1.22.1.tar.xz/tools/gst-transcoder.c Changed
39
 
1
@@ -362,7 +362,12 @@
2
   g_option_context_add_main_entries (ctx, options, NULL);
3
   g_option_context_add_group (ctx, gst_init_get_option_group ());
4
 
5
-  if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
6
+#ifdef G_OS_WIN32
7
+  if (!g_option_context_parse_strv (ctx, &argv, &err))
8
+#else
9
+  if (!g_option_context_parse (ctx, &argc, &argv, &err))
10
+#endif
11
+  {
12
     g_print ("Error initializing: %s\n", GST_STR_NULL (err->message));
13
     g_clear_error (&err);
14
     g_option_context_free (ctx);
15
@@ -468,9 +473,21 @@
16
 int
17
 main (int argc, char *argv)
18
 {
19
+  int ret;
20
+
21
+#ifdef G_OS_WIN32
22
+  argv = g_win32_get_command_line ();
23
+#endif
24
+
25
 #if defined(__APPLE__) && TARGET_OS_MAC && !TARGET_OS_IPHONE
26
-  return gst_macos_main ((GstMainFunc) real_main, argc, argv, NULL);
27
+  ret = gst_macos_main ((GstMainFunc) real_main, argc, argv, NULL);
28
 #else
29
-  return real_main (argc, argv);
30
+  ret = real_main (argc, argv);
31
+#endif
32
+
33
+#ifdef G_OS_WIN32
34
+  g_strfreev (argv);
35
 #endif
36
+
37
+  return ret;
38
 }
39