Projects
home:zaitor:branches:Essentials
gstreamer-plugins-bad-codecs
Sign Up
Log In
Username
Password
Sorry, you are not authorized to perform this action.
×
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.0 +Version: 1.28.1 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.0.tar.xz/NEWS
Deleted
@@ -1,1096 +0,0 @@ -GStreamer 1.28 Release Notes - -GStreamer 1.28.0 was originally released on 27 January 2026. - -See https://gstreamer.freedesktop.org/releases/1.28/ for the latest version of this document. - -Last updated: Tuesday 27 January 2026, 17:00 UTC (log) - -## Introduction - -The GStreamer team is proud to announce a new major feature release in the stable 1.x API series of your favourite -cross-platform multimedia framework! - -As always, this release is again packed with many new features, bug fixes, and other improvements. - -## Highlights - -- AMD HIP plugin and integration helper library -- Vulkan Video AV1 and VP9 decoding, H.264 encoding, and 10-bit support for H.265 decoder -- waylandsink: Parse and set the HDR10 metadata and other color management improvements -- Audio source separation element based on demucs in Rust -- Analytics combiner and splitter elements plus batch meta to batch buffers from one or more streams -- LiteRT inference element; move modelinfo to analytics lib; add script to help with modelinfo generation and upgrade -- Add general classifier tensor-decoder, facedetector, and more analytics convenience API -- New tensordecodebin element to auto-plug compatible tensor decoders based on their caps and many other additions and - improvements -- Add a burn-based YOLOX inference element and a YOLOX tensor decoder in Rust -- applemedia: VideoToolbox VP9 and AV1 hardware-accelerated decoding support, and 10-bit HEVC encoding -- Add new GIF decoder element in Rust with looping support -- input-selector: implements a two-phase sinkpad switch now to avoid races when switching input pads -- The inter wormhole sink and source elements gained a way to forward upstream events to the producer as well as new - fine-tuning properties -- webrtcsink: add renegotiation support and support for va hardware encoders -- webrtc WHEP client and server signaller -- New ST-2038 ancillary data combiner and extractor elements -- fallbacksrc gained support for encoded streams -- flv: enhanced rtmp H.265 video support, and support for multitrack audio -- glupload: Implement udmabuf uploader to share buffers between software decoders/sources and GPUs, display engines (wayland), - and other dma devices -- video: Add crop, scale, rotate, flip, shear and more GstMeta transformation -- New task pool GstContext to share a thread pool amongst elements for better resource management and performance, especially - for video conversion and compositing -- New Deepgram speech-to-text transcription plugin and many other translation and transcription improvements -- Speech synthesizers: expose new “compress” overflow mode that can speed up audio while preserving pitch -- ElevenLabs voice cloning element and support for Speechmatics speaker identification API -- textaccumulate: new element for speech synthesis or translation preprocessing -- New vmaf element to calculate perceptual video quality assessment scores using Netflix’s VMAF framework -- decodebin3: expose KLV, ID3 PES and ST-2038 ancillary data streams with new metadata GstStream type -- New MPEG-H audio decoding plugin plus MP4 demuxing support -- LCEVC: Add autoplugging decoding support for LCEVC H265 and H266 video streams and LCEVC H.265 and H.266 encoders -- RTP “robust MPEG audio”, raw audio (L8, L16, L24), and SMPTE ST291 ancillary metadata payloaders/depayloaders in Rust -- Add a Rust-based icecastsink element with AAC support -- The Windows IPC plugin gained support for passing generic data in addition to raw audio/video, and various properties -- New D3D12 interlace and overlay compositor elements, plus many other D3D12 improvements -- Blackmagic Decklink elements gained support for capturing and outputting all types of VANC via GstAncillaryMeta -- GstLogContext API to reduce log spam in several components and GST_DEBUG_ONCE (etc) convenience macros to log things only - once -- hlssink3, hlscmafsink: Support the use of a single media file, plus I-frame only playlist support -- Webkit: New wpe2 plugin making use of the “WPE Platform API” -- MPEG-TS demuxer can now disable skew corrections -- New Qt6 QML render source element -- qml6gloverlay: support directly passing a QQuickItem for QML the render tree -- unifxfdsink: Add a property to allow copying to make sink usable with more upstream elements -- dots-viewer: Improve dot file generation and interactivity -- Python bindings: more syntactic sugar, analytics API improvements and type annotations -- cerbero: add support for Python wheel packaging, Windows ARM64, new iOS xcframework, Gtk4 on macOS and Windows, and more - plugins -- Smaller binary sizes of Rust plugins in Windows and Android binary packages -- Peel: New C++ bindings for GStreamer -- Lots of new plugins, features, performance improvements and bug fixes -- Countless bug fixes, build fixes, memory leak fixes, and other stability and reliability improvements - -## Major new features and changes - -### AMD HIP plugin and integration library - -- HIP (formerly known as Heterogeneous-computing Interface for Portability) is AMD’s GPU programming API that enables - portable, CUDA-like development across both AMD and NVIDIA platforms: - - - On AMD GPUs, HIP runs natively via the ROCm stack. - - On NVIDIA GPUs, HIP operates as a thin translation layer over the CUDA runtime and driver APIs. - - This allows developers to maintain a single codebase that can target multiple GPU vendors with minimal effort. - -- The new HIP plugin provides the following elements: - - - hipcompositor: a HIP-based video mixer/compositor - - hipconvert: Converts video from one colorspace to another using HIP - - hipconvertscale: Resizes video and allow color conversion using HIP - - hipscale: Resize video using HIP - - hipdownload: Downloads HIP device memory into system memory - - hipupload: Uploads system memory into HIP device memory - -- The GStreamer HIP integration helper library provides HIP integration functionality to applications and other HIP users. - -- Watch the Bringing AMD HIP into GStreamer talk from last year’s GStreamer Conference for more details or read Seungha’s - devlog post on the subject. - -### Low Complexity Enhancement Video Coding (LCEVC) support for H.265 and H.266 - -- LCEVC is a codec that provides an enhancement layer on top of another codec such as H.264 for example. It is standardised as - MPEG-5 Part 2. - -- LCEVC H.265 and H.266 encoder and decoder elements based on V-Nova’s SDK libraries were added in this cycle - -- Autoplugging support for LCEVC H265 and H266 video streams, so these can be decoded automatically in a decodebin3 or - playbin3 scenario. - -### Closed captions and text handling improvements - -- cea708overlay: suport non-relative positioning for streams with CCs that do not have relative positions. Instead of - displaying them at the top, they are positioned relatively. - -- cea708mux: expose “discarded-services” property on sink pads. This can be useful when muxing in an original caption stream - with a newly-created one (e.g. transcription / translation), in which case one might wish to discard select services from - the original stream in order to avoid garbled captions. - -- sccparse: Better handling of streams with more byte tuples in the SCC field. - -- tttocea608: expose “speaker-prefix” property - -- Miscellaneous improvements and spec compliance fixes - -- Also see SMPTE ST-2038 metadata section below. - -### Speech to Text, Translation and Speech Synthesis - -- New audio source separation element based on demucs in Rust. This is useful to separate speech from background audio before - running speech to text transcription, but could also be used to separate vocals from music for karaoke. - -- New Deepgram speech-to-text transcription plugin in Rust. - -- The Speechmatics transcriber has seen a major refactoring for better timings, gap and discontinuity handling and has gained - support for the new Speechmatics speaker identification API as well as a new property to mask profanities. - -- New ElevenLabs voice cloning element. The new element can operate in two modes: - - - In single speaker mode, the element will directly clone a single voice from its input, without storing any samples. - - Otherwise, the element will store a backlog of samples, and wait to receive certain events from a transcriber on its - source pad before draining them to create potentially multiple voices. - -- New “compress” overflow mode for speech synthesizers that can speed up the audio while preserving pitch. This may be needed - to keep or regain audio/video synchronisation if translated speech output has been consistently longer in duration than the - original and there hasn’t been a sufficient amount of silence that could be filled in to make up the difference. - -- awstranslate: new “brevity-on” property for turning brevity on. - -- The awstranscriber2 has been refactored to match the speechmatics transcriber design and gained a “show-speaker-label” - property that defines whether to partition speakers in the transcription output. - -- New textaccumulate element for speech synthesis or translation preprocessing that can be used to accumulate words and - punctuation into complete sentences (or sentence fragments) for synthesis and / or translation by further elements - downstream. - -### HLS DASH adaptive streaming improvements - -- Reverse playback, seeking and stream selection fixes in the HLS/DASH clients. - -- hlscmafsink can generate I-frame only playlists now - -- Both hlssink3 and hlscmafsink gained support for use of a single media file, in which case the media playlist will use byte - range tags for each chunk whilst always referencing the same single media file. This can be useful for VOD use cases. - -### decodebin3 and playbin3 improvements - -- decodebin3 now has a separate pad template for metadata streams and considers KLV, ID3 PES streams and ST-2038 ancillary - streams as raw formats for meta streams. This comes also with a new dedicated GST_STREAM_TYPE_METADATA stream type in the - stream collection. - -### Enhanced RTMP and multitrack audio/video support in FLV - -- The FLV container used for RTMP streaming is fairly old and limited in terms of features: It only supports one audio and one - video track, and also only a very limited number of audio and video codecs, most of which are by now quite long in the - tooth. - -- The Enhanced RTMP (V2) specification seeks to remedy this and adds support for modern video codecs such H.265 and AV1 as - well as support for more than one audio and video track inside the container. - -- Both H.265 video and multiple audio/video tracks are now supported for FLV in GStreamer. - -- Support for this comes in form of a new eflvmux muxer element, which is needed to accommodate both the need of backwards - compatibility in the existing FLV muxer and the requirements of the new format. See Tarun’s blog post for more details. - -### MPEG-TS container format improvements - -- The MPEG-TS demuxer gained a “skew-corrections” property that allows disabling of skew corrections, which are done by - default for live inputs to make sure downstream consumes data at the same rate as it comes in if the local clock and the - sender clock drift apart (as they usually do). Disabling skew corrections is useful if the input stream has already been - clock-corrected (for example with mpegtslivesrc) or where the output doesn’t require synchronisation against a clock, - e.g. when it’s re-encoded and/or remuxed and written to file (incl. HLS/DASH output) where it’s desirable to maintain the - original timestamps and frame spacings. - - It is also useful for cases where we want to refer to the PCR stream to figure out global positioning, gap detection and - wrapover correction. - -- tsdemux now also supports demuxing of ID3 tags in MPEG-TS as specified in the Apple Timed Metadata for HTTP Live Streaming - specification. These timed ID3 tags have a media type of meta/x-id3 which is different from the one used to tag audio files, - and an id3metaparse element is needed to properly frame the PES data coming out of the demuxer. -
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/applemedia/helpers.c
Deleted
@@ -1,94 +0,0 @@ -/* - * Copyright (C) 2023 Nirbheek Chauhan <nirbheek@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. - */ - -#include <CoreVideo/CVPixelBuffer.h> -#include "helpers.h" - -GstVideoFormat -gst_video_format_from_cvpixelformat (int fmt) -{ - /* Note that video and full-range color values map to the same format */ - switch (fmt) { - /* YUV */ - case kCVPixelFormatType_420YpCbCr8Planar: - case kCVPixelFormatType_420YpCbCr8PlanarFullRange: - return GST_VIDEO_FORMAT_I420; - case kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange: - case kCVPixelFormatType_420YpCbCr8BiPlanarFullRange: - return GST_VIDEO_FORMAT_NV12; - case kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange: - case kCVPixelFormatType_420YpCbCr10BiPlanarFullRange: - return GST_VIDEO_FORMAT_P010_10LE; - case kCVPixelFormatType_422YpCbCr8: - return GST_VIDEO_FORMAT_UYVY; - case kCVPixelFormatType_422YpCbCr8_yuvs: - return GST_VIDEO_FORMAT_YUY2; - /* Alpha YUV */ - case kCVPixelFormatType_4444AYpCbCr16: - return GST_VIDEO_FORMAT_AYUV64; - /* RGB formats */ - case kCVPixelFormatType_32ARGB: - return GST_VIDEO_FORMAT_ARGB; - case kCVPixelFormatType_32BGRA: - return GST_VIDEO_FORMAT_BGRA; - case kCVPixelFormatType_64ARGB: - return GST_VIDEO_FORMAT_ARGB64_BE; - case kCVPixelFormatType_64RGBALE: - return GST_VIDEO_FORMAT_RGBA64_LE; - default: - return GST_VIDEO_FORMAT_UNKNOWN; - } -} - -int -gst_video_format_to_cvpixelformat (GstVideoFormat fmt) -{ - switch (fmt) { - /* YUV */ - case GST_VIDEO_FORMAT_I420: - return kCVPixelFormatType_420YpCbCr8Planar; - case GST_VIDEO_FORMAT_NV12: - return kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange; - case GST_VIDEO_FORMAT_P010_10LE: - return kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange; - case GST_VIDEO_FORMAT_UYVY: - return kCVPixelFormatType_422YpCbCr8; - case GST_VIDEO_FORMAT_YUY2: - return kCVPixelFormatType_422YpCbCr8_yuvs; - /* Alpha YUV */ - case GST_VIDEO_FORMAT_AYUV64: -/* This is fine for now because Apple only ships LE devices */ -#if G_BYTE_ORDER != G_LITTLE_ENDIAN -#error "AYUV64 is NE but kCVPixelFormatType_4444AYpCbCr16 is LE" -#endif - return kCVPixelFormatType_4444AYpCbCr16; - /* RGB formats */ - case GST_VIDEO_FORMAT_ARGB: - return kCVPixelFormatType_32ARGB; - case GST_VIDEO_FORMAT_BGRA: - return kCVPixelFormatType_32BGRA; - case GST_VIDEO_FORMAT_ARGB64_BE: - return kCVPixelFormatType_64ARGB; - case GST_VIDEO_FORMAT_RGBA64_LE: - return kCVPixelFormatType_64RGBALE; - default: - g_assert_not_reached (); - return -1; - } -}
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/ChangeLog -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/ChangeLog
Changed
@@ -1,3 +1,1156 @@ +=== release 1.28.1 === + +2026-02-26 01:44:06 +0000 Tim-Philipp Müller <tim@centricular.com> + + * gst-plugins-bad.doap: + * meson.build: + Release 1.28.1 + +2026-02-23 13:21:25 +0100 Carlos Bentzen <cadubentzen@igalia.com> + + * gst-libs/gst/codecparsers/gsth265parser.c: + h265parser: Validate num_decoding_units_minus1 in pic_timing SEI + Fixes GST-SA-2026-0012. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/10904> + +2026-02-20 13:34:50 +0100 Carlos Bentzen <cadubentzen@igalia.com> + + * gst-libs/gst/codecparsers/gsth266parser.c: + * gst-libs/gst/codecparsers/gsth266parser.h: + h266parser: Fix out of bounds write when parsing pic_timing SEI + Validate num_decoding_units_minus1 against the array bounds in + GstH266PicTiming using READ_UE_MAX. + Fixes ZDI-CAN-28839, CVE-2026-3081, GST-SA-2026-0010. + Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4898 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/10901> + +2026-02-20 17:40:24 +0100 Carlos Bentzen <cadubentzen@igalia.com> + + * gst-libs/gst/codecparsers/gsth266parser.c: + h266parser: Fix APS ID bounds check in APS parsing + Use GST_H266_MAX_APS_COUNT - 1 as the upper bound to match the spec + constraint and array size. + Fixes ZDI-CAN-28911, CVE-2026-3086, GST-SA-2026-0009. + Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4904 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/10899> + +2026-02-20 17:10:04 +0100 Carlos Bentzen <cadubentzen@igalia.com> + + * gst-libs/gst/codecparsers/gsth266parser.c: + h266parser: Validate tile index bounds in picture partition parsing + Ensure computed tile_idx stays within valid range before using it + as an array index to prevent out-of-bounds reads. + Fixes ZDI-CAN-28910, CVE-2026-3084, SA-2026-0011. + Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4902 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/10898> + +2026-02-11 22:07:49 +0100 Víctor Manuel Jáquez Leal <vjaquez@igalia.com> + + * gst-libs/gst/codecparsers/gstjpegparser.c: + libs: jpegparser: boundary checks before copying it + READ_BYTES macro reads data from a byte reader and then copy it to a storage + variable. This patch adds a validation that the length to read cannot be bigger + than the storage size. + This macro right now is used only for storage variables of guint8 arrays. + We have validated in the specification (sections F.1.2.1.2 and F.1.2.2.1 in ITU + T.81) that Huffman tables (both AC and DC) aren't bigger than 256. + Fixes SA-2026-0003, CVE-2026-3082, ZDI-CAN-28840. + Fixes: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4899> + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/10896> + +2026-02-12 09:50:23 +0200 Sebastian Dröge <sebastian@centricular.com> + + * gst/dvbsuboverlay/dvb-sub.c: + dvbsuboverlay: Avoid integer overflows and unreasonably large displays/regions + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/10894> + +2026-02-11 20:45:12 +0200 Sebastian Dröge <sebastian@centricular.com> + + * gst/dvbsuboverlay/dvb-sub.c: + dvbsuboverlay: Add missing bounds checks to the parser everywhere + Fixes SA-2026-0007, ZDI-CAN-28838, CVE-2026-2923. + Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4897 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/10894> + +2026-02-25 17:22:52 +0200 Sebastian Dröge <sebastian@centricular.com> + + * gst/dvbsuboverlay/dvb-sub.c: + * gst/dvbsuboverlay/dvb-sub.h: + dvbsuboverlay: Mark parsed byte array as const + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/10894> + +2026-02-22 02:50:20 +0530 Nirbheek Chauhan <nirbheek@centricular.com> + + * sys/applemedia/meson.build: + applemedia: Small simplifications to the vulkan checks + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/10874> + +2026-02-22 02:49:34 +0530 Nirbheek Chauhan <nirbheek@centricular.com> + + * sys/applemedia/avfvideosrc.h: + avfvideosrc: Small fixes to the plugin header + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/10874> + +2026-02-22 02:45:15 +0530 Nirbheek Chauhan <nirbheek@centricular.com> + + * meson.build: + * sys/applemedia/meson.build: + * sys/applemedia/plugin.m: + applemedia: Get rid of AVFoundation-related defines + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/10874> + +2026-02-22 00:41:33 +0530 Nirbheek Chauhan <nirbheek@centricular.com> + + * meson.build: + * sys/applemedia/meson.build: + * sys/applemedia/plugin.m: + applemedia: Remove outdated HAVE_VIDEOTOOLBOX define + All platform versions we support have VideoToolbox now. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/10874> + +2026-02-22 00:38:33 +0530 Nirbheek Chauhan <nirbheek@centricular.com> + + * meson.build: + * sys/applemedia/vtenc.c: + applemedia: Fix broken HAVE_VIDEOTOOLBOX_10_9_6 define + We now use VTCompressionSessionPrepareToEncodeFrames() correctly. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/10874> + +2026-02-22 00:55:45 +0530 Nirbheek Chauhan <nirbheek@centricular.com> + + * sys/applemedia/meson.build: + applemedia: Sort sources list, fix indentation + No functional changes. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/10874> + +2026-02-20 13:23:06 +0100 Piotr Brzeziński <piotr@centricular.com> + + * sys/applemedia/vtenc.c: + * sys/applemedia/vtenc.h: + vtdec: Calculate DTS offset correctly + Previous method was too simple and didn't offset DTS enough. + videotestsrc ! vtenc_h264 ! qtmux ! fakesink with GST_DEBUG=2 showed + qtmux complaining about DTS > PTS right away, on latest macOS at least. + If we only ever get one frame from upstream, it'll get pushed out when + drain() is called. Otherwise, it goes out as soon as the second frame + arrives and we can calculate the offset. Of course in some cases we know + right away that DTS offset won't be needed and then this is all + bypassed. + If incoming frames don't have PTS set, we don't set a DTS offset at all. + This is because VideoToolbox, according to its docs, simply requires PTS + to be provided alongside the frame being submitted to the encoder. From + my testing, when PTS is invalid, VT will just not set DTS at all on the + output buffers, so we don't need the offset. + 1st PTS minus 2nd PTS should always give us enough offset while being + more precise than e.g. using the DBP size instead. Similar logic is + already used in other encoders such as vah26*enc or svthevcenc. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/10873> + +2026-02-20 16:05:14 +0100 Piotr Brzeziński <piotr@centricular.com> + + * sys/applemedia/vtdec.c: + vtdec: Fix wrong DPB size check in the output loop + The condition was always slightly wrong, but rather harmless. However + after my 'fix' in 30b213a86fd5ed8f654572bd35dff31af5a36334 it became + possible that with dpb_size=0 we end up busy looping because obviously + the queue length could not be <0, so the loop would never sleep... + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/10863> + +2026-02-19 16:47:12 +0100 Piotr Brzeziński <piotr@centricular.com> + + * sys/applemedia/vtenc.c: + * sys/applemedia/vtenc.h: + vtenc: Make sure draining actually drains all frames, port fixes from vtdec, unify naming + This commit mostly ports existing fixes from vtdec to vtenc. Also makes + them use the same naming to follow/compare the logic easier. + vtenc was missing the is_draining flag that we already have in vtdec. + It's mostly useful to make sure the output loop outputs all the frames + from the queue before it pauses when draining. Without it, it's possible + for some frames to end up being flushed instead of drained. + Additionally, if we're draining or flushing, the output callback will + now always push to the output queue no matter if it goes over the size + limit. This is already present in vtdec and reduces the risk of the VT + thread getting stuck when the output loop stops and won't actively + consume buffers. + I also renamed a few functions to make them match vtdec and make more + sense. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/10860> + +2026-02-19 16:30:07 +0100 Piotr Brzeziński <piotr@centricular.com> + + * sys/applemedia/vtdec.c: + * sys/applemedia/vtdec.h: + vtdec: Make sure VT thread won't get stuck after a downstream error + Without this, if output loop stops because of an error we might end up + stuck because the VT thread can't push out the remaning frames. + This is already present in vtenc and is also needed here in vtdec. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/10860> + +2026-02-19 16:27:45 +0100 Piotr Brzeziński <piotr@centricular.com> + + * sys/applemedia/vtdec.c: + vtdec: Fix return value in flush() + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/10860> + +2026-02-20 14:19:42 -0500 Daniel Morin <daniel.morin@collabora.com> + + * ext/onnx/gstonnxinference.c: + onnx: set dims_order on GstTensor + - set dims_order on GstTensor
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/README.md -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/README.md
Changed
@@ -1,12 +1,8 @@ -GStreamer 1.28.x stable series - -WHAT IT IS ----------- +# GStreamer This is GStreamer, a framework for streaming media. -WHERE TO START --------------- +## Where to start We have a website at @@ -28,169 +24,598 @@ https://matrix.to/#/#gstreamer:gstreamer.org -GStreamer 1.0 series --------------------- +This repository contains all official modules supported by the GStreamer +community which can be found in the `subprojects/` directory. + +## Getting started + +### Install git and python 3.8+ + +If you're on Linux, you probably already have these. On macOS, new versions of +Xcode ship Python 3 already. If you're on an older Xcode, you can use the +official Python installer(https://www.python.org/downloads/mac-osx/). + +You can find instructions for Windows below(#windows-prerequisites-setup). + +### Install meson and ninja + +Meson 1.1 or newer is required. + +On Linux and macOS you can get meson through your package manager or using: + +``` +$ pip3 install --user meson +``` + +This will install meson into `~/.local/bin` which may or may not be included +automatically in your PATH by default. + +You should get `ninja` using your package manager or download the official +release(https://github.com/ninja-build/ninja/releases) and put the `ninja` +binary in your PATH. + +You can find instructions for Windows below(#windows-prerequisites-setup). + + +If you used the official Python installer on macOS instead of the Python +3 shipped with Xcode, you might need to execute "Install Certificates.command" +from the Python folder in the user Applications folder: + +``` +$ /Applications/Python\ 3.*/Install\ Certificates.command +``` + +Otherwise you will get this error when downloading meson wraps: + +``` +urllib.error.URLError: urlopen error SSL: CERTIFICATE_VERIFY_FAILED certificate verify failed +``` + +### Build GStreamer and its modules + +You can get all GStreamer built running: + +``` +meson setup builddir +meson compile -C builddir +``` + +This will automatically create the `builddir` directory and build everything +inside it. + +NOTE: On Windows, meson will automatically detect and use the latest Visual +Studio if GCC, clang, etc are not available in `PATH`. Use the `--vsenv` +argument to force the use of Visual Studio. + +NOTE: Meson will not update subprojects automatically once a subproject has +been fetched. Remember to update subprojects if wrap files are updated. + +``` +meson subprojects update +``` + +### External dependencies + +All mandatory dependencies of GStreamer are included as meson subprojects(https://mesonbuild.com/Subprojects.html): +libintl, zlib, libffi, glib. Some optional dependencies are also included as +subprojects, such as ffmpeg, x264, json-glib, graphene, openh264, orc, etc. + +Mandatory dependencies will be automatically built if meson cannot find them on +your system using pkg-config. The same is true for optional dependencies that +are included as subprojects. You can find a full list by looking at the +`subprojects` directory. + +Plugins that need optional dependencies that aren't included can only be built +if they are provided by the system. Instructions on how to build some common +ones such as Qt5/QML are listed below. If you do not know how to provide an +optional dependency needed by a plugin, you should use Cerbero(https://gitlab.freedesktop.org/gstreamer/cerbero/#description) +which handles this for you automatically. + +Plugins will be automatically enabled if possible, but you can ensure that +a particular plugin (especially if it has external dependencies) is built by +enabling the gstreamer repository that ships it and the plugin inside it. For +example, to enable the Qt5 plugin in the gst-plugins-good repository, you need +to run meson as follows: + +``` +meson -Dgood=enabled -Dgst-plugins-good:qt5=enabled builddir +``` + +This will cause Meson to error out if the plugin could not be enabled. You can +also flip the default and disable all plugins except those explicitly enabled +like so: + +``` +meson -Dauto_features=disabled -Dgstreamer:tools=enabled -Dbad=enabled -Dgst-plugins-bad:openh264=enabled +``` + +This will disable all optional features and then enable the `openh264` plugin +and the tools that ship with the core gstreamer repository: `gst-inspect-1.0`, +`gst-launch-1.0`, etc. As usual, you can change these values on a builddir that +has already been setup with `meson configure -Doption=value`. + +### Building the Qt5 QML plugin + +If `qmake` is not in `PATH` and pkgconfig files are not available, you can +point the `QMAKE` env var to the Qt5 installation of your choosing before +running `meson` as shown above. + +The plugin will be automatically enabled if possible, but you can ensure that +it is built by passing `-Dgood=enabled -Dgst-plugins-good:qt5=enabled` to `meson`. + +### Building the Intel MSDK plugin + +On Linux, you need to have development files for `libmfx` installed. On +Windows, if you have the Intel Media SDK(https://software.intel.com/en-us/media-sdk), +it will set the `INTELMEDIASDKROOT` environment variable, which will be used by +the build files to find `libmfx`. + +The plugin will be automatically enabled if possible, but you can ensure it by +passing `-Dbad=enabled -Dgst-plugins-bad:msdk=enabled` to `meson`. + +### Building plugins with (A)GPL-licensed dependencies + +Some plugins have GPL- or AGPL-licensed dependencies and will only be built +if you have explicitly opted in to allow (A)GPL-licensed dependencies by +passing `-Dgpl=enabled` to Meson. + +List of plugins with (A)GPL-licensed dependencies (non-exhaustive) in gst-plugins-bad: + - dts (DTS audio decoder plugin) + - faad (Free AAC audio decoder plugin) + - iqa (Image quality assessment plugin based on dssim-c) + - mpeg2enc (MPEG-2 video encoder plugin) + - mplex (audio/video multiplexer plugin) + - ofa (Open Fingerprint Architecture library plugin) + - resindvd (Resin DVD playback plugin) + - x265 (HEVC/H.265 video encoder plugin) + +List of plugins with (A)GPL-licensed dependencies (non-exhaustive) in gst-plugins-ugly: + - a52dec (Dolby Digital (AC-3) audio decoder plugin) + - cdio (CD audio source plugin based on libcdio) + - dvdread (DVD video source plugin based on libdvdread) + - mpeg2dec (MPEG-2 video decoder plugin based on libmpeg2) + - sidplay (Commodore 64 audio decoder plugin based on libsidplay) + - x264 (H.264 video encoder plugin based on libx264) + +### Static build + +Since *1.18.0*, when doing a static build using `--default-library=static`, +a shared library `gstreamer-full-1.0`, in addition to a package config file, +will be produced and includes all enabled GStreamer plugins and libraries. +A list of libraries that needs to be exposed in `gstreamer-full-1.0` +ABI can be set using `gst-full-libraries` option. +glib-2.0, gobject-2.0 and gstreamer-1.0 are always included. + +``` +meson setup --default-library=static -Dgst-full-libraries=gstreamer-app-1.0,gstreamer-video-1.0 builddir +``` + +GStreamer *1.18* requires applications using gstreamer-full-1.0 to initialize +static plugins by calling `gst_init_static_plugins()` after `gst_init()`. That +function is defined in `gst/gstinitstaticplugins.h` header file. + +Since *1.20.0*, `gst_init_static_plugins()` is called automatically by +`gst_init()` and applications don't have to call it manually any more. +The header file has been removed from public API. + +One can use the `gst-full-version-script` option to pass a +version script(https://www.gnu.org/software/gnulib/manual/html_node/LD-Version-Scripts.html) +to the linker. This can be used to control the exact symbols that are exported by +the `gstreamer-full` library, allowing the linker to garbage collect unused code +and so, reduce the total library size. A default script
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/RELEASE -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/RELEASE
Changed
@@ -1,4 +1,4 @@ -This is GStreamer gst-plugins-bad 1.28.0. +This is GStreamer gst-plugins-bad 1.28.1 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.0.tar.xz/docs/libs/codecparsers/sitemap.txt -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/docs/libs/codecparsers/sitemap.txt
Changed
@@ -1,1 +1,1 @@ -c-index +gi-index
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/docs/meson.build -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/docs/meson.build
Changed
@@ -118,6 +118,7 @@ 'webrtc': webrtc_gir0.full_path(), 'audio': audio_gir0.full_path(), 'transcoder': transcoder_gir0.full_path(), + 'codecparsers': codecparsers_gir0.full_path(), 'codecs': codecs_gir0.full_path(), 'dxva': dxva_gir0.full_path(), 'mse': mse_gir0.full_path(), @@ -133,6 +134,7 @@ webrtc_gir0, audio_gir0, transcoder_gir0, + codecparsers_gir0, codecs_gir0, dxva_gir0, mse_gir0,
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/docs/plugins/gst_plugins_cache.json -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/docs/plugins/gst_plugins_cache.json
Changed
@@ -7383,7 +7383,7 @@ "GInitiallyUnowned", "GObject" , - "klass": "Src/Network", + "klass": "Source/Network", "long-name": "Audio/Video Transport Protocol (AVTP) Source", "pad-templates": { "src": { @@ -19675,7 +19675,7 @@ "signals": {} }, "videocodectestsink": { - "author": "Nicolas Dufresne <nicolas.dufresne@collabora.com", + "author": "Nicolas Dufresne <nicolas.dufresne@collabora.com>", "description": "Sink to test video CODEC conformance", "hierarchy": "GstVideoCodecTestSink", @@ -19685,7 +19685,7 @@ "GInitiallyUnowned", "GObject" , - "klass": "Debug/video/Sink", + "klass": "Debug/Video/Sink", "long-name": "Video CODEC Test Sink", "pad-templates": { "sink": { @@ -22517,7 +22517,7 @@ "description": "DTLS decoder and encoder plugins", "elements": { "dtlsdec": { - "author": "Patrik Oldsberg patrik.oldsberg@ericsson.com", + "author": "Patrik Oldsberg <patrik.oldsberg@ericsson.com>", "description": "Decodes DTLS packets", "hierarchy": "GstDtlsDec", @@ -22639,7 +22639,7 @@ } }, "dtlsenc": { - "author": "Patrik Oldsberg patrik.oldsberg@ericsson.com", + "author": "Patrik Oldsberg <patrik.oldsberg@ericsson.com>", "description": "Encodes packets with DTLS", "hierarchy": "GstDtlsEnc", @@ -22749,7 +22749,7 @@ } }, "dtlssrtpdec": { - "author": "Patrik Oldsberg patrik.oldsberg@ericsson.com", + "author": "Patrik Oldsberg <patrik.oldsberg@ericsson.com>", "description": "Decodes SRTP packets with a key received from DTLS", "hierarchy": "GstDtlsSrtpDec", @@ -22828,7 +22828,7 @@ "rank": "none" }, "dtlssrtpdemux": { - "author": "Patrik Oldsberg patrik.oldsberg@ericsson.com", + "author": "Patrik Oldsberg <patrik.oldsberg@ericsson.com>", "description": "Demultiplexes DTLS and SRTP packets", "hierarchy": "GstDtlsSrtpDemux", @@ -22859,7 +22859,7 @@ "rank": "none" }, "dtlssrtpenc": { - "author": "Patrik Oldsberg patrik.oldsberg@ericsson.com", + "author": "Patrik Oldsberg <patrik.oldsberg@ericsson.com>", "description": "Encodes SRTP packets with a key received from DTLS", "hierarchy": "GstDtlsSrtpEnc", @@ -26866,7 +26866,7 @@ "GInitiallyUnowned", "GObject" , - "klass": "Filter/Analysis/Video", + "klass": "Filter/Analyzer/Video", "long-name": "Video field analysis", "pad-templates": { "sink": { @@ -37969,7 +37969,7 @@ "GInitiallyUnowned", "GObject" , - "klass": "Src/Video", + "klass": "Source/Video", "long-name": "Ising0r", "pad-templates": { "src": { @@ -38036,7 +38036,7 @@ "GInitiallyUnowned", "GObject" , - "klass": "Src/Video", + "klass": "Source/Video", "long-name": "Lissajous0r", "pad-templates": { "src": { @@ -38089,7 +38089,7 @@ "GInitiallyUnowned", "GObject" , - "klass": "Src/Video", + "klass": "Source/Video", "long-name": "Nois0r", "pad-templates": { "src": { @@ -38113,7 +38113,7 @@ "GInitiallyUnowned", "GObject" , - "klass": "Src/Video", + "klass": "Source/Video", "long-name": "onecol0r", "pad-templates": { "src": { @@ -38180,7 +38180,7 @@ "GInitiallyUnowned", "GObject" , - "klass": "Src/Video", + "klass": "Source/Video", "long-name": "Partik0l", "pad-templates": { "src": { @@ -38233,7 +38233,7 @@ "GInitiallyUnowned", "GObject" , - "klass": "Src/Video", + "klass": "Source/Video", "long-name": "Plasma", "pad-templates": { "src": { @@ -38342,7 +38342,7 @@ "GInitiallyUnowned", "GObject" , - "klass": "Src/Video", + "klass": "Source/Video", "long-name": "test_pat_B", "pad-templates": { "src": { @@ -38409,7 +38409,7 @@ "GInitiallyUnowned", "GObject" , - "klass": "Src/Video", + "klass": "Source/Video", "long-name": "test_pat_C", "pad-templates": { "src": { @@ -38488,7 +38488,7 @@ "GInitiallyUnowned", "GObject" , - "klass": "Src/Video", + "klass": "Source/Video", "long-name": "test_pat_G", "pad-templates": { "src": { @@ -38595,7 +38595,7 @@ "GInitiallyUnowned", "GObject" , - "klass": "Src/Video", + "klass": "Source/Video", "long-name": "test_pat_I", "pad-templates": { "src": { @@ -38702,7 +38702,7 @@ "GInitiallyUnowned", "GObject" , - "klass": "Src/Video", + "klass": "Source/Video", "long-name": "test_pat_L", "pad-templates": { "src": { @@ -38755,7 +38755,7 @@ "GInitiallyUnowned", "GObject" , - "klass": "Src/Video", + "klass": "Source/Video", "long-name": "test_pat_R", "pad-templates": { "src": { @@ -42359,7 +42359,7 @@ } }, "ipcslavepipeline": { - "author": "Vincent Penquerc'h <vincent.penquerch@collabora.co.uk", + "author": "Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>", "description": "Contains the slave part of an inter-process pipeline", "hierarchy": "GstIpcSlavePipeline", @@ -243171,7 +243171,7 @@ "description": "Source and Sink for RIST TR-06-1 streaming specification",
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/ext/analyticsoverlay/gstobjectdetectionoverlay.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/ext/analyticsoverlay/gstobjectdetectionoverlay.c
Changed
@@ -52,6 +52,7 @@ #include <gst/video/video.h> #include <gst/analytics/analytics.h> #include <pango/pangocairo.h> +#include <math.h> #include "gstobjectdetectionoverlay.h" @@ -95,6 +96,7 @@ #define MINIMUM_TEXT_OUTLINE_OFFSET 1.0 +#define ROTATION_EPSILON 0.001f /* Threshold to consider there's a rotation */ GST_DEBUG_CATEGORY_STATIC (objectdetectionoverlay_debug); #define GST_CAT_DEFAULT objectdetectionoverlay_debug @@ -1011,6 +1013,7 @@ GstAnalyticsRelationMeta * rmeta, GstAnalyticsODMtd * od_mtd) { gint x, y, w, h; + gfloat r = 0.0f; gfloat _dummy; gint maxw = GST_VIDEO_INFO_WIDTH (overlay->in_info) - 1; gint maxh = GST_VIDEO_INFO_HEIGHT (overlay->in_info) - 1; @@ -1018,7 +1021,8 @@ guint32 color; cairo_save (ctx->cr); - gst_analytics_od_mtd_get_location (od_mtd, &x, &y, &w, &h, &_dummy); + gst_analytics_od_mtd_get_oriented_location (od_mtd, &x, &y, &w, &h, &r, + &_dummy); x = CLAMP (x, 0, maxw); y = CLAMP (y, 0, maxh); @@ -1046,7 +1050,38 @@ cairo_set_line_width (ctx->cr, overlay->od_outline_stroke_width); /* draw bounding box */ - cairo_rectangle (ctx->cr, x, y, w, h); + if (fabsf (r) < ROTATION_EPSILON) { + /* Fast path: axis-aligned rectangle */ + cairo_rectangle (ctx->cr, x, y, w, h); + } else { + /* Rotated path: calculate 4 corners and draw */ + gfloat xc = x + w / 2.0f; + gfloat yc = y + h / 2.0f; + gfloat cos_r = cosf (r); + gfloat sin_r = sinf (r); + + /* Corner offsets (pre-rotation, relative to center) */ + gfloat corners42 = { + {-w / 2.0f, -h / 2.0f}, /* top-left */ + {w / 2.0f, -h / 2.0f}, /* top-right */ + {w / 2.0f, h / 2.0f}, /* bottom-right */ + {-w / 2.0f, h / 2.0f} /* bottom-left */ + }; + + /* Draw rotated box */ + for (int i = 0; i < 4; i++) { + gfloat dx = cornersi0; + gfloat dy = cornersi1; + gfloat rx = dx * cos_r - dy * sin_r + xc; + gfloat ry = dx * sin_r + dy * cos_r + yc; + + if (i == 0) + cairo_move_to (ctx->cr, rx, ry); + else + cairo_line_to (ctx->cr, rx, ry); + } + cairo_close_path (ctx->cr); + } if (overlay->filled_box == FALSE) cairo_stroke (ctx->cr);
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/ext/avtp/gstavtpsrc.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/ext/avtp/gstavtpsrc.c
Changed
@@ -118,7 +118,7 @@ gst_element_class_set_static_metadata (element_class, "Audio/Video Transport Protocol (AVTP) Source", - "Src/Network", "Receive AVTPDUs from the network", + "Source/Network", "Receive AVTPDUs from the network", "Andre Guedes <andre.guedes@intel.com>"); basesrc_class->start = GST_DEBUG_FUNCPTR (gst_avtp_src_start);
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/ext/dash/meson.build -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/ext/dash/meson.build
Changed
@@ -80,7 +80,7 @@ xml2_dep = dependency('libxml-2.0', version : '>= 2.8', required : get_option('dash'), - default_options: {'python': false}, + default_options: {'python': 'disabled'}, ) if xml2_dep.found()
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/ext/dtls/gstdtlsdec.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/ext/dtls/gstdtlsdec.c
Changed
@@ -199,7 +199,7 @@ gst_element_class_set_static_metadata (element_class, "DTLS Decoder", "Decoder/Network/DTLS", - "Decodes DTLS packets", "Patrik Oldsberg patrik.oldsberg@ericsson.com"); + "Decodes DTLS packets", "Patrik Oldsberg <patrik.oldsberg@ericsson.com>"); } static void
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/ext/dtls/gstdtlsenc.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/ext/dtls/gstdtlsenc.c
Changed
@@ -179,7 +179,7 @@ "DTLS Encoder", "Encoder/Network/DTLS", "Encodes packets with DTLS", - "Patrik Oldsberg patrik.oldsberg@ericsson.com"); + "Patrik Oldsberg <patrik.oldsberg@ericsson.com>"); } static void
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/ext/dtls/gstdtlssrtpdec.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/ext/dtls/gstdtlssrtpdec.c
Changed
@@ -164,7 +164,7 @@ "DTLS-SRTP Decoder", "Decoder/Network/DTLS/SRTP", "Decodes SRTP packets with a key received from DTLS", - "Patrik Oldsberg patrik.oldsberg@ericsson.com"); + "Patrik Oldsberg <patrik.oldsberg@ericsson.com>"); } static void
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/ext/dtls/gstdtlssrtpdemux.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/ext/dtls/gstdtlssrtpdemux.c
Changed
@@ -81,7 +81,7 @@ "DTLS SRTP Demultiplexer", "DTLS/SRTP/Demux", "Demultiplexes DTLS and SRTP packets", - "Patrik Oldsberg patrik.oldsberg@ericsson.com"); + "Patrik Oldsberg <patrik.oldsberg@ericsson.com>"); } static void
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/ext/dtls/gstdtlssrtpenc.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/ext/dtls/gstdtlssrtpenc.c
Changed
@@ -170,7 +170,7 @@ "DTLS-SRTP Encoder", "Encoder/Network/DTLS/SRTP", "Encodes SRTP packets with a key received from DTLS", - "Patrik Oldsberg patrik.oldsberg@ericsson.com"); + "Patrik Oldsberg <patrik.oldsberg@ericsson.com>"); } static void
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/ext/ladspa/gstladspa.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/ext/ladspa/gstladspa.c
Changed
@@ -137,10 +137,17 @@ #if defined (G_OS_WIN32) #define GST_LADSPA_ENVVARS "APPDATA/LADSPA:COMMONPROGRAMFILES/LADSPA" #define GST_LADSPA_DEFAULT_PATH "" -#elif defined (HAVE_OSX) +#define GST_MODULE_SUFFIX ".dll" +#elif defined (__APPLE__) +#include <TargetConditionals.h> +#if TARGET_OS_OSX #define GST_LADSPA_ENVVARS "HOME/Library/Audio/Plug-Ins/LADSPA:HOME/.ladspa" #define GST_LADSPA_DEFAULT_PATH \ "/usr/local/lib/ladspa:/usr/lib/ladspa:/Library/Audio/Plug-Ins/LADSPA" +#endif +#define GST_MODULE_SUFFIX ".so" +#define GST_EXTRA_MODULE_SUFFIX ".dylib" +// No default paths on non-macOS #elif defined (G_OS_UNIX) #define GST_LADSPA_ENVVARS "HOME/.ladspa" #define GST_LADSPA_DEFAULT_PATH \ @@ -149,6 +156,7 @@ "/usr/local/lib/ladspa:" \ "/usr/local/lib64/ladspa:" \ LIBDIR "/ladspa" +#define GST_MODULE_SUFFIX ".so" #else #error "Unsupported OS" #endif @@ -305,7 +313,7 @@ while ((entry_name = g_dir_read_name (dir))) { /* Only attempt to open files with the module suffixes */ - if (!g_str_has_suffix (entry_name, "." G_MODULE_SUFFIX) + if (!g_str_has_suffix (entry_name, GST_MODULE_SUFFIX) #ifdef GST_EXTRA_MODULE_SUFFIX && !g_str_has_suffix (entry_name, GST_EXTRA_MODULE_SUFFIX) #endif @@ -355,12 +363,18 @@ ladspa_path = g_string_new (NULL); search_path = g_getenv ("LADSPA_PATH"); + +#ifdef GST_LADSPA_DEFAULT_PATH if (search_path) { g_string_append_printf (ladspa_path, "%s" G_SEARCHPATH_SEPARATOR_S GST_LADSPA_DEFAULT_PATH, search_path); } else { g_string_append (ladspa_path, GST_LADSPA_DEFAULT_PATH); } +#else + if (search_path) + g_string_append (ladspa_path, search_path); +#endif #ifdef G_OS_WIN32 path = g_getenv ("APPDATA"); @@ -393,7 +407,7 @@ else g_string_append_printf (ladspa_path, "%s/.ladspa", path); -#if defined (HAVE_IOS) || defined (HAVE_OSX) +#if defined (__APPLE__) && defined (TARGET_OS_OSX) g_string_append_printf (ladspa_path, ":%s/Library/Audio/Plug-Ins/LADSPA", path); #endif @@ -463,9 +477,11 @@ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); #endif +#if defined(GST_LADSPA_ENVVARS) && defined(GST_LADSPA_DEFAULT_PATH) gst_plugin_add_dependency_simple (plugin, "LADSPA_PATH:" GST_LADSPA_ENVVARS, GST_LADSPA_DEFAULT_PATH, NULL, GST_PLUGIN_DEPENDENCY_FLAG_NONE); +#endif #ifdef HAVE_LRDF lrdf_init ();
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/ext/lv2/gstlv2.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/ext/lv2/gstlv2.c
Changed
@@ -53,10 +53,14 @@ #if defined (G_OS_WIN32) #define GST_LV2_ENVVARS "APPDATA/LV2:COMMONPROGRAMFILES/LV2" #define GST_LV2_DEFAULT_PATH NULL -#elif defined (HAVE_OSX) +#elif defined (__APPLE__) +#include <TargetConditionals.h> +#if TARGET_OS_OSX #define GST_LV2_ENVVARS "HOME/Library/Audio/Plug-Ins/LV2:HOME/.lv2" #define GST_LV2_DEFAULT_PATH \ "/usr/local/lib/lv2:/usr/lib/lv2:/Library/Audio/Plug-Ins/LV2" +#endif +// No defaults paths on non-macOS #elif defined (G_OS_UNIX) #define GST_LV2_ENVVARS "HOME/.lv2" #define GST_LV2_DEFAULT_PATH \ @@ -323,9 +327,11 @@ gst_lv2_side_right_role_node = lilv_new_uri (gst_lv2_world_node, LV2_PORT_GROUPS__sideRight); +#ifdef GST_LV2_DEFAULT_PATH gst_plugin_add_dependency_simple (plugin, "LV2_PATH:" GST_LV2_ENVVARS, GST_LV2_DEFAULT_PATH, NULL, GST_PLUGIN_DEPENDENCY_FLAG_RECURSE); +#endif /* ensure GstAudioChannelPosition type is registered */ if (!gst_audio_channel_position_get_type ())
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/ext/mpeghdec/gstmpeghdec.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/ext/mpeghdec/gstmpeghdec.c
Changed
@@ -730,6 +730,8 @@ gst_buffer_unmap (inbuf, &imap); if (err != MPEGH_DEC_OK) { GST_ERROR_OBJECT (self, "mpeghdecoder_process failed with %d", err); + GST_AUDIO_DECODER_ERROR (self, 1, STREAM, DECODE, (NULL), + ("Call to mpeghdecoder_process failed with %d.", err), ret); goto out; } } else { @@ -737,6 +739,8 @@ err = mpeghdecoder_flushAndGet (self->dec); if (err != MPEGH_DEC_OK) { GST_ERROR_OBJECT (self, "mpeghdecoder_flushAndGet failed with %d", err); + GST_AUDIO_DECODER_ERROR (self, 1, STREAM, DECODE, (NULL), + ("Call to mpeghdecoder_flushAndGet failed with %d.", err), ret); goto out; } } @@ -756,13 +760,17 @@ MAX_OUTBUF_SIZE, &out_info); gst_buffer_unmap (outbuf, &omap); if (err != MPEGH_DEC_OK && err != MPEGH_DEC_FEED_DATA) { + gst_buffer_unref (outbuf); GST_ERROR_OBJECT (self, "mpeghdecoder_getSamples failed with %d", err); + GST_AUDIO_DECODER_ERROR (self, 1, STREAM, DECODE, (NULL), + ("Call to mpeghdecoder_getSamples failed with %d.", err), ret); goto out; } else { out_samples_per_channel = out_info.numSamplesPerChannel; out_samplerate = out_info.sampleRate; out_channels = out_info.numChannels; if (err == MPEGH_DEC_FEED_DATA) { + gst_buffer_unref (outbuf); continue; } } @@ -771,6 +779,7 @@ out_samples_per_channel * out_channels * sizeof (gint32)); if (!gst_mpeghdec_update_info (self, out_channels, out_samplerate)) { + gst_buffer_unref (outbuf); ret = GST_FLOW_NOT_NEGOTIATED; goto out; } @@ -803,7 +812,8 @@ MPEGH_DECODER_ERROR err; err = mpeghdecoder_flush (self->dec); if (err != MPEGH_DEC_OK) { - GST_ERROR_OBJECT (self, "flushing error: %d", err); + GST_ERROR_OBJECT (self, "Call to mpeghdecoder_flush failed with %d.", + err); } } }
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/ext/onnx/gstonnxinference.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/ext/onnx/gstonnxinference.c
Changed
@@ -112,6 +112,7 @@ size_t output_count; gchar **output_names; GQuark *output_ids; + GstTensorDimOrder *output_dims_orders; GstTensorDataType input_data_type; bool fixedInputImageSize; double *scales; @@ -1104,6 +1105,7 @@ g_value_init (&v_tensors_set, GST_TYPE_UNIQUE_LIST); self->output_ids = g_new0 (GQuark, self->output_count); + self->output_dims_orders = g_new0 (GstTensorDimOrder, self->output_count); for (i = 0; i < self->output_count; i++) { OrtTypeInfo *output_type_info = NULL; @@ -1228,6 +1230,7 @@ /* Get dims-order from modelinfo (defaults to row-major if not specified) */ GstTensorDimOrder dims_order = gst_analytics_modelinfo_get_dims_order (modelinfo, tensor_name); + self->output_dims_ordersi = dims_order; const gchar *dims_order_str = dims_order == GST_TENSOR_DIM_ORDER_COL_MAJOR ? "col-major" : "row-major"; @@ -1351,6 +1354,8 @@ g_free (self->output_ids); self->output_ids = NULL; + g_free (self->output_dims_orders); + self->output_dims_orders = NULL; self->output_count = 0; if (self->memory_info) @@ -1731,6 +1736,7 @@ GstTensor *tensor = gst_tensor_alloc (num_dims); tmeta->tensorsi = tensor; tensor->id = self->output_idsi; + tensor->dims_order = self->output_dims_ordersi; for (j = 0; j < num_dims; ++j) tensor->dimsj = shapej;
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/ext/openh264/gstopenh264enc.cpp -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/ext/openh264/gstopenh264enc.cpp
Changed
@@ -157,7 +157,6 @@ GstVideoCodecState * state); static GstFlowReturn gst_openh264enc_handle_frame (GstVideoEncoder * encoder, GstVideoCodecFrame * frame); -static GstFlowReturn gst_openh264enc_finish (GstVideoEncoder * encoder); static gboolean gst_openh264enc_propose_allocation (GstVideoEncoder * encoder, GstQuery * query); static void gst_openh264enc_set_usage_type (GstOpenh264Enc * openh264enc, @@ -265,7 +264,6 @@ GST_DEBUG_FUNCPTR (gst_openh264enc_handle_frame); video_encoder_class->propose_allocation = GST_DEBUG_FUNCPTR (gst_openh264enc_propose_allocation); - video_encoder_class->finish = GST_DEBUG_FUNCPTR (gst_openh264enc_finish); /* define properties */ g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_USAGE_TYPE, @@ -406,6 +404,7 @@ openh264enc->complexity = DEFAULT_COMPLEXITY; openh264enc->bitrate_changed = FALSE; openh264enc->max_bitrate_changed = FALSE; + openh264enc->profile = PRO_BASELINE; gst_openh264enc_set_usage_type (openh264enc, CAMERA_VIDEO_REAL_TIME); gst_openh264enc_set_rate_control (openh264enc, RC_QUALITY_MODE); } @@ -807,7 +806,8 @@ enc_params.bPrefixNalAddingCtrl = 0; enc_params.fMaxFrameRate = fps_n * 1.0 / fps_d; enc_params.iLoopFilterDisableIdc = openh264enc->deblocking_mode; - enc_params.sSpatialLayers0.uiProfileIdc = gst_openh264enc_get_profile_from_caps (outcaps, allowed_caps); + openh264enc->profile = gst_openh264enc_get_profile_from_caps (outcaps, allowed_caps); + enc_params.sSpatialLayers0.uiProfileIdc = openh264enc->profile; enc_params.sSpatialLayers0.uiLevelIdc = (ELevelIdc) gst_openh264enc_get_level_from_caps (outcaps, allowed_caps); enc_params.sSpatialLayers0.iVideoWidth = enc_params.iPicWidth; enc_params.sSpatialLayers0.iVideoHeight = enc_params.iPicHeight; @@ -921,100 +921,66 @@ GST_OBJECT_UNLOCK (openh264enc); - if (frame) { - src_pic = g_new0 (SSourcePicture, 1); - - if (src_pic == NULL) { - if (frame) - gst_video_codec_frame_unref (frame); - return GST_FLOW_ERROR; - } - //fill default src_pic - src_pic->iColorFormat = videoFormatI420; - src_pic->uiTimeStamp = frame->pts / GST_MSECOND; + src_pic = g_new0 (SSourcePicture, 1); + if (src_pic == NULL) { + gst_video_codec_frame_unref (frame); + return GST_FLOW_ERROR; } + src_pic->iColorFormat = videoFormatI420; + src_pic->uiTimeStamp = frame->pts / GST_MSECOND; + openh264enc->frame_count++; - if (frame) { - if (G_UNLIKELY (openh264enc->frame_count == 1)) { - openh264enc->time_per_frame = (GST_SECOND / openh264enc->framerate); - openh264enc->previous_timestamp = frame->pts; - } else { - openh264enc->time_per_frame = (guint64) - (openh264enc->time_per_frame * 0.8 + (frame->pts - - openh264enc->previous_timestamp) * 0.2); - openh264enc->previous_timestamp = frame->pts; - if (openh264enc->frame_count % 10 == 0) { - fps = GST_SECOND / (gdouble) openh264enc->time_per_frame; - openh264enc->encoder->SetOption (ENCODER_OPTION_FRAME_RATE, &fps); - } + if (G_UNLIKELY (openh264enc->frame_count == 1)) { + openh264enc->time_per_frame = (GST_SECOND / openh264enc->framerate); + openh264enc->previous_timestamp = frame->pts; + } else { + openh264enc->time_per_frame = (guint64) + (openh264enc->time_per_frame * 0.8 + (frame->pts - + openh264enc->previous_timestamp) * 0.2); + openh264enc->previous_timestamp = frame->pts; + if (openh264enc->frame_count % 10 == 0) { + fps = GST_SECOND / (gdouble) openh264enc->time_per_frame; + openh264enc->encoder->SetOption (ENCODER_OPTION_FRAME_RATE, &fps); } } - if (frame) { - gst_video_frame_map (&video_frame, &openh264enc->input_state->info, - frame->input_buffer, GST_MAP_READ); - src_pic->iPicWidth = GST_VIDEO_FRAME_WIDTH (&video_frame); - src_pic->iPicHeight = GST_VIDEO_FRAME_HEIGHT (&video_frame); - src_pic->iStride0 = GST_VIDEO_FRAME_COMP_STRIDE (&video_frame, 0); - src_pic->iStride1 = GST_VIDEO_FRAME_COMP_STRIDE (&video_frame, 1); - src_pic->iStride2 = GST_VIDEO_FRAME_COMP_STRIDE (&video_frame, 2); - src_pic->pData0 = GST_VIDEO_FRAME_COMP_DATA (&video_frame, 0); - src_pic->pData1 = GST_VIDEO_FRAME_COMP_DATA (&video_frame, 1); - src_pic->pData2 = GST_VIDEO_FRAME_COMP_DATA (&video_frame, 2); - - force_keyframe = GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME (frame); - if (force_keyframe) { - openh264enc->encoder->ForceIntraFrame (true); - GST_DEBUG_OBJECT (openh264enc, - "Got force key unit event, next frame coded as intra picture"); - } + gst_video_frame_map (&video_frame, &openh264enc->input_state->info, + frame->input_buffer, GST_MAP_READ); + src_pic->iPicWidth = GST_VIDEO_FRAME_WIDTH (&video_frame); + src_pic->iPicHeight = GST_VIDEO_FRAME_HEIGHT (&video_frame); + src_pic->iStride0 = GST_VIDEO_FRAME_COMP_STRIDE (&video_frame, 0); + src_pic->iStride1 = GST_VIDEO_FRAME_COMP_STRIDE (&video_frame, 1); + src_pic->iStride2 = GST_VIDEO_FRAME_COMP_STRIDE (&video_frame, 2); + src_pic->pData0 = GST_VIDEO_FRAME_COMP_DATA (&video_frame, 0); + src_pic->pData1 = GST_VIDEO_FRAME_COMP_DATA (&video_frame, 1); + src_pic->pData2 = GST_VIDEO_FRAME_COMP_DATA (&video_frame, 2); + + force_keyframe = GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME (frame); + if (force_keyframe) { + openh264enc->encoder->ForceIntraFrame (true); + GST_DEBUG_OBJECT (openh264enc, + "Got force key unit event, next frame coded as intra picture"); } memset (&frame_info, 0, sizeof (SFrameBSInfo)); ret = openh264enc->encoder->EncodeFrame (src_pic, &frame_info); if (ret != cmResultSuccess) { - if (frame) { - gst_video_frame_unmap (&video_frame); - gst_video_codec_frame_unref (frame); - g_free (src_pic); - GST_ELEMENT_ERROR (openh264enc, STREAM, ENCODE, - ("Could not encode frame"), ("Openh264 returned %d", ret)); - return GST_FLOW_ERROR; - } else { - return GST_FLOW_EOS; - } - } - - if (videoFrameTypeSkip == frame_info.eFrameType) { - if (frame) { - gst_video_frame_unmap (&video_frame); - gst_video_encoder_finish_frame (encoder, frame); - g_free (src_pic); - } - - return GST_FLOW_OK; - } - - if (frame) { gst_video_frame_unmap (&video_frame); gst_video_codec_frame_unref (frame); g_free (src_pic); - src_pic = NULL; - frame = NULL; - } - - /* FIXME: openh264 has no way for us to get a connection - * between the input and output frames, we just have to - * guess based on the input */ - frame = gst_video_encoder_get_oldest_frame (encoder); - if (!frame) { GST_ELEMENT_ERROR (openh264enc, STREAM, ENCODE, - ("Could not encode frame"), ("openh264enc returned %d", ret)); - gst_video_codec_frame_unref (frame); + ("Could not encode frame"), ("Openh264 returned %d", ret)); return GST_FLOW_ERROR; } + gst_video_frame_unmap (&video_frame); + g_free (src_pic); + + if (videoFrameTypeSkip == frame_info.eFrameType) { + return gst_video_encoder_finish_frame (encoder, frame); + } + if (videoFrameTypeIDR == frame_info.eFrameType) { GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT (frame); } else { @@ -1030,37 +996,22 @@ frame->output_buffer = gst_video_encoder_allocate_output_buffer (encoder, buf_length); - buf_length = 0; for (i = 0; i < frame_info.iLayerNum; i++) { gsize layer_size = 0; for (j = 0; j < frame_info.sLayerInfoi.iNalCount; j++) { layer_size += frame_info.sLayerInfoi.pNalLengthInBytej; } - gst_buffer_fill (frame->output_buffer, buf_length, frame_info.sLayerInfoi.pBsBuf, layer_size); + gst_buffer_fill (frame->output_buffer, buf_length, + frame_info.sLayerInfoi.pBsBuf, layer_size); buf_length += layer_size; } - GST_LOG_OBJECT (openh264enc, "openh264 picture %scoded OK!", - (ret != cmResultSuccess) ? "NOT " : ""); + GST_LOG_OBJECT (openh264enc, "openh264 picture coded OK!"); return gst_video_encoder_finish_frame (encoder, frame); }
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/ext/openh264/gstopenh264enc.h -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/ext/openh264/gstopenh264enc.h
Changed
@@ -93,6 +93,7 @@ ECOMPLEXITY_MODE complexity; gboolean bitrate_changed; gboolean max_bitrate_changed; + EProfileIdc profile; }; struct _GstOpenh264EncClass
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/ext/openni2/gstopenni2src.cpp -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/ext/openni2/gstopenni2src.cpp
Changed
@@ -156,7 +156,7 @@ gst_element_class_set_static_metadata (element_class, "Openni2 client source", "Source/Video", - "Extract readings from an OpenNI supported device (Kinect etc). ", + "Extract readings from an OpenNI supported device (Kinect etc.)", "Miguel Casas-Sanchez <miguelecasassanchez@gmail.com>"); element_class->change_state = gst_openni2_src_change_state;
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/ext/sctp/usrsctp/meson.build -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/ext/sctp/usrsctp/meson.build
Changed
@@ -64,7 +64,7 @@ compile_args += compiler.get_supported_arguments( '-Wno-address-of-packed-member', ) -elif system in 'darwin', 'ios' +elif host_system == 'darwin' compile_args += '-D__APPLE_USE_RFC_2292', + compiler.get_supported_arguments(
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/ext/smoothstreaming/gstsmoothstreaming-plugin.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/ext/smoothstreaming/gstsmoothstreaming-plugin.c
Changed
@@ -37,5 +37,5 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, smoothstreaming, - "Microsoft's Smooth Streaming format support ", + "Microsoft's Smooth Streaming format support", plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/ext/smoothstreaming/meson.build -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/ext/smoothstreaming/meson.build
Changed
@@ -21,7 +21,7 @@ } xml28_dep = dependency('libxml-2.0', version: '>= 2.8', required: get_option('smoothstreaming'), - default_options: {'python': false}) + default_options: {'python': 'disabled'}) if xml28_dep.found() gstmss = library('gstsmoothstreaming',
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/ext/ttml/meson.build -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/ext/ttml/meson.build
Changed
@@ -1,5 +1,5 @@ libxml_dep = dependency('libxml-2.0', version : '>= 2.9.2', required : get_option('ttml'), - default_options: {'python': false}) + default_options: {'python': 'disabled'}) pango_dep = dependency('pango', required : get_option('ttml')) cairo_dep = dependency('cairo', required : get_option('ttml')) pangocairo_dep = dependency('pangocairo', required : get_option('ttml'))
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/ext/vulkan/vkav1dec.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/ext/vulkan/vkav1dec.c
Changed
@@ -806,11 +806,6 @@ guint8 ref_frame_sign_bias = 0; guint8 i; - for (i = 0; i < STD_VIDEO_AV1_NUM_REF_FRAMES; i++) { - ref_frame_sign_bias |= (fh->ref_frame_sign_biasi <= 0) << i; - stdav1_ref->SavedOrderHintsi = fh->order_hintsi; - } - /* *INDENT-OFF* */ *stdav1_ref = (StdVideoDecodeAV1ReferenceInfo) { .flags = (StdVideoDecodeAV1ReferenceInfoFlags) { @@ -818,10 +813,15 @@ .segmentation_enabled = fh->segmentation_params.segmentation_enabled, }, .frame_type = (StdVideoAV1FrameType)fh->frame_type, - .RefFrameSignBias = ref_frame_sign_bias, .OrderHint = fh->order_hint, }; + for (i = 0; i < STD_VIDEO_AV1_NUM_REF_FRAMES; i++) { + ref_frame_sign_bias |= (fh->ref_frame_sign_biasi <= 0) << i; + stdav1_ref->SavedOrderHintsi = fh->order_hintsi; + } + stdav1_ref->RefFrameSignBias = ref_frame_sign_bias; + *vkav1_slot = (VkVideoDecodeAV1DpbSlotInfoKHR) { .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_DPB_SLOT_INFO_KHR, .pStdReferenceInfo = stdav1_ref,
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/ext/webp/gstwebpdec.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/ext/webp/gstwebpdec.c
Changed
@@ -104,7 +104,7 @@ &gst_webp_dec_sink_pad_template); gst_element_class_set_static_metadata (element_class, "WebP image decoder", "Codec/Decoder/Image", "Decode images from WebP format", - "Sreerenj Balachandran <sreerenj.balachandrn@intel.com>"); + "Sreerenj Balachandran <sreerenj.balachandran@intel.com>"); g_object_class_install_property (gobject_class, PROP_BYPASS_FILTERING, g_param_spec_boolean ("bypass-filtering", "Bypass Filtering",
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/ext/webrtc/gstwebrtcbin.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/ext/webrtc/gstwebrtcbin.c
Changed
@@ -2864,6 +2864,7 @@ if (!(sctp_transport = webrtc->priv->sctp_transport)) { sctp_transport = webrtc_sctp_transport_new (); + gst_object_ref_sink (sctp_transport); sctp_transport->transport = g_object_ref (webrtc->priv->data_channel_transport->transport); sctp_transport->webrtcbin = webrtc; @@ -4714,12 +4715,23 @@ guint answer_caps_size = gst_caps_get_size (answer_caps); for (guint l = 0; l < answer_caps_size; l++) { const GstStructure *s = gst_caps_get_structure (answer_caps, l); - const gchar *enc_name = gst_structure_get_string (s, "encoding-name"); - gchar *tmp = g_ascii_strdown (enc_name, -1); + const gchar *enc_name = NULL; + gchar *tmp = NULL; gint target_pt = -1; gint original_target_pt = -1; guint target_ssrc = 0; + enc_name = gst_structure_get_string (s, "encoding-name"); + + /* The SDP might have been munged and we have no guarantee that + * gst_sdp_media_get_caps_from_media() adds an encoding-name field to all caps. */ + if (!enc_name) { + GST_WARNING_OBJECT (webrtc, + "encoding-name missing in %" GST_PTR_FORMAT, s); + continue; + } + + tmp = g_ascii_strdown (enc_name, -1); if (g_strv_contains (disallowed_payloads, tmp)) { g_free (tmp); continue;
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/ext/webrtc/transportstream.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/ext/webrtc/transportstream.c
Changed
@@ -229,7 +229,8 @@ GstWebRTCBin *webrtc; GstWebRTCICETransport *ice_trans; - stream->transport = gst_webrtc_dtls_transport_new (stream->session_id); + stream->transport = + gst_object_ref_sink (gst_webrtc_dtls_transport_new (stream->session_id)); webrtc = GST_WEBRTC_BIN (gst_object_get_parent (GST_OBJECT (object)));
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/ext/webrtcdsp/gstwebrtcechoprobe.cpp -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/ext/webrtcdsp/gstwebrtcechoprobe.cpp
Changed
@@ -265,7 +265,7 @@ "Acoustic Echo Canceller probe", "Generic/Audio", "Gathers playback buffers for webrtcdsp", - "Nicolas Dufresne <nicolas.dufrsesne@collabora.com>"); + "Nicolas Dufresne <nicolas.dufresne@collabora.com>"); }
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/ext/zxing/gstzxing.cpp -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/ext/zxing/gstzxing.cpp
Changed
@@ -62,9 +62,12 @@ #include <gst/video/video.h> -#include "ReadBarcode.h" -#include "TextUtfEncoding.h" -#include "ZXVersion.h" +#if __has_include("ZXing/WriteBarcode.h") /* only available in version >= 3.x */ +#include "ZXing/ZXingCpp.h" /* future proof one-stop-shop header */ +#else +#include "ZXing/ReadBarcode.h" +#include "ZXing/ZXVersion.h" +#endif using namespace ZXing; @@ -139,7 +142,7 @@ {BARCODE_FORMAT_CODE_39, "CODE_39", "code_39"}, {BARCODE_FORMAT_CODE_93, "CODE_93", "code_93"}, {BARCODE_FORMAT_CODE_128, "CODE_128", "code_128"}, - {BARCODE_FORMAT_DATA_MATRIX, "PNG", "png"}, + {BARCODE_FORMAT_DATA_MATRIX, "DATA_MATRIX", "data_matrix"}, {BARCODE_FORMAT_EAN_8, "EAN_8", "ean_8"}, {BARCODE_FORMAT_EAN_13, "EAN_13", "ean_13"}, {BARCODE_FORMAT_ITF, "ITF", "itf"}, @@ -392,7 +395,11 @@ switch (in_info->finfo->format) { case GST_VIDEO_FORMAT_ARGB: case GST_VIDEO_FORMAT_xRGB: + #if ZXING_VERSION_MAJOR >= 3 + zxing->image_format = ImageFormat::ARGB; + #else zxing->image_format = ImageFormat::XRGB; + #endif break; case GST_VIDEO_FORMAT_Y444: case GST_VIDEO_FORMAT_Y42B: @@ -415,7 +422,8 @@ GstZXing *zxing = GST_ZXING (vfilter); gpointer data; gint height, width; - #if ZXING_VERSION_MAJOR >= 2 && ZXING_VERSION_MINOR >= 2 + #if ZXING_VERSION_MAJOR >= 3 || \ + (ZXING_VERSION_MAJOR >= 2 && ZXING_VERSION_MINOR >= 2) ReaderOptions hints; #else DecodeHints hints; @@ -423,7 +431,12 @@ hints.setTryRotate(zxing->rotate); hints.setTryHarder(!zxing->faster); - hints.setFormats(BarcodeFormatFromString (barcode_formatszxing->barcode_format.value_name)); + try { + hints.setFormats(BarcodeFormatFromString (barcode_formatszxing->barcode_format.value_name)); + } catch (const std::invalid_argument&) { + /* since 3.0 zxing-cpp throws if BarcodeFormatFromString() can't parse the string. + * see https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4893#note_3325953 */ + } /* all formats we support start with an 8-bit Y plane. zxing doesn't need * to know about the chroma plane(s) */
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/codecparsers/gstav1bitwriter.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/codecparsers/gstav1bitwriter.c
Changed
@@ -18,6 +18,14 @@ * Boston, MA 02110-1301, USA. */ +/** + * SECTION:gstav1bitwriter + * @title: GstAV1BitWriter + * @short_description: Functions for writing bitstream headers + * + * Since: 1.28 + */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/codecparsers/gstav1parser.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/codecparsers/gstav1parser.c
Changed
@@ -21,6 +21,7 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ + /** * SECTION:gstav1parser * @title: GstAV1Parser @@ -67,7 +68,7 @@ * should call gst_av1_parser_reference_frame_update() to update the parser's inside * state(such as reference information, global segmentation information, etc). * - * @since: 1.18.00 + * Since: 1.18 */ #ifdef HAVE_CONFIG_H @@ -4668,7 +4669,7 @@ } /** - * gst_av1_parser_new: + * gst_av1_parser_new: (skip) * * Allocates a new #GstAV1Parser, *
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/codecparsers/gsth264bitwriter.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/codecparsers/gsth264bitwriter.c
Changed
@@ -18,6 +18,14 @@ * Boston, MA 02110-1301, USA. */ +/** + * SECTION:gsth264bitwriter + * @title: GstH264BitWriter + * @short_description: Functions for writing bitstream headers + * + * Since: 1.28 + */ + #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -1405,7 +1413,7 @@ /** * gst_h264_bit_writer_sei: - * @sei_messages: An array of #GstH264SEIMessage to write + * @sei_messages: (element-type GstH264SEIMessage): An array of #GstH264SEIMessage to write * @start_code: whether adding the nal start code * @data: (out): the bit stream generated by the sei messages * @size: (inout): the size in bytes of the input and output
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/codecparsers/gsth264parser.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/codecparsers/gsth264parser.c
Changed
@@ -1414,7 +1414,7 @@ /******** API *************/ /** - * gst_h264_nal_parser_new: + * gst_h264_nal_parser_new: (skip) * * Creates a new #GstH264NalParser. It should be freed with * gst_h264_nal_parser_free after use. @@ -1650,7 +1650,7 @@ * @offset: the offset in @data from which to parse the NAL unit * @size: the size of @data * @nal_length_size: the size in bytes of the AVC nal length prefix. - * @nalus: a caller allocated GArray of #GstH264NalUnit where to store parsed nal headers + * @nalus: (element-type GstH264NalUnit): a caller allocated GArray of #GstH264NalUnit where to store parsed nal headers * @consumed: (out): the size of consumed bytes * * Parses @data for packetized (e.g., avc/avc3) bitstream and @@ -2709,7 +2709,7 @@ * gst_h264_parser_parse_sei: * @nalparser: a #GstH264NalParser * @nalu: The %GST_H264_NAL_SEI #GstH264NalUnit to parse - * @messages: The GArray of #GstH264SEIMessage to fill. The caller must free it when done. + * @messages: (element-type GstH264SEIMessage): The GArray of #GstH264SEIMessage to fill. The caller must free it when done. * * Parses @nalu containing one or more Supplementary Enhancement Information messages, * and allocates and fills the @messages array. @@ -3485,7 +3485,7 @@ /** * gst_h264_create_sei_memory: * @start_code_prefix_length: a length of start code prefix, must be 3 or 4 - * @messages: (transfer none): a GArray of #GstH264SEIMessage + * @messages: (element-type GstH264SEIMessage) (transfer none): a GArray of #GstH264SEIMessage * * Creates raw byte-stream format (a.k.a Annex B type) SEI nal unit data * from @messages @@ -3509,7 +3509,7 @@ /** * gst_h264_create_sei_memory_avc: * @nal_length_size: a size of nal length field, allowed range is 1, 4 - * @messages: (transfer none): a GArray of #GstH264SEIMessage + * @messages: (element-type GstH264SEIMessage) (transfer none): a GArray of #GstH264SEIMessage * * Creates raw packetized format SEI nal unit data from @messages * @@ -3913,7 +3913,7 @@ /** * gst_h264_profile_from_string: - * @string: the descriptive name for #GstH264Profile + * @profile: the descriptive name for #GstH264Profile * * Returns a #GstH264Profile for the @string. *
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/codecparsers/gsth264parser.h -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/codecparsers/gsth264parser.h
Changed
@@ -1321,11 +1321,12 @@ }; /** - * _GstH264SEIMessage.payload.user_data_unregistered: + * GstH264SEIMessage: + * @payloadType: #GstH264SEIPayloadType + * @payload: union of all possible SEI message data types * - * User Data Unregistered - * - * Since: 1.22 + * Constains information about SEI message. The content depends on the + * @payloadType. */ struct _GstH264SEIMessage { @@ -1341,6 +1342,14 @@ GstH264MasteringDisplayColourVolume mastering_display_colour_volume; GstH264ContentLightLevel content_light_level; GstH264SEIUnhandledPayload unhandled_payload; + + /** + * GstH264SEIMessage.user_data_unregistered: + * + * User Data Unregistered + * + * Since: 1.22 + */ GstH264UserDataUnregistered user_data_unregistered; /* ... could implement more */ } payload;
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/codecparsers/gsth265bitwriter.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/codecparsers/gsth265bitwriter.c
Changed
@@ -18,6 +18,14 @@ * Boston, MA 02110-1301, USA. */ +/** + * SECTION:gsth265bitwriter + * @title: GstH265BitWriter + * @short_description: Functions for writing bitstream headers + * + * Since: 1.28 + */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/codecparsers/gsth265parser.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/codecparsers/gsth265parser.c
Changed
@@ -72,6 +72,9 @@ #define MAX_DPB_SIZE 16 +/* ITU-T H.265 (V10) (07/2024) A.4.2, Table A.8: MaxSliceSegmentsPerPicture */ +#define GST_H265_MAX_SLICE_SEGMENTS_PER_PICTURE 1800 + #ifndef GST_DISABLE_GST_DEBUG #define GST_CAT_DEFAULT gst_h265_debug_category_get() static GstDebugCategory * @@ -770,24 +773,24 @@ static gboolean gst_h265_parser_parse_short_term_ref_pic_sets (GstH265ShortTermRefPicSet * - stRPS, NalReader * nr, guint8 stRpsIdx, GstH265SPS * sps) + stRPS, NalReader * nr, guint8 stRpsIdx, GstH265SPS * sps, + GstH265SPSEXT * sps_ext) { guint8 num_short_term_ref_pic_sets; guint8 RefRpsIdx = 0; gint16 deltaRps = 0; - guint8 use_delta_flag16 = { 0 }; - guint8 used_by_curr_pic_flag16 = { 0 }; - guint32 delta_poc_s0_minus116 = { 0 }; - guint32 delta_poc_s1_minus116 = { 0 }; gint j, i = 0; gint dPoc; + GstH265ShortTermRefPicSetExt *stRPSEXT = + &sps_ext->short_term_ref_pic_set_extstRpsIdx; + GST_DEBUG ("parsing \"ShortTermRefPicSetParameters\""); /* set default values for fields that might not be present in the bitstream and have valid defaults */ for (j = 0; j < 16; j++) - use_delta_flagj = 1; + stRPSEXT->use_delta_flagj = 1; num_short_term_ref_pic_sets = sps->num_short_term_ref_pic_sets; @@ -810,30 +813,31 @@ stRPS->NumDeltaPocsOfRefRpsIdx = RefRPS->NumDeltaPocs; for (j = 0; j <= RefRPS->NumDeltaPocs; j++) { - READ_UINT8 (nr, used_by_curr_pic_flagj, 1); - if (!used_by_curr_pic_flagj) - READ_UINT8 (nr, use_delta_flagj, 1); + READ_UINT8 (nr, stRPSEXT->used_by_curr_pic_flagj, 1); + if (!stRPSEXT->used_by_curr_pic_flagj) + READ_UINT8 (nr, stRPSEXT->use_delta_flagj, 1); } /* 7-47: calculate NumNegativePics, DeltaPocS0 and UsedByCurrPicS0 */ i = 0; for (j = (RefRPS->NumPositivePics - 1); j >= 0; j--) { dPoc = RefRPS->DeltaPocS1j + deltaRps; - if (dPoc < 0 && use_delta_flagRefRPS->NumNegativePics + j) { + if (dPoc < 0 && stRPSEXT->use_delta_flagRefRPS->NumNegativePics + j) { stRPS->DeltaPocS0i = dPoc; stRPS->UsedByCurrPicS0i++ = - used_by_curr_pic_flagRefRPS->NumNegativePics + j; + stRPSEXT->used_by_curr_pic_flagRefRPS->NumNegativePics + j; } } - if (deltaRps < 0 && use_delta_flagRefRPS->NumDeltaPocs) { + if (deltaRps < 0 && stRPSEXT->use_delta_flagRefRPS->NumDeltaPocs) { stRPS->DeltaPocS0i = deltaRps; - stRPS->UsedByCurrPicS0i++ = used_by_curr_pic_flagRefRPS->NumDeltaPocs; + stRPS->UsedByCurrPicS0i++ = + stRPSEXT->used_by_curr_pic_flagRefRPS->NumDeltaPocs; } for (j = 0; j < RefRPS->NumNegativePics; j++) { dPoc = RefRPS->DeltaPocS0j + deltaRps; - if (dPoc < 0 && use_delta_flagj) { + if (dPoc < 0 && stRPSEXT->use_delta_flagj) { stRPS->DeltaPocS0i = dPoc; - stRPS->UsedByCurrPicS0i++ = used_by_curr_pic_flagj; + stRPS->UsedByCurrPicS0i++ = stRPSEXT->used_by_curr_pic_flagj; } } stRPS->NumNegativePics = i; @@ -842,21 +846,22 @@ i = 0; for (j = (RefRPS->NumNegativePics - 1); j >= 0; j--) { dPoc = RefRPS->DeltaPocS0j + deltaRps; - if (dPoc > 0 && use_delta_flagj) { + if (dPoc > 0 && stRPSEXT->use_delta_flagj) { stRPS->DeltaPocS1i = dPoc; - stRPS->UsedByCurrPicS1i++ = used_by_curr_pic_flagj; + stRPS->UsedByCurrPicS1i++ = stRPSEXT->used_by_curr_pic_flagj; } } - if (deltaRps > 0 && use_delta_flagRefRPS->NumDeltaPocs) { + if (deltaRps > 0 && stRPSEXT->use_delta_flagRefRPS->NumDeltaPocs) { stRPS->DeltaPocS1i = deltaRps; - stRPS->UsedByCurrPicS1i++ = used_by_curr_pic_flagRefRPS->NumDeltaPocs; + stRPS->UsedByCurrPicS1i++ = + stRPSEXT->used_by_curr_pic_flagRefRPS->NumDeltaPocs; } for (j = 0; j < RefRPS->NumPositivePics; j++) { dPoc = RefRPS->DeltaPocS1j + deltaRps; - if (dPoc > 0 && use_delta_flagRefRPS->NumNegativePics + j) { + if (dPoc > 0 && stRPSEXT->use_delta_flagRefRPS->NumNegativePics + j) { stRPS->DeltaPocS1i = dPoc; stRPS->UsedByCurrPicS1i++ = - used_by_curr_pic_flagRefRPS->NumNegativePics + j; + stRPSEXT->used_by_curr_pic_flagRefRPS->NumNegativePics + j; } } stRPS->NumPositivePics = i; @@ -872,33 +877,35 @@ stRPS->NumNegativePics)); for (i = 0; i < stRPS->NumNegativePics; i++) { - READ_UE_MAX (nr, delta_poc_s0_minus1i, 32767); + READ_UE_MAX (nr, stRPSEXT->delta_poc_s0_minus1i, 32767); /* 7-51 */ READ_UINT8 (nr, stRPS->UsedByCurrPicS0i, 1); + stRPSEXT->used_by_curr_pic_flagi = stRPS->UsedByCurrPicS0i; if (i == 0) { /* 7-53 */ - stRPS->DeltaPocS0i = -(delta_poc_s0_minus1i + 1); + stRPS->DeltaPocS0i = -(stRPSEXT->delta_poc_s0_minus1i + 1); } else { /* 7-55 */ stRPS->DeltaPocS0i = - stRPS->DeltaPocS0i - 1 - (delta_poc_s0_minus1i + 1); + stRPS->DeltaPocS0i - 1 - (stRPSEXT->delta_poc_s0_minus1i + 1); } } for (j = 0; j < stRPS->NumPositivePics; j++) { - READ_UE_MAX (nr, delta_poc_s1_minus1j, 32767); + READ_UE_MAX (nr, stRPSEXT->delta_poc_s1_minus1j, 32767); /* 7-52 */ READ_UINT8 (nr, stRPS->UsedByCurrPicS1j, 1); + stRPSEXT->used_by_curr_pic_flagi + j = stRPS->UsedByCurrPicS1j; if (j == 0) { /* 7-54 */ - stRPS->DeltaPocS1j = delta_poc_s1_minus1j + 1; + stRPS->DeltaPocS1j = stRPSEXT->delta_poc_s1_minus1j + 1; } else { /* 7-56 */ stRPS->DeltaPocS1j = - stRPS->DeltaPocS1j - 1 + (delta_poc_s1_minus1j + 1); + stRPS->DeltaPocS1j - 1 + (stRPSEXT->delta_poc_s1_minus1j + 1); } } @@ -1136,7 +1143,8 @@ if (hrd->sub_pic_hrd_params_present_flag && hrd->sub_pic_cpb_params_in_pic_timing_sei_flag) { - READ_UE (nr, tim->num_decoding_units_minus1); + READ_UE_MAX (nr, tim->num_decoding_units_minus1, + GST_H265_MAX_SLICE_SEGMENTS_PER_PICTURE - 1); READ_UINT8 (nr, tim->du_common_cpb_removal_delay_flag, 1); if (tim->du_common_cpb_removal_delay_flag) @@ -1381,7 +1389,7 @@ /******** API *************/ /** - * gst_h265_parser_new: + * gst_h265_parser_new: (skip) * * Creates a new #GstH265Parser. It should be freed with * gst_h265_parser_free after use. @@ -1625,7 +1633,7 @@ * @offset: the offset from which to parse @data * @size: the size of @data * @nal_length_size: the size in bytes of the HEVC nal length prefix. - * @nalus: a caller allocated GArray of #GstH265NalUnit where to store parsed nal headers + * @nalus: (element-type GstH265NalUnit): a caller allocated GArray of #GstH265NalUnit where to store parsed nal headers * @consumed: the size of consumed bytes * * Parses @data for packetized (e.g., hvc1/hev1) bitstream and @@ -1852,7 +1860,7 @@ /** * gst_h265_parse_vps: * @nalu: The %GST_H265_NAL_VPS #GstH265NalUnit to parse - * @sps: The #GstH265VPS to fill. + * @vps: The #GstH265VPS to fill. * * Parses @data, and fills the @vps structure. * @@ -1994,22 +2002,25 @@ } /** - * gst_h265_parser_parse_sps: + * gst_h265_parser_parse_sps_ext: * @parser: a #GstH265Parser * @nalu: The %GST_H265_NAL_SPS #GstH265NalUnit to parse * @sps: The #GstH265SPS to fill. + * @sps_ext: The #GstH265SPSEXT matching the #GstH265SPS to fill.
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/codecparsers/gsth265parser.h -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/codecparsers/gsth265parser.h
Changed
@@ -62,7 +62,7 @@ * Since: 1.18 */ #define GST_H265_IS_NAL_TYPE_IRAP(nal_type) \ - ((nal_type) >= GST_H265_NAL_SLICE_BLA_W_LP && (nal_type) <= RESERVED_IRAP_NAL_TYPE_MAX) + ((nal_type) >= GST_H265_NAL_SLICE_BLA_W_LP && (nal_type) <= GST_H265_RESERVED_IRAP_NAL_TYPE_MAX) /** * GST_H265_IS_NAL_TYPE_BLA: @@ -299,20 +299,20 @@ GST_H265_NAL_SUFFIX_SEI = 40 } GstH265NalUnitType; -#define RESERVED_NON_IRAP_SUBLAYER_NAL_TYPE_MIN 10 -#define RESERVED_NON_IRAP_SUBLAYER_NAL_TYPE_MAX 15 +#define GST_H265_RESERVED_NON_IRAP_SUBLAYER_NAL_TYPE_MIN 10 +#define GST_H265_RESERVED_NON_IRAP_SUBLAYER_NAL_TYPE_MAX 15 -#define RESERVED_IRAP_NAL_TYPE_MIN 22 -#define RESERVED_IRAP_NAL_TYPE_MAX 23 +#define GST_H265_RESERVED_IRAP_NAL_TYPE_MIN 22 +#define GST_H265_RESERVED_IRAP_NAL_TYPE_MAX 23 -#define RESERVED_NON_IRAP_NAL_TYPE_MIN 24 -#define RESERVED_NON_IRAP_NAL_TYPE_MAX 31 +#define GST_H265_RESERVED_NON_IRAP_NAL_TYPE_MIN 24 +#define GST_H265_RESERVED_NON_IRAP_NAL_TYPE_MAX 31 -#define RESERVED_NON_VCL_NAL_TYPE_MIN 41 -#define RESERVED_NON_VCL_NAL_TYPE_MAX 47 +#define GST_H265_RESERVED_NON_VCL_NAL_TYPE_MIN 41 +#define GST_H265_RESERVED_NON_VCL_NAL_TYPE_MAX 47 -#define UNSPECIFIED_NON_VCL_NAL_TYPE_MIN 48 -#define UNSPECIFIED_NON_VCL_NAL_TYPE_MAX 63 +#define GST_H265_UNSPECIFIED_NON_VCL_NAL_TYPE_MIN 48 +#define GST_H265_UNSPECIFIED_NON_VCL_NAL_TYPE_MAX 63 /** * GstH265ParserResult: @@ -474,6 +474,7 @@ typedef struct _GstH265VPS GstH265VPS; typedef struct _GstH265SPS GstH265SPS; +typedef struct _GstH265SPSEXT GstH265SPSEXT; typedef struct _GstH265PPS GstH265PPS; typedef struct _GstH265ProfileTierLevel GstH265ProfileTierLevel; typedef struct _GstH265SubLayerHRDParams GstH265SubLayerHRDParams; @@ -488,6 +489,7 @@ typedef struct _GstH265RefPicListModification GstH265RefPicListModification; typedef struct _GstH265PredWeightTable GstH265PredWeightTable; typedef struct _GstH265ShortTermRefPicSet GstH265ShortTermRefPicSet; +typedef struct _GstH265ShortTermRefPicSetExt GstH265ShortTermRefPicSetExt; typedef struct _GstH265SliceHdr GstH265SliceHdr; typedef struct _GstH265PicTiming GstH265PicTiming; @@ -836,6 +838,30 @@ }; /** + * GstH265ShortTermRefPicSetExt: + * @use_delta_flag: Bit j equals to 1 specifies that the j-th entry in the source candidate + * short-term RPS is included in this candidate short-term RPS. + * @used_by_curr_pic: Bit j specifies if short-term RPS j is used by the current picture. + * @delta_poc_s0_minus1: Specifies the negative picture order count delta for the i-th + * entry in the short-term RPS. See details in section 7.4.8 "Short-term reference + * picture set semantics" of the specification. + * @delta_poc_s1_minus1: Specifies the positive picture order count delta for the i-th + * entry in the short-term RPS. See details in section 7.4.8 "Short-term reference + * picture set semantics" of the specification. + * + * Defines the extended #GstH265ShortTermRefPicSetExt params + * + * Since: 1.28 + */ +struct _GstH265ShortTermRefPicSetExt +{ + guint8 use_delta_flag16; + guint8 used_by_curr_pic_flag16; + guint32 delta_poc_s0_minus116; + guint32 delta_poc_s1_minus116; +}; + +/** * GstH265VUIParams: * @parsed: %TRUE indicate that VUI parameters have been parsed (Since: 1.22) * @aspect_ratio_info_present_flag: %TRUE specifies that aspect_ratio_idc is present. @@ -1264,6 +1290,17 @@ }; /** + * GstH265SPSEXT: + * + * H265 Sequence Parameter Set extension + * + * Since: 1.28 + */ +struct _GstH265SPSEXT { + GstH265ShortTermRefPicSetExt short_term_ref_pic_set_ext65; +}; + +/** * GstH265PPS: * * H265 Picture Parameter Set @@ -1715,11 +1752,12 @@ }; /** - * _GstH265SEIMessage.payload.user_data_unregistered: - * - * User Data Unregistered + * GstH265SEIMessage: + * @payloadType: #GstH265SEIPayloadType + * @payload: union of all possible SEI message data types * - * Since: 1.24 + * Constains information about SEI message. The content depends on the + * @payloadType. */ struct _GstH265SEIMessage { @@ -1733,6 +1771,14 @@ GstH265TimeCode time_code; GstH265MasteringDisplayColourVolume mastering_display_colour_volume; GstH265ContentLightLevel content_light_level; + + /** + * GstH265SEIMessage.user_data_unregistered: + * + * User Data Unregistered + * + * Since: 1.24 + */ GstH265UserDataUnregistered user_data_unregistered; /* ... could implement more */ } payload; @@ -2095,6 +2141,12 @@ GstH265SliceHdr * slice); GST_CODEC_PARSERS_API +GstH265ParserResult gst_h265_parser_parse_slice_hdr_ext (GstH265Parser * parser, + GstH265NalUnit * nalu, + GstH265SliceHdr * slice, + GstH265SPSEXT * sps_ext); + +GST_CODEC_PARSERS_API GstH265ParserResult gst_h265_parser_parse_vps (GstH265Parser * parser, GstH265NalUnit * nalu, GstH265VPS * vps); @@ -2106,6 +2158,12 @@ gboolean parse_vui_params); GST_CODEC_PARSERS_API +GstH265ParserResult gst_h265_parser_parse_sps_ext (GstH265Parser * parser, + GstH265NalUnit * nalu, + GstH265SPS * sps, + GstH265SPSEXT * sps_ext, + gboolean parse_vui_params); +GST_CODEC_PARSERS_API GstH265ParserResult gst_h265_parser_parse_pps (GstH265Parser * parser, GstH265NalUnit * nalu, GstH265PPS * pps); @@ -2145,6 +2203,13 @@ gboolean parse_vui_params); GST_CODEC_PARSERS_API +GstH265ParserResult gst_h265_parse_sps_ext (GstH265Parser * parser, + GstH265NalUnit * nalu, + GstH265SPS * sps, + GstH265SPSEXT * sps_ext, + gboolean parse_vui_params); + +GST_CODEC_PARSERS_API GstH265ParserResult gst_h265_parse_pps (GstH265Parser * parser, GstH265NalUnit * nalu, GstH265PPS * pps);
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/codecparsers/gsth266parser.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/codecparsers/gsth266parser.c
Changed
@@ -1460,7 +1460,8 @@ if (bp->du_hrd_params_present_flag && bp->du_cpb_params_in_pic_timing_sei_flag) { - READ_UE (nr, pt->num_decoding_units_minus1); + READ_UE_MAX (nr, pt->num_decoding_units_minus1, + GST_H266_MAX_DECODING_UNITS_IN_PIC_TIMING - 1); if (pt->num_decoding_units_minus1 > 0) { READ_UINT8 (nr, pt->du_common_cpb_removal_delay_flag, 1); if (pt->du_common_cpb_removal_delay_flag) { @@ -1732,7 +1733,7 @@ } /** - * gst_h266_parser_new: + * gst_h266_parser_new: (skip) * * Creates a new #GstH266Parser. It should be freed with * gst_h266_parser_free after use. @@ -1984,7 +1985,7 @@ * @offset: the offset from which to parse @data * @size: the size of @data * @nal_length_size: the size in bytes of the VVC nal length prefix. - * @nalus: a caller allocated #GArray of #GstH266NalUnit where to store parsed nal headers + * @nalus: (element-type GstH266NalUnit): a caller allocated #GArray of #GstH266NalUnit where to store parsed nal headers * @consumed: the size of consumed bytes * * Parses @data for packetized (e.g., vvc1/vvi1) bitstream and @@ -3841,15 +3842,28 @@ goto error; } - tile_idx += pps->tile_idx_delta_vali; + gint new_tile_idx = (gint) tile_idx + pps->tile_idx_delta_vali; + if (new_tile_idx < 0 || + new_tile_idx >= (gint) pps->num_tiles_in_pic) { + GST_WARNING ("tile_idx %d out of bounds.", new_tile_idx); + goto error; + } + tile_idx = new_tile_idx; } else { pps->tile_idx_delta_vali = 0; - tile_idx += pps->slice_width_in_tiles_minus1i + 1; - if (tile_idx % pps->num_tile_columns == 0) { - tile_idx += pps->slice_height_in_tiles_minus1i * + gint new_tile_idx = (gint) tile_idx + + pps->slice_width_in_tiles_minus1i + 1; + if (new_tile_idx % pps->num_tile_columns == 0) { + new_tile_idx += pps->slice_height_in_tiles_minus1i * pps->num_tile_columns; } + if (new_tile_idx < 0 || + new_tile_idx >= (gint) pps->num_tiles_in_pic) { + GST_WARNING ("tile_idx %d out of bounds.", new_tile_idx); + goto error; + } + tile_idx = new_tile_idx; } } } @@ -4598,7 +4612,7 @@ READ_UINT8 (&nr, params_type, 3); aps->params_type = params_type; READ_UINT8 (&nr, aps->aps_id, 5); - CHECK_ALLOWED_MAX (aps->aps_id, GST_H266_MAX_APS_COUNT); + CHECK_ALLOWED_MAX (aps->aps_id, GST_H266_MAX_APS_COUNT - 1); READ_UINT8 (&nr, aps->chroma_present_flag, 1); switch (aps->params_type) { @@ -5348,7 +5362,7 @@ * gst_h266_parser_parse_picture_hdr: * @parser: a #GstH266Parser * @nalu: The picture header #GstH266NalUnit to parse - * @ph: The #GstH266PicHdr to fill. + * @picture: The #GstH266PicHdr to fill. * * Parses @data, and fills the @ph structure. * @@ -5440,7 +5454,7 @@ * gst_h266_parser_parse_slice_hdr: * @parser: a #GstH266Parser * @nalu: The slice #GstH266NalUnit to parse - * @sh: The #GstH266SliceHdr to fill. + * @slice: The #GstH266SliceHdr to fill. * * Parses @data, and fills the @sh structure. * @@ -6116,9 +6130,9 @@ /** * gst_h266_parser_parse_sei: - * @nalparser: a #GstH266Parser + * @parser: a #GstH266Parser * @nalu: The `GST_H266_NAL_*_SEI` #GstH266NalUnit to parse - * @messages: The GArray of #GstH266SEIMessage to fill. The caller must free + * @messages: (element-type GstH266SEIMessage): The GArray of #GstH266SEIMessage to fill. The caller must free * it when done. * * Parses @data, create and fills the @messages array.
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/codecparsers/gsth266parser.h -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/codecparsers/gsth266parser.h
Changed
@@ -105,6 +105,11 @@ The min coding block size is 8, so min width or height is 8. The min CTU size is 32. */ #define GST_H266_MAX_CTUS_IN_PICTURE (80216064 / 8 / 32) +/* Practical limit for number of decoding units per picture. + The spec allows up to PicSizeInCtbsY which could be very large, + but 600 is a reasonable practical limit matching the array sizes + in GstH266PicTiming. */ +#define GST_H266_MAX_DECODING_UNITS_IN_PIC_TIMING 600 /** * GST_H266_IS_NAL_TYPE_IDR: @@ -182,9 +187,6 @@ /** * GstH266ParserResult: - * - * The result of parsing H266 data. - * * @GST_H266_PARSER_OK: The parsing succeeded. * @GST_H266_PARSER_BROKEN_DATA: The data to parse is broken. * @GST_H266_PARSER_BROKEN_LINK: The link to structure needed for the parsing @@ -193,6 +195,8 @@ * @GST_H266_PARSER_NO_NAL: No nal found during the parsing. * @GST_H266_PARSER_NO_NAL_END: Start of the nal found, but not the end. * + * The result of parsing H266 data. + * * Since: 1.26 */ typedef enum @@ -207,9 +211,6 @@ /** * GstH266Profile: - * - * H.266 Profiles. - * * @GST_H266_PROFILE_MAIN_10: Main 10 profile (A.3.1). * @GST_H266_PROFILE_MAIN_10_STILL_PICTURE: Main 10 Still Picture profile (A.3.1). * @GST_H266_PROFILE_MULTILAYER_MAIN_10: MultiLayer Main 10 profile (A.3.3). @@ -234,6 +235,8 @@ * @GST_H266_PROFILE_MAIN_16_444_STILL_PICTURE: Main 16 4:4:4 Still Picture * profile (A.3.5). * + * H.266 Profiles. + * * Since: 1.26 */ typedef enum { @@ -292,10 +295,6 @@ /** * GstH266NalUnitType: - * - * Indicates the types of H266 Nal Units as - * table 5 - NAL unit type codes and NAL unit type classes. - * * @GST_H266_NAL_SLICE_TRAIL: Coded slice of a trailing picture or subpicture. * @GST_H266_NAL_SLICE_STSA: Coded slice of an STSA picture or subpicture. * @GST_H266_NAL_SLICE_RADL: Coded slice of a RADL picture or subpicture. @@ -319,6 +318,9 @@ * @GST_H266_NAL_SUFFIX_SEI: Suffix Suppliemental enhancement information. * @GST_H266_NAL_FD: Filler data (FD). * + * Indicates the types of H266 Nal Units as + * table 5 - NAL unit type codes and NAL unit type classes. + * * Since: 1.26 */ typedef enum @@ -349,10 +351,6 @@ /** * GstH266SEIPayloadType: - * - * The type of SEI message. - * More other SEIs are specified in Rec.ITU-T H.274 | ISO/IEC 23002-7. - * * @GST_H266_SEI_BUF_PERIOD: Buffering Period SEI Message. * @GST_H266_SEI_PIC_TIMING: Picture Timing SEI Message. * @GST_H266_SEI_REGISTERED_USER_DATA: Registered user data. @@ -362,6 +360,9 @@ * @GST_H266_SEI_FRAME_FIELD_INFO: Frame Field Info SEI Message. * @GST_H266_SEI_SUBPIC_LEVEL_INFO: Subpicture Level Information SEI. * + * The type of SEI message. + * More other SEIs are specified in Rec.ITU-T H.274 | ISO/IEC 23002-7. + * * Since: 1.26 */ typedef enum @@ -379,13 +380,12 @@ /** * GstH266SliceType: - * - * Types of Picture slice. - * * @GST_H266_B_SLICE: B slice type. * @GST_H266_P_SLICE: P slice type. * @GST_H266_I_SLICE: I slice type. * + * Types of Picture slice. + * * Since: 1.26 */ typedef enum @@ -397,14 +397,13 @@ /** * GstH266APSType: - * - * Indicates the types of Adaptation parameter set (APS) as - * Table 6 - APS parameters type codes and types of APS parameters. - * * @GST_H266_ALF_APS: ALF parameters. * @GST_H266_LMCS_APS: LMCS parameters. * @GST_H266_SCALING_APS: Scaling list parameters. * + * Indicates the types of Adaptation parameter set (APS) as + * Table 6 - APS parameters type codes and types of APS parameters. + * * Since: 1.26 */ typedef enum @@ -460,9 +459,6 @@ /** * GstH266NalUnit: - * - * Structure defining the H266 Nal unit headers. - * * @type: A #GstH266NalUnitType. * @layer_id: A nal unit layer id. * @temporal_id_plus1: A nal unit temporal identifier. @@ -474,6 +470,8 @@ * @data: The data from which the Nalu has been parsed. * @header_bytes: The size of the NALU header in bytes. * + * Structure defining the H266 Nal unit headers. + * * Since: 1.26 */ struct _GstH266NalUnit @@ -494,9 +492,6 @@ /** * GstH266GeneralConstraintsInfo: - * - * Structure defining the H266 general constraints info. - * * @present_flag: specifies whether additional syntax elements are present. * @intra_only_constraint_flag: specifies whether sh_slice_type for all slices * in OlsInScope shall be equal to 2. @@ -676,6 +671,8 @@ * shall be equal to 0. * @reserved_zero_bit: the reserved bits. * + * Structure defining the H266 general constraints info. + * * Since: 1.26 */ struct _GstH266GeneralConstraintsInfo { @@ -769,9 +766,6 @@ /** * GstH266ProfileTierLevel: - * - * Structure defining the H266 profile, tier and level. - * * @profile_idc: the profile id. * @tier_flag: specifies the main tier or high tier. * @level_idc: indicates a level to which OlsInScope conforms @@ -790,6 +784,8 @@ * @sub_profile_idc: specifies the i-th interoperability indicator registered * as specified by Rec. ITU-T T.35 * + * Structure defining the H266 profile, tier and level. + * * Since: 1.26 */ struct _GstH266ProfileTierLevel { @@ -811,9 +807,6 @@ /** * GstH266DPBParameters: - * - * Structure defining the H266 DPB parameters. - * * @max_dec_pic_buffering_minus1: specifies the maximum required size of the * DPB in units of picture storage buffers. * @max_num_reorder_pics: specifies the maximum allowed number of pictures of @@ -822,6 +815,8 @@ * @max_latency_increase_plus1: used to compute the value of MaxLatencyPictures, * which specifies the maximum number of pictures in the OLS. * + * Structure defining the H266 DPB parameters. + * * Since: 1.26
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/codecparsers/gstjpeg2000sampling.h -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/codecparsers/gstjpeg2000sampling.h
Changed
@@ -26,9 +26,6 @@ /** * GstJPEG2000Sampling: - * Sampling values from RF 5371 for JPEG 2000 over RTP : https://datatracker.ietf.org/doc/rfc5371/C - * Note: sampling extensions that are not listed in the RFC are signified by an _EXT at the end of the enum - * * @GST_JPEG2000_SAMPLING_NONE: no sampling * @GST_JPEG2000_SAMPLING_RGB: standard Red, Green, Blue color space. * @GST_JPEG2000_SAMPLING_BGR: standard Blue, Green, Red color space. @@ -41,6 +38,9 @@ * @GST_JPEG2000_SAMPLING_YBR410: standard YCbCr color space; Cb and Cr are subsampled vertically by 1/4 alternating the Cb and Cr component. * @GST_JPEG2000_SAMPLING_GRAYSCALE: basically, a single component image of just multilevels of grey. * @GST_JPEG2000_SAMPLING_YBRA4444_EXT: standard YCbCr color space, alpha channel, no subsampling, + * + * Sampling values from RF 5371 for JPEG 2000 over RTP : https://datatracker.ietf.org/doc/rfc5371/C + * Note: sampling extensions that are not listed in the RFC are signified by an _EXT at the end of the enum */ /**
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/codecparsers/gstjpegbitwriter.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/codecparsers/gstjpegbitwriter.c
Changed
@@ -18,6 +18,12 @@ * Boston, MA 02110-1301, USA. */ +/** + * SECTION:gstjpegbitwriter + * @title: GstJpegBitWriter + * @short_description: Functions for writing bitstream headers + */ + /* TODO: Add the support for the "differential mode(lossless mode)", "arithmetic mode" and "progressive mode". */ @@ -125,7 +131,7 @@ /** * gst_jpeg_bit_writer_scan_header: - * @frame_hdr: the scan header of #GstJpegScanHdr to write + * @scan_hdr: the scan header of #GstJpegScanHdr to write * @data: (out): the bit stream generated by this scan header * @size: (inout): the size in bytes of the input and output *
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/codecparsers/gstjpegparser.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/codecparsers/gstjpegparser.c
Changed
@@ -77,6 +77,10 @@ #define READ_BYTES(reader, buf, length) G_STMT_START { \ const guint8 *vals; \ + if (length > sizeof (buf)) { \ + GST_WARNING ("data size is bigger than its storage"); \ + goto failed; \ + } \ if (!gst_byte_reader_get_data (reader, length, &vals)) { \ GST_WARNING ("failed to read bytes, size:%d", length); \ goto failed; \ @@ -600,7 +604,7 @@ /** * gst_jpeg_get_default_huffman_tables: - * @huf_tables: (out): The default DC/AC Huffman tables to fill in + * @huff_tables: (out): The default DC/AC Huffman tables to fill in * * Fills in @huf_tables with the default AC/DC Huffman tables, as * specified by the JPEG standard. @@ -664,7 +668,7 @@ /** * gst_jpeg_parse: - * @segment: (out): pointer to a #GstJpegSegment structure to fill in + * @seg: (out): pointer to a #GstJpegSegment structure to fill in * @data: The data to parse * @size: The size of @data * @offset: The offset from which to start parsing
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/codecparsers/gstmpegvideometa.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/codecparsers/gstmpegvideometa.c
Changed
@@ -129,12 +129,17 @@ /** * gst_buffer_add_mpeg_video_meta: * @buffer: a #GstBuffer + * @seq_hdr: a #GstMpegVideoSequenceHdr + * @seq_ext: a #GstMpegVideoSequenceExt + * @disp_ext: a #GstMpegVideoSequenceDisplayExt + * @pic_hdr: a #GstMpegVideoPictureHdr + * @pic_ext: a #GstMpegVideoPictureExt + * @quant_ext: a #GstMpegVideoQuantMatrixExt * * Creates and adds a #GstMpegVideoMeta to a @buffer. - * * Provided structures must either be %NULL or GSlice-allocated. * - * Returns: (transfer full): a newly created #GstMpegVideoMeta + * Returns: (transfer none): a newly created #GstMpegVideoMeta * * Since: 1.2 */
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/codecparsers/gstmpegvideoparser.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/codecparsers/gstmpegvideoparser.c
Changed
@@ -28,6 +28,8 @@ * @title: GstMpegvideoParser * @short_description: Convenience library for mpeg1 and 2 video * bitstream parsing. + * @sources: + * - gstmpegvideometa.h * * Provides useful functions for mpeg videos bitstream parsing. * @@ -703,7 +705,7 @@ /** * gst_mpeg_video_packet_parse_picture_extension: * @packet: The #GstMpegVideoPacket that carries the data - * @ext: (out): The #GstMpegVideoPictureExt structure to fill + * @picext: (out): The #GstMpegVideoPictureExt structure to fill * * Parse the @ext MPEG Video Picture Extension structure members from * video @packet @@ -932,7 +934,7 @@ * gst_mpeg_video_packet_parse_slice_header: * @packet: The #GstMpegVideoPacket that carries the data * @slice_hdr: (out): The #GstMpegVideoSliceHdr structure to fill - * @seqhdr: The #GstMpegVideoSequenceHdr header + * @seq_hdr: The #GstMpegVideoSequenceHdr header * @seqscaleext: The #GstMpegVideoSequenceScalableExt header * * Parses the @GstMpegVideoSliceHdr structure members from @data
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/codecparsers/gstvc1parser.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/codecparsers/gstvc1parser.c
Changed
@@ -1959,11 +1959,11 @@ if (advanced->hrd_param_flag) { if (seqhdr->advanced.hrd_param.hrd_num_leaky_buckets > - MAX_HRD_NUM_LEAKY_BUCKETS) { + GST_VC1_MAX_HRD_NUM_LEAKY_BUCKETS) { GST_WARNING - ("hrd_num_leaky_buckets (%d) > MAX_HRD_NUM_LEAKY_BUCKETS (%d)", + ("hrd_num_leaky_buckets (%d) > GST_VC1_MAX_HRD_NUM_LEAKY_BUCKETS (%d)", seqhdr->advanced.hrd_param.hrd_num_leaky_buckets, - MAX_HRD_NUM_LEAKY_BUCKETS); + GST_VC1_MAX_HRD_NUM_LEAKY_BUCKETS); goto failed; } for (i = 0; i < seqhdr->advanced.hrd_param.hrd_num_leaky_buckets; i++) @@ -2146,7 +2146,7 @@ } /** - * gst_vc1_bitplanes_new: + * gst_vc1_bitplanes_new: (skip) * * Creates a new #GstVC1BitPlanes. It should be freed with * gst_vc1_bitplanes_free() after use.
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/codecparsers/gstvc1parser.h -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/codecparsers/gstvc1parser.h
Changed
@@ -32,7 +32,7 @@ G_BEGIN_DECLS -#define MAX_HRD_NUM_LEAKY_BUCKETS 31 +#define GST_VC1_MAX_HRD_NUM_LEAKY_BUCKETS 31 /** * GST_VC1_BFRACTION_BASIS: @@ -169,8 +169,8 @@ guint8 hrd_num_leaky_buckets; guint8 bit_rate_exponent; guint8 buffer_size_exponent; - guint16 hrd_rateMAX_HRD_NUM_LEAKY_BUCKETS; - guint16 hrd_bufferMAX_HRD_NUM_LEAKY_BUCKETS; + guint16 hrd_rateGST_VC1_MAX_HRD_NUM_LEAKY_BUCKETS; + guint16 hrd_bufferGST_VC1_MAX_HRD_NUM_LEAKY_BUCKETS; }; /** @@ -200,7 +200,7 @@ guint8 range_mapuv_flag; guint8 range_mapuv; - guint8 hrd_fullMAX_HRD_NUM_LEAKY_BUCKETS; + guint8 hrd_fullGST_VC1_MAX_HRD_NUM_LEAKY_BUCKETS; }; /** @@ -636,7 +636,7 @@ GST_CODEC_PARSERS_API GstVC1ParserResult gst_vc1_parse_slice_header (const guint8 *data, gsize size, - GstVC1SliceHdr *slicehdr, + GstVC1SliceHdr *slicehdr, GstVC1SeqHdr *seqhdr); GST_CODEC_PARSERS_API
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/codecparsers/gstvp9bitwriter.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/codecparsers/gstvp9bitwriter.c
Changed
@@ -18,6 +18,14 @@ * Boston, MA 02110-1301, USA. */ +/** + * SECTION:gstvp9bitwriter + * @title: GstVp9BitWriter + * @short_description: Functions for writing bitstream headers + * + * Since: 1.28 + */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/codecparsers/gstvp9parser.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/codecparsers/gstvp9parser.c
Changed
@@ -626,7 +626,7 @@ /******** API *************/ /** - * gst_vp9_parser_new: + * gst_vp9_parser_new: (skip) * * Creates a new #GstVp9Parser. It should be freed with * gst_vp9_parser_free() after use.
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/codecparsers/gstvp9parser.h -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/codecparsers/gstvp9parser.h
Changed
@@ -90,14 +90,14 @@ } GstVp9ParserResult; /** - * GstVp9Profile: Bitstream profiles indicated by 2-3 bits in the uncompressed header + * GstVp9Profile: * @GST_VP9_PROFILE_0: Profile 0, 8-bit 4:2:0 only. * @GST_VP9_PROFILE_1: Profile 1, 8-bit 4:4:4, 4:2:2, and 4:4:0. * @GST_VP9_PROFILE_2: Profile 2, 10-bit and 12-bit color only, with 4:2:0 sampling. * @GST_VP9_PROFILE_3: Profile 3, 10-bit and 12-bit color only, with 4:2:2/4:4:4/4:4:0 sampling. * @GST_VP9_PROFILE_UNDEFINED: Undefined profile * - * VP9 Profiles + * VP9 Bitstream profiles indicated by 2-3 bits in the uncompressed header. * * Since: 1.8 */
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/codecparsers/meson.build -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/codecparsers/meson.build
Changed
@@ -27,6 +27,7 @@ codecparser_headers = files( 'codecparsers-prelude.h', 'gstmpegvideoparser.h', + 'gsth264bitwriter.h', 'gsth264parser.h', 'gstvc1parser.h', 'gstmpeg4parser.h', @@ -34,9 +35,11 @@ 'gstvp8parser.h', 'gstvp8rangedecoder.h', 'gstjpeg2000sampling.h', + 'gstjpegbitwriter.h', 'gstjpegparser.h', 'gstmpegvideometa.h', 'gstvp9parser.h', + 'gstav1bitwriter.h', 'gstav1parser.h', 'gstlcevcmeta.h', 'gsth266parser.h', @@ -48,7 +51,7 @@ doc_sources += s.full_path() endforeach -libs_c_sources += { +libs_sources += { 'codecparsers': pathsep.join(doc_sources) } @@ -81,8 +84,52 @@ description : 'Bitstream parsers for GStreamer elements', ) +gen_sources = +if build_gir + gir = { + 'sources' : codecparser_sources + codecparser_headers, + 'namespace' : 'GstCodecParsers', + 'nsversion' : api_version, + 'identifier_prefix' : 'Gst', + 'symbol_prefix' : 'gst', + 'export_packages' : pkg_name, + 'includes' : 'Gst-1.0', 'GstBase-1.0', + 'install' : true, + 'extra_args' : gir_init_section + cp_args + + '--c-include=gst/codecs/gstav1decoder.h', + '--c-include=gst/codecparsers/gstav1bitwriter.h', + '--c-include=gst/codecparsers/gstav1parser.h', + '--c-include=gst/codecparsers/gsth264bitwriter.h', + '--c-include=gst/codecparsers/gsth264parser.h', + '--c-include=gst/codecparsers/gsth265parser.h', + '--c-include=gst/codecparsers/gsth266parser.h', + '--c-include=gst/codecparsers/gstjpeg2000sampling.h', + '--c-include=gst/codecparsers/gstjpegbitwriter.h', + '--c-include=gst/codecparsers/gstjpegparser.h', + '--c-include=gst/codecparsers/gstlcevcmeta.h', + '--c-include=gst/codecparsers/gstmpeg4parser.h', + '--c-include=gst/codecparsers/gstmpegvideometa.h', + '--c-include=gst/codecparsers/gstmpegvideoparser.h', + '--c-include=gst/codecparsers/gstvc1parser.h', + '--c-include=gst/codecparsers/gstvp8parser.h', + '--c-include=gst/codecparsers/gstvp8rangedecoder.h', + '--c-include=gst/codecparsers/gstvp9parser.h', + , + 'dependencies' : gstbase_dep + } + library_def += {'gir': gir} + if not static_build + codecparsers_gir = gnome.generate_gir(gstcodecparsers, kwargs: gir) + library_def += {'gir_targets': library_def.get('gir_targets', ) + codecparsers_gir} + gen_sources += codecparsers_gir + endif +endif +gst_libraries += pkg_name, library_def + + gstcodecparsers_dep = declare_dependency(link_with : gstcodecparsers, include_directories : libsinc, + sources: gen_sources, dependencies : gstbase_dep) gst_libraries += pkg_name, {'lib': gstcodecparsers}
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/codecs/gsth265decoder.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/codecs/gsth265decoder.c
Changed
@@ -89,6 +89,9 @@ const GstH265SPS *active_sps; const GstH265PPS *active_pps; + // Store extended sps for each sps ids + GArray *sps_ext; + guint32 SpsMaxLatencyPictures; /* Picture currently being processed/decoded */ @@ -227,6 +230,8 @@ self->priv = priv = gst_h265_decoder_get_instance_private (self); + priv->sps_ext = g_array_sized_new (FALSE, TRUE, sizeof (GstH265SPSEXT), + GST_H265_MAX_SPS_COUNT); priv->last_output_poc = G_MININT32; priv->ref_pic_list_tmp = g_array_sized_new (FALSE, TRUE, @@ -257,6 +262,7 @@ g_array_unref (priv->ref_pic_list1); g_array_unref (priv->nalu); g_array_unref (priv->split_nalu); + g_array_unref (priv->sps_ext); gst_vec_deque_free (priv->output_queue); G_OBJECT_CLASS (parent_class)->finalize (object); @@ -909,12 +915,13 @@ GstH265DecoderPrivate *priv = self->priv; GstH265ParserResult pres; GstH265Slice slice; + GstH265SPSEXT sps_ext; GstH265DecoderNalUnit decoder_nalu; memset (&slice, 0, sizeof (GstH265Slice)); - pres = gst_h265_parser_parse_slice_hdr (priv->preproc_parser, - nalu, &slice.header); + pres = gst_h265_parser_parse_slice_hdr_ext (priv->preproc_parser, + nalu, &slice.header, &sps_ext); if (pres != GST_H265_PARSER_OK) return pres; @@ -962,6 +969,10 @@ g_array_append_val (priv->nalu, decoder_nalu); + if (nalu->type == GST_H265_NAL_SPS) + g_array_index (priv->sps_ext, GstH265SPSEXT, decoder_nalu.unit.sps.id) + = sps_ext; + return GST_H265_PARSER_OK; } @@ -971,6 +982,7 @@ GstH265DecoderPrivate *priv = self->priv; GstH265VPS vps; GstH265SPS sps; + GstH265SPSEXT sps_ext; GstH265PPS pps; GstH265ParserResult ret = GST_H265_PARSER_OK; GstH265DecoderNalUnit decoder_nalu; @@ -991,11 +1003,14 @@ g_array_append_val (priv->nalu, decoder_nalu); break; case GST_H265_NAL_SPS: - ret = gst_h265_parser_parse_sps (priv->preproc_parser, nalu, &sps, TRUE); + ret = + gst_h265_parser_parse_sps_ext (priv->preproc_parser, nalu, &sps, + &sps_ext, TRUE); if (ret != GST_H265_PARSER_OK) break; decoder_nalu.unit.sps = sps; + g_array_index (priv->sps_ext, GstH265SPSEXT, sps.id) = sps_ext; g_array_append_val (priv->nalu, decoder_nalu); break; case GST_H265_NAL_PPS: @@ -2250,3 +2265,21 @@ { return gst_h265_dpb_get_picture (decoder->priv->dpb, system_frame_number); } + +/** + * gst_h265_decoder_get_sps_ext: + * @decoder: a #GstH265Decoder + * @sps : the #GstH265SPS matching the requested #GstH265SPSEXT + * + * Retrieve the extended SPS values attached to the given #GstH265SPS + * + * Returns: (transfer none) (nullable): a #GstH265SPSEXT if successful, or %NULL otherwise + * + * Since: 1.28 + */ +const GstH265SPSEXT * +gst_h265_decoder_get_sps_ext (const GstH265Decoder * decoder, + const GstH265SPS * sps) +{ + return &g_array_index (decoder->priv->sps_ext, GstH265SPSEXT, sps->id); +}
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/codecs/gsth265decoder.h -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/codecs/gsth265decoder.h
Changed
@@ -198,6 +198,10 @@ GstH265Picture * gst_h265_decoder_get_picture (GstH265Decoder * decoder, guint32 system_frame_number) G_GNUC_WARN_UNUSED_RESULT; +GST_CODECS_API +const GstH265SPSEXT * gst_h265_decoder_get_sps_ext (const GstH265Decoder * decoder, + const GstH265SPS * sps); + G_END_DECLS #endif /* __GST_H265_DECODER_H__ */
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/codecs/meson.build -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/codecs/meson.build
Changed
@@ -73,15 +73,16 @@ 'identifier_prefix' : 'Gst', 'symbol_prefix' : 'gst', 'export_packages' : pkg_name, - 'includes' : 'Gst-1.0', 'GstVideo-1.0', + 'includes' : 'Gst-1.0', 'GstVideo-1.0', 'GstCodecParsers-1.0', 'install' : true, 'extra_args' : gir_init_section + '-DGST_USE_UNSTABLE_API' + - '--c-include=gst/codecs/gsth264decoder.h', - '--c-include=gst/codecs/gsth265decoder.h', - '--c-include=gst/codecs/gstvp9decoder.h', - '--c-include=gst/codecs/gstvp8decoder.h', - '--c-include=gst/codecs/gstmpeg2decoder.h', - '--c-include=gst/codecs/gsth266decoder.h', + '--c-include=gst/codecs/gstav1decoder.h', + '--c-include=gst/codecs/gsth264decoder.h', + '--c-include=gst/codecs/gsth265decoder.h', + '--c-include=gst/codecs/gsth266decoder.h', + '--c-include=gst/codecs/gstmpeg2decoder.h', + '--c-include=gst/codecs/gstvp8decoder.h', + '--c-include=gst/codecs/gstvp9decoder.h', , 'dependencies' : gstvideo_dep, gstcodecparsers_dep } @@ -98,4 +99,5 @@ include_directories : libsinc, sources: gen_sources, dependencies : gstvideo_dep, gstcodecparsers_dep) + meson.override_dependency(pkg_name, gstcodecs_dep)
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/play/gstplay.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/play/gstplay.c
Changed
@@ -2221,7 +2221,7 @@ for (l = list; l != NULL; l = l->next) { info = (GstPlayStreamInfo *) l->data; if (g_str_equal (info->stream_id, stream_id)) { - return info; + return g_object_ref (info); } } @@ -2247,17 +2247,19 @@ const gchar * stream_id, GType type) { GstPlayStreamInfo *info; + GstPlayStreamInfo *result_info = NULL; if (!self->media_info || !stream_id) return NULL; info = gst_play_stream_info_find_from_stream_id (self->media_info, stream_id); - if (info && G_OBJECT_TYPE (info) == type) - info = gst_play_stream_info_copy (info); - else - info = NULL; + if (info) { + if (G_OBJECT_TYPE (info) == type) + result_info = gst_play_stream_info_copy (info); + g_object_unref (info); + } - return info; + return result_info; } static void @@ -2280,6 +2282,7 @@ info = gst_play_stream_info_find_from_stream_id (self->media_info, stream_id); if (info) { gst_play_stream_info_update_from_stream (self, info, stream); + g_object_unref (info); emit_signal = TRUE; } g_mutex_unlock (&self->lock);
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/va/gstvadisplay.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/va/gstvadisplay.c
Changed
@@ -95,7 +95,7 @@ static char * _get_desc (const char *vendor, GstVaImplementation impl) { - char *end, *start; + const char *end, *start; char desc1024; size_t size; @@ -145,7 +145,7 @@ break; case GST_VA_IMPLEMENTATION_INTEL_IHD: case GST_VA_IMPLEMENTATION_INTEL_I965:{ - char *end = strstr (vendor, " - "); + const char *end = strstr (vendor, " - "); if (end && sscanf (end, " - %d.%d.", &maj, &min) == 2) { *major = maj; *minor = min;
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/vulkan/gstvkdecoder-private.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/vulkan/gstvkdecoder-private.c
Changed
@@ -84,7 +84,8 @@ return TRUE; priv->vk_populated = - gst_vulkan_video_get_vk_functions (self->queue->device, &priv->vk); + gst_vulkan_video_get_vk_functions (self->queue->device, &priv->vk, + self->codec); return priv->vk_populated; }
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/vulkan/gstvkencoder-private.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/vulkan/gstvkencoder-private.c
Changed
@@ -93,7 +93,8 @@ return TRUE; priv->vk_loaded = - gst_vulkan_video_get_vk_functions (self->queue->device, &priv->vk); + gst_vulkan_video_get_vk_functions (self->queue->device, &priv->vk, + self->codec); return priv->vk_loaded; }
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/vulkan/gstvkvideo-private.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/vulkan/gstvkvideo-private.c
Changed
@@ -70,7 +70,8 @@ gboolean gst_vulkan_video_get_vk_functions (GstVulkanDevice * device, - GstVulkanVideoFunctions * vk_funcs) + GstVulkanVideoFunctions * vk_funcs, + VkVideoCodecOperationFlagBitsKHR codec_op) { gboolean ret = FALSE; GstVulkanInstance *instance; @@ -91,8 +92,16 @@ } G_STMT_END; #define GET_DEVICE_PROC_ADDRESS_REQUIRED(name) GET_PROC_ADDRESS_REQUIRED(name, device) #define GET_INSTANCE_PROC_ADDRESS_REQUIRED(name) GET_PROC_ADDRESS_REQUIRED(name, instance) - GST_VULKAN_DEVICE_VIDEO_FN_LIST (GET_DEVICE_PROC_ADDRESS_REQUIRED); - GST_VULKAN_INSTANCE_VIDEO_FN_LIST (GET_INSTANCE_PROC_ADDRESS_REQUIRED); + GST_VULKAN_DEVICE_VIDEO_FN_LIST_COMMON (GET_DEVICE_PROC_ADDRESS_REQUIRED); + + if (GST_VULKAN_VIDEO_CODEC_OPERATION_IS_DECODE (codec_op)) + GST_VULKAN_DEVICE_VIDEO_FN_LIST_DECODE (GET_DEVICE_PROC_ADDRESS_REQUIRED); + + if (GST_VULKAN_VIDEO_CODEC_OPERATION_IS_ENCODE (codec_op)) { + GST_VULKAN_DEVICE_VIDEO_FN_LIST_ENCODE (GET_DEVICE_PROC_ADDRESS_REQUIRED); + GST_VULKAN_INSTANCE_VIDEO_FN_LIST_ENCODE + (GET_INSTANCE_PROC_ADDRESS_REQUIRED); + } #undef GET_DEVICE_PROC_ADDRESS_REQUIRED #undef GET_INSTANCE_PROC_ADDRESS_REQUIRED #undef GET_PROC_ADDRESS_REQUIRED
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/vulkan/gstvkvideo-private.h -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/vulkan/gstvkvideo-private.h
Changed
@@ -52,7 +52,7 @@ GST_VK_VIDEO_EXTENSION_MAX, } GST_VK_VIDEO_EXTENSIONS; -#define GST_VULKAN_DEVICE_VIDEO_FN_LIST(V) \ +#define GST_VULKAN_DEVICE_VIDEO_FN_LIST_COMMON(V) \ V(CreateVideoSession) \ V(DestroyVideoSession) \ V(GetVideoSessionMemoryRequirements) \ @@ -62,19 +62,25 @@ V(BindVideoSessionMemory) \ V(CmdBeginVideoCoding) \ V(CmdControlVideoCoding) \ - V(CmdEndVideoCoding) \ - V(CmdDecodeVideo) \ + V(CmdEndVideoCoding) + +#define GST_VULKAN_DEVICE_VIDEO_FN_LIST_DECODE(V) \ + V(CmdDecodeVideo) + +#define GST_VULKAN_DEVICE_VIDEO_FN_LIST_ENCODE(V) \ V(CmdEncodeVideo) \ V(GetEncodedVideoSessionParameters) -#define GST_VULKAN_INSTANCE_VIDEO_FN_LIST(V) \ +#define GST_VULKAN_INSTANCE_VIDEO_FN_LIST_ENCODE(V) \ V(GetPhysicalDeviceVideoEncodeQualityLevelProperties) struct _GstVulkanVideoFunctions { #define DEFINE_FUNCTION(name) G_PASTE(G_PASTE(PFN_vk, name), KHR) name; - GST_VULKAN_DEVICE_VIDEO_FN_LIST (DEFINE_FUNCTION) - GST_VULKAN_INSTANCE_VIDEO_FN_LIST (DEFINE_FUNCTION) + GST_VULKAN_DEVICE_VIDEO_FN_LIST_COMMON (DEFINE_FUNCTION) + GST_VULKAN_DEVICE_VIDEO_FN_LIST_DECODE (DEFINE_FUNCTION) + GST_VULKAN_DEVICE_VIDEO_FN_LIST_ENCODE (DEFINE_FUNCTION) + GST_VULKAN_INSTANCE_VIDEO_FN_LIST_ENCODE (DEFINE_FUNCTION) #undef DEFINE_FUNCTION }; @@ -85,7 +91,8 @@ extern const VkComponentMapping _vk_identity_component_map; gboolean gst_vulkan_video_get_vk_functions (GstVulkanDevice * device, - GstVulkanVideoFunctions * vk_funcs); + GstVulkanVideoFunctions * vk_funcs, + VkVideoCodecOperationFlagBitsKHR codec_op); gboolean gst_vulkan_video_session_create (GstVulkanVideoSession * session, GstVulkanDevice * device,
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/vulkan/ios/gstvkwindow_ios.m -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/vulkan/ios/gstvkwindow_ios.m
Changed
@@ -299,16 +299,47 @@ window_ios = window; } --(void) layoutSubViews +-(void) didMoveToWindow +{ + super didMoveToWindow; + self updateDrawableSize; +} + +-(void) layoutSubviews { super layoutSubviews; - CGSize rect = self.bounds.size; - GST_ERROR ("%ix%i", (int) rect.width, (int) rect.height); - gboolean resize = self->width != rect.width || self->height != rect.height; - self->width = rect.width; - self->height = rect.height; + self updateDrawableSize; +} + +-(void) updateDrawableSize +{ + CGFloat scale = self.contentScaleFactor; + if (self.window) { + scale = self.window.screen.scale; + } + + CAMetalLayer *metalLayer = (CAMetalLayer*) self.layer; + metalLayer.contentsScale = scale; + + // Set drawable size in pixels, not points + CGSize drawableSize = CGSizeMake( + self.bounds.size.width * scale, + self.bounds.size.height * scale + ); + metalLayer.drawableSize = drawableSize; + + guint pixel_width = (guint) drawableSize.width; + guint pixel_height = (guint) drawableSize.height; + + GST_DEBUG ("%ux%u (scale=%.1f)", pixel_width, pixel_height, scale); + + gboolean resize = self->width != pixel_width || self->height != pixel_height; + self->width = pixel_width; + self->height = pixel_height; + if (resize && self->window_ios) { - gst_vulkan_window_resize (GST_VULKAN_WINDOW (self->window_ios), rect.width, rect.height); + gst_vulkan_window_resize (GST_VULKAN_WINDOW (self->window_ios), + pixel_width, pixel_height); } }
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/vulkan/meson.build -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/vulkan/meson.build
Changed
@@ -114,7 +114,7 @@ vulkan_conf.set(option, 0) endforeach -if 'ios', 'darwin'.contains(host_system) +if host_system == 'darwin' vulkan_dep = dependency('vulkan', method: 'pkg-config', required : false) if not vulkan_dep.found() # - ios does not support the loader/validation layers @@ -124,7 +124,10 @@ # 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 : vulkan_opt) + vulkan_dep = objcpp.find_library('MoltenVK', required: false) + if not vulkan_dep.found() + vulkan_dep = dependency('MoltenVK', fallback: 'moltenvk', required: vulkan_opt) + endif endif elif host_system == 'windows' vulkan_root = run_command(python3, '-c', 'import os; print(os.environ.get("VK_SDK_PATH"))', check: false).stdout().strip() @@ -233,7 +236,7 @@ endif endif -if 'darwin', 'ios'.contains(host_system) +if host_system == 'darwin' objc = meson.get_compiler('objc') if not objc.has_argument('-fobjc-arc') error('ARC is required for building') @@ -249,7 +252,7 @@ endif endif -if host_system == 'darwin' +if subsystem == 'macos' cocoa_dep = dependency('appleframeworks', modules : 'Cocoa', required : vulkan_opt) if cocoa_dep.found() and cc.has_header('vulkan/vulkan_macos.h', dependencies: vulkan_dep, required: vulkan_opt) @@ -262,9 +265,7 @@ vulkan_conf.set('GST_VULKAN_HAVE_WINDOW_COCOA', 1) enabled_vulkan_winsys += 'cocoa' endif -endif - -if host_system == 'ios' +elif host_system == 'darwin' uikit_dep = dependency('appleframeworks', modules : 'UIKit', 'IOSurface', 'CoreGraphics', 'Metal', required : vulkan_opt) if uikit_dep.found() and cc.has_header('vulkan/vulkan_ios.h', dependencies : vulkan_dep, required: vulkan_opt)
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/wayland/gstwlwindow.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/wayland/gstwlwindow.c
Changed
@@ -741,8 +741,6 @@ GstVideoContentLightLevel *linfo = priv->next_linfo; struct wl_callback *callback; gboolean needs_layout_update = FALSE; - GstVideoMeta *vmeta = gst_wl_buffer_get_video_meta (buffer); - GstVideoCropMeta *cmeta = gst_wl_buffer_get_video_crop_meta (buffer); GstVideoRectangle crop = priv->crop; if (G_UNLIKELY (info)) { @@ -761,20 +759,23 @@ needs_layout_update = TRUE; } - if (vmeta) { - if (priv->buffer_width != vmeta->width - || priv->buffer_height != vmeta->height) { + if (G_LIKELY (buffer)) { + GstVideoMeta *vmeta = gst_wl_buffer_get_video_meta (buffer); + GstVideoCropMeta *cmeta = gst_wl_buffer_get_video_crop_meta (buffer); + + if (vmeta && (priv->buffer_width != vmeta->width + || priv->buffer_height != vmeta->height)) { priv->buffer_width = vmeta->width; priv->buffer_height = vmeta->height; needs_layout_update = TRUE; } - } - if (cmeta) { - crop.x = cmeta->x; - crop.y = cmeta->y; - crop.w = cmeta->width; - crop.h = cmeta->height; + if (cmeta) { + crop.x = cmeta->x; + crop.y = cmeta->y; + crop.w = cmeta->width; + crop.h = cmeta->height; + } } if (gst_wl_window_crop_rectangle_changed (self, &crop)) { @@ -1286,10 +1287,10 @@ /* We can't set the light level if we don't know the luminance range */ if (linfo) { - guint maxFALL = CLAMP (min_luminance + 1, - linfo->max_frame_average_light_level, max_luminance); + guint maxFALL = CLAMP (linfo->max_frame_average_light_level, + min_luminance + 1, max_luminance); guint maxCLL = - CLAMP (maxFALL, linfo->max_content_light_level, max_luminance); + CLAMP (linfo->max_content_light_level, maxFALL, max_luminance); wp_image_description_creator_params_v1_set_max_cll (params, maxCLL); wp_image_description_creator_params_v1_set_max_fall (params, maxFALL); }
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-libs/gst/webrtc/nice/nicestream.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-libs/gst/webrtc/nice/nicestream.c
Changed
@@ -193,6 +193,7 @@ ret = GST_WEBRTC_ICE_TRANSPORT (gst_webrtc_nice_transport_new (nice_stream, component)); + gst_object_ref_sink (ret); nice_stream->priv->transports = g_list_prepend (nice_stream->priv->transports, weak_new (ret));
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst-plugins-bad.doap -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst-plugins-bad.doap
Changed
@@ -35,6 +35,16 @@ <release> <Version> + <revision>1.28.1</revision> + <branch>1.28</branch> + <name></name> + <created>2026-02-26</created> + <file-release rdf:resource="https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.28.1.tar.xz" /> + </Version> + </release> + + <release> + <Version> <revision>1.28.0</revision> <branch>main</branch> <name></name>
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/audiobuffersplit/gstaudiobuffersplit.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/audiobuffersplit/gstaudiobuffersplit.c
Changed
@@ -428,23 +428,12 @@ resync_time_diff = gst_util_uint64_scale (self->current_offset, GST_SECOND, rate); - if (self->out_segment.rate < 0.0) { - if (resync_pts > resync_time_diff) - GST_BUFFER_PTS (buffer) = resync_pts - resync_time_diff; - else - GST_BUFFER_PTS (buffer) = 0; - GST_BUFFER_DURATION (buffer) = - gst_util_uint64_scale (size / bpf, GST_SECOND, rate); - - self->current_offset += size / bpf; - } else { - GST_BUFFER_PTS (buffer) = resync_pts + resync_time_diff; - self->current_offset += size / bpf; - resync_time_diff = - gst_util_uint64_scale (self->current_offset, GST_SECOND, rate); - GST_BUFFER_DURATION (buffer) = - resync_time_diff - (GST_BUFFER_PTS (buffer) - resync_pts); - } + GST_BUFFER_PTS (buffer) = resync_pts + resync_time_diff; + self->current_offset += size / bpf; + resync_time_diff = + gst_util_uint64_scale (self->current_offset, GST_SECOND, rate); + GST_BUFFER_DURATION (buffer) = + resync_time_diff - (GST_BUFFER_PTS (buffer) - resync_pts); GST_BUFFER_OFFSET (buffer) = GST_BUFFER_OFFSET_NONE; GST_BUFFER_OFFSET_END (buffer) = GST_BUFFER_OFFSET_NONE; @@ -486,26 +475,27 @@ GstFlowReturn ret = GST_FLOW_OK; guint avail = gst_adapter_available (self->adapter); guint avail_samples = avail / bpf; + guint input_samples, input_scaled_samples; guint64 new_offset; GstClockTime input_rt, current_rt; - GstClockTime input_duration; GstClockTime current_rt_end; input_rt = gst_segment_to_running_time (&self->in_segment, GST_FORMAT_TIME, GST_BUFFER_PTS (buffer)); - input_duration = - (gst_buffer_get_size (buffer) / bpf) / ABS (self->in_segment.rate); - - GST_OBJECT_LOCK (self); - if (self->in_segment.rate < 0) { - discont = FALSE; + input_samples = gst_buffer_get_size (buffer) / bpf; + if (self->in_segment.rate == 1.0) { + input_scaled_samples = input_samples; } else { - discont = GST_BUFFER_IS_DISCONT (buffer) - || GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_RESYNC); + input_scaled_samples = ((gdouble) input_samples) / self->in_segment.rate; } + GST_OBJECT_LOCK (self); + + discont = GST_BUFFER_IS_DISCONT (buffer) + || GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_RESYNC); + /* If the segment rate is changing this is a discontinuity */ discont = discont || (self->out_segment.format != GST_FORMAT_UNDEFINED && self->in_segment.rate != self->out_segment.rate); @@ -515,7 +505,7 @@ discont = gst_audio_stream_align_process (self->stream_align, - discont, input_rt, input_duration, NULL, NULL, NULL); + discont, input_rt, input_scaled_samples, NULL, NULL, NULL); GST_OBJECT_UNLOCK (self); if (!discont) @@ -524,21 +514,12 @@ /* Reset */ self->drop_samples = 0; - if (self->in_segment.rate < 0.0) { - current_rt = - self->resync_rt - gst_util_uint64_scale (self->current_offset + - avail_samples, GST_SECOND, rate * ABS (self->in_segment.rate)); - current_rt_end = - self->resync_rt - gst_util_uint64_scale (self->current_offset, - GST_SECOND, rate * ABS (self->in_segment.rate)); - } else { - current_rt = - self->resync_rt + gst_util_uint64_scale (self->current_offset, - GST_SECOND, rate * self->in_segment.rate); - current_rt_end = - self->resync_rt + gst_util_uint64_scale (self->current_offset + - avail_samples, GST_SECOND, rate * self->in_segment.rate); - } + current_rt = + self->resync_rt + gst_util_uint64_scale (self->current_offset, + GST_SECOND, rate * self->out_segment.rate); + current_rt_end = + self->resync_rt + gst_util_uint64_scale (self->current_offset + + avail_samples, GST_SECOND, rate * self->out_segment.rate); if (self->gapless && self->current_offset != -1) { GST_DEBUG_OBJECT (self, @@ -550,13 +531,13 @@ new_offset = gst_util_uint64_scale (input_rt - self->resync_rt, - rate * ABS (self->in_segment.rate), GST_SECOND); + rate * self->out_segment.rate, GST_SECOND); if (input_rt < self->resync_rt) { guint64 drop_samples; new_offset = gst_util_uint64_scale (self->resync_rt - - input_rt, rate * ABS (self->in_segment.rate), GST_SECOND); + input_rt, rate * self->out_segment.rate, GST_SECOND); drop_samples = self->current_offset + avail_samples + new_offset; GST_DEBUG_OBJECT (self, @@ -679,19 +660,93 @@ return NULL; } - if (self->out_segment.rate < 0.0) { - buffer = - gst_audio_buffer_truncate (buffer, bpf, 0, - nsamples - self->drop_samples); - self->drop_samples = 0; - return buffer; - } else { - buffer = gst_audio_buffer_truncate (buffer, bpf, self->drop_samples, -1); - self->drop_samples = 0; - return buffer; + buffer = gst_audio_buffer_truncate (buffer, bpf, self->drop_samples, -1); + self->drop_samples = 0; + return buffer; +} + +static GstBuffer * +gst_audio_buffer_split_reverse_buffer (GstAudioBufferSplit * self, + GstBuffer * buffer, + const GstSegment * segment, gint rate, gint channels, gint bps) +{ + guint n_samples; + GstBuffer *outbuf; + GstClockTime pts, pts_end; + GstClockTime new_pts; + GstMapInfo in_map, out_map; + + n_samples = gst_buffer_get_size (buffer) / (bps * channels); + outbuf = gst_buffer_new_and_alloc (gst_buffer_get_size (buffer)); + + gst_buffer_copy_into (outbuf, buffer, GST_BUFFER_COPY_METADATA, 0, -1); + + pts = GST_BUFFER_PTS (buffer); + pts_end = pts + gst_util_uint64_scale (n_samples, GST_SECOND, rate); + + // PTS / PTS end are already clipped into the segment but due to rounding + // errors PTS end might be just behind segment.stop + if (pts_end > self->in_segment.stop) + pts_end = self->in_segment.stop; + new_pts = self->in_segment.start + (self->in_segment.stop - pts_end); + + GST_BUFFER_PTS (outbuf) = new_pts; + + GST_LOG_OBJECT (self, + "Reversing buffer of %u samples from PTS %" GST_TIME_FORMAT " to PTS %" + GST_TIME_FORMAT, n_samples, GST_TIME_ARGS (pts), GST_TIME_ARGS (new_pts)); + + if (n_samples == 0) + goto out; + + gst_buffer_map (buffer, &in_map, GST_MAP_READ); + gst_buffer_map (outbuf, &out_map, GST_MAP_WRITE); + +#define REVERSE_SAMPLES(type, stride) { \ + gsize i, j; \ + const type *in = (const type *) in_map.data; \ + type *out = ((type *) out_map.data) + (n_samples - 1) * channels * stride; \ + \ + for (i = 0; i < n_samples; i++) { \ + for (j = 0; j < channels * stride; j++) { \ + outj = inj; \ + } \ + \ + in += channels * stride; \ + out -= channels * stride; \ + } \ +} + + switch (bps) { + case 1: + REVERSE_SAMPLES (guint8, 1); + break; + case 2: + REVERSE_SAMPLES (guint16, 1); + break; + case 3: + REVERSE_SAMPLES (guint8, 3);
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/audiobuffersplit/gstaudiobuffersplit.h -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/audiobuffersplit/gstaudiobuffersplit.h
Changed
@@ -1,4 +1,4 @@ -/* +/* * GStreamer * Copyright (C) 2016 Sebastian Dröge <sebastian@centricular.com> * @@ -17,7 +17,7 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ - + #ifndef __GST_AUDIO_BUFFER_SPLIT_H__ #define __GST_AUDIO_BUFFER_SPLIT_H__ @@ -51,6 +51,7 @@ GstSegment in_segment, out_segment; guint32 segment_seqnum; gboolean segment_pending; + gboolean segment_reversed; GstAudioInfo info; GstAdapter *adapter;
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/closedcaption/gstccconverter.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/closedcaption/gstccconverter.c
Changed
@@ -1747,7 +1747,7 @@ drain_input (self); /* fallthrough */ - case GST_EVENT_FLUSH_START: + case GST_EVENT_FLUSH_STOP: reset_counters (self); break; default:
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/closedcaption/gstcea608mux.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/closedcaption/gstcea608mux.c
Changed
@@ -216,8 +216,8 @@ static GstFlowReturn finish_s334_both_fields (GstCea608Mux * self) { - GstClockTime output_pts = gst_util_uint64_scale_int (GST_SECOND, - self->cdp_fps_entry->fps_d * self->n_output_buffers, + GstClockTime output_pts = gst_util_uint64_scale (GST_SECOND, + (guint64) self->cdp_fps_entry->fps_d * self->n_output_buffers, self->cdp_fps_entry->fps_n); GstClockTime output_duration = gst_util_uint64_scale_int (GST_SECOND, self->cdp_fps_entry->fps_d,
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/closedcaption/gsth264ccextractor.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/closedcaption/gsth264ccextractor.c
Changed
@@ -207,6 +207,9 @@ if (self->caption_type == GST_VIDEO_CAPTION_TYPE_UNKNOWN) self->caption_type = GST_VIDEO_CAPTION_TYPE_CEA708_RAW; + self->fps_n = state->info.fps_n; + self->fps_d = state->info.fps_d; + /* Create dummy output state. Otherwise decoder baseclass will try to create * video caps on GAP event */ out_state = gst_video_decoder_set_output_state (decoder,
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/closedcaption/gsth265ccextractor.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/closedcaption/gsth265ccextractor.c
Changed
@@ -202,6 +202,9 @@ if (self->caption_type == GST_VIDEO_CAPTION_TYPE_UNKNOWN) self->caption_type = GST_VIDEO_CAPTION_TYPE_CEA708_RAW; + self->fps_n = state->info.fps_n; + self->fps_d = state->info.fps_d; + /* Create dummy output state. Otherwise decoder baseclass will try to create * video caps on GAP event */ out_state = gst_video_decoder_set_output_state (decoder,
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/codectimestamper/gstcodectimestamper.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/codectimestamper/gstcodectimestamper.c
Changed
@@ -688,8 +688,11 @@ gst_query_parse_latency (query, &live, &min, &max); g_rec_mutex_lock (&priv->lock); - if (GST_CLOCK_TIME_IS_VALID (priv->latency)) + if (GST_CLOCK_TIME_IS_VALID (priv->latency)) { min += priv->latency; + if (GST_CLOCK_TIME_IS_VALID (max)) + max += priv->latency; + } g_rec_mutex_unlock (&priv->lock); gst_query_set_latency (query, live, min, max);
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/debugutils/gstvideocodectestsink.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/debugutils/gstvideocodectestsink.c
Changed
@@ -434,7 +434,7 @@ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gst_element_class_set_static_metadata (element_class, - "Video CODEC Test Sink", "Debug/video/Sink", + "Video CODEC Test Sink", "Debug/Video/Sink", "Sink to test video CODEC conformance", - "Nicolas Dufresne <nicolas.dufresne@collabora.com"); + "Nicolas Dufresne <nicolas.dufresne@collabora.com>"); }
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/dvbsuboverlay/dvb-sub.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/dvbsuboverlay/dvb-sub.c
Changed
@@ -373,8 +373,8 @@ } static void -_dvb_sub_parse_page_segment (DvbSub * dvb_sub, guint16 page_id, guint8 * buf, - gint buf_size) +_dvb_sub_parse_page_segment (DvbSub * dvb_sub, guint16 page_id, + const guint8 * buf, gint buf_size) { /* FIXME: Use guint for buf_size here and in many other places? */ DVBSubRegionDisplay *display; DVBSubRegionDisplay *tmp_display_list, **tmp_ptr; @@ -451,8 +451,8 @@ } static void -_dvb_sub_parse_region_segment (DvbSub * dvb_sub, guint16 page_id, guint8 * buf, - gint buf_size) +_dvb_sub_parse_region_segment (DvbSub * dvb_sub, guint16 page_id, + const guint8 * buf, gint buf_size) { const guint8 *buf_end = buf + buf_size; guint8 region_id; @@ -483,6 +483,17 @@ region->height = GST_READ_UINT16_BE (buf); buf += 2; + /* Avoid integer overflows and also clamp to a reasonable size of 8kx8k for + * the region size. We allow 16kx16k display sizes. */ + if (region->width > 8192 || region->height > 8192) { + GST_WARNING ("too large region of %ux%x", region->width, region->height); + g_free (region->pbuf); + region->pbuf = NULL; + region->buf_size = 0; + region->width = region->height = 0; + return; + } + if (region->width * region->height != region->buf_size) { /* FIXME: Read closer from spec what happens when dimensions change */ g_free (region->pbuf); @@ -574,8 +585,8 @@ } static void -_dvb_sub_parse_clut_segment (DvbSub * dvb_sub, guint16 page_id, guint8 * buf, - gint buf_size) +_dvb_sub_parse_clut_segment (DvbSub * dvb_sub, guint16 page_id, + const guint8 * buf, gint buf_size) { const guint8 *buf_end = buf + buf_size; guint8 clut_id; @@ -585,6 +596,9 @@ GST_MEMDUMP ("DVB clut packet", buf, buf_size); + if (buf_size < 1) + return; + clut_id = *buf++; buf += 1; @@ -601,7 +615,7 @@ dvb_sub->clut_list = clut; } - while (buf + 4 < buf_end) { + while (buf + 2 < buf_end) { entry_id = *buf++; depth = (*buf) & 0xe0; @@ -614,11 +628,15 @@ full_range = (*buf++) & 1; if (full_range) { + if (buf + 4 > buf_end) + break; y = *buf++; cr = *buf++; cb = *buf++; alpha = *buf++; } else { + if (buf + 2 > buf_end) + break; y = buf0 & 0xfc; cr = (((buf0 & 3) << 2) | ((buf1 >> 6) & 3)) << 4; cb = (buf1 << 2) & 0xf0; @@ -633,11 +651,11 @@ GST_DEBUG ("CLUT DEFINITION: clut %d := (%d,%d,%d,%d)", entry_id, y, cb, cr, alpha); - if (depth & 0x80) + if ((depth & 0x80) && entry_id < 4) clut->clut4entry_id = AYUV (y, cb, cr, 255 - alpha); - if (depth & 0x40) + if ((depth & 0x40) && entry_id < 16) clut->clut16entry_id = AYUV (y, cb, cr, 255 - alpha); - if (depth & 0x20) + if ((depth & 0x20) && entry_id < 256) clut->clut256entry_id = AYUV (y, cb, cr, 255 - alpha); } } @@ -649,8 +667,6 @@ const guint8 ** srcbuf, gint buf_size, guint8 non_mod, guint8 * map_table) { GstBitReader gb = GST_BIT_READER_INIT (*srcbuf, buf_size); - /* FIXME: Handle FALSE returns from gst_bit_reader_get_* calls? */ - gboolean stop_parsing = FALSE; guint32 bits = 0; guint32 pixels_read = 0; @@ -661,23 +677,29 @@ while (!stop_parsing && (gst_bit_reader_get_remaining (&gb) > 1)) { guint run_length = 0, clut_index = 0; - bits = gst_bit_reader_get_bits_uint32_unchecked (&gb, 2); + if (!gst_bit_reader_get_bits_uint32 (&gb, &bits, 2)) + goto not_enough_data; if (bits) { /* 2-bit_pixel-code */ run_length = 1; clut_index = bits; } else { /* 2-bit_zero */ - bits = gst_bit_reader_get_bits_uint32_unchecked (&gb, 1); + if (!gst_bit_reader_get_bits_uint32 (&gb, &bits, 1)) + goto not_enough_data; if (bits == 1) { /* switch_1 == '1' */ - run_length = gst_bit_reader_get_bits_uint32_unchecked (&gb, 3); + if (!gst_bit_reader_get_bits_uint32 (&gb, &run_length, 3)) + goto not_enough_data; run_length += 3; - clut_index = gst_bit_reader_get_bits_uint32_unchecked (&gb, 2); + if (!gst_bit_reader_get_bits_uint32 (&gb, &clut_index, 2)) + goto not_enough_data; } else { /* switch_1 == '0' */ - bits = gst_bit_reader_get_bits_uint32_unchecked (&gb, 1); + if (!gst_bit_reader_get_bits_uint32 (&gb, &bits, 1)) + goto not_enough_data; if (bits == 1) { /* switch_2 == '1' */ run_length = 1; /* 1x pseudo-colour '00' */ } else { /* switch_2 == '0' */ - bits = gst_bit_reader_get_bits_uint32_unchecked (&gb, 2); + if (!gst_bit_reader_get_bits_uint32 (&gb, &bits, 2)) + goto not_enough_data; switch (bits) { /* switch_3 */ case 0x0: /* end of 2-bit/pixel_code_string */ stop_parsing = TRUE; @@ -686,14 +708,18 @@ run_length = 2; break; case 0x2: /* the following 6 bits contain run length coded pixel data */ - run_length = gst_bit_reader_get_bits_uint32_unchecked (&gb, 4); + if (!gst_bit_reader_get_bits_uint32 (&gb, &run_length, 4)) + goto not_enough_data; run_length += 12; - clut_index = gst_bit_reader_get_bits_uint32_unchecked (&gb, 2); + if (!gst_bit_reader_get_bits_uint32 (&gb, &clut_index, 2)) + goto not_enough_data; break; case 0x3: /* the following 10 bits contain run length coded pixel data */ - run_length = gst_bit_reader_get_bits_uint32_unchecked (&gb, 8); + if (!gst_bit_reader_get_bits_uint32 (&gb, &run_length, 8)) + goto not_enough_data; run_length += 29; - clut_index = gst_bit_reader_get_bits_uint32_unchecked (&gb, 2); + if (!gst_bit_reader_get_bits_uint32 (&gb, &clut_index, 2)) + goto not_enough_data; break; } } @@ -727,13 +753,18 @@ pixels_read += run_length; } - // FIXME: Test skip_to_byte instead of adding 7 bits, once everything else is working good - //gst_bit_reader_skip_to_byte (&gb); - *srcbuf += (gst_bit_reader_get_pos (&gb) + 7) >> 3; + gst_bit_reader_skip_to_byte (&gb); + *srcbuf = gb.data + gb.byte; GST_TRACE ("PIXEL: returning, read %u pixels", pixels_read); // FIXME: Shouldn't need this variable if tracking things in the loop better return pixels_read; + +not_enough_data: + GST_WARNING ("Not enough data"); + // Go to the end of the buffer so the caller stops parsing + *srcbuf += buf_size; + return 0; } // FFMPEG-FIXME: The same code in ffmpeg is much more complex, it could use the same @@ -743,7 +774,6 @@ const guint8 ** srcbuf, gint buf_size, guint8 non_mod, guint8 * map_table) { GstBitReader gb = GST_BIT_READER_INIT (*srcbuf, buf_size); - /* FIXME: Handle FALSE returns from gst_bit_reader_get_* calls? */ gboolean stop_parsing = FALSE; guint32 bits = 0; guint32 pixels_read = 0; @@ -755,28 +785,35 @@
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/dvbsuboverlay/dvb-sub.h -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/dvbsuboverlay/dvb-sub.h
Changed
@@ -129,7 +129,7 @@ DvbSub *dvb_sub_new (void); void dvb_sub_free (DvbSub * sub); -gint dvb_sub_feed_with_pts (DvbSub *dvb_sub, guint64 pts, guint8 *data, gint len); +gint dvb_sub_feed_with_pts (DvbSub *dvb_sub, guint64 pts, const guint8 *data, gint len); void dvb_sub_set_callbacks (DvbSub *dvb_sub, DvbSubCallbacks *callbacks, gpointer user_data); void dvb_subtitles_free (DVBSubtitles *sub);
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/fieldanalysis/gstfieldanalysis.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/fieldanalysis/gstfieldanalysis.c
Changed
@@ -286,7 +286,7 @@ gst_element_class_set_static_metadata (gstelement_class, "Video field analysis", - "Filter/Analysis/Video", + "Filter/Analyzer/Video", "Analyse fields from video frames to identify if they are progressive/telecined/interlaced", "Robert Swain <robert.swain@collabora.co.uk>");
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/frei0r/gstfrei0r.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/frei0r/gstfrei0r.c
Changed
@@ -29,6 +29,15 @@ #include <string.h> #include <gmodule.h> +#ifdef G_OS_WIN32 +#define GST_MODULE_SUFFIX ".dll" +#else +#define GST_MODULE_SUFFIX ".so" +#ifdef __APPLE__ +#define GST_EXTRA_MODULE_SUFFIX ".dylib" +#endif +#endif + GST_DEBUG_CATEGORY (frei0r_debug); #define GST_CAT_DEFAULT frei0r_debug @@ -636,7 +645,7 @@ } filename = g_build_filename (path, entry_name, NULL); - if ((g_str_has_suffix (filename, G_MODULE_SUFFIX) + if ((g_str_has_suffix (filename, GST_MODULE_SUFFIX) #ifdef GST_EXTRA_MODULE_SUFFIX || g_str_has_suffix (filename, GST_EXTRA_MODULE_SUFFIX) #endif
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/frei0r/gstfrei0rsrc.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/frei0r/gstfrei0rsrc.c
Changed
@@ -341,7 +341,7 @@ if (desc == NULL || *desc == '\0') desc = "No details"; gst_element_class_set_metadata (gstelement_class, class_data->info.name, - "Src/Video", desc, author); + "Source/Video", desc, author); g_free (author); caps = gst_frei0r_caps_from_color_model (class_data->info.color_model);
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/mpegtsdemux/mpegtspacketizer.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/mpegtsdemux/mpegtspacketizer.c
Changed
@@ -1471,9 +1471,6 @@ /* keep track of the last extended pcrtime */ pcr->last_pcrtime = gstpcrtime; - if (!packetizer->skew_correction) - goto no_skew; - /* we don't have an arrival timestamp so we can't do skew detection. we * should still apply a timestamp based on RTP timestamp and base_time */ if (!GST_CLOCK_TIME_IS_VALID (time) @@ -1514,6 +1511,9 @@ delta = 0; } + if (!packetizer->skew_correction) + goto no_skew; + pos = pcr->window_pos; if (G_UNLIKELY (pcr->window_filling)) {
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/mpegtsdemux/tsdemux.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/mpegtsdemux/tsdemux.c
Changed
@@ -94,10 +94,8 @@ * Push incoming buffers to the array */ PENDING_PACKET_HEADER, /* PES header needs to be parsed * Push incoming buffers to the array */ - PENDING_PACKET_BUFFER, /* Currently filling up output buffer + PENDING_PACKET_BUFFER /* Currently filling up output buffer * Push incoming buffers to the bufferlist */ - PENDING_PACKET_DISCONT /* Discontinuity in incoming packets - * Drop all incoming buffers */ } PendingPacketState; /* Pending buffer */ @@ -2881,7 +2879,13 @@ stream->pending_header_data = NULL; stream->pending_header_size = 0; } - stream->state = PENDING_PACKET_DISCONT; + if (stream->data) { + g_free (stream->data); + stream->data = NULL; + stream->current_size = 0; + } + /* We need a new PUSI */ + stream->state = PENDING_PACKET_EMPTY; return; } @@ -2895,60 +2899,15 @@ { guint8 *data; guint size; - guint8 cc = FLAGS_CONTINUITY_COUNTER (packet->scram_afc_cc); GST_LOG_OBJECT (demux, "pid: 0x%04x state:%d", stream->stream.pid, stream->state); - /* Handle expected discontinuity */ - if (G_UNLIKELY (packet->afc_flags & MPEGTS_AFC_DISCONTINUITY_FLAG)) { - GST_LOG_OBJECT (demux, "pid: 0x%04x discontinuity flag, resetting counter", - stream->stream.pid); - stream->continuity_counter = CONTINUITY_UNSET; - } - size = packet->data_end - packet->payload; data = packet->payload; - if (stream->continuity_counter == CONTINUITY_UNSET) { - GST_DEBUG_OBJECT (demux, "CONTINUITY: Initialize to %d", cc); - } else if ((cc == stream->continuity_counter + 1 || - (stream->continuity_counter == MAX_CONTINUITY && cc == 0))) { - GST_LOG_OBJECT (demux, "CONTINUITY: Got expected %d", cc); - } else { - if (stream->state != PENDING_PACKET_EMPTY) { - if (packet->payload_unit_start_indicator) { - /* A mismatch is fatal, except if this is the beginning of a new - * frame (from which we can recover) */ - if (G_UNLIKELY (stream->data)) { - g_free (stream->data); - stream->data = NULL; - } - if (G_UNLIKELY (stream->pending_header_data)) { - g_free (stream->pending_header_data); - stream->pending_header_data = NULL; - } - stream->state = PENDING_PACKET_HEADER; - } else { - gchar *pad_name = gst_pad_get_name (stream->pad); - GST_ELEMENT_WARNING_WITH_DETAILS (demux, STREAM, DEMUX, - ("CONTINUITY: Mismatch packet %d, stream %d (pid 0x%04x)", cc, - stream->continuity_counter, stream->stream.pid), (NULL), - ("warning-type", G_TYPE_STRING, "continuity-mismatch", - "packet", G_TYPE_INT, cc, - "stream", G_TYPE_INT, stream->continuity_counter, - "pid", G_TYPE_UINT, stream->stream.pid, - "pad-name", G_TYPE_STRING, pad_name, NULL)); - g_free (pad_name); - stream->state = PENDING_PACKET_DISCONT; - } - } - } - stream->continuity_counter = cc; - if (stream->state == PENDING_PACKET_EMPTY) { if (G_UNLIKELY (!packet->payload_unit_start_indicator)) { - stream->state = PENDING_PACKET_DISCONT; GST_DEBUG_OBJECT (demux, "Didn't get the first packet of this PES"); } else { GST_LOG_OBJECT (demux, "EMPTY=>HEADER"); @@ -2979,20 +2938,6 @@ stream->current_size += size; break; } - case PENDING_PACKET_DISCONT: - { - GST_LOG_OBJECT (demux, "DISCONT: not storing/pushing"); - if (G_UNLIKELY (stream->data)) { - g_free (stream->data); - stream->data = NULL; - } - if (G_UNLIKELY (stream->pending_header_data)) { - g_free (stream->pending_header_data); - stream->pending_header_data = NULL; - } - stream->continuity_counter = CONTINUITY_UNSET; - break; - } default: break; } @@ -3956,19 +3901,54 @@ return res; } +/* packet is guaranteed to have a payload */ static GstFlowReturn gst_ts_demux_handle_packet (GstTSDemux * demux, TSDemuxStream * stream, - MpegTSPacketizerPacket * packet, GstMpegtsSection * section) + MpegTSPacketizerPacket * packet, GstMpegtsSection * section G_GNUC_UNUSED) { GstFlowReturn res = GST_FLOW_OK; + guint8 cc = FLAGS_CONTINUITY_COUNTER (packet->scram_afc_cc); - GST_LOG_OBJECT (demux, "pid 0x%04x pusi:%d, afc:%d, cont:%d, payload:%p", + GST_LOG_OBJECT (demux, "pid 0x%04x pusi:%d, afc:%d, cc:%d, payload:%p", packet->pid, packet->payload_unit_start_indicator, - packet->scram_afc_cc & 0x30, - FLAGS_CONTINUITY_COUNTER (packet->scram_afc_cc), packet->payload); + packet->scram_afc_cc & 0x30, cc, packet->payload); - if (G_UNLIKELY (packet->payload_unit_start_indicator) && - FLAGS_HAS_PAYLOAD (packet->scram_afc_cc)) { + /* Check continuity */ + if (stream->continuity_counter != CONTINUITY_UNSET) { + if (((stream->continuity_counter + 1) % 16) != cc) { + if (stream->state != PENDING_PACKET_EMPTY) { +#ifndef GST_DISABLE_GST_DEBUG + gchar *pad_name = gst_pad_get_name (stream->pad); + GST_ELEMENT_WARNING_WITH_DETAILS (demux, STREAM, DEMUX, + ("CONTINUITY: Mismatch packet %d, stream %d (pid 0x%04x)", cc, + stream->continuity_counter, stream->stream.pid), + (NULL), + ("warning-type", G_TYPE_STRING, "continuity-mismatch", "packet", + G_TYPE_INT, cc, "stream", G_TYPE_INT, + stream->continuity_counter, "pid", G_TYPE_UINT, + stream->stream.pid, "pad-name", G_TYPE_STRING, pad_name, NULL)); + g_free (pad_name); +#endif + /* Clear pending state and don't process packet */ + stream->continuity_counter = cc; + if (G_UNLIKELY (stream->data)) { + g_free (stream->data); + stream->data = NULL; + stream->current_size = 0; + } + if (G_UNLIKELY (stream->pending_header_data)) { + g_free (stream->pending_header_data); + stream->pending_header_data = NULL; + } + stream->state = PENDING_PACKET_EMPTY; + + return GST_FLOW_OK; + } + } + } + stream->continuity_counter = cc; + + if (G_UNLIKELY (packet->payload_unit_start_indicator)) { /* Flush previous data */ res = gst_ts_demux_push_pending_data (demux, stream, NULL); if (res != GST_FLOW_REWINDING) { @@ -3976,9 +3956,13 @@ * rewinding since the states will have been resetted accordingly */ stream->state = PENDING_PACKET_HEADER; } + } else if (stream->state == PENDING_PACKET_EMPTY) { + GST_LOG_OBJECT (demux, "pid: 0x%04x waiting for packet start", + stream->stream.pid); + return GST_FLOW_OK; } - if (packet->payload && (res == GST_FLOW_OK || res == GST_FLOW_NOT_LINKED) + if ((res == GST_FLOW_OK || res == GST_FLOW_NOT_LINKED) && stream->pad) { gst_ts_demux_queue_data (demux, stream, packet); GST_LOG_OBJECT (demux, "current_size:%d, expected_size:%d", @@ -4052,7 +4036,7 @@ TSDemuxStream *stream = NULL; GstFlowReturn res = GST_FLOW_OK; - if (G_LIKELY (demux->program)) { + if (G_LIKELY (packet->payload && demux->program)) { stream = (TSDemuxStream *) demux->program->streamspacket->pid; if (stream) {
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/mpegtsmux/tsmux/tsmux.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/mpegtsmux/tsmux/tsmux.c
Changed
@@ -1023,8 +1023,7 @@ pcr_ext = (pi->pcr % 300); flags |= 0x10; - TS_DEBUG ("Writing PCR %" G_GUINT64_FORMAT " + ext %u", pcr_base, - pcr_ext); + TS_LOG ("Writing PCR %" G_GUINT64_FORMAT " + ext %u", pcr_base, pcr_ext); bufpos++ = (pcr_base >> 25) & 0xff; bufpos++ = (pcr_base >> 17) & 0xff; bufpos++ = (pcr_base >> 9) & 0xff; @@ -1040,7 +1039,7 @@ opcr_ext = (pi->opcr % 300); flags |= 0x08; - TS_DEBUG ("Writing OPCR"); + TS_LOG ("Writing OPCR"); bufpos++ = (opcr_base >> 25) & 0xff; bufpos++ = (opcr_base >> 17) & 0xff; bufpos++ = (opcr_base >> 9) & 0xff; @@ -1060,11 +1059,11 @@ bufpos++ = pi->private_data_len; memcpy (&(bufpos), pi->private_data, pi->private_data_len); pos += pi->private_data_len; - TS_DEBUG ("%u bytes of private data", pi->private_data_len); + TS_LOG ("%u bytes of private data", pi->private_data_len); } if (pi->flags & TSMUX_PACKET_FLAG_WRITE_ADAPT_EXT) { flags |= 0x01; - TS_DEBUG ("FIXME: write Adaptation extension"); + TS_LOG ("FIXME: write Adaptation extension"); /* Write an empty extension for now */ bufpos++ = 1; bufpos++ = 0x1f; /* lower 5 bits are reserved, and should be all 1 */ @@ -1100,7 +1099,7 @@ /* Sync byte */ buf0 = TSMUX_SYNC_BYTE; - TS_DEBUG ("PID 0x%04x, counter = 0x%01x, %u bytes avail", pi->pid, + TS_LOG ("PID 0x%04x, counter = 0x%01x, %u bytes avail", pi->pid, mux->pid_packet_countspi->pid & 0x0f, stream_avail); /* 3 bits: @@ -1177,10 +1176,10 @@ if (write_adapt) { - TS_DEBUG ("Adaptation field of size >= %d + %d bytes payload", + TS_LOG ("Adaptation field of size >= %d + %d bytes payload", adapt_len, payload_len); } else { - TS_DEBUG ("Payload of %d bytes only", payload_len); + TS_LOG ("Payload of %d bytes only", payload_len); } return TRUE; @@ -1688,7 +1687,7 @@ gst_buffer_unmap (buf, &map); - GST_DEBUG ("Writing PES of size %d", (int) gst_buffer_get_size (buf)); + GST_LOG ("Writing PES of size %d", (int) gst_buffer_get_size (buf)); res = tsmux_packet_out (mux, buf, new_pcr, TRUE); /* Reset all dynamic flags */
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/mpegtsmux/tsmux/tsmuxcommon.h -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/mpegtsmux/tsmux/tsmuxcommon.h
Changed
@@ -169,6 +169,7 @@ GST_DEBUG_CATEGORY_EXTERN (gst_base_ts_mux_debug); #define TS_DEBUG GST_DEBUG +#define TS_LOG GST_LOG G_END_DECLS
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/mxf/mxfdemux.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/mxf/mxfdemux.c
Changed
@@ -351,6 +351,14 @@ gboolean ret; GstEvent *e; + if (pad->need_segment) { + GstEvent *e = gst_event_new_segment (&demux->segment); + GST_DEBUG_OBJECT (pad, "Sending unsent %" GST_PTR_FORMAT, e); + gst_event_set_seqnum (e, demux->seqnum); + gst_pad_push_event (GST_PAD_CAST (pad), e); + pad->need_segment = FALSE; + } + pad->eos = TRUE; if (demux->segment.flags & GST_SEEK_FLAG_SEGMENT) { @@ -380,9 +388,19 @@ for (i = 0; i < demux->src->len; i++) { GstMXFDemuxPad *pad = GST_MXF_DEMUX_PAD (g_ptr_array_index (demux->src, i)); - if (pad->eos && (GST_EVENT_TYPE (event) == GST_EVENT_EOS - || GST_EVENT_TYPE (event) == GST_EVENT_SEGMENT_DONE)) - continue; + if (GST_EVENT_TYPE (event) == GST_EVENT_EOS + || GST_EVENT_TYPE (event) == GST_EVENT_SEGMENT_DONE) { + if (pad->eos) + continue; + + if (pad->need_segment) { + GstEvent *e = gst_event_new_segment (&demux->segment); + GST_DEBUG_OBJECT (pad, "Sending unsent %" GST_PTR_FORMAT, e); + gst_event_set_seqnum (e, demux->seqnum); + gst_pad_push_event (GST_PAD_CAST (pad), e); + pad->need_segment = FALSE; + } + } ret |= gst_pad_push_event (GST_PAD_CAST (pad), gst_event_ref (event)); } @@ -4695,9 +4713,12 @@ } *stream_time = - gst_util_uint64_scale (position + sum, + gst_util_uint64_scale (sum, pad->material_track->edit_rate.d * GST_SECOND, - pad->material_track->edit_rate.n); + pad->material_track->edit_rate.n) + + gst_util_uint64_scale (position, + etrack->source_track->edit_rate.d * GST_SECOND, + etrack->source_track->edit_rate.n); return TRUE; } @@ -5615,10 +5636,8 @@ if (!p->eos && p->current_essence_track_position >= - p->current_essence_track->duration) { - p->eos = TRUE; - gst_pad_push_event (GST_PAD_CAST (p), gst_event_new_eos ()); - } + p->current_essence_track->duration) + gst_mxf_demux_eos_single_stream (demux, p); } while ((p = gst_mxf_demux_get_earliest_pad (demux))) { @@ -5632,8 +5651,7 @@ &position, FALSE); if (offset == -1) { GST_ERROR_OBJECT (demux, "Failed to find offset for essence track"); - p->eos = TRUE; - gst_pad_push_event (GST_PAD_CAST (p), gst_event_new_eos ()); + gst_mxf_demux_eos_single_stream (demux, p); continue; } @@ -5653,8 +5671,7 @@ } else { GST_WARNING_OBJECT (demux, "Seek to remaining part of the file failed"); - p->eos = TRUE; - gst_pad_push_event (GST_PAD_CAST (p), gst_event_new_eos ()); + gst_mxf_demux_eos_single_stream (demux, p); continue; } }
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/rist/gstristrtpdeext.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/rist/gstristrtpdeext.c
Changed
@@ -321,7 +321,7 @@ gst_element_class_set_static_metadata (element_class, "RIST RTP Extension remover", "Filter/Network", "Removes RIST TR-06-2 RTP Header extension", - "Olivier Crete <olivier.crete@collabora.com"); + "Olivier Crete <olivier.crete@collabora.com>"); gst_element_class_add_static_pad_template (element_class, &src_templ); gst_element_class_add_static_pad_template (element_class, &sink_templ);
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/rist/gstristrtpext.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/rist/gstristrtpext.c
Changed
@@ -282,7 +282,7 @@ gst_element_class_set_static_metadata (element_class, "RIST RTP Extension adder", "Filter/Network", "Adds RIST TR-06-2 RTP Header extension", - "Olivier Crete <olivier.crete@collabora.com"); + "Olivier Crete <olivier.crete@collabora.com>"); gst_element_class_add_static_pad_template (element_class, &src_templ); gst_element_class_add_static_pad_template (element_class, &sink_templ);
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/rist/gstristsink.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/rist/gstristsink.c
Changed
@@ -1344,7 +1344,7 @@ gst_element_class_set_static_metadata (element_class, "RIST Sink", "Source/Network", "Sink that implements RIST TR-06-1 streaming specification", - "Nicolas Dufresne <nicolas.dufresne@collabora.com"); + "Nicolas Dufresne <nicolas.dufresne@collabora.com>"); gst_element_class_add_static_pad_template (element_class, &sink_templ); element_class->change_state = gst_rist_sink_change_state;
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/rist/gstristsrc.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/rist/gstristsrc.c
Changed
@@ -1355,7 +1355,7 @@ gst_element_class_set_static_metadata (element_class, "RIST Source", "Source/Network", "Source that implements RIST TR-06-1 streaming specification", - "Nicolas Dufresne <nicolas.dufresne@collabora.com"); + "Nicolas Dufresne <nicolas.dufresne@collabora.com>"); gst_element_class_add_static_pad_template (element_class, &src_templ); bin_class->handle_message = gst_rist_src_handle_message;
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/rist/gstroundrobin.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/rist/gstroundrobin.c
Changed
@@ -127,7 +127,7 @@ gst_element_class_set_static_metadata (element_class, "Round Robin", "Source/Network", "A round robin dispatcher element.", - "Nicolas Dufresne <nicolas.dufresne@collabora.com"); + "Nicolas Dufresne <nicolas.dufresne@collabora.com>"); gst_element_class_add_static_pad_template (element_class, &sink_templ); gst_element_class_add_static_pad_template (element_class, &src_templ);
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/rtp/gstrtpsrc.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/rtp/gstrtpsrc.c
Changed
@@ -520,7 +520,7 @@ gst_element_class_set_static_metadata (gstelement_class, "RTP Source element", - "Generic/Bin/Src", + "Generic/Bin/Source", "Simple RTP src", "Marc Leeman <marc.leeman@gmail.com>"); }
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/siren/gstsirendec.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/siren/gstsirendec.c
Changed
@@ -80,7 +80,7 @@ gst_element_class_add_static_pad_template (element_class, &sinktemplate); gst_element_class_set_static_metadata (element_class, "Siren Decoder element", - "Codec/Decoder/Audio ", + "Codec/Decoder/Audio", "Decode streams encoded with the Siren7 codec into 16bit PCM", "Youness Alaoui <kakaroto@kakaroto.homelinux.net>");
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/siren/gstsirenenc.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/siren/gstsirenenc.c
Changed
@@ -77,7 +77,7 @@ gst_element_class_add_static_pad_template (element_class, &sinktemplate); gst_element_class_set_static_metadata (element_class, "Siren Encoder element", - "Codec/Encoder/Audio ", + "Codec/Encoder/Audio", "Encode 16bit PCM streams into the Siren7 codec", "Youness Alaoui <kakaroto@kakaroto.homelinux.net>");
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/tensordecoders/gstclassifiertensordecoder.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/tensordecoders/gstclassifiertensordecoder.c
Changed
@@ -486,7 +486,7 @@ gfloat max = 0.0; gfloat *result_data = NULL; gsize len; - GQuark q, qmax; + GQuark q, qmax = 0; gint max_idx = -1; GstAnalyticsClsMtd cls_mtd; @@ -557,11 +557,7 @@ } for (gint j = 0; j < len; j++) { - if (self->class_quark != NULL) { - q = g_array_index (self->class_quark, GQuark, j); - } else { - q = j; - } + q = g_array_index (self->class_quark, GQuark, j); if (result_dataj > max) { max = result_dataj;
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/tensordecoders/gstyolosegtensordecoder.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/tensordecoders/gstyolosegtensordecoder.c
Changed
@@ -217,14 +217,14 @@ *logits_tensor = gst_tensor_meta_get_typed_tensor (tmeta, YOLO_SEGMENTATION_LOGITS_TENSOR_ID, GST_TENSOR_DATA_TYPE_FLOAT32, - GST_TENSOR_DIM_ORDER_ROW_MAJOR, YOLO_LOGITS_TENSOR_N_DIMS, logits_dims); + GST_TENSOR_DIM_ORDER_COL_MAJOR, YOLO_LOGITS_TENSOR_N_DIMS, logits_dims); if (*logits_tensor == NULL) continue; *detections_tensor = gst_tensor_meta_get_typed_tensor (tmeta, YOLO_SEGMENTATION_DETECTION_MASK_ID, GST_TENSOR_DATA_TYPE_FLOAT32, - GST_TENSOR_DIM_ORDER_ROW_MAJOR, YOLO_DETECTIONS_TENSOR_N_DIMS, + GST_TENSOR_DIM_ORDER_COL_MAJOR, YOLO_DETECTIONS_TENSOR_N_DIMS, detections_dims); if (*detections_tensor == NULL)
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/tensordecoders/gstyolotensordecoder.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/tensordecoders/gstyolotensordecoder.c
Changed
@@ -439,7 +439,7 @@ tensor = gst_tensor_meta_get_typed_tensor (tensor_meta, YOLO_DETECTION_MASK_ID, GST_TENSOR_DATA_TYPE_FLOAT32, - GST_TENSOR_DIM_ORDER_ROW_MAJOR, YOLO_DETECTIONS_TENSOR_N_DIMS, dims); + GST_TENSOR_DIM_ORDER_COL_MAJOR, YOLO_DETECTIONS_TENSOR_N_DIMS, dims); if (tensor) { if (tensor->dims1 < 5) {
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/unixfd/gstunixfdsrc.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/unixfd/gstunixfdsrc.c
Changed
@@ -488,7 +488,7 @@ GST_DEBUG_CATEGORY_INIT (unixfdsrc_debug, "unixfdsrc", 0, "Unix file descriptor source"); gst_element_class_set_static_metadata (gstelement_class, - "Unix file descriptor source", "Src", "Unix file descriptor source", + "Unix file descriptor source", "Source", "Unix file descriptor source", "Xavier Claessens <xavier.claessens@collabora.com>"); gst_element_class_add_static_pad_template (gstelement_class, &srctemplate);
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/videofilters/gstzebrastripe.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/videofilters/gstzebrastripe.c
Changed
@@ -110,7 +110,7 @@ gst_element_class_set_static_metadata (GST_ELEMENT_CLASS (klass), "Zebra stripe overlay", - "Filter/Analysis", + "Video/Filter/Analyzer", "Overlays zebra striping on overexposed areas of video", "David Schleef <ds@entropywave.com>");
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/gst/videoparsers/gstmpegvideoparse.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/gst/videoparsers/gstmpegvideoparse.c
Changed
@@ -157,7 +157,7 @@ "MPEG video elementary stream parser", "Codec/Parser/Video", "Parses and frames MPEG-1 and MPEG-2 elementary video streams", - "Wim Taymans <wim.taymans@ccollabora.co.uk>, " + "Wim Taymans <wim.taymans@collabora.co.uk>, " "Jan Schmidt <thaytan@mad.scientist.com>, " "Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>");
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/meson.build -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/meson.build
Changed
@@ -1,5 +1,5 @@ project('gst-plugins-bad', 'c', 'cpp', - version : '1.28.0', + version : '1.28.1', meson_version : '>= 1.4', default_options : 'warning_level=1', 'buildtype=debugoptimized' ) @@ -43,8 +43,16 @@ cc = meson.get_compiler('c') cxx = meson.get_compiler('cpp') host_system = host_machine.system() +subsystem = '' +if host_system == 'ios' + warning('Setting system = \'ios\' in the cross file is deprecated, please use subsystem names') + host_system = 'darwin' + subsystem = 'ios' +elif host_system == 'darwin' + subsystem = host_machine.subsystem() +endif -if host_system in 'ios', 'darwin' +if host_system == 'darwin' have_objc = add_languages('objc', native: false) have_objcpp = add_languages('objcpp', native: false) else @@ -288,11 +296,8 @@ # FIXME: This should be exposed as a configuration option if host_system == 'linux' cdata.set_quoted('DEFAULT_VIDEOSRC', 'v4l2src') -elif 'darwin', 'ios'.contains(host_system) +elif host_system == 'darwin' cdata.set_quoted('DEFAULT_VIDEOSRC', 'avfvideosrc') - cdata.set_quoted('GST_EXTRA_MODULE_SUFFIX', '.dylib') - # Yes, we set this for iOS too. Same as Autotools. - cdata.set('HAVE_OSX', 1) else cdata.set_quoted('DEFAULT_VIDEOSRC', 'videotestsrc') endif @@ -407,7 +412,7 @@ endif # Optional dep of msdk and va -if host_system not in 'darwin', 'ios', 'android', 'windows', 'gnu' +if host_system not in 'darwin', 'android', 'windows', 'gnu' libdrm_dep = dependency('libdrm', version : '>=2.4.50', required : get_option('drm').enabled() or get_option('msdk').enabled(), ) @@ -456,28 +461,10 @@ winsock2 = endif -if 'darwin', 'ios'.contains(host_system) +if host_system == 'darwin' if not have_objc error('Building on MacOS/iOS/etc requires an ObjC compiler') endif - if host_system == 'ios' - cdata.set('HAVE_IOS', 1) - endif - - avfoundation_dep = dependency('AVFoundation', required : false) - if avfoundation_dep.found() - cdata.set('HAVE_AVFOUNDATION', 1) - endif - - videotoolbox_dep = dependency('VideoToolbox', required : false) - if videotoolbox_dep.found() - cdata.set('HAVE_VIDEOTOOLBOX', 1) - endif - -# FIXME: framework.version() returns 'unknown' -# if videotoolbox_dep.version().version_compare('>=10.9.6') -# cdata.set('HAVE_VIDEOTOOLBOX_10_9_6', 1) -# endif endif have_orcc = false @@ -643,6 +630,16 @@ meson.add_dist_script('scripts/gen-changelog.py', meson.project_name(), '1.26.0', meson.project_version()) +# dist common files from monorepo root +if not meson.is_subproject() + meson.add_dist_script('scripts/dist-common-files.py', meson.project_version()) +endif + +# dist common files from monorepo root +if not meson.is_subproject() + meson.add_dist_script('scripts/dist-common-files.py', meson.project_version()) +endif + subdir('docs') plugin_names =
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/po/gst-plugins-bad-1.0.pot -> _service:download_files:gst-plugins-bad-1.28.1.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.0\n" +"Project-Id-Version: gst-plugins-bad-1.28.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-01-27 17:03+0000\n" +"POT-Creation-Date: 2026-02-26 01:45+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/po/gst-plugins-bad.pot -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/po/gst-plugins-bad.pot
Changed
@@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: gst-plugins-bad-1.28.0\n" +"Project-Id-Version: gst-plugins-bad-1.28.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-01-27 17:03+0000\n" +"POT-Creation-Date: 2026-02-26 01:45+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
View file
_service:download_files:gst-plugins-bad-1.28.1.tar.xz/release-notes-1.28.md
Added
@@ -0,0 +1,1705 @@ +# GStreamer 1.28 Release Notes + +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.1(#1.28.1) and was released on 26 February 2026. + +See https://gstreamer.freedesktop.org/releases/1.28/latest for the latest version of this document. + +*Last updated: Thursday 26 February 2026, 01: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 + +<a id="introduction"></a> +## Introduction + +The GStreamer team is proud to announce a new major feature release in the +stable 1.x API series of your favourite cross-platform multimedia framework! + +As always, this release is again packed with many new features, bug fixes, and other improvements. + +<a id="highlights"></a> +## Highlights + +- AMD HIP plugin and integration helper library +- Vulkan Video AV1 and VP9 decoding, H.264 encoding, and 10-bit support for H.265 decoder +- waylandsink: Parse and set the HDR10 metadata and other color management improvements +- Audio source separation element based on demucs in Rust +- Analytics combiner and splitter elements plus batch meta to batch buffers from one or more streams +- LiteRT inference element; move modelinfo to analytics lib; add script to help with modelinfo generation and upgrade +- Add general classifier tensor-decoder, facedetector, and more analytics convenience API +- New tensordecodebin element to auto-plug compatible tensor decoders based on their caps and many other additions and improvements +- Add a burn-based YOLOX inference element and a YOLOX tensor decoder in Rust +- applemedia: VideoToolbox VP9 and AV1 hardware-accelerated decoding support, and 10-bit HEVC encoding +- Add new GIF decoder element in Rust with looping support +- input-selector: implements a two-phase sinkpad switch now to avoid races when switching input pads +- The inter wormhole sink and source elements gained a way to forward upstream events to the producer as well as new fine-tuning properties +- webrtcsink: add renegotiation support and support for va hardware encoders +- webrtc WHEP client and server signaller +- New ST-2038 ancillary data combiner and extractor elements +- fallbacksrc gained support for encoded streams +- flv: enhanced rtmp H.265 video support, and support for multitrack audio +- glupload: Implement udmabuf uploader to share buffers between software decoders/sources and GPUs, display engines (wayland), and other dma devices +- video: Add crop, scale, rotate, flip, shear and more GstMeta transformation +- New task pool GstContext to share a thread pool amongst elements for better resource management and performance, especially for video conversion and compositing +- New Deepgram speech-to-text transcription plugin and many other translation and transcription improvements +- Speech synthesizers: expose new "compress" overflow mode that can speed up audio while preserving pitch +- ElevenLabs voice cloning element and support for Speechmatics speaker identification API +- textaccumulate: new element for speech synthesis or translation preprocessing +- New vmaf element to calculate perceptual video quality assessment scores using Netflix's VMAF framework +- decodebin3: expose KLV, ID3 PES and ST-2038 ancillary data streams with new metadata GstStream type +- New MPEG-H audio decoding plugin plus MP4 demuxing support +- LCEVC: Add autoplugging decoding support for LCEVC H265 and H266 video streams and LCEVC H.265 and H.266 encoders +- RTP "robust MPEG audio", raw audio (L8, L16, L24), and SMPTE ST291 ancillary metadata payloaders/depayloaders in Rust +- Add a Rust-based icecastsink element with AAC support +- The Windows IPC plugin gained support for passing generic data in addition to raw audio/video, and various properties +- New D3D12 interlace and overlay compositor elements, plus many other D3D12 improvements +- Blackmagic Decklink elements gained support for capturing and outputting all types of VANC via GstAncillaryMeta +- GstLogContext API to reduce log spam in several components and `GST_DEBUG_ONCE` (etc) convenience macros to log things only once +- hlssink3, hlscmafsink: Support the use of a single media file, plus I-frame only playlist support +- Webkit: New wpe2 plugin making use of the "WPE Platform API" +- MPEG-TS demuxer can now disable skew corrections +- New Qt6 QML render source element +- qml6gloverlay: support directly passing a QQuickItem for QML the render tree +- unifxfdsink: Add a property to allow copying to make sink usable with more upstream elements +- dots-viewer: Improve dot file generation and interactivity +- Python bindings: more syntactic sugar, analytics API improvements and type annotations +- cerbero: add support for Python wheel packaging, Windows ARM64, new iOS xcframework, Gtk4 on macOS and Windows, and more plugins +- Smaller binary sizes of Rust plugins in Windows and Android binary packages +- Peel: New C++ bindings for GStreamer +- Lots of new plugins, features, performance improvements and bug fixes +- Countless bug fixes, build fixes, memory leak fixes, and other stability and reliability improvements + +<a id="major-changes"></a> +## Major new features and changes + +<a id="hip"></a> +### AMD HIP plugin and integration library + +- HIP (formerly known as Heterogeneous-computing Interface for Portability) is AMD’s + GPU programming API that enables portable, CUDA-like development across both AMD and + NVIDIA platforms: + + - On AMD GPUs, HIP runs natively via the ROCm stack. + - On NVIDIA GPUs, HIP operates as a thin translation layer over the CUDA runtime and driver APIs. + + This allows developers to maintain a single codebase that can target multiple GPU vendors with minimal effort. + +- The **new HIP plugin**hip-plugin provides the following elements: + + - **hipcompositor**: a HIP-based video mixer/compositor + - **hipconvert**: Converts video from one colorspace to another using HIP + - **hipconvertscale**: Resizes video and allow color conversion using HIP + - **hipscale**: Resize video using HIP + - **hipdownload**: Downloads HIP device memory into system memory + - **hipupload**: Uploads system memory into HIP device memory + +- The **GStreamer HIP integration helper library** provides HIP integration functionality + to applications and other HIP users. + +- Watch the Bringing AMD HIP into GStreamergstconf-hip talk from last year's GStreamer Conference + for more details or read Seungha's devlog postdevlog-hip on the subject. + +hip-plugin: https://gstreamer.freedesktop.org/documentation/hip/index.html?gi-language=c#hip-page +gstconf-hip: https://gstconf.ubicast.tv/videos/bringing-amd-hip-into-gstreamer/ +devlog-hip: https://centricular.com/devlog/2025-07/amd-hip-integration/ + +<a id="lvecv"></a> +### Low Complexity Enhancement Video Coding (LCEVC) support for H.265 and H.266 + +- LCEVClcevc is a codec that provides an enhancement layer on top of + another codec such as H.264 for example. It is standardised as MPEG-5 Part 2. + +- **LCEVC H.265 and H.266 encoder and decoder elements** based on V-Nova's SDK libraries + were added in this cycle + +- **Autoplugging support for LCEVC H265 and H266 video streams**, so these can be decoded + automatically in a decodebin3 or playbin3 scenario. + +lcevc: https://www.lcevc.org + +<a id="closedcaptions"></a> +### Closed captions and text handling improvements + +- **cea708overlay**: suport non-relative positioning for streams with CCs + that do not have relative positions. Instead of displaying them at the + top, they are positioned relatively. + +- **cea708mux**: expose "discarded-services" property on sink pads. This can be + useful when muxing in an original caption stream with a newly-created one + (e.g. transcription / translation), in which case one might wish to discard + select services from the original stream in order to avoid garbled captions. + +- **sccparse**: Better handling of streams with more byte tuples in the SCC field. + +- **tttocea608**: expose "speaker-prefix" property + +- Miscellaneous improvements and spec compliance fixes + +- Also see SMPTE ST-2038 metadata section below. + +<a id="stt-translations-and-speech-synthesis"></a> +### Speech to Text, Translation and Speech Synthesis + +- New **audio source separation element based on demucs** in Rust. This is useful + to separate speech from background audio before running speech to text transcription, + but could also be used to separate vocals from music for karaoke. + +- New **Deepgram speech-to-text transcription** plugin in Rust. + +- The **Speechmatics transcriber** has seen a **major refactoring** for better timings, + gap and discontinuity handling and has gained **support for the new Speechmatics speaker + identification API** as well as a new property to **mask profanities**. + +- New **ElevenLabs voice cloning element**. The new element can operate in two modes: + - In single speaker mode, the element will directly clone a single voice + from its input, without storing any samples. + - Otherwise, the element will store a backlog of samples, and wait to + receive certain events from a transcriber on its source pad before draining + them to create potentially multiple voices. + +- New **"compress" overflow mode for speech synthesizers** that can speed up + the audio while preserving pitch. This may be needed to keep or regain audio/video + synchronisation if translated speech output has been consistently longer in duration + than the original and there hasn't been a sufficient amount of silence that could be + filled in to make up the difference. + +- **awstranslate**: new "brevity-on" property for turning brevity on. + +- The **awstranscriber2** has been **refactored** to match the speechmatics transcriber design + and gained a "show-speaker-label" property that defines whether to partition speakers in the + transcription output. + +- New **textaccumulate** element for speech synthesis or translation preprocessing that + can be used to accumulate words and punctuation into complete sentences (or sentence fragments) + for synthesis and / or translation by further elements downstream. + +<a id="adaptive-streaming"></a> +### HLS DASH adaptive streaming improvements + +- Reverse playback, seeking and stream selection fixes in the HLS/DASH clients. + +- **hlscmafsink** can generate I-frame only playlists now + +- Both **hlssink3** and **hlscmafsink** gained support for use of a single media file, + in which case the media playlist will use byte range tags for each chunk whilst + always referencing the same single media file. This can be useful for VOD use cases. + +<a id="playback"></a> +### decodebin3 and playbin3 improvements + + - **decodebin3** now has a separate pad template for **metadata streams** and considers + KLV, ID3 PES streams and ST-2038 ancillary streams as raw formats for meta streams. This comes + also with a new dedicated `GST_STREAM_TYPE_METADATA` stream type in the stream collection. + +<a id="eflv"></a> +### Enhanced RTMP and multitrack audio/video support in FLV + +- The FLV container used for RTMP streaming is fairly old and limited in terms of features:
View file
_service:download_files:gst-plugins-bad-1.28.1.tar.xz/scripts/dist-common-files.py
Added
@@ -0,0 +1,73 @@ +#!/usr/bin/env python3 +# +# Copyright (C) 2023-2026 Tim-Philipp Müller <tim centricular net> +# +# 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. + +import os +import subprocess +import shutil +import tempfile +import sys + +if __name__ == "__main__": + dist_root = os.environ'MESON_DIST_ROOT' + build_root = os.environ'MESON_BUILD_ROOT' + source_root = os.environ'MESON_SOURCE_ROOT' + project_version = sys.argv1 + pwd = os.environ'PWD' + tmpdir = tempfile.gettempdir() + + ver_array = project_version.split('.') + major_minor = '{}.{}'.format(ver_array0, ver_array1) + + module = os.path.basename(os.path.normpath(source_root)) + + print('Copying README.md into dist staging directory ..') + readme_src = os.path.join(source_root, '..', '..', 'README.md') + shutil.copy2(readme_src, dist_root) + + # Release notes (instead of NEWS) - could also write it out as NEWS.md + print('Copying release notes into dist staging directory ..') + relnotes_src = os.path.join(source_root, '..', '..', 'release-notes', major_minor, f'release-notes-{major_minor}.md') + with open(relnotes_src, 'r') as f: + lines = f.readlines() + if not f'### {project_version}\n' in lines: + sys.exit(f'Update {relnotes_src} first, must contain a section for {project_version}') + if not project_version.endswith('.0'): + found = False + for line in lines: + if line.startswith('The latest') and project_version in line: + found = True + if not found: + sys.exit(f'Update {relnotes_src} first, header should say latest version is {project_version}.') + shutil.copy2(relnotes_src, dist_root) + + # RELEASE + print('Copying RELEASE into dist staging directory ..') + rel_src = os.path.join(source_root, '..', '..', 'release-notes', major_minor, f'RELEASE-{major_minor}.template') + with open(rel_src, 'r') as f: + lines = f.readlines() + + assert (lines0.startswith('This is GStreamer')) + + if module == 'gstreamer': + lines0 = f'This is GStreamer core {project_version}\n' + else: + lines0 = f'This is GStreamer {module} {project_version}\n' + + with open(os.path.join(dist_root, 'RELEASE'), 'w') as f: + f.writelines(lines)
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/aja/gstajasinkcombiner.cpp -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/aja/gstajasinkcombiner.cpp
Changed
@@ -35,7 +35,7 @@ GST_STATIC_CAPS("audio/x-raw, " "format = (string) S32LE, " "rate = (int) 48000, " - "channels = (int) 1, 16 , " + "channels = (int) { 6, 8, 16 }, " "layout = (string) interleaved")); static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE( @@ -140,10 +140,12 @@ switch (GST_EVENT_TYPE(event)) { case GST_EVENT_SEGMENT: { - const GstSegment *segment; + if (agg_pad == GST_AGGREGATOR_PAD_CAST(self->video_sinkpad)) { + const GstSegment *segment; - gst_event_parse_segment(event, &segment); - gst_aggregator_update_segment(GST_AGGREGATOR(self), segment); + gst_event_parse_segment(event, &segment); + gst_aggregator_update_segment(GST_AGGREGATOR(self), segment); + } break; } case GST_EVENT_CAPS: {
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/applemedia/avfassetsrc.h -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/applemedia/avfassetsrc.h
Changed
@@ -133,6 +133,7 @@ }; GType gst_avf_asset_src_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (avfassetsrc); G_END_DECLS
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/applemedia/avfassetsrc.m -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/applemedia/avfassetsrc.m
Changed
@@ -38,6 +38,7 @@ #endif #include "avfassetsrc.h" +#include "helpers.h" #include "coremediabuffer.h" GST_DEBUG_CATEGORY_STATIC (gst_avf_asset_src_debug); @@ -122,8 +123,16 @@ 0, "avfassetsrc element"); } +#ifndef HAVE_IOS +#define AV_RANK GST_RANK_SECONDARY +#else +#define AV_RANK GST_RANK_PRIMARY +#endif + G_DEFINE_TYPE_WITH_CODE (GstAVFAssetSrc, gst_avf_asset_src, GST_TYPE_ELEMENT, _do_init (g_define_type_id)); +GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (avfassetsrc, "avfassetsrc", AV_RANK, + GST_TYPE_AVF_ASSET_SRC, gst_applemedia_init_once ()); /* GObject vmethod implementations */
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/applemedia/avfdeviceprovider.h -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/applemedia/avfdeviceprovider.h
Changed
@@ -28,6 +28,7 @@ #endif #include <gst/gst.h> +#include <gst/gstdeviceprovider.h> #include "avfvideosrc.h" G_BEGIN_DECLS @@ -58,6 +59,7 @@ }; GType gst_avf_device_provider_get_type (void); +GST_DEVICE_PROVIDER_REGISTER_DECLARE (avfdeviceprovider); typedef struct _GstAvfDevice GstAvfDevice;
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/applemedia/avfdeviceprovider.m -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/applemedia/avfdeviceprovider.m
Changed
@@ -23,6 +23,7 @@ #include "config.h" #endif +#include <TargetConditionals.h> #import <AVFoundation/AVFoundation.h> #include "avfvideosrc.h" #include "avfdeviceprovider.h" @@ -37,6 +38,9 @@ G_DEFINE_TYPE (GstAVFDeviceProvider, gst_avf_device_provider, GST_TYPE_DEVICE_PROVIDER); +GST_DEVICE_PROVIDER_REGISTER_DEFINE (avfdeviceprovider, "avfdeviceprovider", + GST_RANK_PRIMARY, GST_TYPE_AVF_DEVICE_PROVIDER); + static GList *gst_avf_device_provider_probe (GstDeviceProvider * provider); static void @@ -81,13 +85,14 @@ g_free (unique_id); g_free (model_id); -#ifndef HAVE_IOS - char *manufacturer = g_strdup (device manufacturer UTF8String); - gst_structure_set (props, - "avf.manufacturer", G_TYPE_STRING, manufacturer, - NULL); - - g_free (manufacturer); +#if !TARGET_OS_WATCH + if (__builtin_available (macos 10.9, ios 14.0, tvos 17.0, visionos 2.1, *)) { + char *manufacturer = g_strdup (device manufacturer UTF8String); + gst_structure_set (props, + "avf.manufacturer", G_TYPE_STRING, manufacturer, + NULL); + g_free (manufacturer); + } #endif return props;
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/applemedia/avfvideosrc.h -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/applemedia/avfvideosrc.h
Changed
@@ -21,7 +21,7 @@ #define __GST_AVF_VIDEO_SRC_H__ #import <AVFoundation/AVFoundation.h> -#include <gst/base/gstpushsrc.h> +#include <gst/base/base.h> G_BEGIN_DECLS @@ -82,9 +82,12 @@ }; GType gst_avf_video_src_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (avfvideosrc); void gst_avf_video_src_debug_init (void); -GstCaps *gst_av_capture_device_get_caps (AVCaptureDevice *device, AVCaptureVideoDataOutput *output, GstAVFVideoSourceOrientation orientation); +GstCaps* gst_av_capture_device_get_caps (AVCaptureDevice *device, + AVCaptureVideoDataOutput *output, + GstAVFVideoSourceOrientation orientation); G_END_DECLS
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/applemedia/avfvideosrc.m -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/applemedia/avfvideosrc.m
Changed
@@ -25,11 +25,14 @@ #include "avfvideosrc.h" #include "glcontexthelper.h" +#include <TargetConditionals.h> #import <AVFoundation/AVFoundation.h> #import <CoreMedia/CoreMedia.h> -#ifndef HAVE_IOS + +#if TARGET_OS_OSX #import <AppKit/AppKit.h> #endif + #include <gst/video/video.h> #include <gst/gl/gstglcontext.h> #include "coremediabuffer.h" @@ -60,12 +63,12 @@ GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ( -#ifndef HAVE_IOS +#if TARGET_OS_OSX GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, "UYVY") ", " "texture-target = " GST_GL_TEXTURE_TARGET_RECTANGLE_STR ";" -#else +#elif TARGET_OS_IOS || TARGET_OS_TV GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, "NV12") ", " @@ -89,8 +92,16 @@ HAS_BUFFER_OR_STOP_REQUEST, } QueueState; +#ifndef HAVE_IOS +#define AV_RANK GST_RANK_SECONDARY +#else +#define AV_RANK GST_RANK_PRIMARY +#endif + #define gst_avf_video_src_parent_class parent_class G_DEFINE_TYPE (GstAVFVideoSrc, gst_avf_video_src, GST_TYPE_PUSH_SRC); +GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (avfvideosrc, "avfvideosrc", + AV_RANK, GST_TYPE_AVF_VIDEO_SRC, gst_applemedia_init_once ()); #define GST_TYPE_AVF_VIDEO_SOURCE_POSITION (gst_avf_video_source_position_get_type ()) static GType @@ -236,7 +247,7 @@ - (BOOL)openDevice; - (void)closeDevice; - (GstVideoFormat)getGstVideoFormat:(NSNumber *)pixel_format; -#ifndef HAVE_IOS +#if TARGET_OS_OSX - (CGDirectDisplayID)getDisplayIdFromDeviceIndex; - (float)getScaleFactorFromDeviceIndex; #endif @@ -260,8 +271,7 @@ @end -#ifdef HAVE_IOS - +#if TARGET_OS_IOS || TARGET_OS_TV static AVCaptureDeviceType GstAVFVideoSourceDeviceType2AVCaptureDeviceType(GstAVFVideoSourceDeviceType deviceType) { switch (deviceType) { case GST_AVF_VIDEO_SOURCE_DEVICE_TYPE_BUILT_IN_WIDE_ANGLE_CAMERA: @@ -287,6 +297,21 @@ } +static CGFloat GstAVFVideoSourceOrientation2VideoRotationAngle(GstAVFVideoSourceOrientation orientation) { + switch (orientation) { + case GST_AVF_VIDEO_SOURCE_ORIENTATION_PORTRAIT: + return 0.0; + case GST_AVF_VIDEO_SOURCE_ORIENTATION_PORTRAIT_UPSIDE_DOWN: + return 180.0; + case GST_AVF_VIDEO_SOURCE_ORIENTATION_LANDSCAPE_LEFT: + return -90.0; + case GST_AVF_VIDEO_SOURCE_ORIENTATION_LANDSCAPE_RIGHT: + return 90.0; + case GST_AVF_VIDEO_SOURCE_ORIENTATION_DEFAULT: + g_assert_not_reached(); + } +} + static AVCaptureVideoOrientation GstAVFVideoSourceOrientation2AVCaptureVideoOrientation(GstAVFVideoSourceOrientation orientation) { switch (orientation) { case GST_AVF_VIDEO_SOURCE_ORIENTATION_PORTRAIT: @@ -301,8 +326,7 @@ g_assert_not_reached(); } } - -#endif +#endif /* TARGET_OS_IOS || TARGET_OS_TV */ @implementation GstAVFVideoSrcImpl @@ -406,7 +430,8 @@ } if (deviceIndex == DEFAULT_DEVICE_INDEX) { -#ifdef HAVE_IOS +#if TARGET_OS_IOS || TARGET_OS_TV + // TODO: Also supported on macOS 10.15 and visionOS 2.1+ if (deviceType != DEFAULT_DEVICE_TYPE && position != DEFAULT_POSITION) { device = AVCaptureDevice defaultDeviceWithDeviceType:GstAVFVideoSourceDeviceType2AVCaptureDeviceType(deviceType) @@ -454,9 +479,7 @@ - (BOOL)openScreenInput { -#ifdef HAVE_IOS - return NO; -#else +#if TARGET_OS_OSX CGDirectDisplayID displayId; int screenHeight, screenWidth; @@ -501,6 +524,8 @@ screenInput.capturesMouseClicks = captureScreenMouseClicks; input = screenInput; return YES; +#else + return NO; #endif } @@ -533,9 +558,15 @@ /* retained by session */ connection = output connections firstObject; -#ifdef HAVE_IOS - if (orientation != DEFAULT_ORIENTATION) - connection.videoOrientation = GstAVFVideoSourceOrientation2AVCaptureVideoOrientation(orientation); +#if TARGET_OS_IOS || TARGET_OS_TV + if (orientation != DEFAULT_ORIENTATION) { + if (__builtin_available(ios 17.0, tvos 17.0, *)) { + // TODO: Also suppored on macOS 14.0+ + connection.videoRotationAngle = GstAVFVideoSourceOrientation2VideoRotationAngle(orientation); + } else { + connection.videoOrientation = GstAVFVideoSourceOrientation2AVCaptureVideoOrientation(orientation); + } + } #endif inputClock = ((AVCaptureInputPort *)connection.inputPorts0).clock; *successPtr = YES; @@ -601,7 +632,7 @@ return gst_format; } -#ifndef HAVE_IOS +#if TARGET_OS_OSX - (CGDirectDisplayID)getDisplayIdFromDeviceIndex { NSDictionary *description; @@ -705,7 +736,7 @@ pixel_formats = output.availableVideoCVPixelFormatTypes; if (captureScreen) { -#ifndef HAVE_IOS +#if TARGET_OS_OSX CGRect rect; AVCaptureScreenInput *screenInput = (AVCaptureScreenInput *)input; if (CGRectIsEmpty (screenInput.cropRect)) { @@ -757,7 +788,7 @@ forKey:(NSString*)kCVPixelBufferPixelFormatTypeKey; if (captureScreen) { -#ifndef HAVE_IOS +#if TARGET_OS_OSX AVCaptureScreenInput *screenInput = (AVCaptureScreenInput *)input; screenInput.minFrameDuration = CMTimeMake(info.fps_d, info.fps_n); #else @@ -1151,7 +1182,7 @@ PROP_DEVICE_TYPE, PROP_DO_STATS, PROP_FPS, -#ifndef HAVE_IOS +#if TARGET_OS_OSX PROP_CAPTURE_SCREEN, PROP_CAPTURE_SCREEN_CURSOR, PROP_CAPTURE_SCREEN_MOUSE_CLICKS, @@ -1264,7 +1295,7 @@ g_param_spec_int ("fps", "Frames per second", "Last measured framerate, if statistics are enabled", -1, G_MAXINT, -1, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); -#ifndef HAVE_IOS +#if TARGET_OS_OSX g_object_class_install_property (gobject_class, PROP_CAPTURE_SCREEN, g_param_spec_boolean ("capture-screen", "Enable screen capture", "Enable screen capture functionality", FALSE, @@ -1355,7 +1386,7 @@ GstAVFVideoSrcImpl *impl = GST_AVF_VIDEO_SRC_IMPL (object); switch (prop_id) { -#ifndef HAVE_IOS +#if TARGET_OS_OSX case PROP_CAPTURE_SCREEN:
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/applemedia/avsamplevideosink.h -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/applemedia/avsamplevideosink.h
Changed
@@ -75,6 +75,7 @@ }; GType gst_av_sample_video_sink_get_type(void); +GST_ELEMENT_REGISTER_DECLARE (avsamplebufferlayersink); G_END_DECLS
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/applemedia/avsamplevideosink.m -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/applemedia/avsamplevideosink.m
Changed
@@ -30,6 +30,7 @@ #endif #include "avsamplevideosink.h" +#include "helpers.h" GST_DEBUG_CATEGORY (gst_debug_av_sink); #define GST_CAT_DEFAULT gst_debug_av_sink @@ -72,6 +73,9 @@ G_DEFINE_TYPE_WITH_CODE (GstAVSampleVideoSink, gst_av_sample_video_sink, GST_TYPE_VIDEO_SINK, GST_DEBUG_CATEGORY_INIT (gst_debug_av_sink, "avsamplevideosink", 0, "AV Sample Video Sink")); +GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (avsamplebufferlayersink, + "avsamplebufferlayersink", GST_RANK_NONE, + GST_TYPE_AV_SAMPLE_VIDEO_SINK, gst_applemedia_init_once ()); static void gst_av_sample_video_sink_class_init (GstAVSampleVideoSinkClass * klass)
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/applemedia/corevideobuffer.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/applemedia/corevideobuffer.c
Changed
@@ -22,13 +22,17 @@ #endif #include "corevideobuffer.h" #include "corevideomemory.h" -#ifndef HAVE_IOS + +#include <TargetConditionals.h> +#if TARGET_OS_OSX #include "iosurfaceglmemory.h" #endif + #include "videotexturecache-gl.h" + #if defined(APPLEMEDIA_MOLTENVK) #include "videotexturecache-vulkan.h" -#ifndef HAVE_IOS +#if TARGET_OS_OSX #include "iosurfacevulkanmemory.h" #endif #endif @@ -110,9 +114,7 @@ _create_glmem (GstAppleCoreVideoPixelBuffer * gpixbuf, GstVideoInfo * info, guint plane, gsize size, GstVideoTextureCache * cache) { -#ifdef HAVE_IOS - return gst_video_texture_cache_create_memory (cache, gpixbuf, plane, size); -#else +#if TARGET_OS_OSX GstIOSurfaceGLMemory *mem; CVPixelBufferRef pixel_buf = gpixbuf->buf; IOSurfaceRef surface = CVPixelBufferGetIOSurface (pixel_buf); @@ -126,6 +128,8 @@ surface, GST_GL_TEXTURE_TARGET_RECTANGLE, tex_format, info, plane, NULL, pixel_buf, (GDestroyNotify) CFRelease); return GST_MEMORY_CAST (mem); +#else + return gst_video_texture_cache_create_memory (cache, gpixbuf, plane, size); #endif }
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/applemedia/helpers.h -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/applemedia/helpers.h
Changed
@@ -46,5 +46,7 @@ GstVideoFormat gst_video_format_from_cvpixelformat (int fmt); int gst_video_format_to_cvpixelformat (GstVideoFormat fmt); +void gst_applemedia_init_once (void); + G_END_DECLS #endif /* _APPLEMEDIA_HELPERS_H_ */
View file
_service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/applemedia/helpers.m
Added
@@ -0,0 +1,132 @@ +/* + * Copyright (C) 2023 Nirbheek Chauhan <nirbheek@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 <TargetConditionals.h> +#import <Foundation/Foundation.h> +#include <CoreVideo/CVPixelBuffer.h> +#include "helpers.h" +#include "corevideomemory.h" + +#if TARGET_OS_IOS || TARGET_OS_TV +#include "iosglmemory.h" +#endif + +#if TARGET_OS_OSX +static void +enable_mt_mode (void) +{ + NSThread * th = NSThread alloc init; + th start; + g_assert (NSThread isMultiThreaded); +} +#endif + +GstVideoFormat +gst_video_format_from_cvpixelformat (int fmt) +{ + /* Note that video and full-range color values map to the same format */ + switch (fmt) { + /* YUV */ + case kCVPixelFormatType_420YpCbCr8Planar: + case kCVPixelFormatType_420YpCbCr8PlanarFullRange: + return GST_VIDEO_FORMAT_I420; + case kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange: + case kCVPixelFormatType_420YpCbCr8BiPlanarFullRange: + return GST_VIDEO_FORMAT_NV12; + case kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange: + case kCVPixelFormatType_420YpCbCr10BiPlanarFullRange: + return GST_VIDEO_FORMAT_P010_10LE; + case kCVPixelFormatType_422YpCbCr8: + return GST_VIDEO_FORMAT_UYVY; + case kCVPixelFormatType_422YpCbCr8_yuvs: + return GST_VIDEO_FORMAT_YUY2; + /* Alpha YUV */ + case kCVPixelFormatType_4444AYpCbCr16: + return GST_VIDEO_FORMAT_AYUV64; + /* RGB formats */ + case kCVPixelFormatType_32ARGB: + return GST_VIDEO_FORMAT_ARGB; + case kCVPixelFormatType_32BGRA: + return GST_VIDEO_FORMAT_BGRA; + case kCVPixelFormatType_64ARGB: + return GST_VIDEO_FORMAT_ARGB64_BE; + case kCVPixelFormatType_64RGBALE: + return GST_VIDEO_FORMAT_RGBA64_LE; + default: + return GST_VIDEO_FORMAT_UNKNOWN; + } +} + +int +gst_video_format_to_cvpixelformat (GstVideoFormat fmt) +{ + switch (fmt) { + /* YUV */ + case GST_VIDEO_FORMAT_I420: + return kCVPixelFormatType_420YpCbCr8Planar; + case GST_VIDEO_FORMAT_NV12: + return kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange; + case GST_VIDEO_FORMAT_P010_10LE: + return kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange; + case GST_VIDEO_FORMAT_UYVY: + return kCVPixelFormatType_422YpCbCr8; + case GST_VIDEO_FORMAT_YUY2: + return kCVPixelFormatType_422YpCbCr8_yuvs; + /* Alpha YUV */ + case GST_VIDEO_FORMAT_AYUV64: +/* This is fine for now because Apple only ships LE devices */ +#if G_BYTE_ORDER != G_LITTLE_ENDIAN +#error "AYUV64 is NE but kCVPixelFormatType_4444AYpCbCr16 is LE" +#endif + return kCVPixelFormatType_4444AYpCbCr16; + /* RGB formats */ + case GST_VIDEO_FORMAT_ARGB: + return kCVPixelFormatType_32ARGB; + case GST_VIDEO_FORMAT_BGRA: + return kCVPixelFormatType_32BGRA; + case GST_VIDEO_FORMAT_ARGB64_BE: + return kCVPixelFormatType_64ARGB; + case GST_VIDEO_FORMAT_RGBA64_LE: + return kCVPixelFormatType_64RGBALE; + default: + g_assert_not_reached (); + return -1; + } +} + +void +gst_applemedia_init_once (void) +{ + static gsize init_once = 0; + + if (g_once_init_enter (&init_once)) { + gst_apple_core_video_memory_init (); +#if TARGET_OS_IOS || TARGET_OS_TV + gst_ios_gl_memory_init (); +#endif +#if TARGET_OS_OSX + enable_mt_mode (); +#endif + g_once_init_leave (&init_once, 1); + } +}
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/applemedia/iosassetsrc.h -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/applemedia/iosassetsrc.h
Changed
@@ -91,6 +91,7 @@ }; GType gst_ios_asset_src_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (iosassetsrc); G_END_DECLS
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/applemedia/iosassetsrc.m -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/applemedia/iosassetsrc.m
Changed
@@ -40,6 +40,7 @@ #include <gst/gst.h> #include <gst/base/base.h> #include "iosassetsrc.h" +#include "helpers.h" static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, @@ -93,6 +94,9 @@ G_DEFINE_TYPE_WITH_CODE (GstIOSAssetSrc, gst_ios_asset_src, GST_TYPE_BASE_SRC, _do_init (g_define_type_id)); +GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (iosassetsrc, "iosassetsrc", + GST_RANK_SECONDARY, GST_TYPE_IOS_ASSET_SRC, + gst_applemedia_init_once ()); static void gst_ios_asset_src_class_init (GstIOSAssetSrcClass * klass)
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/applemedia/meson.build -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/applemedia/meson.build
Changed
@@ -1,61 +1,61 @@ applemedia_sources = - 'plugin.m', - 'vtutil.c', - 'corevideomemory.c', - 'corevideobuffer.c', - 'coremediabuffer.c', - 'videotexturecache.m', - 'videotexturecache-gl.m', - 'glcontexthelper.c', - 'helpers.c', + 'avfassetsrc.m', + 'avsamplevideosink.m', + 'coremediabuffer.c', + 'corevideobuffer.c', + 'corevideomemory.c', + 'glcontexthelper.c', + 'helpers.m', + 'plugin.m', + 'videotexturecache-gl.m', + 'videotexturecache.m', + 'vtenc.c', + 'vtdec.c', + 'vtutil.c', applemedia_headers = - 'metal-helpers.h', - 'vtutil.h', - 'iosglmemory.h', - 'corevideobuffer.h', - 'videotexturecache.h', - 'coremediabuffer.h', - 'vtenc.h', + 'avfassetsrc.h', + 'avfdeviceprovider.h', + 'avfvideosrc.h', 'avsamplevideosink.h', - 'helpers.h', + 'coremediabuffer.h', + 'corevideobuffer.h', 'corevideomemory.h', + 'glcontexthelper.h', + 'helpers.h', 'iosassetsrc.h', + 'iosglmemory.h', 'iosurfaceglmemory.h', - 'avfdeviceprovider.h', - 'avfassetsrc.h', 'iosurfacevulkanmemory.h', + 'metal-helpers.h', + 'videotexturecache-gl.h', 'videotexturecache-vulkan.h', + 'videotexturecache.h', 'vtdec.h', - 'avfvideosrc.h', - 'videotexturecache-gl.h', - 'glcontexthelper.h', + 'vtenc.h', + 'vtutil.h', applemedia_args = - '-Dgst_core_media_buffer_new=gst_core_media_buffer_priv_new', - '-Dgst_core_media_buffer_get_type=gst_core_media_buffer_priv_get_type', - '-Dgst_core_media_buffer_get_pixel_buffer=gst_core_media_buffer_priv_get_pixel_buffer', - '-Dgst_core_video_buffer_new=gst_core_video_buffer_priv_new', - '-Dgst_core_video_buffer_get_type=gst_core_video_buffer_priv_get_type', - '-DGST_USE_UNSTABLE_API' + '-Dgst_core_media_buffer_new=gst_core_media_buffer_priv_new', + '-Dgst_core_media_buffer_get_type=gst_core_media_buffer_priv_get_type', + '-Dgst_core_media_buffer_get_pixel_buffer=gst_core_media_buffer_priv_get_pixel_buffer', + '-Dgst_core_video_buffer_new=gst_core_video_buffer_priv_new', + '-Dgst_core_video_buffer_get_type=gst_core_video_buffer_priv_get_type', + '-DGST_USE_UNSTABLE_API' -avfoundation_sources = +avcapturedevice_sources = 'avfvideosrc.m', - 'avfassetsrc.m', - 'avsamplevideosink.m', 'avfdeviceprovider.m', -vt_sources = - 'vtenc.c', - 'vtdec.c' +ios_deprecated_sources = + 'iosassetsrc.m', ios_sources = - 'iosassetsrc.m', 'iosglmemory.c', @@ -69,7 +69,7 @@ doc_sources = -foreach s: applemedia_sources + avfoundation_sources + vt_sources + ios_sources + non_ios_sources + vulkan_sources + applemedia_headers +foreach s: applemedia_sources + avcapturedevice_sources + ios_sources + ios_deprecated_sources + non_ios_sources + vulkan_sources + applemedia_headers doc_sources += meson.current_source_dir() / s endforeach @@ -80,7 +80,7 @@ applemedia_objc_args = applemedia_found_deps = false applemedia_option = get_option('applemedia') -if not 'darwin', 'ios'.contains(host_system) or applemedia_option.disabled() +if host_system != 'darwin' or applemedia_option.disabled() or not have_objcpp subdir_done() endif @@ -92,53 +92,59 @@ applemedia_objc_args += '-fobjc-arc' objcpp = meson.get_compiler('objcpp') -applemedia_frameworks = -corefoundation_dep = dependency('CoreFoundation', required : applemedia_option) -coremedia_dep = dependency('CoreMedia', required : applemedia_option) -corevideo_dep = dependency('CoreVideo', required : applemedia_option) -applemedia_frameworks += corefoundation_dep, coremedia_dep, corevideo_dep +applemedia_frameworks = + dependency('AVFoundation', required: applemedia_option), + dependency('CoreFoundation', required : applemedia_option), + dependency('CoreMedia', required : applemedia_option), + dependency('CoreVideo', required : applemedia_option), + -avfoundation_dep = dependency('AVFoundation', required : applemedia_option) -if avfoundation_dep.found() - applemedia_sources += avfoundation_sources - applemedia_frameworks += avfoundation_dep +if subsystem == 'macos' or subsystem.startswith('ios') + applemedia_sources += avcapturedevice_sources endif -videotoolbox_dep = dependency('VideoToolbox', required : applemedia_option) -if videotoolbox_dep.found() - applemedia_sources += vt_sources - applemedia_frameworks += videotoolbox_dep +if not subsystem.startswith('watchos') + applemedia_frameworks += dependency('VideoToolbox', required : applemedia_option) endif -if host_system == 'ios' - applemedia_sources += ios_sources - applemedia_objc_args += '-fobjc-abi-version=2', '-fobjc-legacy-dispatch' - - ios_media_dep = dependency('appleframeworks', modules : 'Foundation', 'AssetsLibrary', required : applemedia_option) - iosurface_dep = dependency('IOSurface', required : applemedia_option) - applemedia_frameworks += ios_media_dep, iosurface_dep +if subsystem == 'macos' + applemedia_sources += non_ios_sources + cocoa_dep = dependency('Cocoa', required : applemedia_option) + iosurface_dep = dependency('IOSurface', required : applemedia_option) + applemedia_opengl_dep = dependency('appleframeworks', modules : 'OpenGL', required : applemedia_option) + applemedia_frameworks += cocoa_dep, applemedia_opengl_dep, iosurface_dep else - applemedia_sources += non_ios_sources - cocoa_dep = dependency('Cocoa', required : applemedia_option) - iosurface_dep = dependency('IOSurface', required : applemedia_option) - applemedia_opengl_dep = dependency('appleframeworks', modules : 'OpenGL', required : applemedia_option) - applemedia_frameworks += cocoa_dep, applemedia_opengl_dep, iosurface_dep + applemedia_sources += ios_sources + if subsystem.startswith('ios') + applemedia_sources += ios_deprecated_sources + ios_media_dep = dependency('appleframeworks', modules : 'Foundation', 'AssetsLibrary', required : applemedia_option) + else + ios_media_dep = dependency('appleframeworks', modules : 'Foundation', required : applemedia_option) + endif + iosurface_dep = dependency('IOSurface', required : applemedia_option) + applemedia_frameworks += ios_media_dep, iosurface_dep + applemedia_objc_args += '-fobjc-abi-version=2', '-fobjc-legacy-dispatch' endif applemedia_found_deps = true foreach framework : applemedia_frameworks - if not framework.found() - applemedia_found_deps = false - endif + if not framework.found() + applemedia_found_deps = false + endif endforeach applemedia_objcpp_args = vulkan_option = get_option('vulkan') vk_required = applemedia_option.enabled() and vulkan_option.enabled() -if gstvulkan_dep.found() and have_objcpp and not vulkan_option.disabled() - moltenvk_dep = objcpp.find_library('MoltenVK', required: vk_required) - metal_dep = dependency('appleframeworks', modules : 'Metal', required: vk_required) - have_mvk_header = objcpp.has_header('MoltenVK/vk_mvk_moltenvk.h', required: vk_required) +if gstvulkan_dep.found() and not vulkan_option.disabled() + moltenvk_dep = objcpp.find_library('MoltenVK', required: false) + if moltenvk_dep.found() + have_mvk_header = objcpp.has_header('MoltenVK/vk_mvk_moltenvk.h', required: vk_required) + else
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/applemedia/plugin.m -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/applemedia/plugin.m
Changed
@@ -21,33 +21,33 @@ # include <config.h> #endif +#include <TargetConditionals.h> #include <Foundation/Foundation.h> #include "corevideomemory.h" -#ifdef HAVE_IOS + +#if TARGET_OS_IOS #include "iosassetsrc.h" +#endif + +#if TARGET_OS_IOS || TARGET_OS_TV #include "iosglmemory.h" #endif -#ifdef HAVE_AVFOUNDATION -#include "avfvideosrc.h" + #include "avfassetsrc.h" -#include "avfdeviceprovider.h" #include "avsamplevideosink.h" +#if !TARGET_OS_WATCH && !TARGET_OS_TV +#include "avfvideosrc.h" +#if !TARGET_OS_TV && !TARGET_OS_VISION +#include "avfdeviceprovider.h" #endif -#ifdef HAVE_VIDEOTOOLBOX -#include "vtdec.h" -#endif -#ifndef HAVE_IOS -#define AV_RANK GST_RANK_SECONDARY -#else -#define AV_RANK GST_RANK_PRIMARY #endif -#ifdef HAVE_VIDEOTOOLBOX -void gst_vtenc_register_elements (GstPlugin * plugin); +#if !TARGET_OS_WATCH +#include "vtdec.h" +#include "vtenc.h" #endif -#ifndef HAVE_IOS - +#if TARGET_OS_OSX static void enable_mt_mode (void) { @@ -60,38 +60,35 @@ static gboolean plugin_init (GstPlugin * plugin) { - gboolean res = TRUE; + gboolean res = FALSE; gst_apple_core_video_memory_init (); -#ifdef HAVE_IOS +#if TARGET_OS_IOS || TARGET_OS_TV gst_ios_gl_memory_init (); +#endif - res &= gst_element_register (plugin, "iosassetsrc", GST_RANK_SECONDARY, - GST_TYPE_IOS_ASSET_SRC); -#else - enable_mt_mode (); +#if TARGET_OS_IOS + res |= GST_ELEMENT_REGISTER (iosassetsrc, plugin); #endif -#ifdef HAVE_AVFOUNDATION - res &= gst_element_register (plugin, "avfvideosrc", AV_RANK, - GST_TYPE_AVF_VIDEO_SRC); - res &= gst_element_register (plugin, "avfassetsrc", AV_RANK, - GST_TYPE_AVF_ASSET_SRC); - res &= gst_element_register (plugin, "avsamplebufferlayersink", - GST_RANK_NONE, GST_TYPE_AV_SAMPLE_VIDEO_SINK); - res &= gst_device_provider_register (plugin, "avfdeviceprovider", - GST_RANK_PRIMARY, GST_TYPE_AVF_DEVICE_PROVIDER); +#if TARGET_OS_OSX + enable_mt_mode (); #endif -#ifdef HAVE_VIDEOTOOLBOX - /* Check if the framework actually exists at runtime */ - if (&VTCompressionSessionCreate != NULL) { - gst_vtdec_register_elements (plugin); - gst_vtenc_register_elements (plugin); - } + res |= GST_ELEMENT_REGISTER (avfassetsrc, plugin); + res |= GST_ELEMENT_REGISTER (avsamplebufferlayersink, plugin); +#if !TARGET_OS_WATCH && !TARGET_OS_TV + res |= GST_ELEMENT_REGISTER (avfvideosrc, plugin); +#if !TARGET_OS_VISION + res |= GST_DEVICE_PROVIDER_REGISTER (avfdeviceprovider, plugin); +#endif #endif +#if !TARGET_OS_WATCH + res |= gst_vtdec_register_elements (plugin); + res |= gst_vtenc_register_elements (plugin); +#endif return res; }
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/applemedia/videotexturecache-gl.h -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/applemedia/videotexturecache-gl.h
Changed
@@ -20,6 +20,7 @@ #ifndef __GST_CORE_VIDEO_TEXTURE_CACHE_GL_H__ #define __GST_CORE_VIDEO_TEXTURE_CACHE_GL_H__ +#include <TargetConditionals.h> #include <gst/video/gstvideometa.h> #include <gst/gl/gl.h> #include "corevideomemory.h" @@ -40,7 +41,7 @@ GstVideoTextureCache parent; GstGLContext *ctx; -#ifdef HAVE_IOS +#if TARGET_OS_IOS || TARGET_OS_TV CVOpenGLESTextureCacheRef cache; #else GstBufferPool *pool;
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/applemedia/videotexturecache-gl.m -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/applemedia/videotexturecache-gl.m
Changed
@@ -25,10 +25,13 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS -#ifndef HAVE_IOS +#include <TargetConditionals.h> + +#if TARGET_OS_OSX #import <AppKit/AppKit.h> #include "iosurfaceglmemory.h" #endif + #include "iosglmemory.h" #include "videotexturecache-gl.h" #include "coremediabuffer.h" @@ -48,7 +51,7 @@ typedef struct _TextureWrapper { -#ifdef HAVE_IOS +#if TARGET_OS_IOS || TARGET_OS_TV CVOpenGLESTextureCacheRef cache; CVOpenGLESTextureRef texture; #else @@ -80,7 +83,7 @@ { GstVideoTextureCacheGL *cache_gl = GST_VIDEO_TEXTURE_CACHE_GL (object); -#ifdef HAVE_IOS +#if TARGET_OS_IOS || TARGET_OS_TV CFRelease (cache_gl->cache); /* iOS has no "CVOpenGLESTextureCacheRelease" */ #else #if 0 @@ -134,7 +137,7 @@ G_OBJECT_CLASS (gst_video_texture_cache_gl_parent_class)->constructed (object); g_return_if_fail (GST_IS_GL_CONTEXT (cache_gl->ctx)); -#ifdef HAVE_IOS +#if TARGET_OS_IOS || TARGET_OS_TV CFMutableDictionaryRef cache_attrs = CFDictionaryCreateMutable (NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); @@ -172,7 +175,7 @@ cache_class->create_memory = gst_video_texture_cache_gl_create_memory; } -#ifdef HAVE_IOS +#if TARGET_OS_IOS || TARGET_OS_TV static void gst_video_texture_cache_gl_release_texture (TextureWrapper *data) { @@ -259,7 +262,7 @@ GstVideoTextureCacheGL *cache_gl = GST_VIDEO_TEXTURE_CACHE_GL (cache); ContextThreadData data = {cache_gl, gpixbuf, plane, size, NULL}; -#ifdef HAVE_IOS +#if TARGET_OS_IOS || TARGET_OS_TV gst_gl_context_thread_add (cache_gl->ctx, (GstGLContextThreadFunc) _do_create_memory, &data); #endif
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/applemedia/videotexturecache-vulkan.mm -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/applemedia/videotexturecache-vulkan.mm
Changed
@@ -21,9 +21,10 @@ # include "config.h" #endif +#include <TargetConditionals.h> #include <Metal/Metal.h> -#ifndef HAVE_IOS +#if TARGET_OS_OSX #import <AppKit/AppKit.h> #endif #include "iosurfacevulkanmemory.h"
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/applemedia/videotexturecache.m -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/applemedia/videotexturecache.m
Changed
@@ -21,7 +21,8 @@ # include "config.h" #endif -#ifndef HAVE_IOS +#include <TargetConditionals.h> +#if TARGET_OS_OSX #import <AppKit/AppKit.h> #endif #include "videotexturecache.h"
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/applemedia/vtdec.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/applemedia/vtdec.c
Changed
@@ -50,16 +50,23 @@ #include "config.h" #endif -#ifdef HAVE_IOS -#include <dlfcn.h> -#endif #include <string.h> +#include "vtdec.h" #include <gst/gst.h> #include <gst/base/gstbytewriter.h> #include <gst/video/video.h> #include <gst/video/gstvideodecoder.h> #include <gst/gl/gstglcontext.h> -#include "vtdec.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) +#define HAVE_SUPPLEMENTAL_DEFINITION +#else +#include <dlfcn.h> +#endif +#endif + #include "vtutil.h" #include "helpers.h" #include "corevideobuffer.h" @@ -94,6 +101,7 @@ GstVideoCodecState * state); static gboolean gst_vtdec_flush (GstVideoDecoder * decoder); static GstFlowReturn gst_vtdec_finish (GstVideoDecoder * decoder); +static GstFlowReturn gst_vtdec_drain (GstVideoDecoder * decoder); static gboolean gst_vtdec_sink_event (GstVideoDecoder * decoder, GstEvent * event); static GstStateChangeReturn gst_vtdec_change_state (GstElement * element, @@ -216,6 +224,7 @@ video_decoder_class->set_format = GST_DEBUG_FUNCPTR (gst_vtdec_set_format); video_decoder_class->flush = GST_DEBUG_FUNCPTR (gst_vtdec_flush); video_decoder_class->finish = GST_DEBUG_FUNCPTR (gst_vtdec_finish); + video_decoder_class->drain = GST_DEBUG_FUNCPTR (gst_vtdec_drain); video_decoder_class->handle_frame = GST_DEBUG_FUNCPTR (gst_vtdec_handle_frame); video_decoder_class->sink_event = GST_DEBUG_FUNCPTR (gst_vtdec_sink_event); @@ -331,12 +340,16 @@ GstVideoDecoder *decoder = GST_VIDEO_DECODER (vtdec); g_mutex_lock (&vtdec->queue_mutex); - while (gst_vec_deque_is_empty (vtdec->reorder_queue) + while (gst_vec_deque_get_length (vtdec->reorder_queue) <= vtdec->dbp_size && !vtdec->pause_task && !vtdec->is_flushing && !vtdec->is_draining) { g_cond_wait (&vtdec->queue_cond, &vtdec->queue_mutex); } - if (vtdec->pause_task) { + /* If we're currently draining/flushing, make sure to not pause before we output all the frames */ + if (vtdec->pause_task && + ((!vtdec->is_flushing && !vtdec->is_draining) || + gst_vec_deque_is_empty (vtdec->reorder_queue))) { + GST_DEBUG_OBJECT (vtdec, "pausing output loop as requested"); g_mutex_unlock (&vtdec->queue_mutex); gst_pad_pause_task (GST_VIDEO_DECODER_SRC_PAD (decoder)); return; @@ -344,7 +357,7 @@ /* push a buffer if there are enough frames to guarantee * that we push in PTS order, or if we're draining/flushing */ - while ((gst_vec_deque_get_length (vtdec->reorder_queue) >= + while ((gst_vec_deque_get_length (vtdec->reorder_queue) > vtdec->dbp_size) || vtdec->is_flushing || vtdec->is_draining) { gboolean is_flushing; @@ -370,9 +383,11 @@ GST_LOG_OBJECT (vtdec, "dropping frame %d", frame->system_frame_number); gst_video_decoder_drop_frame (decoder, frame); } else { - GST_TRACE_OBJECT (vtdec, "pushing frame %d", - frame->system_frame_number); + guint32 frame_num = frame->system_frame_number; + GST_TRACE_OBJECT (vtdec, "pushing frame %d", frame_num); ret = gst_video_decoder_finish_frame (decoder, frame); + GST_TRACE_OBJECT (vtdec, "frame %d push ret %s", frame_num, + gst_flow_get_name (ret)); } GST_VIDEO_DECODER_STREAM_UNLOCK (vtdec); @@ -396,6 +411,7 @@ gst_video_decoder_release_frame (decoder, frame); } + /* Don't consider the FLUSHING ret an error if something flagged is_flushing in the meantime */ if (vtdec->is_flushing && ret == GST_FLOW_FLUSHING) { ret = GST_FLOW_OK; } @@ -407,7 +423,7 @@ GST_VIDEO_DECODER_STREAM_UNLOCK (vtdec); if (ret != GST_FLOW_OK) { - GST_DEBUG_OBJECT (vtdec, "pausing output task: %s", + GST_DEBUG_OBJECT (vtdec, "pausing output task because of downstream: %s", gst_flow_get_name (ret)); gst_pad_pause_task (GST_VIDEO_DECODER_SRC_PAD (decoder)); } @@ -493,6 +509,35 @@ } static gboolean +gst_vtdec_needs_new_session (GstCaps * old_caps, GstCaps * new_caps) +{ + GstCaps *old_copy, *new_copy; + gboolean ret; + + if (!old_caps) + return TRUE; + + if (!new_caps) + return FALSE; + + old_copy = gst_caps_copy (old_caps); + new_copy = gst_caps_copy (new_caps); + + /* Just ignore the framerate for now, was causing decoding errors with some fmp4 files */ + gst_structure_remove_field (gst_caps_get_structure (old_copy, 0), + "framerate"); + gst_structure_remove_field (gst_caps_get_structure (new_copy, 0), + "framerate"); + + ret = !gst_caps_is_equal (old_copy, new_copy); + + gst_caps_unref (old_copy); + gst_caps_unref (new_copy); + + return ret; +} + +static gboolean gst_vtdec_negotiate (GstVideoDecoder * decoder) { GstVideoCodecState *output_state = NULL; @@ -506,6 +551,8 @@ gboolean output_vulkan = FALSE; #endif + GST_DEBUG_OBJECT (decoder, "negotiating"); + vtdec = GST_VTDEC (decoder); if (vtdec->session) gst_vtdec_drain_decoder (GST_VIDEO_DECODER_CAST (vtdec), FALSE); @@ -581,17 +628,20 @@ output_state->caps = gst_video_info_to_caps (&output_state->info); if (features) { gst_caps_set_features (output_state->caps, 0, features); + +#if TARGET_OS_OSX || TARGET_OS_IOS || TARGET_OS_TV output_textures = gst_caps_features_contains (features, GST_CAPS_FEATURE_MEMORY_GL_MEMORY); if (output_textures) gst_caps_set_simple (output_state->caps, "texture-target", G_TYPE_STRING, -#ifndef HAVE_IOS +#if TARGET_OS_OSX GST_GL_TEXTURE_TARGET_RECTANGLE_STR, #else GST_GL_TEXTURE_TARGET_2D_STR, #endif NULL); +#endif #if defined(APPLEMEDIA_MOLTENVK) output_vulkan = @@ -608,22 +658,29 @@ "negotiated output format %" GST_PTR_FORMAT " previous %" GST_PTR_FORMAT, output_state->caps, prevcaps); - if (vtdec->session) - gst_vtdec_invalidate_session (vtdec); + /* Only recreate session if something other than framerate changed */ + if (gst_vtdec_needs_new_session (prevcaps, output_state->caps)) { + if (vtdec->session) + gst_vtdec_invalidate_session (vtdec); - err = gst_vtdec_create_session (vtdec, format, TRUE); - if (err == noErr) { - GST_INFO_OBJECT (vtdec, "using hardware decoder"); - } else if (err == kVTVideoDecoderNotAvailableNowErr && renegotiating) { - GST_WARNING_OBJECT (vtdec, "hw decoder not available anymore"); - err = gst_vtdec_create_session (vtdec, format, FALSE); - } + err = gst_vtdec_create_session (vtdec, format, TRUE); + + if (err == noErr) { + GST_INFO_OBJECT (vtdec, "using hardware decoder"); + } else if (err == kVTVideoDecoderNotAvailableNowErr && renegotiating) { + GST_WARNING_OBJECT (vtdec, "hw decoder not available anymore"); + err = gst_vtdec_create_session (vtdec, format, FALSE); + } - if (err != noErr) { - GST_ELEMENT_ERROR (vtdec, RESOURCE, FAILED, (NULL), - ("VTDecompressionSessionCreate returned %d", (int) err));
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/applemedia/vtdec.h -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/applemedia/vtdec.h
Changed
@@ -24,6 +24,7 @@ #include <gst/base/gstqueuearray.h> #include <gst/video/video.h> #include <gst/video/gstvideodecoder.h> +#include <TargetConditionals.h> #include <CoreMedia/CoreMedia.h> #include <VideoToolbox/VideoToolbox.h> #include "videotexturecache.h" @@ -47,6 +48,13 @@ #define GST_VTDEC_DPB_MAX_SIZE 16 +typedef enum +{ + NoneSupported = 0, + Av1Supported = 1 << 0, + Vp9Supported = 1 << 1, +} SupplementalSupport; + struct _GstVtdec { GstVideoDecoder base_vtdec; @@ -62,10 +70,13 @@ GMutex queue_mutex; GCond queue_cond; - GstFlowReturn downstream_ret; + /* protected by queue_mutex */ gboolean is_flushing; gboolean is_draining; gboolean pause_task; + + /* protected by the STREAM_LOCK */ + GstFlowReturn downstream_ret; #if defined(APPLEMEDIA_MOLTENVK) GstVulkanInstance *instance; @@ -73,6 +84,7 @@ #endif gboolean require_hardware; + SupplementalSupport codec_support; gboolean av1_needs_sequence_header; /* TRUE if we need to wait for sequence header OBU before creating session */ GstBuffer *av1_sequence_header_obu; /* Store the sequence header OBU for format description */ @@ -87,8 +99,12 @@ }; GType gst_vtdec_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (vtdec); +#if !TARGET_OS_WATCH +GST_ELEMENT_REGISTER_DECLARE (vtdec_hw); +#endif -void gst_vtdec_register_elements (GstPlugin * plugin); +gboolean gst_vtdec_register_elements (GstPlugin * plugin); G_END_DECLS
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/applemedia/vtenc.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/applemedia/vtenc.c
Changed
@@ -96,7 +96,7 @@ * * Apple VideoToolbox H265 encoder with alpha channel support. * This encoder can either use HW or a SW implementation depending on the device. - * + * * ## Example pipeline (assuming a PNG with an alpha channel as input) * | * gst-launch-1.0 -v filesrc location=test.png ! pngdec ! imagefreeze num-buffers=1000 ! videoconvert ! vtenc_h265a ! qtmux ! filesink location=out.mov @@ -111,7 +111,7 @@ * * Apple VideoToolbox H265 HW-only encoder with alpha channel support. * Currently only available on macOS. - * + * * ## Example pipeline (assuming a PNG with an alpha channel as input) * | * gst-launch-1.0 -v filesrc location=test.png ! pngdec ! imagefreeze num-buffers=1000 ! videoconvert ! vtenc_h265a ! qtmux ! filesink location=out.mov @@ -127,9 +127,11 @@ #include "vtenc.h" #include "coremediabuffer.h" -#ifdef HAVE_IOS + +#if !TARGET_OS_OSX #include "corevideobuffer.h" #endif + #include "vtutil.h" #include "helpers.h" #include <gst/pbutils/codec-utils.h> @@ -171,12 +173,6 @@ const CFStringRef kVTCompressionPropertyKey_Quality = CFSTR ("Quality"); #endif -#ifdef HAVE_VIDEOTOOLBOX_10_9_6 -extern OSStatus -VTCompressionSessionPrepareToEncodeFrames (VTCompressionSessionRef session) - __attribute__((weak_import)); -#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. */ @@ -254,14 +250,14 @@ static GstFlowReturn gst_vtenc_encode_frame (GstVTEnc * self, GstVideoCodecFrame * frame); -static void gst_vtenc_enqueue_buffer (void *outputCallbackRefCon, +static void gst_vtenc_session_output_callback (void *outputCallbackRefCon, void *sourceFrameRefCon, OSStatus status, VTEncodeInfoFlags infoFlags, CMSampleBufferRef sampleBuffer); static gboolean gst_vtenc_buffer_is_keyframe (GstVTEnc * self, CMSampleBufferRef sbuf); -#ifndef HAVE_IOS +#if TARGET_OS_OSX static GstVTEncFrame *gst_vtenc_frame_new (GstBuffer * buf, GstVideoInfo * videoinfo); static void gst_vtenc_frame_free (GstVTEncFrame * frame); @@ -317,7 +313,7 @@ { GstCaps *caps = gst_static_caps_get (&sink_caps); -#ifndef HAVE_IOS +#if TARGET_OS_OSX gboolean enable_argb = TRUE; int retval; char cpu_name30; @@ -774,38 +770,40 @@ g_mutex_unlock (&self->queue_mutex); } -static void -gst_vtenc_set_flushing_flag (GstVTEnc * self) -{ - g_mutex_lock (&self->queue_mutex); - self->is_flushing = TRUE; - g_cond_signal (&self->queue_cond); - g_mutex_unlock (&self->queue_mutex); -} - static GstFlowReturn -gst_vtenc_finish_encoding (GstVTEnc * self, gboolean is_flushing) +gst_vtenc_drain_encoder (GstVTEnc * self, gboolean flush) { - GST_DEBUG_OBJECT (self, - "complete encoding and clean buffer queue, is flushing %d", is_flushing); + GST_DEBUG_OBJECT (self, "drain_encoder, flushing: %d", flush); OSStatus vt_status; /* In case of EOS before the first buffer/caps */ if (self->session == NULL) return GST_FLOW_OK; - /* If output loop failed to push things downstream */ - if (self->downstream_ret != GST_FLOW_OK - && self->downstream_ret != GST_FLOW_FLUSHING) { - /* Tells enqueue_buffer() to instantly discard any new encoded frames */ - gst_vtenc_set_flushing_flag (self); + /* Only early-return here if we're draining (as that needs to output frames). + * Flushing doesn't care about errors from downstream. */ + if (!flush && self->downstream_ret != GST_FLOW_OK) { + /* Makes sure the output callback won't get stuck waiting for space in the queue */ + g_mutex_lock (&self->queue_mutex); + self->is_flushing = TRUE; + g_cond_signal (&self->queue_cond); + g_mutex_unlock (&self->queue_mutex); + GST_WARNING_OBJECT (self, "Output loop stopped with error (%s), leaving", gst_flow_get_name (self->downstream_ret)); return self->downstream_ret; } - if (is_flushing) - gst_vtenc_set_flushing_flag (self); + g_mutex_lock (&self->queue_mutex); + if (flush) { + GST_DEBUG_OBJECT (self, "setting flushing flag"); + self->is_flushing = TRUE; + } else { + GST_DEBUG_OBJECT (self, "setting draining flag"); + self->is_draining = TRUE; + } + g_cond_signal (&self->queue_cond); + g_mutex_unlock (&self->queue_mutex); if (!gst_vtenc_ensure_output_loop (self)) { GST_ERROR_OBJECT (self, "Output loop failed to resume"); @@ -827,9 +825,31 @@ (int) vt_status); } + /* If self->first_frame is still true, that means we never got more than 1 frame + * and that's all for now, so let's push it manually now */ + if (self->first_frame) { + GST_DEBUG_OBJECT (self, + "first frame never pushed downstream, sending to output loop"); + + g_mutex_lock (&self->queue_mutex); + gst_vec_deque_push_tail (self->output_queue, self->first_frame); + self->first_frame = NULL; + g_cond_signal (&self->queue_cond); + g_mutex_unlock (&self->queue_mutex); + } + + /* This will only pause after all frames are out because is_flushing/is_draining=TRUE */ gst_vtenc_pause_output_loop (self); GST_VIDEO_ENCODER_STREAM_LOCK (self); + if (flush) { + GST_DEBUG_OBJECT (self, "clearing flushing flag"); + self->is_flushing = FALSE; + } else { + GST_DEBUG_OBJECT (self, "clearing draining flag"); + self->is_draining = FALSE; + } + if (self->downstream_ret == GST_FLOW_OK) GST_DEBUG_OBJECT (self, "buffer queue cleaned"); else @@ -847,8 +867,10 @@ /* DTS can be negative if b-frames are enabled */ gst_video_encoder_set_min_pts (enc, GST_SECOND * 60 * 60 * 1000); + self->dts_offset = GST_CLOCK_TIME_NONE; self->is_flushing = FALSE; + self->is_draining = FALSE; self->downstream_ret = GST_FLOW_OK; g_atomic_int_set (&self->require_restart, FALSE); g_atomic_int_set (&self->require_reconfigure, FALSE); @@ -890,6 +912,7 @@ self->negotiate_downstream = TRUE; self->is_flushing = TRUE; + self->is_draining = FALSE; if (self->profile_level) CFRelease (self->profile_level); @@ -899,6 +922,10 @@ gst_video_codec_state_unref (self->input_state); self->input_state = NULL; + if (self->first_frame) + gst_video_codec_frame_unref (self->first_frame); + self->first_frame = NULL; + self->video_info.width = self->video_info.height = 0; self->video_info.fps_n = self->video_info.fps_d = 0; @@ -1084,7 +1111,7 @@ VTCompressionSessionRef session; if (self->input_state) { - gst_vtenc_finish_encoding (self, FALSE); + gst_vtenc_drain_encoder (self, FALSE); gst_video_codec_state_unref (self->input_state); }
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/applemedia/vtenc.h -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/applemedia/vtenc.h
Changed
@@ -24,6 +24,7 @@ #include <gst/base/gstqueuearray.h> #include <gst/codecparsers/gsth264parser.h> #include <gst/video/video.h> +#include <TargetConditionals.h> #include <VideoToolbox/VideoToolbox.h> G_BEGIN_DECLS @@ -102,10 +103,9 @@ GstVideoInfo video_info; VTCompressionSessionRef session; CFDictionaryRef keyframe_props; - GstClockTime dts_offset; GstVecDeque * output_queue; - /* Protects output_queue, is_flushing and pause_task */ + /* Protects output_queue, is_flushing, is_draining and pause_task */ GMutex queue_mutex; GCond queue_cond; @@ -117,6 +117,7 @@ GstFlowReturn downstream_ret; gboolean negotiate_downstream; gboolean is_flushing; + gboolean is_draining; gboolean pause_task; /* If we get an EncoderMalfunctionErr or similar, we restart the session @@ -127,11 +128,26 @@ * We can't do it straight from the setter as that would often deadlock, * so we instead reconfigure on next encode call. */ gboolean require_reconfigure; + + /* DTS offset: frame2 PTS - frame1 PTS + * Explanation here: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6791#note_2396581 */ + GstClockTime dts_offset; + GstVideoCodecFrame *first_frame; }; GType gst_vtenc_get_type (void); -void gst_vtenc_register_elements (GstPlugin * plugin); +gboolean gst_vtenc_register_elements (GstPlugin * plugin); + +GST_ELEMENT_REGISTER_DECLARE (vtenc_h264); +GST_ELEMENT_REGISTER_DECLARE (vtenc_h265); +GST_ELEMENT_REGISTER_DECLARE (vtenc_h265a); +#if TARGET_OS_OSX +GST_ELEMENT_REGISTER_DECLARE (vtenc_h264_hw); +GST_ELEMENT_REGISTER_DECLARE (vtenc_h265_hw); +GST_ELEMENT_REGISTER_DECLARE (vtenc_h265a_hw); +#endif +GST_ELEMENT_REGISTER_DECLARE (vtenc_prores); G_END_DECLS
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/asio/gstasioringbuffer.cpp -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/asio/gstasioringbuffer.cpp
Changed
@@ -26,10 +26,20 @@ #include <string.h> #include "gstasioutils.h" #include "gstasioobject.h" +#include <atomic> +#include <vector> GST_DEBUG_CATEGORY_STATIC (gst_asio_ring_buffer_debug); #define GST_CAT_DEFAULT gst_asio_ring_buffer_debug +/* *INDENT-OFF* */ +struct GstAsioRingBufferPrivate +{ + std::vector<guint8> empty_buf; + std::atomic<bool> paused = { false }; +}; +/* *INDENT-ON* */ + struct _GstAsioRingBuffer { GstAudioRingBuffer parent; @@ -51,6 +61,8 @@ gboolean is_first; guint64 expected_sample_position; gboolean trace_sample_position; + + GstAsioRingBufferPrivate *priv; }; enum @@ -60,6 +72,7 @@ }; static void gst_asio_ring_buffer_dispose (GObject * object); +static void gst_asio_ring_buffer_finalize (GObject * object); static gboolean gst_asio_ring_buffer_open_device (GstAudioRingBuffer * buf); static gboolean gst_asio_ring_buffer_close_device (GstAudioRingBuffer * buf); @@ -69,6 +82,8 @@ static gboolean gst_asio_ring_buffer_start (GstAudioRingBuffer * buf); static gboolean gst_asio_ring_buffer_stop (GstAudioRingBuffer * buf); static guint gst_asio_ring_buffer_delay (GstAudioRingBuffer * buf); +static gboolean gst_asio_ring_buffer_resume (GstAudioRingBuffer * buf); +static gboolean gst_asio_ring_buffer_pause (GstAudioRingBuffer * buf); #define gst_asio_ring_buffer_parent_class parent_class G_DEFINE_TYPE (GstAsioRingBuffer, gst_asio_ring_buffer, @@ -82,6 +97,7 @@ GST_AUDIO_RING_BUFFER_CLASS (klass); gobject_class->dispose = gst_asio_ring_buffer_dispose; + gobject_class->finalize = gst_asio_ring_buffer_finalize; ring_buffer_class->open_device = GST_DEBUG_FUNCPTR (gst_asio_ring_buffer_open_device); @@ -93,6 +109,8 @@ ring_buffer_class->resume = GST_DEBUG_FUNCPTR (gst_asio_ring_buffer_start); ring_buffer_class->stop = GST_DEBUG_FUNCPTR (gst_asio_ring_buffer_stop); ring_buffer_class->delay = GST_DEBUG_FUNCPTR (gst_asio_ring_buffer_delay); + ring_buffer_class->resume = GST_DEBUG_FUNCPTR (gst_asio_ring_buffer_resume); + ring_buffer_class->pause = GST_DEBUG_FUNCPTR (gst_asio_ring_buffer_pause); GST_DEBUG_CATEGORY_INIT (gst_asio_ring_buffer_debug, "asioringbuffer", 0, "asioringbuffer"); @@ -101,6 +119,7 @@ static void gst_asio_ring_buffer_init (GstAsioRingBuffer * self) { + self->priv = new GstAsioRingBufferPrivate (); } static void @@ -114,6 +133,16 @@ G_OBJECT_CLASS (parent_class)->dispose (object); } +static void +gst_asio_ring_buffer_finalize (GObject * object) +{ + auto self = GST_ASIO_RING_BUFFER (object); + + delete self->priv; + + G_OBJECT_CLASS (parent_class)->finalize (object); +} + static gboolean gst_asio_ring_buffer_open_device (GstAudioRingBuffer * buf) { @@ -146,6 +175,7 @@ { GstAsioRingBuffer *self = (GstAsioRingBuffer *) user_data; GstAudioRingBuffer *ringbuffer = GST_AUDIO_RING_BUFFER_CAST (self); + auto priv = self->priv; gint segment; guint8 *readptr; gint len; @@ -158,7 +188,15 @@ GST_TRACE_OBJECT (self, "Buffer Switch callback, index %ld", index); - if (!gst_audio_ring_buffer_prepare_read (ringbuffer, + auto paused = priv->paused.load (); + if (paused) { + /* Source is always live, do nothing when paused */ + if (self->type != GST_ASIO_DEVICE_CLASS_RENDER) + return TRUE; + + readptr = priv->empty_buf.data (); + len = (gint) priv->empty_buf.size (); + } else if (!gst_audio_ring_buffer_prepare_read (ringbuffer, &segment, &readptr, &len)) { GST_WARNING_OBJECT (self, "No segment available"); return TRUE; @@ -282,6 +320,10 @@ } } + /* Do not advance ringbuffer position if we didn't consume its buffer */ + if (paused) + return TRUE; + if (self->type == GST_ASIO_DEVICE_CLASS_RENDER) gst_audio_ring_buffer_clear (ringbuffer, segment); gst_audio_ring_buffer_advance (ringbuffer, 1); @@ -294,6 +336,7 @@ GstAudioRingBufferSpec * spec) { GstAsioRingBuffer *self = GST_ASIO_RING_BUFFER (buf); + auto priv = self->priv; if (!self->asio_object) { GST_ERROR_OBJECT (self, "No configured ASIO object"); @@ -321,6 +364,11 @@ gst_audio_format_info_fill_silence (buf->spec.info.finfo, buf->memory, buf->size); + /* Prepare empty buffer to fill silence when paused state */ + priv->empty_buf.resize (spec->segsize); + gst_audio_format_info_fill_silence (buf->spec.info.finfo, + priv->empty_buf.data (), spec->segsize); + return TRUE; } @@ -338,6 +386,7 @@ gst_asio_ring_buffer_start (GstAudioRingBuffer * buf) { GstAsioRingBuffer *self = GST_ASIO_RING_BUFFER (buf); + auto priv = self->priv; GstAsioObjectCallbacks callbacks; GST_DEBUG_OBJECT (buf, "Start"); @@ -347,6 +396,7 @@ self->is_first = TRUE; self->expected_sample_position = 0; + priv->paused = false; if (!gst_asio_object_install_callback (self->asio_object, self->type, &callbacks, &self->callback_id)) { @@ -400,6 +450,32 @@ return 0; } +static gboolean +gst_asio_ring_buffer_resume (GstAudioRingBuffer * buf) +{ + auto self = GST_ASIO_RING_BUFFER (buf); + auto priv = self->priv; + + GST_DEBUG_OBJECT (self, "Resume"); + + priv->paused = false; + + return TRUE; +} + +static gboolean +gst_asio_ring_buffer_pause (GstAudioRingBuffer * buf) +{ + auto self = GST_ASIO_RING_BUFFER (buf); + auto priv = self->priv; + + GST_DEBUG_OBJECT (self, "Pause"); + + priv->paused = true; + + return TRUE; +} + GstAsioRingBuffer * gst_asio_ring_buffer_new (GstAsioObject * object, GstAsioDeviceClassType type, const gchar * name)
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/decklink/meson.build -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/decklink/meson.build
Changed
@@ -65,7 +65,7 @@ if host_system == 'linux' decklink_sources += linux_sources build_decklink = true - elif 'darwin', 'ios'.contains(host_system) + elif host_system == 'darwin' decklink_sources += osx_sources decklink_ldflags = '-Wl,-framework,CoreFoundation' build_decklink = true @@ -85,6 +85,7 @@ link_args : decklink_ldflags + noseh_link_args, include_directories : configinc, dependencies : gstvideo_dep, gstaudio_dep, gstbase_dep, gst_dep + decklink_libs, + override_options : 'cpp_std=c++11', install : true, install_dir : plugins_install_dir, )
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/ipcpipeline/gstipcslavepipeline.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/ipcpipeline/gstipcslavepipeline.c
Changed
@@ -74,7 +74,7 @@ "Inter-process slave pipeline", "Generic/Bin/Slave", "Contains the slave part of an inter-process pipeline", - "Vincent Penquerc'h <vincent.penquerch@collabora.co.uk"); + "Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>"); } static void
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/nvcodec/gstcudamemorycopy.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/nvcodec/gstcudamemorycopy.c
Changed
@@ -923,7 +923,7 @@ in_type = GST_CUDA_BUFFER_COPY_CUDA; use_device_copy = TRUE; #ifdef HAVE_CUDA_GST_GL - } else if (self->gl_context && gst_is_gl_memory_pbo (in_mem)) { + } else if (gst_is_gl_memory_pbo (in_mem)) { in_type = GST_CUDA_BUFFER_COPY_GL; #endif #ifdef G_OS_WIN32 @@ -943,7 +943,7 @@ out_type = GST_CUDA_BUFFER_COPY_CUDA; use_device_copy = TRUE; #ifdef HAVE_CUDA_GST_GL - } else if (self->gl_context && gst_is_gl_memory_pbo (out_mem)) { + } else if (gst_is_gl_memory_pbo (out_mem)) { out_type = GST_CUDA_BUFFER_COPY_GL; #endif #ifdef G_OS_WIN32
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/shm/meson.build -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/shm/meson.build
Changed
@@ -29,7 +29,7 @@ endif # NetBSD has shm_* in librt -if 'darwin', 'ios', 'freebsd', 'openbsd'.contains(host_system) +if host_system in 'darwin', 'freebsd', 'openbsd' rt_dep = shm_enabled = true else
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/shm/shmpipe.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/shm/shmpipe.c
Changed
@@ -27,7 +27,7 @@ #include "config.h" #endif -#ifdef HAVE_OSX +#ifdef __APPLE__ #ifndef MSG_NOSIGNAL #define MSG_NOSIGNAL SO_NOSIGPIPE #endif @@ -292,7 +292,7 @@ if (path) flags = O_RDONLY; else -#ifdef HAVE_OSX +#ifdef __APPLE__ flags = O_RDWR | O_CREAT | O_EXCL; #else flags = O_RDWR | O_CREAT | O_TRUNC | O_EXCL;
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/v4l2codecs/gstv4l2codech265dec.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/v4l2codecs/gstv4l2codech265dec.c
Changed
@@ -117,6 +117,8 @@ struct v4l2_ctrl_hevc_pps pps; struct v4l2_ctrl_hevc_scaling_matrix scaling_matrix; struct v4l2_ctrl_hevc_decode_params decode_params; + GArray *ext_sps_st_rps; + GArray *ext_sps_lt_rps; GArray *slice_params; GArray *entry_point_offsets; @@ -129,6 +131,7 @@ gboolean support_scaling_matrix; gboolean support_slice_parameters; gboolean support_entry_point_offsets; + gboolean support_long_short_term_rps; GstVideoConverter *convert; gboolean need_crop; @@ -196,6 +199,14 @@ SET_ID (V4L2_CID_STATELESS_HEVC_SLICE_PARAMS), .size = sizeof(struct v4l2_ctrl_hevc_slice_params), .optional = TRUE, + }, { + SET_ID (V4L2_CID_STATELESS_HEVC_EXT_SPS_ST_RPS), + .size = sizeof(struct v4l2_ctrl_hevc_ext_sps_st_rps), + .optional = TRUE, + }, { + SET_ID (V4L2_CID_STATELESS_HEVC_EXT_SPS_LT_RPS), + .size = sizeof(struct v4l2_ctrl_hevc_ext_sps_lt_rps), + .optional = TRUE, } }; #undef SET_ID @@ -247,6 +258,18 @@ .size = sizeof (self->scaling_matrix), }, }; + struct v4l2_ext_control long_short_term_rps = { + { + .id = V4L2_CID_STATELESS_HEVC_EXT_SPS_ST_RPS, + .ptr = self->ext_sps_st_rps->data, + .size = sizeof (struct v4l2_ctrl_hevc_ext_sps_st_rps), + }, + { + .id = V4L2_CID_STATELESS_HEVC_EXT_SPS_LT_RPS, + .ptr = self->ext_sps_lt_rps->data, + .size = sizeof (struct v4l2_ctrl_hevc_ext_sps_lt_rps), + }, + }; /* *INDENT-ON* */ if (!gst_v4l2_decoder_open (self->decoder)) { @@ -276,6 +299,10 @@ gst_v4l2_decoder_query_control_size (self->decoder, V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS, NULL); + self->support_long_short_term_rps = + gst_v4l2_decoder_get_controls (self->decoder, long_short_term_rps, + G_N_ELEMENTS (long_short_term_rps)); + self->decode_mode = control0.value; self->start_code = control1.value; @@ -903,6 +930,57 @@ } } +static void +gst_v4l2_codec_h265_dec_fill_ext_sps_rps (GstV4l2CodecH265Dec * self, + const GstH265SPS * sps) +{ + GstH265Decoder *decoder = (GstH265Decoder *) self; + struct v4l2_ctrl_hevc_ext_sps_st_rps *ext_sps_st_rps_set; + struct v4l2_ctrl_hevc_ext_sps_lt_rps *ext_sps_lt_rps_set; + const GstH265SPSEXT *sps_ext = gst_h265_decoder_get_sps_ext (decoder, sps); + gint i, j; + + for (i = 0; i < sps->num_short_term_ref_pic_sets; i++) { + ext_sps_st_rps_set = &g_array_index (self->ext_sps_st_rps, + struct v4l2_ctrl_hevc_ext_sps_st_rps, i); + + ext_sps_st_rps_set->flags |= + sps->short_term_ref_pic_seti.inter_ref_pic_set_prediction_flag ? + V4L2_HEVC_EXT_SPS_ST_RPS_FLAG_INTER_REF_PIC_SET_PRED : 0; + ext_sps_st_rps_set->delta_idx_minus1 = + sps->short_term_ref_pic_seti.delta_idx_minus1; + ext_sps_st_rps_set->delta_rps_sign = + sps->short_term_ref_pic_seti.delta_rps_sign; + ext_sps_st_rps_set->abs_delta_rps_minus1 = + sps->short_term_ref_pic_seti.abs_delta_rps_minus1; + ext_sps_st_rps_set->num_negative_pics = + sps->short_term_ref_pic_seti.NumNegativePics; + ext_sps_st_rps_set->num_positive_pics = + sps->short_term_ref_pic_seti.NumPositivePics; + + for (j = 0; j < 16; j++) { + ext_sps_st_rps_set->used_by_curr_pic |= + (!!(sps_ext-> + short_term_ref_pic_set_exti.used_by_curr_pic_flagj)) << j; + ext_sps_st_rps_set->use_delta_flag |= + (!!(sps_ext->short_term_ref_pic_set_exti.use_delta_flagj)) << j; + ext_sps_st_rps_set->delta_poc_s0_minus1j = + sps_ext->short_term_ref_pic_set_exti.delta_poc_s0_minus1j; + ext_sps_st_rps_set->delta_poc_s1_minus1j = + sps_ext->short_term_ref_pic_set_exti.delta_poc_s1_minus1j; + } + } + + for (i = 0; i < sps->num_long_term_ref_pics_sps; i++) { + ext_sps_lt_rps_set = &g_array_index (self->ext_sps_lt_rps, + struct v4l2_ctrl_hevc_ext_sps_lt_rps, i); + + ext_sps_lt_rps_set->lt_ref_pic_poc_lsb_sps = sps->lt_ref_pic_poc_lsb_spsi; + ext_sps_lt_rps_set->flags = sps->used_by_curr_pic_lt_sps_flagi ? + V4L2_HEVC_EXT_SPS_LT_RPS_FLAG_USED_LT : 0; + } +} + static guint8 lookup_dpb_index (struct v4l2_hevc_dpb_entry dpb16, GstH265Picture * ref_pic) { @@ -1016,6 +1094,7 @@ } gst_v4l2_codec_h265_dec_fill_sequence (self, sps); + gst_v4l2_codec_h265_dec_fill_ext_sps_rps (self, sps); if (negotiation_needed) { gst_v4l2_codec_h265_dec_streamoff (self); @@ -1128,8 +1207,10 @@ /* The base class will only emit new_sequence for allocation related changes * in the SPS, make sure to keep the SPS upt-to-date */ - if (slice->header.pps->sps->id != self->sps.seq_parameter_set_id) + if (slice->header.pps->sps->id != self->sps.seq_parameter_set_id) { gst_v4l2_codec_h265_dec_fill_sequence (self, slice->header.pps->sps); + gst_v4l2_codec_h265_dec_fill_ext_sps_rps (self, slice->header.pps->sps); + } gst_v4l2_codec_h265_dec_fill_pps (self, slice->header.pps); gst_v4l2_codec_h265_dec_fill_scaling_matrix (self, slice->header.pps); @@ -1383,6 +1464,8 @@ { }, /* SLICE_PARAMS */ { }, /* SCALING_MATRIX */ { }, /* ENTRY_POINT_OFFSETS */ + { }, /* EXT_SPS_ST_RPS */ + { }, /* EXT_SPS_LT_RPS */ }; /* *INDENT-ON* */ @@ -1427,6 +1510,24 @@ controlnum_controls.size = sizeof (self->sps); num_controls++; self->need_sequence = FALSE; + if (self->sps.num_short_term_ref_pic_sets + && self->support_long_short_term_rps) { + controlnum_controls.id = V4L2_CID_STATELESS_HEVC_EXT_SPS_ST_RPS; + controlnum_controls.ptr = self->ext_sps_st_rps->data; + controlnum_controls.size = + g_array_get_element_size (self->ext_sps_st_rps) + * self->sps.num_short_term_ref_pic_sets; + num_controls++; + } + if (self->sps.num_long_term_ref_pics_sps + && self->support_long_short_term_rps) { + controlnum_controls.id = V4L2_CID_STATELESS_HEVC_EXT_SPS_LT_RPS; + controlnum_controls.ptr = self->ext_sps_lt_rps->data; + controlnum_controls.size = + g_array_get_element_size (self->ext_sps_lt_rps) + * self->sps.num_long_term_ref_pics_sps; + num_controls++; + } } if (self->first_slice) { @@ -1682,6 +1783,12 @@ g_array_set_size (self->slice_params, 4); self->entry_point_offsets = g_array_sized_new (FALSE, TRUE, sizeof (guint32), 4); + self->ext_sps_st_rps = g_array_sized_new (FALSE, TRUE, + sizeof (struct v4l2_ctrl_hevc_ext_sps_st_rps), 65); + g_array_set_size (self->ext_sps_st_rps, 65); + self->ext_sps_lt_rps = g_array_sized_new (FALSE, TRUE, + sizeof (struct v4l2_ctrl_hevc_ext_sps_lt_rps), 65); + g_array_set_size (self->ext_sps_lt_rps, 65); } static void @@ -1690,6 +1797,8 @@ GstV4l2CodecH265Dec *self = GST_V4L2_CODEC_H265_DEC (object); g_clear_object (&self->decoder); + g_clear_pointer (&self->ext_sps_st_rps, g_array_unref); + g_clear_pointer (&self->ext_sps_lt_rps, g_array_unref); g_clear_pointer (&self->slice_params, g_array_unref); g_clear_pointer (&self->entry_point_offsets, g_array_unref);
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/v4l2codecs/linux/v4l2-controls.h -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/v4l2codecs/linux/v4l2-controls.h
Changed
@@ -2062,6 +2062,8 @@ #define V4L2_CID_STATELESS_HEVC_DECODE_MODE (V4L2_CID_CODEC_STATELESS_BASE + 405) #define V4L2_CID_STATELESS_HEVC_START_CODE (V4L2_CID_CODEC_STATELESS_BASE + 406) #define V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS (V4L2_CID_CODEC_STATELESS_BASE + 407) +#define V4L2_CID_STATELESS_HEVC_EXT_SPS_ST_RPS (V4L2_CID_CODEC_STATELESS_BASE + 408) +#define V4L2_CID_STATELESS_HEVC_EXT_SPS_LT_RPS (V4L2_CID_CODEC_STATELESS_BASE + 409) enum v4l2_stateless_hevc_decode_mode { V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED, @@ -2517,6 +2519,64 @@ __u8 scaling_list_dc_coef_32x322; }; + +#define V4L2_HEVC_EXT_SPS_ST_RPS_FLAG_INTER_REF_PIC_SET_PRED 0x1 + +/* + * struct v4l2_ctrl_hevc_ext_sps_st_rps - HEVC short term RPS parameters + * + * Dynamic size 1-dimension array for short term RPS. The number of elements + * is v4l2_ctrl_hevc_sps::num_short_term_ref_pic_sets. + * + * @delta_idx_minus1: Specifies the delta compare to the index. See details in section 7.4.8 + * "Short-term reference picture set semantics" of the specification. + * @delta_rps_sign: Sign of the delta as specified in section 7.4.8 "Short-term reference picture + * set semantics" of the specification. + * @abs_delta_rps_minus1: Absolute delta RPS as specified in section 7.4.8 "Short-term reference + * picture set semantics" of the specification. + * @num_negative_pics: Number of short-term RPS entries that have picture order count values less + * than the picture order count value of the current picture. + * @num_positive_pics: Number of short-term RPS entries that have picture order count values + * greater than the picture order count value of the current picture. + * @used_by_curr_pic: Specifies if short-term RPS i is used by the current picture. + * @delta_poc_s0_minus1: Specifies the negative picture order count delta for the i-th entry in + * the short-term RPS. See details in section 7.4.8 "Short-term reference + * picture set semantics" of the specification. + * @delta_poc_s1_minus1: Specifies the positive picture order count delta for the i-th entry in + * the short-term RPS. See details in section 7.4.8 "Short-term reference + * picture set semantics" of the specification. + * @flags: See V4L2_HEVC_EXT_SPS_ST_RPS_FLAG_{} + */ +struct v4l2_ctrl_hevc_ext_sps_st_rps { + __u8 delta_idx_minus1; + __u8 delta_rps_sign; + __u8 num_negative_pics; + __u8 num_positive_pics; + __u32 used_by_curr_pic; + __u32 use_delta_flag; + __u16 abs_delta_rps_minus1; + __u16 delta_poc_s0_minus116; + __u16 delta_poc_s1_minus116; + __u16 flags; +}; + +#define V4L2_HEVC_EXT_SPS_LT_RPS_FLAG_USED_LT 0x1 + +/* + * struct v4l2_ctrl_hevc_ext_sps_lt_rps - HEVC long term RPS parameters + * + * Dynamic size 1-dimension array for long term RPS. The number of elements + * is v4l2_ctrl_hevc_sps::num_long_term_ref_pics_sps. + * + * @lt_ref_pic_poc_lsb_sps: picture order count modulo MaxPicOrderCntLsb + * of the i-th candidate long-term reference picture. + * @flags: See V4L2_HEVC_EXT_SPS_LT_RPS_FLAG_{} + */ +struct v4l2_ctrl_hevc_ext_sps_lt_rps { + __u16 lt_ref_pic_poc_lsb_sps; + __u16 flags; +}; + #define V4L2_CID_COLORIMETRY_CLASS_BASE (V4L2_CTRL_CLASS_COLORIMETRY | 0x900) #define V4L2_CID_COLORIMETRY_CLASS (V4L2_CTRL_CLASS_COLORIMETRY | 1)
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/v4l2codecs/linux/videodev2.h -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/v4l2codecs/linux/videodev2.h
Changed
@@ -734,6 +734,7 @@ #define V4L2_PIX_FMT_FWHT_STATELESS v4l2_fourcc('S', 'F', 'W', 'H') /* Stateless FWHT (vicodec) */ #define V4L2_PIX_FMT_H264_SLICE v4l2_fourcc('S', '2', '6', '4') /* H264 parsed slices */ #define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC parsed slices */ +#define V4L2_PIX_FMT_AV1 v4l2_fourcc('A', 'V', '0', '1') /* AV1 */ #define V4L2_PIX_FMT_AV1_FRAME v4l2_fourcc('A', 'V', '1', 'F') /* AV1 parsed frame */ #define V4L2_PIX_FMT_SPK v4l2_fourcc('S', 'P', 'K', '0') /* Sorenson Spark */ #define V4L2_PIX_FMT_RV30 v4l2_fourcc('R', 'V', '3', '0') /* RealVideo 8 */ @@ -1864,6 +1865,8 @@ V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS = 0x0272, V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX = 0x0273, V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS = 0x0274, + V4L2_CTRL_TYPE_HEVC_EXT_SPS_ST_RPS = 0x0275, + V4L2_CTRL_TYPE_HEVC_EXT_SPS_LT_RPS = 0x0276, V4L2_CTRL_TYPE_AV1_SEQUENCE = 0x280, V4L2_CTRL_TYPE_AV1_TILE_GROUP_ENTRY = 0x281,
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/va/gstvabasetransform.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/va/gstvabasetransform.c
Changed
@@ -488,13 +488,14 @@ GstBuffer ** outbuf) { GstVaBaseTransform *self = GST_VA_BASE_TRANSFORM (trans); + GstBaseTransformClass *btrans_klass = GST_BASE_TRANSFORM_CLASS (parent_class); GstVideoFrame src_frame; GstVideoFrame dest_frame; GstBuffer *buffer = NULL; GstFlowReturn ret; + gboolean res; - ret = GST_BASE_TRANSFORM_CLASS (parent_class)->generate_output (trans, - outbuf); + ret = btrans_klass->generate_output (trans, outbuf); if (ret != GST_FLOW_OK || *outbuf == NULL) return ret; @@ -534,7 +535,17 @@ gst_video_frame_unmap (&src_frame); gst_video_frame_unmap (&dest_frame); - gst_buffer_replace (outbuf, buffer); + res = btrans_klass->copy_metadata (trans, *outbuf, buffer); + if (!res) + GST_WARNING_OBJECT (self, "failed to copy metadata"); + + res = gst_buffer_replace (outbuf, buffer); + if (!res) { + GST_ERROR_OBJECT (self, "couldn't replace output buffer"); + gst_buffer_unref (buffer); + return GST_FLOW_ERROR; + } + ret = GST_FLOW_OK; out:
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/sys/va/gstvavp8enc.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/sys/va/gstvavp8enc.c
Changed
@@ -45,6 +45,7 @@ #include <math.h> #include <gst/codecparsers/gstvp8parser.h> +#include <gst/va/gstvavideoformat.h> #include "gstvabaseenc.h" #include "gstvapluginutils.h" @@ -579,7 +580,7 @@ GstVideoFormat format; const GstVideoFormatInfo *format_info; gboolean do_renegotiation = TRUE; - guint max_ref_frames, latency_num; + guint max_ref_frames, latency_num, rt_format; gint width, height; GstClockTime latency; @@ -594,6 +595,13 @@ GST_VIDEO_FORMAT_INFO_H_SUB (format_info, 1) != 1) return FALSE; + rt_format = gst_va_chroma_from_video_format (format); + if (!rt_format) { + GST_ERROR_OBJECT (self, "unrecognized input format: %s", + gst_video_format_to_string (format)); + return FALSE; + } + gst_va_base_enc_reset_state (base); if (base->is_live) { @@ -605,6 +613,7 @@ base->profile = VAProfileVP8Version0_3; base->width = width; base->height = height; + base->rt_format = rt_format; /* Frame rate is needed for rate control and PTS setting. */ if (GST_VIDEO_INFO_FPS_N (&base->in_info) == 0
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/tests/check/libs/h265parser.c -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/tests/check/libs/h265parser.c
Changed
@@ -896,8 +896,8 @@ test_vectori.is_rasl); } - for (i = RESERVED_NON_IRAP_NAL_TYPE_MIN; - i <= UNSPECIFIED_NON_VCL_NAL_TYPE_MAX; i++) { + for (i = GST_H265_RESERVED_NON_IRAP_NAL_TYPE_MIN; + i <= GST_H265_UNSPECIFIED_NON_VCL_NAL_TYPE_MAX; i++) { assert_equals_int (GST_H265_IS_NAL_TYPE_IDR (i), FALSE); assert_equals_int (GST_H265_IS_NAL_TYPE_IRAP (i), FALSE); assert_equals_int (GST_H265_IS_NAL_TYPE_BLA (i), FALSE);
View file
_service:download_files:gst-plugins-bad-1.28.0.tar.xz/tests/examples/avsamplesink/meson.build -> _service:download_files:gst-plugins-bad-1.28.1.tar.xz/tests/examples/avsamplesink/meson.build
Changed
@@ -1,4 +1,4 @@ -if 'darwin', 'ios'.contains(host_system) +if host_system == 'darwin' avfoundation_dep = dependency('appleframeworks', modules : 'AVFoundation', required : get_option('examples')) quartzcore_dep = dependency('appleframeworks', modules : 'QuartzCore', required : get_option('examples')) corefoundation_dep = dependency('appleframeworks', modules : 'CoreFoundation', required : get_option('examples'))
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
.