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