diff -Nru gst-plugins-good1.0-1.22.5/ChangeLog gst-plugins-good1.0-1.22.6/ChangeLog --- gst-plugins-good1.0-1.22.5/ChangeLog 2023-07-20 14:24:30.626389700 +0000 +++ gst-plugins-good1.0-1.22.6/ChangeLog 2023-09-20 17:14:20.772092600 +0000 @@ -1,3 +1,193 @@ +=== release 1.22.6 === + +2023-09-20 18:10:57 +0100 Tim-Philipp Müller + + * NEWS: + * RELEASE: + * docs/gst_plugins_cache.json: + * gst-plugins-good.doap: + * meson.build: + Release 1.22.6 + +2023-09-19 09:14:31 +0200 Olivier Blin + + * ext/pulse/pulsedeviceprovider.c: + pulsedeviceprovider: fix incorrect usage of GST_ELEMENT_ERROR + The provider is not a GStreamer element. + Part-of: + +2023-09-05 16:56:44 -0400 Nicolas Dufresne + + * sys/v4l2/gstv4l2object.c: + v4l2: object: Handle video helper return value + gst_video_info_set_interlaced_format() can return an error if the + width/height causes integer overflow. Handle this case, so that we can + fail cleanly. This has been experienced while testing an in-progress + driver. + Part-of: + +2023-09-05 16:51:24 -0400 Nicolas Dufresne + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2: bufferpool: Avoid warnings on empty last buffer + Some drivers will push an buffer flagged LAST but empty. In decoder + case, this results in an "producing too many buffer" warning, even + though the result is entirely correct. Detect this case in order to + signal EOS earlier and avoid this warning. + Part-of: + +2023-09-05 16:15:19 -0400 Nicolas Dufresne + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2: bufferpool: Do not resize compressed buffer + Avoid resizing compressed buffer to their maximum size. This fixes a + regression that caused valid but very large streams to be generated. + Fixes #2953 + Part-of: + +2023-09-07 17:23:37 +0300 Sebastian Dröge + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: Avoid integer overflow in max saveable packets calculation with negative offset + The timestamp offset can be negative, and it can be a bigger negative + number than the latency introduced by the rtpjitterbuffer so the overall + timeout offset can be negative. + Using the negative offset for calculating how many packets can still + arrive in time when encountering a lost packet in an equidistant stream + would then overflow and instead of considering fewer packets lost a lot + more packets are considered lost. + Part-of: + +2023-08-22 09:57:14 +0800 Ming Qian + + * sys/v4l2/gstv4l2object.c: + v4l2object: clear format lists if source change event is received + If decoder notify a source change event when the capture format is + changed, not the resolution changed. + then gst_v4l2_object_acquire_format will retuen false due to + unsupported format. + we need to clear the format lists in the source change flow, + and reenumerate format list + Part-of: + +2023-07-25 15:14:11 -0400 Nicolas Dufresne + + * sys/v4l2/gstv4l2allocator.c: + v4l2: allocator: Don't close foreign dmabuf + Imported dmabuf are not being duped, so they should never be closed. Instead, + we ensure their live time by having strong reference on their original + buffer. This should fix potential flickering due to dmabuf being closed + too early. + Part-of: + +2023-07-20 19:13:36 +0200 Jan Alexander Steffens (heftig) + + * ext/qt/meson.build: + qt: Unbreak build with qt-egl enabled but viv_fb missing + Avoids an error message when the feature is explicitly enabled: + ERROR: Feature qt-egl cannot be enabled: gstreamer-gl-viv_fb-1.0 is required + Part-of: + +2023-08-07 14:18:21 +0800 Wang Chuan + + * ext/adaptivedemux2/gstadaptivedemux.c: + gstadaptivedemux: fix memory leak + GstQuery leaks when using invalid url + Part-of: + +2023-08-04 15:11:05 +0530 Nirbheek Chauhan + + * ext/qt/meson.build: + * ext/qt6/meson.build: + meson: Fix searching of qt5/qt6 tools with qmake + If the pkg-config files are broken, we want to ensure that qmake is + used. This can easily happen on macOS with the official Qt binaries. + Part-of: + +2023-07-12 12:37:34 +0200 Alicia Boya García + + * gst/isomp4/qtdemux.c: + qtdemux: Fix premature EOS when some files are played in push mode + Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2771 + This EOS branch exists so that if a seek with a stop is made, qtdemux + stops accepting bytes from the sink after the entire requested playback + range is demuxed, as otherwise we could keep download content that is + not being used. + This patch fixes two flaws that were present in that EOS check: + 1) A comparison was made between track time and movie time without conversion. + This made the check trigger early in files with edit lists. This patch fixes + this by converting the track PTS to movie PTS (stream time) for the check. + 2) To avoid sending a EOS prematurely when the segment stop is within a GOP and + B-frames are present, the check for EOS should only be done for keyframes. I + gather this was already the intention with the existing code, but because it + used `stream->on_keyframe` instead of the local variable `keyframe` the old + code was checking if the *previous* frame was a keyframe. + It's interesting to note that these two flaws in the old code mask each other + in most cases: the track PTS will have reached the movie end PTS, but EOS would + only be sent if the previous frame was a keyframe. A simple case where they + wouldn't mask each other, reproducing the bug, is a sequence of 3 frame GOPs + with structure I-B-P. + The following validateflow tests have been added to future-proof the + fix: + * validate.test.mp4.qtdemux_ibpibp_non_frag_pull.default + * validate.test.mp4.qtdemux_ibpibp_non_frag_push.default + Part-of: + +2023-06-22 10:10:43 -0400 Nicolas Dufresne + + * sys/v4l2/gstv4l2bufferpool.c: + * sys/v4l2/gstv4l2object.c: + * sys/v4l2/gstv4l2object.h: + v4l2: Fix support for left and top padding + In the current implementation, we support for most pixel format left + and top padding by changing the offset in the video meta. Though, to + align driver bytesused to the offset, we recalculate the offset, which + removed the modification we did before. + Instead, save the plane size, and truncate the driver reported bytesused + to the expected size, which ensures that the offsets still match. This + should also fix issues were the buffer size ended up bigger then the + pool size due to driver introduced padding. + Part-of: + +2023-07-25 15:15:58 +0200 Guillaume Desmottes + + * gst/videofilter/gstvideoflip.c: + videoflip: fix concurrent access when modifying the tag list + We were checking if the tag list is writable, but it may actually be + shared through the same event (tee upstream or multiple consumers). + Fix a bug where multiple branches have a videoflip element checking the + taglist. The first one was changing the orientation back to rotate-0 + which was resetting the other instances. + Part-of: + +2023-07-21 12:48:08 +0200 Xabier Rodriguez Calvar + + * gst/isomp4/qtdemux.c: + qtdemux: attach cbcs crypt info at the right moment + Before it was always added but that can cause issues when the stream begins + unencrypted. + Part-of: + +2023-07-14 08:28:10 +0530 Nirbheek Chauhan + + * ext/soup/meson.build: + * meson_options.txt: + meson: Ensure that soup plugin is built on Windows + The libpsl subproject wasn't building successfully and CI didn't + notice because: + 1. The plugin wasn't explicitly enabled + 2. Even when the plugin is explicitly enabled, the dep is not required + at build time when not building a static plugin + So fix all of these issues. + Part-of: + +2023-07-20 16:57:47 +0100 Tim-Philipp Müller + + * docs/gst_plugins_cache.json: + * meson.build: + Back to development + Part-of: + === release 1.22.5 === 2023-07-20 15:22:48 +0100 Tim-Philipp Müller diff -Nru gst-plugins-good1.0-1.22.5/debian/changelog gst-plugins-good1.0-1.22.6/debian/changelog --- gst-plugins-good1.0-1.22.5/debian/changelog 2023-08-17 13:56:18.000000000 +0000 +++ gst-plugins-good1.0-1.22.6/debian/changelog 2023-09-25 19:10:09.000000000 +0000 @@ -1,3 +1,30 @@ +gst-plugins-good1.0 (1.22.6-1ubuntu1) mantic; urgency=medium + + * Merge from Debian. Remaining changes: + + Import plugins from -bad that are needed for main applications. + - jpegformat + - camerabin (+ basecamerabinsrc + photography) + + Add a library package containing the shared library and a -dev package for + compiling against it. Add Breaks and Replaces against the plugins packages + which formerly contained files shipped here. + + Add 'pluginsdir' variable to our added pcfile for compatibility with + some external software + + debian/control{,.in}: Update Vcs-* for Ubuntu + + Don't require libqt5waylandclient5-dev Build-Depends on i386 + + Don't build the Qt6 plugin on i386 since Qt6 isn't built there + on Ubuntu + + -- Jeremy Bícha Mon, 25 Sep 2023 15:10:09 -0400 + +gst-plugins-good1.0 (1.22.6-1) unstable; urgency=medium + + * Team upload + * New upstream bugfix release + * Drop Qt patch: applied in new release + * Build-Depend on qttools5-dev + + -- Jeremy Bícha Mon, 25 Sep 2023 15:04:32 -0400 + gst-plugins-good1.0 (1.22.5-1ubuntu1) mantic; urgency=medium * Merge from Debian. Remaining changes: diff -Nru gst-plugins-good1.0-1.22.5/debian/control gst-plugins-good1.0-1.22.6/debian/control --- gst-plugins-good1.0-1.22.5/debian/control 2023-08-17 13:56:18.000000000 +0000 +++ gst-plugins-good1.0-1.22.6/debian/control 2023-09-25 19:10:09.000000000 +0000 @@ -46,6 +46,7 @@ qtbase5-dev [amd64 arm64 armel armhf i386 mips64el mipsel ppc64el s390x hurd-i386 powerpc ppc64 riscv64 sparc64], qtbase5-private-dev [amd64 arm64 armel armhf i386 mips64el mipsel ppc64el s390x hurd-i386 powerpc ppc64 riscv64 sparc64], qtdeclarative5-dev [amd64 arm64 armel armhf i386 mips64el mipsel ppc64el s390x hurd-i386 powerpc ppc64 riscv64 sparc64], + qttools5-dev [amd64 arm64 armel armhf i386 mips64el mipsel ppc64el s390x hurd-i386 powerpc ppc64 riscv64 sparc64], qt6-base-private-dev [amd64 arm64 armel armhf mips64el mipsel ppc64el s390x hurd-i386 powerpc ppc64 riscv64 sparc64], qt6-declarative-dev [amd64 arm64 armel armhf mips64el mipsel ppc64el s390x hurd-i386 powerpc ppc64 riscv64 sparc64], qt6-tools-dev [amd64 arm64 armel armhf mips64el mipsel ppc64el s390x hurd-i386 powerpc ppc64 riscv64 sparc64], diff -Nru gst-plugins-good1.0-1.22.5/debian/patches/qt-Unbreak-build-with-qt-egl-enabled-but-viv_fb-missing.patch gst-plugins-good1.0-1.22.6/debian/patches/qt-Unbreak-build-with-qt-egl-enabled-but-viv_fb-missing.patch --- gst-plugins-good1.0-1.22.5/debian/patches/qt-Unbreak-build-with-qt-egl-enabled-but-viv_fb-missing.patch 2023-08-17 13:56:18.000000000 +0000 +++ gst-plugins-good1.0-1.22.6/debian/patches/qt-Unbreak-build-with-qt-egl-enabled-but-viv_fb-missing.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -From: "Jan Alexander Steffens (heftig)" -Date: Thu, 20 Jul 2023 19:13:36 +0200 -Subject: qt: Unbreak build with qt-egl enabled but viv_fb missing - -Avoids an error message when the feature is explicitly enabled: - - ERROR: Feature qt-egl cannot be enabled: gstreamer-gl-viv_fb-1.0 is required - -Part-of: - -Origin: 314ffa3fb5745a467687e0b912cdab402c54cfb1 ---- - ext/qt/meson.build | 17 ++++++----------- - 1 file changed, 6 insertions(+), 11 deletions(-) - -diff --git a/ext/qt/meson.build b/ext/qt/meson.build -index 442b7d5..d1db251 100644 ---- a/ext/qt/meson.build -+++ b/ext/qt/meson.build -@@ -120,6 +120,12 @@ if qt5_egl.allowed() - qt_defines += ['-DHAVE_QT_EGLFS'] - optional_deps += gstglegl_dep - have_qt_windowing = true -+ -+ # EGL windowing for Vivante Framebuffer (e.g. i.MX6) -+ if gstglviv_fb_dep.found() -+ qt_defines += ['-DHAVE_QT_VIV_FB'] -+ optional_deps += gstglviv_fb_dep -+ endif - endif - - # Android windowing -@@ -184,17 +190,6 @@ if host_system == 'ios' - endif - endif - --# EGL windowing for Vivante Framebuffer (e.g. i.MX6) --qt5_viv_fb = qt5_egl \ -- .require(host_system == 'linux') \ -- .require(gstglviv_fb_dep.found(), error_message: 'gstreamer-gl-viv_fb-1.0 is required') \ -- .require(gst_gl_have_platform_egl, error_message: 'egl platform support in gstreamer-gl is required') --if qt5_viv_fb.allowed() -- qt_defines += ['-DHAVE_QT_VIV_FB'] -- optional_deps += gstglviv_fb_dep -- have_qt_windowing = true --endif -- - if qt5_option.require(have_qt_windowing).allowed() - # rpath is needed to be able to load the plugin on macOS inside the devenv - qmlgl_kwargs = {} diff -Nru gst-plugins-good1.0-1.22.5/debian/patches/series gst-plugins-good1.0-1.22.6/debian/patches/series --- gst-plugins-good1.0-1.22.5/debian/patches/series 2023-08-17 13:56:18.000000000 +0000 +++ gst-plugins-good1.0-1.22.6/debian/patches/series 2023-09-25 19:10:09.000000000 +0000 @@ -1,4 +1,3 @@ import-camerabin import-jpegformat add-pkgconfig-file -qt-Unbreak-build-with-qt-egl-enabled-but-viv_fb-missing.patch diff -Nru gst-plugins-good1.0-1.22.5/docs/gst_plugins_cache.json gst-plugins-good1.0-1.22.6/docs/gst_plugins_cache.json --- gst-plugins-good1.0-1.22.5/docs/gst_plugins_cache.json 2023-07-20 14:22:48.000000000 +0000 +++ gst-plugins-good1.0-1.22.6/docs/gst_plugins_cache.json 2023-09-20 17:10:57.000000000 +0000 @@ -7027,7 +7027,7 @@ "construct": false, "construct-only": false, "controllable": false, - "default": "GStreamer 1.22.5 FLV muxer", + "default": "GStreamer 1.22.6 FLV muxer", "mutable": "null", "readable": true, "type": "gchararray", @@ -7039,7 +7039,7 @@ "construct": false, "construct-only": false, "controllable": false, - "default": "GStreamer 1.22.5 FLV muxer", + "default": "GStreamer 1.22.6 FLV muxer", "mutable": "null", "readable": true, "type": "gchararray", @@ -21257,7 +21257,7 @@ "construct": false, "construct-only": false, "controllable": false, - "default": "GStreamer/1.22.5", + "default": "GStreamer/1.22.6", "mutable": "null", "readable": true, "type": "gchararray", @@ -21816,7 +21816,7 @@ "construct": false, "construct-only": false, "controllable": false, - "default": "GStreamer 1.22.5", + "default": "GStreamer 1.22.6", "mutable": "null", "readable": true, "type": "gchararray", @@ -23253,7 +23253,7 @@ "construct": false, "construct-only": false, "controllable": false, - "default": "GStreamer souphttpsrc 1.22.5 ", + "default": "GStreamer souphttpsrc 1.22.6 ", "mutable": "null", "readable": true, "type": "gchararray", diff -Nru gst-plugins-good1.0-1.22.5/ext/adaptivedemux2/gstadaptivedemux.c gst-plugins-good1.0-1.22.6/ext/adaptivedemux2/gstadaptivedemux.c --- gst-plugins-good1.0-1.22.5/ext/adaptivedemux2/gstadaptivedemux.c 2023-07-20 14:22:48.000000000 +0000 +++ gst-plugins-good1.0-1.22.6/ext/adaptivedemux2/gstadaptivedemux.c 2023-09-20 17:10:57.000000000 +0000 @@ -960,6 +960,7 @@ GST_ELEMENT_ERROR (demux, STREAM, DEMUX, (_("Invalid manifest URI")), ("Manifest URI needs to use either data:, http:// or https://")); + gst_query_unref (query); ret = FALSE; goto unlock_out; } diff -Nru gst-plugins-good1.0-1.22.5/ext/pulse/pulsedeviceprovider.c gst-plugins-good1.0-1.22.6/ext/pulse/pulsedeviceprovider.c --- gst-plugins-good1.0-1.22.5/ext/pulse/pulsedeviceprovider.c 2023-07-20 14:22:48.000000000 +0000 +++ gst-plugins-good1.0-1.22.6/ext/pulse/pulsedeviceprovider.c 2023-09-20 17:10:57.000000000 +0000 @@ -440,8 +440,8 @@ state = pa_context_get_state (c); if (!PA_CONTEXT_IS_GOOD (state)) { - GST_ELEMENT_ERROR (self, RESOURCE, FAILED, ("Failed to connect: %s", - pa_strerror (pa_context_errno (c))), (NULL)); + GST_ERROR_OBJECT (self, "Failed to connect: %s", + pa_strerror (pa_context_errno (c))); goto failed; } diff -Nru gst-plugins-good1.0-1.22.5/ext/qt/meson.build gst-plugins-good1.0-1.22.6/ext/qt/meson.build --- gst-plugins-good1.0-1.22.5/ext/qt/meson.build 2023-07-20 14:22:48.000000000 +0000 +++ gst-plugins-good1.0-1.22.6/ext/qt/meson.build 2023-09-20 17:10:57.000000000 +0000 @@ -43,23 +43,16 @@ endif qt5_mod = import('qt5') -qt5qml_dep = dependency('qt5', modules : ['Core', 'Gui', 'Qml', 'Quick'], - method: qt5_method, required: qt5_option, static: host_system == 'ios') - -# On Linux, distros often have the Qt5 pkg-config files and moc in separate -# packages, so the user may not have both installed. Check for moc and ensure -# that it's installed. -# We don't do this check on other OSes because they need to be able to simply -# point the `QMAKE` env var to `qmake` to build against a particular Qt5. -if host_system == 'linux' and not meson.is_cross_build() - moc = find_program('moc-qt5', 'moc', required : qt5_option) -else - # We only check if `moc` was found, and then discard it, so we can fake it. - # This is also a good unit test of the fact that we *don't* use it. - moc = declare_dependency() +if not qt5_mod.has_tools(method: qt5_method) + if qt5_option.enabled() + error('qt5 qmlglsink plugin is enabled, but qt specific tools were not found') + endif + subdir_done() endif -if not qt5qml_dep.found() or not moc.found() +qt5qml_dep = dependency('qt5', modules : ['Core', 'Gui', 'Qml', 'Quick'], + method: qt5_method, required: qt5_option, static: host_system == 'ios') +if not qt5qml_dep.found() subdir_done() endif @@ -120,6 +113,12 @@ qt_defines += ['-DHAVE_QT_EGLFS'] optional_deps += gstglegl_dep have_qt_windowing = true + + # EGL windowing for Vivante Framebuffer (e.g. i.MX6) + if gstglviv_fb_dep.found() + qt_defines += ['-DHAVE_QT_VIV_FB'] + optional_deps += gstglviv_fb_dep + endif endif # Android windowing @@ -184,17 +183,6 @@ endif endif -# EGL windowing for Vivante Framebuffer (e.g. i.MX6) -qt5_viv_fb = qt5_egl \ - .require(host_system == 'linux') \ - .require(gstglviv_fb_dep.found(), error_message: 'gstreamer-gl-viv_fb-1.0 is required') \ - .require(gst_gl_have_platform_egl, error_message: 'egl platform support in gstreamer-gl is required') -if qt5_viv_fb.allowed() - qt_defines += ['-DHAVE_QT_VIV_FB'] - optional_deps += gstglviv_fb_dep - have_qt_windowing = true -endif - if qt5_option.require(have_qt_windowing).allowed() # rpath is needed to be able to load the plugin on macOS inside the devenv qmlgl_kwargs = {} @@ -206,7 +194,7 @@ endif # Build it! - moc_files = qt5_mod.preprocess(moc_headers : moc_headers) + moc_files = qt5_mod.preprocess(moc_headers : moc_headers, method: qt5_method) gstqmlgl = library('gstqmlgl', sources, moc_files, cpp_args : gst_plugins_good_args + qt_defines, link_args : noseh_link_args, diff -Nru gst-plugins-good1.0-1.22.5/ext/qt6/meson.build gst-plugins-good1.0-1.22.6/ext/qt6/meson.build --- gst-plugins-good1.0-1.22.5/ext/qt6/meson.build 2023-07-20 14:22:48.000000000 +0000 +++ gst-plugins-good1.0-1.22.6/ext/qt6/meson.build 2023-09-20 17:10:57.000000000 +0000 @@ -35,7 +35,7 @@ endif qt6_mod = import('qt6') -if not qt6_mod.has_tools() +if not qt6_mod.has_tools(method: qt6_method) if qt6_option.enabled() error('qt6 qmlglsink plugin is enabled, but qt specific tools were not found') endif @@ -145,7 +145,7 @@ if qt6_option.require(have_qt_windowing).allowed() # Build it! - moc_files = qt6_mod.preprocess(moc_headers : moc_headers) + moc_files = qt6_mod.preprocess(moc_headers : moc_headers, method: qt6_method) gstqml6gl = library('gstqml6', sources, moc_files, cpp_args : gst_plugins_good_args + qt_defines, link_args : noseh_link_args, diff -Nru gst-plugins-good1.0-1.22.5/ext/soup/meson.build gst-plugins-good1.0-1.22.6/ext/soup/meson.build --- gst-plugins-good1.0-1.22.5/ext/soup/meson.build 2023-07-20 14:22:48.000000000 +0000 +++ gst-plugins-good1.0-1.22.6/ext/soup/meson.build 2023-09-20 17:10:57.000000000 +0000 @@ -17,7 +17,7 @@ static_args = [] static_deps = [] default_library = get_option('default_library') -if default_library in ['static', 'both'] +if default_library in ['static', 'both'] or get_option('soup-lookup-dep') libsoup2_dep = dependency('libsoup-2.4', version : '>=2.48', required : false, fallback : ['libsoup', 'libsoup_dep'], default_options: ['sysprof=disabled']) diff -Nru gst-plugins-good1.0-1.22.5/gst/isomp4/qtdemux.c gst-plugins-good1.0-1.22.6/gst/isomp4/qtdemux.c --- gst-plugins-good1.0-1.22.5/gst/isomp4/qtdemux.c 2023-07-20 14:22:48.000000000 +0000 +++ gst-plugins-good1.0-1.22.6/gst/isomp4/qtdemux.c 2023-09-20 17:10:57.000000000 +0000 @@ -6092,13 +6092,22 @@ if (info->crypto_info == NULL) { if (stream->protection_scheme_type == FOURCC_cbcs) { - crypto_info = qtdemux_get_cenc_sample_properties (qtdemux, stream, 0); - if (!crypto_info || !gst_buffer_add_protection_meta (buf, crypto_info)) { - GST_ERROR_OBJECT (qtdemux, - "failed to attach cbcs metadata to buffer"); - qtdemux_gst_structure_free (crypto_info); + if (CUR_STREAM (stream)->fourcc == FOURCC_enca || + CUR_STREAM (stream)->fourcc == FOURCC_encs || + CUR_STREAM (stream)->fourcc == FOURCC_enct || + CUR_STREAM (stream)->fourcc == FOURCC_encv) { + crypto_info = qtdemux_get_cenc_sample_properties (qtdemux, stream, 0); + if (!crypto_info + || !gst_buffer_add_protection_meta (buf, crypto_info)) { + GST_ERROR_OBJECT (qtdemux, + "failed to attach cbcs metadata to buffer"); + qtdemux_gst_structure_free (crypto_info); + } else { + GST_TRACE_OBJECT (qtdemux, "added cbcs protection metadata"); + } } else { - GST_TRACE_OBJECT (qtdemux, "added cbcs protection metadata"); + GST_TRACE_OBJECT (qtdemux, + "cbcs stream is not encrypted yet, not adding protection metadata"); } } else { GST_DEBUG_OBJECT (qtdemux, @@ -7312,6 +7321,42 @@ return gst_qtdemux_process_adapter (demux, FALSE); } +static guint64 +gst_segment_to_stream_time_clamped (const GstSegment * segment, + guint64 position) +{ + guint64 segment_stream_time_start; + guint64 segment_stream_time_stop = GST_CLOCK_TIME_NONE; + guint64 stream_pts_unsigned; + int ret; + + g_return_val_if_fail (segment != NULL, GST_CLOCK_TIME_NONE); + g_return_val_if_fail (segment->format == GST_FORMAT_TIME, + GST_CLOCK_TIME_NONE); + + segment_stream_time_start = segment->time; + if (segment->stop != GST_CLOCK_TIME_NONE) + segment_stream_time_stop = + gst_segment_to_stream_time (segment, GST_FORMAT_TIME, segment->stop); + + ret = + gst_segment_to_stream_time_full (segment, GST_FORMAT_TIME, position, + &stream_pts_unsigned); + /* ret == 0 if the segment is invalid (either position, segment->time or the segment start are -1). */ + g_return_val_if_fail (ret != 0, GST_CLOCK_TIME_NONE); + + if (ret == -1 || stream_pts_unsigned < segment_stream_time_start) { + /* Negative or prior to segment start stream time, clamp to segment start. */ + return segment_stream_time_start; + } else if (segment_stream_time_stop != GST_CLOCK_TIME_NONE + && stream_pts_unsigned > segment_stream_time_stop) { + /* Clamp to segment end. */ + return segment_stream_time_stop; + } else { + return stream_pts_unsigned; + } +} + static GstFlowReturn gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force) { @@ -7720,7 +7765,7 @@ case QTDEMUX_STATE_MOVIE:{ QtDemuxStream *stream = NULL; QtDemuxSample *sample; - GstClockTime dts, pts, duration; + GstClockTime dts, pts, stream_pts, duration; gboolean keyframe; gint i; @@ -7832,12 +7877,14 @@ dts = QTSAMPLE_DTS (stream, sample); pts = QTSAMPLE_PTS (stream, sample); + stream_pts = + gst_segment_to_stream_time_clamped (&stream->segment, pts); duration = QTSAMPLE_DUR_DTS (stream, sample, dts); keyframe = QTSAMPLE_KEYFRAME (stream, sample); /* check for segment end */ if (G_UNLIKELY (demux->segment.stop != -1 - && demux->segment.stop <= pts && stream->on_keyframe) + && demux->segment.stop <= stream_pts && keyframe) && !(demux->upstream_format_is_time && demux->segment.rate < 0)) { GST_DEBUG_OBJECT (demux, "we reached the end of our segment."); stream->time_position = GST_CLOCK_TIME_NONE; /* this means EOS */ diff -Nru gst-plugins-good1.0-1.22.5/gst/rtpmanager/gstrtpjitterbuffer.c gst-plugins-good1.0-1.22.6/gst/rtpmanager/gstrtpjitterbuffer.c --- gst-plugins-good1.0-1.22.5/gst/rtpmanager/gstrtpjitterbuffer.c 2023-07-20 14:22:48.000000000 +0000 +++ gst-plugins-good1.0-1.22.6/gst/rtpmanager/gstrtpjitterbuffer.c 2023-09-20 17:10:57.000000000 +0000 @@ -2669,7 +2669,7 @@ /* based on the estimated packet duration, we can figure out how many packets we could possibly save */ - if (est_pkt_duration) + if (est_pkt_duration && offset > 0) max_saveable_packets = offset / est_pkt_duration; /* and say that the amount of lost packet is the sequence-number diff -Nru gst-plugins-good1.0-1.22.5/gst/videofilter/gstvideoflip.c gst-plugins-good1.0-1.22.6/gst/videofilter/gstvideoflip.c --- gst-plugins-good1.0-1.22.5/gst/videofilter/gstvideoflip.c 2023-07-20 14:22:48.000000000 +0000 +++ gst-plugins-good1.0-1.22.6/gst/videofilter/gstvideoflip.c 2023-09-20 17:10:57.000000000 +0000 @@ -1790,19 +1790,15 @@ gst_video_flip_set_method (vf, method, TRUE); if (vf->method == GST_VIDEO_ORIENTATION_AUTO) { - /* update the orientation tag as we rotate the video accordingly */ - if (gst_tag_list_is_writable (taglist)) { - gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, - "image-orientation", "rotate-0", NULL); - } else { - taglist = gst_tag_list_copy (taglist); + /* Update the orientation tag as we rotate the video accordingly. + * The event (and so the tag list) can be shared so always copy both. */ + taglist = gst_tag_list_copy (taglist); - gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, - "image-orientation", "rotate-0", NULL); + gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, + "image-orientation", "rotate-0", NULL); - gst_event_unref (event); - event = gst_event_new_tag (taglist); - } + gst_event_unref (event); + event = gst_event_new_tag (taglist); } } break; diff -Nru gst-plugins-good1.0-1.22.5/gst-plugins-good.doap gst-plugins-good1.0-1.22.6/gst-plugins-good.doap --- gst-plugins-good1.0-1.22.5/gst-plugins-good.doap 2023-07-20 14:22:48.000000000 +0000 +++ gst-plugins-good1.0-1.22.6/gst-plugins-good.doap 2023-09-20 17:10:57.000000000 +0000 @@ -34,6 +34,16 @@ + 1.22.6 + 1.22 + + 2023-09-20 + + + + + + 1.22.5 1.22 diff -Nru gst-plugins-good1.0-1.22.5/meson.build gst-plugins-good1.0-1.22.6/meson.build --- gst-plugins-good1.0-1.22.5/meson.build 2023-07-20 14:22:48.000000000 +0000 +++ gst-plugins-good1.0-1.22.6/meson.build 2023-09-20 17:10:57.000000000 +0000 @@ -1,5 +1,5 @@ project('gst-plugins-good', 'c', - version : '1.22.5', + version : '1.22.6', meson_version : '>= 0.62', default_options : [ 'warning_level=1', 'buildtype=debugoptimized' ]) diff -Nru gst-plugins-good1.0-1.22.5/meson_options.txt gst-plugins-good1.0-1.22.6/meson_options.txt --- gst-plugins-good1.0-1.22.5/meson_options.txt 2023-07-20 14:22:48.000000000 +0000 +++ gst-plugins-good1.0-1.22.6/meson_options.txt 2023-09-20 17:10:57.000000000 +0000 @@ -67,7 +67,6 @@ option('png', type : 'feature', value : 'auto', description : 'PNG image codec plugin') option('pulse', type : 'feature', value : 'auto', description : 'Pulseaudio audio source/sink plugin') option('shout2', type : 'feature', value : 'auto', description : 'Shout-casting network sink plugin based on libshout2') -option('soup', type : 'feature', value : 'auto', description : 'libsoup HTTP client source/sink plugin') option('speex', type : 'feature', value : 'auto', description : 'Speex audio codec plugin') option('taglib', type : 'feature', value : 'auto', description : 'Tag-writing plugin based on taglib') option('twolame', type : 'feature', value : 'auto', description : 'twolame mp2 audio encoder plugin') @@ -84,6 +83,11 @@ option('rpi-header-dir', type : 'string', value : '/opt/vc/include', description : 'Directory where VideoCore/MMAL headers and bcm_host.h can be found') option('rpi-lib-dir', type : 'string', value : '/opt/vc/lib', description : 'Directory where VideoCore/MMAL libraries can be found') +# soup plugin options +option('soup', type : 'feature', value : 'auto', description : 'libsoup HTTP client source/sink plugin') +option('soup-lookup-dep', type : 'boolean', value : 'false', + description : 'Lookup libsoup dep at build time even when building a shared plugin') + # Qt plugin options option('qt-method', type: 'combo', value: 'auto', choices: ['auto', 'pkg-config', 'qmake'], description: 'Method to use to find Qt') diff -Nru gst-plugins-good1.0-1.22.5/NEWS gst-plugins-good1.0-1.22.6/NEWS --- gst-plugins-good1.0-1.22.5/NEWS 2023-07-20 14:22:48.000000000 +0000 +++ gst-plugins-good1.0-1.22.6/NEWS 2023-09-20 17:10:57.000000000 +0000 @@ -2189,6 +2189,183 @@ - List of Merge Requests applied in 1.22.5 - List of Issues fixed in 1.22.5 +1.22.6 + +The sixth 1.22 bug-fix release (1.22.6) was released on 20 September +2023. + +This release only contains bugfixes and security fixes and it should be +safe to update from 1.22.x. + +Highlighted bugfixes in 1.22.6 + +- Security fixes for the MXF demuxer and H.265 video parser +- Fix latency regression in H.264 hardware decoder base class +- androidmedia: fix HEVC codec profile registration and fix coded_data + handling +- decodebin3: fix switching from a raw stream to an encoded stream +- gst-inspect: prettier and more correct signal and action signals + printing +- rtmp2: Allow NULL flash version, omitting the field, for better RTMP + server compatibility +- rtspsrc: better compatibility with buggy RTSP servers that don’t set + a clock-rate +- rtpjitterbuffer: fix integer overflow that led to more packets being + declared lost than have been lost +- v4l2: fix video encoding regression on RPi and fix support for left + and top padding +- waylandsink: Crop surfaces to their display width height +- cerbero: recognise Manjaro; add Rust support for MSVC ARM64; cmake + detection fixes +- various bug fixes, build fixes, memory leak fixes, and other + stability and reliability improvements + +gstreamer + +- gst-inspect: prettier and more correct signal printing, and print + action signals in g_signal_emit_by_name() format +- gst-launch: Disable fault signal handlers on macOS + +gst-plugins-base + +- audio: Make sure to stop ringbuffer on error +- decodebin3: avoid identity, sinkpad, parsebin leakage when reset + input +- decodebin3: Ensure the slot is unlinked before linking to decoder +- sdp: fix wrong debug log error message for missing clock-rate in + caps +- sdp: Parse zero clock-rate as default + +gst-plugins-good + +- adaptivedemux2: fix memory leak +- pulsedeviceprovider: fix incorrect usage of GST_ELEMENT_ERROR +- qt: Unbreak build with qt-egl enabled but viv_fb missing +- qt: Fix searching of qt5/qt6 tools with qmake in Meson +- qtdemux: Fix premature EOS when some files are played in push mode +- qtdemux: attach cbcs crypt info at the right moment +- rtpjitterbuffer: Avoid integer overflow in max saveable packets + calculation with negative offset +- videoflip: fix concurrent access when modifying the tag list +- v4l2: allocator: Don’t close foreign dmabuf +- v4l2: bufferpool: Fix large encoded stream regression +- v4l2: bufferpool: Problems when checking for truncated buffer +- v4l2: Fix support for left and top padding +- v4l2object: clear format lists if source change event is received + +gst-plugins-bad + +- androidmedia/enc: handle codec-data before popping + GstVideoCodecFrames +- androidmedia: fix hevc codec profile registration +- androidmedia: Small fixes +- androidmedia: Add more null checks (of env) to JNI utilities +- applemedia: Fix pixel format for I420 and NV12 +- audiolatency: Forward latency query and event upstream +- av1parser: Fix segmentation params update +- codecparsers: Fix MPEG-1 aspect ratio table +- d3d11convert: Passthrough allocation query on same caps +- h264decoder: Update latency dynamically +- h265parser: Allow partially broken hvcC data +- h265parser: Fix possible overflow using max_sub_layers_minus1 +- hlssink2: Always use forward slash separator +- mdns: Fix a crash on context error +- mxfdemux: Fix integer overflow causing out of bounds writes when + handling invalid uncompressed video and check channels for AES3 +- nvencoder: Fix negotiation error when interlace-mode is unspecified +- rtmp2: Allow NULL flash version, omitting the field +- rtmp2sink: fix crash if message conversion failed +- transcodebin: Fixes for upstream selectable support +- va: Fix in error logs functions mismatches +- waylandsink: Crop surfaces to their display width height +- waylandsink: Fix cropping for video with non-square aspect ratio +- webrtc: Fix docs for create-data-channel action signal +- win32ipc: Fix pipe handle leak + +gst-plugins-ugly + +- No changes + +gst-plugins-rs + +- fallbackswitch: locking/deadlock fixes +- onvifmetadataparse: Skip metadata frames with unrepresentable UTC + time +- transcriberbin: Configure audioresample in front of transcriber +- webrtcsink: Propagate GstContext messages +- webrtcsink: Add support for d3d11 memory and qsvh264enc +- webrtcsink: fix TWCC extension adding +- webrtcsink: don’t forget to setup encoders for discoveries +- webrtcsink: NVIDIA V4L2 encoders always require NVMM memory +- meson: Fix handling of optional deps, and don’t require Python 3.8 + +gst-libav + +- No changes + +gst-rtsp-server + +- No changes + +gstreamer-vaapi + +- No changes + +gstreamer-sharp + +- No changes + +gst-omx + +- No changes + +gst-python + +- No changes + +gst-editing-services + +- No changes + +gst-validate + gst-integration-testsuites + +- gst-validate: Disable fault signal handlers on macOS + +gst-examples + +- No changes + +Development build environment + +- macos-bison: Update to 3.8.2 and add an ARM64 build +- wrap: update libpsl to 0.21.2 + +Cerbero build tool and packaging changes in 1.22.6 + +- Add Rust support for MSVC ARM64 +- Recognise PERL5LIB as a joinable Unix variable +- Recognise Manjaro as an Arch derivative +- Fix picking up cmake from build-tools + +Contributors to 1.22.6 + +Akihiro Sagawa, Alicia Boya García, Guillaume Desmottes, Haihua Hu, +Hugues Fruchet, Ivan Molodetskikh, Jan Alexander Steffens (heftig), Jan +Schmidt, L. E. Segovia, Mathieu Duponchelle, Matthew Waters, Ming Qian, +Nicolas Dufresne, Nirbheek Chauhan, Olivier Blin, Olivier Crête, +Philippe Normand, Piotr Brzeziński, Robert Ayrapetyan, Ryan Pavlik, +Sebastian Dröge, Seungha Yang, Stéphane Cerveau, Stephan Seitz, Thomas +Schneider, Tim-Philipp Müller, Víctor Manuel Jáquez Leal, Wang Chuan, +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.6 + +- List of Merge Requests applied in 1.22.6 +- List of Issues fixed in 1.22.6 + Schedule for 1.24 Our next major feature release will be 1.24, and 1.23 will be the diff -Nru gst-plugins-good1.0-1.22.5/po/gst-plugins-good-1.0.pot gst-plugins-good1.0-1.22.6/po/gst-plugins-good-1.0.pot --- gst-plugins-good1.0-1.22.5/po/gst-plugins-good-1.0.pot 2023-07-20 14:24:30.354385100 +0000 +++ gst-plugins-good1.0-1.22.6/po/gst-plugins-good-1.0.pot 2023-09-20 17:14:20.448089000 +0000 @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: gst-plugins-good-1.22.5\n" +"Project-Id-Version: gst-plugins-good-1.22.6\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-20 15:24+0100\n" +"POT-Creation-Date: 2023-09-20 18:14+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -99,8 +99,8 @@ msgid "This file contains no playable streams." msgstr "" -#: gst/isomp4/qtdemux.c:556 gst/isomp4/qtdemux.c:7363 gst/isomp4/qtdemux.c:7432 -#: gst/isomp4/qtdemux.c:7738 gst/isomp4/qtdemux.c:9134 +#: gst/isomp4/qtdemux.c:556 gst/isomp4/qtdemux.c:7408 gst/isomp4/qtdemux.c:7477 +#: gst/isomp4/qtdemux.c:7783 gst/isomp4/qtdemux.c:9181 msgid "This file is invalid and cannot be played." msgstr "" @@ -108,10 +108,10 @@ msgid "Cannot play stream because it is encrypted with PlayReady DRM." msgstr "" -#: gst/isomp4/qtdemux.c:4364 gst/isomp4/qtdemux.c:8521 -#: gst/isomp4/qtdemux.c:8528 gst/isomp4/qtdemux.c:9836 -#: gst/isomp4/qtdemux.c:10278 gst/isomp4/qtdemux.c:10285 -#: gst/isomp4/qtdemux.c:13525 +#: gst/isomp4/qtdemux.c:4364 gst/isomp4/qtdemux.c:8568 +#: gst/isomp4/qtdemux.c:8575 gst/isomp4/qtdemux.c:9883 +#: gst/isomp4/qtdemux.c:10325 gst/isomp4/qtdemux.c:10332 +#: gst/isomp4/qtdemux.c:13572 msgid "This file is corrupt and cannot be played." msgstr "" @@ -131,7 +131,7 @@ msgid "This file is incomplete and cannot be played." msgstr "" -#: gst/isomp4/qtdemux.c:11419 +#: gst/isomp4/qtdemux.c:11466 msgid "The video in this file might not play correctly." msgstr "" @@ -208,7 +208,7 @@ msgid "Raspberry Pi Camera Module" msgstr "" -#: sys/v4l2/gstv4l2bufferpool.c:1845 +#: sys/v4l2/gstv4l2bufferpool.c:1858 #, c-format msgid "Error reading %d bytes from device '%s'." msgstr "" @@ -233,84 +233,84 @@ msgid "The driver of device '%s' does not support any known IO method." msgstr "" -#: sys/v4l2/gstv4l2object.c:4125 +#: sys/v4l2/gstv4l2object.c:4118 msgid "Invalid caps" msgstr "" -#: sys/v4l2/gstv4l2object.c:4132 sys/v4l2/gstv4l2object.c:4156 +#: sys/v4l2/gstv4l2object.c:4125 sys/v4l2/gstv4l2object.c:4149 #, c-format msgid "Device '%s' has no supported format" msgstr "" -#: sys/v4l2/gstv4l2object.c:4138 sys/v4l2/gstv4l2object.c:4162 +#: sys/v4l2/gstv4l2object.c:4131 sys/v4l2/gstv4l2object.c:4155 #, c-format msgid "Device '%s' failed during initialization" msgstr "" -#: sys/v4l2/gstv4l2object.c:4150 +#: sys/v4l2/gstv4l2object.c:4143 #, c-format msgid "Device '%s' is busy" msgstr "" -#: sys/v4l2/gstv4l2object.c:4173 +#: sys/v4l2/gstv4l2object.c:4166 #, c-format msgid "Device '%s' cannot capture at %dx%d" msgstr "" -#: sys/v4l2/gstv4l2object.c:4182 +#: sys/v4l2/gstv4l2object.c:4175 #, c-format msgid "Device '%s' cannot capture in the specified format" msgstr "" -#: sys/v4l2/gstv4l2object.c:4193 +#: sys/v4l2/gstv4l2object.c:4186 #, c-format msgid "Device '%s' does support non-contiguous planes" msgstr "" -#: sys/v4l2/gstv4l2object.c:4208 +#: sys/v4l2/gstv4l2object.c:4201 #, c-format msgid "Device '%s' does not support %s interlacing" msgstr "" -#: sys/v4l2/gstv4l2object.c:4222 +#: sys/v4l2/gstv4l2object.c:4215 #, c-format msgid "Device '%s' does not support %s colorimetry" msgstr "" -#: sys/v4l2/gstv4l2object.c:4234 +#: sys/v4l2/gstv4l2object.c:4227 #, c-format msgid "Could not get parameters on device '%s'" msgstr "" -#: sys/v4l2/gstv4l2object.c:4242 +#: sys/v4l2/gstv4l2object.c:4235 msgid "Video device did not accept new frame rate setting." msgstr "" -#: sys/v4l2/gstv4l2object.c:4383 +#: sys/v4l2/gstv4l2object.c:4377 msgid "Video device did not provide output format." msgstr "" -#: sys/v4l2/gstv4l2object.c:4389 +#: sys/v4l2/gstv4l2object.c:4383 msgid "Video device returned invalid dimensions." msgstr "" -#: sys/v4l2/gstv4l2object.c:4397 +#: sys/v4l2/gstv4l2object.c:4391 msgid "Video device uses an unsupported interlacing method." msgstr "" -#: sys/v4l2/gstv4l2object.c:4404 +#: sys/v4l2/gstv4l2object.c:4398 msgid "Video device uses an unsupported pixel format." msgstr "" -#: sys/v4l2/gstv4l2object.c:5319 +#: sys/v4l2/gstv4l2object.c:5313 msgid "Failed to configure internal buffer pool." msgstr "" -#: sys/v4l2/gstv4l2object.c:5325 +#: sys/v4l2/gstv4l2object.c:5319 msgid "Video device did not suggest any buffer size." msgstr "" -#: sys/v4l2/gstv4l2object.c:5331 +#: sys/v4l2/gstv4l2object.c:5325 msgid "No downstream pool to import from." msgstr "" diff -Nru gst-plugins-good1.0-1.22.5/po/gst-plugins-good.pot gst-plugins-good1.0-1.22.6/po/gst-plugins-good.pot --- gst-plugins-good1.0-1.22.5/po/gst-plugins-good.pot 2023-07-20 14:24:30.354385100 +0000 +++ gst-plugins-good1.0-1.22.6/po/gst-plugins-good.pot 2023-09-20 17:14:20.448089000 +0000 @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: gst-plugins-good-1.22.5\n" +"Project-Id-Version: gst-plugins-good-1.22.6\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-20 15:24+0100\n" +"POT-Creation-Date: 2023-09-20 18:14+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -99,8 +99,8 @@ msgid "This file contains no playable streams." msgstr "" -#: gst/isomp4/qtdemux.c:556 gst/isomp4/qtdemux.c:7363 gst/isomp4/qtdemux.c:7432 -#: gst/isomp4/qtdemux.c:7738 gst/isomp4/qtdemux.c:9134 +#: gst/isomp4/qtdemux.c:556 gst/isomp4/qtdemux.c:7408 gst/isomp4/qtdemux.c:7477 +#: gst/isomp4/qtdemux.c:7783 gst/isomp4/qtdemux.c:9181 msgid "This file is invalid and cannot be played." msgstr "" @@ -108,10 +108,10 @@ msgid "Cannot play stream because it is encrypted with PlayReady DRM." msgstr "" -#: gst/isomp4/qtdemux.c:4364 gst/isomp4/qtdemux.c:8521 -#: gst/isomp4/qtdemux.c:8528 gst/isomp4/qtdemux.c:9836 -#: gst/isomp4/qtdemux.c:10278 gst/isomp4/qtdemux.c:10285 -#: gst/isomp4/qtdemux.c:13525 +#: gst/isomp4/qtdemux.c:4364 gst/isomp4/qtdemux.c:8568 +#: gst/isomp4/qtdemux.c:8575 gst/isomp4/qtdemux.c:9883 +#: gst/isomp4/qtdemux.c:10325 gst/isomp4/qtdemux.c:10332 +#: gst/isomp4/qtdemux.c:13572 msgid "This file is corrupt and cannot be played." msgstr "" @@ -131,7 +131,7 @@ msgid "This file is incomplete and cannot be played." msgstr "" -#: gst/isomp4/qtdemux.c:11419 +#: gst/isomp4/qtdemux.c:11466 msgid "The video in this file might not play correctly." msgstr "" @@ -208,7 +208,7 @@ msgid "Raspberry Pi Camera Module" msgstr "" -#: sys/v4l2/gstv4l2bufferpool.c:1845 +#: sys/v4l2/gstv4l2bufferpool.c:1858 #, c-format msgid "Error reading %d bytes from device '%s'." msgstr "" @@ -233,84 +233,84 @@ msgid "The driver of device '%s' does not support any known IO method." msgstr "" -#: sys/v4l2/gstv4l2object.c:4125 +#: sys/v4l2/gstv4l2object.c:4118 msgid "Invalid caps" msgstr "" -#: sys/v4l2/gstv4l2object.c:4132 sys/v4l2/gstv4l2object.c:4156 +#: sys/v4l2/gstv4l2object.c:4125 sys/v4l2/gstv4l2object.c:4149 #, c-format msgid "Device '%s' has no supported format" msgstr "" -#: sys/v4l2/gstv4l2object.c:4138 sys/v4l2/gstv4l2object.c:4162 +#: sys/v4l2/gstv4l2object.c:4131 sys/v4l2/gstv4l2object.c:4155 #, c-format msgid "Device '%s' failed during initialization" msgstr "" -#: sys/v4l2/gstv4l2object.c:4150 +#: sys/v4l2/gstv4l2object.c:4143 #, c-format msgid "Device '%s' is busy" msgstr "" -#: sys/v4l2/gstv4l2object.c:4173 +#: sys/v4l2/gstv4l2object.c:4166 #, c-format msgid "Device '%s' cannot capture at %dx%d" msgstr "" -#: sys/v4l2/gstv4l2object.c:4182 +#: sys/v4l2/gstv4l2object.c:4175 #, c-format msgid "Device '%s' cannot capture in the specified format" msgstr "" -#: sys/v4l2/gstv4l2object.c:4193 +#: sys/v4l2/gstv4l2object.c:4186 #, c-format msgid "Device '%s' does support non-contiguous planes" msgstr "" -#: sys/v4l2/gstv4l2object.c:4208 +#: sys/v4l2/gstv4l2object.c:4201 #, c-format msgid "Device '%s' does not support %s interlacing" msgstr "" -#: sys/v4l2/gstv4l2object.c:4222 +#: sys/v4l2/gstv4l2object.c:4215 #, c-format msgid "Device '%s' does not support %s colorimetry" msgstr "" -#: sys/v4l2/gstv4l2object.c:4234 +#: sys/v4l2/gstv4l2object.c:4227 #, c-format msgid "Could not get parameters on device '%s'" msgstr "" -#: sys/v4l2/gstv4l2object.c:4242 +#: sys/v4l2/gstv4l2object.c:4235 msgid "Video device did not accept new frame rate setting." msgstr "" -#: sys/v4l2/gstv4l2object.c:4383 +#: sys/v4l2/gstv4l2object.c:4377 msgid "Video device did not provide output format." msgstr "" -#: sys/v4l2/gstv4l2object.c:4389 +#: sys/v4l2/gstv4l2object.c:4383 msgid "Video device returned invalid dimensions." msgstr "" -#: sys/v4l2/gstv4l2object.c:4397 +#: sys/v4l2/gstv4l2object.c:4391 msgid "Video device uses an unsupported interlacing method." msgstr "" -#: sys/v4l2/gstv4l2object.c:4404 +#: sys/v4l2/gstv4l2object.c:4398 msgid "Video device uses an unsupported pixel format." msgstr "" -#: sys/v4l2/gstv4l2object.c:5319 +#: sys/v4l2/gstv4l2object.c:5313 msgid "Failed to configure internal buffer pool." msgstr "" -#: sys/v4l2/gstv4l2object.c:5325 +#: sys/v4l2/gstv4l2object.c:5319 msgid "Video device did not suggest any buffer size." msgstr "" -#: sys/v4l2/gstv4l2object.c:5331 +#: sys/v4l2/gstv4l2object.c:5325 msgid "No downstream pool to import from." msgstr "" diff -Nru gst-plugins-good1.0-1.22.5/RELEASE gst-plugins-good1.0-1.22.6/RELEASE --- gst-plugins-good1.0-1.22.5/RELEASE 2023-07-20 14:22:48.000000000 +0000 +++ gst-plugins-good1.0-1.22.6/RELEASE 2023-09-20 17:10:57.000000000 +0000 @@ -1,4 +1,4 @@ -This is GStreamer gst-plugins-good 1.22.5. +This is GStreamer gst-plugins-good 1.22.6. The GStreamer team is thrilled to announce a new major feature release of your favourite cross-platform multimedia framework! diff -Nru gst-plugins-good1.0-1.22.5/sys/v4l2/gstv4l2allocator.c gst-plugins-good1.0-1.22.6/sys/v4l2/gstv4l2allocator.c --- gst-plugins-good1.0-1.22.5/sys/v4l2/gstv4l2allocator.c 2023-07-20 14:22:48.000000000 +0000 +++ gst-plugins-good1.0-1.22.6/sys/v4l2/gstv4l2allocator.c 2023-09-20 17:10:57.000000000 +0000 @@ -357,7 +357,6 @@ switch (allocator->memory) { case V4L2_MEMORY_DMABUF: - close (mem->dmafd); mem->dmafd = -1; break; case V4L2_MEMORY_USERPTR: @@ -396,8 +395,7 @@ obj->munmap (mem->data, group->planes[mem->plane].length); } - /* This apply for both mmap with expbuf, and dmabuf imported memory */ - if (mem->dmafd >= 0) + if (allocator->memory == V4L2_MEMORY_MMAP && mem->dmafd >= 0) close (mem->dmafd); } diff -Nru gst-plugins-good1.0-1.22.5/sys/v4l2/gstv4l2bufferpool.c gst-plugins-good1.0-1.22.6/sys/v4l2/gstv4l2bufferpool.c --- gst-plugins-good1.0-1.22.5/sys/v4l2/gstv4l2bufferpool.c 2023-07-20 14:22:48.000000000 +0000 +++ gst-plugins-good1.0-1.22.6/sys/v4l2/gstv4l2bufferpool.c 2023-09-20 17:10:57.000000000 +0000 @@ -1237,8 +1237,7 @@ GstV4l2Object *obj = pool->obj; GstClockTime timestamp; GstV4l2MemoryGroup *group; - GstVideoMeta *vmeta; - gsize size; + const GstVideoInfo *info = &obj->info; gint i; gint old_buffer_state; @@ -1276,6 +1275,12 @@ group->buffer.index); } + if (group->buffer.flags & V4L2_BUF_FLAG_LAST && + group->planes[0].bytesused == 0) { + GST_DEBUG_OBJECT (pool, "Empty last buffer, signalling eos."); + goto eos; + } + outbuf = pool->buffers[group->buffer.index]; if (outbuf == NULL) goto no_buffer; @@ -1289,9 +1294,9 @@ timestamp = GST_TIMEVAL_TO_TIME (group->buffer.timestamp); - size = 0; - vmeta = gst_buffer_get_video_meta (outbuf); for (i = 0; i < group->n_mem; i++) { + const GstVideoFormatInfo *finfo = info->finfo; + GST_LOG_OBJECT (pool, "dequeued buffer %p seq:%d (ix=%d), mem %p used %d, plane=%d, flags %08x, ts %" GST_TIME_FORMAT ", pool-queued=%d, buffer=%p, previous-state=%i", @@ -1299,10 +1304,18 @@ group->planes[i].bytesused, i, group->buffer.flags, GST_TIME_ARGS (timestamp), pool->num_queued, outbuf, old_buffer_state); - if (vmeta) { - vmeta->offset[i] = size; - size += gst_memory_get_sizes (group->mem[i], NULL, NULL); + if (GST_VIDEO_INFO_FORMAT (&pool->caps_info) == GST_VIDEO_FORMAT_ENCODED) + break; + + /* Ensure our offset matches the expected plane size, or image size if + * there is only one memory */ + if (group->n_mem == 1) { + gst_memory_resize (group->mem[0], 0, info->size + info->offset[0]); + break; } + + if (!GST_VIDEO_FORMAT_INFO_IS_TILED (finfo)) + gst_memory_resize (group->mem[i], 0, obj->plane_size[i]); } /* Ignore timestamp and field for OUTPUT device */ diff -Nru gst-plugins-good1.0-1.22.5/sys/v4l2/gstv4l2object.c gst-plugins-good1.0-1.22.6/sys/v4l2/gstv4l2object.c --- gst-plugins-good1.0-1.22.5/sys/v4l2/gstv4l2object.c 2023-07-20 14:22:48.000000000 +0000 +++ gst-plugins-good1.0-1.22.6/sys/v4l2/gstv4l2object.c 2023-09-20 17:10:57.000000000 +0000 @@ -3441,18 +3441,11 @@ if ((align->padding_left + align->padding_top) > 0) GST_WARNING_OBJECT (v4l2object->dbg_obj, "Left and top padding is not permitted for tiled formats"); + memset (v4l2object->plane_size, 0, + sizeof (v4l2object->plane_size[0] * GST_VIDEO_MAX_PLANES)); } else { - for (i = 0; i < finfo->n_planes; i++) { - gint vedge, hedge; - - /* FIXME we assume plane as component as this is true for all supported - * format we support. */ - - hedge = GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (finfo, i, align->padding_left); - vedge = GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (finfo, i, align->padding_top); - - info->offset[i] += (vedge * info->stride[i]) + - (hedge * GST_VIDEO_INFO_COMP_PSTRIDE (info, i)); + if (!gst_video_info_align_full (info, align, v4l2object->plane_size)) { + GST_WARNING_OBJECT (v4l2object->dbg_obj, "Failed to align video info"); } } @@ -4357,8 +4350,9 @@ goto unsupported_field; } - gst_video_info_set_interlaced_format (info, format, interlace_mode, width, - height); + if (!gst_video_info_set_interlaced_format (info, format, interlace_mode, + width, height)) + goto invalid_dimensions; gst_v4l2_object_get_colorspace (v4l2object, &fmt, &info->colorimetry); gst_v4l2_object_get_streamparm (v4l2object, info); @@ -5582,6 +5576,9 @@ goto again; } + if (v4l2object->formats) + gst_v4l2_object_clear_format_list (v4l2object); + return GST_V4L2_FLOW_RESOLUTION_CHANGE; } diff -Nru gst-plugins-good1.0-1.22.5/sys/v4l2/gstv4l2object.h gst-plugins-good1.0-1.22.6/sys/v4l2/gstv4l2object.h --- gst-plugins-good1.0-1.22.5/sys/v4l2/gstv4l2object.h 2023-07-20 14:22:48.000000000 +0000 +++ gst-plugins-good1.0-1.22.6/sys/v4l2/gstv4l2object.h 2023-09-20 17:10:57.000000000 +0000 @@ -146,6 +146,7 @@ GstVideoInfo info; GstVideoAlignment align; GstVideoTransferFunction transfer; + gsize plane_size[GST_VIDEO_MAX_PLANES]; /* Features */ gboolean need_video_meta;