Projects
home:zaitor:branches:Essentials
gstreamer-plugins-bad-codecs
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
gstreamer-plugins-bad-codecs.spec
Changed
@@ -7,7 +7,7 @@ %define _version 1.28.0 Name: gstreamer-plugins-bad-codecs -Version: 1.28.2 +Version: 1.28.3 Release: 0 Summary: Codecs/plugins for gstreamer-plugins-bad License: LGPL-2.1-or-later
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/ChangeLog -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/ChangeLog
Changed
@@ -1,3 +1,594 @@ +=== release 1.28.3 === + +2026-05-11 18:28:12 +0100 Tim-Philipp Müller <tim@centricular.com> + + * gst-plugins-bad.doap: + * meson.build: + Release 1.28.3 + +2026-04-27 16:45:04 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst/mxf/mxfvanc.c: + mxfdemux: Fix parsing of multiple VANC packets per edit unit + Only the first packet was parsed before. + Also fix a couple of bounds checks and add missing bounds checks. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11592> + +2026-04-27 16:42:20 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst/mxf/mxfvanc.c: + mxfmux: Fix size calculations when writing VANC packets + Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5044 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11592> + +2026-04-15 15:19:12 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst/mxf/mxfdemux.c: + mxfdemux: Fix reverse temporal offsets array upper bounds check + Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5041 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11589> + +2026-04-15 11:35:47 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst-libs/gst/codecparsers/gsth266parser.c: + h266parser: Avoid out-of-bounds write when parsing PPS tile slices + Thanks to Tian Shuo for reporting and suggesting the fix. + Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5035 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11588> + +2026-04-09 21:34:23 +0300 Sebastian Dröge <sebastian@centricular.com> + + * ext/resindvd/gstpesfilter.c: + * gst/mpegdemux/gstpesfilter.c: + mpegdemux: Add missing bounds checking to PES header parsing + And also add missing advancing of the data pointer in various places, which + would've caused all following header field parsing to read the wrong data. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11587> + +2026-04-09 15:34:09 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst/mpegdemux/gstmpegdemux.c: + mpegdemux: Adding missing bounds checks when scanning for timestamps + Also make the already existing checks a bit more explicit and avoid integer + overflows with length calculations by using a bigger integer type. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11587> + +2026-04-09 15:31:10 +0300 Sebastian Dröge <sebastian@centricular.com> + + * ext/resindvd/gstpesfilter.c: + * gst/mpegdemux/gstpesfilter.c: + mpegdemux: First check for enough data and then read the DTS and not the other way around + Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5026 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11587> + +2026-04-28 15:58:32 +0900 Dennis Han <jshan@live.co.kr> + + * ext/qt6d3d11/gstqt6d3d11videoitem.cpp: + qt6d3d11: fix null check in SetForceAspectRatio() + The null-check branch incorrectly attempted to call + setForceAspectRatio() on a null item pointer. + Return early when item is null and call the setter otherwise. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11575> + +2026-05-08 18:05:19 +0300 Sebastian Dröge <sebastian@centricular.com> + + * sys/androidmedia/gstamc.c: + androidmedia: Free element name after use for logging + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11573> + +2026-05-07 16:49:08 +0100 Arthur Chan <arthur.chan@adalogics.com> + + * gst-libs/gst/codecparsers/gsth266parser.c: + h266parser: Add missing freeing function for H266 SEI message + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11571> + +2026-04-07 18:41:35 +0530 Nirbheek Chauhan <nirbheek@centricular.com> + + * gst/closedcaption/misc.h: + closedcaption: Fix invalid ISO varargs syntax + When there are no var args, there's a trailing comma. MSVC has been + suppressing that trailing comma, but in /std:c11 mode it (correctly) + does not suppress it. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11563> + +2026-04-07 13:09:24 +0100 Nirbheek Chauhan <nirbheek@centricular.com> + + * meson.build: + meson: Require C std gnu11 or c11 + When using gcc or clang, gnu11 will be used, and when using MSVC c11 + will be used which will pass /std:c11. This provides us with the + `restrict` keyword on all supported platforms. + We can do this now because we require Visual Studio 2019. + This feature was added in Meson 1.3 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11563> + +2026-05-06 16:05:40 +0300 Sebastian Dröge <sebastian@centricular.com> + + * sys/decklink/gstdecklink.cpp: + * sys/decklink/gstdecklinkvideosink.cpp: + decklink: Fix various refcount issues and related leaks + Also initializes refcount with 1 again in GStreamerVideoOutputCallback for + consistency, which was changed in https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11006 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11558> + +2026-04-10 17:35:41 +0300 Sebastian Dröge <sebastian@centricular.com> + + * sys/aja/gstajasink.cpp: + ajasink: Correctly set reference source + It's SetFramePulseReference() does something different and what we want is + SetReference() just like in the source element. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11309> + +2026-03-31 12:57:19 +0530 Nirbheek Chauhan <nirbheek@centricular.com> + + * sys/androidmedia/gstamc.c: + amc: Log the caps for registered codecs + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11551> + +2026-01-17 00:40:11 +0530 Nirbheek Chauhan <nirbheek@centricular.com> + + * sys/androidmedia/gstamc.c: + amc: Reduce verbosity of INFO logging during init + We log too much during init to INFO, and Android Studio just drops all + those messages because they're too many. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11551> + +2026-01-16 04:49:31 +0530 Nirbheek Chauhan <nirbheek@centricular.com> + + * sys/androidmedia/gstamc.c: + amc: Add constrained-baseline profile when baseline is available + Otherwise we can't decode constrained-baseline videos. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11551> + +2026-01-16 02:43:45 +0530 Nirbheek Chauhan <nirbheek@centricular.com> + + * sys/androidmedia/gstamcvideoenc.c: + amc: Remove support for API level < 25 + We no longer support Android older than Nougat. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11551> + +2026-05-07 17:17:39 +0100 Arthur Chan <arthur.chan@adalogics.com> + + * gst/videoparsers/h263parse.c: + h263parse: Fix wrong ratio masking + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11537> + +2026-05-07 17:09:32 +0100 Arthur Chan <arthur.chan@adalogics.com> + + * gst/videoparsers/gsth263parse.c: + h263parse: Missing handling of reserved invalid EPAR_D value + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11535> + +2026-05-07 16:43:15 +0100 Arthur Chan <arthur.chan@adalogics.com> + + * gst/videoparsers/gstpngparse.c: + pngparse: Fix Use-after-free bug + Signed-off-by: Arthur Chan <arthur.chan@adalogics.com> + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11531> + +2026-05-07 16:35:31 +0100 Arthur Chan <arthur.chan@adalogics.com> + + * gst/videoparsers/gstav1parse.c: + av1parse: Fix null pointer deference + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11529> + +2026-05-06 22:38:43 +0900 Seungha Yang <seungha@centricular.com> + + * ext/qt6d3d11/gstqml6d3d11sink.cpp: + * ext/qt6d3d11/gstqsg6d3d11node.cpp: + qml6d3d11sink: Clear texture on Paused-to-Ready transition + Like the GL version of qmlsink, clear owned texture to black + instead of keeping the last rendered frame + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11520> + +2026-04-21 09:32:02 -0400 Xavier Claessens <xclaessens@netflix.com> + + * sys/va/gstvabaseenc.c: + va: do not post error message when push fails + Downstream is responsible to post a specific error message. If it did + not, then upstream source will post a generic error message. + Intermediary elements just have to propagate the return value. + This prevents posting an error message when stopping a pipeline and + GST_FLOW_FLUSHING is returned. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11504> + +2026-03-26 11:40:44 +0100 Piotr Brzeziński <piotr@centricular.com> + + * sys/applemedia/vtdec.c: + * sys/applemedia/vtenc.c: + * sys/applemedia/vtutil.c:
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/RELEASE -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/RELEASE
Changed
@@ -1,4 +1,4 @@ -This is GStreamer gst-plugins-bad 1.28.2 +This is GStreamer gst-plugins-bad 1.28.3 The GStreamer team is thrilled to announce a new major feature release of your favourite cross-platform multimedia framework!
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/ext/qt6d3d11/gstqml6d3d11sink.cpp -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/ext/qt6d3d11/gstqml6d3d11sink.cpp
Changed
@@ -79,6 +79,9 @@ guint prop_id, GValue * value, GParamSpec * pspec); static void gst_qml6_d3d11_sink_set_context (GstElement * element, GstContext * context); +static GstStateChangeReturn +gst_qml6_d3d11_sink_change_state (GstElement * element, + GstStateChange transition); static gboolean gst_qml6_d3d11_sink_set_caps (GstBaseSink * sink, GstCaps * caps); static gboolean gst_qml6_d3d11_sink_start (GstBaseSink * sink); @@ -135,6 +138,8 @@ element_class->set_context = GST_DEBUG_FUNCPTR (gst_qml6_d3d11_sink_set_context); + element_class->change_state = + GST_DEBUG_FUNCPTR (gst_qml6_d3d11_sink_change_state); sink_class->set_caps = GST_DEBUG_FUNCPTR (gst_qml6_d3d11_sink_set_caps); sink_class->start = GST_DEBUG_FUNCPTR (gst_qml6_d3d11_sink_start); @@ -252,6 +257,22 @@ GST_ELEMENT_CLASS (parent_class)->set_context (element, context); } +static GstStateChangeReturn +gst_qml6_d3d11_sink_change_state (GstElement * element, + GstStateChange transition) +{ + auto self = GST_QML6_D3D11_SINK (element); + auto priv = self->priv; + + auto ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, + transition); + + if (transition == GST_STATE_CHANGE_PAUSED_TO_READY && priv->widget) + priv->widget->SetBuffer (nullptr); + + return ret; +} + static gboolean gst_qml6_d3d11_sink_set_caps (GstBaseSink * sink, GstCaps * caps) {
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/ext/qt6d3d11/gstqsg6d3d11node.cpp -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/ext/qt6d3d11/gstqsg6d3d11node.cpp
Changed
@@ -251,6 +251,22 @@ gst_d3d11_device_unlock (device_); markDirty (QSGNode::DirtyMaterial); + } else if (backbuffer_ && buffer_changed) { + GstMapInfo map_info; + auto mem = gst_buffer_peek_memory (backbuffer_, 0); + auto dmem = GST_D3D11_MEMORY_CAST (mem); + + gst_memory_map (mem, + &map_info, (GstMapFlags) (GST_MAP_D3D11 | GST_MAP_WRITE)); + + auto rtv = gst_d3d11_memory_get_render_target_view (dmem, 0); + auto ctx = gst_d3d11_device_get_device_context_handle (dmem->device); + + FLOAT clear_color4 = { 0.0f, 0.0f, 0.0f, 1.0f }; + ctx->ClearRenderTargetView (rtv, clear_color); + + gst_memory_unmap (mem, &map_info); + markDirty (QSGNode::DirtyMaterial); } mapTexture ();
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/ext/qt6d3d11/gstqt6d3d11videoitem.cpp -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/ext/qt6d3d11/gstqt6d3d11videoitem.cpp
Changed
@@ -73,7 +73,9 @@ { std::lock_guard < std::mutex > lk (lock); if (!item) - return item->setForceAspectRatio (force); + return; + + item->setForceAspectRatio (force); } gint64
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/ext/resindvd/gstpesfilter.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/ext/resindvd/gstpesfilter.c
Changed
@@ -212,19 +212,16 @@ /* stuffing bits, first two bits are '10' for mpeg2 pes so this code is * not triggered. */ - while (TRUE) { - if (*data != 0xff) - break; - + while (datalen > 0 && *data == 0xff) { data++; datalen--; GST_DEBUG ("got stuffing bit"); - - if (datalen < 1) - goto need_more_data; } + if (datalen < 1) + goto need_more_data; + /* STD buffer size, never for mpeg2 */ if ((*data & 0xc0) == 0x40) { GST_DEBUG ("have STD"); @@ -322,9 +319,10 @@ } /* check for DTS */ if ((flags & 0x40)) { - READ_TS (data, filter->dts, lost_sync); if (datalen < 5) goto need_more_data; + + READ_TS (data, filter->dts, lost_sync); GST_DEBUG ("DTS found %" G_GUINT64_FORMAT, filter->dts); header_data_length -= 5; datalen -= 5; @@ -345,10 +343,10 @@ if (datalen < 3) goto need_more_data; - es_rate = ((guint32) (*data++ & 0x07)) << 14; - es_rate |= ((guint32) (*data++)) << 7; - es_rate |= ((guint32) (*data++ & 0xFE)) >> 1; - GST_DEBUG ("%x ES Rate found %u", filter->id, es_rate); + es_rate = GST_READ_UINT24_BE (data); + GST_DEBUG ("%x ES Rate found %u", filter->id, + ((es_rate >> 1) & 0x003fffff) * 50); + data += 3; header_data_length -= 3; datalen -= 3; } @@ -388,37 +386,60 @@ } /* additional_copy_info_flag */ if ((flags & 0x04)) { + if (datalen < 1) + goto need_more_data; GST_DEBUG ("%x additional copy info, flags 0x%02x", filter->id, *data); + data++; + header_data_length--; + datalen--; } /* PES_CRC_flag */ if ((flags & 0x02)) { + if (datalen < 2) + goto need_more_data; GST_DEBUG ("%x PES_CRC", filter->id); + data += 2; + header_data_length -= 2; + datalen -= 2; } /* PES_extension_flag */ if ((flags & 0x01)) { + if (datalen < 1) + goto need_more_data; flags = *data++; - header_data_length -= 1; - datalen -= 1; + header_data_length--; + datalen--; GST_DEBUG ("%x PES_extension, flags 0x%02x", filter->id, flags); /* PES_private_data_flag */ if ((flags & 0x80)) { GST_DEBUG ("%x PES_private_data_flag", filter->id); + if (datalen < 16) + goto need_more_data; data += 16; header_data_length -= 16; datalen -= 16; } /* pack_header_field_flag */ if ((flags & 0x40)) { - guint8 pack_field_length = *data; + guint8 pack_field_length; + if (datalen < 1) + goto need_more_data; + pack_field_length = *data++; + header_data_length--; + datalen--; GST_DEBUG ("%x pack_header_field_flag, pack_field_length %d", filter->id, pack_field_length); - data += pack_field_length + 1; - header_data_length -= pack_field_length + 1; - datalen -= pack_field_length + 1; + if (datalen < pack_field_length) + goto need_more_data; + data += pack_field_length; + header_data_length -= pack_field_length; + datalen -= pack_field_length; } /* program_packet_sequence_counter_flag */ if ((flags & 0x20)) { GST_DEBUG ("%x program_packet_sequence_counter_flag", filter->id); + if (datalen < 2) + goto need_more_data; data += 2; header_data_length -= 2; datalen -= 2; @@ -426,21 +447,30 @@ /* P-STD_buffer_flag */ if ((flags & 0x10)) { GST_DEBUG ("%x P-STD_buffer_flag", filter->id); + if (datalen < 2) + goto need_more_data; data += 2; header_data_length -= 2; datalen -= 2; } /* PES_extension_flag_2 */ if ((flags & 0x01)) { - guint8 PES_extension_field_length = *data++; + guint8 PES_extension_field_length; + if (datalen < 1) + goto need_more_data; + PES_extension_field_length = *data++; + header_data_length--; + datalen--; GST_DEBUG ("%x PES_extension_flag_2, len %d", filter->id, PES_extension_field_length & 0x7f); + if (datalen < (PES_extension_field_length & 0x7f)) + goto need_more_data; if (PES_extension_field_length == 0x81) { GST_DEBUG ("%x substream id 0x%02x", filter->id, *data); } data += PES_extension_field_length & 0x7f; - header_data_length -= (PES_extension_field_length & 0x7f) + 1; - datalen -= (PES_extension_field_length & 0x7f) + 1; + header_data_length -= PES_extension_field_length & 0x7f; + datalen -= PES_extension_field_length & 0x7f; } } /* calculate the amount of real data in this PES packet */
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/ext/soundtouch/gstbpmdetect.cc -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/ext/soundtouch/gstbpmdetect.cc
Changed
@@ -224,7 +224,7 @@ gst_buffer_map (in, &info, GST_MAP_READ); - nsamples = info.size / (GST_AUDIO_INFO_BPF (&filter->info) * GST_AUDIO_INFO_CHANNELS (&filter->info)); + nsamples = info.size / GST_AUDIO_INFO_BPF (&filter->info); /* For stereo BPMDetect->inputSamples() does downmixing into the input * data but our buffer data shouldn't be modified.
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/ext/vulkan/vkdownload.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/ext/vulkan/vkdownload.c
Changed
@@ -315,7 +315,7 @@ else plane_aspect = aspectsi; - gst_vulkan_buffer_get_plane_dimensions (inbuf, &raw->in_info, i, &width, + gst_vulkan_buffer_get_plane_dimensions (*outbuf, &raw->out_info, i, &width, &height, &row, &img_h); /* *INDENT-OFF* */
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/ext/vulkan/vkupload.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/ext/vulkan/vkupload.c
Changed
@@ -724,6 +724,7 @@ for (i = 0; i < n_planes; i++) { VkBufferImageCopy region; + GstBuffer *used_buf = inbuf; GstMemory *mem; GstVulkanBufferMemory *buf_mem; GstVulkanImageMemory *img_mem; @@ -742,6 +743,7 @@ } else if (in_vk_copy) { GST_TRACE_OBJECT (raw->upload, "Have buffer copy of GstVulkanBufferMemory"); + used_buf = in_vk_copy; mem = gst_buffer_peek_memory (in_vk_copy, i); g_assert (gst_is_vulkan_buffer_memory (mem)); } else { @@ -774,6 +776,7 @@ goto unlock_error; } + used_buf = in_vk_copy; mem = gst_buffer_peek_memory (in_vk_copy, i); } @@ -793,7 +796,7 @@ else plane_aspect = aspectsi; - gst_vulkan_buffer_get_plane_dimensions (inbuf, &raw->in_info, i, &width, + gst_vulkan_buffer_get_plane_dimensions (used_buf, &raw->in_info, i, &width, &height, &row, &img_h); /* *INDENT-OFF* */
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/ext/webrtc/webrtcdatachannel.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/ext/webrtc/webrtcdatachannel.c
Changed
@@ -139,6 +139,7 @@ _channel_store_error (self->data_channel, error); _channel_enqueue_task (self->data_channel, (ChannelTask) _close_procedure, NULL, NULL); + gst_message_unref (message); break; } default: @@ -1106,6 +1107,7 @@ (GstPadProbeCallback) on_appsrc_data, channel, NULL); channel->src_bin = webrtc_error_ignore_bin_new (channel, channel->appsrc); + gst_object_ref_sink (channel->src_bin); channel->appsink = gst_element_factory_make ("appsink", NULL); gst_object_ref_sink (channel->appsink); @@ -1115,6 +1117,7 @@ channel, NULL); channel->sink_bin = webrtc_error_ignore_bin_new (channel, channel->appsink); + gst_object_ref_sink (channel->sink_bin); gst_object_unref (pad); gst_caps_unref (caps); @@ -1148,6 +1151,8 @@ g_clear_object (&channel->appsrc); g_clear_object (&channel->appsink); + g_clear_object (&channel->src_bin); + g_clear_object (&channel->sink_bin); g_weak_ref_clear (&channel->webrtcbin_weak);
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/gst-libs/gst/analytics/gstanalyticsobjectdetectionmtd.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/gst-libs/gst/analytics/gstanalyticsobjectdetectionmtd.c
Changed
@@ -114,6 +114,8 @@ oddata->y = rect.y; oddata->w = rect.w; oddata->h = rect.h; + + return TRUE; } else if (GST_VIDEO_META_TRANSFORM_IS_SCALE (type)) { GstVideoMetaTransform *trans = data; gint ow, oh, nw, nh; @@ -138,11 +140,14 @@ oddata->h *= nh; oddata->h /= oh; - } else { - return FALSE; + + return TRUE; + } else if (GST_META_TRANSFORM_IS_COPY (type)) { + // Data already copied by generic transform function, nothing to do. + return TRUE; } - return TRUE; + return FALSE; } static const GstAnalyticsMtdImpl od_impl = {
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/gst-libs/gst/analytics/gstanalyticssegmentationmtd.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/gst-libs/gst/analytics/gstanalyticssegmentationmtd.c
Changed
@@ -463,6 +463,8 @@ segdata->masks_loc_y = rect.y; segdata->masks_loc_w = rect.w; segdata->masks_loc_h = rect.h; + + return TRUE; } else if (GST_VIDEO_META_TRANSFORM_IS_SCALE (type)) { GstVideoMetaTransform *trans = data; gint ow, oh, nw, nh; @@ -484,9 +486,13 @@ segdata->masks_loc_h *= nh; segdata->masks_loc_h /= oh; + return TRUE; + } else if (GST_META_TRANSFORM_IS_COPY (type)) { + // Data already copied by generic transform function, nothing to do. + return TRUE; } - return TRUE; + return FALSE; } /**
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/gst-libs/gst/codecparsers/gsth265parser.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/gst-libs/gst/codecparsers/gsth265parser.c
Changed
@@ -1060,7 +1060,7 @@ (hrd->au_cpb_removal_delay_length_minus1 + 1)); if (hrd->nal_hrd_parameters_present_flag) { - for (i = 0; i <= hrd->cpb_cnt_minus1i; i++) { + for (i = 0; i <= hrd->cpb_cnt_minus10; i++) { READ_UINT8 (nr, per->nal_initial_cpb_removal_delayi, n); READ_UINT8 (nr, per->nal_initial_cpb_removal_offseti, n); if (hrd->sub_pic_hrd_params_present_flag @@ -1072,7 +1072,7 @@ } if (hrd->vcl_hrd_parameters_present_flag) { - for (i = 0; i <= hrd->cpb_cnt_minus1i; i++) { + for (i = 0; i <= hrd->cpb_cnt_minus10; i++) { READ_UINT8 (nr, per->vcl_initial_cpb_removal_delayi, n); READ_UINT8 (nr, per->vcl_initial_cpb_removal_offseti, n); if (hrd->sub_pic_hrd_params_present_flag
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/gst-libs/gst/codecparsers/gsth265parser.h -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/gst-libs/gst/codecparsers/gsth265parser.h
Changed
@@ -511,7 +511,7 @@ * @temporal_id_plus1: A nal unit temporal identifier * @size: The size of the nal unit starting from @offset * @offset: The offset of the actual start of the nal unit - * @sc_offset:The offset of the start code of the nal unit + * @sc_offset: The offset of the start code of the nal unit * @valid: If the nal unit is valid, which mean it has * already been parsed * @data: The data from which the Nalu has been parsed @@ -558,18 +558,18 @@ * @max_14bit_constraint_flag: used to define profile extensions, see Annex A * @level idc: indicate the level which the CVS confirms * @sub_layer_profile_present_flag: sublayer profile presence ind - * @sub_layer_level_present_flag:sublayer level presence indicator. + * @sub_layer_level_present_flag: sublayer level presence indicator. * @sub_layer_profile_space: profile space for sublayers * @sub_layer_tier_flag: tier flags for sublayers. * @sub_layer_profile_idc: conformant profile indicator for sublayers. * @sub_layer_profile_compatibility_flag632: compatibility flags for sublayers - * @sub_layer_progressive_source_flag:progressive stream indicator for sublayer + * @sub_layer_progressive_source_flag: progressive stream indicator for sublayer * @sub_layer_interlaced_source_flag: interlaced stream indicator for sublayer * @sub_layer_non_packed_constraint_flag: indicate the presence of * frame packing arrangement sei message with in sublayers - * @sub_layer_frame_only_constraint_flag:recognize the sublayer + * @sub_layer_frame_only_constraint_flag: recognize the sublayer * specific field_seq_flag - * @sub_layer_level_idc:indicate the sublayer specific level + * @sub_layer_level_idc: indicate the sublayer specific level * * Define ProfileTierLevel parameters */ @@ -614,7 +614,7 @@ /** * GstH265SubLayerHRDParams: - * @bit_rate_value_minus1:togeter with bit_rate_scale, it specifies + * @bit_rate_value_minus1: together with bit_rate_scale, it specifies * the maximum input bitrate when the CPB operates at the access * unit level * @cpb_size_value_minus1: is used together with cpb_size_scale to @@ -670,7 +670,7 @@ * @fixed_pic_rate_within_cvs_flag: same as fixed_pic_rate_general_flag * @elemental_duration_in_tc_minus1: temporal distance in clock ticks * @low_delay_hrd_flag: specifies the HRD operational mode - * @cpb_cnt_minus1:specifies the number of alternative CPS specifications. + * @cpb_cnt_minus1: specifies the number of alternative CPB specifications. * @sublayer_hrd_params: Sublayer HRD parameters. * * Defines the HRD parameters @@ -709,7 +709,7 @@ * @base_layer_internal_flag and @base_layer_available_flag: * specify availability of base layer * @max_layers_minus1: should be zero, but can be other values in future - * @max_sub_layers_minus1:specifies the maximum number of temporal sub-layers + * @max_sub_layers_minus1: specifies the maximum number of temporal sub-layers * @temporal_id_nesting_flag: specifies whether inter prediction is * additionally restricted * @profile_tier_level: ProfileTierLevel info
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/gst-libs/gst/codecparsers/gsth266parser.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/gst-libs/gst/codecparsers/gsth266parser.c
Changed
@@ -3761,6 +3761,11 @@ guint16 slice_height_in_ctus; for (j = 0; j < pps->num_exp_slices_in_tilei; j++) { + if (i + j >= pps->num_slices_in_pic_minus1) { + GST_WARNING ("Too may slices %d", i + j + 1); + goto error; + } + READ_UE_MAX (nr, pps->exp_slice_height_in_ctus_minus1ij, pps->tile_row_height_minus1tile_y); @@ -6128,6 +6133,18 @@ return GST_H266_PARSER_ERROR; } +// This is public API since 1.30 +static void +gst_h266_sei_clear (GstH266SEIMessage * sei) +{ + if (sei->payloadType == GST_H266_SEI_REGISTERED_USER_DATA) { + GstH266RegisteredUserData *rud = &sei->payload.registered_user_data; + g_free ((guint8 *) rud->data); + rud->data = NULL; + } + memset (sei, 0, sizeof (GstH266SEIMessage)); +} + /** * gst_h266_parser_parse_sei: * @parser: a #GstH266Parser @@ -6154,6 +6171,7 @@ nal_reader_init (&nr, nalu->data + nalu->offset + nalu->header_bytes, nalu->size - nalu->header_bytes); *messages = g_array_new (FALSE, FALSE, sizeof (GstH266SEIMessage)); + g_array_set_clear_func (*messages, (GDestroyNotify) gst_h266_sei_clear); do { res = gst_h266_parser_parse_sei_message (&sei, &nr, nalparser, nalu->type,
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/gst-libs/gst/mse/meson.build -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/gst-libs/gst/mse/meson.build
Changed
@@ -1,3 +1,7 @@ +if get_option('mse').disabled() + subdir_done() +endif + gstmse_headers_private = files( 'gstappendpipeline-private.h', 'gstmediasourcesamplemap-private.h',
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/gst-libs/gst/vulkan/meson.build -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/gst-libs/gst/vulkan/meson.build
Changed
@@ -116,21 +116,15 @@ vulkan_plugin_kwargs = {} if host_system == 'darwin' - vulkan_dep = dependency('vulkan', method: 'pkg-config', required : false) + # Prefer direct MoltenVK linkage on Darwin instead of the Vulkan loader. + # This matches the framework packaging model and avoids depending on local + # ICD/loader setup when running the Vulkan plugin. + objcpp = meson.get_compiler('objcpp') + vulkan_dep = objcpp.find_library('MoltenVK', required: false) if not vulkan_dep.found() - # - ios does not support the loader/validation layers - # - We need to link directly to MoltenVK to be able to use - # MoltenVK-specific functions that use dispatchable handles (like - # retrieving the metal device from the VkDevice) which is currently waiting - # on implementing a proper Metal extension for Vulkan - # https://github.com/KhronosGroup/MoltenVK/issues/492 - objcpp = meson.get_compiler('objcpp') - vulkan_dep = objcpp.find_library('MoltenVK', required: false) - if not vulkan_dep.found() - vulkan_dep = dependency('MoltenVK', fallback: 'moltenvk', required: vulkan_opt) - # We need this to find libMoltenVK.dylib when installed - vulkan_plugin_kwargs += {'install_rpath': '@loader_path/..'} - endif + vulkan_dep = dependency('MoltenVK', fallback: 'moltenvk', required: vulkan_opt) + # We need this to find libMoltenVK.dylib when installed + vulkan_plugin_kwargs += {'install_rpath': '@loader_path/..'} endif elif host_system == 'windows' vulkan_root = run_command(python3, '-c', 'import os; print(os.environ.get("VK_SDK_PATH"))', check: false).stdout().strip()
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/gst-plugins-bad.doap -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/gst-plugins-bad.doap
Changed
@@ -35,6 +35,16 @@ <release> <Version> + <revision>1.28.3</revision> + <branch>1.28</branch> + <name></name> + <created>2026-05-11</created> + <file-release rdf:resource="https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.28.3.tar.xz" /> + </Version> + </release> + + <release> + <Version> <revision>1.28.2</revision> <branch>1.28</branch> <name></name>
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/gst/closedcaption/misc.h -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/gst/closedcaption/misc.h
Changed
@@ -329,20 +329,20 @@ #define debug3(hook, templ, args...) \ VBI_CAT_LEVEL_LOG (GST_LEVEL_TRACE, NULL, templ , ##args) #elif defined(G_HAVE_ISO_VARARGS) -#define error(hook, templ, ...) \ - VBI_CAT_LEVEL_LOG (GST_LEVEL_ERROR, NULL, templ, __VA_ARGS__) -#define warn(hook, templ, ...) \ - VBI_CAT_LEVEL_LOG (GST_LEVEL_WARNING, NULL, templ, __VA_ARGS__) -#define notice(hook, templ, ...) \ - VBI_CAT_LEVEL_LOG (GST_LEVEL_INFO, NULL, templ, __VA_ARGS__) -#define info(hook, templ, ...) \ - VBI_CAT_LEVEL_LOG (GST_LEVEL_INFO, NULL, templ, __VA_ARGS__) -#define debug1(hook, templ, ...) \ - VBI_CAT_LEVEL_LOG (GST_LEVEL_DEBUG, NULL, templ, __VA_ARGS__) -#define debug2(hook, templ, ...) \ - VBI_CAT_LEVEL_LOG (GST_LEVEL_LOG, NULL, templ, __VA_ARGS__) -#define debug3(hook, templ, ...) \ - VBI_CAT_LEVEL_LOG (GST_LEVEL_TRACE, NULL, templ, __VA_ARGS__) +#define error(hook, ...) \ + VBI_CAT_LEVEL_LOG (GST_LEVEL_ERROR, NULL, __VA_ARGS__) +#define warn(hook, ...) \ + VBI_CAT_LEVEL_LOG (GST_LEVEL_WARNING, NULL, __VA_ARGS__) +#define notice(hook, ...) \ + VBI_CAT_LEVEL_LOG (GST_LEVEL_INFO, NULL, __VA_ARGS__) +#define info(hook, ...) \ + VBI_CAT_LEVEL_LOG (GST_LEVEL_INFO, NULL, __VA_ARGS__) +#define debug1(hook, ...) \ + VBI_CAT_LEVEL_LOG (GST_LEVEL_DEBUG, NULL, __VA_ARGS__) +#define debug2(hook, ...) \ + VBI_CAT_LEVEL_LOG (GST_LEVEL_LOG, NULL, __VA_ARGS__) +#define debug3(hook, ...) \ + VBI_CAT_LEVEL_LOG (GST_LEVEL_TRACE, NULL, __VA_ARGS__) #else /* if someone needs this, they can implement the inline functions for it */ #error "variadic macros are required"
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/gst/interlace/gstinterlace.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/gst/interlace/gstinterlace.c
Changed
@@ -1005,25 +1005,18 @@ icaps = gst_caps_merge (icaps, alternate); } - /* Drop framerate for sinkpad */ - if (pad == interlace->sinkpad) { + if (pattern == GST_INTERLACE_PATTERN_1_1) { + icaps = + gst_interlace_caps_double_framerate (icaps, (pad == interlace->srcpad), + FALSE); + } else if (pattern != GST_INTERLACE_PATTERN_2_2) { + GST_FIXME_OBJECT (interlace, + "Add calculations for telecine framerate conversions"); for (i = 0; i < gst_caps_get_size (icaps); ++i) { GstStructure *s = gst_caps_get_structure (icaps, i); gst_structure_remove_field (s, "framerate"); } - } else { - if (pattern == GST_INTERLACE_PATTERN_1_1) { - icaps = gst_interlace_caps_double_framerate (icaps, TRUE, FALSE); - } else if (pattern != GST_INTERLACE_PATTERN_2_2) { - GST_FIXME_OBJECT (interlace, - "Add calculations for telecine framerate conversions"); - for (i = 0; i < gst_caps_get_size (icaps); ++i) { - GstStructure *s = gst_caps_get_structure (icaps, i); - - gst_structure_remove_field (s, "framerate"); - } - } } if (clean_filter)
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/gst/mpegdemux/gstmpegdemux.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/gst/mpegdemux/gstmpegdemux.c
Changed
@@ -2554,16 +2554,17 @@ guint32 scr1, scr2; guint64 scr; guint64 pts, dts; - guint32 code; - guint16 len; + /* read the 4 bytes for the sync code */ - code = GST_READ_UINT32_BE (data); - if (G_LIKELY (code != ID_PS_PACK_START_CODE)) + if (end - data < 4) goto beach; - if (data + 12 > end) + if (G_LIKELY (GST_READ_UINT32_BE (data) != ID_PS_PACK_START_CODE)) goto beach; - /* skip start code */ data += 4; + + if (end - data < 8) + goto beach; + /* skip start code */ scr1 = GST_READ_UINT32_BE (data); scr2 = GST_READ_UINT32_BE (data + 4); /* start parsing the stream */ @@ -2591,7 +2592,7 @@ to DTS/PTS, that also implies 1 tick rounding error */ data += 6; - if (data + 4 > end) + if (end - data < 4) goto beach; /* PMR:22 ! :2==11 ! reserved:5 ! stuffing_len:3 */ next32 = GST_READ_UINT32_BE (data); @@ -2599,7 +2600,7 @@ goto beach; stuffing_bytes = (next32 & 0x07); data += 4; - if (data + stuffing_bytes > end) + if (end - data < stuffing_bytes) goto beach; while (stuffing_bytes--) { if (*data++ != 0xff) @@ -2627,17 +2628,17 @@ } /* Possible optional System header here */ - if (data + 8 > end) + if (end - data < 6) goto beach; - code = GST_READ_UINT32_BE (data); - len = GST_READ_UINT16_BE (data + 4); + guint32 code = GST_READ_UINT32_BE (data); + guint len = GST_READ_UINT16_BE (data + 4); if (code == ID_PS_SYSTEM_HEADER_START_CODE) { /* Found a system header, skip it */ /* Check for sufficient data - system header, plus enough * left over for the PES packet header */ - if (data + 6 + len + 6 > end) - return FALSE; + if (end - data < 6 + len + 6) + goto beach; data += len + 6; /* read the 4 bytes for the PES sync code */ code = GST_READ_UINT32_BE (data); @@ -2645,8 +2646,8 @@ } /* Check we have enough data left for reading the PES packet */ - if (data + 6 + len > end) - return FALSE; + if (end - data < 6 + len) + goto beach; if (!gst_ps_demux_is_pes_sync (code)) goto beach; switch (code) { @@ -2665,29 +2666,49 @@ /* skip sync code and size */ data += 6; + /* update end to the actual size of the PES packet */ + end = data + len; + pts = dts = -1; /* stuffing bits, first two bits are '10' for mpeg2 pes so this code is * not triggered. */ - while (TRUE) { + while (data < end) { if (*data != 0xff) break; data++; } + if (data == end) + goto beach; /* STD buffer size, never for mpeg2 */ - if ((*data & 0xc0) == 0x40) + if ((*data & 0xc0) == 0x40) { + if (end - data < 2) + goto beach; data += 2; + } + /* PTS but no DTS, never for mpeg2 */ + if (data == end) + goto beach; if ((*data & 0xf0) == 0x20) { + if (end - data < 5) + goto beach; READ_TS (data, pts, beach); + data += 5; } /* PTS and DTS, never for mpeg2 */ else if ((*data & 0xf0) == 0x30) { + if (end - data < 10) + goto beach; READ_TS (data, pts, beach); READ_TS (data, dts, beach); + data += 10; } else if ((*data & 0xc0) == 0x80) { + guint8 flags; + + if (end - data < 3) + goto beach; /* mpeg2 case */ - guchar flags; /* 2: '10' * 2: PES_scrambling_control * 1: PES_priority @@ -2695,9 +2716,8 @@ * 1: copyright * 1: original_or_copy */ - flags = *data++; - if ((flags & 0xc0) != 0x80) - goto beach; + data++; + /* 2: PTS_DTS_flags * 1: ESCR_flag * 1: ES_rate_flag @@ -2707,17 +2727,23 @@ * 1: PES_extension_flag */ flags = *data++; - /* 8: PES_header_data_length */ - data++; /* only DTS: this is invalid */ if ((flags & 0xc0) == 0x40) goto beach; + + /* 8: PES_header_data_length */ + data++; + /* check for PTS */ if ((flags & 0x80)) { + if (end - data < 5) + goto beach; READ_TS (data, pts, beach); } /* check for DTS */ if ((flags & 0x40)) { + if (end - data < 5) + goto beach; READ_TS (data, dts, beach); } }
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/gst/mpegdemux/gstpesfilter.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/gst/mpegdemux/gstpesfilter.c
Changed
@@ -212,19 +212,16 @@ /* stuffing bits, first two bits are '10' for mpeg2 pes so this code is * not triggered. */ - while (TRUE) { - if (*data != 0xff) - break; - + while (datalen > 0 && *data == 0xff) { data++; datalen--; GST_DEBUG ("got stuffing bit"); - - if (datalen < 1) - goto need_more_data; } + if (datalen < 1) + goto need_more_data; + /* STD buffer size, never for mpeg2 */ if ((*data & 0xc0) == 0x40) { GST_DEBUG ("have STD"); @@ -322,9 +319,10 @@ } /* check for DTS */ if ((flags & 0x40)) { - READ_TS (data, filter->dts, lost_sync); if (datalen < 5) goto need_more_data; + + READ_TS (data, filter->dts, lost_sync); GST_DEBUG ("DTS found %" G_GUINT64_FORMAT, filter->dts); header_data_length -= 5; datalen -= 5; @@ -345,10 +343,10 @@ if (datalen < 3) goto need_more_data; - es_rate = ((guint32) (*data++ & 0x07)) << 14; - es_rate |= ((guint32) (*data++)) << 7; - es_rate |= ((guint32) (*data++ & 0xFE)) >> 1; - GST_DEBUG ("%x ES Rate found %u", filter->id, es_rate); + es_rate = GST_READ_UINT24_BE (data); + GST_DEBUG ("%x ES Rate found %u", filter->id, + ((es_rate >> 1) & 0x003fffff) * 50); + data += 3; header_data_length -= 3; datalen -= 3; } @@ -388,37 +386,60 @@ } /* additional_copy_info_flag */ if ((flags & 0x04)) { + if (datalen < 1) + goto need_more_data; GST_DEBUG ("%x additional copy info, flags 0x%02x", filter->id, *data); + data++; + header_data_length--; + datalen--; } /* PES_CRC_flag */ if ((flags & 0x02)) { + if (datalen < 2) + goto need_more_data; GST_DEBUG ("%x PES_CRC", filter->id); + data += 2; + header_data_length -= 2; + datalen -= 2; } /* PES_extension_flag */ if ((flags & 0x01)) { + if (datalen < 1) + goto need_more_data; flags = *data++; - header_data_length -= 1; - datalen -= 1; + header_data_length--; + datalen--; GST_DEBUG ("%x PES_extension, flags 0x%02x", filter->id, flags); /* PES_private_data_flag */ if ((flags & 0x80)) { GST_DEBUG ("%x PES_private_data_flag", filter->id); + if (datalen < 16) + goto need_more_data; data += 16; header_data_length -= 16; datalen -= 16; } /* pack_header_field_flag */ if ((flags & 0x40)) { - guint8 pack_field_length = *data; + guint8 pack_field_length; + if (datalen < 1) + goto need_more_data; + pack_field_length = *data++; + header_data_length--; + datalen--; GST_DEBUG ("%x pack_header_field_flag, pack_field_length %d", filter->id, pack_field_length); - data += pack_field_length + 1; - header_data_length -= pack_field_length + 1; - datalen -= pack_field_length + 1; + if (datalen < pack_field_length) + goto need_more_data; + data += pack_field_length; + header_data_length -= pack_field_length; + datalen -= pack_field_length; } /* program_packet_sequence_counter_flag */ if ((flags & 0x20)) { GST_DEBUG ("%x program_packet_sequence_counter_flag", filter->id); + if (datalen < 2) + goto need_more_data; data += 2; header_data_length -= 2; datalen -= 2; @@ -426,21 +447,30 @@ /* P-STD_buffer_flag */ if ((flags & 0x10)) { GST_DEBUG ("%x P-STD_buffer_flag", filter->id); + if (datalen < 2) + goto need_more_data; data += 2; header_data_length -= 2; datalen -= 2; } /* PES_extension_flag_2 */ if ((flags & 0x01)) { - guint8 PES_extension_field_length = *data++; + guint8 PES_extension_field_length; + if (datalen < 1) + goto need_more_data; + PES_extension_field_length = *data++; + header_data_length--; + datalen--; GST_DEBUG ("%x PES_extension_flag_2, len %d", filter->id, PES_extension_field_length & 0x7f); + if (datalen < (PES_extension_field_length & 0x7f)) + goto need_more_data; if (PES_extension_field_length == 0x81) { GST_DEBUG ("%x substream id 0x%02x", filter->id, *data); } data += PES_extension_field_length & 0x7f; - header_data_length -= (PES_extension_field_length & 0x7f) + 1; - datalen -= (PES_extension_field_length & 0x7f) + 1; + header_data_length -= PES_extension_field_length & 0x7f; + datalen -= PES_extension_field_length & 0x7f; } } /* calculate the amount of real data in this PES packet */
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/gst/mpegtsdemux/mpegtsbase.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/gst/mpegtsdemux/mpegtsbase.c
Changed
@@ -623,9 +623,13 @@ for (i = 0; i < nb_desc; i++) { GstMpegtsDescriptor *desc = g_ptr_array_index (descriptors, i); if (desc->tag == GST_MTS_DESC_REGISTRATION) { - guint32 reg_desc = GST_READ_UINT32_BE (desc->data + 2); - if (reg_desc == registration_id) - return TRUE; + if (G_UNLIKELY (desc->length < 4)) { + GST_WARNING ("Registration descriptor with length < 4. (Corrupted ?)"); + } else { + guint32 reg_desc = GST_READ_UINT32_BE (desc->data + 2); + if (reg_desc == registration_id) + return TRUE; + } } } return FALSE; @@ -1952,8 +1956,6 @@ flush_event = NULL; } - if (flush_event) - gst_event_unref (flush_event); gst_pad_start_task (base->sinkpad, (GstTaskFunction) mpegts_base_loop, base, NULL);
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/gst/mpegtsdemux/mpegtspacketizer.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/gst/mpegtsdemux/mpegtspacketizer.c
Changed
@@ -1151,7 +1151,7 @@ GST_DEBUG ("Short packet"); section_length = (GST_READ_UINT16_BE (data + 1) & 0xfff) + 3; /* Only do fast-path if we have enough byte */ - if (data + section_length <= packet->data_end) { + if ((packet->data_end - data) >= section_length) { if ((section = gst_mpegts_section_new (packet->pid, g_memdup2 (data, section_length), section_length))) {
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/gst/mpegtsdemux/pesparse.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/gst/mpegtsdemux/pesparse.c
Changed
@@ -173,10 +173,20 @@ if (flags & 0x20) { /* ESCR */ - if (G_UNLIKELY (length < 5)) + if (G_UNLIKELY (length < 6)) goto need_more_data; - READ_TS (data, res->ESCR, bad_ESCR_value); - length -= 5; + + guint32 escr1 = GST_READ_UINT32_BE (data); + guint16 escr2 = GST_READ_UINT16_BE (data + 4); + guint64 escr, escr_ext; + + escr = ((guint64) escr1) << 1; + escr |= (escr2 & 0x8000) >> 15; + escr_ext = (escr2 & 0x01ff); + res->ESCR = escr * 300 + escr_ext % 300; + + data += 6; + length -= 6; GST_LOG ("ESCR %" G_GUINT64_FORMAT " %" GST_TIME_FORMAT, res->ESCR, GST_TIME_ARGS (PCRTIME_TO_GSTTIME (res->ESCR))); @@ -186,12 +196,12 @@ /* ES_rate */ if (G_UNLIKELY (length < 3)) goto need_more_data; - val32 = GST_READ_UINT32_BE (data); + val32 = GST_READ_UINT24_BE (data); data += 3; length -= 3; - if (G_UNLIKELY ((val32 & 0x80000100) != 0x80000100)) + if (G_UNLIKELY ((val32 & 0x00800001) != 0x00800001)) goto bad_ES_rate; - res->ES_rate = ((val32 >> 9) & 0x003fffff) * 50; + res->ES_rate = ((val32 >> 1) & 0x003fffff) * 50; GST_LOG ("ES_rate : %d", res->ES_rate); } @@ -421,10 +431,6 @@ GST_WARNING ("bad DTS value"); return PES_PARSING_BAD; -bad_ESCR_value: - GST_WARNING ("bad ESCR value"); - return PES_PARSING_BAD; - bad_ES_rate: GST_WARNING ("Invalid ES_rate markers 0x%0x", val32); return PES_PARSING_BAD;
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/gst/mpegtsdemux/tsdemux.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/gst/mpegtsdemux/tsdemux.c
Changed
@@ -1121,7 +1121,7 @@ GList *tmp; gboolean forward = FALSE; - if (demux->send_scte35_events) { + if (demux->send_scte35_events && demux->program) { for (tmp = demux->program->stream_list; tmp; tmp = tmp->next) { TSDemuxStream *stream = (TSDemuxStream *) tmp->data;
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/gst/mxf/mxfaes-bwf.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/gst/mxf/mxfaes-bwf.c
Changed
@@ -1002,7 +1002,8 @@ t->data = g_malloc (t->size); GST_WRITE_UINT32_BE (t->data, self->n_channel_status_mode); GST_WRITE_UINT32_BE (t->data + 4, 1); - memcpy (t->data + 8, self->channel_status_mode, t->size); + memcpy (t->data + 8, self->channel_status_mode, + self->n_channel_status_mode); mxf_primer_pack_add_mapping (primer, 0x3d10, &t->ul); ret = g_list_prepend (ret, t); } @@ -1029,7 +1030,7 @@ t->data = g_malloc (t->size); GST_WRITE_UINT32_BE (t->data, self->n_user_data_mode); GST_WRITE_UINT32_BE (t->data + 4, 1); - memcpy (t->data + 8, self->user_data_mode, t->size); + memcpy (t->data + 8, self->user_data_mode, self->n_user_data_mode); mxf_primer_pack_add_mapping (primer, 0x3d12, &t->ul); ret = g_list_prepend (ret, t); }
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/gst/mxf/mxfdemux.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/gst/mxf/mxfdemux.c
Changed
@@ -5090,7 +5090,7 @@ MXFIndexEntry *entry = &s->index_entriesentidx; gint8 offs = -entry->temporal_offset; /* Check we don't exceed boundaries */ - if (start + entidx + entry->temporal_offset > + if (start + entidx + entry->temporal_offset >= table->reverse_temporal_offsets->len) { GST_ERROR_OBJECT (demux, "Temporal offset exceeds boundaries. entry:%d offset:%d max:%d",
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/gst/mxf/mxfvanc.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/gst/mxf/mxfvanc.c
Changed
@@ -140,30 +140,31 @@ gst_bit_writer_put_bits_uint16 (writer, data_count, 10); } -static GstBuffer * -mxf_vanc_to_st2038 (const guint8 * vanc_data, gsize vanc_data_size, - guint16 line_number, guint16 payload_sample_count, - guint8 payload_sample_coding, guint32 array_count, guint32 array_item_size) +static void +mxf_vanc_to_st2038 (GstByteWriter * writer, const guint8 * vanc_data, + gsize vanc_data_size, guint16 line_number, guint16 payload_sample_count, + guint8 payload_sample_coding) { - GstBitWriter writer; - GstBitReader bit_reader; - GstByteReader byte_reader; + GstBitWriter bit_writer; guint16 checksum, did, sdid, data_count; guint8 c_not_y_channel_flag, *data; gboolean payload_10bit; gsize size; guint i; + guint8 tmp_data64 + 256 * 2 = { 0, }; c_not_y_channel_flag = get_c_not_y_channel_flag (payload_sample_coding); payload_10bit = is_payload_10bit (payload_sample_coding); if (payload_10bit) { + GstBitReader bit_reader; + gst_bit_reader_init (&bit_reader, vanc_data, vanc_data_size); /* Check if we can read DID, SDID and Data Count */ if (gst_bit_reader_get_remaining (&bit_reader) < 32) { GST_WARNING ("Insufficient VANC data"); - return NULL; + return; } /* See section 5.4.4 of ST-436 on 10-bit sample coding */ @@ -174,14 +175,15 @@ /* Skip 2-bit padding */ gst_bit_reader_skip (&bit_reader, 2); - if (payload_sample_count - 3 < data_count) { + if (payload_sample_count - 3 < (data_count & 0xFF)) { GST_WARNING ("Insufficient user data words"); - return NULL; + return; } - gst_bit_writer_init_with_size (&writer, 64 + data_count * 2, FALSE); - write_st2038_header (&writer, c_not_y_channel_flag, line_number, did, sdid, - data_count); + gst_bit_writer_init_with_data (&bit_writer, tmp_data, + 64 + (data_count & 0xFF) * 2, FALSE); + write_st2038_header (&bit_writer, c_not_y_channel_flag, line_number, did, + sdid, data_count); /* * See Section 6.7 of ST-291 on Checksum Word. @@ -192,7 +194,7 @@ * significant bits of the DID, SDID, DC and UDW. */ checksum = (did & 0x1FF) + (sdid & 0x1FF) + (data_count & 0x1FF); - for (i = 0; i < data_count; i++) { + for (i = 0; i < (data_count & 0xFF); i++) { /* * For a 10-bit coding, 4 bytes representing 3 source samples * are coded using the high-order 30-bits (bits 2 to 31) of a @@ -200,23 +202,32 @@ * bits of the payload data 32-bit word (bits 0 and 1) are set * to zero. */ - guint16 udw = gst_bit_reader_get_bits_uint16_unchecked (&bit_reader, 10); + guint16 udw; + if (!gst_bit_reader_get_bits_uint16 (&bit_reader, &udw, 10)) { + GST_WARNING ("Insufficient data available"); + return; + } checksum += (udw & 0x1FF); - gst_bit_writer_put_bits_uint16 (&writer, udw, 10); + gst_bit_writer_put_bits_uint16 (&bit_writer, udw, 10); if (i % 3 == 2) { - gst_bit_reader_skip (&bit_reader, 2); + if (!gst_bit_reader_skip (&bit_reader, 2)) { + GST_WARNING ("Insufficient data available"); + return; + } } } - gst_bit_writer_put_bits_uint16 (&writer, checksum & 0x1FF, 10); + gst_bit_writer_put_bits_uint16 (&bit_writer, checksum & 0x1FF, 10); } else { + GstByteReader byte_reader; + gst_byte_reader_init (&byte_reader, vanc_data, vanc_data_size); /* Check if we can read DID, SDID and Data Count */ if (gst_byte_reader_get_remaining (&byte_reader) < 3) { GST_WARNING ("Insufficient VANC data"); - return NULL; + return; } did = gst_byte_reader_get_uint8_unchecked (&byte_reader); @@ -225,11 +236,12 @@ if (payload_sample_count - 3 < data_count) { GST_WARNING ("Insufficient user data words"); - return NULL; + return; } - gst_bit_writer_init_with_size (&writer, 64 + data_count * 2, FALSE); - write_st2038_header (&writer, c_not_y_channel_flag, line_number, + gst_bit_writer_init_with_data (&bit_writer, tmp_data, 64 + data_count * 2, + FALSE); + write_st2038_header (&bit_writer, c_not_y_channel_flag, line_number, with_parity (did), with_parity (sdid), with_parity (data_count)); /* @@ -238,20 +250,25 @@ */ checksum = did + sdid + data_count; for (i = 0; i < data_count; i++) { - guint8 udw = gst_byte_reader_get_uint8_unchecked (&byte_reader); + guint8 udw; + if (!gst_byte_reader_get_uint8 (&byte_reader, &udw)) { + GST_WARNING ("Insufficient data available"); + return; + } checksum += udw; - gst_bit_writer_put_bits_uint16 (&writer, with_parity (udw), 10); + gst_bit_writer_put_bits_uint16 (&bit_writer, with_parity (udw), 10); } - gst_bit_writer_put_bits_uint16 (&writer, with_parity (checksum & 0xFF), 10); + gst_bit_writer_put_bits_uint16 (&bit_writer, with_parity (checksum & 0xFF), + 10); } - gst_bit_writer_align_bytes (&writer, 1); + gst_bit_writer_align_bytes (&bit_writer, 1); - size = gst_bit_writer_get_size (&writer) / 8; - data = gst_bit_writer_reset_and_get_data (&writer); + size = gst_bit_writer_get_size (&bit_writer) / 8; + data = gst_bit_writer_get_data (&bit_writer); - return gst_buffer_new_wrapped (data, size); + gst_byte_writer_put_data (writer, data, size); } static GstFlowReturn @@ -264,6 +281,9 @@ GstByteReader reader; GstFlowReturn ret = GST_FLOW_ERROR; guint16 num_packets, i; + GstByteWriter writer; + + gst_byte_writer_init (&writer); /* SMPTE 436M 6.1 */ if (key->u12 != 0x17 || key->u14 != 0x02) { @@ -314,7 +334,7 @@ guint8 did, sdid; guint8 cdp_size; - if (gst_byte_reader_get_remaining (&reader) < 16) + if (gst_byte_reader_get_remaining (&reader) < 14) goto out; line_num = gst_byte_reader_get_uint16_be_unchecked (&reader); @@ -325,24 +345,31 @@ array_count = gst_byte_reader_get_uint32_be_unchecked (&reader); array_item_size = gst_byte_reader_get_uint32_be_unchecked (&reader); + if (array_item_size != 1) { + if (!gst_byte_reader_skip (&reader, array_count * array_item_size)) + goto out; + continue; + } + if (!HANDLE_AS_ST2038) { /* Skip over anything that is not 8 bit VANC */ if (payload_sample_coding != 4 && payload_sample_coding != 5 && payload_sample_coding != 6) { - if (!gst_byte_reader_skip (&reader, array_count * array_item_size)) + if (!gst_byte_reader_skip (&reader, array_count)) goto out; continue; } } - if (gst_byte_reader_get_remaining (&reader) < array_count * array_item_size) + if (gst_byte_reader_get_remaining (&reader) < array_count) goto out;
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/gst/videoparsers/gstav1parse.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/gst/videoparsers/gstav1parse.c
Changed
@@ -899,7 +899,7 @@ } /* prefer TU alignment with obu-stream format as the default */ - if (gst_av1_parse_caps_has_tu_alignment (self, caps)) { + if (caps && gst_av1_parse_caps_has_tu_alignment (self, caps)) { self->align = GST_AV1_PARSE_ALIGN_TEMPORAL_UNIT; self->stream_format = GST_AV1_PARSE_STREAM_FORMAT_OBU; goto done;
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/gst/videoparsers/gsth263parse.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/gst/videoparsers/gsth263parse.c
Changed
@@ -236,8 +236,9 @@ /* Caps didn't have the framerate - get it from params */ gst_h263_parse_get_par (params, &par_num, &par_denom); } - gst_caps_set_simple (caps, "pixel-aspect-ratio", GST_TYPE_FRACTION, - par_num, par_denom, NULL); + if (par_denom != 0) + gst_caps_set_simple (caps, "pixel-aspect-ratio", GST_TYPE_FRACTION, + par_num, par_denom, NULL); if (h263parse->state == GOT_HEADER) { gst_caps_set_simple (caps,
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/gst/videoparsers/gstpngparse.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/gst/videoparsers/gstpngparse.c
Changed
@@ -110,8 +110,6 @@ { gboolean res; - res = GST_BASE_PARSE_CLASS (parent_class)->sink_event (parse, event); - switch (GST_EVENT_TYPE (event)) { case GST_EVENT_FLUSH_STOP: /* the start code and at least 2 empty frames (IHDR and IEND) */ @@ -121,6 +119,8 @@ break; } + res = GST_BASE_PARSE_CLASS (parent_class)->sink_event (parse, event); + return res; }
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/gst/videoparsers/h263parse.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/gst/videoparsers/h263parse.c
Changed
@@ -297,7 +297,7 @@ if (!gst_bit_reader_get_bits_uint32 (&br, &epar, 16)) goto more; params->parnum = epar >> 8; - params->pardenom = epar & 0xf; + params->pardenom = epar & 0xff; } else { params->parnum = partabletemp80; params->pardenom = partabletemp81;
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/meson.build -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/meson.build
Changed
@@ -1,8 +1,9 @@ project('gst-plugins-bad', 'c', 'cpp', - version : '1.28.2', + version : '1.28.3', meson_version : '>= 1.4', default_options : 'warning_level=1', - 'buildtype=debugoptimized' ) + 'buildtype=debugoptimized', + 'c_std=gnu11,c11' ) gst_version = meson.project_version() version_arr = gst_version.split('.')
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/po/gst-plugins-bad-1.0.pot -> _service:download_files:gst-plugins-bad-1.28.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.28.2\n" +"Project-Id-Version: gst-plugins-bad-1.28.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-04-07 20:03+0100\n" +"POT-Creation-Date: 2026-05-11 18:28+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" @@ -89,7 +89,7 @@ msgstr "" #: gst-libs/gst/adaptivedemux/gstadaptivedemux.c:4102 -#: gst/mpegtsdemux/mpegtsbase.c:1799 +#: gst/mpegtsdemux/mpegtsbase.c:1803 msgid "Internal data stream error." msgstr ""
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/po/gst-plugins-bad.pot -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/po/gst-plugins-bad.pot
Changed
@@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: gst-plugins-bad-1.28.2\n" +"Project-Id-Version: gst-plugins-bad-1.28.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-04-07 20:03+0100\n" +"POT-Creation-Date: 2026-05-11 18:28+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" @@ -89,7 +89,7 @@ msgstr "" #: gst-libs/gst/adaptivedemux/gstadaptivedemux.c:4102 -#: gst/mpegtsdemux/mpegtsbase.c:1799 +#: gst/mpegtsdemux/mpegtsbase.c:1803 msgid "Internal data stream error." msgstr ""
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/release-notes-1.28.md -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/release-notes-1.28.md
Changed
@@ -2,11 +2,11 @@ GStreamer 1.28.0 was originally released on 27 January 2026. -The latest bug-fix release in the stable 1.28 series is 1.28.2(#1.28.2) and was released on 07 April 2026. +The latest bug-fix release in the stable 1.28 series is 1.28.3(#1.28.3) and was released on 11 May 2026. See https://gstreamer.freedesktop.org/releases/1.28/latest for the latest version of this document. -*Last updated: Tuesday 07 April 2026, 12:30 UTC (log)gitlog* +*Last updated: Monday 11 May 2026, 16:00 UTC (log)gitlog* latest: https://gstreamer.freedesktop.org/releases/1.28/ gitlog: https://gitlab.freedesktop.org/gstreamer/www/commits/main/src/htdocs/releases/1.28/release-notes-1.28.md @@ -1942,7 +1942,251 @@ #### List of merge requests and issues fixed in 1.28.2 - List of Merge Requests applied in 1.28.2(https://gitlab.freedesktop.org/groups/gstreamer/-/merge_requests?scope=all&utf8=%E2%9C%93&state=merged&milestone_title=1.28.2) -- List of Issues fixed in 1.28.2(https://gitlab.freedesktop.org/groups/gstreamer/-/issues?scope=all&utf8=%E2%9C%93&state=closed&milestone_title=1.28.2) +- List of Issues fixed in 1.28.2(https://gitlab.freedesktop.org/groups/gstreamer/-/work_items?sort=created_date&state=closed&milestone_title=1.28.2) + +<a id="1.28.3"></a> + +### 1.28.3 + +The third 1.28 bug-fix release (1.28.3) was released on 11 May 2026. + +This release only contains bugfixes and important security fixessecurity. +It *should* be safe to update from 1.28.x and we recommend you do so at your +earliest convenience. + +security: https://gstreamer.freedesktop.org/security/ + +#### Highlighted bugfixes in 1.28.3 + + - Various security fixessecurity and playback fixes + - applemedia: vtdec stability, MoltenVK integration and planar video format handling fixes + - audioresample: Fix regression on armv7hf + - bpmdetect: Fixes for stereo and multi-channel modes + - devicemonitor: wait for start thread to finish when listing devices so all the info is there for e.g. v4l2 provider + - fallbacksrc: Add fallback-source and enable-dummy properties + - nvidia: fix cudaconvert performance regression and nvdec device creation regression + - opengl: add GBRA swizzle support, and fix glcolorconvert vertical flip issue on crop + - rtspsrc: include user-agent property in HTTP tunnel requests and fix mikey regression + - threadshare: add leaky mode to dataqueue-based elements + - v4l2: fix negotiation error when trying to force stateful decoders to output dmabufs + - webrtcsink: Add support imx8mp vpuenc_hevc hardware H.265 encoder + - cerbero: Extend gst-plugins-rs melding to Darwin platforms for smaller binary sizes and static linking improvements + - inno Windows installer fixes, including silent install mode via the command line + - macOS: provide script to allow uninstalling the package; relocate absolute paths to Python.framework in wheels + - Various bug fixes, build fixes, memory leak fixes, and other stability and reliability improvements + +#### gstreamer + + - pad: fix potential buffer leak in get_range_failed error handler(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11284) + - aggregator: Fix documentation(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11488) + - allocator: Use g_try_malloc() instead of g_malloc() for sysmem(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11569) + - baseparse: Fix memory leak when subclass returns error(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11567) + - bitwriter: Allow unsetting set bits when overwriting them(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11471) + - devicemonitor: Wait for start thread to finish when listing devices(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11554) + - streams: Add METADATA to the valid stream flags for serialization(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11566) + - value: On buffer deserialization errors first unmap the buffer and then unref it(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11590) + - gst-inspect-1.0: type for string caps fields should be 'string' not 'gchararray'(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11460) + +#### gst-plugins-base + + - appsink, appsrc: Allow passing NULL callbacks(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11431) + - appsrc: Fix dropped counting with bufferlist(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11312) + - audioaggregator: Don't drop pending input buffers on sinkpads on srcpad caps changes(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11483) + - audioaggregator: Don't reset samples_per_buffer unless sample rate / output-buffer-duration has changed(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11487) + - audioaggregator: Don't try converting buffers on caps changes if impossible(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11479) + - audioresample: Fix extra samples produced at speech-to-silence transitions(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11439) + - audio-resampler-neon: fix Thumb encoding and use Clang O2 calculation for strides(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11491) + - audio sounds strange on release 1.28.2 for armv7hf(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5075) + - decodebin2: fix leak of endpads list on shutdown while exposing(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11470) + - discoverer: Take the DISCO_LOCK while parsing stream topology(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11539) + - exiftag: Use a hashtable instead of a linked list for storing the pending tags(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11364) + - gl: add GBRA swizzle support(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11422) + - id3v2: Add input validation and refactor id3v2_ununsync_data(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11320) + - id3v2: Check valid frame sizes more(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11380) + - opengl: Fix glcolorconvert vertical flip issue on crop(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11413) + - glcolorconvert: GBRA input hits unreachable swizzle path(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5060) + - subparse / samiparse: Various robustness fixes and minor other fixes.(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11362) + - subparse: Fix memory leakage for text colour and background colour(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11359) + - subparse: O(N^2) complexity in SAMI parser causes timeout with crafted large input(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5046) + - tag: Prevent ubsan and wrong fraction usage(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11293) + - tag: Off-by-one checking for id3v2 unnsync tag parsing(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5049) + - video: add precondition check on dma helpers(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11451) + - videodmabufpool: Break ref cycle between the pool and its thread(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11337) + +#### gst-plugins-good + + - adaptivedemux/hlsdemux assertions / fixes(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11572) + - avidemux: Fix divide by zero if VPRP contains fields==0(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11305) + - avidemux: Divide-by-Zero in vprp parser(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5027) + - isomp4: Fix memory leak when file is corrupted(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11564) + - isomp4: qtdemux: Add bounds checks for ESDS descriptors(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11382) + - matroska: Fix wrong object type bug(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11561) + - qml6glsink: Fix redraw issues on buffer change(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11338) + - qtdemux: Check for minimum stride requirements and width/height constraints with uncompressed video(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11591) + - rtspsrc: mki is optional upon crypto update(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11448) + - rtspsrc: mikey without mki failure(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5050) + - rtspsrc: include user-agent property in HTTP tunnel requests(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11286) + - v4l2: object: Fix caps filtering in caps negotiation(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11288) + - v4l2transform: release input buffers earlier(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11368) + - wavparse: Remove assertion about upstream file size(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11506) + - wavparse: recover from invalid av_bps instead of failing(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11331) + - wavparse: Assert and execute an integer overflow on invalid duration(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5077) + - Require C std gnu11 or c11, remove custom 'restrict' definition, fixing build with Qt 6.11(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11563) + +#### gst-plugins-bad + + - ajasink: Correctly set reference source(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11309) + - analytics: fix meta transform function for copy cases(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11476) + - android: an AMC video decoder is always found, fix decoding of constrained-baseline files(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11551) + - androidmedia: Free element name after use for logging(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11573) + - applemedia: Don't expose unsupported formats for Vulkan/GL(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11498) + - applemedia: Fix MoltenVK usage with vtdec-imported textures(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11285) + - applemedia: Fix test instability and nofork issues(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11461) + - applemedia: Require Xcode 12.4 for all builds(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11369) + - applemedia: fix planar CoreVideo buffer plane offsets(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11432) + - applemedia: Unable to build on MacOS 12 1.28.1(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/4941) + - av1parse: Fix null pointer deference(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11529) + - bpmdetect: Fix calculation of number of samples for >1 channels(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11297) + - codecparsers: Stack Buffer Overflow in H.265 Buffering Period SEI Parser(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5036) + - cudaconvert: fix performance regression caused by double precision floating point constants(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11400) + - decklink: Fix various refcount issues and related leaks(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11558) + - h263parse: Fix wrong ratio masking(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11537) + - h263parse: Missing handling of reserved invalid EPAR_D value(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11535) + - h265parser: use sub-layer 0 CPB count in buffering_period SEI loops(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11339) + - h266parser: Add missing clearing function for H266 SEI message(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11571) + - h266parser: Avoid out-of-bounds write when parsing PPS tile slices(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11588) + - mpegdemux: Add various bounds checks related to PES header parsing(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11587) + - interlace: Revert "Drop framerate from query caps of sinkpad"(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11428) + - mpegtsdemux: Various fixes(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11454) + - mpegtspacketizer: Avoid potential overflow(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11307) + - mse: Also disable the library if the meson option is disabled(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11473) + - mxf: Fix multiple writing / parsing issues when handling VANC packets(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11592) + - mxfdemux: Fix reverse temporal offsets array upper bounds check(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11589) + - mxfmux: aes-bwf: Use correct size when serializing user data / channel status mode(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11345) + - mxf: Theoretical heap Buffer Overflow in MXF AES3 Audio Descriptor write_tags(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5037) + - nvcodec: Fix missing adapter-luid when loading decoders(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11329) + - nvdec regression in 1.28.2: "Couldn't create new device with adapter luid 0"(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5031) + - pngparse: Fix Use-after-free bug(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11531) + - qml6d3d11sink: Clear texture on Paused-to-Ready transition(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11520) + - qt6d3d11: fix null check in SetForceAspectRatio()(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11575) + - tsdemux: Fix parsing of PES ESCR and following PES header fields(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11324) + - tsdemux: Fix segfault when trying to handle SCTE-35 with incorrect program specified(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11294) + - va: do not post error message when push fails(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11504) + - vkupload/vkdownload: Fix possible corrupted image due to mismatched stride/padding(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11387) + - vtdec: Avoid blocking decoder output callback(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11430) + - vtdec: Avoid locking up during a decoder reset(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11395) + - vtdec: deadlock when restarting pipeline(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5029) + - vtdec: fix deadlock when restarting pipeline(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11343) + - webrtc: take ownership of src_bin and sink_bin and don't leak error message(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11420) + - Require C std gnu11 or c11, remove custom 'restrict' definition, fixing build with Qt 6.11(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11563) + +#### gst-plugins-ugly + + - No changes + +#### GStreamer Rust plugins + + - fallbacksrc: Add fallback-source and enable-dummy properties(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3017) + - isobmff: Change caps updates in test to not be delayed(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3041) + - quinn: Disable tests which were flaky(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3030) + - quinnwtsrc/sink: Fix session close(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3034) + - rtpbin2: examples: fix audio resyncs, stream offsets and frame drops(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3029) + - rtprecv: extend jitter accounted for(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3019) + - threadshare: add leaky mode to dataqueue-based elements(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3036) + - tracers: feature gate remaining PluginAPIFlags makers behind doc(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3013) + - webrtcsink: actually allow custom signaller to be set(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3043) + - webrtcsink: Adding imx8mp vpuenc_hevc support for 265(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3044) + - Switch from `std::os::raw` to `std::ffi` for C types(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3011) + - Update dependencies(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3021) + - all: address clippy 1.95.0 suggestions(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3037) + - Fix new 1.95 clippy warnings(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3048) + +#### gst-libav + + - No changes + +#### gst-rtsp-server + + - No changes + +#### gstreamer-sharp + + - No changes + +#### gst-python + + - No changes + +#### gst-editing-services + + - Plug memory leaks reported running valgrind on our testsuite(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11284) + - Fix use-after-free in GESUriSource decodebin callbacks(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11375) + - Fix use-after-free in structured-interface and asset cache(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11349) +
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/sys/aja/gstajasink.cpp -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/sys/aja/gstajasink.cpp
Changed
@@ -803,7 +803,7 @@ } GST_DEBUG_OBJECT(self, "Configuring reference source %d", (int)reference_source); - self->device->device->SetFramePulseReference(reference_source); + self->device->device->SetReference(reference_source); self->device->device->DMABufferAutoLock(false, true, 0);
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/sys/androidmedia/gstamc.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/sys/androidmedia/gstamc.c
Changed
@@ -200,18 +200,18 @@ goto next_codec; } - GST_INFO ("Checking codec '%s'", name_str); + GST_LOG ("Checking codec '%s'", name_str); /* Compatibility codec names */ if (strcmp (name_str, "AACEncoder") == 0 || strcmp (name_str, "OMX.google.raw.decoder") == 0) { - GST_INFO ("Skipping compatibility codec '%s'", name_str); + GST_LOG ("Skipping compatibility codec '%s'", name_str); valid_codec = FALSE; goto next_codec; } if (g_str_has_suffix (name_str, ".secure")) { - GST_INFO ("Skipping DRM codec '%s'", name_str); + GST_LOG ("Skipping DRM codec '%s'", name_str); valid_codec = FALSE; goto next_codec; } @@ -223,14 +223,14 @@ */ if (gst_amc_jni_is_vm_started () && !g_str_has_prefix (name_str, "OMX.google.")) { - GST_INFO ("Skipping non-Google codec '%s' in standalone mode", name_str); + GST_LOG ("Skipping non-Google codec '%s' in standalone mode", name_str); valid_codec = FALSE; goto next_codec; } #endif if (g_str_has_prefix (name_str, "OMX.ARICENT.")) { - GST_INFO ("Skipping possible broken codec '%s'", name_str); + GST_LOG ("Skipping possible broken codec '%s'", name_str); valid_codec = FALSE; goto next_codec; } @@ -242,7 +242,7 @@ if (strcmp (name_str, "OMX.google.vorbis.decoder") == 0 || strcmp (name_str, "OMX.google.g711.alaw.decoder") == 0 || strcmp (name_str, "OMX.google.g711.mlaw.decoder") == 0) { - GST_INFO ("Skipping known broken codec '%s'", name_str); + GST_LOG ("Skipping known broken codec '%s'", name_str); valid_codec = FALSE; goto next_codec; } @@ -282,7 +282,7 @@ goto next_codec; } - GST_INFO ("Codec '%s' (%s) has %" G_GSIZE_FORMAT " supported types", + GST_LOG ("Codec '%s' (%s) has %" G_GSIZE_FORMAT " supported types", name_str, gst_amc_accel_to_string (gst_codec_info->accel), n_supported_types); @@ -305,7 +305,7 @@ gst_codec_type = &gst_codec_info->supported_typesj; supported_type_str = supported_typesj; - GST_INFO ("Supported type '%s'", supported_type_str); + GST_LOG ("Supported type '%s'", supported_type_str); gst_codec_type->mime = g_strdup (supported_type_str); capabilities = @@ -330,7 +330,7 @@ } for (k = 0; k < gst_codec_type->n_color_formats; k++) { - GST_INFO ("Color format %d: 0x%x", k, + GST_LOG ("Color format %d: 0x%x", k, gst_codec_type->color_formatsk); } @@ -361,9 +361,9 @@ } for (k = 0; k < gst_codec_type->n_profile_levels; k++) { - GST_INFO ("Level %d: 0x%08x", k, + GST_LOG ("Level %d: 0x%08x", k, gst_codec_type->profile_levelsk.level); - GST_INFO ("Profile %d: 0x%08x", k, + GST_LOG ("Profile %d: 0x%08x", k, gst_codec_type->profile_levelsk.profile); } @@ -610,14 +610,14 @@ if (color_format == COLOR_FormatYCbYCr) { if (strcmp (codec_info->name, "OMX.k3.video.decoder.avc") == 0) { - GST_INFO + GST_LOG ("OMX.k3.video.decoder.avc: COLOR_FormatYCbYCr is actually GST_VIDEO_FORMAT_NV12."); return GST_VIDEO_FORMAT_NV12; } /* FIXME COLOR_FormatYCbYCr doesn't work properly for OMX.k3.video.encoder.avc temporarily. */ if (strcmp (codec_info->name, "OMX.k3.video.encoder.avc") == 0) { - GST_INFO + GST_FIXME ("OMX.k3.video.encoder.avc: COLOR_FormatYCbYCr is not supported yet."); return GST_VIDEO_FORMAT_UNKNOWN; } @@ -628,7 +628,7 @@ if (color_format == COLOR_FormatYUV420SemiPlanar) { if (strcmp (codec_info->name, "OMX.k3.video.encoder.avc") == 0) { - GST_INFO + GST_LOG ("OMX.k3.video.encoder.avc: COLOR_FormatYUV420SemiPlanar is actually GST_VIDEO_FORMAT_NV21."); return GST_VIDEO_FORMAT_NV21; } @@ -661,7 +661,7 @@ if (video_format == GST_VIDEO_FORMAT_NV12) { if (strcmp (codec_info->name, "OMX.k3.video.decoder.avc") == 0) { - GST_INFO + GST_LOG ("OMX.k3.video.decoder.avc: GST_VIDEO_FORMAT_NV12 is reported as COLOR_FormatYCbYCr."); return COLOR_FormatYCbYCr; @@ -670,7 +670,7 @@ if (video_format == GST_VIDEO_FORMAT_NV21) { if (strcmp (codec_info->name, "OMX.k3.video.encoder.avc") == 0) { - GST_INFO + GST_LOG ("OMX.k3.video.encoder.avc: GST_VIDEO_FORMAT_NV21 is reported as COLOR_FormatYUV420SemiPlanar."); return COLOR_FormatYUV420SemiPlanar; @@ -1780,6 +1780,7 @@ GType type, subtype; gchar *type_name, *element_name; guint rank; + GstCaps *caps; GstAmcCodecType *codec_type = &codec_info->supported_typesi; if (g_str_has_prefix (codec_type->mime, "audio/")) { @@ -1910,10 +1911,24 @@ } ret |= gst_element_register (plugin, element_name, rank, subtype); - g_free (element_name); - GST_INFO ("Registered %s codec '%s' with rank %u", - gst_amc_accel_to_string (codec_info->accel), codec_info->name, rank); + if (codec_info->is_encoder) { + gst_amc_codec_info_to_caps (codec_info, NULL, &caps); + GST_INFO + ("Registered encoder %s for %s impl %s with rank %u and outcaps %" + GST_PTR_FORMAT, element_name, + gst_amc_accel_to_string (codec_info->accel), codec_info->name, rank, + caps); + } else { + gst_amc_codec_info_to_caps (codec_info, &caps, NULL); + GST_INFO + ("Registered decoder %s for %s impl %s with rank %u and incaps %" + GST_PTR_FORMAT, element_name, + gst_amc_accel_to_string (codec_info->accel), codec_info->name, rank, + caps); + } + gst_caps_unref (caps); + g_free (element_name); } } @@ -2329,6 +2344,8 @@ } else if (strcmp (type->mime, "video/avc") == 0) { gint j; gboolean have_profile_level = FALSE; + gboolean have_baseline_profile = FALSE; + gboolean have_constrained_baseline_profile = FALSE; tmp = gst_structure_new ("video/x-h264", "width", GST_TYPE_INT_RANGE, 16, 4096, @@ -2353,6 +2370,12 @@ continue; } + if (type->profile_levelsj.profile == + AVCProfileConstrainedBaseline) + have_constrained_baseline_profile = TRUE; + else if (type->profile_levelsj.profile == AVCProfileBaseline) + have_baseline_profile = TRUE; + tmp2 = gst_structure_copy (tmp); gst_structure_set (tmp2, "profile", G_TYPE_STRING, profile, NULL); @@ -2360,8 +2383,9 @@ tmp3 = gst_structure_copy (tmp); gst_structure_set (tmp3, "profile", G_TYPE_STRING, alternative, NULL); - } else + } else { tmp3 = NULL; + } if (codec_info->is_encoder) { const gchar *level;
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/sys/androidmedia/gstamcvideoenc.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/sys/androidmedia/gstamcvideoenc.c
Changed
@@ -285,18 +285,10 @@ } /* On Android N_MR1 and higher, i-frame-interval can be a float value */ - if (gst_amc_get_android_level () >= 25) { - GST_LOG_OBJECT (encoder, "Setting i-frame-interval to %f", - encoder->i_frame_int); - gst_amc_format_set_float (format, "i-frame-interval", encoder->i_frame_int, - &err); - } else { - int i_frame_int = encoder->i_frame_int; - /* Round a fractional interval to 1 per sec on older Android */ - if (encoder->i_frame_int > 0 && encoder->i_frame_int < 1.0) - i_frame_int = 1; - gst_amc_format_set_int (format, "i-frame-interval", i_frame_int, &err); - } + GST_LOG_OBJECT (encoder, "Setting i-frame-interval to %f", + encoder->i_frame_int); + gst_amc_format_set_float (format, "i-frame-interval", encoder->i_frame_int, + &err); if (err) GST_ELEMENT_WARNING_FROM_ERROR (encoder, err);
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/sys/applemedia/avfdeviceprovider.m -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/sys/applemedia/avfdeviceprovider.m
Changed
@@ -86,7 +86,11 @@ g_free (model_id); #if !TARGET_OS_WATCH - if (__builtin_available (macos 10.9, ios 14.0, tvos 17.0, visionos 2.1, *)) { +#if MAC_OS_X_VERSION_MAX_ALLOWED < 140000 + if (__builtin_available (macOS 10.9, iOS 14.0, tvOS 17.0, *)) { +#else + if (__builtin_available (macOS 10.9, iOS 14.0, tvOS 17.0, visionOS 2.1, *)) { +#endif char *manufacturer = g_strdup (device manufacturer UTF8String); gst_structure_set (props, "avf.manufacturer", G_TYPE_STRING, manufacturer,
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/sys/applemedia/avsamplevideosink.m -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/sys/applemedia/avsamplevideosink.m
Changed
@@ -753,17 +753,12 @@ _request_data (av_sink); g_mutex_unlock (&av_sink->render_lock); -#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && \ - MAC_OS_X_VERSION_MAX_ALLOWED >= 1010 && \ - defined(MAC_OS_X_VERSION_MIN_REQUIRED) && \ - MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - AVSampleBufferDisplayLayer *layer = GST_AV_SAMPLE_VIDEO_SINK_LAYER(av_sink); + AVSampleBufferDisplayLayer *layer = GST_AV_SAMPLE_VIDEO_SINK_LAYER(av_sink); if (layer status == AVQueuedSampleBufferRenderingStatusFailed) { GST_ERROR_OBJECT (av_sink, "failed to enqueue buffer on layer, %s", layer error description UTF8String); return GST_FLOW_ERROR; } -#endif return ret; }
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/sys/applemedia/corevideobuffer.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/sys/applemedia/corevideobuffer.c
Changed
@@ -30,7 +30,7 @@ #include "videotexturecache-gl.h" -#if defined(APPLEMEDIA_MOLTENVK) +#ifdef APPLEMEDIA_MOLTENVK #include "videotexturecache-vulkan.h" #if TARGET_OS_OSX #include "iosurfacevulkanmemory.h" @@ -133,7 +133,7 @@ #endif } -#if defined(APPLEMEDIA_MOLTENVK) +#ifdef APPLEMEDIA_MOLTENVK /* in videotexturecache-vulkan.m to avoid objc-ism from Metal being included * in a non-objc file */ extern GstMemory *_create_vulkan_memory (GstAppleCoreVideoPixelBuffer * gpixbuf, @@ -153,7 +153,7 @@ GstAppleCoreVideoPixelBuffer *gpixbuf; GstMemory *mem = NULL; gboolean do_gl = GST_IS_VIDEO_TEXTURE_CACHE_GL (cache); -#if defined(APPLEMEDIA_MOLTENVK) +#ifdef APPLEMEDIA_MOLTENVK gboolean do_vulkan = GST_IS_VIDEO_TEXTURE_CACHE_VULKAN (cache); #endif @@ -163,22 +163,20 @@ *has_padding = FALSE; if (CVPixelBufferIsPlanar (pixel_buf)) { - gint i, size = 0, plane_offset = 0; + gint size = 0; n_planes = CVPixelBufferGetPlaneCount (pixel_buf); - for (i = 0; i < n_planes; i++) { + for (gint i = 0; i < n_planes; i++) { stridei = CVPixelBufferGetBytesPerRowOfPlane (pixel_buf, i); if (stridei != GST_VIDEO_INFO_PLANE_STRIDE (info, i) && has_padding) *has_padding = TRUE; size = stridei * CVPixelBufferGetHeightOfPlane (pixel_buf, i); - offseti = plane_offset; - plane_offset += size; if (do_gl) mem = _create_glmem (gpixbuf, info, i, size, cache); -#if defined(APPLEMEDIA_MOLTENVK) +#ifdef APPLEMEDIA_MOLTENVK else if (do_vulkan) mem = _create_vulkan_memory (gpixbuf, info, i, size, cache); #endif @@ -186,6 +184,7 @@ mem = GST_MEMORY_CAST (gst_apple_core_video_memory_new_wrapped (gpixbuf, i, size)); + offseti = gst_buffer_get_size (buf); gst_buffer_append_memory (buf, mem); } } else { @@ -196,7 +195,7 @@ if (do_gl) mem = _create_glmem (gpixbuf, info, 0, size, cache); -#if defined(APPLEMEDIA_MOLTENVK) +#ifdef APPLEMEDIA_MOLTENVK else if (do_vulkan) mem = _create_vulkan_memory (gpixbuf, info, 0, size, cache); #endif
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/sys/applemedia/helpers.h -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/sys/applemedia/helpers.h
Changed
@@ -26,17 +26,21 @@ // kCVPixelFormatType_64RGBALE is only available for 11.3 +. // See https://developer.apple.com/documentation/corevideo/1563591-pixel_format_identifiers/kcvpixelformattype_64rgbale -#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED < 110300 +#if MAC_OS_X_VERSION_MAX_ALLOWED < 110300 #define kCVPixelFormatType_64RGBALE 'l64r' #endif #define GST_APPLEMEDIA_HAVE_64RGBALE __builtin_available(macOS 11.3, *) -// kCMVideoCodecType_AV1 is only available for M3 series or later -// The actual FourCC value for AV1 is 'av01' -#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED < 130100 +// Added in Xcode 14 +#if MAC_OS_X_VERSION_MAX_ALLOWED < 130100 #define kCMVideoCodecType_AV1 'av01' #endif +// Added in Xcode 12 +#if MAC_OS_X_VERSION_MAX_ALLOWED < 110000 +#define kCMVideoCodecType_VP9 'vp09' +#endif + #define GST_CVPIXELFORMAT_FOURCC_ARGS(fourcc) \ __GST_PRINT_CHAR(((fourcc) >> 24) & 0xff), \ __GST_PRINT_CHAR(((fourcc) >> 16) & 0xff), \
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/sys/applemedia/iosurfacevulkanmemory.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/sys/applemedia/iosurfacevulkanmemory.c
Changed
@@ -23,6 +23,7 @@ #endif #include "iosurfacevulkanmemory.h" +#include <vulkan/vulkan_metal.h> #include "metal-helpers.h" GST_DEBUG_CATEGORY_STATIC (GST_CAT_IO_SURFACE_VULKAN_MEMORY); @@ -43,8 +44,10 @@ static void _mem_free (GstAllocator * allocator, GstMemory * mem) { - gst_io_surface_vulkan_memory_set_surface ((GstIOSurfaceVulkanMemory *) mem, - NULL); + GstIOSurfaceVulkanMemory *io_surface_mem = (GstIOSurfaceVulkanMemory *) mem; + if (io_surface_mem && io_surface_mem->surface) { + IOSurfaceDecrementUseCount (io_surface_mem->surface); + } GST_ALLOCATOR_CLASS (gst_io_surface_vulkan_memory_allocator_parent_class)->free (allocator, @@ -140,12 +143,13 @@ static GstIOSurfaceVulkanMemory * _io_surface_vulkan_memory_new (GstVulkanDevice * device, IOSurfaceRef surface, - unsigned int /* MTLPixelFormat */ fmt, GstVideoInfo * info, guint plane, - gpointer user_data, GDestroyNotify notify) + unsigned int /* MTLPixelFormat */ fmt, gpointer metal_texture, + GstVideoInfo * info, guint plane, gpointer user_data, GDestroyNotify notify) { GstIOSurfaceVulkanMemory *mem; GstAllocationParams params = { 0, }; VkImageCreateInfo image_info; + VkImportMetalTextureInfoEXT import_texture_info; VkPhysicalDevice gpu; VkImageUsageFlags usage; VkImageTiling tiling = VK_IMAGE_TILING_OPTIMAL; @@ -163,9 +167,17 @@ VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT; /* *INDENT-OFF* */ + import_texture_info = (VkImportMetalTextureInfoEXT) { + .sType = VK_STRUCTURE_TYPE_IMPORT_METAL_TEXTURE_INFO_EXT, + .pNext = NULL, + .plane = VK_IMAGE_ASPECT_COLOR_BIT, + .mtlTexture = metal_texture, + }; + + /* *INDENT-OFF* */ image_info = (VkImageCreateInfo) { .sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, - .pNext = NULL, + .pNext = metal_texture ? &import_texture_info : NULL, .flags = 0, .imageType = VK_IMAGE_TYPE_2D, .format = vk_format, @@ -210,9 +222,10 @@ GST_MINI_OBJECT_FLAG_SET (mem, GST_MEMORY_FLAG_READONLY); - mem->surface = NULL; + mem->surface = surface; + if (surface) + IOSurfaceIncrementUseCount (surface); mem->plane = plane; - gst_io_surface_vulkan_memory_set_surface (mem, surface); return mem; @@ -235,8 +248,9 @@ GstIOSurfaceVulkanMemory * gst_io_surface_vulkan_memory_wrapped (GstVulkanDevice * device, IOSurfaceRef surface, unsigned int /* MTLPixelFormat */ fmt, + gpointer metal_texture, GstVideoInfo * info, guint plane, gpointer user_data, GDestroyNotify notify) { - return _io_surface_vulkan_memory_new (device, surface, fmt, info, plane, - user_data, notify); + return _io_surface_vulkan_memory_new (device, surface, fmt, metal_texture, + info, plane, user_data, notify); }
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/sys/applemedia/iosurfacevulkanmemory.h -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/sys/applemedia/iosurfacevulkanmemory.h
Changed
@@ -55,6 +55,7 @@ gst_io_surface_vulkan_memory_wrapped (GstVulkanDevice * device, IOSurfaceRef surface, unsigned int fmt, /* MTLPixelFormat */ + gpointer metal_texture, GstVideoInfo * info, guint plane, gpointer user_data,
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/sys/applemedia/meson.build -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/sys/applemedia/meson.build
Changed
@@ -84,6 +84,14 @@ subdir_done() endif +if cc.get_define('MAC_OS_X_VERSION_MAX_ALLOWED', prefix: '#include <AvailabilityMacros.h>').to_int() < 110000 + if applemedia_option.enabled() + error('applemedia plugin needs Xcode 12.4 or newer') + endif + warning('Disabling applemedia plugin: needs Xcode 12.4 or newer') + subdir_done() +endif + objc = meson.get_compiler('objc') if not objc.has_argument('-fobjc-arc') error('ARC is required for building')
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/sys/applemedia/metal-helpers.h -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/sys/applemedia/metal-helpers.h
Changed
@@ -37,8 +37,5 @@ gsize size, GstVideoTextureCache * cache); -void gst_io_surface_vulkan_memory_set_surface (GstIOSurfaceVulkanMemory * memory, - IOSurfaceRef surface); - G_END_DECLS #endif /* _APPLEMEDIA_METAL_HELPERS_H_ */
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/sys/applemedia/videotexturecache-vulkan.mm -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/sys/applemedia/videotexturecache-vulkan.mm
Changed
@@ -64,11 +64,11 @@ #define GET_PRIV(instance) \ G_TYPE_INSTANCE_GET_PRIVATE (instance, GST_TYPE_VIDEO_TEXTURE_CACHE_VULKAN, GstVideoTextureCacheVulkanPrivate) -typedef struct _IOSTextureWrapper +typedef struct _IOSurfaceTextureWrapper { - CVMetalTextureCacheRef cache; - CVMetalTextureRef texture; -} IOSTextureWrapper; + CVPixelBufferRef pixbuf; + gpointer texture; /* id<MTLTexture> */ +} IOSurfaceTextureWrapper; enum { @@ -79,6 +79,15 @@ static GstMemory * gst_video_texture_cache_vulkan_create_memory (GstVideoTextureCache * cache, GstAppleCoreVideoPixelBuffer *gpixbuf, guint plane, gsize size); +static void +free_texture_wrapper (IOSurfaceTextureWrapper * wrapper) +{ + CFRelease (wrapper->pixbuf); + id<MTLTexture> tex = (__bridge_transfer id<MTLTexture>) wrapper->texture; + (void) tex; + g_free (wrapper); +} + GstVideoTextureCache * gst_video_texture_cache_vulkan_new (GstVulkanDevice * device) { @@ -223,95 +232,42 @@ GstVideoTextureCacheVulkan *cache_vulkan = GST_VIDEO_TEXTURE_CACHE_VULKAN (cache); MTLPixelFormat fmt = (MTLPixelFormat) video_info_to_metal_format (info, plane); + GstVulkanDevice *device = cache_vulkan->device; + VkPhysicalDevice gpu; + id<MTLDevice> mtl_dev = nil; + MTLTextureDescriptor *tex_desc; + id<MTLTexture> texture = nil; + + gpu = gst_vulkan_device_get_physical_device (device); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; + vkGetMTLDeviceMVK (gpu, &mtl_dev); + G_GNUC_END_IGNORE_DEPRECATIONS; + + tex_desc = MTLTextureDescriptor new; + tex_desc.pixelFormat = fmt; + tex_desc.textureType = MTLTextureType2D; + tex_desc.width = GST_VIDEO_INFO_COMP_WIDTH (info, plane); + tex_desc.height = GST_VIDEO_INFO_COMP_HEIGHT (info, plane); + tex_desc.depth = 1; + tex_desc.mipmapLevelCount = 1; + tex_desc.sampleCount = 1; + tex_desc.arrayLength = 1; + tex_desc.usage = MTLTextureUsageShaderRead; + tex_desc.cpuCacheMode = MTLCPUCacheModeDefaultCache; + + texture = mtl_dev newTextureWithDescriptor:tex_desc iosurface:surface plane:plane; + if (!texture) + return NULL; - CFRetain (pixel_buf); - mem = gst_io_surface_vulkan_memory_wrapped (cache_vulkan->device, - surface, fmt, info, plane, pixel_buf, (GDestroyNotify) CFRelease); + IOSurfaceTextureWrapper *texture_data = g_new0 (IOSurfaceTextureWrapper, 1); + texture_data->pixbuf = (CVPixelBufferRef) CFRetain (pixel_buf); + texture_data->texture = (__bridge_retained gpointer) texture; + mem = gst_io_surface_vulkan_memory_wrapped (device, surface, fmt, + (__bridge void *) texture, info, plane, texture_data, + (GDestroyNotify) free_texture_wrapper); if (!mem) - return NULL; + free_texture_wrapper (texture_data); return GST_MEMORY_CAST (mem); } - -typedef struct _IOSurfaceTextureWrapper -{ - CVPixelBufferRef pixbuf; - gpointer texture; /* id<MTLTexture> */ -} IOSurfaceTextureWrapper; - -static void -free_texture_wrapper (IOSurfaceTextureWrapper * wrapper) -{ - CFRelease (wrapper->pixbuf); - id<MTLTexture> tex = (__bridge_transfer id<MTLTexture>) wrapper->texture; - (void) tex; - g_free (wrapper); -} - -static MTLTextureDescriptor * -gst_new_mtl_tex_descripter_from_memory (GstIOSurfaceVulkanMemory * memory) -{ - GstVulkanImageMemory *vk_mem = (GstVulkanImageMemory *) memory; - MTLTextureDescriptor* tex_desc = MTLTextureDescriptor new; - tex_desc.pixelFormat = mvkMTLPixelFormatFromVkFormat (vk_mem->create_info.format); - tex_desc.textureType = mvkMTLTextureTypeFromVkImageType (vk_mem->create_info.imageType, 0, false); - tex_desc.width = vk_mem->create_info.extent.width; - tex_desc.height = vk_mem->create_info.extent.height; - tex_desc.depth = vk_mem->create_info.extent.depth; - tex_desc.mipmapLevelCount = vk_mem->create_info.mipLevels; - tex_desc.sampleCount = mvkSampleCountFromVkSampleCountFlagBits(vk_mem->create_info.samples); - tex_desc.arrayLength = vk_mem->create_info.arrayLayers; - tex_desc.usage = MTLTextureUsageShaderRead | MTLTextureUsagePixelFormatView;//mvkMTLTextureUsageFromVkImageUsageFlags(vk_mem->create_info.usage); - tex_desc.storageMode = MTLStorageModeShared; - tex_desc.cpuCacheMode = MTLCPUCacheModeDefaultCache;//mvkMTLCPUCacheModeFromVkMemoryPropertyFlags(vk_mem->vk_mem->properties); - - return tex_desc; -} - -void -gst_io_surface_vulkan_memory_set_surface (GstIOSurfaceVulkanMemory * memory, - IOSurfaceRef surface) -{ - GstVulkanImageMemory *vk_mem = (GstVulkanImageMemory *) memory; - - if (memory->surface) { - IOSurfaceDecrementUseCount (memory->surface); - } else { - g_assert (vk_mem->notify == (GDestroyNotify) CFRelease); - g_assert (vk_mem->user_data != NULL); - } - - memory->surface = surface; - if (surface) { - id<MTLDevice> mtl_dev = nil; - id<MTLTexture> texture = nil; - VkPhysicalDevice gpu; - - IOSurfaceIncrementUseCount (surface); - - gpu = gst_vulkan_device_get_physical_device (vk_mem->device); - G_GNUC_BEGIN_IGNORE_DEPRECATIONS; - vkGetMTLDeviceMVK (gpu, &mtl_dev); - G_GNUC_END_IGNORE_DEPRECATIONS; - - /* We cannot use vkUseIOSurfaceMVK() for multi-planer as MoltenVK does not - * support them. */ - - MTLTextureDescriptor *tex_desc = gst_new_mtl_tex_descripter_from_memory (memory); - texture = mtl_dev newTextureWithDescriptor:tex_desc iosurface:surface plane:memory->plane; - - IOSurfaceTextureWrapper *texture_data = g_new0 (IOSurfaceTextureWrapper, 1); - texture_data->pixbuf = (CVPixelBufferRef) vk_mem->user_data; - texture_data->texture = (__bridge_retained gpointer) texture; - - G_GNUC_BEGIN_IGNORE_DEPRECATIONS; - VkResult err = vkSetMTLTextureMVK (memory->vulkan_mem.image, texture); - G_GNUC_END_IGNORE_DEPRECATIONS; - GST_DEBUG ("bound texture %p to image %" GST_VULKAN_NON_DISPATCHABLE_HANDLE_FORMAT ": 0x%x", - texture, memory->vulkan_mem.image, err); - - vk_mem->user_data = texture_data; - vk_mem->notify = (GDestroyNotify) free_texture_wrapper; - } -}
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/sys/applemedia/vtdec.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/sys/applemedia/vtdec.c
Changed
@@ -51,6 +51,8 @@ #endif #include <string.h> +#include <stddef.h> +#include <dlfcn.h> #include "vtdec.h" #include <gst/gst.h> #include <gst/base/gstbytewriter.h> @@ -63,13 +65,89 @@ #include "corevideobuffer.h" #include "coremediabuffer.h" #include "videotexturecache-gl.h" -#if defined(APPLEMEDIA_MOLTENVK) + +#ifdef APPLEMEDIA_MOLTENVK +#include <MoltenVK/mvk_private_api.h> #include "videotexturecache-vulkan.h" #endif GST_DEBUG_CATEGORY_STATIC (gst_vtdec_debug_category); #define GST_CAT_DEFAULT gst_vtdec_debug_category +/* Added in Xcode 13 */ +#if MAC_OS_X_VERSION_MAX_ALLOWED < 120000 +#define kVTVideoDecoderReferenceMissingErr -17694 +#endif + +#ifdef APPLEMEDIA_MOLTENVK +/* Temporary MoltenVK-specific warning probe for issue #2705. + * Remove this once GStreamer ships a MoltenVK version containing the fix: + * https://github.com/KhronosGroup/MoltenVK/issues/2705 + */ +static gboolean +gst_vtdec_moltenvk_argument_buffers_enabled (GstVtdec * vtdec) +{ + static const size_t arg_buffers_field_end = offsetof (MVKConfiguration, + useMetalArgumentBuffers) + sizeof (VkBool32); + PFN_vkGetMoltenVKConfigurationMVK get_mvk_config; + MVKConfiguration config; + size_t config_size = sizeof (config); + VkResult result; + + get_mvk_config = + (PFN_vkGetMoltenVKConfigurationMVK) dlsym (RTLD_DEFAULT, + "vkGetMoltenVKConfigurationMVK"); + if (!get_mvk_config) { + get_mvk_config = (PFN_vkGetMoltenVKConfigurationMVK) + gst_vulkan_instance_get_proc_address (vtdec->instance, + "vkGetMoltenVKConfigurationMVK"); + } + if (!get_mvk_config) { + GST_WARNING_OBJECT (vtdec, + "MoltenVK config probe could not resolve vkGetMoltenVKConfigurationMVK"); + return FALSE; + } + + memset (&config, 0, sizeof (config)); + result = get_mvk_config (VK_NULL_HANDLE, &config, &config_size); + if (result != VK_SUCCESS && result != VK_INCOMPLETE) { + GST_WARNING_OBJECT (vtdec, + "MoltenVK configuration query failed with VkResult %d", result); + return FALSE; + } + + if (config_size < arg_buffers_field_end) { + GST_WARNING_OBJECT (vtdec, + "MoltenVK configuration size %zu does not cover useMetalArgumentBuffers", + config_size); + return FALSE; + } + + return config.useMetalArgumentBuffers != VK_FALSE; +} + +static void +gst_vtdec_warn_moltenvk_argument_buffers (GstVtdec * vtdec) +{ + static gsize warned_once = 0; + static const gchar *message = + "vtdec Vulkan output on MoltenVK may lose the device when Metal " + "argument buffers are enabled; workaround: " + "MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS=0; upstream: " + "https://github.com/KhronosGroup/MoltenVK/issues/2705."; + + if (!gst_vtdec_moltenvk_argument_buffers_enabled (vtdec)) + return; + + if (!g_once_init_enter (&warned_once)) + return; + + GST_ELEMENT_WARNING (vtdec, RESOURCE, FAILED, ("%s", message), (NULL)); + + g_once_init_leave (&warned_once, 1); +} +#endif + typedef enum { NoneSupported = 0, @@ -85,10 +163,6 @@ VTDEC_FRAME_FLAG_ERROR = (1 << 12), }; -#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED < 140000) || (defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED < 110000) -#define kCMVideoCodecType_VP9 'vp09' -#endif - static void gst_vtdec_finalize (GObject * object); static gboolean gst_vtdec_start (GstVideoDecoder * decoder); @@ -159,28 +233,24 @@ static SupplementalSupport gst_vtdec_codec_support = NoneSupported; -/* define EnableHardwareAcceleratedVideoDecoder in < 10.9 */ -#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED < 1090 -const CFStringRef - kVTVideoDecoderSpecification_EnableHardwareAcceleratedVideoDecoder = -CFSTR ("EnableHardwareAcceleratedVideoDecoder"); -const CFStringRef - kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder = -CFSTR ("RequireHardwareAcceleratedVideoDecoder"); -#endif +#define VIDEO_SRC_CAPS_NATIVE_FORMATS "{ NV12, AYUV64, ARGB64_BE, P010_10LE }" -#define VIDEO_SRC_CAPS_FORMATS "{ NV12, AYUV64, ARGB64_BE, P010_10LE }" +/* TODO: Add support for more formats to videotexturecache-vulkan/gl. + * VideoToolbox will output most formats with HW-backed buffers, + * but our GL/Vulkan code does not support handling them yet. */ +#define VIDEO_SRC_CAPS_GL_FORMATS "{ NV12 }" +#define VIDEO_SRC_CAPS_VULKAN_FORMATS "{ NV12, BGRA }" #define VIDEO_SRC_CAPS_NATIVE \ GST_VIDEO_CAPS_MAKE_WITH_FEATURES(GST_CAPS_FEATURE_MEMORY_GL_MEMORY,\ - VIDEO_SRC_CAPS_FORMATS) ", " \ - "texture-target = (string) rectangle ;" \ - GST_VIDEO_CAPS_MAKE(VIDEO_SRC_CAPS_FORMATS) + VIDEO_SRC_CAPS_GL_FORMATS) ", " \ + "texture-target = (string) rectangle ;" \ + GST_VIDEO_CAPS_MAKE(VIDEO_SRC_CAPS_NATIVE_FORMATS) -#if defined(APPLEMEDIA_MOLTENVK) +#ifdef APPLEMEDIA_MOLTENVK #define VIDEO_SRC_CAPS \ GST_VIDEO_CAPS_MAKE_WITH_FEATURES(GST_CAPS_FEATURE_MEMORY_VULKAN_IMAGE, \ - VIDEO_SRC_CAPS_FORMATS) ";" VIDEO_SRC_CAPS_NATIVE + VIDEO_SRC_CAPS_VULKAN_FORMATS) ";" VIDEO_SRC_CAPS_NATIVE #else #define VIDEO_SRC_CAPS VIDEO_SRC_CAPS_NATIVE #endif @@ -203,7 +273,8 @@ GstCaps *caps = gst_caps_from_string (VIDEO_SRC_CAPS); /* RGBA64_LE is kCVPixelFormatType_64RGBALE, only available on macOS 11.3+ */ if (GST_APPLEMEDIA_HAVE_64RGBALE) - caps = gst_vtutil_caps_append_video_format (caps, "RGBA64_LE"); + caps = gst_vtutil_caps_append_video_format (caps, "RGBA64_LE", + GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY); gst_element_class_add_pad_template (element_class, gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, caps)); gst_caps_unref (caps); @@ -290,8 +361,12 @@ GST_DEBUG_OBJECT (vtdec, "stop"); + GST_VIDEO_DECODER_STREAM_LOCK (vtdec); gst_vtdec_drain_decoder (GST_VIDEO_DECODER_CAST (vtdec), TRUE); vtdec->downstream_ret = GST_FLOW_FLUSHING; + GST_VIDEO_DECODER_STREAM_UNLOCK (vtdec); + + gst_pad_stop_task (GST_VIDEO_DECODER_SRC_PAD (decoder)); while ((frame = gst_vec_deque_pop_head (vtdec->reorder_queue))) { gst_video_decoder_release_frame (decoder, frame); @@ -299,8 +374,6 @@ gst_vec_deque_free (vtdec->reorder_queue); vtdec->reorder_queue = NULL; - gst_pad_stop_task (GST_VIDEO_DECODER_SRC_PAD (decoder)); - if (vtdec->input_state) gst_video_codec_state_unref (vtdec->input_state); vtdec->input_state = NULL; @@ -326,7 +399,7 @@ gst_buffer_unref (vtdec->av1_sequence_header_obu); vtdec->av1_sequence_header_obu = NULL; -#if defined(APPLEMEDIA_MOLTENVK) +#ifdef APPLEMEDIA_MOLTENVK gst_clear_object (&vtdec->device); gst_clear_object (&vtdec->instance); #endif @@ -347,7 +420,8 @@ g_cond_wait (&vtdec->queue_cond, &vtdec->queue_mutex); } - /* If we're currently draining/flushing, make sure to not pause before we output all the frames */ + /* If we're currently draining/flushing, + * make sure to not pause before we output all the frames */ if (vtdec->pause_task &&
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/sys/applemedia/vtdec.h -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/sys/applemedia/vtdec.h
Changed
@@ -29,7 +29,7 @@ #include <VideoToolbox/VideoToolbox.h> #include "videotexturecache.h" #include "glcontexthelper.h" -#if defined(APPLEMEDIA_MOLTENVK) +#ifdef APPLEMEDIA_MOLTENVK #include <gst/vulkan/vulkan.h> #endif #include <gst/codecparsers/gsth264parser.h> @@ -74,7 +74,7 @@ /* access via g_atomic_int_* */ gboolean require_reset; -#if defined(APPLEMEDIA_MOLTENVK) +#ifdef APPLEMEDIA_MOLTENVK GstVulkanInstance *instance; GstVulkanDevice *device; #endif
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/sys/applemedia/vtenc.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/sys/applemedia/vtenc.c
Changed
@@ -155,30 +155,17 @@ #define CMTIME_TO_GST_CLOCK_TIME(time) time.value / (time.timescale / GST_SECOND) -/* define EnableHardwareAcceleratedVideoEncoder in < 10.9 */ -#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED < 1090 -const CFStringRef - kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder = -CFSTR ("EnableHardwareAcceleratedVideoEncoder"); -const CFStringRef - kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder = -CFSTR ("RequireHardwareAcceleratedVideoEncoder"); -const CFStringRef kVTCompressionPropertyKey_ProfileLevel = -CFSTR ("ProfileLevel"); -const CFStringRef kVTProfileLevel_H264_Baseline_AutoLevel = -CFSTR ("H264_Baseline_AutoLevel"); -#endif - -#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED < 1080 -const CFStringRef kVTCompressionPropertyKey_Quality = CFSTR ("Quality"); -#endif - /* This property key is currently completely undocumented. The only way you can * know about its existence is if Apple tells you. It allows you to tell the * encoder to not preserve alpha even when outputting alpha formats. */ const CFStringRef gstVTCodecPropertyKey_PreserveAlphaChannel = CFSTR ("kVTCodecPropertyKey_PreserveAlphaChannel"); +#if MAC_OS_X_VERSION_MAX_ALLOWED < 130000 +const CFStringRef kVTCompressionPropertyKey_ConstantBitRate = +CFSTR ("ConstantBitrate"); +#endif + enum { PROP_0, @@ -338,10 +325,10 @@ } if (enable_argb) { - caps = gst_vtutil_caps_append_video_format (caps, "ARGB64_BE"); + caps = gst_vtutil_caps_append_video_format (caps, "ARGB64_BE", NULL); /* RGBA64_LE is kCVPixelFormatType_64RGBALE, only available on macOS 11.3+ */ if (GST_APPLEMEDIA_HAVE_64RGBALE) - caps = gst_vtutil_caps_append_video_format (caps, "RGBA64_LE"); + caps = gst_vtutil_caps_append_video_format (caps, "RGBA64_LE", NULL); } #endif gst_element_class_add_pad_template (element_class, @@ -1633,7 +1620,11 @@ self->dump_properties = FALSE; } #if !TARGET_OS_WATCH - if (__builtin_available (ios 8.0, macos 10.9, tvos 10.2, visionos 1.0, *)) { +#if MAC_OS_X_VERSION_MAX_ALLOWED < 140000 + if (__builtin_available (iOS 8.0, macOS 10.9, tvOS 10.2, *)) { +#else + if (__builtin_available (iOS 8.0, macOS 10.9, tvOS 10.2, visionOS 1.0, *)) { +#endif status = VTCompressionSessionPrepareToEncodeFrames (session); if (status != noErr) { GST_ERROR_OBJECT (self, @@ -1774,7 +1765,11 @@ /* * In addition to the OS requirements, CBR also requires Apple Silicon */ +#if MAC_OS_X_VERSION_MAX_ALLOWED < 140000 + if (__builtin_available (macOS 13.0, iOS 16.0, tvOS 16.0, *)) { +#else if (__builtin_available (macOS 13.0, iOS 16.0, tvOS 16.0, visionOS 1.0, *)) { +#endif key = kVTCompressionPropertyKey_ConstantBitRate; } else #endif
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/sys/applemedia/vtutil.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/sys/applemedia/vtutil.c
Changed
@@ -18,15 +18,16 @@ */ #include "vtutil.h" + +#include <dlfcn.h> #include <VideoToolbox/VideoToolbox.h> #include <TargetConditionals.h> #if TARGET_OS_OSX || TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION #define HAVE_SUPPLEMENTAL -#if (TARGET_OS_OSX && __MAC_OS_X_VERSION_MAX_ALLOWED >= 110000) || (TARGET_OS_IOS && __IPHONE_OS_VERSION_MAX_ALLOWED >= 260200) || (TARGET_OS_TV && __TV_OS_VERSION_MAX_ALLOWED >= 260200) || (TARGET_OS_VISION && __VISION_OS_VERSION_MAX_ALLOWED >= 260200) +/* Added in Xcode 12 for macOS and in Xcode 26.2 for iPhone/tvOS/visionOS */ +#if (TARGET_OS_OSX && MAC_OS_X_VERSION_MAX_ALLOWED >= 110000) || __IPHONE_OS_VERSION_MAX_ALLOWED >= 260200 #define HAVE_SUPPLEMENTAL_DEFINITION -#else -#include <dlfcn.h> #endif #endif @@ -148,26 +149,38 @@ } GstCaps * -gst_vtutil_caps_append_video_format (GstCaps * caps, const char *vfmt) +gst_vtutil_caps_append_video_format (GstCaps * caps, const char *vfmt, + const char *features_filter) { - GstStructure *s; - GValueArray *arr; + guint i; GValue val = G_VALUE_INIT; caps = gst_caps_make_writable (caps); - s = gst_caps_get_structure (caps, 0); - gst_structure_get_list (s, "format", &arr); - g_value_init (&val, G_TYPE_STRING); - g_value_set_string (&val, vfmt); - G_GNUC_BEGIN_IGNORE_DEPRECATIONS; - arr = g_value_array_append (arr, &val); - G_GNUC_END_IGNORE_DEPRECATIONS; + + for (i = 0; i < gst_caps_get_size (caps); i++) { + GstCapsFeatures *features; + GstStructure *s; + GValueArray *arr; + + features = gst_caps_get_features (caps, i); + if (features_filter && + (!features || !gst_caps_features_contains (features, features_filter))) + continue; + + s = gst_caps_get_structure (caps, i); + gst_structure_get_list (s, "format", &arr); + + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; + arr = g_value_array_append (arr, &val); + G_GNUC_END_IGNORE_DEPRECATIONS; + + gst_structure_set_list (s, "format", arr); + } g_value_unset (&val); - gst_structure_set_list (s, "format", arr); return caps; } @@ -182,7 +195,11 @@ #ifdef HAVE_SUPPLEMENTAL #ifdef HAVE_SUPPLEMENTAL_DEFINITION +#if MAC_OS_X_VERSION_MAX_ALLOWED < 140000 + if (__builtin_available (macOS 11.0, iOS 26.2, tvOS 26.2, *)) { +#else if (__builtin_available (macOS 11.0, iOS 26.2, tvOS 26.2, visionOS 26.2, *)) { +#endif GST_INFO ("Registering supplemental VideoToolbox decoder by direct call"); VTRegisterSupplementalVideoDecoderIfAvailable (codec_type); return TRUE;
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/sys/applemedia/vtutil.h -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/sys/applemedia/vtutil.h
Changed
@@ -49,7 +49,8 @@ const char * gst_vtutil_codec_type_to_prores_variant (CMVideoCodecType codec_type); GstCaps * gst_vtutil_caps_append_video_format (GstCaps * caps, - const char * vfmt); + const char * vfmt, + const char * features_filter); gboolean gst_vtutil_register_supplemental_decoder (CMVideoCodecType codec_type); G_END_DECLS
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/sys/decklink/gstdecklink.cpp -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/sys/decklink/gstdecklink.cpp
Changed
@@ -1910,8 +1910,10 @@ IDeckLinkDisplayModeIterator *mode_iter; dev->input.device = decklink; + GStreamerDecklinkInputCallback *callback = new GStreamerDecklinkInputCallback (&dev->input); dev->input.input-> - SetCallback (new GStreamerDecklinkInputCallback (&dev->input)); + SetCallback (callback); + callback->Release (); if ((ret = dev->input.input->GetDisplayModeIterator (&mode_iter)) == S_OK) { IDeckLinkDisplayMode *mode; @@ -2334,8 +2336,10 @@ } g_mutex_lock (&input->lock); - input->input->SetVideoInputFrameMemoryAllocator (new - GStreamerDecklinkMemoryAllocator); + GStreamerDecklinkMemoryAllocator *allocator = new GStreamerDecklinkMemoryAllocator(); + input->input->SetVideoInputFrameMemoryAllocator (allocator); + allocator->Release(); + if (is_audio && !input->audiosrc) { input->audiosrc = GST_ELEMENT_CAST (gst_object_ref (src)); g_mutex_unlock (&input->lock);
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/sys/decklink/gstdecklinkvideosink.cpp -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/sys/decklink/gstdecklinkvideosink.cpp
Changed
@@ -628,7 +628,7 @@ { public: GStreamerVideoOutputCallback (GstDecklinkVideoSink * sink) - :IDeckLinkVideoOutputCallback (), m_refcount (0) + :IDeckLinkVideoOutputCallback (), m_refcount (1) { m_sink = GST_DECKLINK_VIDEO_SINK_CAST (gst_object_ref (sink)); g_mutex_init (&m_mutex); @@ -1189,8 +1189,9 @@ } g_mutex_unlock (&self->output->lock); - self->output->output->SetScheduledFrameCompletionCallback (new - GStreamerVideoOutputCallback (self)); + GStreamerVideoOutputCallback *callback = new GStreamerVideoOutputCallback (self); + self->output->output->SetScheduledFrameCompletionCallback (callback); + callback->Release(); if (self->mode == GST_DECKLINK_MODE_AUTO) { BMDPixelFormat f;
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/sys/hip/kernel/converter.cu -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/sys/hip/kernel/converter.cu
Changed
@@ -80,31 +80,31 @@ __device__ inline unsigned char scale_to_2bits (float val) { - return (unsigned short) __float2int_rz (val * 3.0); + return (unsigned short) __float2int_rz (val * 3.0f); } __device__ inline unsigned char scale_to_uchar (float val) { - return (unsigned char) __float2int_rz (val * 255.0); + return (unsigned char) __float2int_rz (val * 255.0f); } __device__ inline unsigned short scale_to_ushort (float val) { - return (unsigned short) __float2int_rz (val * 65535.0); + return (unsigned short) __float2int_rz (val * 65535.0f); } __device__ inline unsigned short scale_to_10bits (float val) { - return (unsigned short) __float2int_rz (val * 1023.0); + return (unsigned short) __float2int_rz (val * 1023.0f); } __device__ inline unsigned short scale_to_12bits (float val) { - return (unsigned short) __float2int_rz (val * 4095.0); + return (unsigned short) __float2int_rz (val * 4095.0f); } __device__ inline unsigned char @@ -112,8 +112,8 @@ { // DstColor' = SrcA * SrcColor + (1 - SrcA) DstColor float src_val = src * src_alpha; - float dst_val = __int2float_rz (dst) / 255.0 * (1.0 - src_alpha); - return scale_to_uchar(clamp(src_val + dst_val, 0, 1.0)); + float dst_val = __int2float_rz (dst) / 255.0f * (1.0f - src_alpha); + return scale_to_uchar(clamp(src_val + dst_val, 0, 1.0f)); } __device__ inline unsigned short @@ -121,8 +121,8 @@ { // DstColor' = SrcA * SrcColor + (1 - SrcA) DstColor float src_val = src * src_alpha; - float dst_val = __int2float_rz (dst) / 65535.0 * (1.0 - src_alpha); - return scale_to_ushort(clamp(src_val + dst_val, 0, 1.0)); + float dst_val = __int2float_rz (dst) / 65535.0f * (1.0f - src_alpha); + return scale_to_ushort(clamp(src_val + dst_val, 0, 1.0f)); } __device__ inline unsigned short @@ -130,8 +130,8 @@ { // DstColor' = SrcA * SrcColor + (1 - SrcA) DstColor float src_val = src * src_alpha; - float dst_val = __int2float_rz (dst) / 1023.0 * (1.0 - src_alpha); - return scale_to_10bits(clamp(src_val + dst_val, 0, 1.0)); + float dst_val = __int2float_rz (dst) / 1023.0f * (1.0f - src_alpha); + return scale_to_10bits(clamp(src_val + dst_val, 0, 1.0f)); } __device__ inline unsigned short @@ -139,8 +139,8 @@ { // DstColor' = SrcA * SrcColor + (1 - SrcA) DstColor float src_val = src * src_alpha; - float dst_val = __int2float_rz (dst) / 4095.0 * (1.0 - src_alpha); - return scale_to_12bits(clamp(src_val + dst_val, 0, 1.0)); + float dst_val = __int2float_rz (dst) / 4095.0f * (1.0f - src_alpha); + return scale_to_12bits(clamp(src_val + dst_val, 0, 1.0f)); } struct IConverter @@ -772,7 +772,7 @@ dst0pos = blend_uchar (dst0pos, sample.x, sample.w); dst0pos + 1 = blend_uchar (dst0pos + 1, sample.y, sample.w); dst0pos + 2 = blend_uchar (dst0pos + 2, sample.z, sample.w); - dst0pos + 3 = blend_uchar (dst0pos + 3, 1.0, sample.w); + dst0pos + 3 = blend_uchar (dst0pos + 3, 1.0f, sample.w); } }; @@ -826,7 +826,7 @@ dst0pos = blend_uchar (dst0pos, sample.z, sample.w); dst0pos + 1 = blend_uchar (dst0pos + 1, sample.y, sample.w); dst0pos + 2 = blend_uchar (dst0pos + 2, sample.x, sample.w); - dst0pos + 3 = blend_uchar (dst0pos + 3, 1.0, sample.w); + dst0pos + 3 = blend_uchar (dst0pos + 3, 1.0f, sample.w); } }; @@ -877,7 +877,7 @@ int stride1) { int pos = x * 4 + y * stride0; - dst0pos = blend_uchar (dst0pos, 1.0, sample.w); + dst0pos = blend_uchar (dst0pos, 1.0f, sample.w); dst0pos + 1 = blend_uchar (dst0pos + 1, sample.x, sample.w); dst0pos + 2 = blend_uchar (dst0pos + 2, sample.y, sample.w); dst0pos + 3 = blend_uchar (dst0pos + 3, sample.z, sample.w); @@ -904,7 +904,7 @@ int stride1) { int pos = x * 4 + y * stride0; - dst0pos = blend_uchar (dst0pos, 1.0, sample.w); + dst0pos = blend_uchar (dst0pos, 1.0f, sample.w); dst0pos + 1 = blend_uchar (dst0pos + 1, sample.z, sample.w); dst0pos + 2 = blend_uchar (dst0pos + 2, sample.y, sample.w); dst0pos + 3 = blend_uchar (dst0pos + 3, sample.x, sample.w); @@ -1327,7 +1327,7 @@ dst0pos = blend_uchar (dst0pos, sample.y, sample.w); dst1pos = blend_uchar (dst1pos, sample.z, sample.w); dst2pos = blend_uchar (dst2pos, sample.x, sample.w); - dst3pos = blend_uchar (dst3pos, 1.0, sample.w); + dst3pos = blend_uchar (dst3pos, 1.0f, sample.w); } }; @@ -1354,7 +1354,7 @@ dst0pos = blend_uchar (dst0pos, sample.z, sample.w); dst0pos + 1 = blend_uchar (dst0pos + 1, sample.y, sample.w); dst0pos + 2 = blend_uchar (dst0pos + 2, sample.x, sample.w); - dst0pos + 3 = blend_uchar (dst0pos + 3, 1.0, sample.w); + dst0pos + 3 = blend_uchar (dst0pos + 3, 1.0f, sample.w); } }; @@ -1367,31 +1367,31 @@ __device__ inline float2 rotate_90r (float x, float y) { - return make_float2(y, 1.0 - x); + return make_float2(y, 1.0f - x); } __device__ inline float2 rotate_180 (float x, float y) { - return make_float2(1.0 - x, 1.0 - y); + return make_float2(1.0f - x, 1.0f - y); } __device__ inline float2 rotate_90l (float x, float y) { - return make_float2(1.0 - y, x); + return make_float2(1.0f - y, x); } __device__ inline float2 rotate_horiz (float x, float y) { - return make_float2(1.0 - x, y); + return make_float2(1.0f - x, y); } __device__ inline float2 rotate_vert (float x, float y) { - return make_float2(x, 1.0 - y); + return make_float2(x, 1.0f - y); } __device__ inline float2 @@ -1403,7 +1403,7 @@ __device__ inline float2 rotate_ur_ll (float x, float y) { - return make_float2(1.0 - y, 1.0 - x); + return make_float2(1.0f - y, 1.0f - x); } __device__ inline float2 do_rotate (float x, float y, int direction) @@ -1451,11 +1451,11 @@ sample = make_float4 (const_buf.border_x, const_buf.border_y, const_buf.border_z, const_buf.border_w); } else { - float x = (__int2float_rz (x_pos - const_buf.left) + 0.5) / const_buf.view_width; - if (x < 0.0 || x > 1.0) + float x = (__int2float_rz (x_pos - const_buf.left) + 0.5f) / const_buf.view_width; + if (x < 0.0f || x > 1.0f) return; - float y = (__int2float_rz (y_pos - const_buf.top) + 0.5) / const_buf.view_height; - if (y < 0.0 || y > 1.0) + float y = (__int2float_rz (y_pos - const_buf.top) + 0.5f) / const_buf.view_height; + if (y < 0.0f || y > 1.0f) return; float2 rotated = do_rotate (x, y, const_buf.video_direction); float4 s = g_sampler.Execute (tex0, tex1, tex2, tex3, rotated.x, rotated.y); @@ -1532,31 +1532,31 @@ "__device__ inline unsigned char\n" "scale_to_2bits (float val)\n"
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/sys/nvcodec/kernel/gstcudaconverter.cu -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/sys/nvcodec/kernel/gstcudaconverter.cu
Changed
@@ -75,31 +75,31 @@ __device__ inline unsigned char scale_to_2bits (float val) { - return (unsigned short) __float2int_rz (val * 3.0); + return (unsigned short) __float2int_rz (val * 3.0f); } __device__ inline unsigned char scale_to_uchar (float val) { - return (unsigned char) __float2int_rz (val * 255.0); + return (unsigned char) __float2int_rz (val * 255.0f); } __device__ inline unsigned short scale_to_ushort (float val) { - return (unsigned short) __float2int_rz (val * 65535.0); + return (unsigned short) __float2int_rz (val * 65535.0f); } __device__ inline unsigned short scale_to_10bits (float val) { - return (unsigned short) __float2int_rz (val * 1023.0); + return (unsigned short) __float2int_rz (val * 1023.0f); } __device__ inline unsigned short scale_to_12bits (float val) { - return (unsigned short) __float2int_rz (val * 4095.0); + return (unsigned short) __float2int_rz (val * 4095.0f); } __device__ inline unsigned char @@ -107,8 +107,8 @@ { // DstColor' = SrcA * SrcColor + (1 - SrcA) DstColor float src_val = src * src_alpha; - float dst_val = __int2float_rz (dst) / 255.0 * (1.0 - src_alpha); - return scale_to_uchar(clamp(src_val + dst_val, 0, 1.0)); + float dst_val = __int2float_rz (dst) / 255.0f * (1.0f - src_alpha); + return scale_to_uchar(clamp(src_val + dst_val, 0, 1.0f)); } __device__ inline unsigned short @@ -116,8 +116,8 @@ { // DstColor' = SrcA * SrcColor + (1 - SrcA) DstColor float src_val = src * src_alpha; - float dst_val = __int2float_rz (dst) / 65535.0 * (1.0 - src_alpha); - return scale_to_ushort(clamp(src_val + dst_val, 0, 1.0)); + float dst_val = __int2float_rz (dst) / 65535.0f * (1.0f - src_alpha); + return scale_to_ushort(clamp(src_val + dst_val, 0, 1.0f)); } __device__ inline unsigned short @@ -125,8 +125,8 @@ { // DstColor' = SrcA * SrcColor + (1 - SrcA) DstColor float src_val = src * src_alpha; - float dst_val = __int2float_rz (dst) / 1023.0 * (1.0 - src_alpha); - return scale_to_10bits(clamp(src_val + dst_val, 0, 1.0)); + float dst_val = __int2float_rz (dst) / 1023.0f * (1.0f - src_alpha); + return scale_to_10bits(clamp(src_val + dst_val, 0, 1.0f)); } __device__ inline unsigned short @@ -134,8 +134,8 @@ { // DstColor' = SrcA * SrcColor + (1 - SrcA) DstColor float src_val = src * src_alpha; - float dst_val = __int2float_rz (dst) / 4095.0 * (1.0 - src_alpha); - return scale_to_12bits(clamp(src_val + dst_val, 0, 1.0)); + float dst_val = __int2float_rz (dst) / 4095.0f * (1.0f - src_alpha); + return scale_to_12bits(clamp(src_val + dst_val, 0, 1.0f)); } struct IConverter @@ -767,7 +767,7 @@ dst0pos = blend_uchar (dst0pos, sample.x, sample.w); dst0pos + 1 = blend_uchar (dst0pos + 1, sample.y, sample.w); dst0pos + 2 = blend_uchar (dst0pos + 2, sample.z, sample.w); - dst0pos + 3 = blend_uchar (dst0pos + 3, 1.0, sample.w); + dst0pos + 3 = blend_uchar (dst0pos + 3, 1.0f, sample.w); } }; @@ -821,7 +821,7 @@ dst0pos = blend_uchar (dst0pos, sample.z, sample.w); dst0pos + 1 = blend_uchar (dst0pos + 1, sample.y, sample.w); dst0pos + 2 = blend_uchar (dst0pos + 2, sample.x, sample.w); - dst0pos + 3 = blend_uchar (dst0pos + 3, 1.0, sample.w); + dst0pos + 3 = blend_uchar (dst0pos + 3, 1.0f, sample.w); } }; @@ -872,7 +872,7 @@ int stride1) { int pos = x * 4 + y * stride0; - dst0pos = blend_uchar (dst0pos, 1.0, sample.w); + dst0pos = blend_uchar (dst0pos, 1.0f, sample.w); dst0pos + 1 = blend_uchar (dst0pos + 1, sample.x, sample.w); dst0pos + 2 = blend_uchar (dst0pos + 2, sample.y, sample.w); dst0pos + 3 = blend_uchar (dst0pos + 3, sample.z, sample.w); @@ -899,7 +899,7 @@ int stride1) { int pos = x * 4 + y * stride0; - dst0pos = blend_uchar (dst0pos, 1.0, sample.w); + dst0pos = blend_uchar (dst0pos, 1.0f, sample.w); dst0pos + 1 = blend_uchar (dst0pos + 1, sample.z, sample.w); dst0pos + 2 = blend_uchar (dst0pos + 2, sample.y, sample.w); dst0pos + 3 = blend_uchar (dst0pos + 3, sample.x, sample.w); @@ -1322,7 +1322,7 @@ dst0pos = blend_uchar (dst0pos, sample.y, sample.w); dst1pos = blend_uchar (dst1pos, sample.z, sample.w); dst2pos = blend_uchar (dst2pos, sample.x, sample.w); - dst3pos = blend_uchar (dst3pos, 1.0, sample.w); + dst3pos = blend_uchar (dst3pos, 1.0f, sample.w); } }; @@ -1349,7 +1349,7 @@ dst0pos = blend_uchar (dst0pos, sample.z, sample.w); dst0pos + 1 = blend_uchar (dst0pos + 1, sample.y, sample.w); dst0pos + 2 = blend_uchar (dst0pos + 2, sample.x, sample.w); - dst0pos + 3 = blend_uchar (dst0pos + 3, 1.0, sample.w); + dst0pos + 3 = blend_uchar (dst0pos + 3, 1.0f, sample.w); } }; @@ -1376,11 +1376,11 @@ sample = make_float4 (const_buf.border_x, const_buf.border_y, const_buf.border_z, const_buf.border_w); } else { - float x = (__int2float_rz (x_pos - const_buf.left) + 0.5) / const_buf.view_width; - if (x < 0.0 || x > 1.0) + float x = (__int2float_rz (x_pos - const_buf.left) + 0.5f) / const_buf.view_width; + if (x < 0.0f || x > 1.0f) return; - float y = (__int2float_rz (y_pos - const_buf.top) + 0.5) / const_buf.view_height; - if (y < 0.0 || y > 1.0) + float y = (__int2float_rz (y_pos - const_buf.top) + 0.5f) / const_buf.view_height; + if (y < 0.0f || y > 1.0f) return; float2 rotated; rotated.x = fmaf (x, const_buf.transform_u0, @@ -1463,31 +1463,31 @@ "__device__ inline unsigned char\n" "scale_to_2bits (float val)\n" "{\n" -" return (unsigned short) __float2int_rz (val * 3.0);\n" +" return (unsigned short) __float2int_rz (val * 3.0f);\n" "}\n" "\n" "__device__ inline unsigned char\n" "scale_to_uchar (float val)\n" "{\n" -" return (unsigned char) __float2int_rz (val * 255.0);\n" +" return (unsigned char) __float2int_rz (val * 255.0f);\n" "}\n" "\n" "__device__ inline unsigned short\n" "scale_to_ushort (float val)\n" "{\n" -" return (unsigned short) __float2int_rz (val * 65535.0);\n" +" return (unsigned short) __float2int_rz (val * 65535.0f);\n" "}\n" "\n" "__device__ inline unsigned short\n" "scale_to_10bits (float val)\n" "{\n" -" return (unsigned short) __float2int_rz (val * 1023.0);\n" +" return (unsigned short) __float2int_rz (val * 1023.0f);\n" "}\n" "\n" "__device__ inline unsigned short\n" "scale_to_12bits (float val)\n" "{\n" -" return (unsigned short) __float2int_rz (val * 4095.0);\n" +" return (unsigned short) __float2int_rz (val * 4095.0f);\n" "}\n" "\n" "__device__ inline unsigned char\n" @@ -1495,8 +1495,8 @@ "{\n" " // DstColor' = SrcA * SrcColor + (1 - SrcA) DstColor\n" " float src_val = src * src_alpha;\n" -" float dst_val = __int2float_rz (dst) / 255.0 * (1.0 - src_alpha);\n" -" return scale_to_uchar(clamp(src_val + dst_val, 0, 1.0));\n" +" float dst_val = __int2float_rz (dst) / 255.0f * (1.0f - src_alpha);\n" +" return scale_to_uchar(clamp(src_val + dst_val, 0, 1.0f));\n" "}\n" "\n" "__device__ inline unsigned short\n" @@ -1504,8 +1504,8 @@
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/sys/nvcodec/kernel/gstnvjpegenc.cu -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/sys/nvcodec/kernel/gstnvjpegenc.cu
Changed
@@ -21,7 +21,7 @@ __device__ inline unsigned char scale_to_uchar (float val) { - return (unsigned char) __float2int_rz (val * 255.0); + return (unsigned char) __float2int_rz (val * 255.0f); } extern "C" { @@ -50,7 +50,7 @@ __device__ inline unsigned char scale_to_uchar (float val) { - return (unsigned char) __float2int_rz (val * 255.0); + return (unsigned char) __float2int_rz (val * 255.0f); } extern "C" {
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/sys/nvcodec/plugin.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/sys/nvcodec/plugin.c
Changed
@@ -521,7 +521,11 @@ /* Query current LUID - it changes per boot so can't use cached value */ device_cache.adapter_luid = gst_cuda_context_find_dxgi_adapter_luid (i); - /* Update encoder class data with current LUID */ + /* Update decoder/encoder class data with current LUID */ + for (GList * l = device_cache.decoders; l; l = l->next) { + GstNvDecoderClassData *dec_cdata = (GstNvDecoderClassData *) l->data; + dec_cdata->adapter_luid = device_cache.adapter_luid; + } for (GList * l = device_cache.encoders; l; l = l->next) { GstNvEncoderClassData *enc_cdata = (GstNvEncoderClassData *) l->data; enc_cdata->adapter_luid = device_cache.adapter_luid; @@ -560,6 +564,7 @@ g_strdup (gst_cuda_video_codec_to_string (codec)); dec_cdata->sink_caps = sink_template; dec_cdata->src_caps = src_template; + dec_cdata->adapter_luid = device_cache.adapter_luid; dec_cdata->cuda_device_id = i; device_cache.decoders = g_list_append (device_cache.decoders, dec_cdata);
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/sys/va/gstvabaseenc.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/sys/va/gstvabaseenc.c
Changed
@@ -697,7 +697,7 @@ ret = _push_out_one_buffer (base); if (ret != GST_FLOW_OK) - goto error_push_buffer; + goto bail; /* Try to push out all ready frames. */ do { @@ -706,7 +706,7 @@ if (ret == GST_FLOW_OUTPUT_NOT_READY) ret = GST_FLOW_OK; if (ret != GST_FLOW_OK) - goto error_push_buffer; + goto bail; frame_encode = NULL; if (!base_class->reorder_frame (base, NULL, FALSE, &frame_encode)) @@ -720,7 +720,7 @@ if (ret == GST_FLOW_OUTPUT_NOT_READY) ret = GST_FLOW_OK; if (ret != GST_FLOW_OK) - goto error_push_buffer; + goto bail; } return ret; @@ -761,12 +761,8 @@ gst_video_encoder_finish_frame (venc, frame_encode); return ret; } -error_push_buffer: - { - GST_ELEMENT_ERROR (venc, STREAM, ENCODE, - ("Failed to push one frame."), (NULL)); - return ret; - } +bail: + return ret; } static GstFlowReturn
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/tests/check/elements/cudaconvert.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/tests/check/elements/cudaconvert.c
Changed
@@ -170,9 +170,6 @@ Suite *s; TCase *tc_chain; - /* HACK: cuda device init/deinit with fork seems to problematic */ - g_setenv ("CK_FORK", "no", TRUE); - run_visual_test = g_getenv ("ENABLE_CUDA_VISUAL_TEST"); s = suite_create ("cudaconvertscale"); @@ -197,4 +194,4 @@ return s; } -GST_CHECK_MAIN (cudaconvertscale); +GST_CHECK_MAIN_NOFORK (cudaconvertscale);
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/tests/check/elements/cudafilter.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/tests/check/elements/cudafilter.c
Changed
@@ -146,9 +146,6 @@ Suite *s; TCase *tc_chain; - /* HACK: cuda device init/deinit with fork seems to problematic */ - g_setenv ("CK_FORK", "no", TRUE); - s = suite_create ("cudafilter"); tc_chain = tcase_create ("general"); @@ -165,4 +162,4 @@ return s; } -GST_CHECK_MAIN (cudafilter); +GST_CHECK_MAIN_NOFORK (cudafilter);
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/tests/check/elements/interlace.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/tests/check/elements/interlace.c
Changed
@@ -194,6 +194,45 @@ GST_END_TEST; +GST_START_TEST (test_upstream_not_fixed) +{ + GstBuffer *buffer; + GstHarness *h; + + h = gst_harness_new_parse ("videorate ! interlace field-pattern=0"); + + gst_harness_set_src_caps_str (h, + "video/x-raw, format=(string)AYUV64, width=(int)1, height=(int)1, multiview-mode=(string)mono, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive"); + gst_harness_set_sink_caps_str (h, + "video/x-raw,interlace-mode=interleaved,framerate=25/1"); + + buffer = gst_harness_create_buffer (h, 4); + fail_unless_equals_int (gst_harness_push (h, buffer), GST_FLOW_OK); + + gst_harness_teardown (h); +} + +GST_END_TEST; + +GST_START_TEST (test_downstream_any) +{ + GstBuffer *buffer; + GstHarness *h; + + h = gst_harness_new ("interlace"); + + gst_harness_set (h, "interlace", "field-pattern", 0, NULL); + gst_harness_set_src_caps_str (h, + "video/x-raw, format=(string)AYUV, width=(int)1, height=(int)1, framerate=(fraction)25/1, multiview-mode=(string)mono, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1"); + + buffer = gst_harness_create_buffer (h, 4); + fail_unless_equals_int (gst_harness_push (h, buffer), GST_FLOW_OK); + + gst_harness_teardown (h); +} + +GST_END_TEST; + static Suite * interlace_suite (void) { @@ -209,6 +248,8 @@ tcase_add_test (tc_chain, test_framerate_1_1); tcase_add_test (tc_chain, test_framerate_3_2); tcase_add_test (tc_chain, test_framerate_empty_not_negotiated); + tcase_add_test (tc_chain, test_downstream_any); + tcase_add_test (tc_chain, test_upstream_not_fixed); return s; }
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/tests/check/elements/nvdec.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/tests/check/elements/nvdec.c
Changed
@@ -205,9 +205,6 @@ Suite *s; TCase *tc_chain; - /* HACK: cuda device init/deinit with fork seems to problematic */ - g_setenv ("CK_FORK", "no", TRUE); - s = suite_create ("nvdec"); tc_chain = tcase_create ("general"); @@ -224,4 +221,4 @@ return s; } -GST_CHECK_MAIN (nvdec); +GST_CHECK_MAIN_NOFORK (nvdec);
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/tests/check/elements/nvenc.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/tests/check/elements/nvenc.c
Changed
@@ -419,9 +419,6 @@ Suite *s; TCase *tc_chain; - /* HACK: cuda device init/deinit with fork seems to problematic */ - g_setenv ("CK_FORK", "no", TRUE); - s = suite_create ("nvenc"); tc_chain = tcase_create ("general"); @@ -442,4 +439,4 @@ return s; } -GST_CHECK_MAIN (nvenc); +GST_CHECK_MAIN_NOFORK (nvenc);
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/tests/check/elements/vkcolorconvert.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/tests/check/elements/vkcolorconvert.c
Changed
@@ -135,4 +135,8 @@ return s; } +#ifdef __APPLE__ +GST_CHECK_MAIN_NOFORK (vkcolorconvert); +#else GST_CHECK_MAIN (vkcolorconvert); +#endif
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/tests/check/elements/vkdeviceprovider.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/tests/check/elements/vkdeviceprovider.c
Changed
@@ -18,6 +18,10 @@ * Boston, MA 02110-1301, USA. */ +#ifdef __APPLE__ +#include <TargetConditionals.h> +#endif + #include <gst/check/gstcheck.h> #include <gst/vulkan/vulkan.h> @@ -116,4 +120,26 @@ return s; } +#ifdef __APPLE__ +#if TARGET_OS_OSX +static int +run_tests () +{ + Suite *s = vkdeviceprovider_suite (); + return gst_check_run_suite_nofork (s, "vkdeviceprovider", __FILE__); +} + +int +main (int argc, char **argv) +{ + /* gst_macos_main() is needed to setup an NSApplication, + * otherwise this test will print a critical warning and fail on macOS */ + gst_check_init (&argc, &argv); + return gst_macos_main_simple ((GstMainFuncSimple) run_tests, NULL); +} +#else +GST_CHECK_MAIN_NOFORK (vkdeviceprovider); +#endif +#else GST_CHECK_MAIN (vkdeviceprovider); +#endif
View file
_service:download_files:gst-plugins-bad-1.28.3.tar.xz/tests/check/elements/vkdownload.c
Added
@@ -0,0 +1,287 @@ +/* GStreamer + * + * unit test for vulkandownload element + * Copyright (C) 2026 Piotr Brzeziński <piotr@centricular.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/check/gstharness.h> +#include <gst/video/video.h> +#include <gst/vulkan/vulkan.h> + +static const struct +{ + guint width; + guint height; +} stride_test_resolutions = { + {123, 345}, + {678, 789}, + {511, 257}, + {855, 481}, +}; + +static gboolean +cmp_buffers (GstBuffer * buf1, GstBuffer * buf2, const GstVideoInfo * info) +{ + GstVideoFrame frame1, frame2; + gint compGST_VIDEO_MAX_COMPONENTS, stride1, stride2; + guint32 width, height; + gboolean ret = FALSE; + + fail_unless (!GST_VIDEO_FORMAT_INFO_IS_COMPLEX (info->finfo)); + fail_unless (gst_video_frame_map (&frame1, info, buf1, GST_MAP_READ)); + fail_unless (gst_video_frame_map (&frame2, info, buf2, GST_MAP_READ)); + + for (int plane = 0; plane < GST_VIDEO_INFO_N_PLANES (info); plane++) { + guint8 *row1, *row2; + + gst_video_format_info_component (info->finfo, plane, comp); + + width = GST_VIDEO_INFO_COMP_WIDTH (info, comp0) + * GST_VIDEO_INFO_COMP_PSTRIDE (info, comp0); + height = GST_VIDEO_INFO_COMP_HEIGHT (info, comp0); + + stride1 = GST_VIDEO_INFO_PLANE_STRIDE (&frame1.info, plane); + stride2 = GST_VIDEO_INFO_PLANE_STRIDE (&frame2.info, plane); + + row1 = frame1.dataplane; + row2 = frame2.dataplane; + + for (int i = 0; i < height; i++) { + GST_MEMDUMP ("input row:", row1, width); + GST_MEMDUMP ("output row:", row2, width); + + if (memcmp (row1, row2, width) != 0) + goto bail; + + row1 += stride1; + row2 += stride2; + } + } + + ret = TRUE; + +bail: + gst_video_frame_unmap (&frame1); + gst_video_frame_unmap (&frame2); + + return ret; +} + +static gboolean +fill_stride_test_image_buffer (GstBuffer * buf, const GstVideoInfo * info) +{ + GstVideoFrame frame; + gint width, height, stride; + + if (!gst_video_frame_map (&frame, info, buf, GST_MAP_WRITE)) + return FALSE; + + width = GST_VIDEO_INFO_WIDTH (info); + height = GST_VIDEO_INFO_HEIGHT (info); + stride = GST_VIDEO_FRAME_PLANE_STRIDE (&frame, 0); + + for (gint y = 0; y < height; y++) { + guint8 *row = + (guint8 *) GST_VIDEO_FRAME_PLANE_DATA (&frame, 0) + y * stride; + const guint8 r = (y * 3) & 0xff; + const guint8 g = (y * 7) & 0xff; + const guint8 b = (y * 11) & 0xff; + + for (gint x = 0; x < width; x++) { + rowx * 4 + 0 = r; + rowx * 4 + 1 = g; + rowx * 4 + 2 = b; + rowx * 4 + 3 = 0xff; + } + } + + gst_video_frame_unmap (&frame); + + return TRUE; +} + +static GstBuffer * +create_stride_test_vulkan_image_buffer (GstVulkanDevice * device, + GstVideoInfo * info) +{ + /* Finds an odd-sized linear image layout where the source image memory + * layout differs from the tightly-packed raw output layout. + * I originally found this bug on an M4 Pro Mac at 854x480, but odd resolutions + * should be more reliable at triggering the problem on different hardware. */ + for (guint i = 0; i < G_N_ELEMENTS (stride_test_resolutions); i++) { + const guint width = stride_test_resolutionsi.width; + const guint height = stride_test_resolutionsi.height; + GstBuffer *buf; + GstMemory *mem; + VkImageCreateInfo image_info; + GstVulkanImageMemory *img_mem; + VkImageSubresource subresource = { + .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT, + .mipLevel = 0, + .arrayLayer = 0, + }; + VkSubresourceLayout layout; + VkFormat vk_format; + gsize offsetsGST_VIDEO_MAX_PLANES = { 0, }; + gint stridesGST_VIDEO_MAX_PLANES = { 0, }; + guint tight_stride; + + fail_unless (gst_video_info_set_format (info, + GST_VIDEO_FORMAT_RGBA, width, height)); + tight_stride = GST_VIDEO_INFO_PLANE_STRIDE (info, 0); + vk_format = gst_vulkan_format_from_video_info (info, 0); + + /* *INDENT-OFF* */ + image_info = (VkImageCreateInfo) { + .sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, + .imageType = VK_IMAGE_TYPE_2D, + .format = vk_format, + .extent = { width, height, 1 }, + .mipLevels = 1, + .arrayLayers = 1, + .samples = VK_SAMPLE_COUNT_1_BIT, + .tiling = VK_IMAGE_TILING_LINEAR, + .usage = VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT, + .sharingMode = VK_SHARING_MODE_EXCLUSIVE, + .initialLayout = VK_IMAGE_LAYOUT_PREINITIALIZED, + }; + /* *INDENT-ON* */ + + mem = gst_vulkan_image_memory_alloc_with_image_info (device, &image_info, + VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT + | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT); + if (!mem) + continue; + + img_mem = (GstVulkanImageMemory *) mem; + vkGetImageSubresourceLayout (device->device, img_mem->image, &subresource, + &layout); + + /* We want a padded stride value, that's when vulkandownload corrupted the output previously */ + if (layout.rowPitch <= tight_stride) { + gst_memory_unref (mem); + continue; + } + + buf = gst_buffer_new (); + fail_unless (buf != NULL); + gst_buffer_append_memory (buf, mem); + + offsets0 = layout.offset; + strides0 = (gint) layout.rowPitch; + + fail_unless (gst_buffer_add_video_meta_full (buf, GST_VIDEO_FRAME_FLAG_NONE, + GST_VIDEO_FORMAT_RGBA, width, height, 1, offsets, strides) != NULL); + fail_unless (fill_stride_test_image_buffer (buf, info)); + + GST_INFO ("Using vkdownload stride test resolution %ux%u", width, height); +
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/tests/check/elements/vkupload.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/tests/check/elements/vkupload.c
Changed
@@ -27,11 +27,15 @@ #include <gst/gst.h> #include <gst/check/gstcheck.h> #include <gst/check/gstharness.h> +#include <gst/video/video.h> #include <gst/vulkan/vulkan.h> -#include <stdio.h> static const gchar *formats = { "NV12", "RGBA" }; +#define STRIDE_TEST_WIDTH 360 +#define STRIDE_TEST_HEIGHT 480 +#define STRIDE_TEST_INPUT_STRIDE 1472 + static const struct { guint width; @@ -99,6 +103,60 @@ } static gboolean +fill_stride_test_rgba_buffer (GstBuffer * buf) +{ + GstMapInfo map; + guint x, y; + + if (!gst_buffer_map (buf, &map, GST_MAP_WRITE)) + return FALSE; + + for (y = 0; y < STRIDE_TEST_HEIGHT; y++) { + guint8 *row = map.data + y * STRIDE_TEST_INPUT_STRIDE; + guint8 pixel = { (y * 3) & 0xff, (y * 7) & 0xff, (y * 11) & 0xff, 0xff }; + + for (x = 0; x < STRIDE_TEST_WIDTH; x++) + memcpy (row + x * 4, pixel, sizeof (pixel)); + + memset (row + STRIDE_TEST_WIDTH * 4, 0x5a, + STRIDE_TEST_INPUT_STRIDE - STRIDE_TEST_WIDTH * 4); + } + + gst_buffer_unmap (buf, &map); + + return TRUE; +} + +static GstBuffer * +create_stride_test_rgba_buffer (void) +{ + GstBuffer *buf; + gsize offsetsGST_VIDEO_MAX_PLANES = { 0, }; + gint stridesGST_VIDEO_MAX_PLANES = { 0, }; + + buf = + gst_buffer_new_allocate (NULL, + STRIDE_TEST_INPUT_STRIDE * STRIDE_TEST_HEIGHT, NULL); + if (!buf) + return NULL; + + if (!fill_stride_test_rgba_buffer (buf)) { + gst_buffer_unref (buf); + return NULL; + } + + strides0 = STRIDE_TEST_INPUT_STRIDE; + if (!gst_buffer_add_video_meta_full (buf, GST_VIDEO_FRAME_FLAG_NONE, + GST_VIDEO_FORMAT_RGBA, STRIDE_TEST_WIDTH, STRIDE_TEST_HEIGHT, 1, + offsets, strides)) { + gst_buffer_unref (buf); + return NULL; + } + + return buf; +} + +static gboolean run_test (const gchar * launchline, const gchar * format, guint width, guint height, const gchar * sink_caps_str) { @@ -189,6 +247,40 @@ GST_END_TEST; +GST_START_TEST (test_vulkan_upload_image_padded_stride) +{ + GstHarness *h; + GstCaps *caps; + GstVideoInfo info; + GstBuffer *inbuf, *outbuf; + + h = gst_harness_new_parse ("vulkanupload ! vulkandownload"); + fail_unless (h != NULL); + + caps = gst_caps_new_simple ("video/x-raw", + "format", G_TYPE_STRING, "RGBA", + "width", G_TYPE_INT, STRIDE_TEST_WIDTH, + "height", G_TYPE_INT, STRIDE_TEST_HEIGHT, NULL); + fail_unless (caps != NULL); + fail_unless (gst_video_info_from_caps (&info, caps)); + + gst_harness_set_caps (h, caps, gst_caps_ref (caps)); + + inbuf = create_stride_test_rgba_buffer (); + fail_unless (inbuf != NULL); + + outbuf = gst_harness_push_and_pull (h, gst_buffer_ref (inbuf)); + fail_unless (outbuf != NULL); + + fail_unless (cmp_buffers (inbuf, outbuf, &info)); + + gst_buffer_unref (inbuf); + gst_buffer_unref (outbuf); + gst_harness_teardown (h); +} + +GST_END_TEST; + static Suite * vkupload_suite (void) { @@ -205,9 +297,14 @@ if (have_instance) { tcase_add_test (tc_basic, test_vulkan_upload_buffer); tcase_add_test (tc_basic, test_vulkan_upload_image); + tcase_add_test (tc_basic, test_vulkan_upload_image_padded_stride); } return s; } +#ifdef __APPLE__ +GST_CHECK_MAIN_NOFORK (vkupload); +#else GST_CHECK_MAIN (vkupload); +#endif
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/tests/check/libs/cudamemory.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/tests/check/libs/cudamemory.c
Changed
@@ -171,9 +171,6 @@ Suite *s; TCase *tc_chain; - /* CUDA doesn't work well with fork */ - g_setenv ("CK_FORK", "no", TRUE); - s = suite_create ("cudamemory"); tc_chain = tcase_create ("general"); @@ -189,4 +186,4 @@ return s; } -GST_CHECK_MAIN (cudamemory); +GST_CHECK_MAIN_NOFORK (cudamemory);
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/tests/check/libs/vkcommandpool.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/tests/check/libs/vkcommandpool.c
Changed
@@ -123,4 +123,8 @@ return s; } +#ifdef __APPLE__ +GST_CHECK_MAIN_NOFORK (vkcommandpool); +#else GST_CHECK_MAIN (vkcommandpool); +#endif
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/tests/check/libs/vkdevice.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/tests/check/libs/vkdevice.c
Changed
@@ -99,4 +99,8 @@ } +#ifdef __APPLE__ +GST_CHECK_MAIN_NOFORK (vkdevice); +#else GST_CHECK_MAIN (vkdevice); +#endif
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/tests/check/libs/vkformat.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/tests/check/libs/vkformat.c
Changed
@@ -112,4 +112,8 @@ } +#ifdef __APPLE__ +GST_CHECK_MAIN_NOFORK (vkformat); +#else GST_CHECK_MAIN (vkformat); +#endif
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/tests/check/libs/vkimage.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/tests/check/libs/vkimage.c
Changed
@@ -246,4 +246,8 @@ } +#ifdef __APPLE__ +GST_CHECK_MAIN_NOFORK (vkimage); +#else GST_CHECK_MAIN (vkimage); +#endif
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/tests/check/libs/vkimagebufferpool.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/tests/check/libs/vkimagebufferpool.c
Changed
@@ -238,4 +238,8 @@ return s; } +#ifdef __APPLE__ +GST_CHECK_MAIN_NOFORK (vkimagebufferpool); +#else GST_CHECK_MAIN (vkimagebufferpool); +#endif
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/tests/check/libs/vkinstance.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/tests/check/libs/vkinstance.c
Changed
@@ -170,4 +170,8 @@ return s; } +#ifdef __APPLE__ +GST_CHECK_MAIN_NOFORK (vkinstance); +#else GST_CHECK_MAIN (vkinstance); +#endif
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/tests/check/libs/vkmemory.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/tests/check/libs/vkmemory.c
Changed
@@ -108,4 +108,8 @@ } +#ifdef __APPLE__ +GST_CHECK_MAIN_NOFORK (vkmemory); +#else GST_CHECK_MAIN (vkmemory); +#endif
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/tests/check/libs/vkvideodecode.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/tests/check/libs/vkvideodecode.c
Changed
@@ -924,4 +924,8 @@ return s; } +#ifdef __APPLE__ +GST_CHECK_MAIN_NOFORK (vkvideo); +#else GST_CHECK_MAIN (vkvideo); +#endif
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/tests/check/libs/vkvideoencodeav1.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/tests/check/libs/vkvideoencodeav1.c
Changed
@@ -839,4 +839,8 @@ return s; } +#ifdef __APPLE__ +GST_CHECK_MAIN_NOFORK (vkvideo); +#else GST_CHECK_MAIN (vkvideo); +#endif
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/tests/check/libs/vkvideoencodeh264.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/tests/check/libs/vkvideoencodeh264.c
Changed
@@ -705,4 +705,8 @@ return s; } +#ifdef __APPLE__ +GST_CHECK_MAIN_NOFORK (vkvideo); +#else GST_CHECK_MAIN (vkvideo); +#endif
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/tests/check/libs/vkvideoencodeh265.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/tests/check/libs/vkvideoencodeh265.c
Changed
@@ -866,4 +866,8 @@ return s; } +#ifdef __APPLE__ +GST_CHECK_MAIN_NOFORK (vkvideo); +#else GST_CHECK_MAIN (vkvideo); +#endif
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/tests/check/libs/vkwindow.c -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/tests/check/libs/vkwindow.c
Changed
@@ -22,6 +22,10 @@ #include "config.h" #endif +#ifdef __APPLE__ +#include <TargetConditionals.h> +#endif + #include <gst/gst.h> #include <gst/check/gstcheck.h> #include <gst/vulkan/vulkan.h> @@ -78,5 +82,26 @@ return s; } +#ifdef __APPLE__ +#if TARGET_OS_OSX +static int +run_tests () +{ + Suite *s = vkwindow_suite (); + return gst_check_run_suite_nofork (s, "vkwindow", __FILE__); +} +int +main (int argc, char **argv) +{ + /* gst_macos_main() is needed to setup an NSApplication, + * otherwise this test will print a critical warning and fail on macOS */ + gst_check_init (&argc, &argv); + return gst_macos_main_simple ((GstMainFuncSimple) run_tests, NULL); +} +#else +GST_CHECK_MAIN_NOFORK (vkwindow); +#endif +#else GST_CHECK_MAIN (vkwindow); +#endif
View file
_service:download_files:gst-plugins-bad-1.28.2.tar.xz/tests/check/meson.build -> _service:download_files:gst-plugins-bad-1.28.3.tar.xz/tests/check/meson.build
Changed
@@ -84,6 +84,7 @@ 'elements/videoframe-audiolevel.c', get_option('videoframe_audiolevel').disabled(), 'elements/viewfinderbin.c', 'elements/vkcolorconvert.c', not gstvulkan_dep.found(), gstvulkan_dep, + 'elements/vkdownload.c', not gstvulkan_dep.found(), gstvulkan_dep, 'elements/vkdeviceprovider.c', not gstvulkan_dep.found(), gstvulkan_dep, 'elements/vkupload.c', not gstvulkan_dep.found(), gstvulkan_dep, 'elements/voamrwbenc.c', not voamrwbenc_dep.found(), voamrwbenc_dep, @@ -183,6 +184,14 @@ endif +if 'darwin', 'ios'.contains(host_system) + videotoolbox_dep = dependency('VideoToolbox', required : false) + base_tests += + 'pipelines/vtdec-output-paths.c', + not videotoolbox_dep.found(), videotoolbox_dep, + +endif + # linux only tests if host_machine.system() == 'linux' base_tests +=
View file
_service:download_files:gst-plugins-bad-1.28.3.tar.xz/tests/check/pipelines/vtdec-output-paths.c
Added
@@ -0,0 +1,600 @@ +/* GStreamer + * Copyright (C) 2026 Dominique Leroux <dominique.p.leroux@gmail.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. + */ + +#include <gst/check/gstcheck.h> +#include <gst/app/gstappsink.h> +#include <gst/video/video.h> +#include <TargetConditionals.h> + +#if TARGET_OS_OSX +#include <gst/gstmacos.h> +#endif + +#define VTDEC_COMPARE_FRAMES 8 + +typedef struct +{ + guint buffers; + gboolean eos; + gboolean error; + gboolean timeout; + gchar *error_message; + GPtrArray *sample_buffers; + GstCaps *caps; +} PipelineResult; + +typedef struct +{ + PipelineResult *result; + GMainLoop *loop; + GstElement *pipeline; + guint timeout_id; + guint max_samples; +} PipelineContext; + +typedef struct +{ + gboolean enabled; + gboolean had_value; + gchar *old_value; +} EnvOverride; + +static void +on_handoff (GstElement * fakesink, GstBuffer * buffer, GstPad * pad, + gpointer user_data) +{ + PipelineContext *ctx = user_data; + + (void) fakesink; + (void) buffer; + (void) pad; + + ctx->result->buffers++; +} + +static GstFlowReturn +on_new_sample (GstAppSink * appsink, gpointer user_data) +{ + PipelineContext *ctx = user_data; + GstSample *sample = gst_app_sink_pull_sample (appsink); + GstBuffer *buffer; + GstCaps *caps; + gboolean enough_samples = FALSE; + + if (sample == NULL) + return GST_FLOW_ERROR; + + buffer = gst_sample_get_buffer (sample); + caps = gst_sample_get_caps (sample); + + if (ctx->result->caps == NULL && caps != NULL) + ctx->result->caps = gst_caps_ref (caps); + if (buffer != NULL && (ctx->max_samples == 0 || + ctx->result->sample_buffers->len < ctx->max_samples)) + g_ptr_array_add (ctx->result->sample_buffers, gst_buffer_ref (buffer)); + + if (ctx->max_samples > 0 && ctx->result->sample_buffers->len >= + ctx->max_samples) + enough_samples = TRUE; + + gst_sample_unref (sample); + + if (enough_samples) + g_main_loop_quit (ctx->loop); + + return GST_FLOW_OK; +} + +static void +pipeline_result_clear (PipelineResult * result) +{ + g_clear_pointer (&result->error_message, g_free); + g_clear_pointer (&result->sample_buffers, g_ptr_array_unref); + gst_clear_caps (&result->caps); +} + +static gboolean +on_bus_message (GstBus * bus, GstMessage * msg, gpointer user_data) +{ + PipelineContext *ctx = user_data; + GstMessageType msg_type = GST_MESSAGE_TYPE (msg); + + (void) bus; + + if (msg_type == GST_MESSAGE_WARNING) { + GError *err = NULL; + gchar *debug = NULL; + + gst_message_parse_warning (msg, &err, &debug); + if (err != NULL) + GST_WARNING ("Pipeline warning: %s", err->message); + if (debug != NULL) + GST_WARNING ("Pipeline warning details: %s", debug); + g_clear_error (&err); + g_free (debug); + } + + if (msg_type == GST_MESSAGE_ERROR) { + GError *err = NULL; + gchar *debug = NULL; + + gst_message_parse_error (msg, &err, &debug); + if (err && ctx->result->error_message == NULL && err->message) + ctx->result->error_message = g_strdup (err->message); + if (err != NULL) + GST_WARNING ("Pipeline error: %s", err->message); + if (debug != NULL) + GST_WARNING ("Pipeline error details: %s", debug); + g_clear_error (&err); + g_free (debug); + ctx->result->error = TRUE; + g_main_loop_quit (ctx->loop); + } else if (msg_type == GST_MESSAGE_EOS) { + ctx->result->eos = TRUE; + g_main_loop_quit (ctx->loop); + } + + return TRUE; +} + +static gboolean +on_timeout (gpointer user_data) +{ + PipelineContext *ctx = user_data; + + ctx->timeout_id = 0; + ctx->result->timeout = TRUE; + g_main_loop_quit (ctx->loop); + return G_SOURCE_REMOVE; +} + +static gboolean +start_pipeline (gpointer user_data) +{ + PipelineContext *ctx = user_data; + GstStateChangeReturn ret; + + ret = gst_element_set_state (ctx->pipeline, GST_STATE_PAUSED); + GST_LOG ("PAUSED state request returned: %d", ret); + + ret = gst_element_set_state (ctx->pipeline, GST_STATE_PLAYING); + GST_LOG ("PLAYING state request returned: %d", ret); + + return G_SOURCE_REMOVE; +} + +static gboolean +element_available (const gchar * name) +{ + GstElementFactory *factory = gst_element_factory_find (name); + + if (factory) { + gst_object_unref (factory); + return TRUE; + } + + return FALSE; +} + +static gboolean +require_elements_or_skip (const gchar * const *elements, gsize n_elements) +{ + gboolean strict = g_getenv ("GST_REQUIRE_TEST_ELEMENTS") != NULL; + gsize i;
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
.