Projects
Essentials
gstreamer-plugins-bad-codecs
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 9
View file
gstreamer-plugins-bad-codecs.changes
Changed
@@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Fri Dec 23 20:13:27 UTC 2022 - Bjørn Lie <zaitor@opensuse.org> + +- Update to version 1.20.5 + +------------------------------------------------------------------- Wed Oct 26 13:32:09 UTC 2022 - Bjørn Lie <zaitor@opensuse.org> - Update to version 1.20.4
View file
gstreamer-plugins-bad-codecs.spec
Changed
@@ -7,7 +7,7 @@ %define _version 1.20.0 Name: gstreamer-plugins-bad-codecs -Version: 1.20.4 +Version: 1.20.5 Release: 0 Summary: Codecs/plugins for gstreamer-plugins-bad License: LGPL-2.1-or-later
View file
gst-plugins-bad-1.20.4.tar.xz/ChangeLog -> gst-plugins-bad-1.20.5.tar.xz/ChangeLog
Changed
@@ -1,7 +1,450 @@ +=== release 1.20.5 === + +2022-12-19 23:34:42 +0000 Tim-Philipp Müller <tim@centricular.com> + + * NEWS: + * RELEASE: + * gst-plugins-bad.doap: + * meson.build: + Release 1.20.5 + +2022-12-19 23:34:34 +0000 Tim-Philipp Müller <tim@centricular.com> + + * ChangeLog: + Update ChangeLogs for 1.20.5 + +2022-12-16 15:03:12 +0100 Edward Hervey <edward@centricular.com> + + * gst/mpegtsdemux/mpegtsbase.c: + mpegts: Always clear packetizer on DISCONT push mode + If a discontinuity is detected in push mode, we need to clear the cached section + observations since they might have potentially changed. + This was only done properly when operating with TIME segments (dvb, udp, + adaptive demuxers, ...) but not with BYTE segments (such as with custom app/fd + sources). + We still don't want to flush out the PCR observations, since this might be + needed for seeking in push-based BYTE sources. + Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1650 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3600> + +2022-12-17 20:04:01 +0900 Seungha Yang <seungha@centricular.com> + + * sys/d3d11/gstd3d11window_win32.cpp: + d3d11videosink: Fixing focus lost on desktop layout change + Watch all message on the window thread, instead of internal window only. + Otherwise, some global window messages, such as desktop layout change, + wouldn't be handled by our window. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3594> + +2022-12-17 01:01:00 +0530 Nirbheek Chauhan <nirbheek@centricular.com> + + * sys/applemedia/avfvideosrc.m: + avfvideosrc: Report latency when doing screen capture + There is no `device` when doing screen capture, but there is always an + `input`, so use that to decide when we can reply to a latency query. + Without this, the latency query just fails. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3591> + +2022-12-16 21:42:50 +0900 Seungha Yang <seungha@centricular.com> + + * sys/d3d11/gstd3d11window_win32.cpp: + d3d11videosink: Call ShowWindow() from window thread + ... when rendering on external HWND. ShowWindow() will cause + synchronous message passing to window thread and then can be blocked. + At the same time, window thread can wait for GStreamer thread. + Instead of the synchronous call, queue the task to window message + and performs from the window thread. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3588> + +2022-12-15 01:15:10 +0900 Seungha Yang <seungha@centricular.com> + + * sys/d3d11/gstd3d11videosink.cpp: + * sys/d3d11/gstd3d11window.cpp: + * sys/d3d11/gstd3d11window.h: + * sys/d3d11/gstd3d11window_dummy.cpp: + * sys/d3d11/gstd3d11window_win32.cpp: + d3d11videosink: Fix deadlock when parent window is busy + Deadlock sequence: + * From a streaming thread, d3d11videosink sends synchronous message + to the parent window, so that internal (child) window can be + constructed on the parent window's thread + * App thread (parent window thread) is waiting for pipeline's + state change (to GST_STATE_NULL) but streaming thread is + blocked and waiting for app thread + To avoid the deadlock, GstD3D11WindowWin32 should send message + to the parent window asynchronously. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3573> + +2022-12-15 20:11:30 +0900 Seungha Yang <seungha@centricular.com> + + * sys/d3d11/gstd3d11window.cpp: + d3d11videosink: Error out if RTV is unavailable + Add RTV pointer validation + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3573> + +2022-07-03 01:18:19 +0900 Seungha Yang <seungha@centricular.com> + + * sys/d3d11/gstd3d11videosink.cpp: + * sys/d3d11/gstd3d11videosink.h: + d3d11videosink: Protect window with lock at every place + Access to the object should be thread safe to support runtime + property update + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3573> + +2022-10-21 22:46:16 -0500 A. Wilcox <AWilcox@Wilcox-Tech.com> + + * gst-libs/gst/mpegts/gstmpegtsdescriptor.c: + * tests/check/libs/mpegts.c: + mpegts: Handle when iconv doesn't support ISO 6937 + Systems like musl libc don't support ISO 6937 in iconv. This ensures + that the MPEG-TS plugin can cope with that. There is existing support + in the plugin for other methods, so it seems to have been the original + intent anyway. + Fixes: #1314 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3563> + +2022-12-06 11:30:47 +0100 Edward Hervey <edward@centricular.com> + + * gst/mpegtsdemux/mpegtspacketizer.c: + mpegts: Check continuity counter on section streams + This wasn't really done, and is needed in order to detect potential section + changes for sections that have got identical information (such as when switching + between streams that have the same PAT/PMT pid and subtable information). + Other checks exist in tsbase to detect if the "new" PAT/PMT really is an update or not. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3556> + +2022-12-01 19:35:07 +0200 Marek Olejnik <molejnik@fluendo.com> + + * gst-libs/gst/codecs/gsth265decoder.c: + h265decoder: Do not abort when failed to prepare ref pic set + Currently the element calls abort when failed to prepare reference + picture set. This can happent when the input stream is somehow + corrupted, like a rtsp strem with lost packets. Now it will only + return with GST_FLOW_ERROR instead of terminating whole process. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3542> + +2022-12-07 10:21:52 +0200 Sebastian Dröge <sebastian@centricular.com> + + * gst/dvbsubenc/gstdvbsubenc.c: + dvbsubenc: Forward GAP events as-is if we wouldn't produce an end packet and are not in the middle of an existing subtitle + An end packet is only produced once for the last subtitle, so multiple + GAP events between subtitles would result only in a single end packet + and nothing else otherwise. This would potentially starve downstream + then, so instead forward the GAP events in that case. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3536> + +2022-12-05 19:30:43 +0530 Nirbheek Chauhan <nirbheek@centricular.com> + + * sys/dshowvideosink/dshowvideosink.cpp: + directshow: Fix build error with glib 2.75 and newer + Starting with glib 2.75, `NULL` is `nullptr`, which cannot be + implicitly coerced to `0`, unlike `NULL`. So explicitly pass `0`. + ``` + 3206/4524 Compiling C++ object subprojects/gst-plugins-bad/sys/directshow/gstdirectshow.dll.p/dshowvideosink.cpp.obj + FAILED: subprojects/gst-plugins-bad/sys/directshow/gstdirectshow.dll.p/dshowvideosink.cpp.obj + "cl" "-Isubprojects\gst-plugins-bad\sys\directshow\gstdirectshow.dll.p" "-Isubprojects\gst-plugins-bad\sys\directshow" "-I..\subprojects\gst-plugins-bad\sys\directshow" "-Isubprojects\gst-plugins-bad" "-I..\subprojects\gst-plugins-bad" "-Isubprojects\gst-plugins-base\gst-libs" "-I..\subprojects\gst-plugins-base\gst-libs" "-Isubprojects\gstreamer\libs" "-I..\subprojects\gstreamer\libs" "-Isubprojects\gstreamer" "-I..\subprojects\gstreamer" "-Isubprojects\orc" "-I..\subprojects\orc" "-I..\subprojects\gst-plugins-bad\sys\directshow\strmbase\baseclasses" "-Isubprojects\gst-plugins-base\gst-libs\gst\video" "-Isubprojects\gstreamer\gst" "-Isubprojects\gst-plugins-base\gst-libs\gst\audio" "-Isubprojects\gst-plugins-base\gst-libs\gst\tag" "-IC:/gst-install/include/glib-2.0" "-IC:/gst-install/lib/glib-2.0/include" "-IC:/gst-install/include" "/MD" "/nologo" "/showIncludes" "/utf-8" "/W2" "/EHsc" "/O2" "/Zi" "/wd4018" "/wd4146" "/wd4244" "/wd4305" "/utf-8" "/we4002" "/we4003" "/we4013" "/we4020" "/we4027" "/we4029" "/we4033" "/we4045" "/we4047" "/we4053" "/we4062" "/we4098" "/we4101" "/we4189" "/utf-8" "-D_MBCS" "/wd4189" "/wd4456" "/wd4701" "/wd4703" "/wd4706" "/wd4996" "-DHAVE_CONFIG_H" "/Fdsubprojects\gst-plugins-bad\sys\directshow\gstdirectshow.dll.p\dshowvideosink.cpp.pdb" /Fosubprojects/gst-plugins-bad/sys/directshow/gstdirectshow.dll.p/dshowvideosink.cpp.obj "/c" ../subprojects/gst-plugins-bad/sys/directshow/dshowvideosink.cpp + ../subprojects/gst-plugins-bad/sys/directshow/dshowvideosink.cpp(62): warning C5051: attribute 'noinline' requires at least '/std:c++20'; ignored + ../subprojects/gst-plugins-bad/sys/directshow/dshowvideosink.cpp(123): error C2664: 'LRESULT SendMessageA(HWND,UINT,WPARAM,LPARAM)': cannot convert argument 3 from 'nullptr' to 'WPARAM' + ../subprojects/gst-plugins-bad/sys/directshow/dshowvideosink.cpp(123): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type + C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winuser.h(3690): note: see declaration of 'SendMessageA' + ../subprojects/gst-plugins-bad/sys/directshow/dshowvideosink.cpp(635): error C2664: 'BOOL SystemParametersInfoA(UINT,UINT,PVOID,UINT)': cannot convert argument 2 from 'nullptr' to 'UINT' + ../subprojects/gst-plugins-bad/sys/directshow/dshowvideosink.cpp(635): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type + C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winuser.h(13153): note: see declaration of 'SystemParametersInfoA' + ../subprojects/gst-plugins-bad/sys/directshow/dshowvideosink.cpp(1593): error C2664: 'LRESULT SendMessageA(HWND,UINT,WPARAM,LPARAM)': cannot convert argument 3 from 'nullptr' to 'WPARAM' + ../subprojects/gst-plugins-bad/sys/directshow/dshowvideosink.cpp(1593): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type + C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winuser.h(3690): note: see declaration of 'SendMessageA' + ``` + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3533> + +2022-11-29 02:22:50 +0900 Seungha Yang <seungha@centricular.com> + + * sys/mediafoundation/gstmfvideosrc.c: + mfvideosrc: Fix buffer leak + The allocated buffer should be released + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3496> + +2022-11-29 02:10:42 +0900 Seungha Yang <seungha@centricular.com> + + * sys/mediafoundation/gstmfsourcereader.cpp: + * sys/mediafoundation/gstwin32devicewatcher.cpp: + mediafoundation: Chain up from GObject::constructed + ... so that GstTracer can trace it + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3496> + +2022-11-29 02:06:11 +0900 Seungha Yang <seungha@centricular.com> + + * sys/d3d11/gstd3d11videosink.cpp: + * sys/d3d11/gstd3d11window_corewindow.cpp: + * sys/d3d11/gstd3d11window_dummy.cpp: + * sys/d3d11/gstd3d11window_swapchainpanel.cpp: + * sys/d3d11/gstd3d11window_win32.cpp: + d3d11: Use correct ref/unref methods + Those objects are GstObject subclasses + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3496> + +2022-11-25 18:38:27 +0800 He Junyan <junyan.he@intel.com> + + * gst-libs/gst/codecparsers/gsth264parser.c: + h264parser: Fix a typo in pred_weight_table parsing. + When setting default values, the reference list number of l1 is wrong. + Fix: https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/336 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3468> + +2022-11-21 19:40:35 +0200 Sebastian Dröge <sebastian@centricular.com> + + * gst/dvbsubenc/gstdvbsubenc-util.c: + * gst/dvbsubenc/gstdvbsubenc.c: + * gst/dvbsubenc/gstdvbsubenc.h: + dvbsubenc: Write Display Definition Segment if a non-default width/height is used + Otherwise it can't be rendered by dvbsuboverlay or ffmpeg at least. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3459> + +2022-11-16 09:42:08 +0100 Edward Hervey <bilboed@bilboed.com> + + * gst/mpegtsdemux/mpegtspacketizer.c: + Revert "mpegtspacketizer: memcmp potentially seen_before data" + This reverts commit fcad4cc646a23e4e621ec5e8485958ab78d98090. + This was wrong is so many ways. + * The memcmp was badly used (it should use == 0 to check the data is identical, + and not != 0) + * There was no boundary checks on the present stream section_data when passing + it to memcmp. + * The return value should have been TRUE (i.e. we have done all checks, none of + them failed, therefore the section has been seen before) + * stream->section_data would *always* be NULL if the section had already been + processed + Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1559 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3427> + +2022-11-16 09:29:59 +0100 Edward Hervey <edward@centricular.com> + + * gst/mpegtsdemux/mpegtsbase.c: + mpegts: Check is program is identical before updating + There is no need to update the program if it's identical :) + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3427> + +2022-11-08 19:26:39 +0900 Seungha Yang <seungha@centricular.com> + + * sys/d3d11/gstd3d11screencapturedevice.cpp: + * sys/d3d11/gstd3d11screencapturesrc.cpp: + d3d11screencapturesrc: Specify PAR 1/1 to template caps + ... otherwise PAR can be wrongly signalled during the negotiation + Fixing below pipeline when desktop resolution is not 640x480 + gst-launch-1.0.exe \ + d3d11screencapturesrc ! videoscale ! + video/x-raw,width=640,height=480,pixel-aspect-ratio=1/1 ! d3d11videosink + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3372> + +2022-11-15 00:11:15 +1100 Jan Schmidt <jan@centricular.com> + + * ext/aes/gstaesdec.c: + aesdec: Fix padding removal for per-buffer-padding=FALSE + When per-buffer-padding is FALSE, the OpenSSL context needs + to be told to remove any padding at the end of the ciphertext + Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1243 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3411> + +2021-12-01 16:23:41 +0100 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com> + + * gst/rtmp2/gstrtmp2sink.c: + * gst/rtmp2/gstrtmp2src.c: + * gst/rtmp2/rtmp/rtmpclient.c: + rtmp2: Improve error messages + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368> + +2021-12-01 16:04:24 +0100 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com> + + * gst/rtmp2/gstrtmp2sink.c: + * gst/rtmp2/gstrtmp2src.c: + * gst/rtmp2/rtmp/rtmpclient.c: + * gst/rtmp2/rtmp/rtmpconnection.c: + rtmp2/connection: Pass triggering GError in 'error' signal + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368> + +2021-12-01 16:02:53 +0100 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com> + + * gst/rtmp2/rtmp/rtmpconnection.c: + rtmp2/connection: Pass triggering GError to _emit_error + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368> + +2021-12-01 16:01:10 +0100 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com> + + * gst/rtmp2/rtmp/rtmpconnection.c: + rtmp2/connection: Discern reasons for cancelling all commands + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368> + +2021-12-01 15:53:13 +0100 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com> + + * gst/rtmp2/rtmp/rtmpconnection.c: + rtmp2/connection: Handle EOF like error + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368> + +2021-12-01 15:49:22 +0100 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com> + + * gst/rtmp2/rtmp/rtmpclient.c: + rtmp2/client: Make sure 'salt' is not NULL + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368> + +2021-12-01 15:46:42 +0100 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com> + + * gst/rtmp2/rtmp/rtmpclient.c: + rtmp2/client: Make sure 'reason' is not NULL + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368> + +2021-12-01 16:13:42 +0100 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com> + + * gst/rtmp2/rtmp/rtmpclient.c: + rtmp2/client: Make sure 'desc' is not NULL + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368> + +2021-12-01 16:11:31 +0100 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com> + + * gst/rtmp2/rtmp/rtmpclient.c: + rtmp2/client: Make sure 'code' is not NULL + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368> + +2022-11-06 03:26:31 +0900 Seungha Yang <seungha@centricular.com> + + * sys/d3d11/gstd3d11window.cpp: + d3d11videosink: Always clear back buffer on resize + Swapchain may not need to be resized if the size of backbuffer + is equal to the previous size. Then previously rendered frame will be stay + on the screen. Do clear back buffer whenever resize() is called + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3342> + +2022-07-27 15:59:35 +0200 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com> + + * ext/srt/gstsrtobject.c: + srt: Remove callers for which srt_bstats fails + This keeps them from accumulating in the element and in the stats while + the sink is not being fed, as long as we at least periodically grab + stats. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3329> + +2022-07-29 11:53:18 +0200 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com> + + * ext/srt/gstsrtobject.c: + srt: Use simpler list operations for callers + Avoid `g_list_append` and `g_list_remove` (which have to scan the list) + and replace them with `g_list_prepend` and `g_list_delete_link`. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3329> + +2020-11-10 10:06:37 +0100 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com> + + * ext/srt/gstsrtobject.c: + srt: Clean up poll/sock lifecycle + Make sure `srtobject->poll_id` is never invalid as long as `srtobject` + exists. Only remove our caller socket from it when the socket becomes + invalid. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3329> + +2022-06-08 16:35:54 +0200 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com> + + * ext/srt/gstsrtobject.c: + srt: Clean up error handling + - Make the srt_epoll_wait loops more uniform. + - Error only via GError when possible; let the element send the error + message. Avoids a second error message. + - Return 0 when cancelled. Avoids an error message from the element. + - Don't send an error message from send_headers when we're a server + sink. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3329> + +2022-10-11 11:14:59 +0200 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com> + + * ext/srt/gstsrtobject.c: + srt: Simplify socket stats + Don't hide stats depending on whether we're a sending or receiving + socket. While we're here, add some more debug logs. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3329> + +2020-10-05 19:50:13 +0200 Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com> + + * ext/srt/gstsrtobject.c: + * ext/srt/gstsrtobject.h: + srt: Replace stats accumulation with naive byte counting + srt_bstats cannot be used to get the stats of closed connections, so the + best we can do is keep the running count ourselves. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3329> + +2022-10-25 08:14:18 -0400 Nicolas Dufresne <nicolas.dufresne@collabora.com> + + * gst/codecalpha/gstalphacombine.c: + alphacombine: Add missing query handler for gaps + The gap handling was in place, but there was no event handler to trigger it. + Implement the alpha sink event handler for the gaps. This fixes handling of + valid streams which may not refresh the alpha frames for every video frames. + It will also allow a clean error if the stream was missing the initial + alpha frame, at least until we find a better way to handle these + invalid frames. + Related to #1518 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3279> + +2022-10-26 11:47:43 +0200 Ignacio Casal Quinteiro <qignacio@amazon.com> + + * sys/applemedia/avfdeviceprovider.m: + avfdeviceprovider: do not leak the properties + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3278> + +2022-10-21 21:50:01 +0530 Nirbheek Chauhan <nirbheek@centricular.com> + + * gst-libs/gst/vulkan/cocoa/gstvkcocoa_utils.h: + * gst-libs/gst/vulkan/cocoa/gstvkwindow_cocoa.m: + * gst-libs/gst/vulkan/ios/gstvkios_utils.h: + * gst-libs/gst/vulkan/ios/gstvkwindow_ios.m: + gl/vulkan: Fix static linking on macOS + duplicate symbol '__invoke_on_main' in: + /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstvulkan-1.0.a(cocoa_gstvkwindow_cocoa.m.o) + /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstgl-1.0.a(cocoa_gstglwindow_cocoa.m.o) + ld: 1 duplicate symbol for architecture x86_64 + clang: error: linker command failed with exit code 1 (use -v to see invocation) + Also make the same change in iOS for consistency. + Continuation of https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1132 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3263> + +2022-10-21 10:50:36 +1100 Matthew Waters <matthew@centricular.com> + + * ext/webrtc/gstwebrtcbin.c: + webrtcbin: also add rtcp-fb ccm fir for video mlines by default + In addition to the 'nack pli' already added. Both are supported by + rtpbin/rtpsession by default already. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3247> + +2022-10-14 18:51:43 +0200 Mathieu Duponchelle <mathieu@centricular.com> + + * ext/webrtc/gstwebrtcice.c: + webrtc/nice: fix small leak of split strings + g_strfreev previously stopped at our manual NULL-termination. Fix by + restoring the pointer after joining. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3190> + +2022-10-14 16:21:07 -0400 Arun Raghavan <arun@asymptotic.io> + + * gst/rtmp2/gstrtmp2sink.c: + rtmp2sink: Correctly return GST_FLOW_ERROR on error + If there is an error while connecting, the streaming task will be stopped, and + is_running() will be false, causing a GST_FLOW_FLUSHING to be returned. Instead, + we perform the error check (!self->connection) first, to return an error if + that's what occured. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3192> + +2022-10-07 08:30:05 +0200 Wojciech Kapsa <wojciech.kapsa@medvc.eu> + + * sys/decklink/gstdecklinkvideosrc.cpp: + * sys/decklink/gstdecklinkvideosrc.h: + decklink: reset calculation of gst_decklink_video_src_update_time_mapping on no_signal. When the HDMI cable was disconnected for a long time, the calculation took too much time. SDI cable works fine. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3168> + +2022-10-12 18:40:25 +0100 Tim-Philipp Müller <tim@centricular.com> + + * meson.build: + Back to development + === release 1.20.4 === 2022-10-12 16:39:47 +0100 Tim-Philipp Müller <tim@centricular.com> + * ChangeLog: * NEWS: * RELEASE: * gst-plugins-bad.doap:
View file
gst-plugins-bad-1.20.4.tar.xz/NEWS -> gst-plugins-bad-1.20.5.tar.xz/NEWS
Changed
@@ -2,13 +2,13 @@ GStreamer 1.20.0 was originally released on 3 February 2022. -The latest bug-fix release in the 1.20 series is 1.20.4 and was released -on 12 October 2022. +The latest bug-fix release in the 1.20 series is 1.20.5 and was released +on 19 December 2022. See https://gstreamer.freedesktop.org/releases/1.20/ for the latest version of this document. -Last updated: Wednesday 12 October 2022, 15:00 UTC (log) +Last updated: Monday 19 December 2022, 19:00 UTC (log) Introduction @@ -1791,6 +1791,13 @@ Known Issues +- GStreamer may fail to build the hotdoc documentation with the Meson + 0.64.0 release owing to a Meson bug. This should only affect systems + where hotdoc is installed, and will be fixed in Meson 0.64.1 by this + Meson PR in combination with this GStreamer MR. In the meantime, + users can pass -Ddoc=disabledor downgrade to an older Meson version + (< 0.64.0). + - nothing in particular at this point (but also see possibly breaking changes section above) @@ -2530,6 +2537,7 @@ chroma (Y41B, YUV9, YVU9 and IYU9) - macOS build and packaging fixes, in particular fix finding of gio modules on macOS for https/TLS support +- Fix consuming of the macOS package as a framework in XCode - Performance improvements - Miscellaneous bug fixes, memory leak fixes, and other stability and reliability improvements @@ -2783,6 +2791,252 @@ - List of Merge Requests applied in 1.20.4 - List of Issues fixed in 1.20.4 +1.20.5 + +The fifth 1.20 bug-fix release (1.20.5) was released on 19 December +2022. + +This release only contains bugfixes and it should be safe to upgrade +from 1.20.x. + +Highlighted bugfixes in 1.20.5 + +- systemclock waiting fixes for certain 32-bit platforms/libcs +- alphacombine: robustness improvements for corner case scenarios +- avfvideosrc: Report latency when doing screen capture +- d3d11videosink: various thread-safety and stability fixes +- decklink: fix performance issue when HDMI signal has been lost for a + long time +- flacparse: Fix handling of headers advertising 32 bits per sample +- mpegts: Handle when iconv doesn’t support ISO 6937 (e.g. musl libc) +- opengl: fix automatic dispmanx detection for rpi4 and fix usage of + eglCreate/DestroyImage +- opusdec: Various channel-related fixes +- textrender: event handling fixes, esp. for GAP event +- subparse: Fix non-closed tag handling +- videoscale: fix handling of unknown buffer metas +- videosink: reverse playback handling fixes +- qtmux: Prefill mode fixes, especially for raw audio +- multiudpsink: allow binding to IPv6 address +- rtspsrc: Fix usage of IPv6 connections in SETUP +- rtspsrc: Only EOS on timeout if all streams are timed out/EOS +- splitmuxsrc: fix playback stall if there are unlinked pads +- v4l2: Fix SIGSEGV on state change during format changes +- wavparse robustness fixes +- Fix static linking on macOS (opengl, vulkan) +- gstreamer-vaapi: fix headless build against mesa >= 22.3.0 +- GStreamer Editing Services library: Fix build with tools disabled +- webrtc example/demo fixes +- unit test fixes for aesdec and rtpjitterbuffer +- Cerbero: Fix ios cross-compile with cmake on M1; some recipe updates + and other build fixes +- Binary packages: pkg-config file fixes for various recipes (ffmpeg, + taglib, gstreamer) +- Binary packages: Enable high bitdepth support for libvpx (VP8/VP9 + encoding/decoding) +- Binary packages: ship aes plugin +- Miscellaneous bug fixes, memory leak fixes, and other stability and + reliability improvements +- Performance improvements + +gstreamer + +- allocator: Copy allocator name in gst_allocator_register() +- miniobject: support higher refcount values +- pads: Fix non-serialized sticky event push, e.g. instant change rate + events +- padtemplate: Fix annotations +- systemclock: Use futex_time64 syscall on x32 and other platforms + that always… +- Fix build of 1.20 branch with Meson 0.64.1 for those who have hotdoc + installed on their system. +- meson: fix check for pthread_setname_np() +- -Wimplicit-function-declaration in pthread_setname_np check (missing + _GNU_SOURCE) +- gst-inspect: Don’t leak list + +Core Elements + +- concat: Properly propagate EOS seqnum +- fakesrc: avoid time overflow with datarate + +gst-plugins-base + +- audioconvert, audioresample, audiofilter: fix divide by 0 for input + buffer without caps +- cdparanoia: Ignore compiler warning coming from the cdparanoia + header +- oggdemux, parsebin: More leak fixes +- opengl: fix automatic dispmanx detection for rpi4 +- opengl: Fix usage of eglCreate/DestroyImage +- opengl: Fix static linking on macOS +- opusdec: Various channel-related fixes +- textrender: Negotiate caps on a GAP event if none were negotiated + yet +- textrender: Don’t blindly forward all events and don’t blindly + forward all events +- timeoverlay: fix pad leak +- oggdemux: Don’t leak incoming EOS event +- subparse: Fix non-closed tag handling. +- videodecoder: Only post latency message if it changed +- videoscale: buffer meta handling fixes (NULL-terminate array of + valid meta tags) +- videosink: Don’t return unknown end-time from get_times() +- Bump core requirement in 1.20 branch to 1.20.4 + +Tools + +- gst-play: Don’t leak the stream collection + +gst-plugins-good + +- flacparse: Fix handling of headers advertising 32bps +- qt5: deactivate context if fill_info fails +- qt5: initialize GError properly in gst_qt_get_gl_wrapcontext() +- qtdemux: check return value from gst_structure_get in PIFF box +- qtdemux: use unsigned int types to store result of QT_UINT32 +- qtmux: Prefill mode fixes +- oss4: Fix debug category initialization +- multiudpsink: allow binding to IPv6 address +- rtpjitterbuffer tests: Cast drop-messages-interval type properly + (fixing it on 32-bit architectures) +- rtspsrc: fix seek event leaks +- rtspsrc: Don’t replace 404 errors with “no auth protocol found” +- rtspsrc: Only EOS on timeout if all streams are timed out/EOS +- rtspsrc: Fix usage of IPv6 connections in SETUP +- splitmuxsrc: don’t queue data on unlinked pads +- v4l2: Fix SIGSEGV on ‘change state’ during ‘format change’ +- v4l2videodec: Fix activation of internal pool +- wavparse: Avoid occasional crash due to referencing freed buffer. +- wavparse: Fix crash that occurs in push mode when header chunks are + corrupted in certain ways. + +gst-plugins-bad + +- aesdec: Fix padding removal for per-buffer-padding=FALSE +- aesdec test failing in gst-plugins-bad +- alphacombine: Add missing query handler for gaps +- avfdeviceprovider: do not leak the properties +- avfvideosrc: Report latency when doing screen capture +- d3d11screencapturesrc: Specify PAR 1/1 to template caps +- d3d11videosink: Fixing focus lost on desktop layout change +- d3d11videosink: Call ShowWindow() from window thread +- d3d11videosink: Fix deadlock when parent window is busy +- d3d11videosink: Always clear back buffer on resize +- decklink: reset calculation of time_mapping to fix clipping HDMI + video +- directshow: Fix build error with glib 2.75 and newer +- dvbsubenc: Forward GAP events as-is if we wouldn’t produce an end + packet and… +- dvbsubenc: Write Display Definition Segment if a non-default + width/height is used +- h265decoder: Do not abort when failed to prepare ref pic set +- h264parser: Fix a typo in pred_weight_table parsing. +- mediafoundation, d3d11: Fix memory leak and make leak tracer happy +- mpegts: Handle when iconv doesn’t support ISO 6937 (e.g. musl libc) +- mpegts: Check continuity counter on section streams +- mpegts: Revert “mpegtspacketizer: memcmp potentially seen_before + data” +- mpegtspacketizer: memcmp potentially seen_before data +- mpegtsdemux: Always clear packetizer on DISCONT push mode +- srt: various fixes - improve stats and error handling +- rtmp2: Improve error messages +- rtmp2sink: Correctly return GST_FLOW_ERROR on error +- vulkan: Fix static linking on macOS +- webrtcbin: also add rtcp-fb ccm fir for video mlines by default +- webrtc/nice: fix small leak of split strings + +gst-plugins-ugly + +- No changes + +gst-libav + +- avdec_h265: Fix endless renegotiation with alternate interlacing +- avviddec: Avoid flushing on framerate changes + +gst-rtsp-server + +- rtsp-server: Free client if no connection could be created + +gstreamer-vaapi + +- vaapi: prefix internal USE_X11 define to fix build with mesa 22.3.0 +- vaapi: libs: context: use queried value for attrib +- gstreamer-vaapi cannot be built without X11 with recent mesa + +gstreamer-sharp + +- No changes + +gst-omx + +- No changes + +gst-python + +- No changes + +gst-editing-services + +- Fix building ges with tools disabled +- Fix leaks and minor races in GES + +gst-examples: + +- webrtc: Fix double free in webrtc-recvonly-h264 demo +- webrtc: Fix critical in webrtc-recvonly-h264 example +- webrtc/signalling examples: Fix compatibility with Python 3.10 + +Development build environment + gst-full build + +- No major changes + +Cerbero build tool and packaging changes in 1.20.5 + +- oven: output status line at least every minute +- Unconditionally set CMAKE_SYSTEM_NAME on Windows +- Fix ios cross-compile with cmake on M1 +- Speed up downloads on Windows drastically +- Fix tar usage on bsdtar and print progress while compressing +- Actually print the sha for which the cache was not found + +Recipes + +- ffmpeg: add patch to generate the pc files properly +- taglib: add patch to generate the pc files properly +- fontconfig: update to 2.14.1 +- Windows: Crash on GStreamer 1.20.x x86_64 MSVC + MS-Windows due to + libfontconfig fonts.conf file invalid. +- openssl: Fix compile errors on upgrades +- moltenvk: Also ship the static library on macOS +- gstreamer: Add some missing pkgconfig files +- gst-plugins-good: Fix post_install failure when qt5 is enabled +- gst-plugins-bad: Ship AES plugin +- libvpx: Enable high bitdepth support +- openssl: update to 1.1.1s +- glib: Update patch to auto-detect modules on macOS + +Contributors to 1.20.5 + +Aleksandr Slobodeniuk, Arun Raghavan, A. Wilcox, Bo Elmgreen, Boyuan +Zhang, Bunio FH, Célestin Marot, Devin Anderson, Edward Hervey, He +Junyan, Ignacio Casal Quinteiro, Jacek Skiba, Jan Alexander Steffens +(heftig), Jan Schmidt, Jonas Bonn, Jordan Petridis, Justin Chadwell, +Linus Svensson, Marek Olejnik, Mathieu Duponchelle, Matthew Waters, +Nicolas Dufresne, Nirbheek Chauhan, Patrick Griffis, Pawel Stawicki, +Philippe Normand, Ruben Gonzalez, Sam Van Den Berge, Sebastian Dröge, +Seungha Yang, Stéphane Cerveau, Tim-Philipp Müller, Vivia Nikolaidou, +Wojciech Kapsa, Xavier Claessens, + +… and many others who have contributed bug reports, translations, sent +suggestions or helped testing. Thank you all! + +List of merge requests and issues fixed in 1.20.5 + +- List of Merge Requests applied in 1.20.5 +- List of Issues fixed in 1.20.5 + Schedule for 1.22 Our next major feature release will be 1.22, and 1.21 will be the @@ -2790,7 +3044,7 @@ development of 1.21/1.22 will happen in the git main branch. The plan for the 1.22 development cycle is now confirmed, and we aim for -a 1.22.0 release in December 2022. +a 1.22.0 release in December 2022 or early January 2023. 1.22 will be backwards-compatible to the stable 1.20, 1.18, 1.16, 1.14, 1.12, 1.10, 1.8, 1.6, 1.4, 1.2 and 1.0 release series.
View file
gst-plugins-bad-1.20.4.tar.xz/RELEASE -> gst-plugins-bad-1.20.5.tar.xz/RELEASE
Changed
@@ -1,4 +1,4 @@ -This is GStreamer gst-plugins-bad 1.20.4. +This is GStreamer gst-plugins-bad 1.20.5. 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.20.4.tar.xz/ext/aes/gstaesdec.c -> gst-plugins-bad-1.20.5.tar.xz/ext/aes/gstaesdec.c
Changed
@@ -583,11 +583,10 @@ GST_ERROR_OBJECT (filter, "Could not initialize openssl cipher"); return FALSE; } - if (filter->per_buffer_padding) { - if (!EVP_CIPHER_CTX_set_padding (filter->evp_ctx, 0)) { - GST_ERROR_OBJECT (filter, "Could not set padding"); - return FALSE; - } + if (!EVP_CIPHER_CTX_set_padding (filter->evp_ctx, + filter->per_buffer_padding ? 0 : 1)) { + GST_ERROR_OBJECT (filter, "Could not set padding"); + return FALSE; } return TRUE;
View file
gst-plugins-bad-1.20.4.tar.xz/ext/srt/gstsrtobject.c -> gst-plugins-bad-1.20.5.tar.xz/ext/srt/gstsrtobject.c
Changed
@@ -38,11 +38,13 @@ #define GST_CAT_DEFAULT gst_debug_srtobject #if SRT_VERSION_VALUE > 0x10402 -#define SRTSOCK_ERROR_DEBUG ("libsrt reported: %s", srt_rejectreason_str (reason)) +#define REASON_FORMAT "s" +#define REASON_ARGS(reason) srt_rejectreason_str (reason) #else /* srt_rejectreason_str() is unavailable in libsrt 1.4.2 and prior due to * unexported symbol. See https://github.com/Haivision/srt/pull/1728. */ -#define SRTSOCK_ERROR_DEBUG ("libsrt reported reject reason code %d", reason) +#define REASON_FORMAT "s %d" +#define REASON_ARGS(reason) "reject reason code", (reason) #endif /* Define options added in later revisions */ @@ -52,10 +54,6 @@ #define SRTO_RETRANSMITALGO 61 #endif -#define ELEMENT_WARNING_SRTSOCK_ERROR(code, reason) \ - GST_ELEMENT_WARNING (srtobject->element, RESOURCE, code, \ - ("Error on SRT socket. Trying to reconnect."), SRTSOCK_ERROR_DEBUG) - enum { PROP_URI = 1, @@ -82,9 +80,6 @@ gboolean sent_headers; } SRTCaller; -static GstStructure *gst_srt_object_accumulate_stats (GstSRTObject * srtobject, - SRTSOCKET srtsock); - static SRTCaller * srt_caller_new (void) { @@ -118,14 +113,6 @@ static void srt_caller_signal_removed (SRTCaller * caller, GstSRTObject * srtobject) { - GstStructure *stats; - - stats = gst_srt_object_accumulate_stats (srtobject, caller->sock); - - /* FIXME: These are the final statistics for the caller before we close its - * socket. Deliver the stats to the app before we throw them away. */ - gst_structure_free (stats); - g_signal_emit_by_name (srtobject->element, "caller-removed", 0, caller->sockaddr); } @@ -376,11 +363,12 @@ { g_return_if_fail (srtobject != NULL); - if (srtobject->poll_id != SRT_ERROR) { - srt_epoll_release (srtobject->poll_id); - srtobject->poll_id = SRT_ERROR; + if (srtobject->sock != SRT_INVALID_SOCK) { + srt_close (srtobject->sock); } + srt_epoll_release (srtobject->poll_id); + g_cond_clear (&srtobject->sock_cond); GST_DEBUG_OBJECT (srtobject->element, "Destroying srtobject"); @@ -935,19 +923,19 @@ GST_DEBUG_OBJECT (srtobject->element, "Waiting a request from caller"); - if (srt_epoll_wait (srtobject->listener_poll_id, &rsock, - &rsocklen, 0, 0, poll_timeout, NULL, 0, NULL, 0) < 0) { + if (srt_epoll_wait (srtobject->listener_poll_id, &rsock, &rsocklen, 0, 0, + poll_timeout, NULL, 0, NULL, 0) < 0) { gint srt_errno = srt_getlasterror (NULL); if (srtobject->listener_poll_id == SRT_ERROR) return NULL; - if (srt_errno == SRT_ETIMEOUT) { + + if (srt_errno == SRT_ETIMEOUT) continue; - } else { - GST_ELEMENT_ERROR (srtobject->element, RESOURCE, FAILED, - ("abort polling: %s", srt_getlasterror_str ()), (NULL)); - return NULL; - } + + GST_ELEMENT_ERROR (srtobject->element, RESOURCE, FAILED, + ("abort polling: %s", srt_getlasterror_str ()), (NULL)); + return NULL; } caller_sock = @@ -985,7 +973,7 @@ caller->sock); g_mutex_lock (&srtobject->sock_lock); - srtobject->callers = g_list_append (srtobject->callers, caller); + srtobject->callers = g_list_prepend (srtobject->callers, caller); g_cond_signal (&srtobject->sock_cond); g_mutex_unlock (&srtobject->sock_lock); @@ -1183,7 +1171,7 @@ if (sock == SRT_INVALID_SOCK) { g_set_error (error, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_INIT, "%s", srt_getlasterror_str ()); - goto failed; + return FALSE; } if (!gst_srt_object_set_common_params (sock, srtobject, error)) { @@ -1267,6 +1255,7 @@ if (srt_connect (sock, sa, sa_len) == SRT_ERROR) { g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_OPEN_READ, "%s", srt_getlasterror_str ()); + srt_epoll_remove_usock (srtobject->poll_id, sock); goto failed; } @@ -1275,18 +1264,7 @@ return TRUE; failed: - - if (srtobject->poll_id != SRT_ERROR) { - srt_epoll_release (srtobject->poll_id); - } - - if (sock != SRT_INVALID_SOCK) { - srt_close (sock); - } - - srtobject->poll_id = SRT_ERROR; - srtobject->sock = SRT_INVALID_SOCK; - + srt_close (sock); return FALSE; } @@ -1383,7 +1361,7 @@ gst_srt_object_open (GstSRTObject * srtobject, GCancellable * cancellable, GError ** error) { - srtobject->previous_bytes = 0; + srtobject->bytes = 0; return gst_srt_object_open_internal (srtobject, cancellable, error); } @@ -1394,17 +1372,7 @@ g_mutex_lock (&srtobject->sock_lock); if (srtobject->sock != SRT_INVALID_SOCK) { - GstStructure *stats; - - if (srtobject->poll_id != SRT_ERROR) { - srt_epoll_remove_usock (srtobject->poll_id, srtobject->sock); - } - - stats = gst_srt_object_accumulate_stats (srtobject, srtobject->sock); - - /* FIXME: These are the final statistics for the socket before we close it. - * Deliver the stats to the app before we throw them away. */ - gst_structure_free (stats); + srt_epoll_remove_usock (srtobject->poll_id, srtobject->sock); GST_DEBUG_OBJECT (srtobject->element, "Closing SRT socket (0x%x)", srtobject->sock); @@ -1452,33 +1420,25 @@ static gboolean gst_srt_object_wait_caller (GstSRTObject * srtobject, - GCancellable * cancellable, GError ** error) + GCancellable * cancellable) { gboolean ret; g_mutex_lock (&srtobject->sock_lock); - if (srtobject->callers == NULL) { + ret = (srtobject->callers != NULL); + if (!ret) { GST_INFO_OBJECT (srtobject->element, "Waiting for connection"); - - while (!g_cancellable_is_cancelled (cancellable)) { - ret = (srtobject->callers != NULL); - if (ret) { - GST_DEBUG_OBJECT (srtobject->element, "Got a connection"); - break; - } - + while (!ret && !g_cancellable_is_cancelled (cancellable)) { g_cond_wait (&srtobject->sock_cond, &srtobject->sock_lock); + ret = (srtobject->callers != NULL); } - } else { - ret = TRUE; } g_mutex_unlock (&srtobject->sock_lock); - if (!ret) { - g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_FAILED, - "Canceled waiting for a connection."); + if (ret) { + GST_DEBUG_OBJECT (srtobject->element, "Got a connection"); } return ret; @@ -1511,8 +1471,8 @@ GST_OBJECT_UNLOCK (srtobject->element); if (connection_mode == GST_SRT_CONNECTION_MODE_LISTENER) { - if (!gst_srt_object_wait_caller (srtobject, cancellable, error)) - return -1; + if (!gst_srt_object_wait_caller (srtobject, cancellable)) + return 0; g_mutex_lock (&srtobject->sock_lock); if (srtobject->callers) { @@ -1538,34 +1498,48 @@ poll_timeout, NULL, 0, NULL, 0) < 0) { gint srt_errno = srt_getlasterror (NULL); - if (srt_errno != SRT_ETIMEOUT) { +#if SRT_VERSION_VALUE >= 0x010402 + if (srt_errno == SRT_EPOLLEMPTY) return 0; - } - continue; +#endif + + if (srt_errno == SRT_ETIMEOUT) + continue; + + g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_WRITE, + "Failed to poll socket: %s", srt_getlasterror_str ()); + return -1; } if (wsocklen == 1 && rsocklen == 1) { /* Socket reported in wsock AND rsock signifies an error. */ gint reason = srt_getrejectreason (wsock); - gboolean is_auth_error = (reason == SRT_REJ_BADSECRET - || reason == SRT_REJ_UNSECURE); - if (is_auth_error) { - ELEMENT_WARNING_SRTSOCK_ERROR (NOT_AUTHORIZED, reason); - } + if (reason == SRT_REJ_BADSECRET || reason == SRT_REJ_UNSECURE) { + if (connection_mode == GST_SRT_CONNECTION_MODE_LISTENER) { + GST_ELEMENT_WARNING (srtobject->element, RESOURCE, NOT_AUTHORIZED, + ("Caller failed to authenticate: %" REASON_FORMAT, + REASON_ARGS (reason)), (NULL)); + return 0; + } - if (connection_mode == GST_SRT_CONNECTION_MODE_LISTENER) { - /* Caller has disappeared. */ - return 0; + GST_ELEMENT_WARNING (srtobject->element, RESOURCE, NOT_AUTHORIZED, + ("Failed to authenticate: %" REASON_FORMAT ". Trying to reconnect", + REASON_ARGS (reason)), (NULL)); } else { - if (!is_auth_error) { - ELEMENT_WARNING_SRTSOCK_ERROR (READ, reason); + if (connection_mode == GST_SRT_CONNECTION_MODE_LISTENER) { + /* Caller has disappeared. */ + return 0; } - gst_srt_object_close (srtobject); - if (!gst_srt_object_open_internal (srtobject, cancellable, error)) { - return -1; - } + GST_ELEMENT_WARNING (srtobject->element, RESOURCE, READ, + ("Error on SRT socket: %" REASON_FORMAT ". Trying to reconnect", + REASON_ARGS (reason)), (NULL)); + } + + gst_srt_object_close (srtobject); + if (!gst_srt_object_open_internal (srtobject, cancellable, error)) { + return -1; } continue; } @@ -1584,6 +1558,8 @@ return -1; } } + + srtobject->bytes += len; break; } @@ -1597,7 +1573,7 @@ /* Removing all socket descriptors from the monitoring list * wakes up SRT's threads. We only have one to remove. */ - if (srtobject->sock != SRT_INVALID_SOCK && srtobject->poll_id != SRT_ERROR) { + if (srtobject->sock != SRT_INVALID_SOCK) { srt_epoll_remove_usock (srtobject->poll_id, srtobject->sock); } @@ -1615,7 +1591,7 @@ static gboolean gst_srt_object_send_headers (GstSRTObject * srtobject, SRTSOCKET sock, gint poll_id, gint poll_timeout, GstBufferList * headers, - GCancellable * cancellable) + GCancellable * cancellable, GError ** error) { guint size, i; @@ -1629,36 +1605,51 @@ for (i = 0; i < size; i++) { SRTSOCKET wsock = sock; gint wsocklen = 1; + gint sent; GstBuffer *buffer = gst_buffer_list_get (headers, i); GstMapInfo mapinfo; if (g_cancellable_is_cancelled (cancellable)) { - return FALSE; + return TRUE; } - if (poll_id > 0 && srt_epoll_wait (poll_id, 0, 0, &wsock, - &wsocklen, poll_timeout, NULL, 0, NULL, 0) < 0) { - continue; + if (poll_id >= 0 && srt_epoll_wait (poll_id, 0, 0, &wsock, &wsocklen, + poll_timeout, NULL, 0, NULL, 0) < 0) { + gint srt_errno = srt_getlasterror (NULL); + +#if SRT_VERSION_VALUE >= 0x010402 + if (srt_errno == SRT_EPOLLEMPTY) + return TRUE; +#endif + + if (srt_errno == SRT_ETIMEOUT) + continue; + + g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_WRITE, + "Failed to poll socket: %s", srt_getlasterror_str ()); + return FALSE; } GST_TRACE_OBJECT (srtobject->element, "sending header %u %" GST_PTR_FORMAT, i, buffer); if (!gst_buffer_map (buffer, &mapinfo, GST_MAP_READ)) { - GST_ELEMENT_ERROR (srtobject->element, RESOURCE, READ, - ("Could not map the input stream"), (NULL)); + g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_WRITE, + "Failed to map header buffer"); return FALSE; } - if (srt_sendmsg2 (wsock, (char *) mapinfo.data, mapinfo.size, - 0) == SRT_ERROR) { - GST_ELEMENT_ERROR (srtobject->element, RESOURCE, WRITE, NULL, - ("%s", srt_getlasterror_str ())); + sent = srt_sendmsg2 (wsock, (char *) mapinfo.data, mapinfo.size, 0); + if (sent == SRT_ERROR) { + g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_WRITE, "%s", + srt_getlasterror_str ()); gst_buffer_unmap (buffer, &mapinfo); return FALSE; } + srtobject->bytes += sent; + gst_buffer_unmap (buffer, &mapinfo); } @@ -1668,30 +1659,36 @@ static gssize gst_srt_object_write_to_callers (GstSRTObject * srtobject, GstBufferList * headers, - const GstMapInfo * mapinfo, GCancellable * cancellable, GError ** error) + const GstMapInfo * mapinfo, GCancellable * cancellable) { - GList *callers; + GList *item, *next; g_mutex_lock (&srtobject->sock_lock); - callers = srtobject->callers; - while (callers != NULL) { + for (item = srtobject->callers, next = NULL; item; item = next) { + SRTCaller *caller = item->data; gssize len = 0; const guint8 *msg = mapinfo->data; gint sent; gint payload_size, optlen = sizeof (payload_size); - SRTCaller *caller = callers->data; - callers = callers->next; + next = item->next; if (g_cancellable_is_cancelled (cancellable)) { goto cancelled; } if (!caller->sent_headers) { - if (!gst_srt_object_send_headers (srtobject, caller->sock, -1, - -1, headers, cancellable)) { + GError *error = NULL; + + if (!gst_srt_object_send_headers (srtobject, caller->sock, -1, 0, + headers, cancellable, &error)) { + GST_WARNING_OBJECT (srtobject->element, + "Failed to send headers to caller %d: %s", + caller->sock, error->message); + g_error_free (error); goto err; } + caller->sent_headers = TRUE; } @@ -1710,12 +1707,13 @@ goto err; } len += sent; + srtobject->bytes += sent; } continue; err: - srtobject->callers = g_list_remove (srtobject->callers, caller); + srtobject->callers = g_list_delete_link (srtobject->callers, item); srt_caller_signal_removed (caller, srtobject); srt_caller_free (caller); } @@ -1725,7 +1723,7 @@ cancelled: g_mutex_unlock (&srtobject->sock_lock); - return -1; + return 0; } static gssize @@ -1749,9 +1747,10 @@ if (!srtobject->sent_headers) { if (!gst_srt_object_send_headers (srtobject, srtobject->sock, - srtobject->poll_id, poll_timeout, headers, cancellable)) { + srtobject->poll_id, poll_timeout, headers, cancellable, error)) { return -1; } + srtobject->sent_headers = TRUE; } @@ -1777,7 +1776,19 @@ if (srt_epoll_wait (srtobject->poll_id, &rsock, &rsocklen, &wsock, &wsocklen, poll_timeout, NULL, 0, NULL, 0) < 0) { - continue; + gint srt_errno = srt_getlasterror (NULL); + +#if SRT_VERSION_VALUE >= 0x010402 + if (srt_errno == SRT_EPOLLEMPTY) + return 0; +#endif + + if (srt_errno == SRT_ETIMEOUT) + continue; + + g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_WRITE, + "Failed to poll socket: %s", srt_getlasterror_str ()); + return -1; } if (wsocklen == 1 && rsocklen == 1) { @@ -1785,9 +1796,13 @@ gint reason = srt_getrejectreason (wsock); if (reason == SRT_REJ_BADSECRET || reason == SRT_REJ_UNSECURE) { - ELEMENT_WARNING_SRTSOCK_ERROR (NOT_AUTHORIZED, reason); + GST_ELEMENT_WARNING (srtobject->element, RESOURCE, NOT_AUTHORIZED, + ("Failed to authenticate: %" REASON_FORMAT ". Trying to reconnect", + REASON_ARGS (reason)), (NULL)); } else { - ELEMENT_WARNING_SRTSOCK_ERROR (WRITE, reason); + GST_ELEMENT_WARNING (srtobject->element, RESOURCE, WRITE, + ("Error on SRT socket: %" REASON_FORMAT ". Trying to reconnect", + REASON_ARGS (reason)), (NULL)); } gst_srt_object_close (srtobject); @@ -1798,20 +1813,21 @@ } if (srt_getsockflag (wsock, SRTO_PAYLOADSIZE, &payload_size, &optlen)) { - GST_ELEMENT_ERROR (srtobject->element, RESOURCE, WRITE, NULL, - ("%s", srt_getlasterror_str ())); - break; + g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_WRITE, "%s", + srt_getlasterror_str ()); + return -1; } rest = MIN (mapinfo->size - len, payload_size); sent = srt_sendmsg2 (wsock, (char *) (msg + len), rest, 0); if (sent < 0) { - GST_ELEMENT_ERROR (srtobject->element, RESOURCE, WRITE, NULL, - ("%s", srt_getlasterror_str ())); - break; + g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_WRITE, "%s", + srt_getlasterror_str ()); + return -1; } len += sent; + srtobject->bytes += sent; } return len; @@ -1838,12 +1854,12 @@ if (connection_mode == GST_SRT_CONNECTION_MODE_LISTENER) { if (wait_for_connection) { - if (!gst_srt_object_wait_caller (srtobject, cancellable, error)) - return -1; + if (!gst_srt_object_wait_caller (srtobject, cancellable)) + return 0; } len = gst_srt_object_write_to_callers (srtobject, headers, mapinfo, - cancellable, error); + cancellable); } else { len = gst_srt_object_write_one (srtobject, headers, mapinfo, cancellable, @@ -1854,65 +1870,62 @@ } static GstStructure * -get_stats_for_srtsock (SRTSOCKET srtsock, gboolean is_sender, guint64 * bytes) +get_stats_for_srtsock (GstSRTObject * srtobject, SRTSOCKET srtsock) { - GstStructure *s = gst_structure_new_empty ("application/x-srt-statistics"); + GstStructure *s; int ret; SRT_TRACEBSTATS stats; ret = srt_bstats (srtsock, &stats, 0); - - if (ret >= 0) { - if (is_sender) { - gst_structure_set (s, - /* number of sent data packets, including retransmissions */ - "packets-sent", G_TYPE_INT64, stats.pktSent, - /* number of lost packets (sender side) */ - "packets-sent-lost", G_TYPE_INT, stats.pktSndLoss, - /* number of retransmitted packets */ - "packets-retransmitted", G_TYPE_INT, stats.pktRetrans, - /* number of received ACK packets */ - "packet-ack-received", G_TYPE_INT, stats.pktRecvACK, - /* number of received NAK packets */ - "packet-nack-received", G_TYPE_INT, stats.pktRecvNAK, - /* time duration when UDT is sending data (idle time exclusive) */ - "send-duration-us", G_TYPE_INT64, stats.usSndDuration, - /* number of sent data bytes, including retransmissions */ - "bytes-sent", G_TYPE_UINT64, stats.byteSent, - /* number of retransmitted bytes */ - "bytes-retransmitted", G_TYPE_UINT64, stats.byteRetrans, - /* number of too-late-to-send dropped bytes */ - "bytes-sent-dropped", G_TYPE_UINT64, stats.byteSndDrop, - /* number of too-late-to-send dropped packets */ - "packets-sent-dropped", G_TYPE_INT, stats.pktSndDrop, - /* sending rate in Mb/s */ - "send-rate-mbps", G_TYPE_DOUBLE, stats.mbpsSendRate, - /* busy sending time (i.e., idle time exclusive) */ - "send-duration-us", G_TYPE_UINT64, stats.usSndDuration, - "negotiated-latency-ms", G_TYPE_INT, stats.msSndTsbPdDelay, NULL); - *bytes += stats.byteSent; - } else { - gst_structure_set (s, - "packets-received", G_TYPE_INT64, stats.pktRecvTotal, - "packets-received-lost", G_TYPE_INT, stats.pktRcvLossTotal, - /* number of sent ACK packets */ - "packet-ack-sent", G_TYPE_INT, stats.pktSentACK, - /* number of sent NAK packets */ - "packet-nack-sent", G_TYPE_INT, stats.pktSentNAK, - "bytes-received", G_TYPE_UINT64, stats.byteRecvTotal, - "bytes-received-lost", G_TYPE_UINT64, stats.byteRcvLossTotal, - "receive-rate-mbps", G_TYPE_DOUBLE, stats.mbpsRecvRate, - "negotiated-latency-ms", G_TYPE_INT, stats.msRcvTsbPdDelay, NULL); - *bytes += stats.byteRecvTotal; - } - - gst_structure_set (s, - /* estimated bandwidth, in Mb/s */ - "bandwidth-mbps", G_TYPE_DOUBLE, stats.mbpsBandwidth, - "rtt-ms", G_TYPE_DOUBLE, stats.msRTT, NULL); - + if (ret < 0) { + GST_WARNING_OBJECT (srtobject->element, + "failed to retrieve stats for socket %d (reason %s)", + srtsock, srt_getlasterror_str ()); + return NULL; } + s = gst_structure_new ("application/x-srt-statistics", + /* number of sent data packets, including retransmissions */ + "packets-sent", G_TYPE_INT64, stats.pktSent, + /* number of lost packets (sender side) */ + "packets-sent-lost", G_TYPE_INT, stats.pktSndLoss, + /* number of retransmitted packets */ + "packets-retransmitted", G_TYPE_INT, stats.pktRetrans, + /* number of received ACK packets */ + "packet-ack-received", G_TYPE_INT, stats.pktRecvACK, + /* number of received NAK packets */ + "packet-nack-received", G_TYPE_INT, stats.pktRecvNAK, + /* time duration when UDT is sending data (idle time exclusive) */ + "send-duration-us", G_TYPE_INT64, stats.usSndDuration, + /* number of sent data bytes, including retransmissions */ + "bytes-sent", G_TYPE_UINT64, stats.byteSent, + /* number of retransmitted bytes */ + "bytes-retransmitted", G_TYPE_UINT64, stats.byteRetrans, + /* number of too-late-to-send dropped bytes */ + "bytes-sent-dropped", G_TYPE_UINT64, stats.byteSndDrop, + /* number of too-late-to-send dropped packets */ + "packets-sent-dropped", G_TYPE_INT, stats.pktSndDrop, + /* sending rate in Mb/s */ + "send-rate-mbps", G_TYPE_DOUBLE, stats.mbpsSendRate, + /* busy sending time (i.e., idle time exclusive) */ + "send-duration-us", G_TYPE_UINT64, stats.usSndDuration, + "negotiated-latency-ms", G_TYPE_INT, stats.msSndTsbPdDelay, + "packets-received", G_TYPE_INT64, stats.pktRecvTotal, + "packets-received-lost", G_TYPE_INT, stats.pktRcvLossTotal, + /* number of sent ACK packets */ + "packet-ack-sent", G_TYPE_INT, stats.pktSentACK, + /* number of sent NAK packets */ + "packet-nack-sent", G_TYPE_INT, stats.pktSentNAK, + "bytes-received", G_TYPE_UINT64, stats.byteRecvTotal, + "bytes-received-lost", G_TYPE_UINT64, stats.byteRcvLossTotal, + "receive-rate-mbps", G_TYPE_DOUBLE, stats.mbpsRecvRate, + "negotiated-latency-ms", G_TYPE_INT, stats.msRcvTsbPdDelay, + /* estimated bandwidth, in Mb/s */ + "bandwidth-mbps", G_TYPE_DOUBLE, stats.mbpsBandwidth, + "rtt-ms", G_TYPE_DOUBLE, stats.msRTT, NULL); + + GST_DEBUG_OBJECT (srtobject->element, + "retreived stats for socket %d: %" GST_PTR_FORMAT, srtsock, s); return s; } @@ -1921,30 +1934,36 @@ { GstStructure *s = NULL; gboolean is_sender = GST_IS_BASE_SINK (srtobject->element); - guint64 bytes; g_mutex_lock (&srtobject->sock_lock); - bytes = srtobject->previous_bytes; - if (srtobject->sock != SRT_INVALID_SOCK) { - s = get_stats_for_srtsock (srtobject->sock, is_sender, &bytes); - goto done; + s = get_stats_for_srtsock (srtobject, srtobject->sock); } - s = gst_structure_new_empty ("application/x-srt-statistics"); + if (s == NULL) { + s = gst_structure_new_empty ("application/x-srt-statistics"); + } if (srtobject->callers) { GValueArray *callers_stats = g_value_array_new (1); GValue callers_stats_v = G_VALUE_INIT; - GList *item; + GList *item, *next; - for (item = srtobject->callers; item; item = item->next) { + for (item = srtobject->callers, next = NULL; item; item = next) { SRTCaller *caller = item->data; GstStructure *tmp; GValue *v; - tmp = get_stats_for_srtsock (caller->sock, is_sender, &bytes); + next = item->next; + + tmp = get_stats_for_srtsock (srtobject, caller->sock); + if (tmp == NULL) { + srtobject->callers = g_list_delete_link (srtobject->callers, item); + srt_caller_signal_removed (caller, srtobject); + srt_caller_free (caller); + continue; + } gst_structure_set (tmp, "caller-address", G_TYPE_SOCKET_ADDRESS, caller->sockaddr, NULL); @@ -1960,24 +1979,10 @@ gst_structure_take_value (s, "callers", &callers_stats_v); } -done: gst_structure_set (s, is_sender ? "bytes-sent-total" : "bytes-received-total", - G_TYPE_UINT64, bytes, NULL); + G_TYPE_UINT64, srtobject->bytes, NULL); g_mutex_unlock (&srtobject->sock_lock); return s; } - -static GstStructure * -gst_srt_object_accumulate_stats (GstSRTObject * srtobject, SRTSOCKET srtsock) -{ - gboolean is_sender = GST_IS_BASE_SINK (srtobject->element); - GstStructure *stats; - guint64 bytes = 0; - - stats = get_stats_for_srtsock (srtsock, is_sender, &bytes); - srtobject->previous_bytes += bytes; - - return stats; -}
View file
gst-plugins-bad-1.20.4.tar.xz/ext/srt/gstsrtobject.h -> gst-plugins-bad-1.20.5.tar.xz/ext/srt/gstsrtobject.h
Changed
@@ -72,7 +72,7 @@ gboolean authentication; - guint64 previous_bytes; + guint64 bytes; }; GstSRTObject *gst_srt_object_new (GstElement *element);
View file
gst-plugins-bad-1.20.4.tar.xz/ext/webrtc/gstwebrtcbin.c -> gst-plugins-bad-1.20.5.tar.xz/ext/webrtc/gstwebrtcbin.c
Changed
@@ -1915,9 +1915,12 @@ if (!gst_structure_has_field (s, "rtcp-fb-nack")) gst_structure_set (s, "rtcp-fb-nack", G_TYPE_BOOLEAN, TRUE, NULL); - if (kind == GST_WEBRTC_KIND_VIDEO - && !gst_structure_has_field (s, "rtcp-fb-nack-pli")) - gst_structure_set (s, "rtcp-fb-nack-pli", G_TYPE_BOOLEAN, TRUE, NULL); + if (kind == GST_WEBRTC_KIND_VIDEO) { + if (!gst_structure_has_field (s, "rtcp-fb-nack-pli")) + gst_structure_set (s, "rtcp-fb-nack-pli", G_TYPE_BOOLEAN, TRUE, NULL); + if (!gst_structure_has_field (s, "rtcp-fb-ccm-fir")) + gst_structure_set (s, "rtcp-fb-ccm-fir", G_TYPE_BOOLEAN, TRUE, NULL); + } if (!gst_structure_has_field (s, "rtcp-fb-transport-cc")) gst_structure_set (s, "rtcp-fb-transport-cc", G_TYPE_BOOLEAN, TRUE, NULL);
View file
gst-plugins-bad-1.20.4.tar.xz/ext/webrtc/gstwebrtcice.c -> gst-plugins-bad-1.20.5.tar.xz/ext/webrtc/gstwebrtcice.c
Changed
@@ -580,6 +580,7 @@ gchar ** address, gchar ** postfix) { char **tokens = NULL; + char *tmp_address = NULL; if (!g_str_has_prefix (candidate, "a=candidate:")) { GST_ERROR ("candidate \"%s\" does not start with \"a=candidate:\"", @@ -598,14 +599,18 @@ goto failure; } + tmp_address = tokens4; if (address) - *address = g_strdup (tokens4); + *address = g_strdup (tmp_address); tokens4 = NULL; + if (prefix) *prefix = g_strjoinv (" ", tokens); if (postfix) *postfix = g_strdup (tokens5); + tokens4 = tmp_address; + g_strfreev (tokens); return TRUE;
View file
gst-plugins-bad-1.20.4.tar.xz/gst-libs/gst/codecparsers/gsth264parser.c -> gst-plugins-bad-1.20.5.tar.xz/gst-libs/gst/codecparsers/gsth264parser.c
Changed
@@ -795,7 +795,7 @@ p->chroma_weight_l0i1 = default_chroma_weight; } if (GST_H264_IS_B_SLICE (slice)) { - for (i = 0; i <= slice->num_ref_idx_l0_active_minus1; i++) { + for (i = 0; i <= slice->num_ref_idx_l1_active_minus1; i++) { p->chroma_weight_l1i0 = default_chroma_weight; p->chroma_weight_l1i1 = default_chroma_weight; }
View file
gst-plugins-bad-1.20.4.tar.xz/gst-libs/gst/codecs/gsth265decoder.c -> gst-plugins-bad-1.20.5.tar.xz/gst-libs/gst/codecs/gsth265decoder.c
Changed
@@ -1382,7 +1382,8 @@ stRefPic = &sps->short_term_ref_pic_setslice_hdr->short_term_ref_pic_set_idx; - g_assert (stRefPic != NULL); + if (stRefPic == NULL) + return FALSE; GST_LOG_OBJECT (self, "NumDeltaPocs: %d, NumNegativePics: %d, NumPositivePics %d", @@ -1634,8 +1635,12 @@ return GST_FLOW_OK; } - gst_h265_decoder_prepare_rps (self, &priv->current_slice, - priv->current_picture); + if (!gst_h265_decoder_prepare_rps (self, &priv->current_slice, + priv->current_picture)) { + GST_WARNING_OBJECT (self, "Failed to prepare ref pic set"); + gst_h265_picture_clear (&priv->current_picture); + return GST_FLOW_ERROR; + } ret = gst_h265_decoder_dpb_init (self, &priv->current_slice, priv->current_picture);
View file
gst-plugins-bad-1.20.4.tar.xz/gst-libs/gst/mpegts/gstmpegtsdescriptor.c -> gst-plugins-bad-1.20.5.tar.xz/gst-libs/gst/mpegts/gstmpegtsdescriptor.c
Changed
@@ -296,7 +296,7 @@ dvb_text_from_utf8 (const gchar * text, gsize * out_size) { GError *error = NULL; - gchar *out_text; + gchar *out_text = NULL; guint8 *out_buffer; guint encoding; GIConv giconv = (GIConv) - 1; @@ -304,7 +304,8 @@ /* We test character maps one-by-one. Start with the default */ encoding = _ICONV_ISO6937; giconv = _get_iconv (_ICONV_UTF8, encoding); - out_text = g_convert_with_iconv (text, -1, giconv, NULL, out_size, &error); + if (giconv != (GIConv) - 1) + out_text = g_convert_with_iconv (text, -1, giconv, NULL, out_size, &error); if (out_text) { GST_DEBUG ("Using default ISO6937 encoding");
View file
gst-plugins-bad-1.20.4.tar.xz/gst-libs/gst/vulkan/cocoa/gstvkcocoa_utils.h -> gst-plugins-bad-1.20.5.tar.xz/gst-libs/gst/vulkan/cocoa/gstvkcocoa_utils.h
Changed
@@ -49,7 +49,7 @@ typedef void (*GstVulkanWindowFunc) (gpointer data); G_GNUC_INTERNAL -void _invoke_on_main (GstVulkanWindowFunc func, gpointer data, GDestroyNotify notify); +void _gst_vk_invoke_on_main (GstVulkanWindowFunc func, gpointer data, GDestroyNotify notify); G_END_DECLS
View file
gst-plugins-bad-1.20.4.tar.xz/gst-libs/gst/vulkan/cocoa/gstvkwindow_cocoa.m -> gst-plugins-bad-1.20.5.tar.xz/gst-libs/gst/vulkan/cocoa/gstvkwindow_cocoa.m
Changed
@@ -155,8 +155,8 @@ GstVulkanWindowCocoaPrivate *priv = GET_PRIV (window_cocoa); if (!priv->visible) - _invoke_on_main ((GstVulkanWindowFunc) _show_window, gst_object_ref (window), - (GDestroyNotify) gst_object_unref); + _gst_vk_invoke_on_main ((GstVulkanWindowFunc) _show_window, + gst_object_ref (window), (GDestroyNotify) gst_object_unref); } static void @@ -197,7 +197,7 @@ gboolean gst_vulkan_window_cocoa_create_window (GstVulkanWindowCocoa * window_cocoa) { - _invoke_on_main ((GstVulkanWindowFunc) _create_window, + _gst_vk_invoke_on_main ((GstVulkanWindowFunc) _create_window, gst_object_ref (window_cocoa), gst_object_unref); g_usleep(1000000); @@ -277,8 +277,8 @@ static void gst_vulkan_window_cocoa_close (GstVulkanWindow * window) { - _invoke_on_main ((GstVulkanWindowFunc) _close_window, gst_object_ref (window), - (GDestroyNotify) gst_object_unref); + _gst_vk_invoke_on_main ((GstVulkanWindowFunc) _close_window, + gst_object_ref (window), (GDestroyNotify) gst_object_unref); GST_VULKAN_WINDOW_CLASS (parent_class)->close (window); } @@ -359,7 +359,7 @@ @end void -_invoke_on_main (GstVulkanWindowFunc func, gpointer data, GDestroyNotify notify) +_gst_vk_invoke_on_main (GstVulkanWindowFunc func, gpointer data, GDestroyNotify notify) { if (NSThread isMainThread) { func (data);
View file
gst-plugins-bad-1.20.4.tar.xz/gst-libs/gst/vulkan/ios/gstvkios_utils.h -> gst-plugins-bad-1.20.5.tar.xz/gst-libs/gst/vulkan/ios/gstvkios_utils.h
Changed
@@ -35,7 +35,7 @@ typedef void (*GstVulkanWindowFunc) (gpointer data); G_GNUC_INTERNAL -void _invoke_on_main (GstVulkanWindowFunc func, gpointer data, GDestroyNotify notify); +void _gst_vk_invoke_on_main (GstVulkanWindowFunc func, gpointer data, GDestroyNotify notify); G_END_DECLS
View file
gst-plugins-bad-1.20.4.tar.xz/gst-libs/gst/vulkan/ios/gstvkwindow_ios.m -> gst-plugins-bad-1.20.5.tar.xz/gst-libs/gst/vulkan/ios/gstvkwindow_ios.m
Changed
@@ -178,7 +178,7 @@ return FALSE; } - _invoke_on_main ((GstVulkanWindowFunc) _create_window, + _gst_vk_invoke_on_main ((GstVulkanWindowFunc) _create_window, gst_object_ref (window_ios), gst_object_unref); /* XXX: Maybe we need an async create_window/get_surface()? */ @@ -315,7 +315,7 @@ @end void -_invoke_on_main (GstVulkanWindowFunc func, gpointer data, GDestroyNotify notify) +_gst_vk_invoke_on_main (GstVulkanWindowFunc func, gpointer data, GDestroyNotify notify) { if (NSThread isMainThread) { func (data);
View file
gst-plugins-bad-1.20.4.tar.xz/gst-plugins-bad.doap -> gst-plugins-bad-1.20.5.tar.xz/gst-plugins-bad.doap
Changed
@@ -35,6 +35,16 @@ <release> <Version> + <revision>1.20.5</revision> + <branch>1.20</branch> + <name></name> + <created>2022-12-19</created> + <file-release rdf:resource="https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.20.5.tar.xz" /> + </Version> + </release> + + <release> + <Version> <revision>1.20.4</revision> <branch>1.20</branch> <name></name>
View file
gst-plugins-bad-1.20.4.tar.xz/gst/codecalpha/gstalphacombine.c -> gst-plugins-bad-1.20.5.tar.xz/gst/codecalpha/gstalphacombine.c
Changed
@@ -469,6 +469,14 @@ return TRUE; } +static void +gst_alpha_combine_handle_gap (GstAlphaCombine * self) +{ + GstBuffer *gap_buffer = gst_buffer_new (); + GST_BUFFER_FLAG_SET (gap_buffer, GST_BUFFER_FLAG_GAP); + gst_alpha_combine_push_alpha_buffer (self, gap_buffer); +} + static gboolean gst_alpha_combine_sink_event (GstPad * pad, GstObject * object, GstEvent * event) @@ -519,6 +527,12 @@ GstCaps *caps; gst_event_parse_caps (event, &caps); gst_alpha_combine_set_alpha_format (self, caps); + break; + } + case GST_EVENT_GAP: + { + gst_alpha_combine_handle_gap (self); + break; } default: break;
View file
gst-plugins-bad-1.20.4.tar.xz/gst/dvbsubenc/gstdvbsubenc-util.c -> gst-plugins-bad-1.20.5.tar.xz/gst/dvbsubenc/gstdvbsubenc-util.c
Changed
@@ -721,9 +721,35 @@ gst_byte_writer_set_pos (b, pos); } +static void +dvbenc_write_display_definition_segment (GstByteWriter * b, int object_version, + int page_id, guint16 width, guint16 height) +{ + guint seg_size_pos, pos; + + gst_byte_writer_put_uint8 (b, DVB_SEGMENT_SYNC_BYTE); + gst_byte_writer_put_uint8 (b, DVB_SEGMENT_TYPE_DISPLAY_DEFINITION); + gst_byte_writer_put_uint16_be (b, page_id); + + /* Size placeholder */ + seg_size_pos = gst_byte_writer_get_pos (b); + gst_byte_writer_put_uint16_be (b, 0); + + /* version number, display window flag, reserved bits */ + gst_byte_writer_put_uint8 (b, (object_version << 4) | (0 << 3) | 0x07); + gst_byte_writer_put_uint16_be (b, width); + gst_byte_writer_put_uint16_be (b, height); + + /* Re-write the size field */ + pos = gst_byte_writer_get_pos (b); + gst_byte_writer_set_pos (b, seg_size_pos); + gst_byte_writer_put_uint16_be (b, pos - (seg_size_pos + 2)); + gst_byte_writer_set_pos (b, pos); +} + GstBuffer * -gst_dvbenc_encode (int object_version, int page_id, SubpictureRect * s, - guint num_subpictures) +gst_dvbenc_encode (int object_version, int page_id, int display_version, + guint16 width, guint16 height, SubpictureRect * s, guint num_subpictures) { GstByteWriter b; guint seg_size_pos, pos; @@ -744,6 +770,11 @@ * 0x20 0x00 prefixed */ gst_byte_writer_put_uint16_be (&b, 0x2000); + /* If non-default width/height are used, write a display definiton segment */ + if (width != 720 || height != 576) + dvbenc_write_display_definition_segment (&b, display_version, page_id, + width, height); + /* Page Composition Segment */ gst_byte_writer_put_uint8 (&b, DVB_SEGMENT_SYNC_BYTE); gst_byte_writer_put_uint8 (&b, DVB_SEGMENT_TYPE_PAGE_COMPOSITION);
View file
gst-plugins-bad-1.20.4.tar.xz/gst/dvbsubenc/gstdvbsubenc.c -> gst-plugins-bad-1.20.5.tar.xz/gst/dvbsubenc/gstdvbsubenc.c
Changed
@@ -393,7 +393,9 @@ s.x = left; s.y = top; - packet = gst_dvbenc_encode (enc->object_version & 0xF, 1, &s, 1); + packet = + gst_dvbenc_encode (enc->object_version & 0xF, 1, enc->display_version, + enc->in_info.width, enc->in_info.height, &s, 1); if (packet == NULL) { gst_video_frame_unmap (&ayuv8p_frame); goto fail; @@ -440,7 +442,9 @@ GST_DEBUG_OBJECT (enc, "Outputting end of page at TS %" GST_TIME_FORMAT, GST_TIME_ARGS (enc->current_end_time)); - packet = gst_dvbenc_encode (enc->object_version & 0xF, 1, NULL, 0); + packet = + gst_dvbenc_encode (enc->object_version & 0xF, 1, enc->display_version, + enc->in_info.width, enc->in_info.height, NULL, 0); if (packet == NULL) { GST_ELEMENT_ERROR (enc, STREAM, FAILED, ("Internal data stream error."), @@ -501,27 +505,34 @@ { GstDvbSubEnc *enc = GST_DVB_SUB_ENC (gst_pad_get_parent (pad)); gboolean ret = FALSE; + GstVideoInfo in_info; GstCaps *out_caps = NULL; GST_DEBUG_OBJECT (enc, "setcaps called with %" GST_PTR_FORMAT, caps); - if (!gst_video_info_from_caps (&enc->in_info, caps)) { + if (!gst_video_info_from_caps (&in_info, caps)) { GST_ERROR_OBJECT (enc, "Failed to parse input caps"); return FALSE; } - out_caps = gst_caps_new_simple ("subpicture/x-dvb", - "width", G_TYPE_INT, enc->in_info.width, - "height", G_TYPE_INT, enc->in_info.height, - "framerate", GST_TYPE_FRACTION, enc->in_info.fps_n, enc->in_info.fps_d, - NULL); + if (!enc->in_info.finfo || !gst_video_info_is_equal (&in_info, &enc->in_info)) { + enc->in_info = in_info; + enc->display_version++; + + out_caps = gst_caps_new_simple ("subpicture/x-dvb", + "width", G_TYPE_INT, enc->in_info.width, + "height", G_TYPE_INT, enc->in_info.height, + "framerate", GST_TYPE_FRACTION, enc->in_info.fps_n, enc->in_info.fps_d, + NULL); + + if (!gst_pad_set_caps (enc->srcpad, out_caps)) { + GST_WARNING_OBJECT (enc, "failed setting downstream caps"); + gst_caps_unref (out_caps); + goto beach; + } - if (!gst_pad_set_caps (enc->srcpad, out_caps)) { - GST_WARNING_OBJECT (enc, "failed setting downstream caps"); gst_caps_unref (out_caps); - goto beach; } - gst_caps_unref (out_caps); ret = TRUE; beach: @@ -549,24 +560,29 @@ } case GST_EVENT_GAP: { - GstClockTime start, duration; - - gst_event_parse_gap (event, &start, &duration); - if (GST_CLOCK_TIME_IS_VALID (start)) { - if (GST_CLOCK_TIME_IS_VALID (duration)) - start += duration; - /* we do not expect another buffer until after gap, - * so that is our position now */ - GST_DEBUG_OBJECT (enc, - "Got GAP event, advancing time to %" GST_TIME_FORMAT, - GST_TIME_ARGS (start)); - gst_dvb_sub_enc_generate_end_packet (enc, start); + if (!GST_CLOCK_TIME_IS_VALID (enc->current_end_time)) { + ret = gst_pad_event_default (pad, parent, event); } else { - GST_WARNING_OBJECT (enc, "Got GAP event with invalid position"); + GstClockTime start, duration; + + gst_event_parse_gap (event, &start, &duration); + + if (GST_CLOCK_TIME_IS_VALID (start)) { + if (GST_CLOCK_TIME_IS_VALID (duration)) + start += duration; + /* we do not expect another buffer until after gap, + * so that is our position now */ + GST_DEBUG_OBJECT (enc, + "Got GAP event, advancing time to %" GST_TIME_FORMAT, + GST_TIME_ARGS (start)); + gst_dvb_sub_enc_generate_end_packet (enc, start); + } else { + GST_WARNING_OBJECT (enc, "Got GAP event with invalid position"); + } + + gst_event_unref (event); + ret = TRUE; } - - gst_event_unref (event); - ret = TRUE; break; } case GST_EVENT_SEGMENT:
View file
gst-plugins-bad-1.20.4.tar.xz/gst/dvbsubenc/gstdvbsubenc.h -> gst-plugins-bad-1.20.5.tar.xz/gst/dvbsubenc/gstdvbsubenc.h
Changed
@@ -47,6 +47,7 @@ GstElement element; GstVideoInfo in_info; + int display_version; GstPad *sinkpad; GstPad *srcpad; @@ -68,4 +69,4 @@ gboolean gst_dvbsubenc_ayuv_to_ayuv8p (GstVideoFrame * src, GstVideoFrame * dest, int max_colours, guint32 *out_num_colours); -GstBuffer *gst_dvbenc_encode (int object_version, int page_id, SubpictureRect *s, guint num_subpictures); +GstBuffer *gst_dvbenc_encode (int object_version, int page_id, int display_version, guint16 width, guint16 height, SubpictureRect *s, guint num_subpictures);
View file
gst-plugins-bad-1.20.4.tar.xz/gst/mpegtsdemux/mpegtsbase.c -> gst-plugins-bad-1.20.5.tar.xz/gst/mpegtsdemux/mpegtsbase.c
Changed
@@ -1209,6 +1209,10 @@ if (G_UNLIKELY (old_program == NULL)) goto no_program; + if (G_UNLIKELY (mpegts_base_is_same_program (base, old_program, section->pid, + pmt))) + goto same_program; + if (base->streams_aware && mpegts_base_is_program_update (base, old_program, section->pid, pmt)) { GST_FIXME ("We are streams_aware and new program is an update"); @@ -1217,10 +1221,6 @@ goto beach; } - if (G_UNLIKELY (mpegts_base_is_same_program (base, old_program, section->pid, - pmt))) - goto same_program; - /* If the current program is active, this means we have a new program */ if (old_program->active) { MpegTSBaseClass *klass = GST_MPEGTS_BASE_GET_CLASS (base); @@ -1523,15 +1523,19 @@ return res; mpegts_base_flush (base, FALSE); - /* In the case of discontinuities in push-mode with TIME segment - * we want to drop all previous observations (hard:TRUE) from - * the packetizer */ - if (base->mode == BASE_MODE_PUSHING - && base->segment.format == GST_FORMAT_TIME) { - mpegts_packetizer_flush (base->packetizer, TRUE); + if (base->mode == BASE_MODE_PUSHING) { + if (base->segment.format == GST_FORMAT_TIME) { + /* In the case of discontinuities in push-mode with TIME segment + * we want to drop all previous observations (hard:TRUE) from + * the packetizer */ + mpegts_packetizer_flush (base->packetizer, TRUE); + } + /* In all cases, we clear observations when we get a discontinuity in + * push-mode to re-check if the sections (PAT/PMT) changed or not */ mpegts_packetizer_clear (base->packetizer); - } else + } else { mpegts_packetizer_flush (base->packetizer, FALSE); + } } mpegts_packetizer_push (base->packetizer, buf);
View file
gst-plugins-bad-1.20.4.tar.xz/gst/mpegtsdemux/mpegtspacketizer.c -> gst-plugins-bad-1.20.5.tar.xz/gst/mpegtsdemux/mpegtspacketizer.c
Changed
@@ -157,7 +157,7 @@ static gboolean seen_section_before (MpegTSPacketizerStream * stream, guint8 table_id, guint16 subtable_extension, guint8 version_number, guint8 section_number, - guint8 last_section_number, guint8 * data_start, gsize to_read) + guint8 last_section_number) { MpegTSPacketizerStreamSubtable *subtable; @@ -178,17 +178,7 @@ return FALSE; } /* Finally return whether we saw that section or not */ - if (!MPEGTS_BIT_IS_SET (subtable->seen_section, section_number)) { - GST_DEBUG ("Different section_number"); - return FALSE; - } - - if (stream->section_data) { - /* Everything else is the same, fall back to memcmp */ - return (memcmp (stream->section_data, data_start, to_read) != 0); - } - - return FALSE; + return MPEGTS_BIT_IS_SET (subtable->seen_section, section_number); } static MpegTSPacketizerStreamSubtable * @@ -973,6 +963,7 @@ guint8 packet_cc; GList *others = NULL; guint8 version_number, section_number, last_section_number; + gboolean cc_discont = FALSE; data = packet->data; packet_cc = FLAGS_CONTINUITY_COUNTER (packet->scram_afc_cc); @@ -1019,24 +1010,18 @@ * **/ - if (packet->payload_unit_start_indicator) { + if (packet->payload_unit_start_indicator) pointer = *data++; - /* If the pointer is zero, we're guaranteed to be able to handle it */ - if (pointer == 0) { - GST_LOG - ("PID 0x%04x PUSI and pointer == 0, skipping straight to section_start parsing", - packet->pid); - mpegts_packetizer_clear_section (stream); - goto section_start; - } - } if (stream->continuity_counter == CONTINUITY_UNSET || (stream->continuity_counter + 1) % 16 != packet_cc) { - if (stream->continuity_counter != CONTINUITY_UNSET) + if (stream->continuity_counter != CONTINUITY_UNSET) { GST_WARNING ("PID 0x%04x section discontinuity (%d vs %d)", packet->pid, stream->continuity_counter, packet_cc); + cc_discont = TRUE; + } mpegts_packetizer_clear_section (stream); + stream->continuity_counter = packet_cc; /* If not a PUSI, not much we can do */ if (!packet->payload_unit_start_indicator) { GST_LOG ("PID 0x%04x continuity discont/unset and not PUSI, bailing out", @@ -1051,6 +1036,19 @@ goto section_start; } + if (packet->payload_unit_start_indicator && pointer == 0) { + /* If the pointer is zero, we're guaranteed to be able to handle it */ + GST_LOG + ("PID 0x%04x PUSI and pointer == 0, skipping straight to section_start parsing", + packet->pid); + mpegts_packetizer_clear_section (stream); + stream->continuity_counter = packet_cc; + goto section_start; + } + + stream->continuity_counter = packet_cc; + + GST_LOG ("Accumulating data from beginning of packet"); data_start = data; @@ -1202,9 +1200,8 @@ * * same last_section_number * * same section_number was seen */ - if (seen_section_before (stream, table_id, subtable_extension, - version_number, section_number, last_section_number, data_start, - to_read)) { + if (!cc_discont && seen_section_before (stream, table_id, subtable_extension, + version_number, section_number, last_section_number)) { GST_DEBUG ("PID 0x%04x Already processed table_id:0x%02x subtable_extension:0x%04x, version_number:%d, section_number:%d", packet->pid, table_id, subtable_extension, version_number,
View file
gst-plugins-bad-1.20.4.tar.xz/gst/rtmp2/gstrtmp2sink.c -> gst-plugins-bad-1.20.5.tar.xz/gst/rtmp2/gstrtmp2sink.c
Changed
@@ -861,13 +861,13 @@ g_cond_wait (&self->cond, &self->lock); } - if (G_UNLIKELY (!is_running (self))) { - gst_buffer_unref (message); - ret = GST_FLOW_FLUSHING; - } else if (G_UNLIKELY (!self->connection)) { + if (G_UNLIKELY (!self->connection)) { gst_buffer_unref (message); /* send_connect_error has sent an ERROR message */ ret = GST_FLOW_ERROR; + } else if (G_UNLIKELY (!is_running (self))) { + gst_buffer_unref (message); + ret = GST_FLOW_FLUSHING; } else { send_streamheader (self); send_message (self, message); @@ -1075,13 +1075,16 @@ } static void -error_callback (GstRtmpConnection * connection, GstRtmp2Sink * self) +error_callback (GstRtmpConnection * connection, const GError * error, + GstRtmp2Sink * self) { g_mutex_lock (&self->lock); if (self->cancellable) { g_cancellable_cancel (self->cancellable); } else if (self->loop) { - GST_ELEMENT_ERROR (self, RESOURCE, WRITE, ("Connection error"), (NULL)); + GST_ELEMENT_ERROR (self, RESOURCE, WRITE, + ("Connection error: %s", error->message), + ("domain %s, code %d", g_quark_to_string (error->domain), error->code)); stop_task (self); } g_mutex_unlock (&self->lock); @@ -1097,26 +1100,23 @@ } if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { - GST_DEBUG_OBJECT (self, "Connection was cancelled (%s)", - GST_STR_NULL (error->message)); + GST_DEBUG_OBJECT (self, "Connection was cancelled: %s", error->message); return; } - GST_ERROR_OBJECT (self, "Failed to connect (%s:%d): %s", - g_quark_to_string (error->domain), error->code, - GST_STR_NULL (error->message)); + GST_ERROR_OBJECT (self, "Failed to connect: %s %d %s", + g_quark_to_string (error->domain), error->code, error->message); if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED)) { GST_ELEMENT_ERROR (self, RESOURCE, NOT_AUTHORIZED, - ("Not authorized to connect"), ("%s", GST_STR_NULL (error->message))); + ("Not authorized to connect: %s", error->message), (NULL)); } else if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CONNECTION_REFUSED)) { GST_ELEMENT_ERROR (self, RESOURCE, OPEN_READ, - ("Could not connect"), ("%s", GST_STR_NULL (error->message))); + ("Connection refused: %s", error->message), (NULL)); } else { GST_ELEMENT_ERROR (self, RESOURCE, FAILED, - ("Failed to connect"), - ("error %s:%d: %s", g_quark_to_string (error->domain), error->code, - GST_STR_NULL (error->message))); + ("Failed to connect: %s", error->message), + ("domain %s, code %d", g_quark_to_string (error->domain), error->code)); } }
View file
gst-plugins-bad-1.20.4.tar.xz/gst/rtmp2/gstrtmp2src.c -> gst-plugins-bad-1.20.5.tar.xz/gst/rtmp2/gstrtmp2src.c
Changed
@@ -917,13 +917,15 @@ } static void -error_callback (GstRtmpConnection * connection, GstRtmp2Src * self) +error_callback (GstRtmpConnection * connection, const GError * error, + GstRtmp2Src * self) { g_mutex_lock (&self->lock); if (self->cancellable) { g_cancellable_cancel (self->cancellable); } else if (self->loop) { - GST_INFO_OBJECT (self, "Connection error"); + GST_INFO_OBJECT (self, "Connection error: %s %d %s", + g_quark_to_string (error->domain), error->code, error->message); stop_task (self); } g_mutex_unlock (&self->lock); @@ -952,26 +954,23 @@ } if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { - GST_DEBUG_OBJECT (self, "Connection was cancelled (%s)", - GST_STR_NULL (error->message)); + GST_DEBUG_OBJECT (self, "Connection was cancelled: %s", error->message); return; } - GST_ERROR_OBJECT (self, "Failed to connect (%s:%d): %s", - g_quark_to_string (error->domain), error->code, - GST_STR_NULL (error->message)); + GST_ERROR_OBJECT (self, "Failed to connect: %s %d %s", + g_quark_to_string (error->domain), error->code, error->message); if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED)) { GST_ELEMENT_ERROR (self, RESOURCE, NOT_AUTHORIZED, - ("Not authorized to connect"), ("%s", GST_STR_NULL (error->message))); + ("Not authorized to connect: %s", error->message), (NULL)); } else if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CONNECTION_REFUSED)) { GST_ELEMENT_ERROR (self, RESOURCE, OPEN_READ, - ("Could not connect"), ("%s", GST_STR_NULL (error->message))); + ("Connection refused: %s", error->message), (NULL)); } else { GST_ELEMENT_ERROR (self, RESOURCE, FAILED, - ("Failed to connect"), - ("error %s:%d: %s", g_quark_to_string (error->domain), error->code, - GST_STR_NULL (error->message))); + ("Failed to connect: %s", error->message), + ("domain %s, code %d", g_quark_to_string (error->domain), error->code)); } }
View file
gst-plugins-bad-1.20.4.tar.xz/gst/rtmp2/rtmp/rtmpclient.c -> gst-plugins-bad-1.20.5.tar.xz/gst/rtmp2/rtmp/rtmpclient.c
Changed
@@ -321,7 +321,7 @@ static void send_secure_token_response (GTask * task, GstRtmpConnection * connection, const gchar * challenge); static void connection_error (GstRtmpConnection * connection, - gpointer user_data); + const GError * error, gpointer user_data); #define DEFAULT_TIMEOUT 5 @@ -510,12 +510,13 @@ } static void -connection_error (GstRtmpConnection * connection, gpointer user_data) +connection_error (GstRtmpConnection * connection, const GError * error, + gpointer user_data) { GTask *task = user_data; + if (!g_task_had_error (task)) - g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED, - "error during connection attempt"); + g_task_return_error (task, g_error_copy (error)); } static gchar * @@ -707,14 +708,14 @@ if (!args) { g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED, - "connect failed: %s", command_name); + "'connect' cmd failed: %s", command_name); g_object_unref (task); return; } if (args->len < 2) { g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED, - "connect failed; not enough return arguments"); + "'connect' cmd failed; not enough return arguments"); g_object_unref (task); return; } @@ -722,15 +723,15 @@ optional_args = g_ptr_array_index (args, 1); node = gst_amf_node_get_field (optional_args, "code"); - if (!node) { + code = node ? gst_amf_node_peek_string (node, NULL) : NULL; + if (!code) { g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED, - "result code missing from connect cmd result"); + "'connect' cmd failed; no status code"); g_object_unref (task); return; } - code = gst_amf_node_peek_string (node, NULL); - GST_INFO ("connect result: %s", GST_STR_NULL (code)); + GST_INFO ("connect result: %s", code); if (g_str_equal (code, "NetConnection.Connect.Success")) { node = gst_amf_node_get_field (optional_args, "secureToken"); @@ -746,15 +747,15 @@ GstUri *query; node = gst_amf_node_get_field (optional_args, "description"); - if (!node) { + desc = node ? gst_amf_node_peek_string (node, NULL) : NULL; + if (!desc) { g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED, - "Connect rejected; no description"); + "'connect' cmd returned '%s'; no description", code); g_object_unref (task); return; } - desc = gst_amf_node_peek_string (node, NULL); - GST_DEBUG ("connect result desc: %s", GST_STR_NULL (desc)); + GST_DEBUG ("connect result desc: %s", desc); if (authmod == GST_RTMP_AUTHMOD_AUTO && strstr (desc, "code=403 need auth")) { if (strstr (desc, "authmod=adobe")) { @@ -765,14 +766,14 @@ } g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED, - "unhandled authentication mode: %s", desc); + "'connect' cmd returned unhandled authmod: %s", desc); g_object_unref (task); return; } if (!g_regex_match (auth_regex, desc, 0, &match_info)) { g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED, - "failed to parse auth rejection: %s", desc); + "'connect' cmd returned '%s': %s", code, desc); g_object_unref (task); return; } @@ -822,9 +823,17 @@ { const gchar *reason = gst_uri_get_query_value (query, "reason"); + if (!reason) { + g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED, + "authentication failed; no reason: %s", desc); + g_object_unref (task); + gst_uri_unref (query); + return; + } + if (g_str_equal (reason, "authfailed")) { g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED, - "authentication failed! wrong credentials?"); + "authentication failed; wrong credentials?: %s", desc); g_object_unref (task); gst_uri_unref (query); return; @@ -832,24 +841,41 @@ if (!g_str_equal (reason, "needauth")) { g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED, - "unhandled rejection reason '%s'", reason ? reason : ""); + "authentication failed; reason '%s': %s", reason, desc); g_object_unref (task); gst_uri_unref (query); return; } } - g_warn_if_fail (!data->auth_query); - data->auth_query = do_adobe_auth (data->location.username, - data->location.password, gst_uri_get_query_value (query, "salt"), - gst_uri_get_query_value (query, "opaque"), - gst_uri_get_query_value (query, "challenge")); + { + const gchar *salt, *opaque, *challenge; + + salt = gst_uri_get_query_value (query, "salt"); + if (!salt) { + g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED, + "salt missing from auth request: %s", desc); + g_object_unref (task); + gst_uri_unref (query); + return; + } + + opaque = gst_uri_get_query_value (query, "opaque"); + challenge = gst_uri_get_query_value (query, "challenge"); + + g_warn_if_fail (!data->auth_query); + data->auth_query = do_adobe_auth (data->location.username, + data->location.password, salt, opaque, challenge); + } gst_uri_unref (query); if (!data->auth_query) { + /* do_adobe_auth should not fail; send_connect tests if username + * and password are provided */ + g_warn_if_reached (); g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED, - "couldn't generate adobe style authentication query"); + "internal error: failed to generate adobe auth query"); g_object_unref (task); return; } @@ -859,7 +885,7 @@ } g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED, - "unhandled connect result code: %s", GST_STR_NULL (code)); + "'connect' cmd returned '%s'", code); g_object_unref (task); } @@ -1000,7 +1026,7 @@ if (!data->location.secure_token || !data->location.secure_token0) { g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED, - "server requires secure token authentication"); + "server requires secureToken but no token provided"); g_object_unref (task); return; } @@ -1172,14 +1198,14 @@ if (!args) { g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED, - "createStream failed: %s", command_name); + "'createStream' cmd failed: %s", command_name); g_object_unref (task); return; } if (args->len < 2) { g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED, - "createStream failed; not enough return arguments"); + "'createStream' cmd failed; not enough return arguments"); g_object_unref (task); return; } @@ -1191,7 +1217,7 @@ gst_amf_node_dump (result, -1, error_dump); g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED, - "createStream failed: %s", error_dump->str); + "'createStream' cmd failed: %s: %s", command_name, error_dump->str); g_object_unref (task); g_string_free (error_dump, TRUE); @@ -1203,7 +1229,7 @@ if (data->id == 0) { g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_INVALID_DATA, - "createStream returned ID 0"); + "'createStream' cmd returned ID 0"); g_object_unref (task); return; } @@ -1265,14 +1291,14 @@ if (!args) { g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED, - "%s failed: %s", command, command_name); + "'%s' cmd failed: %s", command, command_name); g_object_unref (task); return; } if (args->len < 2) { g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED, - "%s failed; not enough return arguments", command); + "'%s' cmd failed; not enough return arguments", command); g_object_unref (task); return; } @@ -1299,7 +1325,7 @@ if (g_strcmp0 (code, "NetStream.Publish.BadName") == 0) { g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_EXISTS, - "publish denied: stream already exists: %s", info_dump->str); + "publish denied; stream already exists: %s", info_dump->str); goto out; } @@ -1319,13 +1345,13 @@ if (g_strcmp0 (code, "NetStream.Play.StreamNotFound") == 0) { g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_NOT_FOUND, - "play denied: stream not found: %s", info_dump->str); + "play denied; stream not found: %s", info_dump->str); goto out; } } g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED, - "unhandled %s result: %s", command, info_dump->str); + "'%s' cmd failed: %s: %s", command, command_name, info_dump->str); out: g_string_free (info_dump, TRUE);
View file
gst-plugins-bad-1.20.4.tar.xz/gst/rtmp2/rtmp/rtmpconnection.c -> gst-plugins-bad-1.20.5.tar.xz/gst/rtmp2/rtmp/rtmpconnection.c
Changed
@@ -106,7 +106,8 @@ static void gst_rtmp_connection_finalize (GObject * object); static void gst_rtmp_connection_set_cancellable (GstRtmpConnection * self, GCancellable * cancellable); -static void gst_rtmp_connection_emit_error (GstRtmpConnection * self); +static void gst_rtmp_connection_emit_error (GstRtmpConnection * self, + GError * error); static gboolean gst_rtmp_connection_input_ready (GInputStream * is, gpointer user_data); static void gst_rtmp_connection_start_write (GstRtmpConnection * self); @@ -244,7 +245,7 @@ gobject_class->finalize = gst_rtmp_connection_finalize; signalsSIGNAL_ERROR = g_signal_new ("error", G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 0); + G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 1, G_TYPE_ERROR); signalsSIGNAL_STREAM_CONTROL = g_signal_new ("stream-control", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, @@ -372,7 +373,7 @@ } static void -cancel_all_commands (GstRtmpConnection * self) +cancel_all_commands (GstRtmpConnection * self, const gchar * reason) { GList *l; @@ -380,7 +381,7 @@ Transaction *cc = l->data; GST_LOG_OBJECT (self, "calling transaction callback %s", GST_DEBUG_FUNCPTR_NAME (cc->func)); - cc->func ("<cancelled>", NULL, cc->user_data); + cc->func (reason, NULL, cc->user_data); } g_list_free_full (self->transactions, transaction_free); self->transactions = NULL; @@ -389,7 +390,7 @@ ExpectedCommand *cc = l->data; GST_LOG_OBJECT (self, "calling expected command callback %s", GST_DEBUG_FUNCPTR_NAME (cc->func)); - cc->func ("<cancelled>", NULL, cc->user_data); + cc->func (reason, NULL, cc->user_data); } g_list_free_full (self->expected_commands, expected_command_free); self->expected_commands = NULL; @@ -403,7 +404,7 @@ } g_cancellable_cancel (self->cancellable); - cancel_all_commands (self); + cancel_all_commands (self, "connection closed locally"); if (self->input_source) { g_source_destroy (self->input_source); @@ -474,6 +475,12 @@ sc->input_bytes->data + oldsize, READ_SIZE, sc->cancellable, &error); g_byte_array_set_size (sc->input_bytes, oldsize + (ret > 0 ? ret : 0)); + if (ret == 0) { + error = g_error_new (G_IO_ERROR, G_IO_ERROR_CONNECTION_CLOSED, + "connection closed remotely"); + ret = -1; + } + if (ret < 0) { gint code = error->code; @@ -488,13 +495,8 @@ GST_ERROR_OBJECT (sc, "read error: %s %d %s", g_quark_to_string (error->domain), code, error->message); - g_error_free (error); - } else if (ret == 0) { - GST_INFO_OBJECT (sc, "read EOF"); - } - if (ret <= 0) { - gst_rtmp_connection_emit_error (sc); + gst_rtmp_connection_emit_error (sc, error); return G_SOURCE_REMOVE; } @@ -575,18 +577,15 @@ } static void -gst_rtmp_connection_emit_error (GstRtmpConnection * self) +gst_rtmp_connection_emit_error (GstRtmpConnection * self, GError * error) { - if (self->error) { - return; + if (!self->error) { + self->error = TRUE; + cancel_all_commands (self, error->message); + g_signal_emit (self, signalsSIGNAL_ERROR, 0, error); } - GST_INFO_OBJECT (self, "connection error"); - self->error = TRUE; - - cancel_all_commands (self); - - g_signal_emit (self, signalsSIGNAL_ERROR, 0); + g_error_free (error); } static void @@ -617,8 +616,7 @@ "write error: %s (wrote %" G_GSIZE_FORMAT " bytes)", error->message, bytes_written); } - gst_rtmp_connection_emit_error (self); - g_error_free (error); + gst_rtmp_connection_emit_error (self, error); g_object_unref (self); return; }
View file
gst-plugins-bad-1.20.4.tar.xz/meson.build -> gst-plugins-bad-1.20.5.tar.xz/meson.build
Changed
@@ -1,5 +1,5 @@ project('gst-plugins-bad', 'c', 'cpp', - version : '1.20.4', + version : '1.20.5', meson_version : '>= 0.59', default_options : 'warning_level=1', 'buildtype=debugoptimized' )
View file
gst-plugins-bad-1.20.4.tar.xz/po/gst-plugins-bad-1.0.pot -> gst-plugins-bad-1.20.5.tar.xz/po/gst-plugins-bad-1.0.pot
Changed
@@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: gst-plugins-bad-1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-12 16:40+0100\n" +"POT-Creation-Date: 2022-12-19 23:38+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" @@ -89,7 +89,7 @@ msgstr "" #: gst-libs/gst/adaptivedemux/gstadaptivedemux.c:4102 -#: gst/mpegtsdemux/mpegtsbase.c:1757 +#: gst/mpegtsdemux/mpegtsbase.c:1761 msgid "Internal data stream error." msgstr ""
View file
gst-plugins-bad-1.20.4.tar.xz/sys/applemedia/avfdeviceprovider.m -> gst-plugins-bad-1.20.5.tar.xz/sys/applemedia/avfdeviceprovider.m
Changed
@@ -76,11 +76,16 @@ "avf.has_torch", G_TYPE_BOOLEAN, device hasTorch, NULL); + g_free (unique_id); + g_free (model_id); + #if !HAVE_IOS 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
gst-plugins-bad-1.20.4.tar.xz/sys/applemedia/avfvideosrc.m -> gst-plugins-bad-1.20.5.tar.xz/sys/applemedia/avfvideosrc.m
Changed
@@ -933,7 +933,7 @@ BOOL result = NO; if (GST_QUERY_TYPE (query) == GST_QUERY_LATENCY) { - if (device != nil && caps != NULL) { + if (input != nil && caps != NULL) { GstClockTime min_latency, max_latency; min_latency = max_latency = latency;
View file
gst-plugins-bad-1.20.4.tar.xz/sys/d3d11/gstd3d11screencapturedevice.cpp -> gst-plugins-bad-1.20.5.tar.xz/sys/d3d11/gstd3d11screencapturedevice.cpp
Changed
@@ -39,8 +39,8 @@ static GstStaticCaps template_caps = GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES - (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, "BGRA") ";" - GST_VIDEO_CAPS_MAKE ("BGRA")); + (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, "BGRA") ", pixel-aspect-ratio = 1/1;" + GST_VIDEO_CAPS_MAKE ("BGRA") ", pixel-aspect-ratio = 1/1"); enum {
View file
gst-plugins-bad-1.20.4.tar.xz/sys/d3d11/gstd3d11screencapturesrc.cpp -> gst-plugins-bad-1.20.5.tar.xz/sys/d3d11/gstd3d11screencapturesrc.cpp
Changed
@@ -67,8 +67,8 @@ static GstStaticCaps template_caps = GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES - (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, "BGRA") ";" - GST_VIDEO_CAPS_MAKE ("BGRA")); + (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, "BGRA") ", pixel-aspect-ratio = 1/1;" + GST_VIDEO_CAPS_MAKE ("BGRA") ", pixel-aspect-ratio = 1/1"); struct _GstD3D11ScreenCaptureSrc {
View file
gst-plugins-bad-1.20.4.tar.xz/sys/d3d11/gstd3d11videosink.cpp -> gst-plugins-bad-1.20.5.tar.xz/sys/d3d11/gstd3d11videosink.cpp
Changed
@@ -132,11 +132,23 @@ /* For drawing on user texture */ gboolean drawing; GstBuffer *current_buffer; - GRecMutex draw_lock; + GRecMutex lock; gchar *title; }; +#define GST_D3D11_VIDEO_SINK_GET_LOCK(d) (&(GST_D3D11_VIDEO_SINK_CAST(d)->lock)) +#define GST_D3D11_VIDEO_SINK_LOCK(d) G_STMT_START { \ + GST_TRACE_OBJECT (d, "Locking from thread %p", g_thread_self()); \ + g_rec_mutex_lock (GST_D3D11_VIDEO_SINK_GET_LOCK (d)); \ + GST_TRACE_OBJECT (d, "Locked from thread %p", g_thread_self()); \ + } G_STMT_END + +#define GST_D3D11_VIDEO_SINK_UNLOCK(d) G_STMT_START { \ + GST_TRACE_OBJECT (d, "Unlocking from thread %p", g_thread_self()); \ + g_rec_mutex_unlock (GST_D3D11_VIDEO_SINK_GET_LOCK (d)); \ + } G_STMT_END + static void gst_d3d11_videosink_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gst_d3d11_videosink_get_property (GObject * object, guint prop_id, @@ -346,7 +358,7 @@ self->fullscreen = DEFAULT_FULLSCREEN; self->draw_on_shared_texture = DEFAULT_DRAW_ON_SHARED_TEXTURE; - g_rec_mutex_init (&self->draw_lock); + g_rec_mutex_init (&self->lock); } static void @@ -355,7 +367,7 @@ { GstD3D11VideoSink *self = GST_D3D11_VIDEO_SINK (object); - GST_OBJECT_LOCK (self); + GST_D3D11_VIDEO_SINK_LOCK (self); switch (prop_id) { case PROP_ADAPTER: self->adapter = g_value_get_int (value); @@ -394,7 +406,7 @@ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } - GST_OBJECT_UNLOCK (self); + GST_D3D11_VIDEO_SINK_UNLOCK (self); } static void @@ -403,6 +415,7 @@ { GstD3D11VideoSink *self = GST_D3D11_VIDEO_SINK (object); + GST_D3D11_VIDEO_SINK_LOCK (self); switch (prop_id) { case PROP_ADAPTER: g_value_set_int (value, self->adapter); @@ -430,6 +443,7 @@ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } + GST_D3D11_VIDEO_SINK_UNLOCK (self); } static void @@ -437,7 +451,7 @@ { GstD3D11VideoSink *self = GST_D3D11_VIDEO_SINK (object); - g_rec_mutex_clear (&self->draw_lock); + g_rec_mutex_clear (&self->lock); g_free (self->title); G_OBJECT_CLASS (parent_class)->finalize (object); @@ -512,7 +526,7 @@ return TRUE; } -static gboolean +static GstFlowReturn gst_d3d11_video_sink_update_window (GstD3D11VideoSink * self, GstCaps * caps) { gint video_width, video_height; @@ -520,16 +534,29 @@ gint display_par_n = 1, display_par_d = 1; /* display's PAR */ guint num, den; GError *error = NULL; + GstD3D11Window *window; + GstFlowReturn ret = GST_FLOW_OK; GST_DEBUG_OBJECT (self, "Updating window with caps %" GST_PTR_FORMAT, caps); self->caps_updated = FALSE; - if (!gst_d3d11_video_sink_prepare_window (self)) - goto no_window; + GST_D3D11_VIDEO_SINK_LOCK (self); + if (!gst_d3d11_video_sink_prepare_window (self)) { + GST_D3D11_VIDEO_SINK_UNLOCK (self); + + GST_ELEMENT_ERROR (self, RESOURCE, NOT_FOUND, (nullptr), + ("Failed to open window.")); - if (!gst_video_info_from_caps (&self->info, caps)) - goto invalid_format; + return GST_FLOW_ERROR; + } + + if (!gst_video_info_from_caps (&self->info, caps)) { + GST_DEBUG_OBJECT (self, + "Could not locate image format from caps %" GST_PTR_FORMAT, caps); + GST_D3D11_VIDEO_SINK_UNLOCK (self); + return GST_FLOW_ERROR; + } video_width = GST_VIDEO_INFO_WIDTH (&self->info); video_height = GST_VIDEO_INFO_HEIGHT (&self->info); @@ -540,11 +567,15 @@ * convert video width and height to a display width and height * using wd / hd = wv / hv * PARv / PARd */ - /* TODO: Get display PAR */ - if (!gst_video_calculate_display_ratio (&num, &den, video_width, - video_height, video_par_n, video_par_d, display_par_n, display_par_d)) - goto no_disp_ratio; + video_height, video_par_n, video_par_d, display_par_n, + display_par_d)) { + GST_D3D11_VIDEO_SINK_UNLOCK (self); + + GST_ELEMENT_ERROR (self, CORE, NEGOTIATION, (nullptr), + ("Error calculating the output display ratio of the video.")); + return GST_FLOW_ERROR; + } GST_DEBUG_OBJECT (self, "video width/height: %dx%d, calculated display ratio: %d/%d format: %s", @@ -581,34 +612,48 @@ self->video_width = video_width; self->video_height = video_height; - if (GST_VIDEO_SINK_WIDTH (self) <= 0 || GST_VIDEO_SINK_HEIGHT (self) <= 0) - goto no_display_size; + if (GST_VIDEO_SINK_WIDTH (self) <= 0 || GST_VIDEO_SINK_HEIGHT (self) <= 0) { + GST_D3D11_VIDEO_SINK_UNLOCK (self); + + GST_ELEMENT_ERROR (self, CORE, NEGOTIATION, (nullptr), + ("Error calculating the output display ratio of the video.")); + return GST_FLOW_ERROR; + } - GST_OBJECT_LOCK (self); if (self->pending_render_rect) { GstVideoRectangle rect = self->render_rect; self->pending_render_rect = FALSE; - GST_OBJECT_UNLOCK (self); - gst_d3d11_window_set_render_rectangle (self->window, &rect); - } else { - GST_OBJECT_UNLOCK (self); } self->have_video_processor = FALSE; - if (!gst_d3d11_window_prepare (self->window, GST_VIDEO_SINK_WIDTH (self), - GST_VIDEO_SINK_HEIGHT (self), caps, &self->have_video_processor, - &error)) { + window = (GstD3D11Window *) gst_object_ref (self->window); + GST_D3D11_VIDEO_SINK_UNLOCK (self); + + ret = gst_d3d11_window_prepare (window, GST_VIDEO_SINK_WIDTH (self), + GST_VIDEO_SINK_HEIGHT (self), caps, &self->have_video_processor, &error); + if (ret != GST_FLOW_OK) { GstMessage *error_msg; + if (ret == GST_FLOW_FLUSHING) { + GST_D3D11_VIDEO_SINK_LOCK (self); + GST_WARNING_OBJECT (self, "Couldn't prepare window but we are flushing"); + gst_clear_object (&self->window); + gst_object_unref (window); + GST_D3D11_VIDEO_SINK_UNLOCK (self); + + return GST_FLOW_FLUSHING; + } + GST_ERROR_OBJECT (self, "cannot create swapchain"); error_msg = gst_message_new_error (GST_OBJECT_CAST (self), error, "Failed to prepare d3d11window"); g_clear_error (&error); gst_element_post_message (GST_ELEMENT (self), error_msg); + gst_object_unref (window); - return FALSE; + return GST_FLOW_ERROR; } if (self->fallback_pool) { @@ -644,43 +689,20 @@ if (!self->fallback_pool) { GST_ERROR_OBJECT (self, "Failed to configure fallback pool"); - return FALSE; + gst_object_unref (window); + return GST_FLOW_ERROR; } self->processor_in_use = FALSE; if (self->title) { - gst_d3d11_window_set_title (self->window, self->title); + gst_d3d11_window_set_title (window, self->title); g_clear_pointer (&self->title, g_free); } - return TRUE; + gst_object_unref (window); - /* ERRORS */ -invalid_format: - { - GST_DEBUG_OBJECT (self, - "Could not locate image format from caps %" GST_PTR_FORMAT, caps); - return FALSE; - } -no_window: - { - GST_ELEMENT_ERROR (self, RESOURCE, NOT_FOUND, (NULL), - ("Failed to open window.")); - return FALSE; - } -no_disp_ratio: - { - GST_ELEMENT_ERROR (self, CORE, NEGOTIATION, (NULL), - ("Error calculating the output display ratio of the video.")); - return FALSE; - } -no_display_size: - { - GST_ELEMENT_ERROR (self, CORE, NEGOTIATION, (NULL), - ("Error calculating the output display ratio of the video.")); - return FALSE; - } + return GST_FLOW_OK; } static void @@ -721,6 +743,7 @@ return TRUE; } +/* called with lock */ static gboolean gst_d3d11_video_sink_prepare_window (GstD3D11VideoSink * self) { @@ -788,19 +811,20 @@ return FALSE; } - GST_OBJECT_LOCK (self); g_object_set (self->window, "force-aspect-ratio", self->force_aspect_ratio, "fullscreen-toggle-mode", self->fullscreen_toggle_mode, "fullscreen", self->fullscreen, "enable-navigation-events", self->enable_navigation_events, NULL); - GST_OBJECT_UNLOCK (self); g_signal_connect (self->window, "key-event", G_CALLBACK (gst_d3d11_video_sink_key_event), self); g_signal_connect (self->window, "mouse-event", G_CALLBACK (gst_d3d11_video_mouse_key_event), self); + GST_DEBUG_OBJECT (self, + "Have prepared window %" GST_PTR_FORMAT, self->window); + return TRUE; } @@ -817,11 +841,14 @@ self->fallback_pool = NULL; } + GST_D3D11_VIDEO_SINK_LOCK (self); if (self->window) gst_d3d11_window_unprepare (self->window); - gst_clear_object (&self->device); gst_clear_object (&self->window); + GST_D3D11_VIDEO_SINK_UNLOCK (self); + + gst_clear_object (&self->device); g_clear_pointer (&self->title, g_free); @@ -919,7 +946,7 @@ * on window-resize event */ gst_query_add_allocation_pool (query, pool, size, 2, 0); if (pool) - g_object_unref (pool); + gst_object_unref (pool); gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL); gst_query_add_allocation_meta (query, @@ -966,8 +993,10 @@ { GstD3D11VideoSink *self = GST_D3D11_VIDEO_SINK (sink); + GST_D3D11_VIDEO_SINK_LOCK (self); if (self->window) gst_d3d11_window_unlock (self->window); + GST_D3D11_VIDEO_SINK_UNLOCK (self); return TRUE; } @@ -977,8 +1006,10 @@ { GstD3D11VideoSink *self = GST_D3D11_VIDEO_SINK (sink); + GST_D3D11_VIDEO_SINK_LOCK (self); if (self->window) gst_d3d11_window_unlock_stop (self->window); + GST_D3D11_VIDEO_SINK_UNLOCK (self); return TRUE; } @@ -1006,12 +1037,14 @@ title_string = std::string (title); } + GST_D3D11_VIDEO_SINK_LOCK (self); if (self->window) { gst_d3d11_window_set_title (self->window, title_string.c_str ()); } else { g_free (self->title); self->title = g_strdup (title_string.c_str ()); } + GST_D3D11_VIDEO_SINK_UNLOCK (self); g_free (title); } @@ -1182,17 +1215,16 @@ if (self->caps_updated || !self->window) { GstCaps *caps = gst_pad_get_current_caps (GST_BASE_SINK_PAD (sink)); - gboolean update_ret; /* shouldn't happen */ if (!caps) return GST_FLOW_NOT_NEGOTIATED; - update_ret = gst_d3d11_video_sink_update_window (self, caps); + ret = gst_d3d11_video_sink_update_window (self, caps); gst_caps_unref (caps); - if (!update_ret) - return GST_FLOW_NOT_NEGOTIATED; + if (ret != GST_FLOW_OK) + return ret; } if (!gst_d3d11_buffer_can_access_device (buf, device_handle)) { @@ -1241,7 +1273,7 @@ gst_d3d11_window_show (self->window); if (self->draw_on_shared_texture) { - g_rec_mutex_lock (&self->draw_lock); + GST_D3D11_VIDEO_SINK_LOCK (self); self->current_buffer = fallback_buf ? fallback_buf : buf; self->drawing = TRUE; @@ -1254,7 +1286,7 @@ GST_LOG_OBJECT (self, "End drawing"); self->drawing = FALSE; self->current_buffer = NULL; - g_rec_mutex_unlock (&self->draw_lock); + GST_D3D11_VIDEO_SINK_UNLOCK (self); } else { ret = gst_d3d11_window_render (self->window, fallback_buf ? fallback_buf : buf); @@ -1293,7 +1325,7 @@ GST_DEBUG_OBJECT (self, "render rect x: %d, y: %d, width: %d, height %d", x, y, width, height); - GST_OBJECT_LOCK (self); + GST_D3D11_VIDEO_SINK_LOCK (self); if (self->window) { GstVideoRectangle rect; @@ -1303,7 +1335,6 @@ rect.h = height; self->render_rect = rect; - GST_OBJECT_UNLOCK (self); gst_d3d11_window_set_render_rectangle (self->window, &rect); } else { @@ -1312,8 +1343,9 @@ self->render_rect.w = width; self->render_rect.h = height; self->pending_render_rect = TRUE; - GST_OBJECT_UNLOCK (self); } + + GST_D3D11_VIDEO_SINK_UNLOCK (self); } static void @@ -1321,9 +1353,10 @@ { GstD3D11VideoSink *self = GST_D3D11_VIDEO_SINK (overlay); - if (self->window && self->window->swap_chain) { - gst_d3d11_window_render (self->window, NULL); - } + GST_D3D11_VIDEO_SINK_LOCK (self); + if (self->window && self->window->swap_chain) + gst_d3d11_window_render (self->window, nullptr); + GST_D3D11_VIDEO_SINK_UNLOCK (self); } static void @@ -1382,10 +1415,10 @@ return FALSE; } - g_rec_mutex_lock (&self->draw_lock); + GST_D3D11_VIDEO_SINK_LOCK (self); if (!self->drawing || !self->current_buffer) { GST_WARNING_OBJECT (self, "Nothing to draw"); - g_rec_mutex_unlock (&self->draw_lock); + GST_D3D11_VIDEO_SINK_UNLOCK (self); return FALSE; } @@ -1397,7 +1430,7 @@ ret = gst_d3d11_window_render_on_shared_handle (self->window, self->current_buffer, shared_handle, texture_misc_flags, acquire_key, release_key); - g_rec_mutex_unlock (&self->draw_lock); + GST_D3D11_VIDEO_SINK_UNLOCK (self); return ret == GST_FLOW_OK; }
View file
gst-plugins-bad-1.20.4.tar.xz/sys/d3d11/gstd3d11videosink.h -> gst-plugins-bad-1.20.5.tar.xz/sys/d3d11/gstd3d11videosink.h
Changed
@@ -37,6 +37,7 @@ #define GST_IS_D3D11_VIDEO_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_D3D11_VIDEO_SINK)) #define GST_IS_D3D11_VIDEO_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_D3D11_VIDEO_SINK)) #define GST_D3D11_VIDEO_SINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_D3D11_VIDEO_SINK, GstD3D11VideoSinkClass)) +#define GST_D3D11_VIDEO_SINK_CAST(obj) ((GstD3D11VideoSink *) obj) typedef struct _GstD3D11VideoSink GstD3D11VideoSink; typedef struct _GstD3D11VideoSinkClass GstD3D11VideoSinkClass;
View file
gst-plugins-bad-1.20.4.tar.xz/sys/d3d11/gstd3d11window.cpp -> gst-plugins-bad-1.20.5.tar.xz/sys/d3d11/gstd3d11window.cpp
Changed
@@ -107,7 +107,7 @@ ID3D11RenderTargetView * rtv); static void gst_d3d11_window_on_resize_default (GstD3D11Window * window, guint width, guint height); -static gboolean gst_d3d11_window_prepare_default (GstD3D11Window * window, +static GstFlowReturn gst_d3d11_window_prepare_default (GstD3D11Window * window, guint display_width, guint display_height, GstCaps * caps, gboolean * video_processor_available, GError ** error); @@ -290,6 +290,8 @@ ID3D11Texture2D *backbuffer = NULL; GstVideoRectangle src_rect, dst_rect, rst_rect; IDXGISwapChain *swap_chain; + ID3D11DeviceContext *context; + const FLOAT clear_color = { 0.0, 0.0, 0.0, 1.0 }; gst_d3d11_device_lock (window->device); if (!window->swap_chain) @@ -355,6 +357,9 @@ goto done; } + context = gst_d3d11_device_get_device_context_handle (window->device); + context->ClearRenderTargetView (window->rtv, clear_color); + if (window->processor) { D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC pov_desc; @@ -412,14 +417,14 @@ gboolean supported; } GstD3D11WindowDisplayFormat; -gboolean +GstFlowReturn gst_d3d11_window_prepare (GstD3D11Window * window, guint display_width, guint display_height, GstCaps * caps, gboolean * video_processor_available, GError ** error) { GstD3D11WindowClass *klass; - g_return_val_if_fail (GST_IS_D3D11_WINDOW (window), FALSE); + g_return_val_if_fail (GST_IS_D3D11_WINDOW (window), GST_FLOW_ERROR); klass = GST_D3D11_WINDOW_GET_CLASS (window); g_assert (klass->prepare != NULL); @@ -431,7 +436,7 @@ video_processor_available, error); } -static gboolean +static GstFlowReturn gst_d3d11_window_prepare_default (GstD3D11Window * window, guint display_width, guint display_height, GstCaps * caps, gboolean * video_processor_available, GError ** error) @@ -491,7 +496,7 @@ GST_ERROR_OBJECT (window, "Cannot determine render format"); g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_FAILED, "Cannot determine render format"); - return FALSE; + return GST_FLOW_ERROR; } for (i = 0; i < GST_VIDEO_INFO_N_COMPONENTS (&window->info); i++) { @@ -760,12 +765,12 @@ GST_DEBUG_OBJECT (window, "New swap chain 0x%p created", window->swap_chain); - return TRUE; + return GST_FLOW_OK; error: gst_d3d11_device_unlock (window->device); - return FALSE; + return GST_FLOW_ERROR; } void @@ -884,6 +889,11 @@ if (!buffer) return GST_FLOW_OK; + if (!rtv) { + GST_ERROR_OBJECT (self, "RTV is unavailable"); + return GST_FLOW_ERROR; + } + { GstMapInfo infosGST_VIDEO_MAX_PLANES; ID3D11ShaderResourceView *srvGST_VIDEO_MAX_PLANES;
View file
gst-plugins-bad-1.20.4.tar.xz/sys/d3d11/gstd3d11window.h -> gst-plugins-bad-1.20.5.tar.xz/sys/d3d11/gstd3d11window.h
Changed
@@ -153,7 +153,7 @@ guint width, guint height); - gboolean (*prepare) (GstD3D11Window * window, + GstFlowReturn (*prepare) (GstD3D11Window * window, guint display_width, guint display_height, GstCaps * caps, @@ -185,7 +185,7 @@ void gst_d3d11_window_set_title (GstD3D11Window * window, const gchar *title); -gboolean gst_d3d11_window_prepare (GstD3D11Window * window, +GstFlowReturn gst_d3d11_window_prepare (GstD3D11Window * window, guint display_width, guint display_height, GstCaps * caps,
View file
gst-plugins-bad-1.20.4.tar.xz/sys/d3d11/gstd3d11window_corewindow.cpp -> gst-plugins-bad-1.20.5.tar.xz/sys/d3d11/gstd3d11window_corewindow.cpp
Changed
@@ -550,7 +550,7 @@ return NULL; } - g_object_ref_sink (window); + gst_object_ref_sink (window); return window; }
View file
gst-plugins-bad-1.20.4.tar.xz/sys/d3d11/gstd3d11window_dummy.cpp -> gst-plugins-bad-1.20.5.tar.xz/sys/d3d11/gstd3d11window_dummy.cpp
Changed
@@ -48,7 +48,7 @@ static void gst_d3d11_window_dummy_on_resize (GstD3D11Window * window, guint width, guint height); -static gboolean gst_d3d11_window_dummy_prepare (GstD3D11Window * window, +static GstFlowReturn gst_d3d11_window_dummy_prepare (GstD3D11Window * window, guint display_width, guint display_height, GstCaps * caps, gboolean * video_processor_available, GError ** error); static void gst_d3d11_window_dummy_unprepare (GstD3D11Window * window); @@ -80,7 +80,7 @@ { } -static gboolean +static GstFlowReturn gst_d3d11_window_dummy_prepare (GstD3D11Window * window, guint display_width, guint display_height, GstCaps * caps, gboolean * video_processor_available, GError ** error) @@ -192,12 +192,12 @@ gst_d3d11_device_unlock (window->device); - return TRUE; + return GST_FLOW_OK; error: gst_d3d11_device_unlock (window->device); - return FALSE; + return GST_FLOW_ERROR; } static void @@ -531,7 +531,7 @@ g_object_new (GST_TYPE_D3D11_WINDOW_DUMMY, "d3d11device", device, NULL); window->initialized = TRUE; - g_object_ref_sink (window); + gst_object_ref_sink (window); return window; }
View file
gst-plugins-bad-1.20.4.tar.xz/sys/d3d11/gstd3d11window_swapchainpanel.cpp -> gst-plugins-bad-1.20.5.tar.xz/sys/d3d11/gstd3d11window_swapchainpanel.cpp
Changed
@@ -541,7 +541,7 @@ return NULL; } - g_object_ref_sink (window); + gst_object_ref_sink (window); return window; }
View file
gst-plugins-bad-1.20.4.tar.xz/sys/d3d11/gstd3d11window_win32.cpp -> gst-plugins-bad-1.20.5.tar.xz/sys/d3d11/gstd3d11window_win32.cpp
Changed
@@ -43,6 +43,7 @@ #define WM_GST_D3D11_CONSTRUCT_INTERNAL_WINDOW (WM_USER + 2) #define WM_GST_D3D11_DESTROY_INTERNAL_WINDOW (WM_USER + 3) #define WM_GST_D3D11_MOVE_WINDOW (WM_USER + 4) +#define WM_GST_D3D11_SHOW_WINDOW (WM_USER + 5) static LRESULT CALLBACK window_proc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); @@ -93,6 +94,9 @@ /* Handle set_render_rectangle */ GstVideoRectangle render_rect; + + gboolean flushing; + gboolean setup_external_hwnd; }; #define gst_d3d11_window_win32_parent_class parent_class @@ -120,17 +124,21 @@ static void gst_d3d11_window_win32_destroy_internal_window (HWND hwnd); static void gst_d3d11_window_win32_release_external_handle (HWND hwnd); static void -gst_d3d11_window_win32_set_window_handle (GstD3D11WindowWin32 * self, - guintptr handle); -static void gst_d3d11_window_win32_on_resize (GstD3D11Window * window, guint width, guint height); +static GstFlowReturn gst_d3d11_window_win32_prepare (GstD3D11Window * window, + guint display_width, guint display_height, GstCaps * caps, + gboolean * video_processor_available, GError ** error); static void gst_d3d11_window_win32_unprepare (GstD3D11Window * window); static void gst_d3d11_window_win32_set_render_rectangle (GstD3D11Window * window, const GstVideoRectangle * rect); static void gst_d3d11_window_win32_set_title (GstD3D11Window * window, const gchar * title); +static gboolean gst_d3d11_window_win32_unlock (GstD3D11Window * window); +static gboolean gst_d3d11_window_win32_unlock_stop (GstD3D11Window * window); +static GstFlowReturn +gst_d3d11_window_win32_set_external_handle (GstD3D11WindowWin32 * self); static void gst_d3d11_window_win32_class_init (GstD3D11WindowWin32Class * klass) @@ -152,12 +160,16 @@ window_class->present = GST_DEBUG_FUNCPTR (gst_d3d11_window_win32_present); window_class->on_resize = GST_DEBUG_FUNCPTR (gst_d3d11_window_win32_on_resize); + window_class->prepare = GST_DEBUG_FUNCPTR (gst_d3d11_window_win32_prepare); window_class->unprepare = GST_DEBUG_FUNCPTR (gst_d3d11_window_win32_unprepare); window_class->set_render_rectangle = GST_DEBUG_FUNCPTR (gst_d3d11_window_win32_set_render_rectangle); window_class->set_title = GST_DEBUG_FUNCPTR (gst_d3d11_window_win32_set_title); + window_class->unlock = GST_DEBUG_FUNCPTR (gst_d3d11_window_win32_unlock); + window_class->unlock_stop = + GST_DEBUG_FUNCPTR (gst_d3d11_window_win32_unlock_stop); } static void @@ -176,7 +188,9 @@ GstD3D11WindowWin32 *self = GST_D3D11_WINDOW_WIN32 (object); if (window->external_handle) { - gst_d3d11_window_win32_set_window_handle (self, window->external_handle); + /* Will setup internal child window on ::prepare() */ + self->setup_external_hwnd = TRUE; + window->initialized = TRUE; goto done; } @@ -200,6 +214,51 @@ G_OBJECT_CLASS (parent_class)->dispose (object); } +static GstFlowReturn +gst_d3d11_window_win32_prepare (GstD3D11Window * window, guint display_width, + guint display_height, GstCaps * caps, gboolean * video_processor_available, + GError ** error) +{ + GstD3D11WindowWin32 *self = GST_D3D11_WINDOW_WIN32 (window); + HWND hwnd; + GstFlowReturn ret; + + if (!self->setup_external_hwnd) + goto done; + + hwnd = (HWND) window->external_handle; + if (!IsWindow (hwnd)) { + GST_ERROR_OBJECT (self, "Invalid window handle"); + g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_FAILED, + "Invalid window handle"); + return GST_FLOW_ERROR; + } + + self->overlay_state = GST_D3D11_WINDOW_WIN32_OVERLAY_STATE_NONE; + self->external_hwnd = hwnd; + + GST_DEBUG_OBJECT (self, "Preparing external handle"); + ret = gst_d3d11_window_win32_set_external_handle (self); + if (ret != GST_FLOW_OK) { + if (ret == GST_FLOW_FLUSHING) { + GST_WARNING_OBJECT (self, "Flushing"); + return GST_FLOW_FLUSHING; + } + + GST_ERROR_OBJECT (self, "Couldn't configure internal window"); + g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_FAILED, + "Window handle configuration failed"); + return GST_FLOW_ERROR; + } + + GST_DEBUG_OBJECT (self, "External handle got prepared"); + self->setup_external_hwnd = FALSE; + +done: + return GST_D3D11_WINDOW_CLASS (parent_class)->prepare (window, display_width, + display_height, caps, video_processor_available, error); +} + static void gst_d3d11_window_win32_unprepare (GstD3D11Window * window) { @@ -311,6 +370,36 @@ } static gboolean +gst_d3d11_window_win32_unlock (GstD3D11Window * window) +{ + GstD3D11WindowWin32 *self = GST_D3D11_WINDOW_WIN32 (window); + g_mutex_lock (&self->lock); + + GST_DEBUG_OBJECT (self, "Unlock"); + + self->flushing = TRUE; + g_cond_broadcast (&self->cond); + g_mutex_unlock (&self->lock); + + return TRUE; +} + +static gboolean +gst_d3d11_window_win32_unlock_stop (GstD3D11Window * window) +{ + GstD3D11WindowWin32 *self = GST_D3D11_WINDOW_WIN32 (window); + g_mutex_lock (&self->lock); + + GST_DEBUG_OBJECT (self, "Unlock stop"); + + self->flushing = FALSE; + g_cond_broadcast (&self->cond); + g_mutex_unlock (&self->lock); + + return TRUE; +} + +static gboolean running_cb (gpointer user_data) { GstD3D11WindowWin32 *self = GST_D3D11_WINDOW_WIN32 (user_data); @@ -350,8 +439,8 @@ window->initialized = gst_d3d11_window_win32_create_internal_window (self); - self->msg_io_channel = - g_io_channel_win32_new_messages ((guintptr) self->internal_hwnd); + /* Watching and dispatching all messages on this thread */ + self->msg_io_channel = g_io_channel_win32_new_messages (0); self->msg_source = g_io_create_watch (self->msg_io_channel, G_IO_IN); g_source_set_callback (self->msg_source, (GSourceFunc) msg_cb, self, NULL); g_source_attach (self->msg_source, self->main_context); @@ -401,10 +490,11 @@ ", 0x%x", (guintptr) hwnd, (guint) GetLastError ()); } -static void +static GstFlowReturn gst_d3d11_window_win32_set_external_handle (GstD3D11WindowWin32 * self) { WNDPROC external_window_proc; + GstFlowReturn ret = GST_FLOW_OK; external_window_proc = (WNDPROC) GetWindowLongPtrA (self->external_hwnd, GWLP_WNDPROC); @@ -419,9 +509,28 @@ SetWindowLongPtrA (self->external_hwnd, GWLP_WNDPROC, (LONG_PTR) sub_class_proc); - /* Will create our internal window on parent window's thread */ - SendMessageA (self->external_hwnd, WM_GST_D3D11_CONSTRUCT_INTERNAL_WINDOW, + /* SendMessage() may cause deadlock if parent window thread is busy + * for changing pipeline's state. Post our message instead, and wait for + * the parent window's thread or flushing */ + PostMessageA (self->external_hwnd, WM_GST_D3D11_CONSTRUCT_INTERNAL_WINDOW, 0, 0); + + g_mutex_lock (&self->lock); + while (self->external_hwnd && + self->overlay_state == GST_D3D11_WINDOW_WIN32_OVERLAY_STATE_NONE && + !self->flushing) { + g_cond_wait (&self->cond, &self->lock); + } + + if (self->overlay_state != GST_D3D11_WINDOW_WIN32_OVERLAY_STATE_OPENED) { + if (self->flushing) + ret = GST_FLOW_FLUSHING; + else + ret = GST_FLOW_ERROR; + } + g_mutex_unlock (&self->lock); + + return ret; } static void @@ -735,6 +844,9 @@ } } break; + case WM_GST_D3D11_SHOW_WINDOW: + ShowWindow (self->internal_hwnd, SW_SHOW); + break; default: break; } @@ -827,6 +939,11 @@ MoveWindow (self->internal_hwnd, rect.left, rect.top, rect.right, rect.bottom, FALSE); + g_mutex_lock (&self->lock); + self->overlay_state = GST_D3D11_WINDOW_WIN32_OVERLAY_STATE_OPENED; + g_cond_broadcast (&self->cond); + g_mutex_unlock (&self->lock); + /* don't need to be chained up to parent window procedure, * as this is our custom message */ return 0; @@ -840,13 +957,16 @@ gst_d3d11_window_win32_release_external_handle (self->external_hwnd); self->external_hwnd = NULL; - RemovePropA (self->internal_hwnd, D3D11_WINDOW_PROP_NAME); - ShowWindow (self->internal_hwnd, SW_HIDE); - gst_d3d11_window_win32_destroy_internal_window (self->internal_hwnd); + if (self->internal_hwnd) { + RemovePropA (self->internal_hwnd, D3D11_WINDOW_PROP_NAME); + ShowWindow (self->internal_hwnd, SW_HIDE); + gst_d3d11_window_win32_destroy_internal_window (self->internal_hwnd); + } self->internal_hwnd = NULL; self->internal_hwnd_thread = NULL; self->overlay_state = GST_D3D11_WINDOW_WIN32_OVERLAY_STATE_CLOSED; + g_cond_broadcast (&self->cond); g_mutex_unlock (&self->lock); } else { gst_d3d11_window_win32_handle_window_proc (self, hWnd, uMsg, wParam, @@ -1023,18 +1143,6 @@ } static void -gst_d3d11_window_win32_set_window_handle (GstD3D11WindowWin32 * self, - guintptr handle) -{ - self->overlay_state = GST_D3D11_WINDOW_WIN32_OVERLAY_STATE_NONE; - - self->external_hwnd = (HWND) handle; - gst_d3d11_window_win32_set_external_handle (self); - - self->overlay_state = GST_D3D11_WINDOW_WIN32_OVERLAY_STATE_OPENED; -} - -static void gst_d3d11_window_win32_show (GstD3D11Window * window) { GstD3D11WindowWin32 *self = GST_D3D11_WINDOW_WIN32 (window); @@ -1055,9 +1163,15 @@ GetSystemMetrics (SM_CYCAPTION); MoveWindow (self->internal_hwnd, rect.left, rect.top, width, height, FALSE); + ShowWindow (self->internal_hwnd, SW_SHOW); + } else if (self->internal_hwnd) { + /* ShowWindow will throw message to message pumping thread (app thread) + * synchroniously, which can be blocked at the moment. + * Post message to internal hwnd and do that from message pumping thread + */ + PostMessageA (self->internal_hwnd, WM_GST_D3D11_SHOW_WINDOW, 0, 0); } - ShowWindow (self->internal_hwnd, SW_SHOW); self->visible = TRUE; } } @@ -1145,7 +1259,7 @@ return NULL; } - g_object_ref_sink (window); + gst_object_ref_sink (window); return window; }
View file
gst-plugins-bad-1.20.4.tar.xz/sys/decklink/gstdecklinkvideosrc.cpp -> gst-plugins-bad-1.20.5.tar.xz/sys/decklink/gstdecklinkvideosrc.cpp
Changed
@@ -154,6 +154,8 @@ #define ABSDIFF(x, y) ( (x) > (y) ? ((x) - (y)) : ((y) - (x)) ) #endif +#define NO_SIGNL_RESET_COUNT (10) + enum { PROP_0, @@ -672,6 +674,23 @@ } static void +gst_decklink_reset_time_mapping(GstDecklinkVideoSrc * self) +{ + self->window_fill = 0; + self->window_filled = FALSE; + self->window_skip = 1; + self->window_skip_count = 0; + self->current_time_mapping.xbase = 0; + self->current_time_mapping.b = 0; + self->current_time_mapping.num = 1; + self->current_time_mapping.den = 1; + self->next_time_mapping.xbase = 0; + self->next_time_mapping.b = 0; + self->next_time_mapping.num = 1; + self->next_time_mapping.den = 1; +} + +static void gst_decklink_video_src_update_time_mapping (GstDecklinkVideoSrc * self, GstClockTime capture_time, GstClockTime stream_time) { @@ -811,6 +830,9 @@ return; } + if (no_signal) + self->no_signal_count++; + if (self->drop_no_signal_frames && no_signal) { CaptureFrame f; memset (&f, 0, sizeof (f)); @@ -823,6 +845,13 @@ return; } + if (!no_signal) { + if (self->no_signal_count > NO_SIGNL_RESET_COUNT) { + gst_decklink_reset_time_mapping(self); + } + self->no_signal_count = 0; + } + gst_decklink_video_src_update_time_mapping (self, capture_time, stream_time); if (self->output_stream_time) { timestamp = stream_time; @@ -1709,4 +1738,4 @@ out: return ret; -} +} \ No newline at end of file
View file
gst-plugins-bad-1.20.4.tar.xz/sys/decklink/gstdecklinkvideosrc.h -> gst-plugins-bad-1.20.5.tar.xz/sys/decklink/gstdecklinkvideosrc.h
Changed
@@ -69,6 +69,7 @@ guint64 processed; guint64 dropped; guint64 first_stream_time; + guint64 no_signal_count; GstVideoInfo info; GstDecklinkVideoFormat video_format;
View file
gst-plugins-bad-1.20.4.tar.xz/sys/dshowvideosink/dshowvideosink.cpp -> gst-plugins-bad-1.20.5.tar.xz/sys/dshowvideosink/dshowvideosink.cpp
Changed
@@ -120,7 +120,7 @@ if (sink->is_new_window) { /* If we created a new window */ - SendMessage (previous_window, WM_CLOSE, NULL, NULL); + SendMessage (previous_window, WM_CLOSE, 0, 0); sink->is_new_window = FALSE; sink->window_closed = FALSE; } else { @@ -636,7 +636,7 @@ height = vi->rcTarget.bottom + GetSystemMetrics (SM_CYCAPTION) + (GetSystemMetrics (SM_CYSIZEFRAME) * 2); - SystemParametersInfo (SPI_GETWORKAREA, NULL, &rect, 0); + SystemParametersInfo (SPI_GETWORKAREA, 0, &rect, 0); int screenwidth = rect.right - rect.left; int screenheight = rect.bottom - rect.top; offx = rect.left; @@ -1590,7 +1590,7 @@ /* If we created a new window, send the close message and wait until * it's closed in the window thread */ if (sink->is_new_window) { - SendMessage (sink->window_id, WM_CLOSE, NULL, NULL); + SendMessage (sink->window_id, WM_CLOSE, 0, 0); while (!sink->window_closed); sink->is_new_window = FALSE; }
View file
gst-plugins-bad-1.20.4.tar.xz/sys/mediafoundation/gstmfsourcereader.cpp -> gst-plugins-bad-1.20.5.tar.xz/sys/mediafoundation/gstmfsourcereader.cpp
Changed
@@ -171,6 +171,8 @@ while (!g_main_loop_is_running (self->loop)) g_cond_wait (&self->cond, &self->lock); g_mutex_unlock (&self->lock); + + G_OBJECT_CLASS (parent_class)->constructed (object); } static gboolean
View file
gst-plugins-bad-1.20.4.tar.xz/sys/mediafoundation/gstmfvideosrc.c -> gst-plugins-bad-1.20.5.tar.xz/sys/mediafoundation/gstmfvideosrc.c
Changed
@@ -435,16 +435,20 @@ ret = GST_BASE_SRC_CLASS (parent_class)->alloc (GST_BASE_SRC (self), 0, GST_VIDEO_INFO_SIZE (&self->info), &buf); - if (ret != GST_FLOW_OK) + if (ret != GST_FLOW_OK) { + gst_clear_buffer (&buf); return ret; + } ret = gst_mf_source_object_fill (self->source, buf); } else { ret = gst_mf_source_object_create (self->source, &buf); } - if (ret != GST_FLOW_OK) + if (ret != GST_FLOW_OK) { + gst_clear_buffer (&buf); return ret; + } GST_BUFFER_OFFSET (buf) = self->n_frames; GST_BUFFER_OFFSET_END (buf) = GST_BUFFER_OFFSET (buf) + 1;
View file
gst-plugins-bad-1.20.4.tar.xz/sys/mediafoundation/gstwin32devicewatcher.cpp -> gst-plugins-bad-1.20.5.tar.xz/sys/mediafoundation/gstwin32devicewatcher.cpp
Changed
@@ -94,6 +94,8 @@ while (!g_main_loop_is_running (self->loop)) g_cond_wait (&self->cond, &self->lock); g_mutex_unlock (&self->lock); + + G_OBJECT_CLASS (parent_class)->constructed (object); } static void
View file
gst-plugins-bad-1.20.4.tar.xz/tests/check/libs/mpegts.c -> gst-plugins-bad-1.20.5.tar.xz/tests/check/libs/mpegts.c
Changed
@@ -71,6 +71,16 @@ 0xc0, 0x00, 0xc4, 0x86, 0x56, 0xa5 }; +static gboolean +_has_iso6937_iconv (void) +{ + gboolean supported; + GIConv test = g_iconv_open ("iso6937", "utf-8"); + supported = (test != (GIConv) - 1); + g_iconv_close (test); + return supported; +} + GST_START_TEST (test_scte_sit) { GstMpegtsSCTESIT *sit; @@ -397,10 +407,12 @@ fail_if (data == NULL); - for (i = 0; i < data_size; i++) { - if (datai != nit_data_checki) - fail ("0x%X != 0x%X in byte %d of NIT section", datai, - nit_data_checki, i); + if (_has_iso6937_iconv ()) { + for (i = 0; i < data_size; i++) { + if (datai != nit_data_checki) + fail ("0x%X != 0x%X in byte %d of NIT section", datai, + nit_data_checki, i); + } } /* Check assertion on bad CRC. Reset parsed data, and make the CRC corrupt */ @@ -486,10 +498,12 @@ fail_if (data == NULL); - for (i = 0; i < data_size; i++) { - if (datai != sdt_data_checki) - fail ("0x%X != 0x%X in byte %d of SDT section", datai, - sdt_data_checki, i); + if (_has_iso6937_iconv ()) { + for (i = 0; i < data_size; i++) { + if (datai != sdt_data_checki) + fail ("0x%X != 0x%X in byte %d of SDT section", datai, + sdt_data_checki, i); + } } /* Check assertion on bad CRC. Reset parsed data, and make the CRC corrupt */ @@ -594,13 +608,16 @@ /* Check creation of descriptor */ desc = gst_mpegts_descriptor_from_dvb_network_name ("Name"); fail_if (desc == NULL); - fail_unless (desc->length == 4); + if (_has_iso6937_iconv ()) + fail_unless (desc->length == 4); fail_unless (desc->tag == 0x40); - for (i = 0; i < 6; i++) { - if (desc->datai != network_name_descriptori) - fail ("0x%X != 0x%X in byte %d of network name descriptor", - desc->datai, network_name_descriptori, i); + if (_has_iso6937_iconv ()) { + for (i = 0; i < 6; i++) { + if (desc->datai != network_name_descriptori) + fail ("0x%X != 0x%X in byte %d of network name descriptor", + desc->datai, network_name_descriptori, i); + } } /* Check parsing of descriptor */ @@ -623,13 +640,16 @@ desc = gst_mpegts_descriptor_from_dvb_service (GST_DVB_SERVICE_DIGITAL_TELEVISION, "Name", "Provider"); fail_if (desc == NULL); - fail_unless (desc->length == 15); + if (_has_iso6937_iconv ()) + fail_unless (desc->length == 15); fail_unless (desc->tag == 0x48); - for (i = 0; i < 17; i++) { - if (desc->datai != service_descriptori) - fail ("0x%X != 0x%X in byte %d of service descriptor", - desc->datai, service_descriptori, i); + if (_has_iso6937_iconv ()) { + for (i = 0; i < 17; i++) { + if (desc->datai != service_descriptori) + fail ("0x%X != 0x%X in byte %d of service descriptor", + desc->datai, service_descriptori, i); + } } /* Check parsing of descriptor with data */
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
.