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