Projects
Essentials
gstreamer-plugins-bad-codecs
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 20
View file
gstreamer-plugins-bad-codecs.changes
Changed
@@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Mon Nov 20 13:08:00 UTC 2023 - Bjørn Lie <zaitor@opensuse.org> + +- Update to version 1.22.7 + +------------------------------------------------------------------- Fri Sep 22 17:25:19 UTC 2023 - Bjørn Lie <zaitor@opensuse.org> - Update to version 1.22.6
View file
gstreamer-plugins-bad-codecs.spec
Changed
@@ -7,7 +7,7 @@ %define _version 1.22.0 Name: gstreamer-plugins-bad-codecs -Version: 1.22.6 +Version: 1.22.7 Release: 0 Summary: Codecs/plugins for gstreamer-plugins-bad License: LGPL-2.1-or-later
View file
gst-plugins-bad-1.22.6.tar.xz/ChangeLog -> gst-plugins-bad-1.22.7.tar.xz/ChangeLog
Changed
@@ -1,3 +1,403 @@ +=== release 1.22.7 === + +2023-11-13 11:04:22 +0000 Tim-Philipp Müller <tim@centricular.com> + + * NEWS: + * RELEASE: + * gst-plugins-bad.doap: + * meson.build: + Release 1.22.7 + +2023-10-20 00:09:57 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst/mxf/mxfdemux.c: + * gst/mxf/mxfdemux.h: + mxfdemux: Store GstMXFDemuxEssenceTrack in their own fixed allocation + Previously they were stored inline inside a GArray, but as references to + the tracks were stored in various other places although the array could + still be updated (and reallocated!), this could lead to dangling + references in various places. + Instead now store them in a GPtrArray in their own allocation so each + track's memory position stays fixed. + Fixes ZDI-CAN-22299 + Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3055 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5638> + +2023-10-04 11:14:38 +0200 Benjamin Gaignard <benjamin.gaignard@collabora.com> + + * gst-libs/gst/codecparsers/gstav1parser.c: + codecparsers: av1: Clip max tile rows and cols values + Clip tile rows and cols to 64 as describe in AV1 specification. + Fixes ZDI-CAN-22226 / CVE-2023-44429 + Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3015 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5637> + +2023-10-06 13:49:15 +0200 Guillaume Desmottes <guillaume.desmottes@onestream.live> + + * gst/audiobuffersplit/gstaudiobuffersplit.c: + audiobuffersplit: disable max-silence-time if set to 0 + According to the property documentation max-silence-time is supposed to be + disabled when set to 0 but it was not. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5632> + +2023-05-26 17:38:13 +0000 Balló György <ballogyor@gmail.com> + + * gst-libs/gst/wayland/meson.build: + gstwayland: Don't depend on wayland-protocols + wayland-protocols are needed to build gstwayland, but not for dependent projects. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5618> + +2023-11-04 19:36:06 +0900 Seungha Yang <seungha@centricular.com> + + * sys/wasapi2/gstwasapi2client.cpp: + * sys/wasapi2/gstwasapi2client.h: + * sys/wasapi2/gstwasapi2device.c: + wasapi2device: Ignore activation failed device + Enumerates all devices even if activation error is detected + Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3090 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5609> + +2023-10-28 22:55:04 +0800 He Junyan <junyan.he@intel.com> + + * docs/plugins/gst_plugins_cache.json: + * ext/libde265/libde265-dec.c: + libde265dec: Only decode the main profile + The src caps of the libde265 is now fixed to I420, and so if the + stream is other format, such as 4:4:4 or 10 bits format, the pipeline + will crash because the dowstream element accesses the video buffer as + I420 format. + We now restrain the input caps to "main" profile, which only contains + 4:2:0 8 bits stream. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5596> + +2023-11-04 03:16:47 +0100 Marek Vasut <marex@denx.de> + + * sys/v4l2codecs/gstv4l2decoder.c: + v4l2codecs: Avoid QBUF/DQBUF struct timeval .tv_usec wrap-around at frame 1000000 + When decoding stream using hardware V4L2 decoder element, in any of the + currently supported formats, the decoding will fail once frame number + 1000000 is reached. The reported error clearly indicates a wrap-around + occured, instead of receiving decoded frame 1000000, frame 0 is received + from the hardware V4L2 decoder driver. + The problem is actually not in the driver itself, but rather in gstreamer, + which uses `struct v4l2_buffer` member `.timestamp` in a special way. The + timestamp of buffers with encoded data added to the SINK (input) queue of + the driver is copied by the driver into matching buffers with decoded data + added to the SOURCE (output) queue of the driver. In fact, the timestamp + is not a timestamp at all, but rather in this special case, only part of + it is used as an incrementing frame counter. + The `.timestamp` is of type `struct timeval`, which is defined in + `sys/time.h` 1. Only the `tv_usec` member of this structure is used + for the incrementing frame counter. However, suseconds_t tv_usec 2 + may be limited to range -1, 1000000: + " + XSI The type suseconds_t shall be a signed integer type capable of + storing values at least in the range -1, 1000000. + " + Therefore, once frame 1000000 is reached, a rollover occurs and decoding + fails. + Fix this by using both `struct timeval` members, `.tv_sec` and `.tv_usec` + with matching modular arithmetic, this way the failure would occur again + just short of 2^84 frames, which should be plenty. + 1 https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_time.h.html + 2 https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html + A test case using stateless hardware h264 decoder, the WARN/ERROR output + in gstreamer log indicates a failure occurred. With this change, that + error no longer occurs and the WARN/ERROR are not present: + ``` + pc$ gst-launch-1.0 videotestsrc num-buffers=1001001 pattern=6 ! \ + video/x-raw,width=16,height=16,format=I420 ! \ + x264enc ! filesink location=/tmp/test.h264 + dut$ GST_DEBUG="*:3" gst-launch-1.0 filesrc location=/tmp/test.h264 ! \ + h264parse ! v4l2slh264dec ! fakesink + ... + 0:03:51.393677606 12111 0x370df400 WARN \ + v4l2codecs-decoder gstv4l2decoder.c:1157:gst_v4l2_request_set_done:<v4l2decoder2> \ + Requested frame 1000000, but driver returned frame 0. + 0:03:51.394140597 12111 0x370df400 WARN \ + v4l2codecs-decoder gstv4l2decoder.c:1157:gst_v4l2_request_set_done:<v4l2decoder2> \ + Requested frame 1000001, but driver returned frame 1. + 0:03:51.394425216 12111 0x370df400 WARN \ + v4l2codecs-decoder gstv4l2decoder.c:1157:gst_v4l2_request_set_done:<v4l2decoder2> \ + Requested frame 1000002, but driver returned frame 2. + 0:03:51.394665211 12111 0x370df400 WARN \ + v4l2codecs-decoder gstv4l2decoder.c:1157:gst_v4l2_request_set_done:<v4l2decoder2> \ + Requested frame 1000003, but driver returned frame 3. + 0:03:51.394785833 12111 0x370df400 WARN \ + v4l2codecs-h264dec gstv4l2codech264dec.c:1059:gst_v4l2_codec_h264_dec_output_picture:<v4l2slh264dec0> \ + error: Failed to decode frame 1000000 + ERROR: from element /GstPipeline:pipeline0/v4l2slh264dec:v4l2slh264dec0: Failed to decode frame 1000000 + ``` + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5603> + +2023-10-31 17:59:32 +0100 Kalev Lember <klember@redhat.com> + + * ext/openh264/gstopenh264dec.cpp: + * ext/openh264/gstopenh264enc.cpp: + openh264: Fail gracefully if openh264 encoder/decoder creation fails + This can happen with the dummy "noopenh264" library that the freedesktop + flatpak runtime ships, and Fedora is planning on shipping as well. In + both cases the dummy implementation gets replaced with the actual + openh264 library that's downloaded directly from Cisco, but just to be + on safe side, this patch makes it careful to check the return values to + avoid crashing if the underlying library hasn't been swapped out yet. + The patch is taken from freedesktop-sdk and was originally written by + Valentin David <valentin.david@codethink.co.uk>. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5586> + +2023-10-25 21:37:24 +0900 Seungha Yang <seungha@centricular.com> + + * sys/wasapi2/gstwasapi2ringbuffer.cpp: + wasapi2: Don't use global volume control object + ISimpleAudioVolume controls volume of corresponding audio session + and there would be only single input/output audio session + in case of share-mode, which means that it controls audio volume of the + process. Instead, use IAudioStreamVolume interface which controls + volume of the stream. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5579> + +2023-10-29 22:42:52 +0900 Seungha Yang <seungha@centricular.com> + + * sys/d3d11/gstd3d11window_win32.cpp: + d3d11videosink: Fix window switching in case of fullscreen mode + Other Windows applications allow window switching even when + an application window is in fullscreen mode. Also fixing + regression introduced in 15248d8b84db9e79e6d4587b212b12ca82fc4a6b + which makes restored window is always located at topmost + since we do not call SetWindowPos() anymore when restoring + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5578> + +2023-10-28 01:23:36 +0900 Seungha Yang <seungha@centricular.com> + + * sys/d3d11/gstd3d11screencapturesrc.cpp: + d3d11screencapturesrc: Fix mouse cursor blending + Ignore alpha component of source (mouse cursor texture) + when blending alpha channel, otherwise the background area of source + (which has zeros) will be written to render target. Then it will result + in black rectangle if output texture is converted to premultiplied alpha + texture + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5577> + +2023-10-25 23:19:51 +0900 Seungha Yang <seungha@centricular.com> + + * sys/mediafoundation/gstmfvideoencoder.cpp: + mfvideoencoder: Fix typo in template caps + Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3058 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5556> + +2023-10-10 10:39:55 +0200 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com> + + * gst/mpegtsmux/gstatscmux.c: + * gst/mpegtsmux/tsmux/tsmuxstream.c: + * gst/mpegtsmux/tsmux/tsmuxstream.h: + tsmux: Fix default get_es_descrs_func + `tsmux_stream_default_get_es_descrs` is missing the `user_data` + parameter and shouldn't be cast to `TsMuxStreamGetESDescriptorsFunc`. + Prefer not casting at all to make sure we don't miss such an issue. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5516> + +2023-10-10 10:22:44 +0200 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
View file
gst-plugins-bad-1.22.6.tar.xz/NEWS -> gst-plugins-bad-1.22.7.tar.xz/NEWS
Changed
@@ -2,13 +2,13 @@ GStreamer 1.22.0 was originally released on 23 January 2023. -The latest bug-fix release in the stable 1.22 series is 1.22.5 and was -released on 20 July 2023. +The latest bug-fix release in the stable 1.22 series is 1.22.7 and was +released on 13 November 2023. See https://gstreamer.freedesktop.org/releases/1.22/ for the latest version of this document. -Last updated: Thursday 20 July 2023, 12:00 UTC (log) +Last updated: Monday 13 November 2023, 10:00 UTC (log) Introduction @@ -2366,6 +2366,222 @@ - List of Merge Requests applied in 1.22.6 - List of Issues fixed in 1.22.6 +1.22.7 + +The seventh 1.22 bug-fix release (1.22.7) was released on 13 November +2023. + +This release only contains bugfixes and security fixes and it should be +safe to update from 1.22.x. + +Highlighted bugfixes in 1.22.7 + +- Security fixes for the MXF demuxer and AV1 codec parser +- glfilter: Memory leak fix for OpenGL filter elements +- d3d11videosink: Fix toggling between fullscreen and maximized, and + window switching in fullscreen mode +- DASH / HLS adaptive streaming fixes +- Decklink card device provider device name string handling fixes +- interaudiosrc: handle non-interleaved audio properly +- openh264: Fail gracefully if openh264 encoder/decoder creation fails +- rtspsrc: improved whitespace handling in response headers by certain + cameras +- v4l2codecs: avoid wrap-around after 1000000 frames; tiled formats + handling fixes +- video-scaler, audio-resampler: downgraded “Can’t find exact taps” + debug log messages +- wasapi2: Don’t use global volume control object +- Rust plugins: various improvements in aws, fmp4mux, hlssink3, + livesync, ndisrc, rtpav1depay, rsfilesink, s3sink, sccparse +- WebRTC: various webrtchttp, webrtcsrc, and webrtcsink improvements + and fixes +- Cerbero build tools: recognise Windows 11; restrict parallelism of + gst-plugins-rs build on small systems +- Packages: ca-certificates update; fix gio module loading and TLS + support on macOS + +gstreamer + +- debugutils: provide gst_debug_bin_to_dot_data() implementation even + if debug system is disabled + +gst-plugins-base + +- audioaggregator, audiomixer: Make access to the pad list thread-safe + while mixing +- basetextoverlay: Fix overlay never rendering again if width reaches + 1px +- glfiter: Protect GstGLContext access +- glfilter: Only add parent meta if inbuf != outbuf +- macOS: fix huge memory leak with glfilter-based elements +- rtspconnection: Ignore trailing whitespace in rtsp headers +- video-scaler, audio-resampler: downgrade ‘can’t find exact taps’ to + debug + +gst-plugins-good + +- adaptivedemux2: Do not submit_transfer when cancelled +- adaptivedemux2: Call GTasks’s return functions for blocking tasks +- flacenc: Correctly handle up to 255 cue entries +- flvmux: set the src segment position as running time +- imagesequencesrc: fix deadlock when feeding the same image in a loop +- pngenc: output one frame only in snapshot mode and mark output + frames as I-frames +- qmlglsrc: sync on the streaming thread +- souphttpsrc: Chain up to finalize to fix memory leak +- wavparse: fix buffer leak with adtl tag +- v4l2codecs: Avoid QBUF/DQBUF struct timeval .tv_usec wrap-around at + frame 1000000 +- v4l2codecs: Fix tiled formats stride conversion + +gst-plugins-bad + +- audiobuffersplit: disable max-silence-time if set to 0 +- libde265: Do not decode the non 4:2:0 8 bits format +- codecparsers: av1: Clip max tile rows and cols values +- codecs: h265: Do not free slice header before using it +- d3d11converter: Fix 10/12bits planar output +- d3d11decoder: Fix crash on negotiate() when decoder is not + configured +- d3d11videosink: Fix toggling between fullscreen and maximized +- d3d11videosink: Fix window switching in case of fullscreen mode +- d3d11screencapturesrc: Fix mouse cursor blending +- decklink: Fix broken COM string conversion +- decklink: Decklink Device Provider wrongly parses SDK strings +- gstwayland: Don’t depend on wayland-protocols +- interaudiosrc: Add audio meta to buffers containing non-interleaved + samples +- kmssink: Add TIDSS auto-detection +- mfvideoencoder: Fix typo in template caps +- mxfdemux: Store GstMXFDemuxEssenceTrack in their own fixed + allocation +- nvcodec: fix bounds for auto-select GPU enumeration +- openh264: Fail gracefully if openh264 encoder/decoder creation fails +- tsmux: More cleanups +- tsmux: Fill padding packets with stuffing bytes +- v4l2codecs: Fix tiled formats stride conversion +- v4l2videodec: Correctly free caps to avoid memory leak +- wasapi2: Don’t use global volume control object +- wasapi2device: Ignore activation failed device + +gst-plugins-ugly + +- No changes + +gst-plugins-rs + +- aws: s3sink: Fix handling of special characters in key +- aws: s3: Properly percent-decode GstS3Url +- fmp4mux: Don’t overflow negative composition offset calculation +- fmp4mux: specify the fragment duration unit +- hlssink3: Use Path API for getting file name +- hlssink3: Use sprintf for segment name formatting +- hlssink3: Remove unused deps +- hlssink3: Don’t remove old files if max-files is zero +- hlssink3: Don’t remove uri from playlist if playlist-length is zero +- hlssink3: Various cleanup +- livesync: log new pending segments +- livesync: display jitter when waiting on clock +- livesync: Rename activatemode methods to *_activatemode +- livesync: Simplify start_src_task and src_loop +- livesync: Improve audio duration fixups +- livesync: Log a category error when we are missing the segment +- livesync: Clean up state handling +- livesync: Replace an if-let with match +- livesync: Move a notify closer to the interesting state change +- livesync: Move num_in counting to the src task +- livesync: Simplify num_duplicate counting +- livesync: Handle flags and late buffer patching after queueing +- livesync: Separate out_buffer duplicate status from GAP flag +- livesync: Use fallback_duration for audio repeat buffers as well +- livesync: example: Add identities single-segment=1 +- livesync: Split fallback_duration into in_ and out_duration +- livesync: Keep existing buffer duration in some cases +- livesync: Remove the stop from outgoing segments +- ndisrc: Assume input with more than 8 raw audio channels is + unpositioned +- rtpav1depay: Skip unexpected leading fragments +- rtpav1depay: Don’t push stale temporal delimiters downstream +- rsfilesink: set sync=false +- s3sink: set sync=false +- sccparse: Fix leading spaces between the tab and caption data +- webrtchttp: Respect HTTP redirects +- webrtcsrc: use @watch instead of @to-owned +- webrtcsrc: add turn-servers property +- webrtc: Fix paths in README +- webrtcsink: don’t miss ice candidates + +gst-libav + +- No changes + +gst-rtsp-server + +- rtspclientsink: Don’t leak previous server_ip + +gstreamer-vaapi + +- No changes + +gstreamer-sharp + +- No changes + +gst-omx + +- No changes + +gst-python + +- No changes + +gst-editing-services + +- No changes + +gst-validate + gst-integration-testsuites + +- gst-validate: Fix compatibility with Python 3.12 + +gst-examples +
View file
gst-plugins-bad-1.22.6.tar.xz/RELEASE -> gst-plugins-bad-1.22.7.tar.xz/RELEASE
Changed
@@ -1,4 +1,4 @@ -This is GStreamer gst-plugins-bad 1.22.6. +This is GStreamer gst-plugins-bad 1.22.7. The GStreamer team is thrilled to announce a new major feature release of your favourite cross-platform multimedia framework!
View file
gst-plugins-bad-1.22.6.tar.xz/docs/plugins/gst_plugins_cache.json -> gst-plugins-bad-1.22.7.tar.xz/docs/plugins/gst_plugins_cache.json
Changed
@@ -9677,7 +9677,7 @@ "long-name": "HEVC/H.265 decoder", "pad-templates": { "sink": { - "caps": "video/x-h265:\n stream-format: { (string)hvc1, (string)hev1, (string)byte-stream }\n alignment: { (string)au, (string)nal }\n", + "caps": "video/x-h265:\n stream-format: { (string)hvc1, (string)hev1, (string)byte-stream }\n alignment: { (string)au, (string)nal }\n profile: main\n", "direction": "sink", "presence": "always" },
View file
gst-plugins-bad-1.22.6.tar.xz/ext/libde265/libde265-dec.c -> gst-plugins-bad-1.22.7.tar.xz/ext/libde265/libde265-dec.c
Changed
@@ -55,7 +55,10 @@ GST_PAD_ALWAYS, GST_STATIC_CAPS ("video/x-h265, stream-format=(string) { hvc1, hev1, byte-stream }, " - "alignment=(string) { au, nal }") + "alignment=(string) { au, nal }, " + /* TODO: Can support more profiles by adding the according + output formats in src caps. */ + "profile=(string) main") ); static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
View file
gst-plugins-bad-1.22.6.tar.xz/ext/openh264/gstopenh264dec.cpp -> gst-plugins-bad-1.22.7.tar.xz/ext/openh264/gstopenh264dec.cpp
Changed
@@ -159,7 +159,12 @@ WelsDestroyDecoder (openh264dec->decoder); openh264dec->decoder = NULL; } - WelsCreateDecoder (&(openh264dec->decoder)); + + if (WelsCreateDecoder (&(openh264dec->decoder)) != 0) { + GST_ELEMENT_ERROR (openh264dec, LIBRARY, INIT, (NULL), + ("Failed to create OpenH264 decoder.")); + return FALSE; + } #ifndef GST_DISABLE_GST_DEBUG {
View file
gst-plugins-bad-1.22.6.tar.xz/ext/openh264/gstopenh264enc.cpp -> gst-plugins-bad-1.22.7.tar.xz/ext/openh264/gstopenh264enc.cpp
Changed
@@ -759,7 +759,13 @@ WelsDestroySVCEncoder (openh264enc->encoder); openh264enc->encoder = NULL; } - WelsCreateSVCEncoder (&openh264enc->encoder); + + if (WelsCreateSVCEncoder (&openh264enc->encoder) != 0) { + GST_ELEMENT_ERROR (openh264enc, LIBRARY, INIT, (NULL), + ("Failed to create OpenH264 encoder.")); + return FALSE; + } + unsigned int uiTraceLevel = WELS_LOG_ERROR; openh264enc->encoder->SetOption (ENCODER_OPTION_TRACE_LEVEL, &uiTraceLevel);
View file
gst-plugins-bad-1.22.6.tar.xz/gst-libs/gst/codecparsers/gstav1parser.c -> gst-plugins-bad-1.22.7.tar.xz/gst-libs/gst/codecparsers/gstav1parser.c
Changed
@@ -2229,6 +2229,8 @@ ((parser->state.mi_cols + 31) >> 5) : ((parser->state.mi_cols + 15) >> 4); sb_rows = seq_header->use_128x128_superblock ? ((parser->state.mi_rows + 31) >> 5) : ((parser->state.mi_rows + 15) >> 4); + sb_cols = MIN (GST_AV1_MAX_TILE_COLS, sb_cols); + sb_rows = MIN (GST_AV1_MAX_TILE_ROWS, sb_rows); sb_shift = seq_header->use_128x128_superblock ? 5 : 4; sb_size = sb_shift + 2; max_tile_width_sb = GST_AV1_MAX_TILE_WIDTH >> sb_size;
View file
gst-plugins-bad-1.22.6.tar.xz/gst-libs/gst/codecs/gsth265decoder.c -> gst-plugins-bad-1.22.7.tar.xz/gst-libs/gst/codecs/gsth265decoder.c
Changed
@@ -829,11 +829,6 @@ if (pres != GST_H265_PARSER_OK) return pres; - /* NOTE: gst_h265_parser_parse_slice_hdr() allocates array - * GstH265SliceHdr::entry_point_offset_minus1 but we don't use it - * in this h265decoder baseclass at the moment - */ - gst_h265_slice_hdr_free (&slice.header); slice.nalu = *nalu; if (nalu->type >= GST_H265_NAL_SLICE_BLA_W_LP && @@ -2049,6 +2044,9 @@ if (!nalu) return; + if (nalu->is_slice) + gst_h265_slice_hdr_free (&nalu->unit.slice.header); + memset (nalu, 0, sizeof (GstH265DecoderNalUnit)); }
View file
gst-plugins-bad-1.22.6.tar.xz/gst-libs/gst/d3d11/gstd3d11converter.cpp -> gst-plugins-bad-1.22.7.tar.xz/gst-libs/gst/d3d11/gstd3d11converter.cpp
Changed
@@ -366,11 +366,19 @@ " return output;\n" "}"; -static const gchar templ_OUTPUT_LUMA_SCALED = +static const gchar templ_OUTPUT_LUMA_10 = "PS_OUTPUT build_output (float4 sample)\n" "{\n" " PS_OUTPUT output;\n" - " output.Plane_0 = float4 (sample.x / %d, 0.0, 0.0, 1.0);\n" + " output.Plane_0 = float4 (sample.x * 1023.0 / 65535.0, 0.0, 0.0, 1.0);\n" + " return output;\n" + "}"; + +static const gchar templ_OUTPUT_LUMA_12 = + "PS_OUTPUT build_output (float4 sample)\n" + "{\n" + " PS_OUTPUT output;\n" + " output.Plane_0 = float4 (sample.x * 4095.0 / 65535.0, 0.0, 0.0, 1.0);\n" " return output;\n" "}"; @@ -383,12 +391,21 @@ " return output;\n" "}"; -static const gchar templ_OUTPUT_CHROMA_PLANAR_SCALED = +static const gchar templ_OUTPUT_CHROMA_PLANAR_10 = + "PS_OUTPUT build_output (float4 sample)\n" + "{\n" + " PS_OUTPUT output;\n" + " output.Plane_0 = float4 (sample.y * 1023.0 / 65535.0, 0.0, 0.0, 1.0);\n" + " output.Plane_1 = float4 (sample.z * 1023.0 / 65535.0, 0.0, 0.0, 1.0);\n" + " return output;\n" + "}"; + +static const gchar templ_OUTPUT_CHROMA_PLANAR_12 = "PS_OUTPUT build_output (float4 sample)\n" "{\n" " PS_OUTPUT output;\n" - " output.Plane_0 = float4 (sample.%c / %d, 0.0, 0.0, 1.0);\n" - " output.Plane_1 = float4 (sample.%c / %d, 0.0, 0.0, 1.0);\n" + " output.Plane_0 = float4 (sample.y * 4095.0 / 65535.0, 0.0, 0.0, 1.0);\n" + " output.Plane_1 = float4 (sample.z * 4095.0 / 65535.0, 0.0, 0.0, 1.0);\n" " return output;\n" "}"; @@ -402,11 +419,22 @@ " return output;\n" "}"; -static const gchar templ_OUTPUT_PLANAR_SCALED = +static const gchar templ_OUTPUT_PLANAR_10 = + "PS_OUTPUT build_output (float4 sample)\n" + "{\n" + " PS_OUTPUT output;\n" + " float3 scaled = sample.xyz * 1023.0 / 65535.0;\n" + " output.Plane_0 = float4 (scaled.%c, 0.0, 0.0, 1.0);\n" + " output.Plane_1 = float4 (scaled.%c, 0.0, 0.0, 1.0);\n" + " output.Plane_2 = float4 (scaled.%c, 0.0, 0.0, 1.0);\n" + " return output;\n" + "}"; + +static const gchar templ_OUTPUT_PLANAR_12 = "PS_OUTPUT build_output (float4 sample)\n" "{\n" " PS_OUTPUT output;\n" - " float3 scaled = sample.xyz / %d;\n" + " float3 scaled = sample.xyz * 4095.0 / 65535.0;\n" " output.Plane_0 = float4 (scaled.%c, 0.0, 0.0, 1.0);\n" " output.Plane_1 = float4 (scaled.%c, 0.0, 0.0, 1.0);\n" " output.Plane_2 = float4 (scaled.%c, 0.0, 0.0, 1.0);\n" @@ -424,11 +452,23 @@ " return output;\n" "}"; -static const gchar templ_OUTPUT_PLANAR_4_SCALED = +static const gchar templ_OUTPUT_PLANAR_4_10 = "PS_OUTPUT build_output (float4 sample)\n" "{\n" " PS_OUTPUT output;\n" - " float4 scaled = sample / %d;\n" + " float4 scaled = sample * 1023.0 / 65535.0;\n" + " output.Plane_0 = float4 (scaled.%c, 0.0, 0.0, 1.0);\n" + " output.Plane_1 = float4 (scaled.%c, 0.0, 0.0, 1.0);\n" + " output.Plane_2 = float4 (scaled.%c, 0.0, 0.0, 1.0);\n" + " output.Plane_3 = float4 (scaled.%c, 0.0, 0.0, 1.0);\n" + " return output;\n" + "}"; + +static const gchar templ_OUTPUT_PLANAR_4_12 = + "PS_OUTPUT build_output (float4 sample)\n" + "{\n" + " PS_OUTPUT output;\n" + " float4 scaled = sample * 4095.0 / 65535.0;\n" " output.Plane_0 = float4 (scaled.%c, 0.0, 0.0, 1.0);\n" " output.Plane_1 = float4 (scaled.%c, 0.0, 0.0, 1.0);\n" " output.Plane_2 = float4 (scaled.%c, 0.0, 0.0, 1.0);\n" @@ -1143,24 +1183,26 @@ get_planar_component (GstVideoFormat format, gchar * x, gchar * y, gchar * z, gchar * w, guint * scale) { - switch (format) { - case GST_VIDEO_FORMAT_I420_10LE: - case GST_VIDEO_FORMAT_I422_10LE: - case GST_VIDEO_FORMAT_Y444_10LE: - case GST_VIDEO_FORMAT_GBR_10LE: - case GST_VIDEO_FORMAT_GBRA_10LE: - *scale = (1 << 6); - break; - case GST_VIDEO_FORMAT_I420_12LE: - case GST_VIDEO_FORMAT_I422_12LE: - case GST_VIDEO_FORMAT_Y444_12LE: - case GST_VIDEO_FORMAT_GBR_12LE: - case GST_VIDEO_FORMAT_GBRA_12LE: - *scale = (1 << 4); - break; - default: - *scale = 1; - break; + if (scale) { + switch (format) { + case GST_VIDEO_FORMAT_I420_10LE: + case GST_VIDEO_FORMAT_I422_10LE: + case GST_VIDEO_FORMAT_Y444_10LE: + case GST_VIDEO_FORMAT_GBR_10LE: + case GST_VIDEO_FORMAT_GBRA_10LE: + *scale = (1 << 6); + break; + case GST_VIDEO_FORMAT_I420_12LE: + case GST_VIDEO_FORMAT_I422_12LE: + case GST_VIDEO_FORMAT_Y444_12LE: + case GST_VIDEO_FORMAT_GBR_12LE: + case GST_VIDEO_FORMAT_GBRA_12LE: + *scale = (1 << 4); + break; + default: + *scale = 1; + break; + } } switch (format) { @@ -1934,74 +1976,110 @@ /* planar */ case GST_VIDEO_FORMAT_I420: case GST_VIDEO_FORMAT_YV12: - case GST_VIDEO_FORMAT_I420_10LE: - case GST_VIDEO_FORMAT_I420_12LE: case GST_VIDEO_FORMAT_Y42B: - case GST_VIDEO_FORMAT_I422_10LE: - case GST_VIDEO_FORMAT_I422_12LE:{ + { gchar y, u, v, w; - guint scale; - get_planar_component (format, &y, &u, &v, &w, &scale); + get_planar_component (format, &y, &u, &v, &w, nullptr); cinfo->ps_output0 = &output_typesOUTPUT_SINGLE_PLANE; cinfo->ps_output1 = &output_typesOUTPUT_TWO_PLANES; - if (info->finfo->depth0 == 8) { - cinfo->build_output_func0 = g_strdup (templ_OUTPUT_LUMA); - cinfo->build_output_func1 = - g_strdup_printf (templ_OUTPUT_CHROMA_PLANAR, u, v); - } else { - cinfo->build_output_func0 = g_strdup_printf (templ_OUTPUT_LUMA_SCALED, - scale); - cinfo->build_output_func1 = - g_strdup_printf (templ_OUTPUT_CHROMA_PLANAR_SCALED, - u, scale, v, scale); - } + cinfo->build_output_func0 = g_strdup (templ_OUTPUT_LUMA); + cinfo->build_output_func1 = + g_strdup_printf (templ_OUTPUT_CHROMA_PLANAR, u, v); + break; + } + case GST_VIDEO_FORMAT_I420_10LE: + case GST_VIDEO_FORMAT_I422_10LE: + { + cinfo->ps_output0 = &output_typesOUTPUT_SINGLE_PLANE; + cinfo->ps_output1 = &output_typesOUTPUT_TWO_PLANES; + + cinfo->build_output_func0 = g_strdup (templ_OUTPUT_LUMA_10); + cinfo->build_output_func1 = g_strdup (templ_OUTPUT_CHROMA_PLANAR_10); + break; + } + case GST_VIDEO_FORMAT_I420_12LE: + case GST_VIDEO_FORMAT_I422_12LE: + { + cinfo->ps_output0 = &output_typesOUTPUT_SINGLE_PLANE; + cinfo->ps_output1 = &output_typesOUTPUT_TWO_PLANES; + + cinfo->build_output_func0 = g_strdup (templ_OUTPUT_LUMA_12); + cinfo->build_output_func1 = g_strdup (templ_OUTPUT_CHROMA_PLANAR_12); break; } case GST_VIDEO_FORMAT_Y444: - case GST_VIDEO_FORMAT_Y444_10LE:
View file
gst-plugins-bad-1.22.6.tar.xz/gst-libs/gst/wayland/meson.build -> gst-plugins-bad-1.22.7.tar.xz/gst-libs/gst/wayland/meson.build
Changed
@@ -74,7 +74,7 @@ darwin_versions : osxversion, install : true, dependencies : gst_dep, gstallocators_dep, gstvideo_dep, libdrm_dep, - wl_client_dep, wl_protocol_dep + wl_client_dep ) pkg_name = 'gstreamer-wayland-1.0' @@ -90,7 +90,7 @@ gstwayland_dep = declare_dependency(link_with : gstwayland, include_directories : libsinc, dependencies : gst_dep, gstallocators_dep, gstvideo_dep, libdrm_dep, - wl_client_dep, wl_protocol_dep) + wl_client_dep) install_headers(wl_headers, subdir: 'gstreamer-1.0/gst/wayland') meson.override_dependency(pkg_name, gstwayland_dep)
View file
gst-plugins-bad-1.22.6.tar.xz/gst-plugins-bad.doap -> gst-plugins-bad-1.22.7.tar.xz/gst-plugins-bad.doap
Changed
@@ -35,6 +35,16 @@ <release> <Version> + <revision>1.22.7</revision> + <branch>1.22</branch> + <name></name> + <created>2023-11-13</created> + <file-release rdf:resource="https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.22.7.tar.xz" /> + </Version> + </release> + + <release> + <Version> <revision>1.22.6</revision> <branch>1.22</branch> <name></name>
View file
gst-plugins-bad-1.22.6.tar.xz/gst/audiobuffersplit/gstaudiobuffersplit.c -> gst-plugins-bad-1.22.7.tar.xz/gst/audiobuffersplit/gstaudiobuffersplit.c
Changed
@@ -572,7 +572,7 @@ GstClockTime silence_time = gst_util_uint64_scale (silence_samples, GST_SECOND, rate); - if (silence_time > self->max_silence_time) { + if (silence_time > self->max_silence_time && self->max_silence_time != 0) { GST_DEBUG_OBJECT (self, "Not inserting %" G_GUINT64_FORMAT " samples of silence (%" GST_TIME_FORMAT " exceeds maximum %" GST_TIME_FORMAT ")",
View file
gst-plugins-bad-1.22.6.tar.xz/gst/inter/gstinteraudiosink.c -> gst-plugins-bad-1.22.7.tar.xz/gst/inter/gstinteraudiosink.c
Changed
@@ -293,6 +293,7 @@ guint n, bpf; guint64 period_time, buffer_time; guint64 period_samples, buffer_samples; + GstBuffer *tmp; GST_DEBUG_OBJECT (interaudiosink, "render %" G_GSIZE_FORMAT, gst_buffer_get_size (buffer)); @@ -330,16 +331,26 @@ n = gst_adapter_available (interaudiosink->input_adapter); if (period_samples * bpf > gst_buffer_get_size (buffer) + n) { - gst_adapter_push (interaudiosink->input_adapter, gst_buffer_ref (buffer)); + GstAudioMeta *audio_meta = NULL; + + tmp = gst_buffer_copy_deep (buffer); + audio_meta = gst_buffer_get_audio_meta (tmp); + if (audio_meta != NULL) + gst_buffer_remove_meta (tmp, GST_META_CAST (audio_meta)); + + gst_adapter_push (interaudiosink->input_adapter, tmp); } else { - GstBuffer *tmp; + GstAudioMeta *audio_meta = NULL; if (n > 0) { tmp = gst_adapter_take_buffer (interaudiosink->input_adapter, n); gst_adapter_push (interaudiosink->surface->audio_adapter, tmp); } - gst_adapter_push (interaudiosink->surface->audio_adapter, - gst_buffer_ref (buffer)); + tmp = gst_buffer_copy_deep (buffer); + audio_meta = gst_buffer_get_audio_meta (tmp); + if (audio_meta != NULL) + gst_buffer_remove_meta (tmp, GST_META_CAST (audio_meta)); + gst_adapter_push (interaudiosink->surface->audio_adapter, tmp); } g_mutex_unlock (&interaudiosink->surface->mutex);
View file
gst-plugins-bad-1.22.6.tar.xz/gst/inter/gstinteraudiosrc.c -> gst-plugins-bad-1.22.7.tar.xz/gst/inter/gstinteraudiosrc.c
Changed
@@ -412,6 +412,12 @@ } n = period_samples; + /* audioconvert expects an audio meta for planar layout audio inputs. */ + if (GST_AUDIO_INFO_LAYOUT (&interaudiosrc->info) == + GST_AUDIO_LAYOUT_NON_INTERLEAVED) { + gst_buffer_add_audio_meta (buffer, &interaudiosrc->info, n, NULL); + } + GST_BUFFER_OFFSET (buffer) = interaudiosrc->n_samples; GST_BUFFER_OFFSET_END (buffer) = interaudiosrc->n_samples + n; GST_BUFFER_DTS (buffer) = GST_CLOCK_TIME_NONE;
View file
gst-plugins-bad-1.22.6.tar.xz/gst/mpegtsmux/gstatscmux.c -> gst-plugins-bad-1.22.7.tar.xz/gst/mpegtsmux/gstatscmux.c
Changed
@@ -61,7 +61,7 @@ static void gst_atsc_mux_stream_get_es_descrs (TsMuxStream * stream, - GstMpegtsPMTStream * pmt_stream, GstBaseTsMux * mpegtsmux) + GstMpegtsPMTStream * pmt_stream, gpointer user_data) { GstMpegtsDescriptor *descriptor; @@ -130,8 +130,8 @@ } static TsMuxStream * -gst_atsc_mux_create_new_stream (guint16 new_pid, - TsMuxStreamType stream_type, GstBaseTsMux * mpegtsmux) +gst_atsc_mux_create_new_stream (guint16 new_pid, TsMuxStreamType stream_type, + gpointer user_data) { TsMuxStream *ret = tsmux_stream_new (new_pid, stream_type); @@ -145,8 +145,7 @@ } tsmux_stream_set_get_es_descriptors_func (ret, - (TsMuxStreamGetESDescriptorsFunc) gst_atsc_mux_stream_get_es_descrs, - mpegtsmux); + gst_atsc_mux_stream_get_es_descrs, user_data); return ret; } @@ -174,8 +173,7 @@ section = gst_mpegts_section_from_atsc_rrt (rrt); tsmux_add_mpegts_si_section (ret, section); - tsmux_set_new_stream_func (ret, - (TsMuxNewStreamFunc) gst_atsc_mux_create_new_stream, mpegtsmux); + tsmux_set_new_stream_func (ret, gst_atsc_mux_create_new_stream, mpegtsmux); return ret; }
View file
gst-plugins-bad-1.22.6.tar.xz/gst/mpegtsmux/tsmux/tsmux.c -> gst-plugins-bad-1.22.7.tar.xz/gst/mpegtsmux/tsmux/tsmux.c
Changed
@@ -106,8 +106,8 @@ static gint64 write_new_pcr (TsMux * mux, TsMuxStream * stream, gint64 cur_pcr, gint64 next_pcr); static gboolean tsmux_write_ts_header (TsMux * mux, guint8 * buf, - TsMuxPacketInfo * pi, guint * payload_len_out, guint * payload_offset_out, - guint stream_avail); + TsMuxPacketInfo * pi, guint stream_avail, guint * payload_len_out, + guint * payload_offset_out); static void tsmux_section_free (TsMuxSection * section) @@ -116,6 +116,12 @@ g_slice_free (TsMuxSection, section); } +static TsMuxStream * +tsmux_new_stream_default (guint16 pid, guint stream_type, gpointer user_data) +{ + return tsmux_stream_new (pid, stream_type); +} + /** * tsmux_new: * @@ -150,7 +156,7 @@ mux->si_sections = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, (GDestroyNotify) tsmux_section_free); - mux->new_stream_func = (TsMuxNewStreamFunc) tsmux_stream_new; + mux->new_stream_func = tsmux_new_stream_default; mux->new_stream_data = NULL; mux->first_pcr_ts = G_MININT64; @@ -834,9 +840,10 @@ static gboolean tsmux_packet_out (TsMux * mux, GstBuffer * buf, gint64 pcr) { + g_return_val_if_fail (buf, FALSE); + if (G_UNLIKELY (mux->write_func == NULL)) { - if (buf) - gst_buffer_unref (buf); + gst_buffer_unref (buf); return TRUE; } @@ -863,21 +870,19 @@ new_pcr = write_new_pcr (mux, stream, cur_pcr, next_pcr); if (new_pcr != -1) { - GstBuffer *buf = NULL; + GstBuffer *pcr_buf = NULL; GstMapInfo map; - guint payload_len, payload_offs; - if (!tsmux_get_buffer (mux, &buf)) { + if (!tsmux_get_buffer (mux, &pcr_buf)) { goto error; } - gst_buffer_map (buf, &map, GST_MAP_READ); - tsmux_write_ts_header (mux, map.data, &stream->pi, &payload_len, - &payload_offs, 0); - gst_buffer_unmap (buf, &map); + gst_buffer_map (pcr_buf, &map, GST_MAP_WRITE); + tsmux_write_ts_header (mux, map.data, &stream->pi, 0, NULL, NULL); + gst_buffer_unmap (pcr_buf, &map); stream->pi.flags &= TSMUX_PACKET_FLAG_PES_FULL_HEADER; - if (!tsmux_packet_out (mux, buf, new_pcr)) + if (!tsmux_packet_out (mux, pcr_buf, new_pcr)) goto error; } } @@ -889,6 +894,7 @@ return mux->write_func (buf, mux->write_func_data, pcr); error: + gst_buffer_unref (buf); return FALSE; } @@ -1049,7 +1055,7 @@ static gboolean tsmux_write_ts_header (TsMux * mux, guint8 * buf, TsMuxPacketInfo * pi, - guint * payload_len_out, guint * payload_offset_out, guint stream_avail) + guint stream_avail, guint * payload_len_out, guint * payload_offset_out) { guint8 *tmp; guint8 adaptation_flag = 0; @@ -1107,8 +1113,15 @@ /* The amount of packet data we wrote is the remaining space after * the adaptation field */ - *payload_len_out = payload_len = TSMUX_PAYLOAD_LENGTH - adapt_len; - *payload_offset_out = TSMUX_HEADER_LENGTH + adapt_len; + payload_len = TSMUX_PAYLOAD_LENGTH - adapt_len; + + if (payload_len_out) + *payload_len_out = payload_len; + else + g_assert (payload_len == 0); + + if (payload_offset_out) + *payload_offset_out = TSMUX_HEADER_LENGTH + adapt_len; /* Now if we are going to write out some payload, flag that fact */ if (payload_len > 0 && stream_avail > 0) { @@ -1140,132 +1153,80 @@ return TRUE; } -/* The unused_arg is needed for g_hash_table_foreach() */ static gboolean -tsmux_section_write_packet (gpointer unused_arg, - TsMuxSection * section, TsMux * mux) +tsmux_section_write_packet (TsMux * mux, TsMuxSection * section) { - GstBuffer *section_buffer; - GstBuffer *packet_buffer = NULL; - GstMemory *mem; - guint8 *packet; guint8 *data; - gsize data_size = 0; - gsize payload_written; - guint len = 0, offset = 0, payload_len = 0; - guint extra_alloc_bytes = 0; + gsize data_size; + guint payload_written = 0; + gboolean ret = FALSE; g_return_val_if_fail (section != NULL, FALSE); g_return_val_if_fail (mux != NULL, FALSE); - /* Mark the start of new PES unit */ - section->pi.packet_start_unit_indicator = TRUE; - data = gst_mpegts_section_packetize (section->section, &data_size); - if (!data) { - TS_DEBUG ("Could not packetize section"); + GST_WARNING ("Could not packetize section"); return FALSE; } + /* Mark the start of new PES unit */ + section->pi.packet_start_unit_indicator = TRUE; + /* Mark payload data size */ section->pi.stream_avail = data_size; - payload_written = 0; - - /* Wrap section data in a buffer without free function. - The data will be freed when the GstMpegtsSection is destroyed. */ - section_buffer = gst_buffer_new_wrapped_full (GST_MEMORY_FLAG_READONLY, - data, data_size, 0, data_size, NULL, NULL); - - TS_DEBUG ("Section buffer with size %" G_GSIZE_FORMAT " created", - gst_buffer_get_size (section_buffer)); while (section->pi.stream_avail > 0) { + GstBuffer *buf; + GstMapInfo map; + guint len, offset; - packet = g_malloc (TSMUX_PACKET_LENGTH); + if (!tsmux_get_buffer (mux, &buf)) + goto done; - if (section->pi.packet_start_unit_indicator) { - /* Wee need room for a pointer byte */ - section->pi.stream_avail++; + if (!gst_buffer_map (buf, &map, GST_MAP_WRITE)) { + gst_buffer_unref (buf); + goto done; + } - if (!tsmux_write_ts_header (mux, packet, §ion->pi, &len, &offset, - section->pi.stream_avail)) - goto fail; + if (section->pi.packet_start_unit_indicator) { + /* We need room for a pointer byte */ + if (!tsmux_write_ts_header (mux, map.data, §ion->pi, + section->pi.stream_avail + 1, &len, &offset)) { + gst_buffer_unmap (buf, &map); + gst_buffer_unref (buf); + goto done; + } /* Write the pointer byte */ - packetoffset++ = 0x00; - payload_len = len - 1; - - } else { - if (!tsmux_write_ts_header (mux, packet, §ion->pi, &len, &offset, - section->pi.stream_avail)) - goto fail; - payload_len = len; + map.dataoffset++ = 0x00;
View file
gst-plugins-bad-1.22.6.tar.xz/gst/mpegtsmux/tsmux/tsmux.h -> gst-plugins-bad-1.22.7.tar.xz/gst/mpegtsmux/tsmux/tsmux.h
Changed
@@ -86,7 +86,7 @@ typedef gboolean (*TsMuxWriteFunc) (GstBuffer * buf, void *user_data, gint64 new_pcr); typedef void (*TsMuxAllocFunc) (GstBuffer ** buf, void *user_data); -typedef TsMuxStream * (*TsMuxNewStreamFunc) (guint16 new_pid, guint stream_type, void *user_data); +typedef TsMuxStream * (*TsMuxNewStreamFunc) (guint16 new_pid, guint stream_type, gpointer user_data); struct TsMuxSection { TsMuxPacketInfo pi;
View file
gst-plugins-bad-1.22.6.tar.xz/gst/mpegtsmux/tsmux/tsmuxstream.c -> gst-plugins-bad-1.22.7.tar.xz/gst/mpegtsmux/tsmux/tsmuxstream.c
Changed
@@ -96,6 +96,13 @@ void *user_data; }; +static void +tsmux_stream_get_es_descrs_default (TsMuxStream * stream, + GstMpegtsPMTStream * pmt_stream, gpointer user_data) +{ + tsmux_stream_default_get_es_descrs (stream, pmt_stream); +} + /** * tsmux_stream_new: * @pid: a PID @@ -217,8 +224,7 @@ stream->pcr_ref = 0; stream->next_pcr = -1; - stream->get_es_descrs = - (TsMuxStreamGetESDescriptorsFunc) tsmux_stream_default_get_es_descrs; + stream->get_es_descrs = tsmux_stream_get_es_descrs_default; stream->get_es_descrs_data = NULL; return stream;
View file
gst-plugins-bad-1.22.6.tar.xz/gst/mpegtsmux/tsmux/tsmuxstream.h -> gst-plugins-bad-1.22.7.tar.xz/gst/mpegtsmux/tsmux/tsmuxstream.h
Changed
@@ -65,6 +65,7 @@ #define __TSMUXSTREAM_H__ #include <glib.h> +#include <gst/mpegts/mpegts.h> #include "tsmuxcommon.h" @@ -75,7 +76,7 @@ typedef struct TsMuxStreamBuffer TsMuxStreamBuffer; typedef void (*TsMuxStreamBufferReleaseFunc) (guint8 *data, void *user_data); -typedef void (*TsMuxStreamGetESDescriptorsFunc) (TsMuxStream *stream, GstMpegtsPMTStream *pmt_stream, void *user_data); +typedef void (*TsMuxStreamGetESDescriptorsFunc) (TsMuxStream *stream, GstMpegtsPMTStream *pmt_stream, gpointer user_data); /* Stream type assignments *
View file
gst-plugins-bad-1.22.6.tar.xz/gst/mxf/mxfdemux.c -> gst-plugins-bad-1.22.7.tar.xz/gst/mxf/mxfdemux.c
Changed
@@ -170,10 +170,25 @@ } static void -gst_mxf_demux_reset_mxf_state (GstMXFDemux * demux) +gst_mxf_demux_essence_track_free (GstMXFDemuxEssenceTrack * t) { - guint i; + if (t->offsets) + g_array_free (t->offsets, TRUE); + + g_free (t->mapping_data); + + if (t->tags) + gst_tag_list_unref (t->tags); + + if (t->caps) + gst_caps_unref (t->caps); + + g_free (t); +} +static void +gst_mxf_demux_reset_mxf_state (GstMXFDemux * demux) +{ GST_DEBUG_OBJECT (demux, "Resetting MXF state"); g_list_foreach (demux->partitions, (GFunc) gst_mxf_demux_partition_free, @@ -182,23 +197,7 @@ demux->partitions = NULL; demux->current_partition = NULL; - - for (i = 0; i < demux->essence_tracks->len; i++) { - GstMXFDemuxEssenceTrack *t = - &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, i); - - if (t->offsets) - g_array_free (t->offsets, TRUE); - - g_free (t->mapping_data); - - if (t->tags) - gst_tag_list_unref (t->tags); - - if (t->caps) - gst_caps_unref (t->caps); - } - g_array_set_size (demux->essence_tracks, 0); + g_ptr_array_set_size (demux->essence_tracks, 0); } static void @@ -216,7 +215,7 @@ for (i = 0; i < demux->essence_tracks->len; i++) { GstMXFDemuxEssenceTrack *track = - &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, i); + g_ptr_array_index (demux->essence_tracks, i); track->source_package = NULL; track->delta_id = -1; @@ -419,7 +418,7 @@ for (i = 0; i < demux->essence_tracks->len; i++) { GstMXFDemuxEssenceTrack *cand = - &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, i); + g_ptr_array_index (demux->essence_tracks, i); if (cand->body_sid != partition->partition.body_sid) continue; @@ -866,8 +865,7 @@ for (k = 0; k < demux->essence_tracks->len; k++) { GstMXFDemuxEssenceTrack *tmp = - &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, - k); + g_ptr_array_index (demux->essence_tracks, k); if (tmp->track_number == track->parent.track_number && tmp->body_sid == edata->body_sid) { @@ -885,24 +883,23 @@ } if (!etrack) { - GstMXFDemuxEssenceTrack tmp; + GstMXFDemuxEssenceTrack *tmp = g_new0 (GstMXFDemuxEssenceTrack, 1); - memset (&tmp, 0, sizeof (tmp)); - tmp.body_sid = edata->body_sid; - tmp.index_sid = edata->index_sid; - tmp.track_number = track->parent.track_number; - tmp.track_id = track->parent.track_id; - memcpy (&tmp.source_package_uid, &package->parent.package_uid, 32); + tmp->body_sid = edata->body_sid; + tmp->index_sid = edata->index_sid; + tmp->track_number = track->parent.track_number; + tmp->track_id = track->parent.track_id; + memcpy (&tmp->source_package_uid, &package->parent.package_uid, 32); if (demux->current_partition->partition.body_sid == edata->body_sid && demux->current_partition->partition.body_offset == 0) - tmp.position = 0; + tmp->position = 0; else - tmp.position = -1; + tmp->position = -1; - g_array_append_val (demux->essence_tracks, tmp); + g_ptr_array_add (demux->essence_tracks, tmp); etrack = - &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, + g_ptr_array_index (demux->essence_tracks, demux->essence_tracks->len - 1); new = TRUE; } @@ -1050,13 +1047,7 @@ next: if (new) { - g_free (etrack->mapping_data); - if (etrack->tags) - gst_tag_list_unref (etrack->tags); - if (etrack->caps) - gst_caps_unref (etrack->caps); - - g_array_remove_index (demux->essence_tracks, + g_ptr_array_remove_index (demux->essence_tracks, demux->essence_tracks->len - 1); } } @@ -1069,7 +1060,7 @@ for (i = 0; i < demux->essence_tracks->len; i++) { GstMXFDemuxEssenceTrack *etrack = - &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, i); + g_ptr_array_index (demux->essence_tracks, i); if (!etrack->source_package || !etrack->source_track || !etrack->caps) { GST_ERROR_OBJECT (demux, "Failed to update essence track %u", i); @@ -1438,7 +1429,7 @@ for (k = 0; k < demux->essence_tracks->len; k++) { GstMXFDemuxEssenceTrack *tmp = - &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, k); + g_ptr_array_index (demux->essence_tracks, k); if (tmp->source_package == source_package && tmp->source_track == source_track) { @@ -1927,8 +1918,7 @@ pad->current_essence_track = NULL; for (k = 0; k < demux->essence_tracks->len; k++) { - GstMXFDemuxEssenceTrack *tmp = - &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, k); + GstMXFDemuxEssenceTrack *tmp = g_ptr_array_index (demux->essence_tracks, k); if (tmp->source_package == source_package && tmp->source_track == source_track) { @@ -2712,7 +2702,7 @@ if (!etrack) { for (i = 0; i < demux->essence_tracks->len; i++) { GstMXFDemuxEssenceTrack *tmp = - &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, i); + g_ptr_array_index (demux->essence_tracks, i); if (tmp->body_sid == demux->current_partition->partition.body_sid && (tmp->track_number == track_number || tmp->track_number == 0)) { @@ -3916,8 +3906,7 @@ gst_mxf_demux_set_partition_for_offset (demux, demux->offset); for (i = 0; i < demux->essence_tracks->len; i++) { - GstMXFDemuxEssenceTrack *t = - &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, i); + GstMXFDemuxEssenceTrack *t = g_ptr_array_index (demux->essence_tracks, i); if (index_start_position != -1 && t == etrack) t->position = index_start_position; @@ -3941,8 +3930,7 @@ /* Handle EOS */ for (i = 0; i < demux->essence_tracks->len; i++) { GstMXFDemuxEssenceTrack *t = - &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, - i); + g_ptr_array_index (demux->essence_tracks, i); if (t->position > 0) t->duration = t->position; @@ -4180,8 +4168,7 @@ guint i; for (i = 0; i < demux->essence_tracks->len; i++) { GstMXFDemuxEssenceTrack *etrack = - &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, - i); + g_ptr_array_index (demux->essence_tracks, i); if (etrack->body_sid != partition->partition.body_sid) continue; @@ -4652,9 +4639,8 @@ /* Get the corresponding essence track for the given source package and stream id */
View file
gst-plugins-bad-1.22.6.tar.xz/gst/mxf/mxfdemux.h -> gst-plugins-bad-1.22.7.tar.xz/gst/mxf/mxfdemux.h
Changed
@@ -266,7 +266,7 @@ GList *partitions; GstMXFDemuxPartition *current_partition; - GArray *essence_tracks; + GPtrArray *essence_tracks; GList *pending_index_table_segments; GList *index_tables; /* one per BodySID / IndexSID */
View file
gst-plugins-bad-1.22.6.tar.xz/meson.build -> gst-plugins-bad-1.22.7.tar.xz/meson.build
Changed
@@ -1,5 +1,5 @@ project('gst-plugins-bad', 'c', 'cpp', - version : '1.22.6', + version : '1.22.7', meson_version : '>= 0.62', default_options : 'warning_level=1', 'buildtype=debugoptimized' )
View file
gst-plugins-bad-1.22.6.tar.xz/po/gst-plugins-bad-1.0.pot -> gst-plugins-bad-1.22.7.tar.xz/po/gst-plugins-bad-1.0.pot
Changed
@@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: gst-plugins-bad-1.22.6\n" +"Project-Id-Version: gst-plugins-bad-1.22.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-20 18:17+0100\n" +"POT-Creation-Date: 2023-11-13 11:10+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
gst-plugins-bad-1.22.6.tar.xz/po/gst-plugins-bad.pot -> gst-plugins-bad-1.22.7.tar.xz/po/gst-plugins-bad.pot
Changed
@@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: gst-plugins-bad-1.22.6\n" +"Project-Id-Version: gst-plugins-bad-1.22.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-20 18:17+0100\n" +"POT-Creation-Date: 2023-11-13 11:10+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
gst-plugins-bad-1.22.6.tar.xz/sys/d3d11/gstd3d11decoder.cpp -> gst-plugins-bad-1.22.7.tar.xz/sys/d3d11/gstd3d11decoder.cpp
Changed
@@ -1686,6 +1686,11 @@ info = &decoder->output_info; input_state = decoder->input_state; + if (!decoder->configured) { + GST_WARNING_OBJECT (videodec, "Decoder is not configured"); + return FALSE; + } + alternate_interlaced = (GST_VIDEO_INFO_INTERLACE_MODE (info) == GST_VIDEO_INTERLACE_MODE_ALTERNATE);
View file
gst-plugins-bad-1.22.6.tar.xz/sys/d3d11/gstd3d11screencapturesrc.cpp -> gst-plugins-bad-1.22.7.tar.xz/sys/d3d11/gstd3d11screencapturesrc.cpp
Changed
@@ -890,8 +890,8 @@ blend_desc.RenderTarget0.SrcBlend = D3D11_BLEND_SRC_ALPHA; blend_desc.RenderTarget0.DestBlend = D3D11_BLEND_INV_SRC_ALPHA; blend_desc.RenderTarget0.BlendOp = D3D11_BLEND_OP_ADD; - blend_desc.RenderTarget0.SrcBlendAlpha = D3D11_BLEND_ONE; - blend_desc.RenderTarget0.DestBlendAlpha = D3D11_BLEND_ZERO; + blend_desc.RenderTarget0.SrcBlendAlpha = D3D11_BLEND_ZERO; + blend_desc.RenderTarget0.DestBlendAlpha = D3D11_BLEND_ONE; blend_desc.RenderTarget0.BlendOpAlpha = D3D11_BLEND_OP_ADD; blend_desc.RenderTarget0.RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL;
View file
gst-plugins-bad-1.22.6.tar.xz/sys/d3d11/gstd3d11window_win32.cpp -> gst-plugins-bad-1.22.7.tar.xz/sys/d3d11/gstd3d11window_win32.cpp
Changed
@@ -90,8 +90,8 @@ gint pending_move_window; /* fullscreen related */ - RECT restore_rect; LONG restore_style; + WINDOWPLACEMENT restore_placement; /* Handle set_render_rectangle */ GstVideoRectangle render_rect; @@ -177,6 +177,7 @@ gst_d3d11_window_win32_init (GstD3D11WindowWin32 * self) { self->main_context = g_main_context_new (); + self->restore_placement.length = sizeof (WINDOWPLACEMENT); } static void @@ -659,37 +660,30 @@ /* Restore the window's attributes and size */ SetWindowLongA (hwnd, GWL_STYLE, self->restore_style); - SetWindowPos (hwnd, HWND_NOTOPMOST, - self->restore_rect.left, - self->restore_rect.top, - self->restore_rect.right - self->restore_rect.left, - self->restore_rect.bottom - self->restore_rect.top, - SWP_FRAMECHANGED | SWP_NOACTIVATE); - - ShowWindow (hwnd, SW_NORMAL); + SetWindowPlacement (hwnd, &self->restore_placement); } else { ComPtr < IDXGIOutput > output; DXGI_OUTPUT_DESC output_desc; IDXGISwapChain *swap_chain = window->swap_chain; + /* remember current placement to restore window later */ + GetWindowPlacement (hwnd, &self->restore_placement); + /* show window before change style */ ShowWindow (hwnd, SW_SHOW); - /* Save the old window rect so we can restore it when exiting - * fullscreen mode */ - GetWindowRect (hwnd, &self->restore_rect); self->restore_style = GetWindowLong (hwnd, GWL_STYLE); /* Make the window borderless so that the client area can fill the screen */ SetWindowLongA (hwnd, GWL_STYLE, self->restore_style & ~(WS_CAPTION | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SYSMENU | - WS_THICKFRAME)); + WS_THICKFRAME | WS_MAXIMIZE)); swap_chain->GetContainingOutput (&output); output->GetDesc (&output_desc); - SetWindowPos (hwnd, HWND_TOPMOST, + SetWindowPos (hwnd, HWND_TOP, output_desc.DesktopCoordinates.left, output_desc.DesktopCoordinates.top, output_desc.DesktopCoordinates.right, @@ -1228,6 +1222,9 @@ PostMessageA (self->internal_hwnd, WM_GST_D3D11_SHOW_WINDOW, 0, 0); } + if (g_atomic_int_get (&self->pending_fullscreen_count) > 0) + PostMessageA (self->internal_hwnd, WM_GST_D3D11_FULLSCREEN, 0, 0); + self->visible = TRUE; } } @@ -1295,7 +1292,8 @@ if (self->internal_hwnd) { g_atomic_int_add (&self->pending_fullscreen_count, 1); - PostMessageA (self->internal_hwnd, WM_GST_D3D11_FULLSCREEN, 0, 0); + if (self->visible) + PostMessageA (self->internal_hwnd, WM_GST_D3D11_FULLSCREEN, 0, 0); } }
View file
gst-plugins-bad-1.22.6.tar.xz/sys/decklink/gstdecklink.h -> gst-plugins-bad-1.22.7.tar.xz/sys/decklink/gstdecklink.h
Changed
@@ -37,19 +37,17 @@ #define COMSTR_T BSTR #define CONVERT_COM_STRING(s) G_STMT_START { \ BSTR _s = (BSTR)s; \ - int _s_length = ::SysStringLen(_s); \ - int _length = ::WideCharToMultiByte(CP_ACP, 0, (wchar_t*)_s, _s_length, NULL, 0, NULL, NULL); \ + int _length = ::WideCharToMultiByte(CP_ACP, 0, (wchar_t*)_s, -1, NULL, 0, NULL, NULL); \ s = (char *) malloc(_length); \ - ::WideCharToMultiByte(CP_ACP, 0, (wchar_t*)_s, _s_length, s, _length, NULL, NULL); \ + ::WideCharToMultiByte(CP_ACP, 0, (wchar_t*)_s, -1, s, _length, NULL, NULL); \ ::SysFreeString(_s); \ } G_STMT_END #define FREE_COM_STRING(s) free(s); #define CONVERT_TO_COM_STRING(s) G_STMT_START { \ char * _s = (char *)s; \ - int _s_length = strlen((char*)_s); \ - int _length = ::MultiByteToWideChar(CP_ACP, 0, (char*)_s, _s_length, NULL, 0); \ + int _length = ::MultiByteToWideChar(CP_ACP, 0, (char*)_s, -1, NULL, 0); \ s = ::SysAllocStringLen(NULL, _length); \ - ::MultiByteToWideChar(CP_ACP, 0, (char*)_s, _s_length, s, _length); \ + ::MultiByteToWideChar(CP_ACP, 0, (char*)_s, -1, s, _length); \ g_free(_s); \ } G_STMT_END #elif defined(__APPLE__)
View file
gst-plugins-bad-1.22.6.tar.xz/sys/kms/gstkmssink.c -> gst-plugins-bad-1.22.7.tar.xz/sys/kms/gstkmssink.c
Changed
@@ -483,7 +483,7 @@ static const char *drivers = { "i915", "radeon", "nouveau", "vmwgfx", "exynos", "amdgpu", "imx-drm", "imx-lcdif", "rockchip", "atmel-hlcdc", "msm", "xlnx", "vc4", "meson", "stm", "sun4i-drm", "mxsfb-drm", "tegra", - "xilinx_drm", /* DEPRECATED. Replaced by xlnx */ + "tidss", "xilinx_drm", /* DEPRECATED. Replaced by xlnx */ }; int i, fd = -1;
View file
gst-plugins-bad-1.22.6.tar.xz/sys/mediafoundation/gstmfvideoencoder.cpp -> gst-plugins-bad-1.22.7.tar.xz/sys/mediafoundation/gstmfvideoencoder.cpp
Changed
@@ -1703,9 +1703,9 @@ gst_value_set_int_range_step (&res_val, 64, 8192, 2); gst_caps_set_value (sink_caps, "width", &res_val); - gst_caps_set_value (sink_caps, "heigh", &res_val); + gst_caps_set_value (sink_caps, "height", &res_val); gst_caps_set_value (src_caps, "width", &res_val); - gst_caps_set_value (src_caps, "heigh", &res_val); + gst_caps_set_value (src_caps, "height", &res_val); g_value_unset (&res_val);
View file
gst-plugins-bad-1.22.6.tar.xz/sys/nvcodec/gstnvh264encoder.cpp -> gst-plugins-bad-1.22.7.tar.xz/sys/nvcodec/gstnvh264encoder.cpp
Changed
@@ -2130,13 +2130,13 @@ profiles.insert ((gchar *) walk->data); if (cdata->device_mode == GST_NV_ENCODER_DEVICE_D3D11 && - adapter_luid_size < G_N_ELEMENTS (adapter_luid_list) - 1) { + adapter_luid_size <= G_N_ELEMENTS (adapter_luid_list) - 1) { adapter_luid_listadapter_luid_size = cdata->adapter_luid; adapter_luid_size++; } if (cdata->device_mode == GST_NV_ENCODER_DEVICE_CUDA && - cuda_device_id_size < G_N_ELEMENTS (cuda_device_id_list) - 1) { + cuda_device_id_size <= G_N_ELEMENTS (cuda_device_id_list) - 1) { cuda_device_id_listcuda_device_id_size = cdata->cuda_device_id; cuda_device_id_size++; }
View file
gst-plugins-bad-1.22.6.tar.xz/sys/nvcodec/gstnvh265encoder.cpp -> gst-plugins-bad-1.22.7.tar.xz/sys/nvcodec/gstnvh265encoder.cpp
Changed
@@ -2140,13 +2140,13 @@ profiles.insert ((gchar *) walk->data); if (cdata->device_mode == GST_NV_ENCODER_DEVICE_D3D11 && - adapter_luid_size < G_N_ELEMENTS (adapter_luid_list) - 1) { + adapter_luid_size <= G_N_ELEMENTS (adapter_luid_list) - 1) { adapter_luid_listadapter_luid_size = cdata->adapter_luid; adapter_luid_size++; } if (cdata->device_mode == GST_NV_ENCODER_DEVICE_CUDA && - cuda_device_id_size < G_N_ELEMENTS (cuda_device_id_list) - 1) { + cuda_device_id_size <= G_N_ELEMENTS (cuda_device_id_list) - 1) { cuda_device_id_listcuda_device_id_size = cdata->cuda_device_id; cuda_device_id_size++; }
View file
gst-plugins-bad-1.22.6.tar.xz/sys/v4l2codecs/gstv4l2codech265dec.c -> gst-plugins-bad-1.22.7.tar.xz/sys/v4l2codecs/gstv4l2codech265dec.c
Changed
@@ -1604,6 +1604,7 @@ g_clear_object (&self->decoder); g_clear_pointer (&self->slice_params, g_array_unref); + g_clear_pointer (&self->entry_point_offsets, g_array_unref); G_OBJECT_CLASS (parent_class)->dispose (object); }
View file
gst-plugins-bad-1.22.6.tar.xz/sys/v4l2codecs/gstv4l2decoder.c -> gst-plugins-bad-1.22.7.tar.xz/sys/v4l2codecs/gstv4l2decoder.c
Changed
@@ -640,7 +640,8 @@ .type = self->sink_buf_type, .memory = V4L2_MEMORY_MMAP, .index = gst_v4l2_codec_memory_get_index (mem), - .timestamp.tv_usec = frame_num, + .timestamp.tv_sec = frame_num / 1000000, + .timestamp.tv_usec = frame_num % 1000000, .request_fd = request->fd, .flags = V4L2_BUF_FLAG_REQUEST_FD | flags, }; @@ -747,7 +748,7 @@ return FALSE; } - *out_frame_num = buf.timestamp.tv_usec; + *out_frame_num = buf.timestamp.tv_usec + buf.timestamp.tv_sec * 1000000; GST_TRACE_OBJECT (self, "Dequeued picture buffer %i", buf.index);
View file
gst-plugins-bad-1.22.6.tar.xz/sys/v4l2codecs/gstv4l2format.c -> gst-plugins-bad-1.22.7.tar.xz/sys/v4l2codecs/gstv4l2format.c
Changed
@@ -86,10 +86,9 @@ padded_height = GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (finfo, plane, info->height); - padded_height = (padded_height + tile_height - 1) / tile_height; x_tiles = stride / GST_VIDEO_FORMAT_INFO_TILE_STRIDE (finfo, plane); - y_tiles = padded_height / tile_height; + y_tiles = (padded_height + tile_height - 1) / tile_height; info->strideplane = GST_VIDEO_TILE_MAKE_STRIDE (x_tiles, y_tiles); } else { info->strideplane = stride;
View file
gst-plugins-bad-1.22.6.tar.xz/sys/wasapi2/gstwasapi2client.cpp -> gst-plugins-bad-1.22.7.tar.xz/sys/wasapi2/gstwasapi2client.cpp
Changed
@@ -239,6 +239,7 @@ typedef enum { + GST_WASAPI2_CLIENT_ACTIVATE_NOT_FOUND = -2, GST_WASAPI2_CLIENT_ACTIVATE_FAILED = -1, GST_WASAPI2_CLIENT_ACTIVATE_INIT = 0, GST_WASAPI2_CLIENT_ACTIVATE_WAIT, @@ -579,7 +580,7 @@ } /* *INDENT-ON* */ -static gboolean +static void gst_wasapi2_client_activate_async (GstWasapi2Client * self, GstWasapiDeviceActivator * activator) { @@ -606,18 +607,20 @@ memset (&activation_params, 0, sizeof (GST_AUDIOCLIENT_ACTIVATION_PARAMS)); activation_params.ActivationType = GST_AUDIOCLIENT_ACTIVATION_TYPE_DEFAULT; + self->activate_state = GST_WASAPI2_CLIENT_ACTIVATE_NOT_FOUND; + if (self->device_class == GST_WASAPI2_CLIENT_DEVICE_CLASS_INCLUDE_PROCESS_LOOPBACK_CAPTURE || self->device_class == GST_WASAPI2_CLIENT_DEVICE_CLASS_EXCLUDE_PROCESS_LOOPBACK_CAPTURE) { if (self->target_pid == 0) { GST_ERROR_OBJECT (self, "Process loopback mode without PID"); - goto failed; + return; } if (!gst_wasapi2_can_process_loopback ()) { GST_ERROR_OBJECT (self, "Process loopback is not supported"); - goto failed; + return; } process_loopback = TRUE; @@ -656,7 +659,7 @@ default_device_id_wstring = gst_wasapi2_client_get_default_device_id (self); if (default_device_id_wstring.empty ()) { GST_WARNING_OBJECT (self, "Couldn't get default device id"); - goto failed; + return; } default_device_id = convert_wstring_to_string (default_device_id_wstring); @@ -701,31 +704,31 @@ hr = GetActivationFactory (hstr_device_info.Get (), &device_info_static); if (!gst_wasapi2_result (hr)) - goto failed; + return; hr = device_info_static->FindAllAsyncDeviceClass (device_class, &async_op); device_info_static.Reset (); if (!gst_wasapi2_result (hr)) - goto failed; + return; /* *INDENT-OFF* */ hr = SyncWait<DeviceInformationCollection*>(async_op.Get ()); /* *INDENT-ON* */ if (!gst_wasapi2_result (hr)) - goto failed; + return; hr = async_op->GetResults (&device_list); async_op.Reset (); if (!gst_wasapi2_result (hr)) - goto failed; + return; hr = device_list->get_Size (&count); if (!gst_wasapi2_result (hr)) - goto failed; + return; if (count == 0) { GST_WARNING_OBJECT (self, "No available device"); - goto failed; + return; } /* device_index 0 will be assigned for default device @@ -733,7 +736,7 @@ if (self->device_index >= 0 && self->device_index > (gint) count) { GST_WARNING_OBJECT (self, "Device index %d is unavailable", self->device_index); - goto failed; + return; } GST_DEBUG_OBJECT (self, "Available device count: %d", count); @@ -839,7 +842,7 @@ if (target_device_id_wstring.empty ()) { GST_WARNING_OBJECT (self, "Couldn't find target device"); - goto failed; + return; } activate: @@ -854,6 +857,8 @@ /* default device supports automatic stream routing */ self->can_auto_routing = use_default_device; + self->activate_state = GST_WASAPI2_CLIENT_ACTIVATE_INIT; + if (process_loopback) { hr = activator->ActivateDeviceAsync (target_device_id_wstring, &activation_params); @@ -863,26 +868,22 @@ if (!gst_wasapi2_result (hr)) { GST_WARNING_OBJECT (self, "Failed to activate device"); - goto failed; + self->activate_state = GST_WASAPI2_CLIENT_ACTIVATE_FAILED; + return; } g_mutex_lock (&self->lock); if (self->activate_state == GST_WASAPI2_CLIENT_ACTIVATE_INIT) self->activate_state = GST_WASAPI2_CLIENT_ACTIVATE_WAIT; g_mutex_unlock (&self->lock); - - return TRUE; - -failed: - self->activate_state = GST_WASAPI2_CLIENT_ACTIVATE_FAILED; - - return FALSE; } static const gchar * activate_state_to_string (GstWasapi2ClientActivateState state) { switch (state) { + case GST_WASAPI2_CLIENT_ACTIVATE_NOT_FOUND: + return "NOT-FOUND"; case GST_WASAPI2_CLIENT_ACTIVATE_FAILED: return "FAILED"; case GST_WASAPI2_CLIENT_ACTIVATE_INIT: @@ -913,7 +914,7 @@ if (!gst_wasapi2_result (hr)) { GST_ERROR_OBJECT (self, "Could not create activator object"); - self->activate_state = GST_WASAPI2_CLIENT_ACTIVATE_FAILED; + self->activate_state = GST_WASAPI2_CLIENT_ACTIVATE_NOT_FOUND; goto run_loop; } @@ -1080,7 +1081,8 @@ * RoInitializeWrapper dtor is called */ core_dispatcher.Reset (); - if (self->activate_state == GST_WASAPI2_CLIENT_ACTIVATE_FAILED) { + if (self->activate_state == GST_WASAPI2_CLIENT_ACTIVATE_FAILED || + self->activate_state == GST_WASAPI2_CLIENT_ACTIVATE_NOT_FOUND) { gst_object_unref (self); return nullptr; } @@ -1090,6 +1092,43 @@ return self; } +GstWasapi2Result +gst_wasapi2_client_enumerate (GstWasapi2ClientDeviceClass device_class, + gint device_index, GstWasapi2Client ** client) +{ + GstWasapi2Client *self; + /* *INDENT-OFF* */ + ComPtr<ICoreDispatcher> core_dispatcher; + /* *INDENT-ON* */ + /* Multiple COM init is allowed */ + RoInitializeWrapper init_wrapper (RO_INIT_MULTITHREADED); + + *client = nullptr; + + find_dispatcher (&core_dispatcher); + + self = (GstWasapi2Client *) g_object_new (GST_TYPE_WASAPI2_CLIENT, + "device-class", device_class, "device-index", device_index, + "dispatcher", core_dispatcher.Get (), nullptr); + + /* Reset explicitly to ensure that it happens before + * RoInitializeWrapper dtor is called */ + core_dispatcher.Reset (); + + if (self->activate_state == GST_WASAPI2_CLIENT_ACTIVATE_NOT_FOUND) { + gst_object_unref (self); + return GST_WASAPI2_DEVICE_NOT_FOUND; + } else if (self->activate_state == GST_WASAPI2_CLIENT_ACTIVATE_FAILED) { + gst_object_unref (self); + return GST_WASAPI2_ACTIVATION_FAILED; + } + + gst_object_ref_sink (self);
View file
gst-plugins-bad-1.22.6.tar.xz/sys/wasapi2/gstwasapi2client.h -> gst-plugins-bad-1.22.7.tar.xz/sys/wasapi2/gstwasapi2client.h
Changed
@@ -35,6 +35,13 @@ GST_WASAPI2_CLIENT_DEVICE_CLASS_EXCLUDE_PROCESS_LOOPBACK_CAPTURE, } GstWasapi2ClientDeviceClass; +typedef enum +{ + GST_WASAPI2_OK, + GST_WASAPI2_DEVICE_NOT_FOUND, + GST_WASAPI2_ACTIVATION_FAILED, +} GstWasapi2Result; + static inline gboolean gst_wasapi2_device_class_is_loopback (GstWasapi2ClientDeviceClass device_class) { @@ -81,6 +88,10 @@ GstCaps * gst_wasapi2_client_get_caps (GstWasapi2Client * client); +GstWasapi2Result gst_wasapi2_client_enumerate (GstWasapi2ClientDeviceClass device_class, + gint device_index, + GstWasapi2Client ** client); + G_END_DECLS #endif /* __GST_WASAPI2_CLIENT_H__ */
View file
gst-plugins-bad-1.22.6.tar.xz/sys/wasapi2/gstwasapi2device.c -> gst-plugins-bad-1.22.7.tar.xz/sys/wasapi2/gstwasapi2device.c
Changed
@@ -282,11 +282,15 @@ GstCaps *caps = NULL; gchar *device_id = NULL; gchar *device_name = NULL; + GstWasapi2Result result; - client = gst_wasapi2_client_new (client_class, i, NULL, 0, NULL); - - if (!client) + result = gst_wasapi2_client_enumerate (client_class, i, &client); + if (result == GST_WASAPI2_DEVICE_NOT_FOUND) return; + else if (result == GST_WASAPI2_ACTIVATION_FAILED) + continue; + + g_assert (client); caps = gst_wasapi2_client_get_caps (client); if (!caps) {
View file
gst-plugins-bad-1.22.6.tar.xz/sys/wasapi2/gstwasapi2ringbuffer.cpp -> gst-plugins-bad-1.22.7.tar.xz/sys/wasapi2/gstwasapi2ringbuffer.cpp
Changed
@@ -21,6 +21,7 @@ #include <string.h> #include <mfapi.h> #include <wrl.h> +#include <vector> GST_DEBUG_CATEGORY_STATIC (gst_wasapi2_ring_buffer_debug); #define GST_CAT_DEFAULT gst_wasapi2_ring_buffer_debug @@ -151,7 +152,7 @@ GstWasapi2Client *loopback_client; IAudioCaptureClient *capture_client; IAudioRenderClient *render_client; - ISimpleAudioVolume *volume_object; + IAudioStreamVolume *volume_object; GstWasapiAsyncCallback *callback_object; IMFAsyncResult *callback_result; @@ -420,8 +421,6 @@ GST_WASAPI2_CLEAR_COM (self->render_client); g_mutex_lock (&self->volume_lock); - if (self->volume_object) - self->volume_object->SetMute (FALSE, nullptr); GST_WASAPI2_CLEAR_COM (self->volume_object); g_mutex_unlock (&self->volume_lock); @@ -983,6 +982,29 @@ return TRUE; } +static HRESULT +gst_wasapi2_ring_buffer_set_channel_volumes (IAudioStreamVolume * iface, + float volume) +{ + float target; + HRESULT hr = S_OK; + + if (!iface) + return hr; + + target = CLAMP (volume, 0.0f, 1.0f); + UINT32 channel_count = 0; + hr = iface->GetChannelCount (&channel_count); + if (!gst_wasapi2_result (hr) || channel_count == 0) + return hr; + + std::vector < float >volumes; + for (guint i = 0; i < channel_count; i++) + volumes.push_back (target); + + return iface->SetAllVolumes (channel_count, &volumes0); +} + static gboolean gst_wasapi2_ring_buffer_acquire (GstAudioRingBuffer * buf, GstAudioRingBufferSpec * spec) @@ -991,7 +1013,7 @@ IAudioClient *client_handle; HRESULT hr; WAVEFORMATEX *mix_format = nullptr; - ComPtr < ISimpleAudioVolume > audio_volume; + ComPtr < IAudioStreamVolume > audio_volume; GstAudioChannelPosition *position = nullptr; guint period = 0; @@ -1129,18 +1151,14 @@ } else { g_mutex_lock (&self->volume_lock); self->volume_object = audio_volume.Detach (); + float volume = (float) self->volume; + if (self->mute) + volume = 0.0f; - if (self->mute_changed) { - self->volume_object->SetMute (self->mute, nullptr); - self->mute_changed = FALSE; - } else { - self->volume_object->SetMute (FALSE, nullptr); - } + gst_wasapi2_ring_buffer_set_channel_volumes (self->volume_object, volume); - if (self->volume_changed) { - self->volume_object->SetMasterVolume (self->volume, nullptr); - self->volume_changed = FALSE; - } + self->mute_changed = FALSE; + self->volume_changed = FALSE; g_mutex_unlock (&self->volume_lock); } @@ -1415,34 +1433,31 @@ g_mutex_lock (&buf->volume_lock); buf->mute = mute; - if (buf->volume_object) - hr = buf->volume_object->SetMute (mute, nullptr); - else + if (buf->volume_object) { + float volume = buf->volume; + if (mute) + volume = 0.0f; + hr = gst_wasapi2_ring_buffer_set_channel_volumes (buf->volume_object, + volume); + } else { buf->mute_changed = TRUE; + } g_mutex_unlock (&buf->volume_lock); - return S_OK; + return hr; } HRESULT gst_wasapi2_ring_buffer_get_mute (GstWasapi2RingBuffer * buf, gboolean * mute) { - BOOL mute_val; - HRESULT hr = S_OK; - g_return_val_if_fail (GST_IS_WASAPI2_RING_BUFFER (buf), E_INVALIDARG); g_return_val_if_fail (mute != nullptr, E_INVALIDARG); - mute_val = buf->mute; - g_mutex_lock (&buf->volume_lock); - if (buf->volume_object) - hr = buf->volume_object->GetMute (&mute_val); + *mute = buf->mute; g_mutex_unlock (&buf->volume_lock); - *mute = mute_val ? TRUE : FALSE; - - return hr; + return S_OK; } HRESULT @@ -1455,10 +1470,12 @@ g_mutex_lock (&buf->volume_lock); buf->volume = volume; - if (buf->volume_object) - hr = buf->volume_object->SetMasterVolume (volume, nullptr); - else + if (buf->volume_object) { + hr = gst_wasapi2_ring_buffer_set_channel_volumes (buf->volume_object, + volume); + } else { buf->volume_changed = TRUE; + } g_mutex_unlock (&buf->volume_lock); return hr; @@ -1467,19 +1484,12 @@ HRESULT gst_wasapi2_ring_buffer_get_volume (GstWasapi2RingBuffer * buf, gfloat * volume) { - gfloat volume_val; - HRESULT hr = S_OK; - g_return_val_if_fail (GST_IS_WASAPI2_RING_BUFFER (buf), E_INVALIDARG); g_return_val_if_fail (volume != nullptr, E_INVALIDARG); g_mutex_lock (&buf->volume_lock); - volume_val = buf->volume; - if (buf->volume_object) - hr = buf->volume_object->GetMasterVolume (&volume_val); + *volume = buf->volume; g_mutex_unlock (&buf->volume_lock); - *volume = volume_val; - - return hr; + return S_OK; }
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
.