Projects
Staging
vlc-beta
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 302
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/iconv/win32.patch
Deleted
@@ -1,17 +0,0 @@ ---- iconv/srclib/stdio-write.c.orig 2013-08-15 11:50:20.508093720 +0200 -+++ iconv/srclib/stdio-write.c 2013-08-15 11:51:36.344096864 +0200 -@@ -20,6 +20,14 @@ - /* Specification. */ - #include <stdio.h> - -+#ifdef _WIN32 -+#include <winapifamily.h> -+ -+#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) -+#define GetFileType(h) FILE_TYPE_UNKNOWN -+#endif -+#endif -+ - /* Replace these functions only if module 'nonblocking' or module 'sigpipe' is - requested. */ - #if GNULIB_NONBLOCKING || GNULIB_SIGPIPE
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/libxml2/nogetcwd.patch
Deleted
@@ -1,47 +0,0 @@ ---- libxml2/xmlIO.c.orig 2018-03-07 15:31:01.821589739 +0100 -+++ libxml2/xmlIO.c 2018-03-07 15:31:21.717589238 +0100 -@@ -3709,44 +3709,7 @@ - */ - char * - xmlParserGetDirectory(const char *filename) { -- char *ret = NULL; -- char dir1024; -- char *cur; -- --#ifdef _WIN32_WCE /* easy way by now ... wince does not have dirs! */ - return NULL; --#endif -- -- if (xmlInputCallbackInitialized == 0) -- xmlRegisterDefaultInputCallbacks(); -- -- if (filename == NULL) return(NULL); -- --#if defined(_WIN32) && !defined(__CYGWIN__) --# define IS_XMLPGD_SEP(ch) ((ch=='/')||(ch=='\\')) --#else --# define IS_XMLPGD_SEP(ch) (ch=='/') --#endif -- -- strncpy(dir, filename, 1023); -- dir1023 = 0; -- cur = &dirstrlen(dir); -- while (cur > dir) { -- if (IS_XMLPGD_SEP(*cur)) break; -- cur --; -- } -- if (IS_XMLPGD_SEP(*cur)) { -- if (cur == dir) dir1 = 0; -- else *cur = 0; -- ret = xmlMemStrdup(dir); -- } else { -- if (getcwd(dir, 1024) != NULL) { -- dir1023 = 0; -- ret = xmlMemStrdup(dir); -- } -- } -- return(ret); --#undef IS_XMLPGD_SEP - } - - /****************************************************************
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/orc/use-proper-func-detection.patch
Deleted
@@ -1,70 +0,0 @@ ---- orc/configure.ac.orig 2016-06-20 13:07:27.584543779 +0000 -+++ orc/configure.ac 2016-06-20 13:14:21.920651349 +0000 -@@ -90,20 +90,7 @@ - AS_COMPILER_FLAG(-Werror, ERROR_CFLAGS="-Werror") - fi - --case "${host_os}" in -- nobody_is_using_this_currently) -- AC_DEFINE(HAVE_CODEMEM_MALLOC, 1, Use malloc to allocate code for execution) -- ;; -- mingw*|pw32*|cygwin*) -- AC_DEFINE(HAVE_CODEMEM_VIRTUALALLOC, 1, Use VirtualAlloc to allocate code for execution) -- ;; -- linux*|darwin*|solaris*|netbsd*|freebsd*|openbsd*|kfreebsd*|dragonfly*|gnu*) -- AC_DEFINE(HAVE_CODEMEM_MMAP, 1, Use mmap to allocate code for execution) -- ;; -- *) -- AC_ERROR(no code allocation backend) -- ;; --esac -+AC_CHECK_FUNCS(VirtualAlloc mmap) - - case "${host_os}" in - mingw*|pw32*|cygwin*) ---- orc/orc/orccodemem.c.orig 2016-06-20 16:43:22.126619599 +0200 -+++ orc/orc/orccodemem.c 2016-06-20 16:45:03.370771546 +0200 -@@ -11,10 +11,10 @@ - #include <sys/types.h> - #include <sys/stat.h> - #include <fcntl.h> --#ifdef HAVE_CODEMEM_MMAP -+#ifdef HAVE_MMAP - #include <sys/mman.h> - #endif --#ifdef HAVE_CODEMEM_VIRTUALALLOC -+#ifdef HAVE_VIRTUALALLOC - #include <windows.h> - #endif - -@@ -190,7 +190,7 @@ - } - } - --#ifdef HAVE_CODEMEM_MMAP -+#ifdef HAVE_MMAP - int - orc_code_region_allocate_codemem_dual_map (OrcCodeRegion *region, - const char *dir, int force_unlink) -@@ -285,9 +285,7 @@ - "and $TMPDIR and $HOME are mounted noexec (bad)."); - } - --#endif -- --#ifdef HAVE_CODEMEM_VIRTUALALLOC -+#elif defined(HAVE_VIRTUALALLOC) - void - orc_code_region_allocate_codemem (OrcCodeRegion *region) - { -@@ -295,9 +293,7 @@ - region->exec_ptr = region->write_ptr; - region->size = SIZE; - } --#endif -- --#ifdef HAVE_CODEMEM_MALLOC -+#else - void - orc_code_region_allocate_codemem (OrcCodeRegion *region) - {
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/bin/Makefile.am -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/bin/Makefile.am
Changed
@@ -143,7 +143,7 @@ ../modules/plugins.dat: vlc-cache-gen$(EXEEXT) $(AM_V_at)rm -f ../modules/plugins.dat $(AM_V_GEN)if test "$(build)" = "$(host)"; then \ - ./vlc-cache-gen$(EXEEXT) `realpath ../modules` ; \ + ./vlc-cache-gen$(EXEEXT) `cd "../modules" ; pwd -P` ; \ else \ echo "Cross-compilation: cache generation skipped!" ; \ fi
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/config.h.meson -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/config.h.meson
Changed
@@ -521,9 +521,6 @@ /* host which ran configure */ #mesondefine VLC_COMPILE_HOST -/* Define to 1 if building for Windows Store. */ -#mesondefine VLC_WINSTORE_APP - #ifdef _WIN32 /* Define to limit the scope of <windows.h>. */
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/configure.ac -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/configure.ac
Changed
@@ -423,7 +423,6 @@ LDFLAGS="${LDFLAGS} -lwindowsappcompat" VLC_ADD_LIBS(libvlccore, -lruntimeobject) AC_LIBOBJ(gai_strerror) - AC_DEFINE(VLC_WINSTORE_APP, 1, Define to 1 if building for Windows Store.) ,) AC_SUBST(LIBCOM) AC_SUBST(LIBCOMCXXFLAGS)
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/amf/SHA512SUMS -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/amf/SHA512SUMS
Changed
@@ -1,1 +1,1 @@ -2c931ef7d38ade88a96041e0012605a5d25ec484bb2134f58310cf1a2c7212a869797cef99e2e751c8a6b3c473ba1f8762d4a5d41466d38cb5e31bf664a25f55 AMF-1.4.26.tar.gz +43d7d3c05cb385cc5b0b76562dae3f8d5fb0123300291019ddce1032eec55a664290bd9b0552073d3a5cc7036886a015d9edb1f17e2f0f8ffd07acf57360ec18 AMF-1.4.29.tar.gz
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/amf/rules.mak -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/amf/rules.mak
Changed
@@ -1,6 +1,6 @@ # AMF -AMF_VERSION := 1.4.26 +AMF_VERSION := 1.4.29 AMF_URL := $(GITHUB)/GPUOpen-LibrariesAndSDKs/AMF/archive/refs/tags/v$(AMF_VERSION).tar.gz ifeq ($(ARCH),x86_64)
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/aribb25/rules.mak -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/aribb25/rules.mak
Changed
@@ -4,7 +4,7 @@ ARIBB25_URL := $(VIDEOLAN)/aribb25/$(ARIBB25_VERSION)/aribb25-$(ARIBB25_VERSION).tar.gz ifdef HAVE_WIN32 -ifndef HAVE_WINSTORE +ifndef HAVE_WINSTORE # aribb25 uses ANSI strings in WIDE APIs PKGS += aribb25 endif endif
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/asdcplib/rules.mak -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/asdcplib/rules.mak
Changed
@@ -6,7 +6,7 @@ ifndef HAVE_IOS ifndef HAVE_ANDROID -ifndef HAVE_WINSTORE +ifndef HAVE_WINSTORE # FIXME uses some fordbidden SetErrorModes, GetModuleFileName in fileio.cpp PKGS += asdcplib endif endif
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/ass/SHA512SUMS -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/ass/SHA512SUMS
Changed
@@ -1,1 +1,1 @@ -1d2fd02fb2669de7f38ecfa0fe79e3c89da93e09c3cf6bf7b7b811a4808a06fd702da27ba1d9223c9a8a943198e7961b06c808a07e17d6cc6ba2ce70fd802300 libass-0.16.0.tar.gz +29c3f82e8d68ffc403941805202c4756b65cf48aeadbe9ae5e307ee4f52a5e4d916330ad26ec322aa92ddc72a4f01633033f9f628dbb8d8653a74b3e6eb7f735 libass-0.17.1.tar.gz
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/ass/rules.mak -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/ass/rules.mak
Changed
@@ -1,5 +1,5 @@ # ASS -ASS_VERSION := 0.16.0 +ASS_VERSION := 0.17.1 ASS_URL := $(GITHUB)/libass/libass/releases/download/$(ASS_VERSION)/libass-$(ASS_VERSION).tar.gz PKGS += ass @@ -9,26 +9,21 @@ ifdef HAVE_ANDROID WITH_FONTCONFIG = 0 -WITH_HARFBUZZ = 1 ifeq ($(ANDROID_ABI), x86) WITH_ASS_ASM = 0 endif else ifdef HAVE_DARWIN_OS WITH_FONTCONFIG = 0 -WITH_HARFBUZZ = 1 else ifdef HAVE_WIN32 WITH_FONTCONFIG = 0 -WITH_HARFBUZZ = 1 WITH_DWRITE = 1 else ifdef HAVE_EMSCRIPTEN WITH_FONTCONFIG = 0 -WITH_HARFBUZZ = 1 else WITH_FONTCONFIG = 1 -WITH_HARFBUZZ = 1 endif endif endif @@ -44,7 +39,7 @@ $(call pkg_static,"libass.pc.in") $(MOVE) -DEPS_ass = freetype2 $(DEPS_freetype2) fribidi $(DEPS_fribidi) iconv $(DEPS_iconv) +DEPS_ass = freetype2 $(DEPS_freetype2) fribidi $(DEPS_fribidi) iconv $(DEPS_iconv) harfbuzz $(DEPS_harfbuzz) ASS_CONF = --disable-test ifneq ($(WITH_FONTCONFIG), 0) @@ -57,12 +52,6 @@ ASS_CONF += --enable-directwrite endif -ifneq ($(WITH_HARFBUZZ), 0) -DEPS_ass += harfbuzz $(DEPS_harfbuzz) -else -ASS_CONF += --disable-harfbuzz -endif - ifeq ($(WITH_ASS_ASM), 0) ASS_CONF += --disable-asm endif
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/caca/rules.mak -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/caca/rules.mak
Changed
@@ -4,7 +4,7 @@ ifndef HAVE_DARWIN_OS ifndef HAVE_LINUX # see VLC Trac 17251 -ifndef HAVE_WINSTORE +ifndef HAVE_WINSTORE # FIXME uses ANSI calls improperly PKGS += caca endif endif
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/fxc2/rules.mak -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/fxc2/rules.mak
Changed
@@ -24,10 +24,10 @@ FXC2_CXX=aarch64-w64-mingw32-g++ FXC2_DLL=dll/d3dcompiler_47_arm64.dll else ifeq ($(ARCH),x86_64) -FXC2_CXX=$(CXX) +FXC2_CXX=$(CXX:uwp-g++=-g++) FXC2_DLL=dll/d3dcompiler_47.dll else ifeq ($(ARCH),i386) -FXC2_CXX=$(CXX) +FXC2_CXX=$(CXX:uwp-g++=-g++) FXC2_DLL=dll/d3dcompiler_47_32.dll else ifeq ($(shell command -v x86_64-w64-mingw32-g++ >/dev/null 2>&1 || echo FAIL),) FXC2_CXX=x86_64-w64-mingw32-g++
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/gcrypt/0007-random-don-t-use-API-s-that-are-forbidden-in-UWP-app.patch -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/gcrypt/0007-random-don-t-use-API-s-that-are-forbidden-in-UWP-app.patch
Changed
@@ -1,38 +1,42 @@ ---- gcrypt/random/rndw32.c.orig 2020-03-03 13:49:52.000000000 +0100 -+++ gcrypt/random/rndw32.c 2022-10-12 09:50:46.728155400 +0200 -@@ -338,7 +355,11 @@ read_mbm_data (void (*add)(const void*, +From 9e794b8b2065d233e21f378217705df6985f6a18 Mon Sep 17 00:00:00 2001 +From: Steve Lhomme <robux4@ycbcr.xyz> +Date: Fri, 19 Jun 2020 10:40:06 +0200 +Subject: PATCH 7/8 random: don't use API's that are forbidden in UWP apps to + init the random generator + +--- + random/rndw32.c | 30 +++++++++++++++++++++++++----- + 1 file changed, 25 insertions(+), 5 deletions(-) + +diff --git a/random/rndw32.c b/random/rndw32.c +index b3f63d20..02d20cc3 100644 +--- a/random/rndw32.c ++++ b/random/rndw32.c +@@ -338,6 +338,7 @@ read_mbm_data (void (*add)(const void*, size_t, enum random_origins), HANDLE hMBMData; SharedData *mbmDataPtr; -+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) ++#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) hMBMData = OpenFileMapping (FILE_MAP_READ, FALSE, "$M$B$M$5$S$D$" ); -+#else /* !WINAPI_PARTITION_DESKTOP */ -+ hMBMData = NULL; -+#endif /* !WINAPI_PARTITION_DESKTOP */ if (hMBMData) { - mbmDataPtr = (SharedData*)MapViewOfFile (hMBMData, FILE_MAP_READ,0,0,0); -@@ -439,8 +460,12 @@ registry_poll (void (*add)(const void*, - if ( debug_me ) - log_debug ("rndw32#slow_gatherer_nt: get perf data\n" ); - -+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - status = RegQueryValueEx (HKEY_PERFORMANCE_DATA, "Global", NULL, - NULL, (LPBYTE) pPerfData, &dwSize); -+#else /* !WINAPI_PARTITION_DESKTOP */ -+ status = ERROR_NO_DATA; -+#endif /* !WINAPI_PARTITION_DESKTOP */ - if (status == ERROR_SUCCESS) - { - if (!memcmp (pPerfData->Signature, L"PERF", 8)) -@@ -473,12 +498,14 @@ registry_poll (void (*add)(const void*, - xfree (pPerfData); +@@ -352,6 +353,7 @@ read_mbm_data (void (*add)(const void*, size_t, enum random_origins), + } + CloseHandle (hMBMData); } ++#endif /* WINAPI_PARTITION_DESKTOP */ + } -+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - /* Although this isn't documented in the Win32 API docs, it's necessary - to explicitly close the HKEY_PERFORMANCE_DATA key after use (it's - implicitly opened on the first call to RegQueryValueEx()). If this + +@@ -360,6 +362,7 @@ static void + registry_poll (void (*add)(const void*, size_t, enum random_origins), + enum random_origins requester) + { ++#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) + static int cbPerfData = PERFORMANCE_BUFFER_SIZE; + int iterations; + DWORD dwSize, status; +@@ -479,6 +482,7 @@ registry_poll (void (*add)(const void*, size_t, enum random_origins), isn't done then any system components which provide performance data can't be removed or changed while the handle remains active. */ RegCloseKey (HKEY_PERFORMANCE_DATA); @@ -40,111 +44,117 @@ } -@@ -501,6 +528,7 @@ slow_gatherer ( void (*add)(const void*, +@@ -497,6 +501,7 @@ slow_gatherer ( void (*add)(const void*, size_t, enum random_origins), + + if ( !is_initialized ) + { ++#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) + HKEY hKey; if ( debug_me ) - log_debug ("rndw32#slow_gatherer: init toolkit\n" ); -+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - /* Find out whether this is an NT server or workstation if necessary */ - if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, - "SYSTEM\\CurrentControlSet\\Control\\ProductOptions", -@@ -550,6 +578,7 @@ slow_gatherer ( void (*add)(const void*, - log_debug ("rndw32: No NETAPI found\n" ); - } +@@ -566,6 +571,10 @@ slow_gatherer ( void (*add)(const void*, size_t, enum random_origins), + if (!pNtQuerySystemInformation || !pNtQueryInformationProcess) + hNTAPI = NULL; + } ++#else /* !WINAPI_PARTITION_DESKTOP */ ++ hNetAPI32 = NULL; ++ hNTAPI = NULL; ++#endif /* !WINAPI_PARTITION_DESKTOP */ + + + is_initialized = 1; +@@ -595,6 +604,7 @@ slow_gatherer ( void (*add)(const void*, size_t, enum random_origins), + } + } + ++#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) + /* Get disk I/O statistics for all the hard drives. 100 is an + arbitrary failsafe limit. */ + for (drive_no = 0; drive_no < 100 ; drive_no++) +@@ -629,6 +639,7 @@ slow_gatherer ( void (*add)(const void*, size_t, enum random_origins), } + CloseHandle (hDevice); + } +#endif /* WINAPI_PARTITION_DESKTOP */ - /* Initialize the NT kernel native API function pointers if necessary */ - hNTAPI = GetModuleHandle ("NTDll.dll"); -@@ -794,10 +823,12 @@ _gcry_rndw32_gather_random (void (*add)( - if ((s = getenv ("GCRYPT_RNDW32_DBG")) && atoi (s) > 0) - debug_me = 1; + /* In theory we should be using the Win32 performance query API to obtain + unpredictable data from the system, however this is so unreliable (see +@@ -788,6 +799,7 @@ _gcry_rndw32_gather_random (void (*add)(const void*, size_t, + + if (!is_initialized) + { ++#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) + OSVERSIONINFO osvi = { sizeof( osvi ) }; + const char *s; -+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - GetVersionEx( &osvi ); +@@ -798,7 +810,9 @@ _gcry_rndw32_gather_random (void (*add)(const void*, size_t, if (osvi.dwPlatformId != VER_PLATFORM_WIN32_NT) log_fatal ("can only run on a Windows NT platform\n" ); system_is_w2000 = (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0); -+#endif /* WINAPI_PARTITION_DESKTOP */ - +- ++#else /* !WINAPI_PARTITION_DESKTOP */ ++ system_is_w2000 = 0; ++#endif /* !WINAPI_PARTITION_DESKTOP */ init_system_rng (); is_initialized = 1; -@@ -856,22 +887,28 @@ _gcry_rndw32_gather_random_fast (void (* + } +@@ -856,14 +870,11 @@ _gcry_rndw32_gather_random_fast (void (*add)(const void*, size_t, ADDINT((SIZE_T)aptr); \ } while (0) -+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) ++#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) ADDPTR ( GetActiveWindow ()); ADDPTR ( GetCapture ()); ADDPTR ( GetClipboardOwner ()); ADDPTR ( GetClipboardViewer ()); -+#endif /* WINAPI_PARTITION_DESKTOP */ - ADDPTR ( GetCurrentProcess ()); - ADDINT ( GetCurrentProcessId ()); - ADDPTR ( GetCurrentThread ()); - ADDINT ( GetCurrentThreadId ()); -+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) +- ADDPTR ( GetCurrentProcess ()); +- ADDINT ( GetCurrentProcessId ()); +- ADDPTR ( GetCurrentThread ()); +- ADDINT ( GetCurrentThreadId ()); ADDPTR ( GetDesktopWindow ()); ADDPTR ( GetFocus ()); ADDINT ( GetInputState ()); - ADDINT ( GetMessagePos ()); - ADDINT ( GetMessageTime ()); +@@ -872,6 +883,11 @@ _gcry_rndw32_gather_random_fast (void (*add)(const void*, size_t, ADDPTR ( GetOpenClipboardWindow ()); -+#endif /* WINAPI_PARTITION_DESKTOP */ ADDPTR ( GetProcessHeap ()); -+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) ADDPTR ( GetProcessWindowStation ()); +#endif /* WINAPI_PARTITION_DESKTOP */ ++ ADDPTR ( GetCurrentProcess ()); ++ ADDINT ( GetCurrentProcessId ()); ++ ADDPTR ( GetCurrentThread ()); ++ ADDINT ( GetCurrentThreadId ()); /* Following function in some cases stops returning events, and cannot be used as an entropy source. */ /*ADDINT ( GetQueueStatus (QS_ALLEVENTS));*/ -@@ -883,6 +920,7 @@ _gcry_rndw32_gather_random_fast (void (* - #undef ADDPTR - } +@@ -885,6 +901,7 @@ _gcry_rndw32_gather_random_fast (void (*add)(const void*, size_t, -+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) /* Get multiword system information: Current caret position, current mouse cursor position. */ ++#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) { -@@ -893,6 +931,7 @@ _gcry_rndw32_gather_random_fast (void (* - GetCursorPos (&point); - (*add) ( &point, sizeof (point), origin ); - }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/gcrypt/0008-random-only-use-wincrypt-in-UWP-builds-if-WINSTORECO.patch -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/gcrypt/0008-random-only-use-wincrypt-in-UWP-builds-if-WINSTORECO.patch
Changed
@@ -1,7 +1,7 @@ -From 1b09aa078628e93c0f95f0d5e20e708f81068bf5 Mon Sep 17 00:00:00 2001 +From 0673f231f333179d4698877ec40cdf43bf5b77c1 Mon Sep 17 00:00:00 2001 From: Steve Lhomme <robux4@ycbcr.xyz> Date: Fri, 19 Jun 2020 10:37:50 +0200 -Subject: PATCH 8/9 random: only use wincrypt in UWP builds if WINSTORECOMPAT +Subject: PATCH 5/5 random: only use wincrypt in UWP builds if WINSTORECOMPAT is set This is a compatibility library to use older APIs that are forbidden in UWP apps. @@ -9,39 +9,53 @@ bcrypt is supposed to be used instead of wincrypt but is only available since Vista. --- - random/rndw32.c | 17 +++++++++++++++++ + random/rndw32.c | 22 ++++++++++++++++++++-- src/Makefile.am | 4 +++- - 2 files changed, 20 insertions(+), 1 deletion(-) + 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/random/rndw32.c b/random/rndw32.c -index 45d1e7e7..8b0a38fa 100644 +index 02d20cc3..f1b559e9 100644 --- a/random/rndw32.c +++ b/random/rndw32.c -@@ -98,6 +98,9 @@ +@@ -97,7 +97,11 @@ + #define SIZEOF_DISK_PERFORMANCE_STRUCT 256 /* We don't include wincrypt.h so define it here. */ - #define HCRYPTPROV HANDLE +#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && defined(WINSTORECOMPAT) +#include <wincrypt.h> ++#else + #define HCRYPTPROV HANDLE +#endif /* When we query the performance counters, we allocate an initial buffer and -@@ -260,6 +263,7 @@ init_system_rng (void) +@@ -114,7 +118,7 @@ + + /* Intel Chipset CSP type and name */ + #define PROV_INTEL_SEC 22 +-#define INTEL_DEF_PROV "Intel Hardware Cryptographic Service Provider" ++#define INTEL_DEF_PROV TEXT("Intel Hardware Cryptographic Service Provider") + + + +@@ -258,8 +262,9 @@ static void + init_system_rng (void) + { system_rng_available = 0; - hRNGProv = NULL; +- hRNGProv = NULL; ++ hRNGProv = (HCRYPTPROV)NULL; +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) hAdvAPI32 = GetModuleHandle ("AdvAPI32.dll"); if (!hAdvAPI32) return; -@@ -275,6 +279,19 @@ init_system_rng (void) +@@ -275,6 +280,19 @@ init_system_rng (void) This isn't exported by name, so we have to get it by ordinal. */ pRtlGenRandom = (RTLGENRANDOM) GetProcAddress (hAdvAPI32, "SystemFunction036"); +#elif defined(WINSTORECOMPAT) + hAdvAPI32 = NULL; -+ pCryptAcquireContext = CryptAcquireContextA; ++ pCryptAcquireContext = CryptAcquireContextW; + pCryptGenRandom = CryptGenRandom; + pCryptReleaseContext = CryptReleaseContext; + pRtlGenRandom = NULL; @@ -56,20 +70,20 @@ /* Try and connect to the PIII RNG CSP. The AMD 768 southbridge (from the 760 MP chipset) also has a hardware RNG, but there doesn't appear diff --git a/src/Makefile.am b/src/Makefile.am -index 3cc4a552..a22acd41 100644 +index aa3548f6..154b35c7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am -@@ -127,6 +127,10 @@ libgcrypt_la_LIBADD = $(gcrypt_res) \ +@@ -126,7 +126,9 @@ libgcrypt_la_LIBADD = $(gcrypt_res) \ + ../random/librandom.la \ ../mpi/libmpi.la \ ../compat/libcompat.la $(DL_LIBS) $(GPG_ERROR_LIBS) - +- +if HAVE_W32_SYSTEM +libgcrypt_la_LIBADD += -lbcrypt +endif -+ dumpsexp_SOURCES = dumpsexp.c dumpsexp_CFLAGS = $(arch_gpg_error_cflags) -- -2.26.0.windows.1 +2.37.3.windows.1
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/gcrypt/disable-tests-compilation.patch -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/gcrypt/disable-tests-compilation.patch
Changed
@@ -1,6 +1,17 @@ ---- libgcrypt-1.7.3/Makefile.am.orig 2016-08-24 15:10:23.181783280 +0200 -+++ libgcrypt-1.7.3/Makefile.am 2016-08-24 15:11:19.813780757 +0200 -@@ -31,8 +31,8 @@ +From 35d4dd642c955f5aa006ad8d105105a15ff14921 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org> +Date: Fri, 11 Sep 2015 16:43:11 +0200 +Subject: PATCH 1/5 disable tests compilation + +--- + Makefile.am | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 77355d1a..737f32ad 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -41,8 +41,8 @@ doc = endif @@ -11,3 +22,6 @@ EXTRA_DIST = autogen.sh autogen.rc README.GIT LICENSES \ ChangeLog-2011 build-aux/ChangeLog-2011 doc/ChangeLog-2011 \ +-- +2.37.3.windows.1 +
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/gcrypt/fix-pthread-detection.patch -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/gcrypt/fix-pthread-detection.patch
Changed
@@ -1,14 +1,25 @@ ---- libgcrypt/configure.ac.old 2017-04-20 16:49:00.239092950 +0200 -+++ libgcrypt/configure.ac 2017-04-20 16:57:18.205011934 +0200 -@@ -215,7 +215,6 @@ - print_egd_notice=no +From 54a245738b12ad8985935de0ffea24980ce48db9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr> +Date: Thu, 20 Apr 2017 17:26:02 +0200 +Subject: PATCH 2/5 Fix pthread detection + +--- + configure.ac | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 6ea38f53..781f3163 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -239,7 +239,6 @@ LIBGCRYPT_THREAD_MODULES="" + # Other definitions. have_w32_system=no have_w32ce_system=no -have_pthread=no # Setup some stuff depending on host. -@@ -751,10 +750,9 @@ +@@ -828,10 +827,9 @@ AC_SUBST(PTH_LIBS) # Check whether pthreads is available # if test "$have_w32_system" != yes; then @@ -22,3 +33,6 @@ fi +-- +2.37.3.windows.1 +
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/gcrypt/rules.mak -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/gcrypt/rules.mak
Changed
@@ -1,6 +1,6 @@ # GCRYPT GCRYPT_VERSION := 1.10.1 -GCRYPT_URL := https://www.gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-$(GCRYPT_VERSION).tar.bz2 +GCRYPT_URL := $(GNUGPG)/libgcrypt/libgcrypt-$(GCRYPT_VERSION).tar.bz2 PKGS += gcrypt ifeq ($(call need_pkg,"libgcrypt"),)
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/gettext/rules.mak -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/gettext/rules.mak
Changed
@@ -2,7 +2,7 @@ GETTEXT_VERSION := 0.21 GETTEXT_URL := $(GNU)/gettext/gettext-$(GETTEXT_VERSION).tar.gz -ifndef HAVE_WINSTORE +ifndef HAVE_WINSTORE # FIXME uses sys/socket.h improperly PKGS += gettext endif ifneq ($(filter gnu%,$(subst -, ,$(HOST))),)
View file
_service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/gnutls/0001-Use-CreateFile2-in-UWP-builds.patch
Added
@@ -0,0 +1,73 @@ +From 8425c77fe89d66cd8d5411d0ccd14c688de1416a Mon Sep 17 00:00:00 2001 +From: Steve Lhomme <robux4@ycbcr.xyz> +Date: Tue, 16 May 2023 09:40:34 +0200 +Subject: PATCH Use CreateFile2 in UWP builds + +CreateFileA and CreateFileW are forbidden calls in UWP. +CreateFile2 is close enough, some parameters are passed in a structure +and it requires a WCHAR filename. Given the original stat uses the +"multibyte code page currently in use" 1, the char should be converted +using CP_ACP 2. + +1 https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/stat-functions +2 https://learn.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-multibytetowidechar#parameters +--- + lib/stat.c | 35 +++++++++++++++++++++++++++++++++++ + 1 file changed, 35 insertions(+) + +diff --git a/gl/stat.c b/gl/stat.c +index 7987e26583..f0e95a27dc 100644 +--- a/gl/stat.c ++++ b/gl/stat.c +@@ -197,6 +197,7 @@ rpl_stat (char const *name, struct stat *buf) + { + /* Approach based on the file. */ + ++# if !defined WINAPI_FAMILY || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) + /* Open a handle to the file. + CreateFile + <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-createfilea> +@@ -212,6 +213,40 @@ rpl_stat (char const *name, struct stat *buf) + filesystem operations. */ + FILE_FLAG_BACKUP_SEMANTICS /* | FILE_FLAG_POSIX_SEMANTICS */, + NULL); ++# else ++ /* Only CreateFile2 is available in UWP builds. ++ <https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfile2> ++ <https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-file-l1-2-1dll> */ ++ HANDLE h = INVALID_HANDLE_VALUE; ++ int wlen = MultiByteToWideChar (CP_ACP, 0, rname, -1, NULL, 0); ++ if (wlen > 0) ++ { ++ WCHAR *wrname = malloca (wlen * sizeof (WCHAR)); ++ if (wrname != NULL) ++ { ++ MultiByteToWideChar (CP_ACP, 0, rname, -1, wrname, wlen); ++ ++ CREATEFILE2_EXTENDED_PARAMETERS createExParams; ++ createExParams.dwSize = sizeof(CREATEFILE2_EXTENDED_PARAMETERS); ++ createExParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL; ++ /* FILE_FLAG_POSIX_SEMANTICS (treat file names that differ only ++ in case as different) makes sense only when applied to *all* ++ filesystem operations. */ ++ createExParams.dwFileFlags = FILE_FLAG_BACKUP_SEMANTICS; ++ createExParams.dwSecurityQosFlags = 0; ++ createExParams.lpSecurityAttributes = NULL; ++ createExParams.hTemplateFile = NULL; ++ ++ h = ++ CreateFile2 (wrname, ++ FILE_READ_ATTRIBUTES, ++ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, ++ OPEN_EXISTING, ++ &createExParams); ++ freea(wrname); ++ } ++ } ++# endif + if (h != INVALID_HANDLE_VALUE) + { + ret = _gl_fstat_by_handle (h, rname, buf); +-- +2.37.3.windows.1 +
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/gnutls/rules.mak -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/gnutls/rules.mak
Changed
@@ -1,7 +1,7 @@ # GnuTLS GNUTLS_VERSION := 3.6.16 -GNUTLS_URL := https://www.gnupg.org/ftp/gcrypt/gnutls/v3.6/gnutls-$(GNUTLS_VERSION).tar.xz +GNUTLS_URL := $(GNUGPG)/gnutls/v3.6/gnutls-$(GNUTLS_VERSION).tar.xz ifdef BUILD_NETWORK ifndef HAVE_DARWIN_OS @@ -47,6 +47,9 @@ $(APPLY) $(SRC)/gnutls/0001-windows-Avoid-Wint-conversion-errors.patch + # use CreateFile2 instead of CreateFile in UWP + $(APPLY) $(SRC)/gnutls/0001-Use-CreateFile2-in-UWP-builds.patch + $(UPDATE_AUTOCONFIG) $(MOVE) @@ -71,11 +74,6 @@ ifdef HAVE_ANDROID GNUTLS_ENV := gl_cv_header_working_stdint_h=yes endif -ifdef HAVE_WINSTORE -ifeq ($(ARCH),x86_64) - GNUTLS_CONF += --disable-hardware-acceleration -endif -endif ifdef HAVE_WIN32 GNUTLS_CONF += --without-idn ifeq ($(ARCH),aarch64)
View file
_service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/gpg-error/gpg-error-uwp-fix.patch
Added
@@ -0,0 +1,11 @@ +--- libgpg-error/src/mkheader.c.orig 2023-05-12 13:24:34.270562700 +0200 ++++ libgpg-error/src/mkheader.c 2023-05-15 08:26:10.678024100 +0200 +@@ -518,7 +518,7 @@ write_special (const char *fname, int ln + } + else if (!strcmp (tag, "include:os-add")) + { +- if (!strcmp (host_os, "mingw32")) ++ if (!strcmp (host_os, "mingw32") || !strcmp (host_os, "mingw32uwp") || !strcmp (host_os, "mingw32ucrt")) + { + include_file (fname, lnr, "w32-add.h", write_line); + }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/gpg-error/rules.mak -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/gpg-error/rules.mak
Changed
@@ -1,6 +1,6 @@ # GPGERROR GPGERROR_VERSION := 1.27 -GPGERROR_URL := https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-$(GPGERROR_VERSION).tar.bz2 +GPGERROR_URL := $(GNUGPG)/libgpg-error/libgpg-error-$(GPGERROR_VERSION).tar.bz2 $(TARBALLS)/libgpg-error-$(GPGERROR_VERSION).tar.bz2: $(call download_pkg,$(GPGERROR_URL),gpg-error) @@ -28,6 +28,10 @@ cp -f -- "$(SRC)/gpg-error/lock-obj-pub.posix.h" \ "$(UNPACK_DIR)/src/lock-obj-pub.native.h" endif + # gpg-error doesn't know about mingw32uwp but it's the same as mingw32 + cp -f -- "$(UNPACK_DIR)/src/syscfg/lock-obj-pub.mingw32.h" \ + "$(UNPACK_DIR)/src/syscfg/lock-obj-pub.mingw32uwp.h" + $(APPLY) $(SRC)/gpg-error/gpg-error-uwp-fix.patch $(MOVE) GPGERROR_CONF := \
View file
_service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/iconv/0001-Use-CreateFile2-in-UWP-builds.patch
Added
@@ -0,0 +1,73 @@ +From 8425c77fe89d66cd8d5411d0ccd14c688de1416a Mon Sep 17 00:00:00 2001 +From: Steve Lhomme <robux4@ycbcr.xyz> +Date: Tue, 16 May 2023 09:40:34 +0200 +Subject: PATCH Use CreateFile2 in UWP builds + +CreateFileA and CreateFileW are forbidden calls in UWP. +CreateFile2 is close enough, some parameters are passed in a structure +and it requires a WCHAR filename. Given the original stat uses the +"multibyte code page currently in use" 1, the char should be converted +using CP_ACP 2. + +1 https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/stat-functions +2 https://learn.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-multibytetowidechar#parameters +--- + lib/stat.c | 35 +++++++++++++++++++++++++++++++++++ + 1 file changed, 35 insertions(+) + +diff --git a/srclib/stat.c b/srclib/stat.c +index 7987e26583..f0e95a27dc 100644 +--- a/srclib/stat.c ++++ b/srclib/stat.c +@@ -197,6 +197,7 @@ rpl_stat (char const *name, struct stat *buf) + { + /* Approach based on the file. */ + ++# if !defined WINAPI_FAMILY || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) + /* Open a handle to the file. + CreateFile + <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-createfilea> +@@ -212,6 +213,40 @@ rpl_stat (char const *name, struct stat *buf) + filesystem operations. */ + FILE_FLAG_BACKUP_SEMANTICS /* | FILE_FLAG_POSIX_SEMANTICS */, + NULL); ++# else ++ /* Only CreateFile2 is available in UWP builds. ++ <https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfile2> ++ <https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-file-l1-2-1dll> */ ++ HANDLE h = INVALID_HANDLE_VALUE; ++ int wlen = MultiByteToWideChar (CP_ACP, 0, rname, -1, NULL, 0); ++ if (wlen > 0) ++ { ++ WCHAR *wrname = malloca (wlen * sizeof (WCHAR)); ++ if (wrname != NULL) ++ { ++ MultiByteToWideChar (CP_ACP, 0, rname, -1, wrname, wlen); ++ ++ CREATEFILE2_EXTENDED_PARAMETERS createExParams; ++ createExParams.dwSize = sizeof(CREATEFILE2_EXTENDED_PARAMETERS); ++ createExParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL; ++ /* FILE_FLAG_POSIX_SEMANTICS (treat file names that differ only ++ in case as different) makes sense only when applied to *all* ++ filesystem operations. */ ++ createExParams.dwFileFlags = FILE_FLAG_BACKUP_SEMANTICS; ++ createExParams.dwSecurityQosFlags = 0; ++ createExParams.lpSecurityAttributes = NULL; ++ createExParams.hTemplateFile = NULL; ++ ++ h = ++ CreateFile2 (wrname, ++ FILE_READ_ATTRIBUTES, ++ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, ++ OPEN_EXISTING, ++ &createExParams); ++ freea(wrname); ++ } ++ } ++# endif + if (h != INVALID_HANDLE_VALUE) + { + ret = _gl_fstat_by_handle (h, rname, buf); +-- +2.37.3.windows.1 +
View file
_service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/iconv/0001-do-not-call-GetHandleInformation-in-Winstore-apps.patch
Added
@@ -0,0 +1,41 @@ +From c934bfdfc343fbb4d84e59a339cde57b30779581 Mon Sep 17 00:00:00 2001 +From: Steve Lhomme <robux4@ycbcr.xyz> +Date: Thu, 4 Jun 2020 10:15:38 +0200 +Subject: PATCH do not call GetHandleInformation() in Winstore apps + +The API is forbidden 1 and HANDLE_FLAG_INHERIT would never be set as exec() +is not allowed either 2. + +1 https://docs.microsoft.com/en-us/windows/win32/api/handleapi/nf-handleapi-gethandleinformation +2 https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps +--- + lib/fcntl.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/srclib/fcntl.c b/srclib/fcntl.c +index e220800845..c95322b2d4 100644 +--- a/srclib/fcntl.c ++++ b/srclib/fcntl.c +@@ -45,6 +45,19 @@ + # include <io.h> + # endif + ++# if defined WINAPI_FAMILY && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) ++/* GetHandleInformation is not available in UWP, the flags it would provide ++ are also not available, so we just return 0. ++ <https://docs.microsoft.com/en-us/windows/win32/api/handleapi/nf-handleapi-gethandleinformation> ++ <https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis> */ ++static inline BOOL GetHandleInformation(HANDLE h, DWORD *pf) ++{ ++ *pf = 0; ++ return TRUE; ++} ++# define HANDLE_FLAG_INHERIT (1) ++# endif /* WINAPI_PARTITION_DESKTOP */ ++ + /* Upper bound on getdtablesize(). See lib/getdtablesize.c. */ + # define OPEN_MAX_MAX 0x10000 + +-- +2.37.3.windows.1 +
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/iconv/SHA512SUMS -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/iconv/SHA512SUMS
Changed
@@ -1,1 +1,1 @@ -365dac0b34b4255a0066e8033a8b3db4bdb94b9b57a9dca17ebf2d779139fe935caf51a465d17fd8ae229ec4b926f3f7025264f37243432075e5583925bb77b7 libiconv-1.16.tar.gz +18a09de2d026da4f2d8b858517b0f26d853b21179cf4fa9a41070b2d140030ad9525637dc4f34fc7f27abca8acdc84c6751dfb1d426e78bf92af4040603ced86 libiconv-1.17.tar.gz \ No newline at end of file
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/iconv/rules.mak -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/iconv/rules.mak
Changed
@@ -1,5 +1,5 @@ # libiconv -LIBICONV_VERSION := 1.16 +LIBICONV_VERSION := 1.17 LIBICONV_URL := $(GNU)/libiconv/libiconv-$(LIBICONV_VERSION).tar.gz PKGS += iconv @@ -22,8 +22,15 @@ iconv: libiconv-$(LIBICONV_VERSION).tar.gz .sum-iconv $(UNPACK) - $(APPLY) $(SRC)/iconv/win32.patch $(APPLY) $(SRC)/iconv/bins.patch + + # use CreateFile2 instead of CreateFile in UWP + $(APPLY) $(SRC)/iconv/0001-Use-CreateFile2-in-UWP-builds.patch + + # fix forbidden UWP call which can't be upstreamed as they won't + # differentiate for winstore, only _WIN32_WINNT + $(APPLY) $(SRC)/iconv/0001-do-not-call-GetHandleInformation-in-Winstore-apps.patch + $(UPDATE_AUTOCONFIG) cd $(UNPACK_DIR) && cp config.guess config.sub build-aux \ && mv config.guess config.sub libcharset/build-aux
View file
_service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/libarchive/libarchive-winstorecompat-crypt.patch
Added
@@ -0,0 +1,16 @@ +--- libarchive/libarchive/archive_digest.c.orig 2022-04-08 13:40:26.000000000 +0200 ++++ libarchive/libarchive/archive_digest.c 2023-05-12 15:35:03.525598300 +0200 +@@ -30,6 +30,13 @@ + #include "archive.h" + #include "archive_digest_private.h" + ++#ifdef WINSTORECOMPAT ++WINIMPM WINBOOL WINAPI CryptCreateHash (HCRYPTPROV hProv, ALG_ID Algid, HCRYPTKEY hKey, DWORD dwFlags, HCRYPTHASH *phHash); ++WINIMPM WINBOOL WINAPI CryptHashData (HCRYPTHASH hHash, CONST BYTE *pbData, DWORD dwDataLen, DWORD dwFlags); ++WINIMPM WINBOOL WINAPI CryptGetHashParam (HCRYPTHASH hHash, DWORD dwParam, BYTE *pbData, DWORD *pdwDataLen, DWORD dwFlags); ++WINIMPM WINBOOL WINAPI CryptDestroyHash (HCRYPTHASH hHash); ++#endif ++ + /* In particular, force the configure probe to break if it tries + * to test a combination of OpenSSL and libmd. */ + #if defined(ARCHIVE_CRYPTO_OPENSSL) && defined(ARCHIVE_CRYPTO_LIBMD)
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/libarchive/rules.mak -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/libarchive/rules.mak
Changed
@@ -31,6 +31,8 @@ ifdef HAVE_WINSTORE $(APPLY) $(SRC)/libarchive/winrt.patch endif + # fallback to Winstore Compat versions of Crypt API's + $(APPLY) $(SRC)/libarchive/libarchive-winstorecompat-crypt.patch $(call pkg_static,"build/pkgconfig/libarchive.pc.in") $(MOVE)
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/libarchive/winrt.patch -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/libarchive/winrt.patch
Changed
@@ -481,17 +481,6 @@ #if !defined(__BORLANDC__) && !defined(__WATCOMC__) #define setmode _setmode #endif -@@ -122,8 +124,10 @@ - #define umask _umask - #endif - #endif -+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - #define waitpid __la_waitpid - #define write __la_write -+#endif - - #if !defined(__WATCOMC__) - @@ -276,8 +280,10 @@ extern int __la_stat(const char *path, struct stat *st); extern pid_t __la_waitpid(HANDLE child, int *status, int option); extern ssize_t __la_write(int fd, const void *buf, size_t nbytes);
View file
_service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/libdsm/0001-Avoid-relying-on-implicit-function-declarations.patch
Added
@@ -0,0 +1,51 @@ +From a95e2ee2056317383d885574464f64dcc5509ce4 Mon Sep 17 00:00:00 2001 +From: Johannes Kauffmann <johanneskauffmann@hotmail.com> +Date: Wed, 7 Sep 2022 00:54:00 +0200 +Subject: PATCH Avoid relying on implicit function declarations + +smb_ntlm.c includes stdlib.h transitively via config.h -> compat.h. +This means that defining _CRT_RAND_S in smb_ntlm.c (before including +config.h itself) does not have the desired effect of pulling in the +rand_s() function declaration. + +To fix this (and the Wimplicit-function-declaration warning, which has +become an error in Clang 16), define _CRT_RAND_S before including +stdlib.h. +--- + compat/compat.h | 4 ++++ + src/smb_ntlm.c | 4 ---- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/compat/compat.h b/compat/compat.h +index eadfae8..014298c 100644 +--- a/compat/compat.h ++++ b/compat/compat.h +@@ -31,6 +31,10 @@ + #ifndef BDSM_COMPAT_H + # define BDSM_COMPAT_H + ++#ifdef _WIN32 ++# define _CRT_RAND_S /* needed before including stdlib.h !!! */ ++#endif ++ + #include <stdlib.h> + #if !defined HAVE_STRLCPY && !defined HAVE_LIBBSD + size_t strlcpy(char *dst, const char *src, size_t siz); +diff --git a/src/smb_ntlm.c b/src/smb_ntlm.c +index 998afd3..c55d169 100644 +--- a/src/smb_ntlm.c ++++ b/src/smb_ntlm.c +@@ -32,10 +32,6 @@ + # include "config.h" + #endif + +-#ifdef _WIN32 +-# define _CRT_RAND_S +-#endif +- + #include <assert.h> + #include <ctype.h> + #include <wctype.h> +-- +2.37.3.windows.1 +
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/libdsm/rules.mak -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/libdsm/rules.mak
Changed
@@ -14,6 +14,7 @@ libdsm: libdsm-$(LIBDSM_VERSION).tar.xz .sum-libdsm $(UNPACK) + $(APPLY) $(SRC)/libdsm/0001-Avoid-relying-on-implicit-function-declarations.patch $(MOVE) DEPS_libdsm = libtasn1 $(DEPS_libtasn1) iconv $(DEPS_iconv)
View file
_service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/libtasn1/0001-Use-CreateFile2-in-UWP-builds.patch
Added
@@ -0,0 +1,73 @@ +From 8425c77fe89d66cd8d5411d0ccd14c688de1416a Mon Sep 17 00:00:00 2001 +From: Steve Lhomme <robux4@ycbcr.xyz> +Date: Tue, 16 May 2023 09:40:34 +0200 +Subject: PATCH Use CreateFile2 in UWP builds + +CreateFileA and CreateFileW are forbidden calls in UWP. +CreateFile2 is close enough, some parameters are passed in a structure +and it requires a WCHAR filename. Given the original stat uses the +"multibyte code page currently in use" 1, the char should be converted +using CP_ACP 2. + +1 https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/stat-functions +2 https://learn.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-multibytetowidechar#parameters +--- + lib/stat.c | 35 +++++++++++++++++++++++++++++++++++ + 1 file changed, 35 insertions(+) + +diff --git a/src/gl/stat.c b/src/gl/stat.c +index 7987e26583..f0e95a27dc 100644 +--- a/src/gl/stat.c ++++ b/src/gl/stat.c +@@ -197,6 +197,7 @@ rpl_stat (char const *name, struct stat *buf) + { + /* Approach based on the file. */ + ++# if !defined WINAPI_FAMILY || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) + /* Open a handle to the file. + CreateFile + <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-createfilea> +@@ -212,6 +213,40 @@ rpl_stat (char const *name, struct stat *buf) + filesystem operations. */ + FILE_FLAG_BACKUP_SEMANTICS /* | FILE_FLAG_POSIX_SEMANTICS */, + NULL); ++# else ++ /* Only CreateFile2 is available in UWP builds. ++ <https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfile2> ++ <https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-file-l1-2-1dll> */ ++ HANDLE h = INVALID_HANDLE_VALUE; ++ int wlen = MultiByteToWideChar (CP_ACP, 0, rname, -1, NULL, 0); ++ if (wlen > 0) ++ { ++ WCHAR *wrname = malloca (wlen * sizeof (WCHAR)); ++ if (wrname != NULL) ++ { ++ MultiByteToWideChar (CP_ACP, 0, rname, -1, wrname, wlen); ++ ++ CREATEFILE2_EXTENDED_PARAMETERS createExParams; ++ createExParams.dwSize = sizeof(CREATEFILE2_EXTENDED_PARAMETERS); ++ createExParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL; ++ /* FILE_FLAG_POSIX_SEMANTICS (treat file names that differ only ++ in case as different) makes sense only when applied to *all* ++ filesystem operations. */ ++ createExParams.dwFileFlags = FILE_FLAG_BACKUP_SEMANTICS; ++ createExParams.dwSecurityQosFlags = 0; ++ createExParams.lpSecurityAttributes = NULL; ++ createExParams.hTemplateFile = NULL; ++ ++ h = ++ CreateFile2 (wrname, ++ FILE_READ_ATTRIBUTES, ++ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, ++ OPEN_EXISTING, ++ &createExParams); ++ freea(wrname); ++ } ++ } ++# endif + if (h != INVALID_HANDLE_VALUE) + { + ret = _gl_fstat_by_handle (h, rname, buf); +-- +2.37.3.windows.1 +
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/libtasn1/rules.mak -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/libtasn1/rules.mak
Changed
@@ -15,6 +15,9 @@ libtasn1: libtasn1-$(LIBTASN1_VERSION).tar.gz .sum-libtasn1 $(UNPACK) $(APPLY) $(SRC)/libtasn1/0001-fcntl-do-not-call-GetHandleInformation-in-Winstore-a.patch + + # use CreateFile2 instead of CreateFile in UWP + $(APPLY) $(SRC)/libtasn1/0001-Use-CreateFile2-in-UWP-builds.patch $(MOVE) LIBTASN1_CONF := --disable-doc
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/libxml2/rules.mak -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/libxml2/rules.mak
Changed
@@ -46,9 +46,6 @@ $(UNPACK) # fix pkg-config file using an unset variable sed -e 's,"\\\$${pcfiledir}/$${PACKAGE_RELATIVE_PATH}","$${CMAKE_INSTALL_PREFIX}",' -i.orig "$(UNPACK_DIR)/CMakeLists.txt" -ifdef HAVE_WINSTORE - $(APPLY) $(SRC)/libxml2/nogetcwd.patch -endif $(call pkg_static,"libxml-2.0.pc.in") $(MOVE)
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/main.mak -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/main.mak
Changed
@@ -27,6 +27,7 @@ VIDEOLAN_GIT := https://git.videolan.org/git GITHUB := https://github.com GOOGLE_CODE := https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com +GNUGPG := https://www.gnupg.org/ftp/gcrypt QT := https://download.qt.io/official_releases/qt XIPH := https://ftp.osuosl.org/pub/xiph/releases
View file
_service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/orc/orc-uwp-virtualalloc.patch
Added
@@ -0,0 +1,14 @@ +--- orc/orc/orccodemem.c.orig 2023-05-12 16:46:43.316809200 +0200 ++++ orc/orc/orccodemem.c 2023-05-12 15:58:42.687027500 +0200 +@@ -289,7 +289,11 @@ orc_code_region_allocate_codemem (OrcCod + void + orc_code_region_allocate_codemem (OrcCodeRegion *region) + { ++#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) + region->write_ptr = VirtualAlloc(NULL, SIZE, MEM_COMMIT, PAGE_EXECUTE_READWRITE); ++#else /* !WINAPI_PARTITION_DESKTOP */ ++ region->write_ptr = VirtualAllocFromApp(NULL, SIZE, MEM_COMMIT, PAGE_EXECUTE_READWRITE); ++#endif /* !WINAPI_PARTITION_DESKTOP */ + region->exec_ptr = region->write_ptr; + region->size = SIZE; + }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/orc/rules.mak -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/orc/rules.mak
Changed
@@ -14,8 +14,7 @@ orc: orc-$(ORC_VERSION).tar.gz .sum-orc $(UNPACK) - $(APPLY) $(SRC)/orc/use-proper-func-detection.patch - $(UPDATE_AUTOCONFIG) + $(APPLY) $(SRC)/orc/orc-uwp-virtualalloc.patch $(MOVE) .orc: orc
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/projectM/rules.mak -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/projectM/rules.mak
Changed
@@ -5,7 +5,7 @@ ifdef HAVE_WIN32 ifneq ($(ARCH),arm) ifneq ($(ARCH),aarch64) -ifndef HAVE_WINSTORE +ifndef HAVE_WINSTORE # no OpenGL PKGS += projectM endif endif
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/rav1e/SHA512SUMS -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/rav1e/SHA512SUMS
Changed
@@ -1,1 +1,1 @@ -eec63b7b143c65506f9beabe4aafbd8c49da4b2695a1967bb826d5f0c7ef13947fb42aeed8683eb1cac38f09c2142aed1bfa78a4613f53b05782ea57bb641dbe rav1e-0.6.5.tar.gz +e2c8502da92cb954c587049e544bd136514a5b9f26acaf3430d6e727da4c050de2cabb6a6e0d017ba79194ec45d9078aa7846746e823837373b4ed391db6e70a rav1e-0.6.6.tar.gz
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/rav1e/rules.mak -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/rav1e/rules.mak
Changed
@@ -1,6 +1,6 @@ # rav1e -RAV1E_VERSION := 0.6.5 +RAV1E_VERSION := 0.6.6 RAV1E_URL := https://crates.io/api/v1/crates/rav1e/$(RAV1E_VERSION)/download ifdef BUILD_RUST
View file
_service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/upnp/fix-reuseaddr-option.patch
Added
@@ -0,0 +1,51 @@ +diff -ru upnp/upnp/src/ssdp/ssdp_server.c upnp/upnp/src/ssdp/ssdp_server.c +--- upnp/upnp/src/ssdp/ssdp_server.c 2022-08-03 16:05:12 ++++ upnp/upnp/src/ssdp/ssdp_server.c 2023-05-11 12:13:42 +@@ -928,6 +928,7 @@ + + return UPNP_E_OUTOF_SOCKET; + } ++#ifdef UPNP_MINISERVER_REUSEADDR + onOff = 1; + ret = setsockopt(*ssdpSock, + SOL_SOCKET, +@@ -945,6 +946,7 @@ + ret = UPNP_E_SOCKET_ERROR; + goto error_handler; + } ++#endif + #if (defined(BSD) && !defined(__GNU__)) || defined(__APPLE__) + onOff = 1; + ret = setsockopt(*ssdpSock, +@@ -1133,6 +1135,7 @@ + return UPNP_E_OUTOF_SOCKET; + } + onOff = 1; ++#ifdef UPNP_MINISERVER_REUSEADDR + ret = setsockopt(*ssdpSock, + SOL_SOCKET, + SO_REUSEADDR, +@@ -1149,6 +1152,7 @@ + ret = UPNP_E_SOCKET_ERROR; + goto error_handler; + } ++#endif + #if (defined(BSD) && !defined(__GNU__)) || defined(__APPLE__) + onOff = 1; + ret = setsockopt(*ssdpSock, +@@ -1313,6 +1317,7 @@ + return UPNP_E_OUTOF_SOCKET; + } + onOff = 1; ++#ifdef UPNP_MINISERVER_REUSEADDR + ret = setsockopt(*ssdpSock, + SOL_SOCKET, + SO_REUSEADDR, +@@ -1329,6 +1334,7 @@ + ret = UPNP_E_SOCKET_ERROR; + goto error_handler; + } ++#endif + #if (defined(BSD) && !defined(__GNU__)) || defined(__APPLE__) + onOff = 1; + ret = setsockopt(*ssdpSock,
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/upnp/rules.mak -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/upnp/rules.mak
Changed
@@ -22,15 +22,12 @@ -DBUILD_TESTING=OFF \ -DUPNP_BUILD_SAMPLES=OFF -ifdef HAVE_WINSTORE -UPNP_CONF += -DUPNP_ENABLE_IPV6=OFF -DUPNP_ENABLE_UNSPECIFIED_SERVER=ON -else ifdef HAVE_IOS -UPNP_CONF += -DUPNP_ENABLE_IPV6=OFF -DUPNP_ENABLE_UNSPECIFIED_SERVER=ON +UPNP_CONF += -DUPNP_ENABLE_IPV6=OFF -DUPNP_ENABLE_UNSPECIFIED_SERVER=ON \ + -DUPNP_MINISERVER_REUSEADDR=OFF else UPNP_CONF += -DUPNP_ENABLE_IPV6=ON endif -endif upnp: pupnp-release-$(UPNP_VERSION).tar.gz .sum-upnp $(UNPACK) @@ -46,6 +43,9 @@ $(APPLY) $(SRC)/upnp/libtool-nostdlib-workaround.patch endif $(APPLY) $(SRC)/upnp/miniserver.patch +ifdef HAVE_IOS + $(APPLY) $(SRC)/upnp/fix-reuseaddr-option.patch +endif $(MOVE) .upnp: upnp toolchain.cmake
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/x264/rules.mak -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/x264/rules.mak
Changed
@@ -6,9 +6,11 @@ ifdef BUILD_ENCODERS ifdef GPL +ifndef HAVE_WINSTORE # FIXME x264 build system claims it needs MSVC to build for WinRT PKGS += x264 endif endif +endif ifeq ($(call need_pkg,"x264 >= 0.148"),) PKGS_FOUND += x264 @@ -28,12 +30,6 @@ --disable-opencl ifndef HAVE_WIN32 X264CONF += --enable-pic -else -ifdef HAVE_WINSTORE -X264CONF += --enable-win32thread -else -X264CONF += --disable-win32thread -endif endif ifdef HAVE_CROSS_COMPILE ifndef HAVE_DARWIN_OS
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/contrib/src/x265/rules.mak -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/contrib/src/x265/rules.mak
Changed
@@ -6,7 +6,7 @@ ifdef BUILD_ENCODERS ifdef GPL -ifndef HAVE_WINSTORE +ifndef HAVE_WINSTORE # FIXME uses too many forbidden APIs PKGS += x265 endif endif
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/extras/package/win32/build.sh -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/extras/package/win32/build.sh
Changed
@@ -197,25 +197,14 @@ fi if ! -z "$WINSTORE" ; then - CONTRIBFLAGS="$CONTRIBFLAGS --disable-disc --disable-srt --disable-sdl --disable-SDL_image --disable-caca" + CONTRIBFLAGS="$CONTRIBFLAGS --disable-disc --disable-srt --disable-sdl --disable-SDL_image" + # FIXME enable discs ? # modplug uses GlobalAlloc/Free and lstrcpyA/wsprintfA/lstrcpynA CONTRIBFLAGS="$CONTRIBFLAGS --disable-modplug" - # x265 uses too many forbidden APIs - CONTRIBFLAGS="$CONTRIBFLAGS --disable-x265" - # aribb25 uses ANSI strings in WIDE APIs - CONTRIBFLAGS="$CONTRIBFLAGS --disable-aribb25" # gettext uses sys/socket.h improperly CONTRIBFLAGS="$CONTRIBFLAGS --disable-gettext" # fontconfig uses GetWindowsDirectory and SHGetFolderPath CONTRIBFLAGS="$CONTRIBFLAGS --disable-fontconfig" - # asdcplib uses some fordbidden SetErrorModes, GetModuleFileName in fileio.cpp - CONTRIBFLAGS="$CONTRIBFLAGS --disable-asdcplib" - # projectM is openGL based - CONTRIBFLAGS="$CONTRIBFLAGS --disable-projectM" - # gpg-error doesn't know minwg32uwp - # CONTRIBFLAGS="$CONTRIBFLAGS --disable-gpg-error" - # x264 build system claims it needs MSVC to build for WinRT - CONTRIBFLAGS="$CONTRIBFLAGS --disable-x264" # libdsm is not enabled by default CONTRIBFLAGS="$CONTRIBFLAGS --enable-libdsm" @@ -247,6 +236,7 @@ if ! -z "$WINSTORE" ; then SHORTARCH="$SHORTARCH-uwp" + TRIPLET=${TRIPLET}uwp CPPFLAGS="$CPPFLAGS -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D_UNICODE -DUNICODE" if -z "$NTDDI" ; then @@ -263,19 +253,16 @@ CFLAGS="$CFLAGS -Wl,-lwindowsapp,-lwindowsappcompat" CXXFLAGS="$CXXFLAGS -Wl,-lwindowsapp,-lwindowsappcompat" CPPFLAGS="$CPPFLAGS -DWINSTORECOMPAT" - EXTRA_CRUNTIME="-lvcruntime140_app" else SHORTARCH="$SHORTARCH-ucrt" - # this library doesn't exist yet - # EXTRA_CRUNTIME="-lvcruntime140" fi - LDFLAGS="$LDFLAGS $EXTRA_CRUNTIME -lucrt" + LDFLAGS="$LDFLAGS -lucrt" if ! "$COMPILING_WITH_CLANG" -gt 0 ; then # assume gcc NEWSPECFILE="`pwd`/specfile-$SHORTARCH" # tell gcc to replace msvcrt with ucrtbase+ucrt - $CC -dumpspecs | sed -e "s/-lmsvcrt/$EXTRA_CRUNTIME -lucrt/" > $NEWSPECFILE + $CC -dumpspecs | sed -e "s/-lmsvcrt/-lucrt/" > $NEWSPECFILE CFLAGS="$CFLAGS -specs=$NEWSPECFILE" CXXFLAGS="$CXXFLAGS -specs=$NEWSPECFILE" @@ -286,11 +273,6 @@ sed -i -e "s/-luser32//" $NEWSPECFILE sed -i -e "s/-lkernel32//" $NEWSPECFILE fi - else - if -n "$EXTRA_CRUNTIME" ; then - CFLAGS="$CFLAGS -Wl,$EXTRA_CRUNTIME" - CXXFLAGS="$CXXFLAGS -Wl,$EXTRA_CRUNTIME" - fi fi # the values are not passed to the makefiles/configures
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/include/vlc_media_library.h -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/include/vlc_media_library.h
Changed
@@ -600,7 +600,8 @@ VLC_ML_PLAYLIST_APPEND, /**< arg1: playlist id; arg2: media id; can fail */ VLC_ML_PLAYLIST_INSERT, /**< arg1: playlist id; arg2: media id; arg3: position; can fail */ VLC_ML_PLAYLIST_MOVE, /**< arg1: playlist id; arg2: from; arg3: to; can fail */ - VLC_ML_PLAYLIST_REMOVE /**< arg1: playlist id; arg2: position; can fail */ + VLC_ML_PLAYLIST_REMOVE, /**< arg1: playlist id; arg2: position; can fail */ + VLC_ML_PLAYLIST_RENAME /**< arg1: playlist id; arg2: const char*; can fail */ }; /** @@ -1200,6 +1201,14 @@ return vlc_ml_control( p_ml, VLC_ML_PLAYLIST_REMOVE, i_playlist_id, i_position ); } +static inline int +vlc_ml_playlist_rename( vlc_medialibrary_t * p_ml, int64_t i_playlist_id, const char* name ) +{ + assert( p_ml != NULL ); + + return vlc_ml_control( p_ml, VLC_ML_PLAYLIST_RENAME, i_playlist_id, name ); +} + static inline vlc_ml_media_t* vlc_ml_get_media( vlc_medialibrary_t* p_ml, int64_t i_media_id ) { return (vlc_ml_media_t*)vlc_ml_get( p_ml, VLC_ML_GET_MEDIA, i_media_id );
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/meson.build -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/meson.build
Changed
@@ -434,7 +434,6 @@ # Check if we are building for Windows Store if get_option('winstore_app') have_win_store = true - cdata.set('VLC_WINSTORE_APP', 1) add_project_arguments('-DWINSTORECOMPAT', language: 'c', 'cpp') windowsappcompat_lib = cc.find_library('windowsappcompat') # TODO: enable when meson 0.63 is required
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/meson_options.txt -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/meson_options.txt
Changed
@@ -601,6 +601,11 @@ value: 'auto', description: 'librist support for access and access_output') +option('libgcrypt', + type: 'feature', + value: 'auto', + description: 'libgcrypt support') + # TODO: Missing live555 # TODO: Missing v4l2 # TODO: Missing nvdec @@ -636,7 +641,6 @@ # TODO: Missing lirc # TODO: Missing projectm # TODO: Missing vsxu -# TODO: Missing libgcrypt # TODO: Missing kwallet # TODO: Missing osx_notifications # TODO: Missing dsm
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/access/dvdnav.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/access/dvdnav.c
Changed
@@ -1739,9 +1739,29 @@ goto bailout; if( !S_ISREG( stat_info.st_mode ) ) { - if( S_ISDIR( stat_info.st_mode ) || S_ISBLK( stat_info.st_mode ) ) + if( S_ISBLK( stat_info.st_mode ) ) + { ret = VLC_SUCCESS; /* Let dvdnav_open() do the probing */ - goto bailout; + goto bailout; + } + if( S_ISDIR( stat_info.st_mode ) ) + { + // If we have directory, check if VIDEO_TS/VIDEO_TS.IFO exists, as + // dvdnav will check and fail without it + char *video_ts_location; + if( asprintf( &video_ts_location, "%s/VIDEO_TS/VIDEO_TS.IFO", psz_name) == -1 ) + { + ret = VLC_EGENERIC; + goto bailout; + } + + if( access(video_ts_location, R_OK) == -1 ) + ret = VLC_EGENERIC; + else + ret = VLC_SUCCESS; + free( video_ts_location ); + goto bailout; + } } /* ISO 9660 volume descriptor */
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/access/meson.build -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/access/meson.build
Changed
@@ -447,3 +447,6 @@ 'dependencies' : socket_libs, librist_dep } endif + +# RTP +subdir('rtp')
View file
_service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/access/rtp/meson.build
Added
@@ -0,0 +1,64 @@ +if libgcrypt_dep.found() + srtp_lib = static_library('srtp', + files('srtp.c', 'srtp.h'), + dependencies: libgcrypt_dep, + include_directories: vlc_include_dirs) + srtp_rtp_c_args = '-DHAVE_SRTP' +else + srtp_lib = + srtp_rtp_c_args = +endif + +vlc_modules += { + 'name': 'rtp', + 'sources': + files( + 'input.c', + 'session.c', + 'sdp.c', + 'sdp.h', + 'rtpfmt.c', + 'datagram.c', + 'vlc_dtls.h', + 'rtp.c', + 'rtp.h', + ), + 'dependencies': socket_libs, + 'link_with': srtp_lib, + 'c_args': srtp_rtp_c_args, +} + +vlc_modules += { + 'name': 'rtp_ac3', + 'sources': files('ac3.c') +} + +vlc_modules += { + 'name': 'rtp_mpeg12', + 'sources': files('mpeg12.c') +} + +vlc_modules += { + 'name': 'rtp_pcm', + 'sources': files('pcm.c') +} + +vlc_modules += { + 'name': 'rtp_raw', + 'sources': files('raw.c') +} + +vlc_modules += { + 'name': 'rtp_h264', + 'sources': files('h264.c') +} + +vlc_modules += { + 'name': 'rtp_opus', + 'sources': files('opus.c') +} + +vlc_modules += { + 'name': 'rtp_xiph', + 'sources': files('xiph.c') +}
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/access/screen/dxgi.cpp -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/access/screen/dxgi.cpp
Changed
@@ -99,7 +99,7 @@ goto error; } -#if defined(SCREEN_SUBSCREEN) && !defined(VLC_WINSTORE_APP) +#if defined(SCREEN_SUBSCREEN) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) if( p_sys->b_follow_mouse ) { POINT pos; @@ -108,7 +108,7 @@ pos.y -= p_data->screen_y; FollowMouse( p_sys, pos.x, pos.y ); } -#endif // SCREEN_SUBSCREEN && !VLC_WINSTORE_APP +#endif // SCREEN_SUBSCREEN && WINAPI_PARTITION_DESKTOP /* copy the texture into the block texture */ hr = resource.As(&d3d11res); @@ -177,19 +177,19 @@ return VLC_ENOTSUP; } -#ifdef VLC_WINSTORE_APP +#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) if (p_sys->b_follow_mouse) { msg_Dbg(p_demux, "screen-follow-mouse not supported in UWP DXGI"); return VLC_ENOTSUP; } -#endif // VLC_WINSTORE_APP +#endif // !WINAPI_PARTITION_DESKTOP p_data = new (std::nothrow) screen_data_t(); if (unlikely(p_data == nullptr)) return VLC_ENOMEM; -#ifndef VLC_WINSTORE_APP +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) p_data->screen_x = GetSystemMetrics( SM_XVIRTUALSCREEN ); p_data->screen_y = GetSystemMetrics( SM_YVIRTUALSCREEN ); #endif @@ -290,7 +290,7 @@ int ret = screen_InitCaptureDXGI(p_demux); if (ret == VLC_SUCCESS) return VLC_SUCCESS; -#if defined(_WIN32) && !defined(VLC_WINSTORE_APP) +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) return screen_InitCaptureGDI(p_demux); #else return ret;
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/access/screen/screen.h -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/access/screen/screen.h
Changed
@@ -74,7 +74,7 @@ } demux_sys_t; int screen_InitCapture ( demux_t * ); -#if defined(_WIN32) && !defined(VLC_WINSTORE_APP) +#if defined(_WIN32) int screen_InitCaptureGDI ( demux_t * ); #endif
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/codec/avcodec/d3d11va.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/codec/avcodec/d3d11va.c
Changed
@@ -504,7 +504,6 @@ ID3D10Multithread_Release(pMultithread); } -#ifdef VLC_WINSTORE_APP /* On the Xbox 1/S, any decoding of H264 with one dimension over 2304 * crashes totally the device */ if (codec_id == AV_CODEC_ID_H264 && @@ -515,7 +514,6 @@ d3d11_device_unlock(sys->d3d_dev); return VLC_EGENERIC; } -#endif D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC viewDesc; ZeroMemory(&viewDesc, sizeof(viewDesc));
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/codec/avcodec/video.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/codec/avcodec/video.c
Changed
@@ -503,6 +503,7 @@ p_context->opaque = p_dec; p_context->reordered_opaque = 0; + int max_thread_count; int i_thread_count = p_sys->b_hardware_only ? 1 : var_InheritInteger( p_dec, "avcodec-threads" ); if( i_thread_count <= 0 ) { @@ -511,13 +512,17 @@ i_thread_count++; //FIXME: take in count the decoding time -#ifdef VLC_WINSTORE_APP - i_thread_count = __MIN( i_thread_count, 6 ); -#else - i_thread_count = __MIN( i_thread_count, p_codec->id == AV_CODEC_ID_HEVC ? 10 : 6 ); + max_thread_count = p_codec->id == AV_CODEC_ID_HEVC ? 10 : 6; +#if defined(_WIN32) +# if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) + // reduce memory when decoding on Xbox + max_thread_count = 6 ; +# endif #endif } - i_thread_count = __MIN( i_thread_count, p_codec->id == AV_CODEC_ID_HEVC ? 32 : 16 ); + else + max_thread_count = p_codec->id == AV_CODEC_ID_HEVC ? 32 : 16; + i_thread_count = __MIN( i_thread_count, max_thread_count ); msg_Dbg( p_dec, "allowing %d thread(s) for decoding", i_thread_count ); p_context->thread_count = i_thread_count; #if LIBAVCODEC_VERSION_MAJOR < 60
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/codec/omxil/mediacodec.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/codec/omxil/mediacodec.c
Changed
@@ -661,19 +661,15 @@ assert(dec_dev->opaque); AWindowHandler *awh = dec_dev->opaque; - const bool has_subtitle_surface = - AWindowHandler_getANativeWindow(awh, AWindow_Subtitles) != NULL; - /* Force OpenGL interop (via AWindow_SurfaceTexture) if there is a * projection or an orientation to handle, if the Surface owner is not able - * to modify its layout, or if there is no external subtitle surfaces. */ + * to modify its layout. */ p_sys->video.surfacetexture = NULL; bool use_surfacetexture = p_dec->fmt_out.video.projection_mode != PROJECTION_MODE_RECTANGULAR || (!p_sys->api.b_support_rotation && p_dec->fmt_out.video.orientation != ORIENT_NORMAL) - || !AWindowHandler_canSetVideoLayout(awh) - || !has_subtitle_surface; + || !AWindowHandler_canSetVideoLayout(awh); if (!use_surfacetexture) {
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/control/cli/cli.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/control/cli/cli.c
Changed
@@ -75,7 +75,9 @@ vlc_mutex_t clients_lock; struct vlc_list clients; #else +#if NTDDI_VERSION >= NTDDI_WIN10_RS1 || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) HANDLE hConsoleIn; +#endif bool b_quiet; int i_socket; #endif @@ -577,7 +579,7 @@ } } -#else +#else // _WIN32 static void msg_vprint(intf_thread_t *p_intf, const char *psz_fmt, va_list args) { char fmt_eolstrlen (psz_fmt) + 3, *msg; @@ -616,7 +618,7 @@ return VLC_SUCCESS; } -#ifndef VLC_WINSTORE_APP +#if NTDDI_VERSION >= NTDDI_WIN10_RS1 || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) static bool ReadWin32( intf_thread_t *p_intf, unsigned char *p_buffer, int *pi_size ) { INPUT_RECORD input_record; @@ -704,7 +706,7 @@ static bool ReadCommand(intf_thread_t *p_intf, char *p_buffer, int *pi_size) { -#ifndef VLC_WINSTORE_APP +#if NTDDI_VERSION >= NTDDI_WIN10_RS1 || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) if( p_intf->p_sys->i_socket == -1 && !p_intf->p_sys->b_quiet ) return ReadWin32( p_intf, (unsigned char*)p_buffer, pi_size ); else if( p_intf->p_sys->i_socket == -1 ) @@ -773,7 +775,7 @@ p_buffer0 = 0; -#ifndef VLC_WINSTORE_APP +#if NTDDI_VERSION >= NTDDI_WIN10_RS1 || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) /* Get the file descriptor of the console input */ p_intf->p_sys->hConsoleIn = GetStdHandle(STD_INPUT_HANDLE); if( p_intf->p_sys->hConsoleIn == INVALID_HANDLE_VALUE ) @@ -816,7 +818,7 @@ #undef msg_rc #define msg_rc(...) msg_print(p_intf, __VA_ARGS__) #include "../intromsg.h" -#endif +#endif // _WIN32 /***************************************************************************** * Activate: initialize and create stuff @@ -959,7 +961,7 @@ if (pi_socket != NULL) #else p_sys->i_socket = -1; -#ifdef VLC_WINSTORE_APP +#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) p_sys->b_quiet = true; #else p_sys->b_quiet = var_InheritBool( p_intf, "rc-quiet" );
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/control/dummy.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/control/dummy.c
Changed
@@ -40,7 +40,7 @@ set_description( N_("Dummy interface") ) set_capability( "interface", 0 ) set_callback( Open ) -#if defined(_WIN32) && !defined(VLC_WINSTORE_APP) +#if defined(_WIN32) add_obsolete_bool( "dummy-quiet" ) /* since 4.0.0 */ #endif vlc_module_end ()
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/demux/adaptive/tools/Helper.cpp -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/demux/adaptive/tools/Helper.cpp
Changed
@@ -80,11 +80,15 @@ return str1 == str2; } -bool Helper::ifind(std::string haystack, std::string needle) +bool Helper::ifind(const std::string & haystack, const std::string & needle) { - transform(haystack.begin(), haystack.end(), haystack.begin(), toupper); - transform(needle.begin(), needle.end(), needle.begin(), toupper); - return haystack.find(needle) != std::string::npos; + return std::search( + haystack.cbegin(), haystack.cend(), + needle.cbegin(), needle.cend(), + (unsigned char ch1, unsigned char ch2) { + return toupper(ch1) == toupper(ch2); + } + ) != haystack.end(); } std::list<std::string> Helper::tokenize(const std::string &str, char c)
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/demux/adaptive/tools/Helper.h -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/demux/adaptive/tools/Helper.h
Changed
@@ -37,7 +37,7 @@ static std::string getDirectoryPath (const std::string &path); static std::string getFileExtension (const std::string &uri); static bool icaseEquals (std::string str1, std::string str2); - static bool ifind (std::string haystack, std::string needle); + static bool ifind (const std::string & haystack, const std::string & needle); static std::list<std::string> tokenize(const std::string &, char); static std::string & rtrim(std::string &, const std::string &); static std::string & ltrim(std::string &, const std::string &);
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/demux/dash/DASHManager.cpp -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/demux/dash/DASHManager.cpp
Changed
@@ -167,7 +167,7 @@ bool DASHManager::isDASH(xml::Node *root) { - const std::string namespaces = { + static const std::string namespaces = { "urn:mpeg:mpegB:schema:DASH:MPD:DIS2011", "urn:mpeg:schema:dash:mpd:2011", "urn:mpeg:DASH:schema:MPD:2011", @@ -179,7 +179,7 @@ if(root->getName() != "MPD") return false; - std::string ns = root->getAttributeValue("xmlns"); + const std::string &ns = root->getAttributeValue("xmlns"); for( size_t i=0; i<ARRAY_SIZE(namespaces); i++ ) { if ( adaptive::Helper::ifind(ns, namespacesi) )
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/demux/dash/mpd/IsoffMainParser.cpp -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/demux/dash/mpd/IsoffMainParser.cpp
Changed
@@ -250,7 +250,7 @@ if(templateNode->hasAttribute("initialization")) /* /!\ != Initialization */ { SegmentTemplateInit *initTemplate; - std::string initurl = templateNode->getAttributeValue("initialization"); + const std::string &initurl = templateNode->getAttributeValue("initialization"); if(!initurl.empty() && (initTemplate = new (std::nothrow) SegmentTemplateInit(mediaTemplate, info))) { initTemplate->setSourceUrl(initurl); @@ -317,7 +317,7 @@ Node *role = DOMHelper::getFirstChildElementByName((*it), "Role"); if(role && role->hasAttribute("schemeIdUri") && role->hasAttribute("value")) { - std::string uri = role->getAttributeValue("schemeIdUri"); + const std::string &uri = role->getAttributeValue("schemeIdUri"); if(uri == "urn:mpeg:dash:role:2011") { const std::string &rolevalue = role->getAttributeValue("value"); @@ -462,13 +462,13 @@ if(!seg) continue; - std::string mediaUrl = segmentURL->getAttributeValue("media"); + const std::string &mediaUrl = segmentURL->getAttributeValue("media"); if(!mediaUrl.empty()) seg->setSourceUrl(mediaUrl); if(segmentURL->hasAttribute("mediaRange")) { - std::string range = segmentURL->getAttributeValue("mediaRange"); + const std::string &range = segmentURL->getAttributeValue("mediaRange"); size_t pos = range.find("-"); seg->setByteRange(atoi(range.substr(0, pos).c_str()), atoi(range.substr(pos + 1, range.size()).c_str())); } @@ -499,7 +499,7 @@ if(initNode->hasAttribute("range")) { - std::string range = initNode->getAttributeValue("range"); + const std::string &range = initNode->getAttributeValue("range"); size_t pos = range.find("-"); seg->setByteRange(atoi(range.substr(0, pos).c_str()), atoi(range.substr(pos + 1, range.size()).c_str())); }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/demux/mock.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/demux/mock.c
Changed
@@ -148,6 +148,7 @@ /* var_name, type, module_header_type, getter, default_value */ #define OPTIONS_GLOBAL(X) \ + X(node_count, ssize_t, add_integer, Ssize, 0) \ X(length, vlc_tick_t, add_integer, Integer, VLC_TICK_FROM_MS(5000)) \ X(audio_track_count, ssize_t, add_integer, Ssize, 0) \ X(video_track_count, ssize_t, add_integer, Ssize, 0) \ @@ -971,6 +972,156 @@ return eof ? VLC_DEMUXER_EOF : VLC_DEMUXER_SUCCESS; } +static char * +StripNodeParams(const char *orignal_url) +{ + char *url = strdup(orignal_url); + if (url == NULL) + return NULL; + + /* Strip "node_count=xxx" */ + char *substr_start = strcasestr(url, "node_count="); + assert(substr_start != NULL); + + char *substr_end = strchr(substr_start, ';'); + if (substr_end != NULL) + substr_end++; + else + substr_end = strchr(substr_start, '\0'); + + assert(substr_end != NULL); + memmove(substr_start, substr_end, strlen(substr_end) + 1); + + /* Strip "nodexxx={xxx}" */ + while ((substr_start = strcasestr(url, "node")) != NULL) + { + substr_end = strchr(substr_start, '{'); + if (substr_end != NULL) + { + substr_end = strchr(substr_start, '}'); + substr_end++; + if (*substr_end == ';') + substr_end++; + } + + if (substr_end == NULL) + { + free(url); + return NULL; + } + + memmove(substr_start, substr_end, strlen(substr_end) + 1); + } + + return url; +} + +/* + * Create sub items from the demux URL + * + * Example: + * "mock://node2{video_track_count=1};node_count=4;length=1000000;node1{length=2000000}" + * Will create the following sub items: + * - input_item_New(mock://length=1000000, submock0); + * - input_item_New(mock://length=2000000, submock1); + * - input_item_New(mock://video_track_count=1, submock2); + * - input_item_New(mock://length=1000000, submock3); + * + * If specified with node{}, a sub item will use the params between "{}". + * If not specified, all subitems will use the same params from the url (here: + * "length=1000000"). + */ +static int +Readdir(stream_t *demux, input_item_node_t *node) +{ + struct demux_sys *sys = demux->p_sys; + + char *default_url = StripNodeParams(demux->psz_url); + if (default_url == NULL) + return VLC_EGENERIC; + + int ret = VLC_ENOMEM; + for (ssize_t i = 0; i < sys->node_count; ++i) + { + const char *url; + char *name, *option_name, *url_buf = NULL; + int len; + + len = asprintf(&option_name, "node%zd{", i); + if (len < 0) + goto error; + char *option = strstr(demux->psz_url, option_name); + free(option_name); + + if (option != NULL) + { + option = strchr(option, '{'); + assert(option != NULL); + option++; + char *option_end = strchr(option, '}'); + if (option_end == NULL) + { + ret = VLC_EINVAL; + goto error; + } + + ptrdiff_t option_size = option_end - option; + if (option_size > INT_MAX) + { + ret = VLC_EINVAL; + goto error; + } + + len = asprintf(&url_buf, "mock://%.*s", (int) option_size, option); + if (len < 0) + goto error; + url = url_buf; + } + else + url = default_url; + + len = asprintf(&name, "submock%zd", i); + if (len < 0) + { + free(url_buf); + goto error; + } + + input_item_t *item = input_item_New(url, name); + free(name); + free(url_buf); + + if (item == NULL) + goto error; + + input_item_node_AppendItem(node, item); + input_item_Release(item); + } + + ret = VLC_SUCCESS; +error: + free(default_url); + return ret; +} + +static int +ReaddirControl(demux_t *demux, int query, va_list args) +{ + (void) demux; + switch (query) + { + case DEMUX_GET_META: + case DEMUX_GET_TYPE: + return VLC_EGENERIC; + case DEMUX_HAS_UNSUPPORTED_META: + { + *(va_arg(args, bool *)) = false; + return VLC_SUCCESS; + } + } + return VLC_EGENERIC; +} + static void Close(vlc_object_t *obj) { @@ -1000,6 +1151,7 @@ return VLC_ENOMEM; demux->p_sys = sys; + vlc_vector_init(&sys->tracks); if (var_LocationParse(obj, demux->psz_location, "mock-") != VLC_SUCCESS) return VLC_ENOMEM; @@ -1009,6 +1161,13 @@ OPTIONS_VIDEO(READ_SUBOPTION) OPTIONS_SUB(READ_SUBOPTION) + if (sys->node_count > 0) + { + demux->pf_control = ReaddirControl; + demux->pf_readdir = Readdir; + return VLC_SUCCESS; + } + if (sys->chapter_count > 0 && sys->title_count == 0) sys->title_count++; @@ -1039,7 +1198,6 @@ sys->program_count = 1; size_t track_count = (sys->video_track_count + sys->audio_track_count + sys->sub_track_count) * sys->program_count; - vlc_vector_init(&sys->tracks); if (track_count > 0) {
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/demux/mp4/libmp4.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/demux/mp4/libmp4.c
Changed
@@ -1576,7 +1576,7 @@ } p_box->data.p_stts->pi_sample_count = vlc_alloc( count, sizeof(uint32_t) ); - p_box->data.p_stts->pi_sample_delta = vlc_alloc( count, sizeof(int32_t) ); + p_box->data.p_stts->pi_sample_delta = vlc_alloc( count, sizeof(uint32_t) ); p_box->data.p_stts->i_entry_count = count; if( p_box->data.p_stts->pi_sample_count == NULL @@ -1589,6 +1589,10 @@ { MP4_GET4BYTES( p_box->data.p_stts->pi_sample_counti ); MP4_GET4BYTES( p_box->data.p_stts->pi_sample_deltai ); + /* Patch bogus durations, including negative stored values */ + if( p_box->data.p_stts->pi_sample_deltai == 0 || + p_box->data.p_stts->pi_sample_deltai >= 0xF0000000 ) + p_box->data.p_stts->pi_sample_deltai = 1; } #ifdef MP4_VERBOSE
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/demux/mp4/libmp4.h -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/demux/mp4/libmp4.h
Changed
@@ -678,7 +678,7 @@ uint32_t i_entry_count; uint32_t *pi_sample_count; /* these are array */ - int32_t *pi_sample_delta; + uint32_t *pi_sample_delta; } MP4_Box_data_stts_t;
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/demux/mp4/mp4.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/demux/mp4/mp4.c
Changed
@@ -765,7 +765,7 @@ } while (cdt2_size > 0) { - *(out++) = CC_PKT_BYTE0(0); /* cc1 == field 0 */ + *(out++) = CC_PKT_BYTE0(1); /* cc2 == field 1 */ *(out++) = *(cdt2++); *(out++) = *(cdt2++); cdt2_size -= 2;
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/demux/smooth/playlist/SmoothParser.cpp -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/demux/smooth/playlist/SmoothParser.cpp
Changed
@@ -238,7 +238,7 @@ adaptSet->addAttribute(new TimescaleAttr(timescale)); } - const std::string url = streamIndexNode->getAttributeValue("Url"); + const std::string &url = streamIndexNode->getAttributeValue("Url"); if(!url.empty()) { /* SmoothSegment is a template holder */ @@ -252,7 +252,7 @@ } unsigned nextid = 1; - const std::string type = streamIndexNode->getAttributeValue("Type"); + const std::string &type = streamIndexNode->getAttributeValue("Type"); std::vector<Node *> qualLevels = DOMHelper::getElementByTagName(streamIndexNode, "QualityLevel", true); std::vector<Node *>::const_iterator it; for(it = qualLevels.begin(); it != qualLevels.end(); ++it)
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/macosx/UI/VLCLibraryCollectionViewItem.xib -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/macosx/UI/VLCLibraryCollectionViewItem.xib
Changed
@@ -1,7 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="20037" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct"> +<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct"> <dependencies> - <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="20037"/> + <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/> + <capability name="Named colors" minToolsVersion="9.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <objects> @@ -16,27 +17,29 @@ <outlet property="playInstantlyButton" destination="S3I-5Z-qgS" id="JlC-bE-i5Y"/> <outlet property="progressIndicator" destination="dFt-oZ-h9P" id="JC6-gk-Mid"/> <outlet property="secondaryInfoTextField" destination="VAn-gF-QiZ" id="U8T-Cs-HaL"/> + <outlet property="trailingSecondaryTextToLeadingAnnotationConstraint" destination="IXL-bv-5zP" id="V4J-bi-UQB"/> + <outlet property="trailingSecondaryTextToTrailingSuperviewConstraint" destination="Zci-25-m59" id="czo-El-QT8"/> <outlet property="unplayedIndicatorTextField" destination="u2r-zy-XEW" id="56s-K4-Kxr"/> <outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/> </connections> </customObject> <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/> <customObject id="-3" userLabel="Application" customClass="NSObject"/> - <customView id="Hz6-mo-xeY" customClass="VLCTrackingView"> - <rect key="frame" x="0.0" y="0.0" width="212" height="263"/> + <customView misplaced="YES" id="Hz6-mo-xeY" customClass="VLCTrackingView"> + <rect key="frame" x="0.0" y="0.0" width="212" height="243"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <subviews> <customView translatesAutoresizingMaskIntoConstraints="NO" id="2aB-sB-hfY" customClass="VLCImageView"> - <rect key="frame" x="0.0" y="51" width="212" height="212"/> + <rect key="frame" x="0.0" y="36" width="207" height="207"/> <subviews> <customView translatesAutoresizingMaskIntoConstraints="NO" id="dFt-oZ-h9P" customClass="VLCLinearProgressIndicator"> - <rect key="frame" x="0.0" y="0.0" width="212" height="4"/> + <rect key="frame" x="0.0" y="0.0" width="207" height="4"/> <constraints> <constraint firstAttribute="height" constant="4" id="lyQ-kl-gVk"/> </constraints> </customView> <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="S3I-5Z-qgS"> - <rect key="frame" x="74" y="74" width="64" height="64"/> + <rect key="frame" x="72" y="72" width="64" height="64"/> <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="libraryPlay" imagePosition="only" alignment="center" inset="2" id="IHP-p1-d0R"> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> <font key="font" metaFont="system"/> @@ -46,7 +49,7 @@ </connections> </button> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="tm2-NW-WsZ" customClass="VLCRoundedCornerTextField"> - <rect key="frame" x="8" y="189" width="37" height="16"/> + <rect key="frame" x="8" y="184" width="37" height="16"/> <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="tyb-Ur-7J9"> <font key="font" metaFont="system"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> @@ -64,15 +67,15 @@ </constraints> </customView> <box boxType="custom" borderType="line" borderWidth="5" cornerRadius="4" title="Box" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="Vwd-1n-Sbd"> - <rect key="frame" x="0.0" y="51" width="212" height="212"/> + <rect key="frame" x="0.0" y="36" width="207" height="207"/> <view key="contentView" id="HJG-tt-Xh8"> - <rect key="frame" x="5" y="5" width="202" height="202"/> + <rect key="frame" x="5" y="5" width="197" height="197"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> </view> <color key="borderColor" red="1" green="0.38123786450000002" blue="0.039215686270000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </box> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="OBS-Eh-1mT"> - <rect key="frame" x="-2" y="31" width="37" height="16"/> + <rect key="frame" x="-2" y="16" width="37" height="16"/> <textFieldCell key="cell" lineBreakMode="truncatingTail" title="Label" usesSingleLineMode="YES" id="7Hy-o3-LvX"> <font key="font" metaFont="system"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> @@ -80,15 +83,15 @@ </textFieldCell> </textField> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="u2r-zy-XEW"> - <rect key="frame" x="180" y="11" width="34" height="16"/> + <rect key="frame" x="174" y="0.0" width="35" height="16"/> <textFieldCell key="cell" lineBreakMode="clipping" title="NEW" id="NeT-5U-eZn"> - <font key="font" metaFont="system"/> - <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> + <font key="font" metaFont="systemBold"/> + <color key="textColor" name="VLCAccentColor"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ubz-8I-W2F"> - <rect key="frame" x="178" y="236" width="20" height="20"/> + <rect key="frame" x="173" y="216" width="20" height="20"/> <constraints> <constraint firstAttribute="width" constant="20" id="XhX-7U-Nxj"/> <constraint firstAttribute="height" constant="20" id="ZDT-YM-Cbr"/> @@ -102,10 +105,10 @@ </connections> </button> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="VAn-gF-QiZ"> - <rect key="frame" x="-2" y="11" width="37" height="16"/> - <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="LSS-jh-llZ"> + <rect key="frame" x="-2" y="0.0" width="175" height="16"/> + <textFieldCell key="cell" lineBreakMode="truncatingTail" title="Label" id="LSS-jh-llZ"> <font key="font" metaFont="system"/> - <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> + <color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> @@ -114,15 +117,16 @@ <constraint firstItem="2aB-sB-hfY" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" id="3Ah-0T-rA9"/> <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="OBS-Eh-1mT" secondAttribute="trailing" id="457-oy-EbD"/> <constraint firstItem="Ubz-8I-W2F" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" constant="7" id="8Qf-Un-Gdl"/> - <constraint firstItem="VAn-gF-QiZ" firstAttribute="top" secondItem="OBS-Eh-1mT" secondAttribute="bottom" constant="4" id="ALi-0z-Mza"/> + <constraint firstItem="VAn-gF-QiZ" firstAttribute="top" secondItem="OBS-Eh-1mT" secondAttribute="bottom" id="ALi-0z-Mza"/> <constraint firstAttribute="trailing" secondItem="u2r-zy-XEW" secondAttribute="trailing" id="Dd7-va-0UJ"/> <constraint firstItem="u2r-zy-XEW" firstAttribute="centerY" secondItem="VAn-gF-QiZ" secondAttribute="centerY" id="H5N-j9-THf"/> - <constraint firstItem="u2r-zy-XEW" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="VAn-gF-QiZ" secondAttribute="trailing" constant="4" id="IXL-bv-5zP"/> + <constraint firstItem="u2r-zy-XEW" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="VAn-gF-QiZ" secondAttribute="trailing" constant="5" id="IXL-bv-5zP"/> <constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="VAn-gF-QiZ" secondAttribute="bottom" id="Kp0-Hx-3Ek"/> <constraint firstItem="VAn-gF-QiZ" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" id="QUW-dn-Fbc"/> <constraint firstItem="Vwd-1n-Sbd" firstAttribute="top" secondItem="2aB-sB-hfY" secondAttribute="top" id="Qpt-yS-z2k"/> <constraint firstItem="Vwd-1n-Sbd" firstAttribute="leading" secondItem="2aB-sB-hfY" secondAttribute="leading" id="Yqz-VL-Ul7"/> <constraint firstAttribute="trailing" secondItem="Ubz-8I-W2F" secondAttribute="trailing" constant="14" id="ZVz-SL-rxZ"/> + <constraint firstAttribute="trailing" secondItem="VAn-gF-QiZ" secondAttribute="trailing" priority="750" id="Zci-25-m59"/> <constraint firstItem="tm2-NW-WsZ" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" constant="7" id="cvk-A5-enS"/> <constraint firstItem="tm2-NW-WsZ" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="10" id="fH0-Om-7gV"/> <constraint firstItem="Vwd-1n-Sbd" firstAttribute="trailing" secondItem="2aB-sB-hfY" secondAttribute="trailing" id="fag-50-6qS"/> @@ -138,5 +142,8 @@ <resources> <image name="ellipsis" width="17" height="3"/> <image name="libraryPlay" width="64" height="64"/> + <namedColor name="VLCAccentColor"> + <color red="1" green="0.37999999523162842" blue="0.039999999105930328" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </namedColor> </resources> </document>
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/macosx/UI/VLCLibrarySongTableCellView.xib -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/macosx/UI/VLCLibrarySongTableCellView.xib
Changed
@@ -1,7 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="20037" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct"> +<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct"> <dependencies> - <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="20037"/> + <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/> + <capability name="Named colors" minToolsVersion="9.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <objects> @@ -35,15 +36,16 @@ </textFieldCell> </textField> <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="NFZ-x0-t5c"> - <rect key="frame" x="10" y="7" width="12.5" height="36"/> + <rect key="frame" x="10" y="17" width="16" height="16"/> <constraints> - <constraint firstAttribute="height" constant="32" id="bai-RH-huE"/> + <constraint firstAttribute="width" secondItem="NFZ-x0-t5c" secondAttribute="height" multiplier="1:1" id="Hv5-J8-wdk"/> + <constraint firstAttribute="height" constant="16" id="bai-RH-huE"/> </constraints> - <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="play.fill" catalog="system" imagePosition="only" alignment="left" imageScaling="proportionallyDown" inset="2" id="5MR-Gt-X4p"> + <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="VLCPlayTemplate" imagePosition="only" alignment="left" imageScaling="proportionallyDown" inset="2" id="5MR-Gt-X4p"> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> <font key="font" metaFont="system"/> </buttonCell> - <color key="contentTintColor" red="1" green="0.38123786450000002" blue="0.039215686270000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <color key="contentTintColor" name="VLCAccentColor"/> </button> <textField horizontalHuggingPriority="1000" verticalHuggingPriority="750" horizontalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="XNL-fH-9bU"> <rect key="frame" x="334" y="17" width="56" height="16"/> @@ -81,6 +83,9 @@ </customView> </objects> <resources> - <image name="play.fill" catalog="system" width="12" height="13"/> + <image name="VLCPlayTemplate" width="128" height="128"/> + <namedColor name="VLCAccentColor"> + <color red="1" green="0.37999999523162842" blue="0.039999999105930328" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </namedColor> </resources> </document>
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/macosx/UI/VLCLibraryWindow.xib -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/macosx/UI/VLCLibraryWindow.xib
Changed
@@ -277,21 +277,10 @@ <rect key="frame" x="0.0" y="0.0" width="896" height="45"/> <subviews> <customView translatesAutoresizingMaskIntoConstraints="NO" id="YAj-e7-KCU" userLabel="New play controls group "> - <rect key="frame" x="16" y="4" width="180" height="37"/> + <rect key="frame" x="16" y="4" width="108" height="37"/> <subviews> - <button translatesAutoresizingMaskIntoConstraints="NO" id="SYG-jf-oHJ" userLabel="Shuffle Button"> - <rect key="frame" x="0.0" y="9" width="20" height="20"/> - <constraints> - <constraint firstAttribute="height" constant="20" id="LX7-2l-Zub"/> - <constraint firstAttribute="width" constant="20" id="b8L-ly-Ydj"/> - </constraints> - <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="shuffleOn" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="kIq-yj-yfU"> - <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> - <font key="font" metaFont="system"/> - </buttonCell> - </button> <button translatesAutoresizingMaskIntoConstraints="NO" id="jGc-Xw-GYI" userLabel="Prev Button"> - <rect key="frame" x="36" y="7" width="24" height="24"/> + <rect key="frame" x="0.0" y="7" width="24" height="24"/> <constraints> <constraint firstAttribute="height" constant="24" id="0T4-E0-vJm"/> <constraint firstAttribute="width" constant="24" id="abb-Z1-wB3"/> @@ -305,7 +294,7 @@ </connections> </button> <button translatesAutoresizingMaskIntoConstraints="NO" id="WgO-zh-k4s" userLabel="Play Button"> - <rect key="frame" x="76" y="5" width="28" height="28"/> + <rect key="frame" x="40" y="5" width="28" height="28"/> <constraints> <constraint firstAttribute="width" constant="28" id="SMx-UH-bYG"/> <constraint firstAttribute="height" constant="28" id="X5G-Of-T7b"/> @@ -319,7 +308,7 @@ </connections> </button> <button translatesAutoresizingMaskIntoConstraints="NO" id="dPD-MZ-5oT" userLabel="Next Button"> - <rect key="frame" x="120" y="7" width="24" height="24"/> + <rect key="frame" x="84" y="7" width="24" height="24"/> <constraints> <constraint firstAttribute="height" constant="24" id="Idh-YB-yxU"/> <constraint firstAttribute="width" constant="24" id="eA3-ci-O1T"/> @@ -332,41 +321,26 @@ <action selector="fwd:" target="Uzf-Tf-H8x" id="cnd-1b-e3l"/> </connections> </button> - <button translatesAutoresizingMaskIntoConstraints="NO" id="t4r-bt-Jxm" userLabel="Repeat Button"> - <rect key="frame" x="160" y="9" width="20" height="20"/> - <constraints> - <constraint firstAttribute="width" constant="20" id="V4c-eg-QOT"/> - <constraint firstAttribute="height" constant="20" id="Wom-ko-4Rp"/> - </constraints> - <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="repeatOff" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="RJn-3f-SpX"> - <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> - <font key="font" metaFont="system"/> - </buttonCell> - </button> </subviews> <constraints> <constraint firstItem="WgO-zh-k4s" firstAttribute="leading" secondItem="jGc-Xw-GYI" secondAttribute="trailing" constant="16" id="7Jh-Rk-goR"/> - <constraint firstItem="t4r-bt-Jxm" firstAttribute="centerY" secondItem="YAj-e7-KCU" secondAttribute="centerY" id="Fra-T2-IQx"/> <constraint firstItem="dPD-MZ-5oT" firstAttribute="leading" secondItem="WgO-zh-k4s" secondAttribute="trailing" constant="16" id="L7k-XW-mNm"/> - <constraint firstAttribute="trailing" secondItem="t4r-bt-Jxm" secondAttribute="trailing" id="W3e-SL-a7f"/> <constraint firstItem="jGc-Xw-GYI" firstAttribute="centerY" secondItem="YAj-e7-KCU" secondAttribute="centerY" id="XTJ-tG-WAb"/> <constraint firstItem="WgO-zh-k4s" firstAttribute="centerX" secondItem="YAj-e7-KCU" secondAttribute="centerX" id="dj3-Cx-RLd"/> - <constraint firstItem="jGc-Xw-GYI" firstAttribute="leading" secondItem="SYG-jf-oHJ" secondAttribute="trailing" constant="16" id="f1r-vM-kxs"/> <constraint firstItem="WgO-zh-k4s" firstAttribute="centerY" secondItem="YAj-e7-KCU" secondAttribute="centerY" id="g2R-aO-KbT"/> - <constraint firstItem="SYG-jf-oHJ" firstAttribute="centerY" secondItem="YAj-e7-KCU" secondAttribute="centerY" id="heY-1b-UBH"/> - <constraint firstItem="t4r-bt-Jxm" firstAttribute="leading" secondItem="dPD-MZ-5oT" secondAttribute="trailing" constant="16" id="lY4-vR-Qva"/> + <constraint firstAttribute="trailing" secondItem="dPD-MZ-5oT" secondAttribute="trailing" id="oOi-7M-aLf"/> <constraint firstItem="dPD-MZ-5oT" firstAttribute="centerY" secondItem="YAj-e7-KCU" secondAttribute="centerY" id="rCy-3x-EJD"/> - <constraint firstItem="SYG-jf-oHJ" firstAttribute="leading" secondItem="YAj-e7-KCU" secondAttribute="leading" id="vUG-bU-2ce"/> + <constraint firstItem="jGc-Xw-GYI" firstAttribute="leading" secondItem="YAj-e7-KCU" secondAttribute="leading" id="xeh-Bo-f7P"/> </constraints> </customView> <customView translatesAutoresizingMaskIntoConstraints="NO" id="Ktr-qT-1fr"> - <rect key="frame" x="212" y="4" width="472" height="37"/> + <rect key="frame" x="140" y="4" width="616" height="37"/> <subviews> <stackView distribution="fill" orientation="horizontal" alignment="centerY" spacing="4" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" horizontalCompressionResistancePriority="250" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="jlv-jC-dQB"> - <rect key="frame" x="171" y="21" width="164" height="16"/> + <rect key="frame" x="248" y="21" width="153" height="16"/> <subviews> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="d0e-29-yNq" userLabel="Song Name" customClass="VLCWrappableTextField"> - <rect key="frame" x="-2" y="0.0" width="78" height="16"/> + <rect key="frame" x="-2" y="0.0" width="157" height="16"/> <constraints> <constraint firstAttribute="height" constant="16" id="aQy-pz-H7F"/> <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="60" id="uah-Xv-MK9"/> @@ -388,8 +362,8 @@ <real value="3.4028234663852886e+38"/> </customSpacing> </stackView> - <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="zOB-QJ-TUy" customClass="VLCTimeField"> - <rect key="frame" x="39" y="0.0" width="44" height="13"/> + <textField wantsLayer="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="zOB-QJ-TUy" customClass="VLCTimeField"> + <rect key="frame" x="39" y="1" width="44" height="11"/> <constraints> <constraint firstAttribute="width" constant="40" id="Rox-Cf-MSz"/> </constraints> @@ -428,8 +402,8 @@ <action selector="timeSliderAction:" target="Uzf-Tf-H8x" id="eDh-39-Ej1"/> </connections> </slider> - <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="oGd-mG-cFw" customClass="VLCTimeField"> - <rect key="frame" x="422" y="0.0" width="52" height="13"/> + <textField wantsLayer="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="oGd-mG-cFw" customClass="VLCTimeField"> + <rect key="frame" x="566" y="1" width="52" height="11"/> <constraints> <constraint firstAttribute="width" constant="48" id="mAg-xF-yHo"/> </constraints> @@ -815,8 +789,6 @@ <outlet property="muteVolumeButton" destination="IAy-58-UPp" id="dDN-pE-Vmj"/> <outlet property="playButton" destination="WgO-zh-k4s" id="0yC-Yh-H4V"/> <outlet property="playingItemDisplayField" destination="d0e-29-yNq" id="QUe-1S-TQO"/> - <outlet property="repeatButton" destination="t4r-bt-Jxm" id="U7s-Tb-Ado"/> - <outlet property="shuffleButton" destination="SYG-jf-oHJ" id="b4m-v0-sC9"/> <outlet property="timeField" destination="zOB-QJ-TUy" id="mJL-1V-2lQ"/> <outlet property="timeSlider" destination="9Hg-t2-K5z" id="sVe-s8-xW6"/> <outlet property="trailingTimeField" destination="oGd-mG-cFw" id="geo-iq-0th"/>
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/macosx/UI/VLCPlaylistTableCellView.xib -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/macosx/UI/VLCPlaylistTableCellView.xib
Changed
@@ -8,15 +8,15 @@ <customObject id="-2" userLabel="File's Owner" customClass="VLCPlaylistTableCellView"/> <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/> <customObject id="-3" userLabel="Application" customClass="NSObject"/> - <customView id="c22-O7-iKe" customClass="VLCPlaylistTableCellView"> + <customView wantsLayer="YES" id="c22-O7-iKe" customClass="VLCPlaylistTableCellView"> <rect key="frame" x="0.0" y="0.0" width="398" height="58"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <subviews> <stackView distribution="fill" orientation="vertical" alignment="leading" spacing="5" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="0Ge-7z-bq6"> - <rect key="frame" x="97" y="0.0" width="245" height="58"/> + <rect key="frame" x="97" y="1" width="245" height="56"/> <subviews> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ohB-P0-nCv"> - <rect key="frame" x="-2" y="42" width="249" height="16"/> + <rect key="frame" x="-2" y="40" width="249" height="16"/> <textFieldCell key="cell" lineBreakMode="truncatingTail" title="Label" id="ZPw-XO-XD1"> <font key="font" usesAppearanceFont="YES"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> @@ -24,7 +24,7 @@ </textFieldCell> </textField> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="xJW-ps-ycn"> - <rect key="frame" x="-2" y="21" width="249" height="16"/> + <rect key="frame" x="-2" y="19" width="249" height="16"/> <textFieldCell key="cell" lineBreakMode="truncatingTail" title="Label" id="aCe-ia-0Ww"> <font key="font" usesAppearanceFont="YES"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> @@ -32,9 +32,9 @@ </textFieldCell> </textField> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="TPv-k2-6XS"> - <rect key="frame" x="-2" y="0.0" width="249" height="16"/> + <rect key="frame" x="-2" y="0.0" width="249" height="14"/> <textFieldCell key="cell" lineBreakMode="truncatingTail" title="Label" id="jZ4-pa-K3T"> - <font key="font" usesAppearanceFont="YES"/> + <font key="font" metaFont="smallSystem"/> <color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> @@ -62,10 +62,14 @@ <constraint firstAttribute="width" secondItem="Ydb-7n-5Cd" secondAttribute="height" multiplier="16:10" id="4aB-rs-m22"/> </constraints> </customView> - <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="xnT-RR-pOf"> - <rect key="frame" x="10" y="17" width="24" height="24"/> - <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="note" id="UzG-df-K2K"/> - </imageView> + <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Mk2-5A-q4g"> + <rect key="frame" x="8" y="13" width="22" height="31"/> + <textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="♪" id="mdz-SA-hCl"> + <font key="font" textStyle="largeTitle" name=".SFNS-Regular"/> + <color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/> + <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> + </textFieldCell> + </textField> <customView translatesAutoresizingMaskIntoConstraints="NO" id="97z-d7-S3D" customClass="VLCImageView"> <rect key="frame" x="39" y="5" width="48" height="48"/> <constraints> @@ -85,33 +89,30 @@ </textField> </subviews> <constraints> + <constraint firstItem="Mk2-5A-q4g" firstAttribute="centerY" secondItem="Ydb-7n-5Cd" secondAttribute="centerY" id="7oz-36-KPx"/> <constraint firstItem="Ydb-7n-5Cd" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="10" id="8hv-Qt-uAI"/> <constraint firstItem="0Ge-7z-bq6" firstAttribute="centerY" secondItem="3Ha-ZH-fa9" secondAttribute="centerY" id="DpI-8u-rFu"/> <constraint firstItem="0Ge-7z-bq6" firstAttribute="centerY" secondItem="c22-O7-iKe" secondAttribute="centerY" id="EXo-Wn-Jh5"/> <constraint firstItem="97z-d7-S3D" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" constant="5" id="FbP-R4-bAA"/> - <constraint firstItem="xnT-RR-pOf" firstAttribute="leading" secondItem="Ydb-7n-5Cd" secondAttribute="leading" id="O8E-35-EK3"/> + <constraint firstItem="Mk2-5A-q4g" firstAttribute="leading" secondItem="Ydb-7n-5Cd" secondAttribute="leading" id="S9m-bB-HBd"/> <constraint firstAttribute="trailing" secondItem="3Ha-ZH-fa9" secondAttribute="trailing" constant="10" id="SVJ-UL-O5m"/> <constraint firstAttribute="bottom" secondItem="97z-d7-S3D" secondAttribute="bottom" constant="5" id="XfR-Fd-n6o"/> <constraint firstAttribute="bottom" secondItem="Ydb-7n-5Cd" secondAttribute="bottom" constant="5" id="aVd-Ld-lUH"/> <constraint firstItem="0Ge-7z-bq6" firstAttribute="leading" secondItem="97z-d7-S3D" secondAttribute="trailing" constant="10" id="adC-9f-And"/> <constraint firstItem="97z-d7-S3D" firstAttribute="trailing" secondItem="Ydb-7n-5Cd" secondAttribute="trailing" id="bzC-Km-KOo"/> <constraint firstItem="0Ge-7z-bq6" firstAttribute="trailing" secondItem="3Ha-ZH-fa9" secondAttribute="leading" constant="-10" id="dSC-Pq-ml2"/> - <constraint firstItem="xnT-RR-pOf" firstAttribute="centerY" secondItem="97z-d7-S3D" secondAttribute="centerY" id="gLa-2C-g8X"/> <constraint firstItem="Ydb-7n-5Cd" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" constant="5" id="iPZ-zR-jTv"/> </constraints> <connections> <outlet property="artistTextField" destination="TPv-k2-6XS" id="jJV-4C-USY"/> <outlet property="audioArtworkImageView" destination="97z-d7-S3D" id="ZDl-d6-j29"/> - <outlet property="audioMediaTypeIndicator" destination="xnT-RR-pOf" id="BTq-M6-aJm"/> + <outlet property="audioMediaTypeIndicator" destination="Mk2-5A-q4g" id="wal-6y-aRv"/> <outlet property="durationTextField" destination="3Ha-ZH-fa9" id="vbh-oE-Afj"/> <outlet property="mediaImageView" destination="Ydb-7n-5Cd" id="MlE-WQ-VB9"/> <outlet property="mediaTitleTextField" destination="ohB-P0-nCv" id="iS6-q4-h8I"/> <outlet property="secondaryMediaTitleTextField" destination="xJW-ps-ycn" id="KpP-ao-QlW"/> </connections> - <point key="canvasLocation" x="98" y="50.5"/> + <point key="canvasLocation" x="98" y="50"/> </customView> </objects> - <resources> - <image name="note" width="24" height="24"/> - </resources> </document>
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/macosx/extensions/NSColor+VLCAdditions.h -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/macosx/extensions/NSColor+VLCAdditions.h
Changed
@@ -36,7 +36,6 @@ + (instancetype)VLClibrarySeparatorLightColor; + (instancetype)VLClibrarySeparatorDarkColor; + (instancetype)VLClibraryProgressIndicatorBackgroundColor; -+ (instancetype)VLClibraryProgressIndicatorForegroundColor; + (instancetype)VLClibraryItemBorderLightColor; + (instancetype)VLClibraryItemBorderDarkColor; + (instancetype)VLClibraryCollectionViewItemBackgroundLightColor;
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/macosx/extensions/NSColor+VLCAdditions.m -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/macosx/extensions/NSColor+VLCAdditions.m
Changed
@@ -78,11 +78,6 @@ return NSColor colorWithRed:37./255. green:41./255. blue:44./255. alpha:.8; } -+ (instancetype)VLClibraryProgressIndicatorForegroundColor -{ - return NSColor colorWithRed:246./255. green:127./255. blue:0. alpha:1.; -} - + (instancetype)VLClibraryItemBorderLightColor { return NSColor colorWithRed:0.89 green:0.89 blue:0.91 alpha:1.;
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/macosx/extensions/NSImage+VLCAdditions.h -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/macosx/extensions/NSImage+VLCAdditions.h
Changed
@@ -29,6 +29,8 @@ + (instancetype)quickLookPreviewForLocalPath:(NSString*)path withSize:(NSSize)size; + (instancetype)quickLookPreviewForLocalURL:(NSURL*)url withSize:(NSSize)size; +- (instancetype)imageTintedWithColor:(NSColor *)color; + @end NS_ASSUME_NONNULL_END
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/macosx/extensions/NSImage+VLCAdditions.m -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/macosx/extensions/NSImage+VLCAdditions.m
Changed
@@ -72,4 +72,19 @@ return image; } +- (instancetype)imageTintedWithColor:(NSColor *)color +{ + NSImage * const image = self copy; + + if (color != nil) { + image lockFocus; + color set; + const NSRect imageRect = {NSZeroPoint, image.size}; + NSRectFillUsingOperation(imageRect, NSCompositeSourceIn); + image unlockFocus; + } + + return image; +} + @end
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/macosx/library/VLCInputNodePathControl.m -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/macosx/library/VLCInputNodePathControl.m
Changed
@@ -28,14 +28,15 @@ - (void)appendInputNodePathControlItem:(VLCInputNodePathControlItem *)inputNodePathControlItem { + NSParameterAssert(inputNodePathControlItem != nil); + NSParameterAssert(inputNodePathControlItem.image != nil); + NSParameterAssert(inputNodePathControlItem.image.name != nil); + NSParameterAssert(!inputNodePathControlItem.image.name isEqualToString:@""); + if (_inputNodePathControlItems == nil) { _inputNodePathControlItems = NSMutableDictionary dictionary; } - if (inputNodePathControlItem.image.name isEqualToString:@"") { - return; - } - _inputNodePathControlItems setObject:inputNodePathControlItem forKey:inputNodePathControlItem.image.name; NSMutableArray *pathItems = NSMutableArray arrayWithArray:self.pathItems;
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/macosx/library/VLCInputNodePathControlItem.m -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/macosx/library/VLCInputNodePathControlItem.m
Changed
@@ -36,16 +36,19 @@ VLCInputItem * const inputItem = inputNode.inputItem; self.title = inputItem.name; - VLCLibraryImageCache thumbnailForInputItem:inputItem withCompletion:^(NSImage * const thumbnail) { - self.image = thumbnail; - - // HACK: We have no way when we get the clicked item from the path control - // of knowing specifically which input node this path item corresponds to, - // as the path control returns a copy for clickedPathItem that is not of - // this class. As a very awkward workaround, lets set the name of the image - // used here as the MRL of the node's input item - self.image.name = inputItem.MRL; - }; + self.image = VLCLibraryImageCache thumbnailForInputItem:inputItem;; + + // HACK: We have no way when we get the clicked item from the path control + // of knowing specifically which input node this path item corresponds to, + // as the path control returns a copy for clickedPathItem that is not of + // this class. As a very awkward workaround, lets set the name of the image + // used here as the MRL of the node's input item + self.image.name = inputItem.MRL; + + } else if (inputNode == nil) { + NSLog(@"WARNING: Received nil input node, cannot create VLCInputNodePathControlItem"); + } else if (inputNode.inputItem == nil) { + NSLog(@"WARNING: Received nil input node's input item, cannot create VLCInputNodePathControlItem"); } return self; }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/macosx/library/VLCLibraryCollectionViewItem.h -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/macosx/library/VLCLibraryCollectionViewItem.h
Changed
@@ -49,6 +49,8 @@ @property (readwrite, assign) IBOutlet VLCLinearProgressIndicator *progressIndicator; @property (readwrite, assign) IBOutlet NSBox *highlightBox; @property (readwrite, assign) IBOutlet NSLayoutConstraint *imageViewAspectRatioConstraint; +@property (readwrite, assign) IBOutlet NSLayoutConstraint *trailingSecondaryTextToLeadingUnplayedIndicatorConstraint; +@property (readwrite, assign) IBOutlet NSLayoutConstraint *trailingSecondaryTextToTrailingSuperviewConstraint; @property (readwrite, retain, nonatomic) id<VLCMediaLibraryItemProtocol> representedItem;
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/macosx/library/VLCLibraryCollectionViewItem.m -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/macosx/library/VLCLibraryCollectionViewItem.m
Changed
@@ -53,6 +53,7 @@ NSLayoutConstraint *_videoImageViewAspectRatioConstraint; } + @end @implementation VLCLibraryCollectionViewItem @@ -178,8 +179,9 @@ _mediaImageView.image = nil; _annotationTextField.hidden = YES; _progressIndicator.hidden = YES; - _unplayedIndicatorTextField.hidden = YES; _highlightBox.hidden = YES; + + self setUnplayedIndicatorHidden:YES; } - (void)setRepresentedItem:(id<VLCMediaLibraryItemProtocol>)representedItem @@ -245,7 +247,7 @@ } if (mediaItem.playCount == 0) { - _unplayedIndicatorTextField.hidden = NO; + self setUnplayedIndicatorHidden:NO; } } } @@ -261,6 +263,18 @@ } } +- (void)setUnplayedIndicatorHidden:(BOOL)indicatorHidden +{ + _unplayedIndicatorTextField.hidden = indicatorHidden; + + // Set priority of constraints for secondary info label, which is alongside unplayed indicator + const NSLayoutPriority superViewConstraintPriority = indicatorHidden ? NSLayoutPriorityRequired : NSLayoutPriorityDefaultLow; + const NSLayoutPriority unplayedIndicatorConstraintPriority = indicatorHidden ? NSLayoutPriorityDefaultLow : NSLayoutPriorityRequired; + + _trailingSecondaryTextToTrailingSuperviewConstraint.priority = superViewConstraintPriority; + _trailingSecondaryTextToLeadingUnplayedIndicatorConstraint.priority = unplayedIndicatorConstraintPriority; +} + #pragma mark - actions - (IBAction)playInstantly:(id)sender
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/macosx/library/VLCLibraryWindow.m -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/macosx/library/VLCLibraryWindow.m
Changed
@@ -24,9 +24,10 @@ #import "VLCLibraryDataTypes.h" -#import "extensions/NSString+Helpers.h" -#import "extensions/NSFont+VLCAdditions.h" #import "extensions/NSColor+VLCAdditions.h" +#import "extensions/NSImage+VLCAdditions.h" +#import "extensions/NSFont+VLCAdditions.h" +#import "extensions/NSString+Helpers.h" #import "extensions/NSView+VLCAdditions.h" #import "main/VLCMain.h" @@ -325,7 +326,7 @@ if (_playlistController.playbackOrder == VLC_PLAYLIST_PLAYBACK_ORDER_NORMAL) { self.shufflePlaylistButton.image = NSImage imageNamed:@"shuffleOff"; } else { - self.shufflePlaylistButton.image = NSImage imageNamed:@"shuffleOn"; + self.shufflePlaylistButton.image = NSImage imageNamed:@"shuffleOn" imageTintedWithColor:NSColor VLCAccentColor; } } @@ -351,10 +352,10 @@ enum vlc_playlist_playback_repeat currentRepeatState = _playlistController.playbackRepeat; switch (currentRepeatState) { case VLC_PLAYLIST_PLAYBACK_REPEAT_ALL: - self.repeatPlaylistButton.image = NSImage imageNamed:@"repeatAll"; + self.repeatPlaylistButton.image = NSImage imageNamed:@"repeatAll" imageTintedWithColor:NSColor VLCAccentColor; break; case VLC_PLAYLIST_PLAYBACK_REPEAT_CURRENT: - self.repeatPlaylistButton.image = NSImage imageNamed:@"repeatOne"; + self.repeatPlaylistButton.image = NSImage imageNamed:@"repeatOne" imageTintedWithColor:NSColor VLCAccentColor; break; default:
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/macosx/library/audio-library/VLCLibrarySongTableCellView.m -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/macosx/library/audio-library/VLCLibrarySongTableCellView.m
Changed
@@ -58,6 +58,11 @@ self.trackingView.viewToHide = self.playInstantlyButton; self.trackingView.viewToShow = self.trackNumberTextField; + + if (@available(macOS 10.14, *)) { + self.playInstantlyButton.contentTintColor = NSColor VLCAccentColor; + } + self prepareForReuse; } @@ -90,7 +95,12 @@ _representedMediaItem = representedMediaItem; self.songNameTextField.stringValue = representedMediaItem.displayString; self.durationTextField.stringValue = representedMediaItem.durationString; - self.trackNumberTextField.stringValue = NSString stringWithFormat:@"%d", representedMediaItem.trackNumber; + + if (representedMediaItem.trackNumber == 0) { + self.trackNumberTextField.stringValue = @"—"; + } else { + self.trackNumberTextField.stringValue = NSString stringWithFormat:@"%d", representedMediaItem.trackNumber; + } }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/macosx/library/media-source/VLCMediaSourceBaseDataSource.m -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/macosx/library/media-source/VLCMediaSourceBaseDataSource.m
Changed
@@ -62,7 +62,7 @@ self = super init; if (self) { _mediaSources = @; - NSNotificationCenter *notificationCenter = NSNotificationCenter defaultCenter; + NSNotificationCenter * const notificationCenter = NSNotificationCenter.defaultCenter; notificationCenter addObserver:self selector:@selector(mediaSourceChildrenReset:) name:VLCMediaSourceChildrenReset @@ -147,17 +147,20 @@ - (void)loadMediaSources { self.pathControl clearInputNodePathControlItems; + NSArray *mediaSources; if (self.mediaSourceMode == VLCMediaSourceModeLAN) { mediaSources = VLCMediaSourceProvider listOfLocalMediaSources; } else { mediaSources = VLCMediaSourceProvider listOfMediaSourcesForCategory:SD_CAT_INTERNET; } - NSUInteger count = mediaSources.count; + NSAssert(mediaSources != nil, @"Media sources array should not be nil"); + + const NSUInteger count = mediaSources.count; if (count > 0) { for (NSUInteger x = 0; x < count; x++) { - VLCMediaSource *mediaSource = mediaSourcesx; - VLCInputNode *rootNode = mediaSource rootNode; + VLCMediaSource * const mediaSource = mediaSourcesx; + VLCInputNode * const rootNode = mediaSource rootNode; mediaSource preparseInputNodeWithinTree:rootNode; } } @@ -187,8 +190,8 @@ numberOfItemsInSection:(NSInteger)section { if (_mediaSourceMode == VLCMediaSourceModeLAN) { - VLCMediaSource *mediaSource = _mediaSourcessection; - VLCInputNode *rootNode = mediaSource.rootNode; + VLCMediaSource * const mediaSource = _mediaSourcessection; + VLCInputNode * const rootNode = mediaSource.rootNode; return rootNode.numberOfChildren; } @@ -198,22 +201,22 @@ - (NSCollectionViewItem *)collectionView:(NSCollectionView *)collectionView itemForRepresentedObjectAtIndexPath:(NSIndexPath *)indexPath { - VLCMediaSourceDeviceCollectionViewItem *viewItem = collectionView makeItemWithIdentifier:VLCMediaSourceDeviceCellIdentifier forIndexPath:indexPath; - VLCMediaSource *mediaSource = _mediaSourcesindexPath.section; + VLCMediaSourceDeviceCollectionViewItem * const viewItem = collectionView makeItemWithIdentifier:VLCMediaSourceDeviceCellIdentifier forIndexPath:indexPath; + VLCMediaSource * const mediaSource = _mediaSourcesindexPath.section; if (_mediaSourceMode == VLCMediaSourceModeLAN) { - VLCInputNode *rootNode = mediaSource.rootNode; - NSArray *nodeChildren = rootNode.children; - VLCInputNode *childNode = nodeChildrenindexPath.item; - VLCInputItem *childRootInput = childNode.inputItem; + VLCInputNode * const rootNode = mediaSource.rootNode; + NSArray * const nodeChildren = rootNode.children; + VLCInputNode * const childNode = nodeChildrenindexPath.item; + VLCInputItem * const childRootInput = childNode.inputItem; viewItem.titleTextField.stringValue = childRootInput.name; const enum input_item_type_e inputType = childRootInput.inputType; const BOOL isStream = childRootInput.isStream; - NSURL *artworkURL = childRootInput.artworkURL; - NSImage *placeholder = nil; - + NSURL * const artworkURL = childRootInput.artworkURL; + + NSImage *placeholder; if (mediaSource.category == SD_CAT_LAN) { placeholder = NSImage imageNamed:@"bw-Music"; } else { @@ -237,6 +240,7 @@ break; } } + NSAssert(placeholder != nil, @"Placeholder image should not be nil"); if (artworkURL) { viewItem.mediaImageView setImageURL:artworkURL placeholderImage:placeholder; @@ -244,7 +248,7 @@ viewItem.mediaImageView.image = placeholder; } } else { - VLCMediaSource *mediaSource = _mediaSourcesindexPath.item; + VLCMediaSource * const mediaSource = _mediaSourcesindexPath.item; viewItem.titleTextField.stringValue = mediaSource.mediaSourceDescription; viewItem.mediaImageView.image = NSImage imageNamed:@"bw-Music"; } @@ -254,7 +258,7 @@ - (void)collectionView:(NSCollectionView *)collectionView didSelectItemsAtIndexPaths:(NSSet<NSIndexPath *> *)indexPaths { - NSIndexPath *indexPath = indexPaths.anyObject; + NSIndexPath * const indexPath = indexPaths.anyObject; if (!indexPath) { return; } @@ -264,14 +268,17 @@ if (_mediaSourceMode == VLCMediaSourceModeLAN) { mediaSource = _mediaSourcesindexPath.section; - VLCInputNode *rootNode = mediaSource.rootNode; - NSArray *nodeChildren = rootNode.children; + VLCInputNode * const rootNode = mediaSource.rootNode; + NSArray * const nodeChildren = rootNode.children; childNode = nodeChildrenindexPath.item; } else { mediaSource = _mediaSourcesindexPath.item; childNode = mediaSource.rootNode; } + NSAssert(mediaSource != nil, @"Media source should not be nil"); + NSAssert(childNode != nil, @"Child node should not be nil"); + self configureChildDataSourceWithNode:childNode andMediaSource:mediaSource; self reloadData; } @@ -296,8 +303,8 @@ referenceSizeForHeaderInSection:(NSInteger)section { if (_mediaSourceMode == VLCMediaSourceModeLAN) { - VLCMediaSource *mediaSource = _mediaSourcessection; - VLCInputNode *rootNode = mediaSource.rootNode; + VLCMediaSource * const mediaSource = _mediaSourcessection; + VLCInputNode * const rootNode = mediaSource.rootNode; // Hide Section if no children under the root node are found. return rootNode.numberOfChildren == 0 ? CGSizeZero : VLCLibraryCollectionViewSupplementaryElementView defaultHeaderSize; } @@ -309,7 +316,7 @@ layout:(NSCollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { - VLCLibraryCollectionViewFlowLayout *collectionViewFlowLayout = (VLCLibraryCollectionViewFlowLayout*)collectionViewLayout; + VLCLibraryCollectionViewFlowLayout * const collectionViewFlowLayout = (VLCLibraryCollectionViewFlowLayout*)collectionViewLayout; NSAssert(collectionViewLayout, @"This should be a flow layout and thus a valid pointer"); return VLCLibraryUIUnits adjustedCollectionViewItemSizeForCollectionView:collectionView withLayout:collectionViewFlowLayout @@ -326,16 +333,20 @@ * as the truth to the table view. For collection view, we use sections which can be reloaded individually, * so the problem is well hidden and does not need this work-around */ _discoveredLANdevices = nil; + NSMutableArray *currentDevices; @synchronized (_mediaSources) { - NSInteger mediaSourceCount = _mediaSources.count; + const NSInteger mediaSourceCount = _mediaSources.count; currentDevices = NSMutableArray alloc initWithCapacity:mediaSourceCount; + for (NSUInteger x = 0; x < mediaSourceCount; x++) { - VLCMediaSource *mediaSource = _mediaSourcesx; - VLCInputNode *rootNode = mediaSource.rootNode; + VLCMediaSource * const mediaSource = _mediaSourcesx; + VLCInputNode * const rootNode = mediaSource.rootNode; currentDevices addObjectsFromArray:rootNode.children; } } + + NSAssert(currentDevices != nil, @"Current devices should not be nil"); _discoveredLANdevices = currentDevices copy; return _discoveredLANdevices.count; } @@ -351,16 +362,17 @@ cellView = VLCLibraryTableCellView fromNibWithOwner:self; cellView.identifier = VLCMediaSourceTableViewCellIdentifier; } + cellView.primaryTitleTextField.hidden = YES; cellView.secondaryTitleTextField.hidden = YES; cellView.singlePrimaryTitleTextField.hidden = NO; if (_mediaSourceMode == VLCMediaSourceModeLAN) { - VLCInputNode *currentNode = _discoveredLANdevicesrow; - VLCInputItem *currentNodeInput = currentNode.inputItem; + VLCInputNode * const currentNode = _discoveredLANdevicesrow; + VLCInputItem * const currentNodeInput = currentNode.inputItem; - NSURL *artworkURL = currentNodeInput.artworkURL; - NSImage *placeholder = NSImage imageNamed:@"NXdefaultappicon"; + NSURL * const artworkURL = currentNodeInput.artworkURL; + NSImage * const placeholder = NSImage imageNamed:@"NXdefaultappicon"; if (artworkURL) { cellView.representedImageView setImageURL:artworkURL placeholderImage:placeholder; } else { @@ -369,7 +381,7 @@ cellView.singlePrimaryTitleTextField.stringValue = currentNodeInput.name; } else { - VLCMediaSource *mediaSource = _mediaSourcesrow; + VLCMediaSource * const mediaSource = _mediaSourcesrow; cellView.singlePrimaryTitleTextField.stringValue = mediaSource.mediaSourceDescription; cellView.representedImageView.image = NSImage imageNamed:@"NXFollow"; } @@ -379,20 +391,22 @@ - (void)tableViewSelectionDidChange:(NSNotification *)notification
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/macosx/playlist/VLCPlaylistTableCellView.h -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/macosx/playlist/VLCPlaylistTableCellView.h
Changed
@@ -37,7 +37,7 @@ @property (readwrite, assign) IBOutlet NSTextField *mediaTitleTextField; @property (readwrite, assign) IBOutlet NSTextField *durationTextField; @property (readwrite, assign) IBOutlet VLCImageView *mediaImageView; -@property (readwrite, assign) IBOutlet NSImageView *audioMediaTypeIndicator; +@property (readwrite, assign) IBOutlet NSTextField *audioMediaTypeIndicator; @property (readwrite, assign) IBOutlet VLCImageView *audioArtworkImageView; @end
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/macosx/playlist/VLCPlaylistTableCellView.m -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/macosx/playlist/VLCPlaylistTableCellView.m
Changed
@@ -22,8 +22,10 @@ #import "VLCPlaylistTableCellView.h" -#import "extensions/NSString+Helpers.h" +#import "extensions/NSColor+VLCAdditions.h" #import "extensions/NSFont+VLCAdditions.h" +#import "extensions/NSImage+VLCAdditions.h" +#import "extensions/NSString+Helpers.h" #import "library/VLCLibraryImageCache.h" @@ -46,12 +48,32 @@ { _representsCurrentPlaylistItem = representsCurrentPlaylistItem; + self updateFonts; + self updateColouredElements; +} + +- (void)updateFonts +{ NSFont * const displayedFont = _representsCurrentPlaylistItem ? NSFont boldSystemFontOfSize:NSFont.systemFontSize : NSFont systemFontOfSize:NSFont.systemFontSize; + NSFont * const sublineDisplayedFont = _representsCurrentPlaylistItem ? + NSFont boldSystemFontOfSize:NSFont.smallSystemFontSize : + NSFont systemFontOfSize:NSFont.smallSystemFontSize; + self.mediaTitleTextField.font = displayedFont; self.secondaryMediaTitleTextField.font = displayedFont; + self.durationTextField.font = displayedFont; + self.artistTextField.font = sublineDisplayedFont; +} + +- (void)updateColouredElements +{ + + self.audioMediaTypeIndicator.textColor = _representsCurrentPlaylistItem ? + NSColor.labelColor : + NSColor.secondaryLabelColor; } - (void)setRepresentedPlaylistItem:(VLCPlaylistItem *)item @@ -61,13 +83,23 @@ self.mediaImageView.image = thumbnail; }; - NSString *artist = item.artistName; - if (artist && artist.length > 0) { + const BOOL validArtistString = item.artistName && item.artistName.length > 0; + const BOOL validAlbumString = item.albumName && item.albumName > 0; + + NSString *songDetailString; + + if (validArtistString && validAlbumString) { + songDetailString = NSString stringWithFormat:@"%@ · %@", item.artistName, item.albumName; + } else if (validArtistString) { + songDetailString = item.artistName; + } + + if (songDetailString) { self.mediaTitleTextField.hidden = YES; self.secondaryMediaTitleTextField.hidden = NO; self.artistTextField.hidden = NO; self.secondaryMediaTitleTextField.stringValue = item.title; - self.artistTextField.stringValue = artist; + self.artistTextField.stringValue = songDetailString; self.audioMediaTypeIndicator.hidden = NO; self.audioArtworkImageView.hidden = NO;
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/macosx/preferences/prefs_widgets.m -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/macosx/preferences/prefs_widgets.m
Changed
@@ -37,17 +37,16 @@ #include <vlc_plugin.h> #include <vlc_actions.h> +#include "library/VLCLibraryUIUnits.h" #include "main/VLCMain.h" #include "extensions/NSString+Helpers.h" #include "preferences/prefs_widgets.h" -NSString *VLCPrefsWidgetModuleDragType = @"VLC media player module"; +NSString * const VLCPrefsWidgetModuleDragType = @"VLC media player module"; #define CONFIG_ITEM_STRING_LIST (CONFIG_ITEM_STRING + 10) #define CONFIG_ITEM_RANGED_INTEGER (CONFIG_ITEM_INTEGER + 10) -#define LEFTMARGIN 18 -#define RIGHTMARGIN 18 #define PREFS_WRAP 300 #define OFFSET_RIGHT 20 #define OFFSET_BETWEEN 2 @@ -274,15 +273,15 @@ #define ADD_SECURETEXTFIELD(o_textfield, superFrame, x_offset, my_y_offset, \ my_width, tooltip, init_value) \ { \ -NSRect s_rc = superFrame; \ -s_rc.origin.x = x_offset; \ -s_rc.origin.y = my_y_offset; \ -s_rc.size.height = 22; \ -s_rc.size.width = my_width; \ -o_textfield = NSSecureTextField alloc initWithFrame: s_rc; \ -o_textfield setFont:NSFont systemFontOfSize:0; \ -o_textfield setToolTip: tooltip; \ -o_textfield setStringValue: init_value; \ + NSRect s_rc = superFrame; \ + s_rc.origin.x = x_offset; \ + s_rc.origin.y = my_y_offset; \ + s_rc.size.height = 22; \ + s_rc.size.width = my_width; \ + o_textfield = NSSecureTextField alloc initWithFrame: s_rc; \ + o_textfield setFont:NSFont systemFontOfSize:0; \ + o_textfield setToolTip: tooltip; \ + o_textfield setStringValue: init_value; \ } #define ADD_COMBO(o_combo, superFrame, x_offset, my_y_offset, x2_offset, \ @@ -343,7 +342,7 @@ NSRect s_rc = superFrame; \ s_rc.origin.x = x_offset; \ s_rc.origin.y = my_y_offset; \ - s_rc.size.height = 23; \ + s_rc.size.height = 24; \ s_rc.size.width = 23; \ o_stepper = NSStepper alloc initWithFrame: s_rc; \ o_stepper setFont:NSFont systemFontOfSize:0; \ @@ -354,6 +353,7 @@ o_stepper setAction: @selector(stepperChanged:); \ o_stepper sendActionOn:NSLeftMouseUpMask | NSLeftMouseDownMask | \ NSLeftMouseDraggedMask; \ + o_stepper sizeToFit; \ } #define ADD_SLIDER(o_slider, superFrame, x_offset, my_y_offset, my_width, \ @@ -369,6 +369,7 @@ o_slider setToolTip: tooltip; \ o_slider setMaxValue: higher; \ o_slider setMinValue: lower; \ + o_slider setControlSize: NSControlSizeSmall; \ } #define ADD_CHECKBOX(o_checkbox, superFrame, x_offset, my_y_offset, label, \ @@ -415,6 +416,7 @@ } else { psz_name = NULL; } + self setAutoresizingMask:NSViewWidthSizable | NSViewMinYMargin ; } return (self); @@ -915,11 +917,14 @@ - (id)initWithItem:(module_config_t *)p_item withView:(NSView *)parentView { + const NSUInteger leftMargin = VLCLibraryUIUnits largeSpacing; + const NSUInteger rightMargin = VLCLibraryUIUnits largeSpacing; + NSRect mainFrame = parentView frame; NSString *labelString, *o_textfieldString, *o_textfieldTooltip; mainFrame.size.height = 22; - mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN; - mainFrame.origin.x = LEFTMARGIN; + mainFrame.size.width = mainFrame.size.width - leftMargin - rightMargin; + mainFrame.origin.x = leftMargin; mainFrame.origin.y = 0; if (self = super initWithFrame:mainFrame item:p_item) { @@ -992,11 +997,14 @@ - (id)initWithItem:(module_config_t *)p_item withView:(NSView *)parentView { + const NSUInteger leftMargin = VLCLibraryUIUnits largeSpacing; + const NSUInteger rightMargin = VLCLibraryUIUnits largeSpacing; + NSRect mainFrame = parentView frame; NSString *labelString, *o_textfieldTooltip; mainFrame.size.height = 22; - mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN + 1; - mainFrame.origin.x = LEFTMARGIN; + mainFrame.size.width = mainFrame.size.width - leftMargin - rightMargin + 1; + mainFrame.origin.x = leftMargin; mainFrame.origin.y = 0; if (self = super initWithFrame: mainFrame item:p_item) { @@ -1093,11 +1101,14 @@ - (id)initWithItem:(module_config_t *)p_item withView:(NSView *)parentView { + const NSUInteger leftMargin = VLCLibraryUIUnits largeSpacing; + const NSUInteger rightMargin = VLCLibraryUIUnits largeSpacing; + NSRect mainFrame = parentView frame; NSString *labelString, *o_itemTooltip, *o_textfieldString; mainFrame.size.height = 46; - mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN; - mainFrame.origin.x = LEFTMARGIN; + mainFrame.size.width = mainFrame.size.width - leftMargin - rightMargin; + mainFrame.origin.x = leftMargin; mainFrame.origin.y = 0; if (self = super initWithFrame:mainFrame item:p_item) { @@ -1133,7 +1144,6 @@ - (void) alignWithXPosition:(int)i_xPos { - ; } - (IBAction)openFileDialog:(id)sender @@ -1181,11 +1191,14 @@ - (id)initWithItem:(module_config_t *)p_item withView:(NSView *)parentView { + const NSUInteger leftMargin = VLCLibraryUIUnits largeSpacing; + const NSUInteger rightMargin = VLCLibraryUIUnits largeSpacing; + NSRect mainFrame = parentView frame; NSString *labelString, *o_popupTooltip; mainFrame.size.height = 22; - mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN + 1; - mainFrame.origin.x = LEFTMARGIN; + mainFrame.size.width = mainFrame.size.width - leftMargin - rightMargin + 1; + mainFrame.origin.x = leftMargin; mainFrame.origin.y = 0; if (self = super initWithFrame:mainFrame item:p_item) { @@ -1306,6 +1319,7 @@ { NSTextField *o_textfield; NSStepper *o_stepper; + } @end @@ -1313,11 +1327,14 @@ - (id)initWithItem:(module_config_t *)p_item withView:(NSView *)parentView { + const NSUInteger leftMargin = VLCLibraryUIUnits largeSpacing; + const NSUInteger rightMargin = VLCLibraryUIUnits largeSpacing; + NSRect mainFrame = parentView frame; NSString *labelString, *toolTip; - mainFrame.size.height = 23; - mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN + 1; - mainFrame.origin.x = LEFTMARGIN; + mainFrame.size.height = 24; + mainFrame.size.width = mainFrame.size.width - leftMargin - rightMargin + 1; + mainFrame.origin.x = leftMargin; mainFrame.origin.y = 0; if (self = super initWithFrame:mainFrame item:p_item) { @@ -1402,11 +1419,14 @@ - (id)initWithItem:(module_config_t *)p_item withView:(NSView *)parentView { + const NSUInteger leftMargin = VLCLibraryUIUnits largeSpacing; + const NSUInteger rightMargin = VLCLibraryUIUnits largeSpacing; + NSRect mainFrame = parentView frame; NSString *labelString, *o_textfieldTooltip; mainFrame.size.height = 22; - mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN + 1; - mainFrame.origin.x = LEFTMARGIN; + mainFrame.size.width = mainFrame.size.width - leftMargin - rightMargin + 1; + mainFrame.origin.x = leftMargin; mainFrame.origin.y = 0; if (self = super initWithFrame:mainFrame item:p_item) { @@ -1492,11 +1512,14 @@ - (id)initWithItem:(module_config_t *)p_item withView:(NSView *)parentView
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/macosx/views/VLCImageView.m -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/macosx/views/VLCImageView.m
Changed
@@ -59,7 +59,6 @@ self.contentGravity = VLCImageViewContentGravityResizeAspectFill; self.wantsLayer = YES; self setCropsImagesToRoundedCorners:YES; - self setupBorderColor; } - (void)setCropsImagesToRoundedCorners:(BOOL)cropsImagesToRoundedCorners @@ -67,11 +66,9 @@ if (cropsImagesToRoundedCorners) { self.layer.cornerRadius = 5.; self.layer.masksToBounds = YES; - self.layer.borderWidth = 2.; } else { self.layer.cornerRadius = 0.; self.layer.masksToBounds = NO; - self.layer.borderWidth = 0.; } } @@ -80,15 +77,6 @@ return self.layer.masksToBounds; } -- (void)setupBorderColor -{ - if (self.shouldShowDarkAppearance) { - self.layer.borderColor = NSColor VLClibraryItemBorderDarkColor.CGColor; - } else { - self.layer.borderColor = NSColor VLClibraryItemBorderLightColor.CGColor; - } -} - - (void)setImage:(NSImage *)image { _image = image; @@ -145,11 +133,6 @@ } } -- (void)viewDidChangeEffectiveAppearance -{ - self setupBorderColor; -} - - (void)setImageURL:(NSURL * _Nonnull)artworkURL placeholderImage:(NSImage * _Nullable)image { if(_currentArtworkURL isEqual:artworkURL) {
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/macosx/views/VLCLinearProgressIndicator.m -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/macosx/views/VLCLinearProgressIndicator.m
Changed
@@ -58,7 +58,7 @@ frame.size.width = 0.; _foregroundView = NSView alloc initWithFrame:frame; _foregroundView.wantsLayer = YES; - _foregroundView.layer.backgroundColor = NSColor VLClibraryProgressIndicatorForegroundColor.CGColor; + _foregroundView.layer.backgroundColor = NSColor VLCAccentColor.CGColor; _foregroundView.autoresizingMask = NSViewWidthSizable; _foregroundView.translatesAutoresizingMaskIntoConstraints = NO; self addSubview:_foregroundView;
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/macosx/windows/VLCOpenWindowController.m -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/macosx/windows/VLCOpenWindowController.m
Changed
@@ -344,7 +344,8 @@ if (!newMRL) newMRL = @""; - _MRL = newMRL; + NSString * const trimmedMRL = newMRL stringByTrimmingCharactersInSet:NSCharacterSet.whitespaceAndNewlineCharacterSet; + _MRL = trimmedMRL; dispatch_async(dispatch_get_main_queue(), ^{ self.mrlTextField setStringValue:self.MRL; @@ -1011,7 +1012,7 @@ } } } else { - mrlString = _netHTTPURLTextField stringValue; + mrlString = _netHTTPURLTextField.stringValue stringByTrimmingCharactersInSet:NSCharacterSet.whitespaceAndNewlineCharacterSet; // Fixup the user-provided URI const char *orig_uri = mrlString UTF8String;
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/macosx/windows/mainwindow/VLCMainWindowControlsBar.h -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/macosx/windows/mainwindow/VLCMainWindowControlsBar.h
Changed
@@ -40,9 +40,6 @@ @property (readwrite, strong) IBOutlet NSButton *prevButton; @property (readwrite, strong) IBOutlet NSButton *nextButton; -@property (readwrite, strong) IBOutlet NSButton *repeatButton; -@property (readwrite, strong) IBOutlet NSButton *shuffleButton; - @property (readwrite, strong) IBOutlet NSButton *volumeUpButton; - (IBAction)stop:(id)sender;
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/macosx/windows/mainwindow/VLCMainWindowControlsBar.m -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/macosx/windows/mainwindow/VLCMainWindowControlsBar.m
Changed
@@ -25,6 +25,7 @@ #import "VLCControlsBarCommon.h" #import "extensions/NSColor+VLCAdditions.h" +#import "extensions/NSImage+VLCAdditions.h" #import "extensions/NSString+Helpers.h" #import "library/VLCInputItem.h" @@ -49,12 +50,6 @@ @interface VLCMainWindowControlsBar() { - NSImage *_repeatOffImage; - NSImage *_repeatAllImage; - NSImage *_repeatOneImage; - NSImage *_shuffleOffImage; - NSImage *_shuffleOnImage; - VLCPlaylistController *_playlistController; VLCPlayerController *_playerController; } @@ -77,27 +72,6 @@ selector:@selector(playbackStateChanged:) name:VLCPlayerStateChanged object:nil; - notificationCenter addObserver:self - selector:@selector(shuffleStateUpdated:) - name:VLCPlaybackOrderChanged - object:nil; - notificationCenter addObserver:self - selector:@selector(repeatStateUpdated:) - name:VLCPlaybackRepeatChanged - object:nil; - - _repeatAllImage = NSImage imageNamed:@"repeatAll"; - _repeatOffImage = NSImage imageNamed:@"repeatOff"; - _repeatOneImage = NSImage imageNamed:@"repeatOne"; - - _shuffleOffImage = NSImage imageNamed:@"shuffleOff"; - _shuffleOnImage = NSImage imageNamed:@"shuffleOn"; - - self.repeatButton.action = @selector(repeatAction:); - self.shuffleButton.action = @selector(shuffleAction:); - - self repeatStateUpdated:nil; - self shuffleStateUpdated:nil; self.stopButton setToolTip: _NS("Stop"); self.stopButton.accessibilityLabel = self.stopButton.toolTip; @@ -158,32 +132,6 @@ VLCMain sharedInstance.libraryWindow reopenVideoView; } -- (IBAction)shuffleAction:(id)sender -{ - if (_playlistController.playbackOrder == VLC_PLAYLIST_PLAYBACK_ORDER_NORMAL) { - _playlistController.playbackOrder = VLC_PLAYLIST_PLAYBACK_ORDER_RANDOM; - } else { - _playlistController.playbackOrder = VLC_PLAYLIST_PLAYBACK_ORDER_NORMAL; - } -} - -- (IBAction)repeatAction:(id)sender -{ - enum vlc_playlist_playback_repeat currentRepeatState = _playlistController.playbackRepeat; - switch (currentRepeatState) { - case VLC_PLAYLIST_PLAYBACK_REPEAT_ALL: - _playlistController.playbackRepeat = VLC_PLAYLIST_PLAYBACK_REPEAT_NONE; - break; - case VLC_PLAYLIST_PLAYBACK_REPEAT_CURRENT: - _playlistController.playbackRepeat = VLC_PLAYLIST_PLAYBACK_REPEAT_ALL; - break; - - default: - _playlistController.playbackRepeat = VLC_PLAYLIST_PLAYBACK_REPEAT_CURRENT; - break; - } -} - #pragma mark - #pragma mark Extra updaters @@ -238,40 +186,6 @@ } } -- (void)repeatStateUpdated:(NSNotification *)aNotification -{ - enum vlc_playlist_playback_repeat currentRepeatState = _playlistController.playbackRepeat; - - switch (currentRepeatState) { - case VLC_PLAYLIST_PLAYBACK_REPEAT_CURRENT: - self.repeatButton.image = _repeatOneImage; - break; - case VLC_PLAYLIST_PLAYBACK_REPEAT_ALL: - self.repeatButton.image = _repeatAllImage; - break; - case VLC_PLAYLIST_PLAYBACK_REPEAT_NONE: - default: - self.repeatButton.image = _repeatOffImage; - break; - } - - if (@available(macOS 11.0, *)) { - self.repeatButton.contentTintColor = currentRepeatState == VLC_PLAYLIST_PLAYBACK_REPEAT_NONE ? - nil : NSColor VLCAccentColor; - } -} - -- (void)shuffleStateUpdated:(NSNotification *)aNotification -{ - self.shuffleButton.image = _playlistController.playbackOrder == VLC_PLAYLIST_PLAYBACK_ORDER_NORMAL ? - _shuffleOffImage : _shuffleOnImage; - - if (@available(macOS 11.0, *)) { - self.shuffleButton.contentTintColor = _playlistController.playbackOrder == VLC_PLAYLIST_PLAYBACK_ORDER_NORMAL ? - nil : NSColor VLCAccentColor; - } -} - - (void)updatePlaybackControls:(NSNotification *)aNotification { bool b_seekable = _playerController.seekable;
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/macosx/windows/video/VLCVideoWindowCommon.m -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/macosx/windows/video/VLCVideoWindowCommon.m
Changed
@@ -70,9 +70,9 @@ BOOL _preFullScreenVideoViewLibraryControlsDisplayed; } -- (void)customZoom:(id)sender; - (void)hasBecomeFullscreen; - (void)hasEndedFullscreen; + @end @implementation VLCVideoWindowCommon @@ -171,149 +171,6 @@ super setTitle: title; } -#pragma mark - -#pragma mark zoom / minimize / close - -- (BOOL)validateMenuItem:(NSMenuItem *)menuItem -{ - SEL s_menuAction = menuItem action; - - if ((s_menuAction == @selector(performClose:)) || (s_menuAction == @selector(performMiniaturize:)) || (s_menuAction == @selector(performZoom:))) - return YES; - - return super validateMenuItem:menuItem; -} - -- (BOOL)windowShouldClose:(id)sender -{ - return YES; -} - -- (void)performClose:(id)sender -{ - if (!(self styleMask & NSTitledWindowMask)) { - NSNotificationCenter defaultCenter postNotificationName:NSWindowWillCloseNotification object:self; - - self close; - } else - super performClose: sender; -} - -- (void)performMiniaturize:(id)sender -{ - if (!(self styleMask & NSTitledWindowMask)) - self miniaturize: sender; - else - super performMiniaturize: sender; -} - -- (void)performZoom:(id)sender -{ - if (!(self styleMask & NSTitledWindowMask)) - self customZoom: sender; - else - super performZoom: sender; -} - -- (void)zoom:(id)sender -{ - if (!(self styleMask & NSTitledWindowMask)) - self customZoom: sender; - else - super zoom: sender; -} - -/** - * Given a proposed frame rectangle, return a modified version - * which will fit inside the screen. - * - * This method is based upon NSWindow.m, part of the GNUstep GUI Library, licensed under LGPLv2+. - * Authors: Scott Christley <scottc@net-community.com>, Venkat Ajjanagadde <venkat@ocbi.com>, - * Felipe A. Rodriguez <far@ix.netcom.com>, Richard Frith-Macdonald <richard@brainstorm.co.uk> - * Copyright (C) 1996 Free Software Foundation, Inc. - */ -- (NSRect) customConstrainFrameRect: (NSRect)frameRect toScreen: (NSScreen*)screen -{ - NSRect screenRect = screen visibleFrame; - CGFloat difference; - - /* Move top edge of the window inside the screen */ - difference = NSMaxY (frameRect) - NSMaxY (screenRect); - if (difference > 0) { - frameRect.origin.y -= difference; - } - - /* If the window is resizable, resize it (if needed) so that the - bottom edge is on the screen or can be on the screen when the user moves - the window */ - difference = NSMaxY (screenRect) - NSMaxY (frameRect); - if (self.styleMask & NSResizableWindowMask) { - CGFloat difference2; - - difference2 = screenRect.origin.y - frameRect.origin.y; - difference2 -= difference; - // Take in account the space between the top of window and the top of the - // screen which can be used to move the bottom of the window on the screen - if (difference2 > 0) { - frameRect.size.height -= difference2; - frameRect.origin.y += difference2; - } - - /* Ensure that resizing doesn't makewindow smaller than minimum */ - difference2 = self minSize.height - frameRect.size.height; - if (difference2 > 0) { - frameRect.size.height += difference2; - frameRect.origin.y -= difference2; - } - } - - return frameRect; -} - -#define DIST 3 - -/** - Zooms the receiver. This method calls the delegate method - windowShouldZoom:toFrame: to determine if the window should - be allowed to zoom to full screen. - * - * This method is based upon NSWindow.m, part of the GNUstep GUI Library, licensed under LGPLv2+. - * Authors: Scott Christley <scottc@net-community.com>, Venkat Ajjanagadde <venkat@ocbi.com>, - * Felipe A. Rodriguez <far@ix.netcom.com>, Richard Frith-Macdonald <richard@brainstorm.co.uk> - * Copyright (C) 1996 Free Software Foundation, Inc. - */ -- (void) customZoom: (id)sender -{ - NSRect maxRect = self screen visibleFrame; - NSRect currentFrame = self frame; - - if (self delegate respondsToSelector: @selector(windowWillUseStandardFrame:defaultFrame:)) { - maxRect = self delegate windowWillUseStandardFrame: self defaultFrame: maxRect; - } - - maxRect = self customConstrainFrameRect: maxRect toScreen: self screen; - - // Compare the new frame with the current one - if ((fabs(NSMaxX(maxRect) - NSMaxX(currentFrame)) < DIST) - && (fabs(NSMaxY(maxRect) - NSMaxY(currentFrame)) < DIST) - && (fabs(NSMinX(maxRect) - NSMinX(currentFrame)) < DIST) - && (fabs(NSMinY(maxRect) - NSMinY(currentFrame)) < DIST)) { - // Already in zoomed mode, reset user frame, if stored - if (self frameAutosaveName != nil) { - self setFrame: self.previousSavedFrame display: YES animate: YES; - self saveFrameUsingName: self frameAutosaveName; - } - return; - } - - if (self frameAutosaveName != nil) { - self saveFrameUsingName: self frameAutosaveName; - self.previousSavedFrame = self frame; - } - - self setFrame: maxRect display: YES animate: YES; -} - # pragma mark - # pragma mark Window level handling
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/dialogs/dialogs/qml/CustomDialog.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/dialogs/dialogs/qml/CustomDialog.qml
Changed
@@ -36,8 +36,8 @@ function ask(text, acceptCb, rejectCb, buttons) { //TODO: use a Promise here when dropping support of Qt 5.11 - var okTxt = I18n.qtr("OK") - var cancelTxt = I18n.qtr("cancel") + let okTxt = I18n.qtr("OK") + let cancelTxt = I18n.qtr("cancel") if (buttons) { if (buttons.cancel) { cancelTxt = buttons.cancel
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/dialogs/toolbar/qml/EditorDNDDelegate.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/dialogs/toolbar/qml/EditorDNDDelegate.qml
Changed
@@ -78,7 +78,7 @@ onPositionChanged: { if (drag.active) { // FIXME: There must be a better way of this - var pos = mapToItem(loader.parent, mouseX, mouseY) + const pos = mapToItem(loader.parent, mouseX, mouseY) // y should be set first, because the automatic scroll is // triggered by change on X loader.y = pos.y @@ -100,7 +100,7 @@ } onDropped: { - var destIndex = parent.DelegateModel.itemsIndex + let destIndex = parent.DelegateModel.itemsIndex if((drag.source.dndView === dndView) && (drag.source.DelegateModel.itemsIndex < destIndex))
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/dialogs/toolbar/qml/EditorDNDView.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/dialogs/toolbar/qml/EditorDNDView.qml
Changed
@@ -151,7 +151,7 @@ } onDropped: { - var destIndex = playerBtnDND.count + let destIndex = playerBtnDND.count if (drag.source.dndView === playerBtnDND) --destIndex
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/dialogs/toolbar/qml/ToolbarEditor.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/dialogs/toolbar/qml/ToolbarEditor.qml
Changed
@@ -68,7 +68,7 @@ implicitWidth: VLCStyle.button_width_large text: { - var text = modelData.name + const text = modelData.name if (!!MainCtx.controlbarProfileModel.currentModel && MainCtx.controlbarProfileModel.currentModel.getModel(identifier).dirty) @@ -180,8 +180,8 @@ Layout.fillHeight: true Layout.fillWidth: { if (count === 0) { - for (var i = 0; i < repeater.count; ++i) { - var item = repeater.itemAt(i) + for (let i = 0; i < repeater.count; ++i) { + const item = repeater.itemAt(i) if (!!item && item.count > 0) return false }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/dialogs/toolbar/qml/ToolbarEditorButtonList.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/dialogs/toolbar/qml/ToolbarEditorButtonList.qml
Changed
@@ -159,7 +159,7 @@ if (drag.active) { // FIXME: There must be a better way of this - var pos = mapToItem(buttonDragItem.parent, mouseX, mouseY) + const pos = mapToItem(buttonDragItem.parent, mouseX, mouseY) // y should be set first, because the automatic scroll is // triggered by change on X buttonDragItem.y = pos.y
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/dialogs/toolbar/qml/ToolbarEditorDialog.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/dialogs/toolbar/qml/ToolbarEditorDialog.qml
Changed
@@ -102,7 +102,7 @@ } displayText: { - var text + let text if (!!MainCtx.controlbarProfileModel.currentModel) text = MainCtx.controlbarProfileModel.currentModel.name @@ -133,7 +133,7 @@ iconText: VLCIcons.profile_new onClicked: { - var npDialog = DialogsProvider.getTextDialog(null, + const npDialog = DialogsProvider.getTextDialog(null, I18n.qtr("Profile Name"), I18n.qtr("Please enter the new profile name:"), I18n.qtr("Profile %1").arg(comboBox.count + 1))
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/maininterface/qml/BannerSources.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/maininterface/qml/BannerSources.qml
Changed
@@ -237,7 +237,7 @@ // sometimes when view changes, one of the "focusable" object will become disabled // but because of focus chainning, FocusScope still tries to force active focus on the object // but that will fail, manually assign focus in such cases - var focusable = localContextGroup, localMenuGroup, playlistGroup + const focusable = localContextGroup, localMenuGroup, playlistGroup if (!focusable.some(function (obj) { return obj.activeFocus; })) { // no object has focus localToolbar.nextItemInFocusChain(true).forceActiveFocus() @@ -325,12 +325,12 @@ Connections { target: root onExtraLocalActionsChanged : { - for (var i = 0; i < localContextModel.countExtra; i++) { + for (let i = 0; i < localContextModel.countExtra; i++) { localContextModel.remove(localContextModel.count - localContextModel.countExtra, localContextModel.countExtra) } if (root.extraLocalActions && root.extraLocalActions instanceof ObjectModel) { - for (i = 0; i < root.extraLocalActions.count; i++) + for (let i = 0; i < root.extraLocalActions.count; i++) localContextModel.append(root.extraLocalActions.get(i)) localContextModel.countExtra = root.extraLocalActions.count } else {
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/maininterface/qml/MainDisplay.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/maininterface/qml/MainDisplay.qml
Changed
@@ -34,7 +34,7 @@ import "qrc:///dialogs/" as DG FocusScope { - id: root + id: g_mainDisplay //name and properties of the tab to be initially loaded property var view: ({ @@ -54,10 +54,6 @@ property bool _showMiniPlayer: false property var _oldViewProperties: ({}) // saves last state of the views - // Aliases - - property alias g_mainDisplay: root - onViewChanged: { _oldViewPropertiesview.name = view.properties loadView() @@ -68,9 +64,9 @@ } function loadView() { - var found = stackView.loadView(root.pageModel, root.view.name, root.view.properties) + const found = stackView.loadView(g_mainDisplay.pageModel, g_mainDisplay.view.name, g_mainDisplay.view.properties) - var item = stackView.currentItem + const item = stackView.currentItem item.Navigation.parentItem = medialibId item.Navigation.upItem = sourcesBanner @@ -106,7 +102,7 @@ sourcesBanner.selectedIndex = pageModel.filter(function (e) { return e.listed }).findIndex(function (e) { - return e.name === root.view.name + return e.name === g_mainDisplay.view.name }) if (item.pageModel !== undefined) @@ -190,7 +186,7 @@ function showPlayer() { - root._inhibitMiniPlayer = true + g_mainDisplay._inhibitMiniPlayer = true History.push("player") } @@ -221,7 +217,7 @@ id: medialibId anchors.fill: parent - Navigation.parentItem: root + Navigation.parentItem: g_mainDisplay Rectangle { id: parentRectangle @@ -243,7 +239,7 @@ tint: frostedTheme.bg.secondary effectRect: { - var _height = 0 + let _height = 0 if (loaderProgress.active && loaderProgress.item.visible) _height += loaderProgress.item.height if (miniPlayer.visible) @@ -269,12 +265,12 @@ Layout.maximumHeight: height Layout.fillWidth: true - model: root.tabModel + model: g_mainDisplay.tabModel plListView: playlist onItemClicked: { - var name = root.tabModel.get(index).name + const name = g_mainDisplay.tabModel.get(index).name selectedIndex = index if (_oldViewPropertiesname === undefined) History.push("mc", name) @@ -304,7 +300,7 @@ left: parent.left bottom: parent.bottom - bottomMargin: root.displayMargin + bottomMargin: g_mainDisplay.displayMargin right: (playlistColumn.visible && !VLCStyle.isScreenSmall) ? playlistColumn.left @@ -347,12 +343,12 @@ focus: false implicitWidth: VLCStyle.isScreenSmall - ? root.width * 0.8 - : Helpers.clamp(root.width / resizeHandle.widthFactor, + ? g_mainDisplay.width * 0.8 + : Helpers.clamp(g_mainDisplay.width / resizeHandle.widthFactor, playlist.minimumWidth, - root.width / 2) + g_mainDisplay.width / 2) width: 0 - height: parent.height - root.displayMargin + height: parent.height - g_mainDisplay.displayMargin visible: false @@ -408,7 +404,7 @@ rightPadding: VLCStyle.applicationHorizontalMargin bottomPadding: topPadding + Math.max(VLCStyle.applicationVerticalMargin - - root.displayMargin, 0) + - g_mainDisplay.displayMargin, 0) Navigation.parentItem: medialibId Navigation.upItem: sourcesBanner @@ -436,7 +432,7 @@ atRight: false targetWidth: playlistColumn.width - sourceWidth: root.width + sourceWidth: g_mainDisplay.width onWidthFactorChanged: { if (!_inhibitMainInterfaceUpdate) @@ -500,17 +496,17 @@ width: VLCStyle.dp(320, VLCStyle.scale) height: VLCStyle.dp(180, VLCStyle.scale) z: 2 - visible: !root._inhibitMiniPlayer && root._showMiniPlayer && MainCtx.hasEmbededVideo - enabled: !root._inhibitMiniPlayer && root._showMiniPlayer && MainCtx.hasEmbededVideo + visible: !g_mainDisplay._inhibitMiniPlayer && g_mainDisplay._showMiniPlayer && MainCtx.hasEmbededVideo + enabled: !g_mainDisplay._inhibitMiniPlayer && g_mainDisplay._showMiniPlayer && MainCtx.hasEmbededVideo dragXMin: 0 - dragXMax: root.width - playerPip.width + dragXMax: g_mainDisplay.width - playerPip.width dragYMin: sourcesBanner.y + sourcesBanner.height dragYMax: miniPlayer.y - playerPip.height //keep the player visible on resize Connections { - target: root + target: g_mainDisplay onWidthChanged: { if (playerPip.x > playerPip.dragXMax) playerPip.x = playerPip.dragXMax @@ -524,7 +520,7 @@ DG.Dialogs { z: 10 - bgContent: root + bgContent: g_mainDisplay anchors { bottom: miniPlayer.visible ? miniPlayer.top : parent.bottom @@ -537,7 +533,7 @@ id: miniPlayer BindingCompat on state { - when: root._inhibitMiniPlayer && !miniPlayer.visible + when: g_mainDisplay._inhibitMiniPlayer && !miniPlayer.visible value: "" }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/maininterface/qml/MainInterface.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/maininterface/qml/MainInterface.qml
Changed
@@ -30,23 +30,21 @@ import "qrc:///playlist/" as PL Item { - id: root + id: g_mainInterface property bool _interfaceReady: false property bool _playlistReady: false - property alias g_root: root - BindingCompat { - target: VLCStyle.self + target: VLCStyle property: "appWidth" - value: root.width + value: g_mainInterface.width } BindingCompat { - target: VLCStyle.self + target: VLCStyle property: "appHeight" - value: root.height + value: g_mainInterface.height } Window.onWindowChanged: { @@ -91,8 +89,8 @@ playlistPtr: MainCtx.mainPlaylist onPlaylistInitialized: { - root._playlistReady = true - if (root._interfaceReady) + g_mainInterface._playlistReady = true + if (g_mainInterface._interfaceReady) setInitialView() } } @@ -103,12 +101,12 @@ function loadCurrentHistoryView() { - var current = History.current + const current = History.current if ( !current || !current.name || !current.properties ) { console.warn("unable to load requested view, undefined") return } - stackView.loadView(root.pageModel, current.name, current.properties) + stackView.loadView(g_mainInterface.pageModel, current.name, current.properties) } Connections { @@ -118,7 +116,7 @@ function setInitialView() { //set the initial view - var loadPlayer = !mainPlaylistController.empty; + const loadPlayer = !mainPlaylistController.empty; if (MainCtx.mediaLibraryAvailable) History.push("mc", "video", loadPlayer ? History.Stay : History.Go) @@ -131,8 +129,8 @@ Component.onCompleted: { - root._interfaceReady = true; - if (root._playlistReady) + g_mainInterface._interfaceReady = true; + if (g_mainInterface._playlistReady) setInitialView() } @@ -140,10 +138,10 @@ DropArea { anchors.fill: parent onDropped: { - var urls = + let urls = if (drop.hasUrls) { - for (var i = 0; i < drop.urls.length; i++) + for (let i = 0; i < drop.urls.length; i++) urls.push(drop.urlsi) } else if (drop.hasText) { @@ -208,7 +206,7 @@ Loader { active: { - var windowVisibility = MainCtx.intfMainWindow.visibility + const windowVisibility = MainCtx.intfMainWindow.visibility return MainCtx.clientSideDecoration && (windowVisibility !== Window.Maximized) && (windowVisibility !== Window.FullScreen)
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/maininterface/qml/MainViewLoader.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/maininterface/qml/MainViewLoader.qml
Changed
@@ -118,7 +118,7 @@ function resetFocus() { if (!model || model.count === 0) return - var initialIndex = root.initialIndex + let initialIndex = root.initialIndex if (initialIndex >= model.count) initialIndex = 0
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/medialibrary/mlplaylist.cpp -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/medialibrary/mlplaylist.cpp
Changed
@@ -44,6 +44,11 @@ return m_name; } +void MLPlaylist::setName(const QString & name) +{ + m_name = name; +} + //------------------------------------------------------------------------------------------------- VLCTick MLPlaylist::getDuration() const
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/medialibrary/mlplaylist.hpp -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/medialibrary/mlplaylist.hpp
Changed
@@ -35,6 +35,7 @@ public: // Interface QString getName() const; + void setName(const QString & name); VLCTick getDuration() const;
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/medialibrary/mlplaylistlistmodel.cpp -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/medialibrary/mlplaylistlistmodel.cpp
Changed
@@ -25,8 +25,8 @@ // VLC includes #include <vlc_media_library.h> #include "qt.hpp" - #include "util/vlctick.hpp" +#include "dialogs/dialogs_provider.hpp" // MediaLibrary includes #include "mlhelper.hpp" @@ -161,8 +161,6 @@ return result; } -//------------------------------------------------------------------------------------------------- - /* Q_INVOKABLE */ bool MLPlaylistListModel::deletePlaylists(const QVariantList & ids) { assert(m_mediaLib); @@ -203,6 +201,47 @@ //------------------------------------------------------------------------------------------------- +/* Q_INVOKABLE */ bool MLPlaylistListModel::showDialogRename(const QModelIndex & index) +{ + int row = index.row(); + + if (row < 0 || row >= rowCount()) + return false; + + MLPlaylist * playlist = static_cast<MLPlaylist *> (item(row)); + + QString name = playlist->getName(); + + static DialogsProvider * provider = DialogsProvider::getInstance(); + + bool ok = false; + + QString result = provider->getTextDialog(NULL, qtr("Rename playlist"), + qtr("Please enter the new playlist name:"), + name, &ok).toString(); + + if (ok == false || result.isEmpty() || result == name) + return false; + + int64_t id = playlist->getId().id; + + m_mediaLib->runOnMLThread(this, + // ML thread + id, result(vlc_medialibrary_t * ml) + { + vlc_ml_playlist_rename(ml, id, qtu(result)); + }); + + // NOTE: We want the change to be visible right away. + playlist->setName(result); + + emit dataChanged(index, index, { PLAYLIST_NAME }); + + return true; +} + +//------------------------------------------------------------------------------------------------- + /* Q_INVOKABLE */ MLItemId MLPlaylistListModel::getItemId(int index) const { if (index < 0 || index >= rowCount())
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/medialibrary/mlplaylistlistmodel.hpp -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/medialibrary/mlplaylistlistmodel.hpp
Changed
@@ -68,6 +68,8 @@ Q_INVOKABLE bool deletePlaylists(const QVariantList & ids); + Q_INVOKABLE bool showDialogRename(const QModelIndex & index); + MLItemId getItemId(int index) const; public: // QAbstractItemModel implementation
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml
Changed
@@ -44,7 +44,7 @@ implicitWidth: layout.implicitWidth implicitHeight: { - var verticalMargins = layout.anchors.topMargin + layout.anchors.bottomMargin + const verticalMargins = layout.anchors.topMargin + layout.anchors.bottomMargin if (tracks.contentHeight < artAndControl.height) return artAndControl.height + verticalMargins return Math.min(tracks.contentHeight @@ -63,7 +63,7 @@ } function _getStringTrack() { - var count = Helpers.get(model, "nb_tracks", 0); + const count = Helpers.get(model, "nb_tracks", 0); if (count < 2) return I18n.qtr("%1 track").arg(count);
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/medialibrary/qml/MusicArtist.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/medialibrary/qml/MusicArtist.qml
Changed
@@ -200,8 +200,8 @@ onInitialIndexChanged: resetFocus() onActiveFocusChanged: { if (activeFocus && albumModel.count > 0 && !albumSelectionModel.hasSelection) { - var initialIndex = 0 - var albumsListView = MainCtx.gridView ? _currentView : headerItem.albumsListView + let initialIndex = 0 + const albumsListView = MainCtx.gridView ? _currentView : headerItem.albumsListView if (albumsListView.currentIndex !== -1) initialIndex = albumsListView.currentIndex albumSelectionModel.select(albumModel.index(initialIndex, 0), ItemSelectionModel.ClearAndSelect) @@ -221,11 +221,11 @@ if (albumModel.count === 0) { return } - var initialIndex = root.initialIndex + let initialIndex = root.initialIndex if (initialIndex >= albumModel.count) initialIndex = 0 albumSelectionModel.select(albumModel.index(initialIndex, 0), ItemSelectionModel.ClearAndSelect) - var albumsListView = MainCtx.gridView ? _currentView : headerItem.albumsListView + const albumsListView = MainCtx.gridView ? _currentView : headerItem.albumsListView if (albumsListView) { albumsListView.currentIndex = initialIndex albumsListView.positionViewAtIndex(initialIndex, ItemView.Contain)
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/medialibrary/qml/MusicArtistDelegate.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/medialibrary/qml/MusicArtistDelegate.qml
Changed
@@ -94,7 +94,7 @@ } drag.onActiveChanged: { - var dragItem = drag.target; + const dragItem = drag.target; if (drag.active == false) dragItem.Drag.drop(); @@ -105,7 +105,7 @@ onPositionChanged: { if (drag.active == false) return; - var pos = drag.target.parent.mapFromItem(root, mouseX, mouseY); + const pos = drag.target.parent.mapFromItem(root, mouseX, mouseY); drag.target.x = pos.x + VLCStyle.dragDelta; drag.target.y = pos.y + VLCStyle.dragDelta;
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml
Changed
@@ -72,7 +72,7 @@ if (artistModel.count === 0) { return } - var initialIndex = root.initialIndex + let initialIndex = root.initialIndex if (initialIndex >= artistModel.count) initialIndex = 0 if (initialIndex !== artistList.currentIndex) { @@ -102,7 +102,7 @@ onCountChanged: { if (artistModel.count > 0 && !selectionModel.hasSelection) { - var initialIndex = root.initialIndex + let initialIndex = root.initialIndex if (initialIndex >= artistModel.count) initialIndex = 0 artistList.currentIndex = initialIndex
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/medialibrary/qml/MusicGenres.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/medialibrary/qml/MusicGenres.qml
Changed
@@ -68,8 +68,8 @@ if (selectionModel.selectedIndexes.length > 1) { MediaLib.addAndPlay(model.getIdsForIndexes(selectionModel.selectedIndexes)) } else if (selectionModel.selectedIndexes.length === 1) { - var sel = selectionModel.selectedIndexes0 - var model = genreModel.getDataAt(sel) + const sel = selectionModel.selectedIndexes0 + const model = genreModel.getDataAt(sel) showAlbumView(model.id, model.name, Qt.TabFocusReason) } } @@ -91,7 +91,7 @@ */ onActiveFocusChanged: { if (activeFocus && genreModel.count > 0 && !selectionModel.hasSelection) { - var initialIndex = 0 + let initialIndex = 0 if (currentIndex !== -1) initialIndex = currentIndex
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/medialibrary/qml/PlaylistMedia.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/medialibrary/qml/PlaylistMedia.qml
Changed
@@ -151,9 +151,9 @@ return } - var item = drop.source; + const item = drop.source; - var destinationIndex = before ? index : (index + 1) + const destinationIndex = before ? index : (index + 1) // NOTE: Move implementation. if (dragItem === item) {
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/medialibrary/qml/PlaylistMediaDisplay.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/medialibrary/qml/PlaylistMediaDisplay.qml
Changed
@@ -73,7 +73,7 @@ function resetFocus() { if (model.count === 0) return - var initialIndex = root.initialIndex + let initialIndex = root.initialIndex if (initialIndex >= model.count) initialIndex = 0 @@ -87,7 +87,7 @@ function onDelete() { - var indexes = modelSelect.selectedIndexes; + const indexes = modelSelect.selectedIndexes; if (indexes.length === 0) return;
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/medialibrary/qml/PlaylistMediaList.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/medialibrary/qml/PlaylistMediaList.qml
Changed
@@ -110,13 +110,13 @@ if (root.selectionModel.selectedIndexes.length > 1) { MediaLib.addAndPlay(model.getIdsForIndexes(selectionModel.selectedIndexes)); } else if (root.selectionModel.selectedIndexes.length === 1) { - var index = selectionModel.selectedIndexes0; + const index = selectionModel.selectedIndexes0; showList(model.getDataAt(index), Qt.TabFocusReason); } } function _getCount(model) { - var count = model.count; + const count = model.count; if (count < 100) return count;
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/medialibrary/qml/VideoAll.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/medialibrary/qml/VideoAll.qml
Changed
@@ -200,7 +200,7 @@ onContextMenuButtonClicked: { gridView.rightClickOnItem(index); - var options = {} + const options = {} if (root.isInfoExpandPanelAvailable(model)) options"information" = index
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/medialibrary/qml/VideoAllSubDisplay.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/medialibrary/qml/VideoAllSubDisplay.qml
Changed
@@ -77,7 +77,7 @@ function getLabelGroup(model, string) { if (!model) return "" - var count = model.count + const count = model.count if (count === 1) { return getLabel(model) @@ -159,9 +159,9 @@ } function onAction(indexes) { - var index = indexes0 + const index = indexes0 - var object = model.getDataAt(index); + const object = model.getDataAt(index); if (object.isVideo) { MediaLib.addAndPlay(model.getIdsForIndexes(indexes)) @@ -206,7 +206,7 @@ } function onAction(indexes) { - var index = indexes0 + const index = indexes0 root.showList(model.getDataAt(index), Qt.TabFocusReason) }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/menus/qml/GlobalShortcutsMedialib.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/menus/qml/GlobalShortcutsMedialib.qml
Changed
@@ -40,7 +40,7 @@ if (index < recentModel.count) { - var trackId = recentModel.data(recentModel.index(index, 0), MLRecentModel.RECENT_MEDIA_ID) + const trackId = recentModel.data(recentModel.index(index, 0), MLRecentModel.RECENT_MEDIA_ID) if (!!trackId) MediaLib.addAndPlay(trackId) }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/menus/qml/Menubar.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/menus/qml/Menubar.qml
Changed
@@ -86,7 +86,7 @@ onMenuClosed: _menuIndex = -1 onNavigateMenu: { - var i = (root._menuIndex + root.toolbarModel.length + direction) % root.toolbarModel.length + const i = (root._menuIndex + root.toolbarModel.length + direction) % root.toolbarModel.length root.openMenu(menubarLayout.visibleChildreni, root.toolbarModeli, i) }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/menus/qml_menu_wrapper.cpp -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/menus/qml_menu_wrapper.cpp
Changed
@@ -658,6 +658,17 @@ ml->addToPlaylist(ids); }); + if (ids.count() == 1) + { + action = m_menu->addAction(qtr("Rename")); + + QModelIndex index = selected.first(); + + connect(action, &QAction::triggered, this, index() { + m_model->showDialogRename(index); + }); + } + action = m_menu->addAction(qtr("Delete")); connect(action, &QAction::triggered, this, ids() {
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/network/networkdevicemodel.cpp -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/network/networkdevicemodel.cpp
Changed
@@ -52,7 +52,7 @@ case NETWORK_TREE: return QVariant::fromValue( NetworkTreeItem(MediaTreePtr{ item.mediaSource->tree }, item.inputItem.get()) ); case NETWORK_ARTWORK: - return item.artworkUrl; + return item.artwork; default: return {}; } @@ -458,14 +458,14 @@ item.inputItem = InputItemPtr(inputItem); char * artwork = input_item_GetArtworkURL(inputItem.get()); - if (artwork) { - item.artworkUrl = QUrl::fromEncoded(artwork); + item.artwork = QString::fromUtf8(artwork); free(artwork); } + insertItem(it, std::move(item)); }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/network/networkdevicemodel.hpp -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/network/networkdevicemodel.hpp
Changed
@@ -180,7 +180,7 @@ NetworkDeviceModel::ItemType type; NetworkDeviceModel::MediaSourcePtr mediaSource; NetworkDeviceModel::InputItemPtr inputItem; - QUrl artworkUrl; + QString artwork; }; #endif // MLNETWORKDEVICEMODEL_HPP
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/network/networkmediamodel.cpp -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/network/networkmediamodel.cpp
Changed
@@ -70,7 +70,7 @@ case NETWORK_TREE: return QVariant::fromValue( item.tree ); case NETWORK_ARTWORK: - return item.artworkUrl; + return item.artwork; case NETWORK_FILE_SIZE: return item.fileSize; case NETWORK_FILE_MODIFIED: @@ -579,7 +579,7 @@ if (str) { - item.artworkUrl = QUrl::fromEncoded(str); + item.artwork = QString::fromUtf8(str); free(str); }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/network/networkmediamodel.hpp -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/network/networkmediamodel.hpp
Changed
@@ -211,7 +211,7 @@ ItemType type; bool canBeIndexed; NetworkTreeItem tree; - QUrl artworkUrl; + QString artwork; qint64 fileSize; QDateTime fileModified; };
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/network/qml/BrowseDeviceView.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/network/qml/BrowseDeviceView.qml
Changed
@@ -155,7 +155,7 @@ // Events function onAction(index) { - var indexes = modelSelect.selectedIndexes + const indexes = modelSelect.selectedIndexes if (indexes.length > 1) { model.addAndPlay(modelFilter.mapIndexesToSource(indexes)) @@ -163,9 +163,9 @@ return } - var data = modelFilter.getDataAt(index) + const data = modelFilter.getDataAt(index) - var type = data.type + const type = data.type if (type === NetworkMediaModel.TYPE_DIRECTORY || type === NetworkMediaModel.TYPE_NODE) browse(data.tree, Qt.TabFocusReason) @@ -182,7 +182,7 @@ } function onDoubleClicked(model, index) { - var type = model.type + const type = model.type if (type === NetworkMediaModel.TYPE_NODE || type === NetworkMediaModel.TYPE_DIRECTORY) browse(model.tree, Qt.MouseFocusReason) @@ -391,7 +391,7 @@ if (itemText.rowModel === null) return "" - var text = itemText.rowModelitemText.colModel.criteria + const text = itemText.rowModelitemText.colModel.criteria if (text.toString() === "vlc://nop") return ""
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/network/qml/BrowseHomeDisplay.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/network/qml/BrowseHomeDisplay.qml
Changed
@@ -71,10 +71,10 @@ if (item.activeFocus === false) return - var minY - var maxY + let minY + let maxY - var index = item.currentIndex + const index = item.currentIndex // NOTE: We want to include the header when we're on the first row. if ((MainCtx.gridView && index < item.nbItemPerRow) || index < 1) { @@ -258,15 +258,14 @@ } function resetFocus() { - var widgetlist = foldersSection, deviceSection, lanSection - var i; - for (i in widgetlist) { + const widgetlist = foldersSection, deviceSection, lanSection + for (let i in widgetlist) { if (widgetlisti.activeFocus && widgetlisti.visible) return } - var found = false; - for (i in widgetlist) { + let found = false; + for (let i in widgetlist) { if (widgetlisti.visible && !found) { widgetlisti.focus = true found = true
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/network/qml/BrowseTreeDisplay.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/network/qml/BrowseTreeDisplay.qml
Changed
@@ -91,7 +91,7 @@ if ( selectionModel.selectedIndexes.length > 1 ) { playSelected() } else { - var data = filterModel.getDataAt(index) + const data = filterModel.getDataAt(index) if (data.type === NetworkMediaModel.TYPE_DIRECTORY || data.type === NetworkMediaModel.TYPE_NODE) { browse(data.tree, Qt.TabFocusReason) @@ -111,7 +111,10 @@ defaultText: I18n.qtr("Unknown Share") coverProvider: function(index, data) { - return {artwork: data.artwork, cover: custom_cover, type: data.type} + // this is used to provide context to NetworkCustomCover + // indexData is networkModel (model data) for this index + // cover is our custom cover that will be loaded insted of default DragItem cover + return {"indexData": data, "cover": custom_cover} } onRequestData: { @@ -129,9 +132,18 @@ id: custom_cover NetworkCustomCover { - networkModel: model - width: networkDragItem.coverSize / 2 - height: networkDragItem.coverSize / 2 + networkModel: model.indexData + + width: networkDragItem.coverSize + height: networkDragItem.coverSize + + // we can not change the size of cover and shodows from here, + // so for best visual use scale image to fit + fillMode: Image.PreserveAspectCrop + + bgColor: networkDragItem.colorContext.bg.secondary + color1: networkDragItem.colorContext.fg.primary + accent: networkDragItem.colorContext.accent } } }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/network/qml/NetworkAddressbar.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/network/qml/NetworkAddressbar.qml
Changed
@@ -46,14 +46,14 @@ onActiveFocusChanged: if (activeFocus) contentItem.forceActiveFocus(focusReason) function createContentModel() { - var contentModel = - var menuModel = + const contentModel = + const menuModel = if (path.length < 1) return - var leftWidth = control.availableWidth - var i = path.length + let leftWidth = control.availableWidth + let i = path.length while (--i >= 0) { - var textWidth = fontMetrics.advanceWidth(pathi.display) + const textWidth = fontMetrics.advanceWidth(pathi.display) + (i !== path.length - 1 ? iconMetrics.advanceWidth( VLCIcons.breadcrumb_sep) : 0) + VLCStyle.margin_xsmall * 4 @@ -206,11 +206,11 @@ id: popup function show() { - var model = control._menuModel.map(function (modelData) { + const model = control._menuModel.map(function (modelData) { return modelData.display }) - var point = control.mapToGlobal(0, menuButton.height + VLCStyle.margin_xxsmall) + const point = control.mapToGlobal(0, menuButton.height + VLCStyle.margin_xxsmall) popup.popup(point, model) }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/network/qml/NetworkCustomCover.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/network/qml/NetworkCustomCover.qml
Changed
@@ -24,31 +24,26 @@ import "qrc:///widgets/" as Widgets import "qrc:///style/" -Widgets.ScaledImage { - id: custom_cover +Item { + id: root property var networkModel property color bgColor property color color1 property color accent - sourceSize: Qt.size(width, height) - source: { - if (networkModel === null) - return "" - if (!!networkModel.artwork && networkModel.artwork.length > 0) - return networkModel.artwork + // Image properties + property int fillMode: Image.Stretch + property int horizontalAlignment: Image.AlignHCenter + property int verticalAlignment: Image.AlignVCenter - var img = SVGColorImage.colorize(_baseUri(networkModel.type)) - .color1(custom_cover.color1) - .accent(custom_cover.accent) + readonly property var paintedWidth: _image.paintedWidth + readonly property var paintedHeight: _image.paintedHeight - if (bgColor !== undefined) - img.background(custom_cover.bgColor) + // currently shown image + property var _image: typeImage.visible ? typeImage : artwork - return img.uri() - } function _baseUri(type) { switch (type) { @@ -66,4 +61,56 @@ return "qrc:///sd/directory.svg" } } + + + Widgets.ScaledImage { + // failsafe cover, we show this while loading artwork or if loading fails + + id: typeImage + + anchors.fill: parent + + visible: !artwork.visible + + sourceSize: Qt.size(width, height) + + fillMode: root.fillMode + horizontalAlignment: root.horizontalAlignment + verticalAlignment: root.verticalAlignment + + source: { + if (!networkModel || !visible) + return "" + + const img = SVGColorImage.colorize(_baseUri(networkModel.type)) + .color1(root.color1) + .accent(root.accent) + + if (bgColor !== undefined) + img.background(root.bgColor) + + return img.uri() + } + } + + Widgets.ScaledImage { + id: artwork + + anchors.fill: parent + + visible: status === Image.Ready + + sourceSize: Qt.size(width, height) + + fillMode: root.fillMode + horizontalAlignment: root.horizontalAlignment + verticalAlignment: root.verticalAlignment + + source: { + if (!!networkModel && !!networkModel.artwork && networkModel.artwork.length > 0) + return networkModel.artwork + + return "" + } + } }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/network/qml/NetworkGridItem.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/network/qml/NetworkGridItem.qml
Changed
@@ -46,28 +46,32 @@ image: { if (model.artwork && model.artwork.toString() !== "") { return model.artwork - } else { - var f = function(type) { - switch (type) { - case NetworkMediaModel.TYPE_DISC: - return "qrc://sd/disc.svg" - case NetworkMediaModel.TYPE_CARD: - return "qrc://sd/capture-card.svg" - case NetworkMediaModel.TYPE_STREAM: - return "qrc://sd/stream.svg" - case NetworkMediaModel.TYPE_PLAYLIST: - return "qrc://sd/playlist.svg" - case NetworkMediaModel.TYPE_FILE: - return "qrc://sd/file.svg" - default: - return "qrc://sd/directory.svg" - } + } + return "" + } + + fallbackImage: { + const f = function(type) { + switch (type) { + case NetworkMediaModel.TYPE_DISC: + return "qrc://sd/disc.svg" + case NetworkMediaModel.TYPE_CARD: + return "qrc://sd/capture-card.svg" + case NetworkMediaModel.TYPE_STREAM: + return "qrc://sd/stream.svg" + case NetworkMediaModel.TYPE_PLAYLIST: + return "qrc://sd/playlist.svg" + case NetworkMediaModel.TYPE_FILE: + return "qrc://sd/file.svg" + default: + return "qrc://sd/directory.svg" } - return SVGColorImage.colorize(f(model.type)) - .color1(root.colorContext.fg.primary) - .accent(root.colorContext.accent) - .uri() } + + return SVGColorImage.colorize(f(model.type)) + .color1(root.colorContext.fg.primary) + .accent(root.colorContext.accent) + .uri() } title: model.name || I18n.qtr("Unknown share")
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/network/qml/NetworkThumbnailItem.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/network/qml/NetworkThumbnailItem.qml
Changed
@@ -68,17 +68,17 @@ if (colModel === null || rowModel === null) return "" - var criterias = colModel.subCriterias + const criterias = colModel.subCriterias if (criterias === undefined || criterias.length === 0) return "" - var string = "" + let string = "" - for (var i = 0; i < criterias.length; i++) { - var criteria = criteriasi + for (let i = 0; i < criterias.length; i++) { + const criteria = criteriasi - var value = rowModelcriteria + const value = rowModelcriteria if (value.toString() === "vlc://nop") continue @@ -101,7 +101,14 @@ width: artwork.width height: artwork.height - Widgets.ListCoverShadow { anchors.fill: parent } + Widgets.ListCoverShadow { + // clip shadows to only the painted area of cover + x: (artwork.x + artwork.width - artwork.paintedWidth) / 2 + y: (artwork.y + artwork.height - artwork.paintedHeight) / 2 + width: artwork.paintedWidth + height: artwork.paintedHeight + + } NetworkCustomCover { id: artwork @@ -109,7 +116,11 @@ width: VLCStyle.listAlbumCover_width height: VLCStyle.listAlbumCover_height - //radius: VLCStyle.listAlbumCover_radius + // artworks can have anysize, we try to fit it using PreserveAspectFit + // in the provided size and place it in the center of itemCover + fillMode: Image.PreserveAspectFit + horizontalAlignment: Image.AlignHCenter + verticalAlignment: Image.AlignVCenter networkModel: rowModel
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/network/qml/ServicesHomeDisplay.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/network/qml/ServicesHomeDisplay.qml
Changed
@@ -117,7 +117,7 @@ property Component addressBar: NetworkAddressbar { path: { - var _path = providerModel.path + const _path = providerModel.path _path.unshift({display: root_name, tree: {"source_name": source_name, "isRoot": true}}) return _path }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/network/qml/ServicesSources.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/network/qml/ServicesSources.qml
Changed
@@ -91,7 +91,7 @@ } onActionAtIndex: { - var itemData = sourcesFilterModel.getDataAt(index); + const itemData = sourcesFilterModel.getDataAt(index); if (itemData.type === NetworkSourcesModel.TYPE_DUMMY) History.push("mc", "discover", "services", "services_manage");
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/player/qml/ControlLayout.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/player/qml/ControlLayout.qml
Changed
@@ -59,9 +59,9 @@ if (count === 0) return 0 - var size = 0 + let size = 0 - for (var i = 0; i < count; ++i) { + for (let i = 0; i < count; ++i) { size += repeater.itemAt(i).preferredWidth } @@ -75,8 +75,8 @@ implicitHeight: rowLayout.implicitHeight Navigation.navigable: { - for (var i = 0; i < repeater.count; ++i) { - var item = repeater.itemAt(i).item + for (let i = 0; i < repeater.count; ++i) { + const item = repeater.itemAt(i).item if (item && item.focus) { return true @@ -103,16 +103,16 @@ } function _updateContentWidth() { - var size = 0 + let size = 0 - for (var i = 0; i < count; i++) { + for (let i = 0; i < count; i++) { - var item = repeater.itemAt(i) + const item = repeater.itemAt(i) if (item === null || item.isActive === false) continue - var width = item.width + const width = item.width if (width) size += width + spacing @@ -267,11 +267,11 @@ function applyNavigation() { if (item == null) return - var itemLeft = repeater.itemAt(index - 1) - var itemRight = repeater.itemAt(index + 1) + const itemLeft = repeater.itemAt(index - 1) + const itemRight = repeater.itemAt(index + 1) if (itemLeft) { - var componentLeft = itemLeft.item + const componentLeft = itemLeft.item if (componentLeft) { @@ -282,7 +282,7 @@ } if (itemRight) { - var componentRight = itemRight.item + const componentRight = itemRight.item if (componentRight) { @@ -296,11 +296,11 @@ function removeNavigation() { if (item == null) return - var itemLeft = repeater.itemAt(index - 1) + const itemLeft = repeater.itemAt(index - 1) // NOTE: The current item was removed from the repeater so we test against the // same index. - var itemRight = repeater.itemAt(index) + const itemRight = repeater.itemAt(index) if (itemLeft) { if (itemRight) { @@ -324,16 +324,16 @@ if (_index === undefined) _index = index - for (var i = 1; i <= Math.max(_index, repeater.count - (_index + 1)); ++i) { + for (let i = 1; i <= Math.max(_index, repeater.count - (_index + 1)); ++i) { if (i <= _index) { - var leftItem = repeater.itemAt(_index - i) + const leftItem = repeater.itemAt(_index - i) if (_focusIfFocusable(leftItem)) return } if (_index + i <= repeater.count - 1) { - var rightItem = repeater.itemAt(_index + i) + const rightItem = repeater.itemAt(_index + i) if (_focusIfFocusable(rightItem)) return
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/player/qml/ControlbarControls.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/player/qml/ControlbarControls.qml
Changed
@@ -71,15 +71,15 @@ function control(id) { - var control = controlList.find( function(control) { return ( control.id === id ) } ) + const entry = controlList.find( function(e) { return ( e.id === id ) } ) - if (control === undefined) { + if (entry === undefined) { console.log("control delegate id " + id + " doesn't exist") return { source: controlPath + "Fallback.qml" } } - control.source = controlPath + control.file + entry.source = controlPath + entry.file - return control + return entry } }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/player/qml/PlaybackSpeed.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/player/qml/PlaybackSpeed.qml
Changed
@@ -74,7 +74,7 @@ // NOTE: We want a rounded 1.xx value. value = Math.round(value * 100) / 100 - for (var i = 0; i < _model.length; i++) { + for (let i = 0; i < _model.length; i++) { if (Helpers.compareFloat(_modeli.value, value) === false) continue @@ -120,8 +120,8 @@ value = sliderToSpeed(value) if (_shiftPressed === false) { - for (var i = 0; i < _values.length; i++) { - var clamp = _valuesi + for (let i = 0; i < _values.length; i++) { + const clamp = _valuesi if (_testClamp(value, clamp)) { value = clamp @@ -246,7 +246,7 @@ wheelEnabled: true - valueText: function (value) { + toolTipTextProvider: function (value) { return sliderToSpeed(value).toFixed(2) } @@ -305,10 +305,10 @@ Navigation.leftItem: slider Component.onCompleted: { - for (var i = 0; i < _model.length; i++) { - var item = _modeli + for (let i = 0; i < _model.length; i++) { + const item = _modeli - var title = item.title + const title = item.title if (title) model.append({ "title": title })
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/player/qml/PlayerControlLayout.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/player/qml/PlayerControlLayout.qml
Changed
@@ -76,7 +76,7 @@ // Functions function _updateLayout() { - var item = loaderCenter.item + let item = loaderCenter.item // NOTE: Sometimes this gets called before the item is loaded. if (item === null) @@ -92,12 +92,12 @@ } else if (loaderRight.item.count) { - var implicitLeft = loaderLeft.implicitWidth - var implicitRight = loaderRight.implicitWidth + const implicitLeft = loaderLeft.implicitWidth + const implicitRight = loaderRight.implicitWidth - var total = implicitLeft + implicitRight + const total = implicitLeft + implicitRight - var size = total + _minimumSpacing + let size = total + _minimumSpacing if (size > width) { size = width - _minimumSpacing @@ -112,7 +112,7 @@ if (item === null) return - var contentWidth = item.contentWidth + const contentWidth = item.contentWidth // NOTE: We assign the remaining width based on the contentWidth. if (contentWidth) @@ -127,7 +127,7 @@ if (item === null) return - var contentWidth = item.contentWidth + const contentWidth = item.contentWidth // NOTE: We assign the remaining width based on the contentWidth. if (contentWidth)
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/player/qml/SliderBar.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/player/qml/SliderBar.qml
Changed
@@ -106,7 +106,7 @@ position = Helpers.clamp(position, 0., 1.) control.value = position if (!forcePrecise) { - var chapter = Player.chapters.getClosestChapterFromPos(position, threshold) + const chapter = Player.chapters.getClosestChapterFromPos(position, threshold) if (chapter !== -1) { Player.chapters.selectChapter(chapter) return
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/player/qml/TopBar.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/player/qml/TopBar.qml
Changed
@@ -72,8 +72,8 @@ function _layoutLine(c1, c2, offset) { - var c1Height = c1 !== undefined ? c1.implicitHeight : 0 - var c2Height = c2 !== undefined ? c2.implicitHeight : 0 + let c1Height = c1 !== undefined ? c1.implicitHeight : 0 + let c2Height = c2 !== undefined ? c2.implicitHeight : 0 if (c2 === csdDecorations) { //csdDecorations.implicitHeight gets overwritten when the height is set, @@ -81,7 +81,7 @@ c2Height = VLCStyle.icon_normal } - var lineHeight = Math.max(c1Height, c2Height) + const lineHeight = Math.max(c1Height, c2Height) if (c1) { c1.height = lineHeight @@ -98,13 +98,13 @@ //FIXME: if CSD will be weirdly placed if application safe-area are used, //nota that if you need a safe area (kiosk mode), you probably don't need CSD function _layout() { - var offset = root.topMargin + let offset = root.topMargin if (root.pinControls && !root.showToolbar && root.showCSD) { //place everything on one line //csdDecorations.implicitHeight gets overwritten when the height is set, //VLCStyle.icon_normal is its initial value - var lineHeight = Math.max(logoOrResume.implicitHeight, playlistGroup.implicitHeight, VLCStyle.icon_normal) + const lineHeight = Math.max(logoOrResume.implicitHeight, playlistGroup.implicitHeight, VLCStyle.icon_normal) centerTitleText.y = 0 centerTitleText.height = lineHeight @@ -124,9 +124,9 @@ } else { playlistGroup.extraRightMargin = 0 - var left = undefined - var right = undefined - var logoPlaced = false + let left = undefined + let right = undefined + let logoPlaced = false if (root.showToolbar) { left = menubar @@ -156,8 +156,8 @@ right = playlistGroup - var secondLineOffset = offset - var secondLineHeight = root._layoutLine(left, right, offset) + const secondLineOffset = offset + const secondLineHeight = root._layoutLine(left, right, offset) offset += secondLineHeight
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/player/qml/TracksPageAudio.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/player/qml/TracksPageAudio.qml
Changed
@@ -61,8 +61,8 @@ spacing: VLCStyle.margin_xsmall - Acessible.role: Acessible.Grouping - Acessible.name: I18n.qtr("Audio track delay") + Accessible.role: Accessible.Grouping + Accessible.name: I18n.qtr("Audio track delay") Widgets.MenuCaption { Layout.fillWidth: true
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/player/qml/TracksPageSubtitle.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/player/qml/TracksPageSubtitle.qml
Changed
@@ -69,8 +69,8 @@ spacing: VLCStyle.margin_xsmall - Acessible.role: Acessible.Grouping - Acessible.name: I18n.qtr("Primary subtitle delay") + Accessible.role: Accessible.Grouping + Accessible.name: I18n.qtr("Primary subtitle delay") Widgets.MenuCaption { Layout.fillWidth: true @@ -144,8 +144,8 @@ spacing: VLCStyle.margin_xsmall - Acessible.role: Acessible.Grouping - Acessible.name: I18n.qtr("Secondary subtitle delay") + Accessible.role: Accessible.Grouping + Accessible.name: I18n.qtr("Secondary subtitle delay") Widgets.MenuCaption { Layout.fillWidth: true @@ -218,8 +218,8 @@ spacing: VLCStyle.margin_xsmall - Acessible.role: Acessible.Grouping - Acessible.name: I18n.qtr("Subtitle Speed") + Accessible.role: Accessible.Grouping + Accessible.name: I18n.qtr("Subtitle Speed") Widgets.MenuCaption { Layout.fillWidth: true
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/player/qml/controlbarcontrols/ArtworkInfoWidget.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/player/qml/controlbarcontrols/ArtworkInfoWidget.qml
Changed
@@ -15,6 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ + import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Layouts 1.12 @@ -25,7 +26,9 @@ import "qrc:///style/" AbstractButton { - id: artworkInfoItem + id: root + + // Properties property bool paintOnly: false @@ -40,14 +43,29 @@ artistLabel.implicitWidth, progressIndicator.implicitWidth) + readonly property ColorContext colorContext: ColorContext { + id: theme + + colorSet: ColorContext.ToolButton + + focused: root.visualFocus + hovered: root.hovered + } + property int _preferredHeight: VLCStyle.dp(60, VLCStyle.scale) property bool _keyPressed: false + // Settings + text: I18n.qtr("Open player") padding: VLCStyle.focus_border + Accessible.onPressAction: root.clicked() + + // Keys + Keys.onPressed: { if (KeyHelper.matchOk(event)) { event.accepted = true @@ -71,16 +89,9 @@ } } - onClicked: g_mainDisplay.showPlayer() + // Events - Accessible.onPressAction: artworkInfoItem.clicked() - - readonly property ColorContext colorContext: ColorContext { - id: theme - colorSet: ColorContext.ToolButton - focused: artworkInfoItem.visualFocus - hovered: artworkInfoItem.hovered - } + onClicked: g_mainDisplay.showPlayer() background: Widgets.AnimatedBackground { active: visualFocus @@ -88,6 +99,8 @@ activeBorderColor: theme.visualFocus } + // Children + contentItem: RowLayout { spacing: infoColumn.visible ? VLCStyle.margin_xsmall : 0 @@ -96,8 +109,7 @@ implicitWidth: implicitHeight - implicitHeight: Math.min(artworkInfoItem._preferredHeight, - artworkInfoItem.maximumHeight) + implicitHeight: Math.min(root._preferredHeight, root.maximumHeight) color: theme.bg.primary @@ -133,7 +145,7 @@ Accessible.name: I18n.qtr("Cover") ToolTip.visible: infoColumn.width < infoColumn.implicitWidth - && (artworkInfoItem.hovered || artworkInfoItem.visualFocus) + && (root.hovered || root.visualFocus) ToolTip.delay: VLCStyle.delayToolTipAppear ToolTip.text: I18n.qtr("%1\n%2\n%3").arg(titleLabel.text) .arg(artistLabel.text) @@ -184,7 +196,7 @@ Layout.fillWidth: true Layout.fillHeight: true - visible: (infoColumn.height >= artworkInfoItem._preferredHeight) + visible: (infoColumn.height >= root._preferredHeight) text: { if (paintOnly)
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/player/qml/controlbarcontrols/ControlButtonPopup.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/player/qml/controlbarcontrols/ControlButtonPopup.qml
Changed
@@ -57,7 +57,7 @@ return } - var parent = Navigation.parentItem; + const parent = Navigation.parentItem; if (parent) parent.Navigation.defaultNavigationUp() @@ -82,15 +82,15 @@ // NOTE: coordinates are based on the popup parent view. function _updatePosition() { - var parent = popup.parent + const parent = popup.parent - var position = parent.mapFromItem(root, x, y) + const position = parent.mapFromItem(root, x, y) - var popupX = Math.round(position.x - ((popup.width - width) / 2)) + const popupX = Math.round(position.x - ((popup.width - width) / 2)) - var minimum = VLCStyle.applicationHorizontalMargin + VLCStyle.margin_xxsmall + const minimum = VLCStyle.applicationHorizontalMargin + VLCStyle.margin_xxsmall - var maximum = parent.width - popup.width - minimum + const maximum = parent.width - popup.width - minimum popup.x = Helpers.clamp(popupX, minimum, maximum) @@ -102,7 +102,7 @@ Popup { id: popup - parent: (root._isCurrentViewPlayer) ? rootPlayer : g_root + parent: (root._isCurrentViewPlayer) ? rootPlayer : g_mainInterface padding: VLCStyle.margin_small
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/player/qml/controlbarcontrols/PlayButton.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/player/qml/controlbarcontrols/PlayButton.qml
Changed
@@ -15,6 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ + import QtQuick 2.12 import QtQuick.Templates 2.12 as T @@ -24,25 +25,41 @@ import "qrc:///style/" import "qrc:///util/Helpers.js" as Helpers - T.Control { - id: playBtn - - implicitWidth: implicitHeight + id: root - implicitHeight: Math.min(VLCStyle.icon_medium, maximumHeight) - - scale: (_keyOkPressed || (mouseArea.pressed && cursorInside)) ? 0.95 - : 1.00 + // Properties property int maximumHeight: VLCStyle.icon_medium property bool paintOnly: false + readonly property ColorContext colorContext: ColorContext { + id: theme + + colorSet: ColorContext.ToolButton + + enabled: root.enabled || root.paintOnly + focused: root.activeFocus + hovered: root.cursorInside + pressed: mouseArea.containsPress + } + property bool _keyOkPressed: false + // Aliases + property alias cursorInside: mouseArea.cursorInside + // Settings + + implicitWidth: implicitHeight + + implicitHeight: Math.min(VLCStyle.icon_medium, maximumHeight) + + scale: (_keyOkPressed || (mouseArea.pressed && cursorInside)) ? 0.95 + : 1.00 + Accessible.role: Accessible.Button Accessible.name: I18n.qtr("Play/Pause") Accessible.checkable: true @@ -51,6 +68,51 @@ Accessible.onPressAction: mainPlaylistController.togglePlayPause() Accessible.onToggleAction: mainPlaylistController.togglePlayPause() + // States + + states: + State { + name: "focused" + when: visualFocus + + PropertyChanges { + target: hoverShadow + opacity: 0.0 + } + + PropertyChanges { + target: focusShadow + opacity: 1.0 + } + }, + State { + name: "hover" + when: cursorInside + + PropertyChanges { + target: hoverShadow + opacity: 1.0 + } + + PropertyChanges { + target: focusShadow + opacity: 0.0 + } + } + + + transitions: Transition { + from: ""; to: "*" + reversible: true + NumberAnimation { + properties: "opacity" + easing.type: Easing.InOutSine + duration: VLCStyle.duration_veryShort + } + } + + // Keys + Keys.onPressed: { if (KeyHelper.matchOk(event) ) { if (!event.isAutoRepeat) { @@ -74,20 +136,14 @@ } } + // Functions + function _pressAndHoldAction() { _keyOkPressed = false mainPlaylistController.stop() } - readonly property ColorContext colorContext: ColorContext { - id: theme - colorSet: ColorContext.ToolButton - - enabled: playBtn.enabled || playBtn.paintOnly - focused: playBtn.activeFocus - hovered: playBtn.cursorInside - pressed: mouseArea.containsPress - } + // Children Timer { id: keyHoldTimer @@ -110,7 +166,7 @@ if (!containsMouse) return false - var center = (width / 2) + const center = (width / 2) if (Helpers.pointInRadius( center - mouseX, center - mouseY, center )) { @@ -126,7 +182,7 @@ return } - playBtn.forceActiveFocus(Qt.MouseFocusReason) + root.forceActiveFocus(Qt.MouseFocusReason) } onClicked: { @@ -140,50 +196,9 @@ } } - states: - State { - name: "focused" - when: visualFocus - - PropertyChanges { - target: hoverShadow - opacity: 0.0 - } - - PropertyChanges { - target: focusShadow - opacity: 1.0 - } - }, - State { - name: "hover" - when: cursorInside - - PropertyChanges { - target: hoverShadow - opacity: 1.0 - } - - PropertyChanges { - target: focusShadow - opacity: 0.0 - } - } - - - transitions: Transition { - from: ""; to: "*" - reversible: true - NumberAnimation { - properties: "opacity" - easing.type: Easing.InOutSine - duration: VLCStyle.duration_veryShort - } - } - contentItem: T.Label { text: { - var state = Player.playingState
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/player/qml/controlbarcontrols/SpacerWidget.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/player/qml/controlbarcontrols/SpacerWidget.qml
Changed
@@ -27,8 +27,13 @@ Item { id: spacer enabled: false - implicitWidth: VLCStyle.icon_toolbar + + // NOTE: We already have spacing between components in the ControlLayout so this should be set + // to zero, except in the customize panel. + implicitWidth: (paintOnly) ? VLCStyle.icon_toolbar : 0 + implicitHeight: VLCStyle.icon_toolbar + property alias spacetextExt: spacetext property bool paintOnly: false
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/player/qml/controlbarcontrols/VolumeWidget.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/player/qml/controlbarcontrols/VolumeWidget.qml
Changed
@@ -31,7 +31,7 @@ property bool paintOnly: false readonly property color sliderColor: { - var theme = volControl.colorContext + const theme = volControl.colorContext return (volControl.position > _fullvolpos) ? theme.fg.negative : theme.fg.primary } @@ -115,8 +115,12 @@ enabled: !root.paintOnly // disables event handling depending on this - valueText: function (value) { - return Math.round(value * 100) + "%" + toolTipTextProvider: function (value) { + // the real value i.e 'Player.volume' bounds can be different + // from bounds of this widget and we want to show the current + // volume here, so directly use Player.volume instead of "value" + + return Math.round(Player.volume * 100) + "%" } Accessible.name: I18n.qtr("Volume") @@ -151,7 +155,7 @@ function _adjustPlayerVolume() { Player.muted = false - var value = volControl.value + let value = volControl.value // NOTE: We are clamping the value to make it easier to restore the default volume. if (_shiftPressed === false) { @@ -264,7 +268,7 @@ onPositionChanged: if (mouse.buttons & Qt.RightButton) adjustVolume(mouse) onWheel: { - var delta = 0, fineControl = false + let delta = 0, fineControl = false if ((Math.abs(wheel.pixelDelta.x) % 120 > 0) || (Math.abs(wheel.pixelDelta.y) % 120 > 0)) { if (Math.abs(wheel.pixelDelta.x) > Math.abs(wheel.pixelDelta.y)) @@ -290,7 +294,7 @@ // Degrees to steps for standard mouse delta = delta / 8 / 15 - var steps = Math.ceil(Math.abs(delta)) + const steps = Math.ceil(Math.abs(delta)) Player.muted = false @@ -306,7 +310,7 @@ function adjustVolume(mouse) { mouse.accepted = true - var pos = mouse.x * root._maxvolpos / width + const pos = mouse.x * root._maxvolpos / width if (pos < 0.25) volControl.value = 0
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/playlist/qml/PlaylistDelegate.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/playlist/qml/PlaylistDelegate.qml
Changed
@@ -75,10 +75,10 @@ // Functions function moveSelected() { - var selectedIndexes = root.model.getSelection() + const selectedIndexes = root.model.getSelection() if (selectedIndexes.length === 0) return - var preTarget = index + let preTarget = index /* move to _above_ the clicked item if move up, but * _below_ the clicked item if move down */ if (preTarget > selectedIndexes0) @@ -293,7 +293,7 @@ onPositionChanged: { if (drag.active) { // FIXME: Override dragItem's position - var pos = mapToItem(dragItem.parent, mouseX, mouseY) + const pos = mapToItem(dragItem.parent, mouseX, mouseY) dragItem.x = pos.x + VLCStyle.dp(15) dragItem.y = pos.y }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/playlist/qml/PlaylistDetachedWindow.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/playlist/qml/PlaylistDetachedWindow.qml
Changed
@@ -62,7 +62,5 @@ anchors.fill: parent colorContext.palette: VLCStyle.palette - - readonly property PlaylistListView g_root: playlistView } }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/playlist/qml/PlaylistListView.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/playlist/qml/PlaylistListView.qml
Changed
@@ -70,14 +70,14 @@ if (Helpers.isValidInstanceOf(drop.source, Widgets.DragItem)) { // internal drop (inter-view or intra-playlist) - var selection = drop.source.selection + const selection = drop.source.selection if (!!selection) { - var length = selection.length - var firstIndex = selection0 - var lastIndex = selectionlength - 1 - var consecutive = true + const length = selection.length + const firstIndex = selection0 + const lastIndex = selectionlength - 1 + let consecutive = true if (length > 1) { - for (var i = 0; i < length - 1; ++i) { + for (let i = 0; i < length - 1; ++i) { if (selectioni + 1 - selectioni !== 1) { consecutive = false break @@ -94,7 +94,7 @@ } function acceptDrop(index, drop) { - var item = drop.source; + const item = drop.source; // NOTE: Move implementation. if (dragItem == item) { @@ -116,9 +116,9 @@ // NOTE: Dropping an external item (i.e. filesystem) into the queue. } else if (drop.hasUrls) { - var urlList = ; + const urlList = ; - for (var url in drop.urls) + for (let url in drop.urls) urlList.push(drop.urlsurl); mainPlaylistController.insert(index, urlList, false); @@ -171,7 +171,7 @@ selection = root.model.getSelection() indexes = selection setData(identifier, indexes.map(function (index) { - var item = root.model.itemAt(index) + const item = root.model.itemAt(index) return { "title": item.title, "cover": (!!item.artwork && item.artwork.toString() !== "") ? item.artwork : VLCStyle.noArtAlbumCover @@ -485,11 +485,11 @@ if (root.mode === PlaylistListView.Mode.Select) { console.log("update selection select") } else if (root.mode === PlaylistListView.Mode.Move) { - var selectedIndexes = root.model.getSelection() + const selectedIndexes = root.model.getSelection() if (selectedIndexes.length === 0) return /* always move relative to the first item of the selection */ - var target = selectedIndexes0; + let target = selectedIndexes0; if (newIndex > oldIndex) { /* move down */ target++ @@ -549,7 +549,7 @@ } function onDelete() { - var selection = root.model.getSelection() + const selection = root.model.getSelection() if (selection.length === 0) return root.model.removeItems(selection)
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/style/VLCStyle.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/style/VLCStyle.qml
Changed
@@ -33,8 +33,6 @@ readonly property FontMetrics fontMetrics_xxlarge : FontMetrics { font.pixelSize: dp(20, scale); } readonly property FontMetrics fontMetrics_xxxlarge : FontMetrics { font.pixelSize: dp(24, scale); } - property alias self: vlc_style - readonly property SystemPalette palette: SystemPalette { objectName: "themePalette" source: MainCtx.colorScheme.scheme
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/util/qml/FlickableScrollHandler.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/util/qml/FlickableScrollHandler.qml
Changed
@@ -32,11 +32,11 @@ if (!enabled) { // QTBUG-56075 // Note that this workaround is not effective when enabled dynamically changes - var qtVersion = VLC.MainCtx.qtVersion() + const qtVersion = VLC.MainCtx.qtVersion() if ((qtVersion >= VLC.MainCtx.qtVersionCheck(6, 0, 0) && qtVersion < VLC.MainCtx.qtVersionCheck(6, 2, 0)) || (qtVersion < VLC.MainCtx.qtVersionCheck(5, 15, 8))) { handler.enabled = true - var smoothScroll = Qt.binding(function() { return VLC.MainCtx.smoothScroll }) + const smoothScroll = Qt.binding(function() { return VLC.MainCtx.smoothScroll }) handler.handleOnlyPixelDelta = smoothScroll _behaviorAdjuster.when = smoothScroll _behaviorAdjuster.model.append( {property: "flickDeceleration", value: 3500} )
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/util/qml/MLContextMenu.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/util/qml/MLContextMenu.qml
Changed
@@ -128,7 +128,7 @@ if (indexes.length !== 1) return false - var isFavorite = model.getDataAt(indexes0).isFavorite + const isFavorite = model.getDataAt(indexes0).isFavorite // NOTE: Strictly comparing 'isFavorite' given it might be undefined. return (isFavorite === false) @@ -138,7 +138,7 @@ if (indexes.length !== 1) return false - var isFavorite = model.getDataAt(indexes0).isFavorite + const isFavorite = model.getDataAt(indexes0).isFavorite // NOTE: Strictly comparing 'isFavorite' given it might be undefined. return (isFavorite === true) @@ -148,7 +148,7 @@ if (indexes.length !== 1) return false - var isNew = model.getDataAt(indexes0).isNew + const isNew = model.getDataAt(indexes0).isNew // NOTE: Strictly comparing 'isNew' given it might be undefined. return (isNew === true) @@ -158,26 +158,26 @@ if (indexes.length !== 1) return false - var isNew = model.getDataAt(indexes0).isNew + const isNew = model.getDataAt(indexes0).isNew // NOTE: Strictly comparing 'isNew' given it might be undefined. return (isNew === false) } function _signalShowInformation(dataList, options) { - var index = Helpers.get(options, "information", null) + const index = Helpers.get(options, "information", null) console.assert(Helpers.isInteger(index)) showMediaInformation(index) } function _playerOptions(options, extraOptions) { - var playerOpts = Helpers.get(options, "player-options", ) + const playerOpts = Helpers.get(options, "player-options", ) return playerOpts.concat(extraOptions) } function _mlIDList(dataList) { - var idList = - for (var i in dataList) { + const idList = + for (let i in dataList) { idList.push(dataListiidDataRole) }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/util/qml/NativeMenu.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/util/qml/NativeMenu.qml
Changed
@@ -68,12 +68,12 @@ _pendingData = true _dataList = null - var requestID = ++_currentRequest + const requestID = ++_currentRequest requestData(requestID, _indexes) - var textStrings = + const textStrings = _effectiveActions = - for (var i in actions) { + for (let i in actions) { if (!actionsi.hasOwnProperty("visible") || (typeof actionsi.visible === "boolean" && actionsi.visible) || (typeof actionsi.visible === "function" && actionsi.visible(_options, _indexes))) { @@ -97,7 +97,7 @@ } function _executeAction(index) { - var action = root._effectiveActionsindex + const action = root._effectiveActionsindex action.action(_dataList, _options, _indexes) }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/util/qml/SelectableDelegateModel.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/util/qml/SelectableDelegateModel.qml
Changed
@@ -24,12 +24,12 @@ property int shiftIndex: -1 function _addRange(from, to) { - for (var i = from; i <= to; i++) { + for (let i = from; i <= to; i++) { select(model.index(i, 0), ItemSelectionModel.Select) } } function _delRange(from, to) { - for (var i = from; i <= to; i++) { + for (let i = from; i <= to; i++) { select(model.index(i, 0), ItemSelectionModel.Deselect) } }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/util/qml/ViewDragAutoScrollHandler.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/util/qml/ViewDragAutoScrollHandler.qml
Changed
@@ -67,11 +67,11 @@ if (!root.dragItem.visible || !root.view.visible) return ViewDragAutoScrollHandler.Direction.None - var pos = root.view.mapFromItem(root.dragItem.parent, + const pos = root.view.mapFromItem(root.dragItem.parent, root.dragItem.x, root.dragItem.y) - var size, mark, atBeginning, atEnd + let size, mark, atBeginning, atEnd if (root.orientation === Qt.Vertical) { size = root.view.height mark = pos.y @@ -115,7 +115,7 @@ if (_scrollBar) _scrollBar.active = false // TODO: Use Binding Qt >=5.14 } else if (!running) { - var _to + let _to if (direction === ViewDragAutoScrollHandler.Direction.Backward) { _to = 0
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/widgets/qml/BannerCone.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/widgets/qml/BannerCone.qml
Changed
@@ -69,7 +69,7 @@ } function updateRect() { - var rect = root.mapToItem(null, 0, 0, width, height) + const rect = root.mapToItem(null, 0, 0, width, height) if (button) button.rect = rect
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/widgets/qml/CSDMouseStealer.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/widgets/qml/CSDMouseStealer.qml
Changed
@@ -27,8 +27,8 @@ property int csdSize: MainCtx.csdBorderSize //private - readonly property int _edgeVtHeight: g_root.height - root.csdSize * 2 - readonly property int _edgeHzWidth: g_root.width - root.csdSize * 2 + readonly property int _edgeVtHeight: g_mainInterface.height - root.csdSize * 2 + readonly property int _edgeHzWidth: g_mainInterface.width - root.csdSize * 2 Repeater { model: @@ -51,7 +51,7 @@ }, { edge: Qt.RightEdge, - x: g_root.width - root.csdSize, + x: g_mainInterface.width - root.csdSize, y: root.csdSize, width: root.csdSize, height: root._edgeVtHeight, @@ -60,7 +60,7 @@ { edge: Qt.BottomEdge, x: root.csdSize, - y: g_root.height - root.csdSize, + y: g_mainInterface.height - root.csdSize, width: root._edgeHzWidth, height: root.csdSize, cursor: Qt.SizeVerCursor, @@ -77,14 +77,14 @@ { edge: Qt.BottomEdge | Qt.LeftEdge, x: 0, - y: g_root.height - root.csdSize, + y: g_mainInterface.height - root.csdSize, width: root.csdSize, height: root.csdSize, cursor: Qt.SizeBDiagCursor, }, { edge: Qt.TopEdge | Qt.RightEdge, - x: g_root.width - root.csdSize, + x: g_mainInterface.width - root.csdSize, y: 0, width: root.csdSize, height: root.csdSize, @@ -92,8 +92,8 @@ }, { edge: Qt.BottomEdge | Qt.RightEdge, - x: g_root.width - root.csdSize, - y: g_root.height - root.csdSize, + x: g_mainInterface.width - root.csdSize, + y: g_mainInterface.height - root.csdSize, width: root.csdSize, height: root.csdSize, cursor: Qt.SizeFDiagCursor,
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/widgets/qml/CSDTitlebarTapNDrapHandler.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/widgets/qml/CSDTitlebarTapNDrapHandler.qml
Changed
@@ -28,7 +28,7 @@ onSingleTapped: { if (eventPoint.event.button & Qt.RightButton) { - var systemButton = MainCtx.csdButtonModel.systemMenuButton + const systemButton = MainCtx.csdButtonModel.systemMenuButton if (systemButton) { systemButton.showSystemMenu(eventPoint.position) }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/widgets/qml/CSDWindowButtonSet.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/widgets/qml/CSDWindowButtonSet.qml
Changed
@@ -34,9 +34,9 @@ property color hoverColor: VLCStyle.setColorAlpha(theme.bg.primary, 0.5) readonly property bool hovered: { - var h = false - for (var i = 0; i < repeater.count; ++i) { - var button = repeater.itemAt(i) + let h = false + for (let i = 0; i < repeater.count; ++i) { + const button = repeater.itemAt(i) h = h || button.hovered || button.showHovered } @@ -90,7 +90,7 @@ onHeightChanged: Qt.callLater(updateRect) Connections { - target: VLCStyle.self + target: VLCStyle // handle window resize onAppWidthChanged: Qt.callLater(updateRect) @@ -98,8 +98,8 @@ } function updateRect() { - var point = mapToItem(null, 0, 0) - var rect = Qt.rect(point.x, point.y, width, height) + const point = mapToItem(null, 0, 0) + const rect = Qt.rect(point.x, point.y, width, height) modelData.rect = rect }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/widgets/qml/CheckButton.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/widgets/qml/CheckButton.qml
Changed
@@ -83,8 +83,8 @@ if (_update === false) return - var from = handle.x - var to + const from = handle.x + let to if (checked) to = handle.drag.maximumX @@ -99,8 +99,8 @@ // Private function _applyX(x) { - var from = handle.x - var to + const from = handle.x + let to _update = false
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/widgets/qml/DragItem.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/widgets/qml/DragItem.qml
Changed
@@ -86,15 +86,15 @@ Qt.callLater(dragItem.getSelectedInputItem, dragItem.setInputItems) - var covers = - var titleList = + const covers = + const titleList = - for (var i in indexes) { + for (let i in indexes) { if (covers.length === _maxCovers) break - var cover = _getCover(indexesi, datai) - var itemTitle = _getTitle(indexesi, datai) + const cover = _getCover(indexesi, datai) + const itemTitle = _getTitle(indexesi, datai) if (!cover || !itemTitle) continue covers.push(cover) @@ -190,6 +190,13 @@ on_ActiveChanged: { if (_active) { + + // reset any data from previous drags before requesting new data, + // so that we don't show invalid data while data is being requested + _title = "" + _covers = + _data = + dragItem._currentRequest += 1 dragItem.requestData(dragItem._currentRequest) @@ -344,18 +351,18 @@ ScrollingText { label: titleLabel - forceScroll: true - height: titleLabel.height + height: VLCStyle.fontHeight_large width: parent.width + clip: scrolling + forceScroll: dragItem.visible + hoverScroll: false T.Label { id: titleLabel text: dragItem._title visible: text && text !== "" - width: parent.width - elide: Text.ElideNone font.pixelSize: VLCStyle.fontSize_large color: theme.fg.primary }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/widgets/qml/ExpandGridView.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/widgets/qml/ExpandGridView.qml
Changed
@@ -123,13 +123,13 @@ // Settings contentWidth: { - var size = _effectiveCellWidth * nbItemPerRow - horizontalSpacing + const size = _effectiveCellWidth * nbItemPerRow - horizontalSpacing return leftMargin + size + rightMargin } contentHeight: { - var size = getItemPos(_count - 1)1 + rowHeight + _expandItemVerticalSpace + const size = getItemPos(_count - 1)1 + rowHeight + _expandItemVerticalSpace // NOTE: topMargin and headerHeight are included in root.getItemPos. if (footerItem) @@ -172,7 +172,7 @@ // Keys Keys.onPressed: { - var newIndex = -1 + let newIndex = -1 if (KeyHelper.matchRight(event)) { if ((currentIndex + 1) % nbItemPerRow !== 0) {//are we not at the end of line newIndex = Math.min(_count - 1, currentIndex + 1) @@ -182,7 +182,7 @@ newIndex = Math.max(0, currentIndex - 1) } } else if (KeyHelper.matchDown(event)) { - var lastIndex = _count - 1 + const lastIndex = _count - 1 // we are not on the last line if (Math.floor(currentIndex / nbItemPerRow) !== @@ -211,7 +211,7 @@ if (newIndex !== -1 && newIndex !== currentIndex) { event.accepted = true; - var oldIndex = currentIndex; + const oldIndex = currentIndex; currentIndex = newIndex; selectionDelegateModel.updateSelection(event.modifiers, oldIndex, newIndex) @@ -246,9 +246,9 @@ Connections { target: model onDataChanged: { - var iMin = topLeft.row - var iMax = bottomRight.row + 1 // => ) - var f_l = _currentRange + const iMin = topLeft.row + const iMax = bottomRight.row + 1 // => ) + const f_l = _currentRange if (iMin < f_l1 && f_l0 < iMax) { _refreshData(iMin, iMax) } @@ -265,24 +265,23 @@ target: selectionDelegateModel onSelectionChanged: { - var i - for (i = 0; i < selected.length; ++i) { + for (let i = 0; i < selected.length; ++i) { _updateSelectedRange(selectedi.topLeft, selectedi.bottomRight, true) } - for (i = 0; i < deselected.length; ++i) { + for (let i = 0; i < deselected.length; ++i) { _updateSelectedRange(deselectedi.topLeft, deselectedi.bottomRight, false) } } function _updateSelectedRange(topLeft, bottomRight, select) { - var iMin = topLeft.row - var iMax = bottomRight.row + 1 // => ) + let iMin = topLeft.row + let iMax = bottomRight.row + 1 // => ) if (iMin < root._currentRange1 && root._currentRange0 < iMax) { iMin = Math.max(iMin, root._currentRange0) iMax = Math.min(iMax, root._currentRange1) - for (var j = iMin; j < iMax; j++) { - var item = root._getItem(j) + for (let j = iMin; j < iMax; j++) { + const item = root._getItem(j) console.assert(item) item.selected = select } @@ -356,17 +355,17 @@ } function getItemRowCol(id) { - var rowId = Math.floor(id / nbItemPerRow) - var colId = id % nbItemPerRow + const rowId = Math.floor(id / nbItemPerRow) + const colId = id % nbItemPerRow return colId, rowId } function getItemPos(id) { - var rowCol = getItemRowCol(id); + const rowCol = getItemRowCol(id); - var x = rowCol0 * _effectiveCellWidth + contentLeftMargin; + const x = rowCol0 * _effectiveCellWidth + contentLeftMargin; - var y = rowCol1 * rowHeight + headerHeight + topMargin; + const y = rowCol1 * rowHeight + headerHeight + topMargin; // NOTE: Position needs to be integer based if we want to avoid visual artifacts like // wrong alignments or blurry texture rendering. @@ -381,13 +380,13 @@ index < 0 || index >= _count) return - var itemTopY = getItemPos(index)1 - var itemBottomY = itemTopY + rowHeight + const itemTopY = getItemPos(index)1 + const itemBottomY = itemTopY + rowHeight - var viewTopY = flickable.contentY - var viewBottomY = viewTopY + flickable.height + const viewTopY = flickable.contentY + const viewBottomY = viewTopY + flickable.height - var newContentY + let newContentY if (itemTopY < viewTopY) //item above view @@ -443,57 +442,57 @@ } function _calculateCurrentRange() { - var myContentY = flickable.contentY - var contentYWithoutExpand = myContentY - var heightWithoutExpand = flickable.height + displayMarginEnd + const myContentY = flickable.contentY + let contentYWithoutExpand = myContentY + let heightWithoutExpand = flickable.height + displayMarginEnd if (expandIndex !== -1) { - var expandItemY = getItemPos(flickable.getExpandItemGridId())1 + const expandItemY = getItemPos(flickable.getExpandItemGridId())1 if (myContentY >= expandItemY && myContentY < expandItemY + _expandItemVerticalSpace) contentYWithoutExpand = expandItemY if (myContentY >= expandItemY + _expandItemVerticalSpace) contentYWithoutExpand = myContentY - _expandItemVerticalSpace - var expandYStart = Math.max(myContentY, expandItemY) - var expandYEnd = Math.min(myContentY + height, expandItemY + _expandItemVerticalSpace) - var expandDisplayedHeight = Math.max(expandYEnd - expandYStart, 0) + const expandYStart = Math.max(myContentY, expandItemY) + const expandYEnd = Math.min(myContentY + height, expandItemY + _expandItemVerticalSpace) + const expandDisplayedHeight = Math.max(expandYEnd - expandYStart, 0) heightWithoutExpand -= expandDisplayedHeight } - var onlyGridContentY = contentYWithoutExpand - headerHeight - topMargin - var rowId = Math.floor(onlyGridContentY / rowHeight) - var firstId = Math.max(rowId * nbItemPerRow, 0) + const onlyGridContentY = contentYWithoutExpand - headerHeight - topMargin + const firstRowId = Math.floor(onlyGridContentY / rowHeight) + const firstId = Math.max(firstRowId * nbItemPerRow, 0) - rowId = Math.ceil((onlyGridContentY + heightWithoutExpand) / rowHeight) - var lastId = Math.min(rowId * nbItemPerRow, _count) + const lastRowId = Math.ceil((onlyGridContentY + heightWithoutExpand) / rowHeight) + const lastId = Math.min(lastRowId * nbItemPerRow, _count) return firstId, lastId } function _getItem(id) { - var i = id - _currentRange0 + const i = id - _currentRange0 return _idChildrenListi } function _setItem(id, item) { - var i = id - _currentRange0 + const i = id - _currentRange0 _idChildrenListi = item } function _containsItem(id) { - var i = id - _currentRange0 - var childrenList = _idChildrenList + const i = id - _currentRange0 + const childrenList = _idChildrenList return i >= 0 && i < childrenList.length && typeof childrenListi !== "undefined" } function _indexToZ(id) { - var rowCol = getItemRowCol(id) + const rowCol = getItemRowCol(id) return rowCol0 % 2 + 2 * (rowCol1 % 2) } function _repositionItem(id, x, y) {
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/widgets/qml/FadingEdgeListView.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/widgets/qml/FadingEdgeListView.qml
Changed
@@ -74,7 +74,7 @@ if (transitionsRunning || !delegateItem) return null - var margin = 0 // -root.displayMarginBeginning + let margin = 0 // -root.displayMarginBeginning if (orientation === Qt.Vertical) { // if (headerItem && headerItem.visible && headerPositioning === ListView.OverlayHeader) // margin += headerItem.height @@ -92,7 +92,7 @@ if (transitionsRunning || !delegateItem) return null - var margin = 0 // -root.displayMarginEnd + let margin = 0 // -root.displayMarginEnd if (orientation === Qt.Vertical) { // if (footerItem && footerItem.visible && footerPositioning === ListView.OverlayFooter) // margin += footerItem.height
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/widgets/qml/GridItem.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/widgets/qml/GridItem.qml
Changed
@@ -52,6 +52,8 @@ property alias image: picture.source property alias isImageReady: picture.isImageReady + property alias fallbackImage: picture.fallbackImageSource + property alias title: titleLabel.text property alias subtitle: subtitleTxt.text property alias playCoverBorderWidth: picture.playCoverBorderWidth @@ -203,7 +205,7 @@ onPositionChanged: { if (drag.active) { - var pos = drag.target.parent.mapFromItem(root, mouseX, mouseY) + const pos = drag.target.parent.mapFromItem(root, mouseX, mouseY) drag.target.x = pos.x + VLCStyle.dragDelta drag.target.y = pos.y + VLCStyle.dragDelta }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/widgets/qml/HorizontalResizeHandle.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/widgets/qml/HorizontalResizeHandle.qml
Changed
@@ -52,8 +52,8 @@ } onPositionChanged: { - var f = atRight ? -1 : 1 - var delta = mouseX - _previousX + const f = atRight ? -1 : 1 + const delta = mouseX - _previousX root.widthFactor = root.sourceWidth / (root.targetWidth + (delta * - f)) }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/widgets/qml/KeyNavigableListView.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/widgets/qml/KeyNavigableListView.qml
Changed
@@ -157,7 +157,7 @@ } Keys.onPressed: { - var newIndex = -1 + let newIndex = -1 if (orientation === ListView.Vertical) { @@ -202,7 +202,7 @@ _keyPressed = true } - var oldIndex = currentIndex + const oldIndex = currentIndex if (newIndex >= 0 && newIndex < count && newIndex !== oldIndex) { event.accepted = true;
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
Changed
@@ -60,9 +60,9 @@ readonly property int contentRightMargin: extraMargin + rightMargin readonly property real usedRowSpace: { - var size = leftMargin + rightMargin + let size = leftMargin + rightMargin - for (var i in sortModel) + for (let i in sortModel) size += VLCStyle.colWidth(sortModeli.size) return size + Math.max(VLCStyle.column_spacing * (sortModel.length - 1), 0) @@ -174,7 +174,7 @@ } function getItemY(index) { - var size = index * rowHeight + topMargin + let size = index * rowHeight + topMargin if (tableHeaderItem) size += tableHeaderItem.height @@ -230,7 +230,7 @@ // updating availableRowWidth is expensive because of property bindings in sortModel // and availableRowWidth is dependent on root.width which can update in a burst // so try to maintain a minimum time gap between subsequent availableRowWidth updates - var sinceLastUpdate = Date.now() - root._availabeRowWidthLastUpdateTime + const sinceLastUpdate = Date.now() - root._availabeRowWidthLastUpdateTime if ((root.availableRowWidth === 0) || (sinceLastUpdate > 128 && !availableRowWidthUpdater.running)) { _update() } else if (!availableRowWidthUpdater.running) {
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/widgets/qml/MLDragItem.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/widgets/qml/MLDragItem.qml
Changed
@@ -33,7 +33,7 @@ function getSelectedInputItem(cb) { console.assert(mlIDRole) - var inputIdList = root.indexesData.map(function(obj){ + const inputIdList = root.indexesData.map(function(obj){ return objroot.mlIDRole }) MediaLib.mlInputItem(inputIdList, cb)
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/widgets/qml/MediaCover.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/widgets/qml/MediaCover.qml
Changed
@@ -44,6 +44,8 @@ property alias source: image.source property bool isImageReady: image.status == RoundImage.Ready + property alias fallbackImageSource: fallbackImage.source + property alias imageOverlay: overlay.sourceComponent property alias playCoverVisible: playCoverLoader.visible @@ -71,6 +73,16 @@ radius: root.radius } + RoundImage { + id: fallbackImage + + anchors.fill: parent + + radius: root.radius + + visible: !root.isImageReady + } + Loader { id: overlay
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/widgets/qml/NavigableCol.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/widgets/qml/NavigableCol.qml
Changed
@@ -51,8 +51,8 @@ // Next item if (focusReason === Qt.TabFocusReason) { - for (var i = 0; i < repeater.count; i++) { - var item = repeater.itemAt(i); + for (let i = 0; i < repeater.count; i++) { + const item = repeater.itemAt(i); if (item.visible && item.enabled) { item.forceActiveFocus(Qt.TabFocusReason); @@ -63,8 +63,8 @@ } // Previous item else if (focusReason === Qt.BacktabFocusReason) { - for (var i = repeater.count - 1; i >= 0; i--) { - var item= repeater.itemAt(i); + for (let i = repeater.count - 1; i >= 0; i--) { + const item = repeater.itemAt(i); if (item.visible && item.enabled) { item.forceActiveFocus(Qt.BacktabFocusReason); @@ -75,10 +75,10 @@ } // NOTE: We make sure that one item has the focus. else { - var itemFocus = undefined; + let itemFocus = undefined; - for (var i = 0 ; i < repeater.count; i++) { - var item = repeater.itemAt(i); + for (let i = 0 ; i < repeater.count; i++) { + const item = repeater.itemAt(i); if (item.visible && item.enabled) { // NOTE: We already have a focused item, so we keep it this way. @@ -106,7 +106,7 @@ function _applyFocus() { if (indexFocus < 0 || indexFocus >= count) return false; - var item = repeater.itemAt(indexFocus); + const item = repeater.itemAt(indexFocus); if (item.visible && item.enabled) { item.forceActiveFocus(focusReason); @@ -118,7 +118,7 @@ } function _hasFocus() { - for (var i = 0 ; i < count; i++) { + for (let i = 0 ; i < count; i++) { if (repeater.itemAt(i).activeFocus) return true; } @@ -150,7 +150,7 @@ enabledConnection.createObject(item, { target: item }); item.Navigation.upAction = function() { - var i = index; + let i = index; do { i--; @@ -165,7 +165,7 @@ } item.Navigation.downAction = function() { - var i = index; + let i = index; do { i++;
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/widgets/qml/NavigableRow.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/widgets/qml/NavigableRow.qml
Changed
@@ -57,8 +57,8 @@ // Next item if (focusReason === Qt.TabFocusReason) { - for (var i = 0; i < count; i++) { - var item = repeater.itemAt(i); + for (let i = 0; i < count; i++) { + const item = repeater.itemAt(i); if (item.visible && item.enabled) { item.forceActiveFocus(Qt.TabFocusReason); @@ -69,8 +69,8 @@ } // Previous item else if (focusReason === Qt.BacktabFocusReason) { - for (var i = count -1; i >= 0; i--) { - var item = repeater.itemAt(i); + for (let i = count -1; i >= 0; i--) { + const item = repeater.itemAt(i); if (item.visible && item.enabled) { item.forceActiveFocus(Qt.BacktabFocusReason); @@ -81,10 +81,10 @@ } // NOTE: We make sure that one item has the focus. else { - var itemFocus = undefined; + let itemFocus = undefined; - for (var i = 0 ; i < count; i++) { - var item = repeater.itemAt(i); + for (let i = 0 ; i < count; i++) { + const item = repeater.itemAt(i); if (item.visible && item.enabled) { // NOTE: We already have a focused item, so we keep it this way. @@ -112,7 +112,7 @@ function _applyFocus() { if (indexFocus < 0 || indexFocus >= count) return false; - var item = repeater.itemAt(indexFocus); + const item = repeater.itemAt(indexFocus); if (item.visible && item.enabled) { item.forceActiveFocus(focusReason); @@ -124,7 +124,7 @@ } function _hasFocus() { - for (var i = 0 ; i < count; i++) { + for (let i = 0 ; i < count; i++) { if (repeater.itemAt(i).activeFocus) return true; } @@ -156,7 +156,7 @@ item.Navigation.parentItem = root; item.Navigation.leftAction = function() { - var i = index; + let i = index; do { i--; @@ -171,7 +171,7 @@ }; item.Navigation.rightAction = function() { - var i = index; + let i = index; do { i++;
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/widgets/qml/PageLoader.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/widgets/qml/PageLoader.qml
Changed
@@ -84,7 +84,7 @@ console.error("pageModel is not defined") return } - var found = stackView.loadView(root.pageModel, view.name, view.properties) + const found = stackView.loadView(root.pageModel, view.name, view.properties) if (!found) { console.error("failed to load", JSON.stringify(History.current)) return
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/widgets/qml/Slider.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/widgets/qml/Slider.qml
Changed
@@ -51,10 +51,13 @@ // else tooltip will always be shown at current value. property bool tooltipFollowsMouse: false - // valueText -> function(value) - // arg value is between from and to - // returns the text for the given value, used for tooltip etc. - property var valueText: function (value) { + + // toolTipTextProvider -> function(value) + // arg "value" is between from and to, this is "value" + // at which pointing tool tip is currently shown + // + // returns the text for the given value + property var toolTipTextProvider: function (value) { return value } @@ -68,9 +71,9 @@ function positionAt(x) { // taken from qt sources QQuickSlider.cpp // TODO: support vertical slider - var hw = control.handle.width - var offset = control.leftPadding + hw / 2 - var extend = control.availableWidth - hw + const hw = control.handle.width + const offset = control.leftPadding + hw / 2 + const extend = control.availableWidth - hw return (x - offset) / extend } @@ -152,8 +155,8 @@ text: { if (!visible) return "" - var v = control.valueAt(control.positionAt(pos.x)) - return control.valueText(v) + const v = control.valueAt(control.positionAt(pos.x)) + return control.toolTipTextProvider(v) } //tooltip is a Popup, palette should be passed explicitly
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/widgets/qml/SortControl.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/widgets/qml/SortControl.qml
Changed
@@ -86,7 +86,7 @@ target: (_menu) ? _menu : null onSelected: { - var selectedSortKey = root.modelindexroot.criteriaRole + const selectedSortKey = root.modelindexroot.criteriaRole if (root.sortKey !== selectedSortKey) { root.sortSelected(selectedSortKey) @@ -101,9 +101,9 @@ // Functions function show() { - var model = root.model.map(function(modelData) { - var checked = modelDataroot.criteriaRole === sortKey - var order = checked ? root.sortOrder : undefined + const model = root.model.map(function(modelData) { + const checked = modelDataroot.criteriaRole === sortKey + const order = checked ? root.sortOrder : undefined return { "text": modelDataroot.textRole, "checked": checked, @@ -111,7 +111,7 @@ } }) - var point + let point if (root.popupAbove) point = root.mapToGlobal(0, - VLCStyle.margin_xxsmall)
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/widgets/qml/StackViewExt.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/widgets/qml/StackViewExt.qml
Changed
@@ -81,7 +81,7 @@ if (Object.keys(viewProperties).length === 0 && root.currentItem.hasOwnProperty("loadDefaultView") ) { root.currentItem.loadDefaultView() } else { - for ( var viewProp in viewProperties ) { + for ( let viewProp in viewProperties ) { if ( root.currentItem.hasOwnProperty(viewProp) ) { root.currentItemviewProp = viewPropertiesviewProp } @@ -90,10 +90,10 @@ return true } - var found = false - for (var tab = 0; tab < viewModel.length; tab++ ) + let found = false + for (let tab = 0; tab < viewModel.length; tab++ ) { - var model = viewModeltab + const model = viewModeltab if (model.name === view) { if (model.guard !== undefined && typeof model.guard === "function" && !model.guard(viewProperties)) { continue //we're not allowed to load this page @@ -101,7 +101,7 @@ //we can't use push(url, properties) as Qt interprets viewProperties //as a second component to load - var component = undefined + let component = undefined if (model.component) { component = model.component } else if ( model.url ) {
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/widgets/qml/TableColumns.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/widgets/qml/TableColumns.qml
Changed
@@ -51,19 +51,19 @@ if (colModel === null || rowModel === null) return "" - var criterias = colModel.subCriterias + const criterias = colModel.subCriterias if (criterias === undefined || criterias.length === 0) return "" - var string = "" + let string = "" - for (var i = 0; i < criterias.length; i++) { + for (let i = 0; i < criterias.length; i++) { if (i) string += " • " - var criteria = criteriasi + const criteria = criteriasi - var value = rowModelcriteria + const value = rowModelcriteria // NOTE: We can't use 'instanceof' because VLCTick is uncreatable. if (value.toString().indexOf("VLCTick(") === 0) { @@ -110,7 +110,7 @@ anchors.fill: parent source: { - var cover = null + let cover = null if (!!titleDel.rowModel) { cover = titleDel.rowModelroot.criteriaCover }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/gui/qt/widgets/qml/TableViewDelegate.qml -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/gui/qt/widgets/qml/TableViewDelegate.qml
Changed
@@ -142,7 +142,7 @@ if (drag.active == false) return; - var pos = drag.target.parent.mapFromItem(hoverArea, mouseX, mouseY); + const pos = drag.target.parent.mapFromItem(hoverArea, mouseX, mouseY); drag.target.x = pos.x + VLCStyle.dragDelta; drag.target.y = pos.y + VLCStyle.dragDelta; @@ -239,7 +239,7 @@ if (!delegate.selected) delegate.selectAndFocus(Qt.NoModifier, Qt.MouseFocusReason) - var pos = contextButton.mapToGlobal(VLCStyle.margin_xsmall, contextButton.height / 2 + VLCStyle.fontHeight_normal) + const pos = contextButton.mapToGlobal(VLCStyle.margin_xsmall, contextButton.height / 2 + VLCStyle.fontHeight_normal) delegate.contextMenuButtonClicked(this, delegate.rowModel, pos) }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/lua/extension.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/lua/extension.c
Changed
@@ -762,8 +762,10 @@ luaopen_rand(L); luaopen_rd(L); luaopen_ml(L); -#if defined(_WIN32) && !defined(VLC_WINSTORE_APP) +#if defined(_WIN32) +# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) luaopen_win(L); +# endif #endif /* Register extension specific functions */
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/lua/intf.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/lua/intf.c
Changed
@@ -285,8 +285,10 @@ luaopen_rand( L ); luaopen_rd( L ); luaopen_ml( L ); -#if defined(_WIN32) && !defined(VLC_WINSTORE_APP) +#if defined(_WIN32) +# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) luaopen_win( L ); +# endif #endif /* clean up */
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/lua/libs/win.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/lua/libs/win.c
Changed
@@ -33,7 +33,7 @@ #include "../vlc.h" #include "../libs.h" -#ifndef VLC_WINSTORE_APP +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) /* Based on modules/control/rc.c and include/vlc_interface.h */ static HANDLE GetConsole( lua_State *L ) @@ -183,4 +183,4 @@ lua_setfield( L, -2, "win" ); } -#endif /* !VLC_WINSTORE_APP */ +#endif // WINAPI_PARTITION_DESKTOP
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/meson.build -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/meson.build
Changed
@@ -148,6 +148,11 @@ # rsvg, used by SVG codec and text renderer rsvg_dep = dependency('librsvg-2.0', version: '>= 2.9.0', required: get_option('rsvg')) +# libgcrypt, used by rtp, access, stream_out +libgcrypt_dep = dependency('libgcrypt', + version: '>= 1.6.0', + required: get_option('libgcrypt')) + # Array that holds all enabled VLC module dicts vlc_modules =
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/misc/medialibrary/medialibrary.cpp -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/misc/medialibrary/medialibrary.cpp
Changed
@@ -722,6 +722,18 @@ return VLC_EGENERIC; return VLC_SUCCESS; } + case VLC_ML_PLAYLIST_RENAME: + { + auto priorityAccess = m_ml->acquirePriorityAccess(); + + auto playlist = m_ml->playlist( va_arg( args, int64_t ) ); + if ( playlist == nullptr ) + return VLC_EGENERIC; + const char * name = va_arg( args, const char * ); + if ( playlist->setName(name) == false ) + return VLC_EGENERIC; + return VLC_SUCCESS; + } default: return VLC_EGENERIC; }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/text_renderer/Makefile.am -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/text_renderer/Makefile.am
Changed
@@ -22,11 +22,10 @@ libfreetype_plugin_la_SOURCES += text_renderer/freetype/fonts/dwrite.cpp libfreetype_plugin_la_CXXFLAGS = $(AM_CXXFLAGS) $(LIBCOMCXXFLAGS) libfreetype_plugin_la_LINK = $(CXXLINK) +libfreetype_plugin_la_LIBADD += -ldwrite -luuid if HAVE_WIN32_DESKTOP libfreetype_plugin_la_SOURCES += text_renderer/freetype/fonts/win32.c -libfreetype_plugin_la_LIBADD += -liconv -lz -lusp10 -lgdi32 -luuid -else -libfreetype_plugin_la_LIBADD += -ldwrite -luuid +libfreetype_plugin_la_LIBADD += -liconv -lz -lusp10 -lgdi32 endif else libfreetype_plugin_la_LINK = $(LINK)
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/text_renderer/freetype/fonts/backends.h -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/text_renderer/freetype/fonts/backends.h
Changed
@@ -89,12 +89,12 @@ int InitDWrite( vlc_font_select_t * ); int ReleaseDWrite( vlc_font_select_t * ); int DWrite_GetFontStream( vlc_font_select_t *, int i_index, FT_Stream *pp_stream ); -#ifndef VLC_WINSTORE_APP +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) int Win32_GetFallbacks( vlc_font_select_t *, const char *psz_family, uni_char_t codepoint, vlc_family_t ** ); int Win32_GetFamily( vlc_font_select_t *, const char *psz_family, const vlc_family_t ** ); -#endif /* !VLC_WINSTORE_APP */ +#endif /* WINAPI_PARTITION_DESKTOP */ #endif /* _WIN32 */ #ifdef __APPLE__
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/text_renderer/freetype/fonts/dwrite.cpp -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/text_renderer/freetype/fonts/dwrite.cpp
Changed
@@ -40,34 +40,18 @@ using Microsoft::WRL::ComPtr; using namespace std; -typedef HRESULT ( WINAPI *DWriteCreateFactoryProc ) ( - _In_ DWRITE_FACTORY_TYPE factory_type, - _In_ REFIID iid, - _Out_ IUnknown **pp_factory ); - struct dw_sys_t { - HMODULE p_dw_dll; ComPtr< IDWriteFactory2 > p_dw_factory; ComPtr< IDWriteFontCollection > p_dw_system_fonts; ComPtr< IDWriteNumberSubstitution > p_dw_substitution; ComPtr< IDWriteFontFallback > p_dw_fallbacks; vector< FT_Stream > streams; - dw_sys_t( HMODULE p_dw_dll ) : p_dw_dll( p_dw_dll ) + dw_sys_t( ) { /* This will fail on versions of Windows prior to 8.1 */ - DWriteCreateFactoryProc pf; -#ifdef VLC_WINSTORE_APP - pf = DWriteCreateFactory; -#else - pf = ( DWriteCreateFactoryProc ) GetProcAddress( p_dw_dll, "DWriteCreateFactory" ); - - if( pf == NULL ) - throw runtime_error( "GetProcAddress() failed" ); -#endif - - if( pf( DWRITE_FACTORY_TYPE_SHARED, __uuidof( IDWriteFactory2 ), + if( DWriteCreateFactory( DWRITE_FACTORY_TYPE_SHARED, __uuidof( IDWriteFactory2 ), &p_dw_factory ) ) throw runtime_error( "failed to create DWrite factory" ); @@ -131,28 +115,14 @@ extern "C" int InitDWrite( vlc_font_select_t *fs ) { dw_sys_t *p_dw_sys; - HMODULE p_dw_dll = NULL; try { -#ifdef VLC_WINSTORE_APP - p_dw_sys = new dw_sys_t( p_dw_dll ); -#else - p_dw_dll = LoadLibrary( TEXT( "Dwrite.dll" ) ); - if( p_dw_dll == NULL ) - return VLC_EGENERIC; - - p_dw_sys = new dw_sys_t( p_dw_dll ); -#endif + p_dw_sys = new dw_sys_t( ); } catch( const exception &e ) { -#ifndef VLC_WINSTORE_APP - FreeLibrary( p_dw_dll ); - (void)e; -#else msg_Err( fs->p_obj, "InitDWrite(): %s", e.what() ); -#endif return VLC_EGENERIC; } @@ -166,16 +136,7 @@ { dw_sys_t *p_dw_sys = ( dw_sys_t * ) fs->p_dw_sys; -#ifdef VLC_WINSTORE_APP - delete p_dw_sys; -#else - HMODULE p_dw_dll = NULL; - if( p_dw_sys && p_dw_sys->p_dw_dll ) - p_dw_dll = p_dw_sys->p_dw_dll; - delete p_dw_sys; - if( p_dw_dll ) FreeLibrary( p_dw_dll ); -#endif return VLC_SUCCESS; }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/text_renderer/freetype/fonts/win32.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/text_renderer/freetype/fonts/win32.c
Changed
@@ -57,7 +57,7 @@ #include "../platform_fonts.h" #include "backends.h" -#ifndef VLC_WINSTORE_APP +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) #define FONT_DIR_NT TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts") #define FONT_LINKING_NT TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\FontLink\\SystemLink") @@ -683,6 +683,9 @@ *pp_result = p_family; return i_ret; } +#else // !WINAPI_PARTITION_DESKTOP +#define GetWindowsFontPath() (NULL) +#endif // !WINAPI_PARTITION_DESKTOP char * MakeFilePath( vlc_font_select_t *fs, const char *psz_filename ) { @@ -706,5 +709,3 @@ return psz_filepath; } -#endif -
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/text_renderer/freetype/platform_fonts.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/text_renderer/freetype/platform_fonts.c
Changed
@@ -841,7 +841,7 @@ } #endif -#if !defined(_WIN32) || defined(VLC_WINSTORE_APP) +#if !defined(_WIN32) char * MakeFilePath( vlc_font_select_t *fs, const char *psz_filename ) { @@ -902,7 +902,7 @@ } else { -#ifdef VLC_WINSTORE_APP +#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) msg_Err( p_filter, "Error initializing DirectWrite" ); goto error; #else
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/video_chroma/d3d11_fmt.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/video_chroma/d3d11_fmt.c
Changed
@@ -284,7 +284,7 @@ typedef struct { -#ifndef VLC_WINSTORE_APP +#if !BUILD_FOR_UAP HINSTANCE hdll; /* handle of the opened d3d11 dll */ #if !defined(NDEBUG) && defined(HAVE_DXGIDEBUG_H) HINSTANCE dxgidebug_dll; @@ -305,7 +305,7 @@ static int D3D11_Create(vlc_object_t *obj, d3d11_handle_t *hd3d) { -#ifndef VLC_WINSTORE_APP +#if !BUILD_FOR_UAP hd3d->hdll = LoadLibrary(TEXT("D3D11.DLL")); if (!hd3d->hdll) { @@ -331,13 +331,13 @@ } } # endif // !NDEBUG && HAVE_DXGIDEBUG_H -#endif // !VLC_WINSTORE_APP +#endif // !BUILD_FOR_UAP return VLC_SUCCESS; } static void D3D11_Destroy(d3d11_handle_t *hd3d) { -#ifndef VLC_WINSTORE_APP +#if !BUILD_FOR_UAP if (hd3d->hdll) FreeLibrary(hd3d->hdll); @@ -429,7 +429,7 @@ IDXGIAdapter *adapter, bool hw_decoding, d3d11_device_t *out) { -#ifndef VLC_WINSTORE_APP +#if !BUILD_FOR_UAP # define D3D11CreateDevice(a,b,c,d,e,f,g,h,i,j) pf_CreateDevice(a,b,c,d,e,f,g,h,i,j) /* */ PFN_D3D11_CREATE_DEVICE pf_CreateDevice; @@ -438,7 +438,7 @@ msg_Err(obj, "Cannot locate reference to D3D11CreateDevice ABI in DLL"); return E_NOINTERFACE; } -#endif /* VLC_WINSTORE_APP */ +#endif HRESULT hr = E_NOTIMPL; UINT creationFlags = 0; @@ -562,7 +562,7 @@ engineType == libvlc_video_engine_d3d11 ) { /* internal decoder device */ -#ifndef VLC_WINSTORE_APP +#if !BUILD_FOR_UAP if (!forced) { /* Allow using D3D11 automatically starting from Windows 8.1 */ @@ -573,7 +573,7 @@ if (!isWin81OrGreater) goto error; } -#endif /* !VLC_WINSTORE_APP */ +#endif hr = CreateDevice( obj, &sys->hd3d, adapter, hw_decoding, &sys->dec_device.d3d_dev ); } @@ -615,10 +615,12 @@ { bool result = false; +#if BUILD_FOR_UAP if (d3ddev->adapterDesc.VendorId == 0 && d3ddev->adapterDesc.DeviceId == 0 && !wcscmp(L"ROOT\\SraKmd\\0000", d3ddev->adapterDesc.Description)) result = true; +#endif return result; } @@ -929,7 +931,7 @@ void D3D11_LogResources(d3d11_decoder_device_t *dev_sys) { -#ifndef VLC_WINSTORE_APP +#if !BUILD_FOR_UAP # if !defined(NDEBUG) && defined(HAVE_DXGIDEBUG_H) d3d11_decoder_device *sys = container_of(dev_sys, d3d11_decoder_device, dec_device); d3d11_handle_t *hd3d = &sys->hd3d;
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/video_chroma/d3d9_fmt.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/video_chroma/d3d9_fmt.c
Changed
@@ -68,10 +68,8 @@ d3dpp->hDeviceWindow = NULL; d3dpp->SwapEffect = D3DSWAPEFFECT_COPY; d3dpp->BackBufferCount = 1; -#ifndef VLC_WINSTORE_APP d3dpp->BackBufferWidth = GetSystemMetrics(SM_CXVIRTUALSCREEN); d3dpp->BackBufferHeight = GetSystemMetrics(SM_CYVIRTUALSCREEN); -#endif // VLC_WINSTORE_APP } int D3D9_ResetDevice(vlc_object_t *o, d3d9_decoder_device_t *dec_dev)
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/video_output/android/display.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/video_output/android/display.c
Changed
@@ -386,16 +386,7 @@ assert(picture->context); if (sys->avctx->render_ts != NULL) - { - vlc_tick_t now = vlc_tick_now(); - if (date > now) - { - if (date - now <= VLC_TICK_FROM_SEC(1)) - sys->avctx->render_ts(picture->context, date); - else /* The picture will be displayed from the Display callback */ - msg_Warn(vd, "picture way too early to release at time"); - } - } + sys->avctx->render_ts(picture->context, date); if (sys->sub.window != NULL) subpicture_Prepare(vd, subpicture); @@ -510,13 +501,23 @@ return VLC_EGENERIC; } - int ret = subpicture_OpenDisplay(vd); - if (ret != 0 && !vd->obj.force) + const bool has_subtitle_surface = + AWindowHandler_getANativeWindow(sys->awh, AWindow_Subtitles) != NULL; + if (has_subtitle_surface) { - msg_Warn(vd, "cannot blend subtitle with an opaque surface, " - "trying next vout"); - free(sys); - return VLC_EGENERIC; + int ret = subpicture_OpenDisplay(vd); + if (ret != 0 && !vd->obj.force) + { + msg_Warn(vd, "cannot blend subtitle with an opaque surface, " + "trying next vout"); + free(sys); + return VLC_EGENERIC; + } + } + else + { + msg_Warn(vd, "using android display without subtitles support"); + sys->sub.window = NULL; } video_format_t rot_fmt;
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/video_output/win32/common.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/video_output/win32/common.c
Changed
@@ -48,7 +48,7 @@ area->src_fmt = src_fmt; } -#ifndef VLC_WINSTORE_APP +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) /* */ int CommonWindowInit(vout_display_t *vd, display_win32_area_t *area, bool projection_gestures) @@ -70,7 +70,7 @@ { return EventThreadVideoHWND(area->event); } -#endif /* !VLC_WINSTORE_APP */ +#endif /* WINAPI_PARTITION_DESKTOP */ /***************************************************************************** * UpdateRects: update clipping rectangles @@ -101,25 +101,25 @@ } } -#ifndef VLC_WINSTORE_APP +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) /* */ void CommonWindowClean(display_win32_area_t *sys) { EventThreadDestroy(sys->event); } -#endif /* !VLC_WINSTORE_APP */ +#endif /* WINAPI_PARTITION_DESKTOP */ void CommonControl(vout_display_t *vd, display_win32_area_t *area, int query) { switch (query) { case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE: -#ifndef VLC_WINSTORE_APP +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) // Update dimensions if (area->event != NULL) { EventThreadUpdateSize(area->event); } -#endif /* !VLC_WINSTORE_APP */ +#endif /* WINAPI_PARTITION_DESKTOP */ // fallthrough case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED: case VOUT_DISPLAY_CHANGE_ZOOM:
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/video_output/win32/common.h -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/video_output/win32/common.h
Changed
@@ -48,12 +48,12 @@ /***************************************************************************** * Prototypes from common.c *****************************************************************************/ -#ifndef VLC_WINSTORE_APP +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) int CommonWindowInit(vout_display_t *, display_win32_area_t *, bool projection_gestures); void CommonWindowClean(display_win32_area_t *); HWND CommonVideoHWND(const display_win32_area_t *); -#endif /* !VLC_WINSTORE_APP */ +#endif /* WINAPI_PARTITION_DESKTOP */ void CommonControl(vout_display_t *, display_win32_area_t *, int ); void CommonPlacePicture (vout_display_t *, display_win32_area_t *);
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/video_output/win32/d3d11_swapchain.h -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/video_output/win32/d3d11_swapchain.h
Changed
@@ -28,7 +28,7 @@ #include "dxgi_swapchain.h" #include "../../video_chroma/d3d11_fmt.h" -#ifndef VLC_WINSTORE_APP +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) void *D3D11_CreateLocalSwapchainHandleHwnd(vlc_object_t *, HWND, d3d11_device_t *d3d_dev); #if defined(HAVE_DCOMP_H) void *D3D11_CreateLocalSwapchainHandleDComp(vlc_object_t *, void* dcompDevice, void* dcompVisual, d3d11_device_t *d3d_dev); @@ -40,6 +40,6 @@ bool D3D11_LocalSwapchainSelectPlane( void *opaque, size_t plane, void *output ); void D3D11_LocalSwapchainSwap( void *opaque ); void D3D11_LocalSwapchainSetMetadata( void *opaque, libvlc_video_metadata_type_t, const void * ); -#endif // !VLC_WINSTORE_APP +#endif // WINAPI_PARTITION_DESKTOP #endif /* VLC_D3D11_SWAPCHAIN_H */
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/video_output/win32/d3d_dynamic_shader.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/video_output/win32/d3d_dynamic_shader.c
Changed
@@ -321,7 +321,7 @@ ID3D10Blob* pShaderBlob = NULL, *pErrBlob = NULL; UINT compileFlags = 0; -#ifdef VLC_WINSTORE_APP +#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) VLC_UNUSED(compiler); #else # define D3DCompile(a,b,c,d,e,f,g,h,i,j,k) compiler->OurD3DCompile(a,b,c,d,e,f,g,h,i,j,k) @@ -647,7 +647,7 @@ *compiler = calloc(1, sizeof(d3d_shader_compiler_t)); if (unlikely(*compiler == NULL)) return VLC_ENOMEM; -#ifndef VLC_WINSTORE_APP +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) /* d3dcompiler_47 is the latest on windows 10 */ for (int i = 47; i > 41; --i) { @@ -665,17 +665,17 @@ free(*compiler); return VLC_EGENERIC; } -#endif // !VLC_WINSTORE_APP +#endif // WINAPI_PARTITION_DESKTOP return VLC_SUCCESS; } void D3D_ReleaseShaderCompiler(d3d_shader_compiler_t *compiler) { -#ifndef VLC_WINSTORE_APP +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) if (compiler->compiler_dll) FreeLibrary(compiler->compiler_dll); -#endif // !VLC_WINSTORE_APP +#endif // WINAPI_PARTITION_DESKTOP free(compiler); }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/video_output/win32/direct3d11.cpp -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/video_output/win32/direct3d11.cpp
Changed
@@ -44,7 +44,7 @@ #include "d3d11_quad.h" #include "d3d11_shaders.h" #include "d3d11_scaler.h" -#ifndef VLC_WINSTORE_APP +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) #include "d3d11_swapchain.h" #endif @@ -396,10 +396,10 @@ if ( sys->swapCb == NULL || sys->startEndRenderingCb == NULL || sys->updateOutputCb == NULL ) { -#ifdef VLC_WINSTORE_APP +#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) msg_Err(vd, "UWP apps needs to set an external rendering target"); goto error; -#else // !VLC_WINSTORE_APP +#else // WINAPI_PARTITION_DESKTOP if (vd->cfg->window->type == VLC_WINDOW_TYPE_HWND) { if (CommonWindowInit(vd, &sys->area, @@ -424,7 +424,7 @@ sys->startEndRenderingCb = D3D11_LocalSwapchainStartEndRendering; sys->sendMetadataCb = D3D11_LocalSwapchainSetMetadata; sys->selectPlaneCb = D3D11_LocalSwapchainSelectPlane; -#endif // !VLC_WINSTORE_APP +#endif // WINAPI_PARTITION_DESKTOP } if (Direct3D11Open(vd, fmtp, context)) { @@ -462,7 +462,7 @@ { vout_display_sys_t *sys = static_cast<vout_display_sys_t *>(vd->sys); D3D_ReleaseShaderCompiler(sys->shaders); -#ifndef VLC_WINSTORE_APP +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) CommonWindowClean(&sys->area); #endif Direct3D11Close(vd); @@ -803,7 +803,7 @@ if (err != VLC_SUCCESS) { if (!is_d3d11_opaque(vd->source->i_chroma) -#ifndef VLC_WINSTORE_APP +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && vd->obj.force #endif ) @@ -822,10 +822,10 @@ } if (err != VLC_SUCCESS) { -#ifndef VLC_WINSTORE_APP +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) if ( sys->swapCb == D3D11_LocalSwapchainSwap ) D3D11_LocalSwapchainCleanupDevice( sys->outside_opaque ); -#endif // !VLC_WINSTORE_APP +#endif // WINAPI_PARTITION_DESKTOP return err; } } @@ -872,10 +872,10 @@ if (Direct3D11CreateGenericResources(vd)) { msg_Err(vd, "Failed to allocate resources"); -#ifndef VLC_WINSTORE_APP +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) if ( sys->swapCb == D3D11_LocalSwapchainSwap ) D3D11_LocalSwapchainCleanupDevice( sys->outside_opaque ); -#endif // !VLC_WINSTORE_APP +#endif // WINAPI_PARTITION_DESKTOP return VLC_EGENERIC; } @@ -1008,10 +1008,10 @@ Direct3D11DestroyResources(vd); -#ifndef VLC_WINSTORE_APP +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) if ( sys->swapCb == D3D11_LocalSwapchainSwap ) D3D11_LocalSwapchainCleanupDevice( sys->outside_opaque ); -#endif // !VLC_WINSTORE_APP +#endif // WINAPI_PARTITION_DESKTOP if (sys->d3d_dev && sys->d3d_dev == &sys->local_d3d_dev->d3d_dev) D3D11_ReleaseDevice( sys->local_d3d_dev );
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/modules/video_output/window_macosx.m -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/modules/video_output/window_macosx.m
Changed
@@ -642,13 +642,13 @@ */ vlc_module_begin() set_description("macOS Video Output Window") - set_capability("vout window", 1000) + set_capability("vout window", 1) set_callback(Open) add_submodule() set_shortname(N_("NSObject Drawable")) set_subcategory(SUBCAT_VIDEO_VOUT) - set_capability("vout window", 10000) + set_capability("vout window", 10) set_callback(DrawableOpen) add_shortcut("embed-nsobject") vlc_module_end()
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/share/lua/http/js/controllers.js -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/share/lua/http/js/controllers.js
Changed
@@ -2,6 +2,7 @@ var current_que = 'main'; var current_playlist_id = -1; var previous_playlist_id = -1; +var seek_sec = 0; function updateArt(url) { $('#albumArt').fadeOut(500, function () { @@ -80,6 +81,8 @@ previous_playlist_id = current_playlist_id; } + seek_sec = parseInt($('seek_sec', data).text()); + if (pollStatus) { setTimeout(updateStatus, 1000); }
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/share/lua/http/mobile.html -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/share/lua/http/mobile.html
Changed
@@ -63,11 +63,11 @@ return false; }); $('#buttonRewd').click(function(){ - sendCommand({'command': 'seek', 'val': '-30S'}); + sendCommand({'command': 'seek', 'val': '-' + seek_sec.toString() + 'S'}); return false; }); $('#buttonFwrd').click(function(){ - sendCommand({'command': 'seek', 'val': '+30S'}); + sendCommand({'command': 'seek', 'val': '+' + seek_sec.toString() + 'S'}); return false; }); })
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/share/lua/intf/modules/httprequests.lua -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/share/lua/intf/modules/httprequests.lua
Changed
@@ -439,6 +439,7 @@ s.apiversion=4 s.version=vlc.misc.version() s.volume=vlc.volume.get() + s.seek_sec = vlc.config.get("short-jump-size") s.time = vlc.player.get_time() / 1000000 s.position = vlc.player.get_position()
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/src/config/help.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/src/config/help.c
Changed
@@ -45,7 +45,13 @@ #endif #include <unistd.h> -#if defined( _WIN32 ) && !defined( VLC_WINSTORE_APP ) +#if defined( _WIN32 ) +# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) +# define HAVE_VLC_SHOWCONSOLE +# endif +#endif + +#ifdef HAVE_VLC_SHOWCONSOLE static void ShowConsole (void); static void PauseConsole (void); #else @@ -75,12 +81,14 @@ if (ioctl(STDOUT_FILENO, WIOCGETD, &uw) == 0) return uw.uw_height / uw.uw_vs; #endif -#if defined (_WIN32) && !defined(VLC_WINSTORE_APP) +#if defined (_WIN32) +#if NTDDI_VERSION >= NTDDI_WIN10_RS1 || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) CONSOLE_SCREEN_BUFFER_INFO buf; if (GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &buf)) return buf.dwSize.X; #endif +#endif return 80; } @@ -696,7 +704,7 @@ PauseConsole(); } -#if defined( _WIN32 ) && !defined(VLC_WINSTORE_APP) +#ifdef HAVE_VLC_SHOWCONSOLE /***************************************************************************** * ShowConsole: On Win32, create an output console for debug messages *****************************************************************************
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/src/input/es_out_timeshift.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/src/input/es_out_timeshift.c
Changed
@@ -839,16 +839,16 @@ (int)p_sys->i_tmp_size_max/(1024*1024) ); p_sys->psz_tmp_path = var_InheritString( p_input, "input-timeshift-path" ); -#if defined (_WIN32) && !defined(VLC_WINSTORE_APP) +#if defined (_WIN32) if( p_sys->psz_tmp_path == NULL ) { - const DWORD count = GetTempPath( 0, NULL ); + const DWORD count = GetTempPathW( 0, NULL ); if( count > 0 ) { WCHAR *path = vlc_alloc( count + 1, sizeof(WCHAR) ); if( path != NULL ) { - DWORD ret = GetTempPath( count + 1, path ); + DWORD ret = GetTempPathW( count + 1, path ); if( ret != 0 && ret <= count ) p_sys->psz_tmp_path = FromWide( path ); free( path );
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/src/misc/frame.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/src/misc/frame.c
Changed
@@ -451,7 +451,7 @@ HANDLE hMap; DWORD prot = write ? PAGE_READWRITE : PAGE_READONLY; DWORD access = FILE_MAP_READ | (write ? FILE_MAP_WRITE : 0); -#ifdef VLC_WINSTORE_APP +#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) hMap = CreateFileMappingFromApp(handle, NULL, prot, length, NULL); if (hMap != INVALID_HANDLE_VALUE) addr = MapViewOfFileFromApp(hMap, access, 0, length);
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/src/misc/update.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/src/misc/update.c
Changed
@@ -733,7 +733,7 @@ psz_msg ); if(answer == 1) { -#ifndef VLC_WINSTORE_APP +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) wchar_t psz_wdestfileMAX_PATH; MultiByteToWideChar( CP_UTF8, 0, psz_destfile, -1, psz_wdestfile, MAX_PATH ); answer = (int)ShellExecuteW( NULL, L"open", psz_wdestfile, NULL, NULL, SW_SHOW);
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/src/missing.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/src/missing.c
Changed
@@ -274,10 +274,18 @@ } #endif +#if !defined(_WIN32) +# define HAVE_WEAK_SPAWN +#else +# if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) +# define HAVE_WEAK_SPAWN +# endif +#endif + +#ifdef HAVE_WEAK_SPAWN #include <errno.h> #include <vlc_spawn.h> -#if !defined(_WIN32) || defined(VLC_WINSTORE_APP) VLC_WEAK int vlc_spawn(pid_t *pid, const char *file, const int *fds, const char *const *args)
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/src/modules/bank.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/src/modules/bank.c
Changed
@@ -553,6 +553,12 @@ free(bank.plugins); } +#if defined(_WIN32) +# if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) +# define HAVE_FORCED_PLUGINS +# endif +#endif + /** * Enumerates all dynamic plug-ins that can be found. * @@ -573,7 +579,7 @@ if (var_InheritBool(p_this, "reset-plugins-cache")) mode = (mode | CACHE_WRITE_FILE) & ~CACHE_READ_FILE; -#ifdef VLC_WINSTORE_APP +#ifdef HAVE_FORCED_PLUGINS /* Windows Store Apps can not load external plugins with absolute paths. */ AllocatePluginPath (p_this, "plugins", mode); #else @@ -585,7 +591,7 @@ AllocatePluginPath(p_this, vlcpath, mode); free(vlcpath); } -#endif /* VLC_WINSTORE_APP */ +#endif /* If the user provided a plugin path, we add it to the list */ paths = getenv( "VLC_PLUGIN_PATH" );
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/src/win32/filesystem.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/src/win32/filesystem.c
Changed
@@ -143,9 +143,6 @@ char *vlc_getcwd (void) { -#ifdef VLC_WINSTORE_APP - return NULL; -#else wchar_t *wdir = _wgetcwd (NULL, 0); if (wdir == NULL) return NULL; @@ -153,7 +150,6 @@ char *dir = FromWide (wdir); free (wdir); return dir; -#endif } struct vlc_DIR
View file
_service:obs_scm:vlc-beta-20230512.46e494fcc3.obscpio/src/win32/thread.c -> _service:obs_scm:vlc-beta-20230524.693854c7b9.obscpio/src/win32/thread.c
Changed
@@ -339,11 +339,7 @@ /*** Threads ***/ static -#ifdef VLC_WINSTORE_APP -DWORD -#else // !VLC_WINSTORE_APP unsigned -#endif // !VLC_WINSTORE_APP __stdcall vlc_entry (void *p) { struct vlc_thread *th = p; @@ -370,15 +366,11 @@ th->cleaners = NULL; HANDLE h; -#ifdef VLC_WINSTORE_APP - h = CreateThread(NULL, 0, vlc_entry, th, 0, NULL); -#else // !VLC_WINSTORE_APP /* When using the MSVCRT C library you have to use the _beginthreadex * function instead of CreateThread, otherwise you'll end up with * memory leaks and the signal functions not working (see Microsoft * Knowledge Base, article 104641) */ h = (HANDLE)(uintptr_t) _beginthreadex (NULL, 0, vlc_entry, th, 0, NULL); -#endif // !VLC_WINSTORE_APP if (h == 0) { int err = errno; @@ -473,11 +465,7 @@ p->proc (p->data); th->data = VLC_THREAD_CANCELED; -#ifdef VLC_WINSTORE_APP - ExitThread(0); -#else // !VLC_WINSTORE_APP _endthreadex(0); -#endif // !VLC_WINSTORE_APP } void vlc_testcancel (void)
View file
_service:obs_scm:vlc-beta.obsinfo
Changed
@@ -1,4 +1,4 @@ name: vlc-beta -version: 20230512.46e494fcc3 -mtime: 1683907356 -commit: 46e494fcc31b0a433d609b5d96c08cf37b0223c7 +version: 20230524.693854c7b9 +mtime: 1684914537 +commit: 693854c7b926f00979c169dd6903da22e10b6e85
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
.