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 5
vlc-beta.spec
Changed
x
1
2
Source1: %name.changes
3
Source3: %name-rpmlintrc
4
Patch0: vlc-beta.patch
5
-Patch1: vlc.a52dec.patch
6
-Patch2: vlc.hostname.patch
7
8
%ifarch x86_64 aarch64
9
Requires: libqtquickcontrols2plugin.so()(64bit)
10
11
BuildRequires: pkgconfig(libswscale) >= 5
12
BuildRequires: pkgconfig(libpostproc) >= 55
13
BuildRequires: pkgconfig(faad2)
14
-%if 0%{?suse_version} > 1500
15
BuildRequires: pkgconfig(rav1e)
16
-%endif
17
-BuildRequires: pkgconfig(dav1d) >= 0.5.0
18
+BuildRequires: pkgconfig(dav1d) >= 1.0.0
19
BuildRequires: pkgconfig(vpx) >= 1.5.0
20
BuildRequires: pkgconfig(twolame)
21
%if %{with fdk_aac}
22
23
--enable-postproc \
24
--enable-faad \
25
--disable-aom \
26
-%if 0%{?suse_version} > 1500
27
--enable-rav1e \
28
-%endif
29
--enable-dav1d \
30
- --disable-vpx \
31
--enable-vpx \
32
--enable-twolame \
33
%if %{with fdk_aac}
34
vlc-beta.patch
Changed
96
1
2
-control/cli/cli.c: In function 'Run':
3
-control/cli/cli.c:541:1: error: no return statement in function returning non-void -Werror=return-type
4
-
5
--- a/configure.ac
6
+++ b/configure.ac
7
-@@ -2105,7 +2105,7 @@ AS_IF(test "$SYS" = "linux" -a "${enabl
8
+@@ -10,7 +10,7 @@ VERSION_EXTRA=0
9
+ VERSION_DEV=dev
10
+
11
+ # libvlc .so version values
12
+-LIBVLC_ABI_MAJOR=12
13
++LIBVLC_ABI_MAJOR=123
14
+ LIBVLC_ABI_MINOR=0
15
+ LIBVLC_ABI_MICRO=0
16
+
17
+@@ -2054,7 +2054,7 @@ AS_IF(test "$SYS" = "linux" -a "${enable_linsys}" != "no",
18
dnl
19
dnl dvdread module: check for libdvdread
20
dnl
21
22
23
dnl
24
dnl libdvdnav plugin
25
-@@ -2443,7 +2443,7 @@ AC_ARG_ENABLE(mod,
26
+@@ -2369,7 +2369,7 @@ AC_ARG_ENABLE(mod,
27
AS_HELP_STRING(--disable-mod,
28
do not use libmodplug (default auto)))
29
if test "${enable_mod}" != "no" ; then
30
31
VLC_ADD_PLUGIN(mod)
32
VLC_ADD_CXXFLAGS(mod,$LIBMODPLUG_CFLAGS)
33
VLC_ADD_CFLAGS(mod,$LIBMODPLUG_CFLAGS) #modules/demux/mod.c needs CFLAGS_mod, not CXXFLAGS_mod
34
+@@ -4658,7 +4658,7 @@ AS_IF(test -z "$VLC_COMPILE_HOST",
35
+ VLC_COMPILE_HOST=`hostname -f 2>/dev/null || hostname`
36
+ )
37
+ AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, "$VLC_COMPILE_HOST", host which ran configure)
38
+-AC_DEFINE_UNQUOTED(VLC_COMPILER, "`$CC -v 2>&1 | tail -n 1 | sed -e 's/ *$//'`", compiler)
39
++AC_DEFINE_UNQUOTED(VLC_COMPILER, "gcc", compiler)
40
+ dnl
41
+ dnl Handle substvars that use $(top_srcdir)
42
+ dnl
43
+--- a/include/vlc/libvlc_version.h
44
++++ b/include/vlc/libvlc_version.h
45
+@@ -54,7 +54,7 @@
46
+
47
+
48
+ /** LibVLC ABI major version number, updated when incompatible changes are added */
49
+-# define LIBVLC_ABI_VERSION_MAJOR (12)
50
++# define LIBVLC_ABI_VERSION_MAJOR (123)
51
+
52
+ /** LibVLC ABI minor version number, updated when compatible changes are added */
53
+ # define LIBVLC_ABI_VERSION_MINOR (0)
54
+--- a/modules/codec/a52.c
55
++++ b/modules/codec/a52.c
56
+@@ -300,7 +300,7 @@ static int Open( vlc_object_t *p_this )
57
+ p_sys->i_flags |= A52_ADJUST_LEVEL;
58
+
59
+ /* Initialize liba52 */
60
+- p_sys->p_liba52 = a52_init( 0 );
61
++ p_sys->p_liba52 = a52_init();
62
+ if( p_sys->p_liba52 == NULL )
63
+ {
64
+ msg_Err( p_this, "unable to initialize liba52" );
65
--- a/modules/control/cli/cli.c
66
+++ b/modules/control/cli/cli.c
67
-@@ -529,9 +529,8 @@ static void cli_client_delete(struct cli
68
+@@ -537,9 +537,8 @@ static void cli_client_delete(struct cli_client *cl)
69
free(cl);
70
}
71
72
73
intf_sys_t *sys = intf->p_sys;
74
75
vlc_thread_set_name("vlc-cli-server");
76
-@@ -566,6 +565,13 @@ static void *Run(void *data)
77
+@@ -576,6 +575,13 @@ static void *Run(void *data)
78
}
79
}
80
81
82
#else
83
static void msg_vprint(intf_thread_t *p_intf, const char *psz_fmt, va_list args)
84
{
85
+--- a/src/Makefile.am
86
++++ b/src/Makefile.am
87
+@@ -559,7 +559,7 @@ libvlccore_la_LDFLAGS = \
88
+ $(LDFLAGS_libvlccore) \
89
+ -no-undefined \
90
+ -export-symbols $(srcdir)/libvlccore.sym \
91
+- -version-info 9:0:0
92
++ -version-info 123:0:0
93
+ libvlccore_la_DEPENDENCIES = libvlccore.sym
94
+ if HAVE_WIN32
95
+ libvlccore_la_DEPENDENCIES += libvlccore_win32_rc.$(OBJEXT)
96
vlc.a52dec.patch
Deleted
13
1
2
---- a/modules/codec/a52.c
3
-+++ b/modules/codec/a52.c
4
-@@ -302,7 +302,7 @@ static int Open( vlc_object_t *p_this )
5
- p_sys->i_flags |= A52_ADJUST_LEVEL;
6
-
7
- /* Initialize liba52 */
8
-- p_sys->p_liba52 = a52_init( 0 );
9
-+ p_sys->p_liba52 = a52_init();
10
- if( p_sys->p_liba52 == NULL )
11
- {
12
- msg_Err( p_this, "unable to initialize liba52" );
13
vlc.hostname.patch
Deleted
13
1
2
---- a/configure.ac
3
-+++ b/configure.ac
4
-@@ -4208,7 +4208,7 @@ AC_SUBST(VERSION_MINOR)
5
- VLC_COMPILE_HOST=`hostname -f 2>/dev/null || hostname`
6
- )
7
- AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, "$VLC_COMPILE_HOST", host which ran configure)
8
--AC_DEFINE_UNQUOTED(VLC_COMPILER, "`$CC -v 2>&1 | tail -n 1 | sed -e 's/ *$//'`", compiler)
9
-+AC_DEFINE_UNQUOTED(VLC_COMPILER, "gcc", compiler)
10
- dnl
11
- dnl Handle substvars that use $(top_srcdir)
12
- dnl
13
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/access/dshow/vlc_dshow.h
Deleted
201
1
2
-/*****************************************************************************
3
- * vlc_dshow.h : DirectShow access module for vlc
4
- *****************************************************************************
5
- * Copyright (C) 2002, 2004, 2010-2011 VLC authors and VideoLAN
6
- *
7
- * Author: Gildas Bazin <gbazin@videolan.org>
8
- *
9
- * This program is free software; you can redistribute it and/or modify it
10
- * under the terms of the GNU Lesser General Public License as published by
11
- * the Free Software Foundation; either version 2.1 of the License, or
12
- * (at your option) any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- * GNU Lesser General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU Lesser General Public License
20
- * along with this program; if not, write to the Free Software Foundation,
21
- * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22
- *****************************************************************************/
23
-
24
-/*****************************************************************************
25
- * Preamble
26
- *****************************************************************************/
27
-#ifndef VLC_DSHOW_H
28
-#define VLC_DSHOW_H
29
-
30
-#ifdef __MINGW32__
31
-# include <_mingw.h>
32
-#endif
33
-
34
-#include <wtypes.h>
35
-#include <unknwn.h>
36
-#include <ole2.h>
37
-#include <limits.h>
38
-#include <strmif.h>
39
-#include <ksmedia.h>
40
-#include <wmcodecdsp.h>
41
-#include <ddraw.h>
42
-
43
-#ifndef __MINGW64_VERSION_MAJOR
44
-
45
-#include <dshow.h>
46
-
47
-namespace dshow {
48
-
49
-/*****************************************************************************
50
- * DirectShow GUIDs.
51
- *****************************************************************************/
52
-
53
-/* IAM */
54
-DEFINE_GUID(IID_IAMBufferNegotiation ,0x56ed71a0, 0xaf5f, 0x11d0, 0xb3, 0xf0, 0x00, 0xaa, 0x00, 0x37, 0x61, 0xc5);
55
-DEFINE_GUID(IID_IAMTVAudio ,0x83EC1C30, 0x23D1, 0x11d1, 0x99, 0xE6, 0x00, 0xA0, 0xC9, 0x56, 0x02, 0x66);
56
-DEFINE_GUID(IID_IAMCrossbar ,0xC6E13380, 0x30AC, 0x11d0, 0xA1, 0x8C, 0x00, 0xA0, 0xC9, 0x11, 0x89, 0x56);
57
-DEFINE_GUID(IID_IAMTVTuner ,0x211A8766, 0x03AC, 0x11d1, 0x8D, 0x13, 0x00, 0xAA, 0x00, 0xBD, 0x83, 0x39);
58
-
59
-/* Video Format
60
-MEDIASUBTYPEs and FORMAT */
61
-DEFINE_GUID(MEDIASUBTYPE_ARGB32 ,0x773c9ac0, 0x3274, 0x11d0, 0xb7, 0x24, 0x0, 0xaa, 0x0, 0x6c, 0x1a, 0x1);
62
-/* Packed YUV formats */
63
-DEFINE_GUID(MEDIASUBTYPE_YUYV ,0x56595559, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
64
-/* Planar YUV formats */
65
-DEFINE_GUID(MEDIASUBTYPE_IYUV ,0x56555949, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); /* identical to YV12 */
66
-DEFINE_GUID(MEDIASUBTYPE_I420 ,0x30323449, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
67
-/* MPEG2 formats */
68
-DEFINE_GUID(MEDIASUBTYPE_MPEG2_VIDEO ,0xe06d8026, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea);
69
-DEFINE_GUID(MEDIASUBTYPE_MPEG2_PROGRAM ,0xe06d8022, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea);
70
-DEFINE_GUID(MEDIASUBTYPE_MPEG2_TRANSPORT ,0xe06d8023, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea);
71
-DEFINE_GUID(FORMAT_MPEG2Video ,0xe06d80e3, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea);
72
-
73
-/* float */
74
-DEFINE_GUID(MEDIASUBTYPE_IEEE_FLOAT ,0x00000003, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
75
-
76
-
77
-/****************************************************************************
78
- * The following should be in ks.h and ksmedia.h, but since they are not in
79
- * the current version of Mingw, we will be defined here.
80
- ****************************************************************************/
81
-
82
-/* http://msdn.microsoft.com/en-us/library/ff567297%28VS.85%29.aspx */
83
-typedef enum {
84
- KS_AnalogVideo_None = 0x00000000,
85
- KS_AnalogVideo_NTSC_M = 0x00000001,
86
- KS_AnalogVideo_NTSC_M_J = 0x00000002,
87
- KS_AnalogVideo_NTSC_433 = 0x00000004,
88
- KS_AnalogVideo_PAL_B = 0x00000010,
89
- KS_AnalogVideo_PAL_D = 0x00000020,
90
- KS_AnalogVideo_PAL_G = 0x00000040,
91
- KS_AnalogVideo_PAL_H = 0x00000080,
92
- KS_AnalogVideo_PAL_I = 0x00000100,
93
- KS_AnalogVideo_PAL_M = 0x00000200,
94
- KS_AnalogVideo_PAL_N = 0x00000400,
95
- KS_AnalogVideo_PAL_60 = 0x00000800,
96
- KS_AnalogVideo_SECAM_B = 0x00001000,
97
- KS_AnalogVideo_SECAM_D = 0x00002000,
98
- KS_AnalogVideo_SECAM_G = 0x00004000,
99
- KS_AnalogVideo_SECAM_H = 0x00008000,
100
- KS_AnalogVideo_SECAM_K = 0x00010000,
101
- KS_AnalogVideo_SECAM_K1 = 0x00020000,
102
- KS_AnalogVideo_SECAM_L = 0x00040000,
103
- KS_AnalogVideo_SECAM_L1 = 0x00080000,
104
- KS_AnalogVideo_PAL_N_COMBO = 0x00100000
105
-} KS_AnalogVideoStandard;
106
-
107
-/* http://msdn.microsoft.com/en-us/library/ff567800%28VS.85%29.aspx and following */
108
-typedef enum {
109
- KSPROPERTY_TUNER_CAPS, // R -overall device capabilities
110
- KSPROPERTY_TUNER_MODE_CAPS, // R -capabilities in this mode
111
- KSPROPERTY_TUNER_MODE, // RW -set a mode (TV, FM, AM, DSS)
112
- KSPROPERTY_TUNER_STANDARD, // R -get TV standard (only if TV mode)
113
- KSPROPERTY_TUNER_FREQUENCY, // RW -set/get frequency
114
- KSPROPERTY_TUNER_INPUT, // RW -select an input
115
- KSPROPERTY_TUNER_STATUS, // R -tuning status
116
-
117
- /* Optional */
118
- KSPROPERTY_TUNER_IF_MEDIUM, // R O-Medium for IF or Transport Pin
119
-
120
- /* Mandatory for Vista and + */
121
- KSPROPERTY_TUNER_SCAN_CAPS, // R -overall device capabilities for scanning
122
-
123
- /* Optional ones */
124
- KSPROPERTY_TUNER_SCAN_STATUS, // R -status of scan
125
- KSPROPERTY_TUNER_STANDARD_MODE, // RW -autodetect mode for signal standard
126
- KSPROPERTY_TUNER_NETWORKTYPE_SCAN_CAPS // R -network type specific tuner capabilities
127
-} KSPROPERTY_TUNER;
128
-
129
-/* http://msdn.microsoft.com/en-us/library/ff567689%28v=VS.85%29.aspx */
130
-typedef enum {
131
- KS_TUNER_TUNING_EXACT = 1, // Tunes directly to the right freq
132
- KS_TUNER_TUNING_FINE, // Comprehensive search to the right freq
133
- KS_TUNER_TUNING_COARSE, // Fast search
134
-}KS_TUNER_TUNING_FLAGS;
135
-
136
-/* http://msdn.microsoft.com/en-us/library/ff567687%28v=VS.85%29.aspx */
137
-typedef enum {
138
- KS_TUNER_STRATEGY_PLL = 0X01, // Phase locked loop (PLL) offset tuning
139
- KS_TUNER_STRATEGY_SIGNAL_STRENGTH = 0X02, // Signal strength tuning
140
- KS_TUNER_STRATEGY_DRIVER_TUNES = 0X04, // Driver tunes
141
-}KS_TUNER_STRATEGY;
142
-
143
-/* http://msdn.microsoft.com/en-us/library/ff562676%28VS.85%29.aspx */
144
-typedef struct {
145
- union {
146
- struct {
147
- GUID Set;
148
- ULONG Id;
149
- ULONG Flags;
150
- };
151
- LONGLONG Alignment;
152
- };
153
-} KSIDENTIFIER, *PKSIDENTIFIER;
154
-
155
-typedef KSIDENTIFIER KSPROPERTY, *PKSPROPERTY;
156
-
157
-/* http://msdn.microsoft.com/en-us/library/ff565872%28v=VS.85%29.aspx */
158
-typedef struct {
159
- KSPROPERTY Property;
160
- ULONG Mode; // KSPROPERTY_TUNER_MODE_*
161
- ULONG StandardsSupported; // KS_AnalogVideo_* (if Mode is TV or DSS)
162
- ULONG MinFrequency; // Hz
163
- ULONG MaxFrequency; // Hz
164
- ULONG TuningGranularity; // Hz
165
- ULONG NumberOfInputs; // number of inputs
166
- ULONG SettlingTime; // milliSeconds
167
- ULONG Strategy; // KS_TUNER_STRATEGY
168
-} KSPROPERTY_TUNER_MODE_CAPS_S, *PKSPROPERTY_TUNER_MODE_CAPS_S;
169
-
170
-/* http://msdn.microsoft.com/en-us/library/ff565839%28v=VS.85%29.aspx */
171
-typedef struct {
172
- KSPROPERTY Property;
173
- ULONG Frequency; // Hz
174
- ULONG LastFrequency; // Hz (last tuned)
175
- ULONG TuningFlags; // KS_TUNER_TUNING_FLAGS
176
- ULONG VideoSubChannel; // DSS
177
- ULONG AudioSubChannel; // DSS
178
- ULONG Channel; // VBI decoders
179
- ULONG Country; // VBI decoders
180
-} KSPROPERTY_TUNER_FREQUENCY_S, *PKSPROPERTY_TUNER_FREQUENCY_S;
181
-
182
-/* http://msdn.microsoft.com/en-us/library/ff565918%28v=VS.85%29.aspx */
183
-typedef struct {
184
- KSPROPERTY Property;
185
- ULONG Standard; // KS_AnalogVideo_*
186
-} KSPROPERTY_TUNER_STANDARD_S, *PKSPROPERTY_TUNER_STANDARD_S;
187
-/* End of ks */
188
-
189
-
190
-/* Define missing interfaces from wine's header */
191
-/* http://msdn.microsoft.com/en-us/library/dd373441%28v=vs.85%29.aspx */
192
-typedef enum tagAMTunerModeType {
193
- AMTUNER_MODE_DEFAULT = 0x0000,
194
- AMTUNER_MODE_TV = 0x0001,
195
- AMTUNER_MODE_FM_RADIO = 0x0002,
196
- AMTUNER_MODE_AM_RADIO = 0x0004,
197
- AMTUNER_MODE_DSS = 0x0008
198
-} AMTunerModeType;
199
-
200
-#define AMPROPERTY_PIN_CATEGORY 0
201
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/src/preparser/preparser.h
Deleted
93
1
2
-/*****************************************************************************
3
- * preparser.h
4
- *****************************************************************************
5
- * Copyright (C) 1999-2008 VLC authors and VideoLAN
6
- *
7
- * Authors: Samuel Hocevar <sam@zoy.org>
8
- * Clément Stenac <zorglub@videolan.org>
9
- *
10
- * This program is free software; you can redistribute it and/or modify it
11
- * under the terms of the GNU Lesser General Public License as published by
12
- * the Free Software Foundation; either version 2.1 of the License, or
13
- * (at your option) any later version.
14
- *
15
- * This program is distributed in the hope that it will be useful,
16
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
- * GNU Lesser General Public License for more details.
19
- *
20
- * You should have received a copy of the GNU Lesser General Public License
21
- * along with this program; if not, write to the Free Software Foundation,
22
- * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23
- *****************************************************************************/
24
-
25
-#ifndef _INPUT_PREPARSER_H
26
-#define _INPUT_PREPARSER_H 1
27
-
28
-#include <vlc_input_item.h>
29
-/**
30
- * Preparser opaque structure.
31
- *
32
- * The preparser object will retrieve the meta data of any given input item in
33
- * an asynchronous way.
34
- * It will also issue art fetching requests.
35
- */
36
-typedef struct input_preparser_t input_preparser_t;
37
-
38
-/**
39
- * This function creates the preparser object and thread.
40
- */
41
-input_preparser_t *input_preparser_New( vlc_object_t * );
42
-
43
-/**
44
- * This function enqueues the provided item to be preparsed.
45
- *
46
- * The input item is retained until the preparsing is done or until the
47
- * preparser object is deleted.
48
- *
49
- * @param timeout maximum time allowed to preparse the item. If -1, the default
50
- * "preparse-timeout" option will be used as a timeout. If 0, it will wait
51
- * indefinitely. If > 0, the timeout will be used (in milliseconds).
52
- * @param id unique id provided by the caller. This is can be used to cancel
53
- * the request with input_preparser_Cancel()
54
- * @returns VLC_SUCCESS if the item was scheduled for preparsing, an error code
55
- * otherwise
56
- * If this returns an error, the on_preparse_ended will *not* be invoked
57
- */
58
-int input_preparser_Push( input_preparser_t *, input_item_t *,
59
- input_item_meta_request_option_t,
60
- const input_preparser_callbacks_t *cbs,
61
- void *cbs_userdata,
62
- int timeout, void *id );
63
-
64
-void input_preparser_fetcher_Push( input_preparser_t *, input_item_t *,
65
- input_item_meta_request_option_t,
66
- const input_fetcher_callbacks_t *cbs,
67
- void *cbs_userdata );
68
-
69
-/**
70
- * This function cancel all preparsing requests for a given id
71
- *
72
- * @param id unique id given to input_preparser_Push()
73
- */
74
-void input_preparser_Cancel( input_preparser_t *, void *id );
75
-
76
-/**
77
- * This function destroys the preparser object and thread.
78
- *
79
- * All pending input items will be released.
80
- */
81
-void input_preparser_Delete( input_preparser_t * );
82
-
83
-/**
84
- * This function deactivates the preparser
85
- *
86
- * All pending requests will be removed, and it will block until the currently
87
- * running entity has finished (if any).
88
- */
89
-void input_preparser_Deactivate( input_preparser_t * );
90
-
91
-#endif
92
-
93
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/compat/aligned_alloc.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/compat/aligned_alloc.c
Changed
12
1
2
3
#elif defined(HAVE_MEMALIGN)
4
return memalign(align, size);
5
-#elif defined (_WIN32) && defined(__MINGW32__)
6
- return __mingw_aligned_malloc(size, align);
7
-#elif defined (_WIN32) && defined(_MSC_VER)
8
+#elif defined (_WIN32)
9
return _aligned_malloc(size, align);
10
#else
11
/* align must be valid/supported */
12
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/contrib/src/rav1e/SHA512SUMS -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/contrib/src/rav1e/SHA512SUMS
Changed
4
1
2
-c3c2717103ba87264550fd5bebfd36ffaab00325f764dadd8229bc9aae6fe4e5ef195da23a263e2e4d8505f8b690dd440346b014a4c556428fe8fac5fb64eaa5 rav1e-0.6.3.tar.gz
3
+49c003e2ab978072467264cfd0d4f10b4ada486785d53fd58ab3a1e69392b2547634c8d024802634f59a4d635ed5d08c3d988726f21f9c69271d5fbfe8706291 rav1e-0.6.4.tar.gz
4
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/contrib/src/rav1e/rules.mak -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/contrib/src/rav1e/rules.mak
Changed
9
1
2
# rav1e
3
4
-RAV1E_VERSION := 0.6.3
5
+RAV1E_VERSION := 0.6.4
6
RAV1E_URL := https://crates.io/api/v1/crates/rav1e/$(RAV1E_VERSION)/download
7
8
ifdef BUILD_RUST
9
_service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/contrib/src/soxr/aarch64.patch
Added
23
1
2
+diff --git a/cmake/Modules/FindSIMD32.cmake b/cmake/Modules/FindSIMD32.cmake
3
+index 9e4237358f..580e9ca87b 100644
4
+--- a/cmake/Modules/FindSIMD32.cmake
5
++++ b/cmake/Modules/FindSIMD32.cmake
6
+@@ -24,6 +24,16 @@ elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
7
+ return !vgetq_lane_u32(vceqq_f32(a,b),0);
8
+ }
9
+ ")
10
++elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
11
++ set (TRIAL_C_FLAGS
12
++ " ")
13
++ set (TEST_C_SOURCE "
14
++ #include <arm_neon.h>
15
++ int main(int c, char * * v) {
16
++ float32x4_t a = vdupq_n_f32((float)c), b = vdupq_n_f32((float)!!v);
17
++ return !vgetq_lane_u32(vceqq_f32(a,b),0);
18
++ }
19
++ ")
20
+ else ()
21
+ if (WIN32) # Safety for when mixed lib/app compilers (but performance hit)
22
+ set (GCC_WIN32_SIMD32_OPTS "-mincoming-stack-boundary=2")
23
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/contrib/src/soxr/rules.mak -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/contrib/src/soxr/rules.mak
Changed
9
1
2
$(APPLY) $(SRC)/soxr/0004-arm-fix-SIGILL-when-doing-divisions-on-some-old-arch.patch
3
$(APPLY) $(SRC)/soxr/find_ff_pkgconfig.patch
4
$(APPLY) $(SRC)/soxr/soxr-check-function.patch
5
+ $(APPLY) $(SRC)/soxr/aarch64.patch
6
$(call pkg_static,"src/soxr.pc.in")
7
$(MOVE)
8
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/doc/libvlc/d3d11_player.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/doc/libvlc/d3d11_player.cpp
Changed
10
1
2
#include <windows.h>
3
#include <d3d11.h>
4
#include <d3dcompiler.h>
5
-#include <assert.h>
6
+#include <cassert>
7
8
#include <d3d11_1.h>
9
#include <dxgi1_2.h>
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/extras/ci/gitlab-ci.yml -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/extras/ci/gitlab-ci.yml
Changed
9
1
2
after_script:
3
- export VLC_CONTRIB_SHA="$(extras/ci/get-contrib-sha.sh)"
4
- mv extras/package/snap/parts/vlc/build/contrib/vlc-contrib-*.tar.bz2 contrib/vlc-contrib-${TRIPLET}-${VLC_CONTRIB_SHA}.tar.bz2 2>/dev/null || true
5
+ allow_failure: true
6
variables: *variables-snap
7
8
snap:
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/extras/package/apple/build.sh -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/extras/package/apple/build.sh
Changed
9
1
2
done
3
4
printf "\
5
-#include \"config.h\"\\n\
6
#include <vlc_common.h>\\n\
7
#include <vlc_plugin.h>\\n\
8
%b\\n\
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/extras/package/macosx/VLC.xcodeproj/project.pbxproj -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/extras/package/macosx/VLC.xcodeproj/project.pbxproj
Changed
97
1
2
5317FE04294E3DD3001702F0 /* VLCLibraryCollectionViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5317FE03294E3DD3001702F0 /* VLCLibraryCollectionViewDelegate.m */; };
3
5325C57D29302E6800B2B63A /* VLCLibraryAudioViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5325C57B29302E6800B2B63A /* VLCLibraryAudioViewController.m */; };
4
534E8E3A29A06325009503F8 /* VLCMainVideoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 534E8E3929A06325009503F8 /* VLCMainVideoViewController.m */; };
5
+ 5352B37329DF29BF0011CE03 /* VLCMainVideoViewControlsBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 5352B37229DF29BF0011CE03 /* VLCMainVideoViewControlsBar.m */; };
6
+ 5352B37629E149AC0011CE03 /* VLCLibraryWindowPersistentPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 5352B37529E149AC0011CE03 /* VLCLibraryWindowPersistentPreferences.m */; };
7
5362550D293FD639005D64FA /* VLCLibraryWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5362550C293FD639005D64FA /* VLCLibraryWindowController.m */; };
8
536283F0291146BC00640C15 /* VLCLibraryTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 536283DE291146BC00640C15 /* VLCLibraryTableView.m */; };
9
536283F1291146BC00640C15 /* VLCLibraryAlbumTracksDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 536283DF291146BC00640C15 /* VLCLibraryAlbumTracksDataSource.m */; };
10
11
538A7EDA29A63EE40068AD4F /* VLCFullVideoViewWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 538A7ED929A63EE40068AD4F /* VLCFullVideoViewWindow.m */; };
12
53903D3A29576ED500D0B308 /* VLCLibraryAudioGroupDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 53903D3929576ED500D0B308 /* VLCLibraryAudioGroupDataSource.m */; };
13
539BA79F298C726200918C36 /* VLCAspectRatioRetainingVideoWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 539BA79E298C726200918C36 /* VLCAspectRatioRetainingVideoWindow.m */; };
14
+ 539F114B29E83A4200F13460 /* VLCLibraryTwoPaneSplitViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 539F114A29E83A4200F13460 /* VLCLibraryTwoPaneSplitViewDelegate.m */; };
15
53B447CA2939823E00857588 /* VLCLibrarySongsTableViewSongPlayingTableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 53B447C92939823E00857588 /* VLCLibrarySongsTableViewSongPlayingTableCellView.m */; };
16
53B447F6293BB47B00857588 /* VLCLibraryVideoCollectionViewContainerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 53B447EC293BB47A00857588 /* VLCLibraryVideoCollectionViewContainerView.m */; };
17
53B447F7293BB47B00857588 /* VLCLibraryVideoCollectionViewContainerViewDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 53B447ED293BB47A00857588 /* VLCLibraryVideoCollectionViewContainerViewDataSource.m */; };
18
19
534E8E3729A04F95009503F8 /* VLCMainVideoView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = VLCMainVideoView.xib; sourceTree = "<group>"; };
20
534E8E3829A06325009503F8 /* VLCMainVideoViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCMainVideoViewController.h; sourceTree = "<group>"; };
21
534E8E3929A06325009503F8 /* VLCMainVideoViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCMainVideoViewController.m; sourceTree = "<group>"; };
22
+ 5352B37129DF29BF0011CE03 /* VLCMainVideoViewControlsBar.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCMainVideoViewControlsBar.h; sourceTree = "<group>"; };
23
+ 5352B37229DF29BF0011CE03 /* VLCMainVideoViewControlsBar.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCMainVideoViewControlsBar.m; sourceTree = "<group>"; };
24
+ 5352B37429E149AC0011CE03 /* VLCLibraryWindowPersistentPreferences.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryWindowPersistentPreferences.h; sourceTree = "<group>"; };
25
+ 5352B37529E149AC0011CE03 /* VLCLibraryWindowPersistentPreferences.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryWindowPersistentPreferences.m; sourceTree = "<group>"; };
26
5362550B293FD639005D64FA /* VLCLibraryWindowController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryWindowController.h; sourceTree = "<group>"; };
27
5362550C293FD639005D64FA /* VLCLibraryWindowController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryWindowController.m; sourceTree = "<group>"; };
28
536283DC291146BC00640C15 /* VLCLibraryAlbumTracksDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCLibraryAlbumTracksDataSource.h; sourceTree = "<group>"; };
29
30
53903D3929576ED500D0B308 /* VLCLibraryAudioGroupDataSource.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryAudioGroupDataSource.m; sourceTree = "<group>"; };
31
539BA79D298C726200918C36 /* VLCAspectRatioRetainingVideoWindow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCAspectRatioRetainingVideoWindow.h; sourceTree = "<group>"; };
32
539BA79E298C726200918C36 /* VLCAspectRatioRetainingVideoWindow.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCAspectRatioRetainingVideoWindow.m; sourceTree = "<group>"; };
33
+ 539F114929E83A4200F13460 /* VLCLibraryTwoPaneSplitViewDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryTwoPaneSplitViewDelegate.h; sourceTree = "<group>"; };
34
+ 539F114A29E83A4200F13460 /* VLCLibraryTwoPaneSplitViewDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryTwoPaneSplitViewDelegate.m; sourceTree = "<group>"; };
35
53B447C82939823E00857588 /* VLCLibrarySongsTableViewSongPlayingTableCellView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibrarySongsTableViewSongPlayingTableCellView.h; sourceTree = "<group>"; };
36
53B447C92939823E00857588 /* VLCLibrarySongsTableViewSongPlayingTableCellView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibrarySongsTableViewSongPlayingTableCellView.m; sourceTree = "<group>"; };
37
53B447EC293BB47A00857588 /* VLCLibraryVideoCollectionViewContainerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryVideoCollectionViewContainerView.m; sourceTree = "<group>"; };
38
39
53ED472A29C8FF9D00795DB1 /* VLCLibraryAlbumTracksTableViewDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryAlbumTracksTableViewDelegate.m; sourceTree = "<group>"; };
40
53ED472C29C907C200795DB1 /* VLCLibraryVideoTableViewDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryVideoTableViewDelegate.h; sourceTree = "<group>"; };
41
53ED472D29C907C200795DB1 /* VLCLibraryVideoTableViewDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryVideoTableViewDelegate.m; sourceTree = "<group>"; };
42
- 53ED473729CAF67F00795DB1 /* VLCLibraryTableCellViewProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryTableCellViewProtocol.h; sourceTree = "<group>"; };
43
53ED473429CA4F3400795DB1 /* VLCLibraryTableViewDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryTableViewDelegate.h; sourceTree = "<group>"; };
44
53ED473529CA4F3400795DB1 /* VLCLibraryTableViewDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryTableViewDelegate.m; sourceTree = "<group>"; };
45
+ 53ED473729CAF67F00795DB1 /* VLCLibraryTableCellViewProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryTableCellViewProtocol.h; sourceTree = "<group>"; };
46
53ED473A29CBC64200795DB1 /* NSPasteboardItem+VLCAdditions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSPasteboardItem+VLCAdditions.h"; sourceTree = "<group>"; };
47
53ED473B29CBC64200795DB1 /* NSPasteboardItem+VLCAdditions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSPasteboardItem+VLCAdditions.m"; sourceTree = "<group>"; };
48
53F0E92B299B002300491D49 /* VLCInputNodePathControlItem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCInputNodePathControlItem.h; sourceTree = "<group>"; };
49
50
children = (
51
1C1ED51D2205AC6B00811EC0 /* VLCControlsBarCommon.h */,
52
E0382C01160BA09E0031D7FF /* VLCControlsBarCommon.m */,
53
+ 5352B37129DF29BF0011CE03 /* VLCMainVideoViewControlsBar.h */,
54
+ 5352B37229DF29BF0011CE03 /* VLCMainVideoViewControlsBar.m */,
55
7D5678EE1D5BA397002698F3 /* VLCMainWindowControlsBar.h */,
56
7D5678EF1D5BA397002698F3 /* VLCMainWindowControlsBar.m */,
57
);
58
59
536283DE291146BC00640C15 /* VLCLibraryTableView.m */,
60
53ED473429CA4F3400795DB1 /* VLCLibraryTableViewDelegate.h */,
61
53ED473529CA4F3400795DB1 /* VLCLibraryTableViewDelegate.m */,
62
+ 539F114929E83A4200F13460 /* VLCLibraryTwoPaneSplitViewDelegate.h */,
63
+ 539F114A29E83A4200F13460 /* VLCLibraryTwoPaneSplitViewDelegate.m */,
64
7D713D302201AE350042BEB7 /* VLCLibraryWindow.h */,
65
7D713D312201AE350042BEB7 /* VLCLibraryWindow.m */,
66
5362550B293FD639005D64FA /* VLCLibraryWindowController.h */,
67
5362550C293FD639005D64FA /* VLCLibraryWindowController.m */,
68
+ 5352B37429E149AC0011CE03 /* VLCLibraryWindowPersistentPreferences.h */,
69
+ 5352B37529E149AC0011CE03 /* VLCLibraryWindowPersistentPreferences.m */,
70
5317FE02294E3DD3001702F0 /* VLCLibraryCollectionViewDelegate.h */,
71
5317FE03294E3DD3001702F0 /* VLCLibraryCollectionViewDelegate.m */,
72
5317FE05294E8D1A001702F0 /* VLCLibraryCollectionViewDataSource.h */,
73
74
7D61DCE4236C1937008133CF /* VLCCustomWindowButton.m in Sources */,
75
7DFFF90123682D4800C8B0C9 /* VLCDetachedAudioWindow.m in Sources */,
76
7D66D4392200C5B80040D04A /* VLCVideoFilterHelper.m in Sources */,
77
+ 5352B37329DF29BF0011CE03 /* VLCMainVideoViewControlsBar.m in Sources */,
78
7D445D812202524000263D34 /* VLCPlaylistController.m in Sources */,
79
7DFBDCBE226CED7200B700A5 /* VLCMediaSource.m in Sources */,
80
536283F2291146BC00640C15 /* VLCLibraryCollectionViewAlbumSupplementaryDetailView.m in Sources */,
81
82
7DD2F5C52081B73B007EE187 /* VLCRemoteControlService.m in Sources */,
83
1C31139F1E508C6900D4DD76 /* VLCMainWindowControlsBar.m in Sources */,
84
1C3113A11E508C6900D4DD76 /* VLCConvertAndSaveWindowController.m in Sources */,
85
+ 5352B37629E149AC0011CE03 /* VLCLibraryWindowPersistentPreferences.m in Sources */,
86
7DBB7639227F3FBC002649E1 /* VLCLibraryCollectionViewSupplementaryElementView.m in Sources */,
87
1C3113A31E508C6900D4DD76 /* VLCCoreDialogProvider.m in Sources */,
88
6B2EFC631F281A0900F3C0EA /* VLCVolumeSliderCell.m in Sources */,
89
90
6BBB05DA1EEFEA29003A1019 /* VLCHUDOutlineView.m in Sources */,
91
7D445D842202524D00263D34 /* VLCPlaylistItem.m in Sources */,
92
1C3113CF1E508C6900D4DD76 /* prefs_widgets.m in Sources */,
93
+ 539F114B29E83A4200F13460 /* VLCLibraryTwoPaneSplitViewDelegate.m in Sources */,
94
7D0F63FF2201F63400FDB91F /* VLCPlaylistTableCellView.m in Sources */,
95
1C3113D11E508C6900D4DD76 /* prefs.m in Sources */,
96
1C3113D31E508C6900D4DD76 /* VLCResumeDialogController.m in Sources */,
97
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/extras/tools/bootstrap -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/extras/tools/bootstrap
Changed
10
1
2
check_nasm 2.14
3
check gettext
4
check help2man
5
-check meson 0.60.0
6
+check meson 1.0.0
7
check_ninja
8
9
DEPS_ONLY="help2man"
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/include/meson.build -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/include/meson.build
Changed
9
1
2
'vlc_playlist.h',
3
'vlc_playlist_export.h',
4
'vlc_plugin.h',
5
+ 'vlc_preparser.h',
6
'vlc_probe.h',
7
'vlc_rand.h',
8
'vlc_renderer_discovery.h',
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/include/vlc/libvlc_media.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/include/vlc/libvlc_media.h
Changed
40
1
2
/**
3
* Parse media if it's a local file
4
*/
5
- libvlc_media_parse_local = 0x00,
6
+ libvlc_media_parse_local = 0x01,
7
/**
8
* Parse media even if it's a network file
9
*/
10
- libvlc_media_parse_network = 0x01,
11
+ libvlc_media_parse_network = 0x02,
12
+ /**
13
+ * Force parsing the media even if it would be skipped.
14
+ */
15
+ libvlc_media_parse_forced = 0x04,
16
/**
17
* Fetch meta and cover art using local resources
18
*/
19
- libvlc_media_fetch_local = 0x02,
20
+ libvlc_media_fetch_local = 0x08,
21
/**
22
* Fetch meta and cover art using network resources
23
*/
24
- libvlc_media_fetch_network = 0x04,
25
+ libvlc_media_fetch_network = 0x10,
26
/**
27
* Interact with the user (via libvlc_dialog_cbs) when preparsing this item
28
* (and not its sub items). Set this flag in order to receive a callback
29
* when the input is asking for credentials.
30
*/
31
- libvlc_media_do_interact = 0x08,
32
- /**
33
- * Force parsing the media even if it would be skipped.
34
- */
35
- libvlc_media_no_skip = 0x10,
36
+ libvlc_media_do_interact = 0x20,
37
} libvlc_media_parse_flag_t;
38
39
/**
40
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/include/vlc_block.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/include/vlc_block.h
Changed
9
1
2
#define vlc_block_callbacks vlc_frame_callbacks
3
4
#define block_Init vlc_frame_Init
5
+#define block_New vlc_frame_New
6
#define block_Alloc vlc_frame_Alloc
7
#define block_TryRealloc vlc_frame_TryRealloc
8
#define block_Realloc vlc_frame_Realloc
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/include/vlc_fixups.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/include/vlc_fixups.h
Changed
96
1
2
3
/* C++11 says there's no need to define __STDC_*_MACROS when including
4
* inttypes.h and stdint.h. */
5
-#if defined (__cplusplus) && (defined(__MINGW32__) || defined(__UCLIBC__))
6
+#if defined (__cplusplus) && defined(__UCLIBC__)
7
# ifndef __STDC_FORMAT_MACROS
8
# define __STDC_FORMAT_MACROS 1
9
# endif
10
11
} /* extern "C" */
12
#endif
13
14
-#if defined (_WIN32) && defined(__MINGW32__)
15
-#define aligned_free(ptr) __mingw_aligned_free(ptr)
16
-#elif defined (_WIN32) && defined(_MSC_VER)
17
+#if defined (_WIN32)
18
#define aligned_free(ptr) _aligned_free(ptr)
19
#else
20
#define aligned_free(ptr) free(ptr)
21
22
23
/* Socket stuff */
24
#ifndef HAVE_INET_PTON
25
+# ifdef __cplusplus
26
+}
27
+# endif
28
# ifndef _WIN32
29
# include <sys/socket.h>
30
#else
31
typedef int socklen_t;
32
# endif
33
+# ifdef __cplusplus
34
+extern "C" {
35
+# endif
36
+
37
int inet_pton(int, const char *, void *);
38
const char *inet_ntop(int, const void *, char *, socklen_t);
39
#endif
40
41
#endif
42
43
#ifndef HAVE_IF_NAMEINDEX
44
+# ifdef __cplusplus
45
+}
46
+# endif
47
#include <errno.h>
48
+# ifdef __cplusplus
49
+extern "C" {
50
+# endif
51
# ifndef HAVE_STRUCT_IF_NAMEINDEX
52
struct if_nameindex
53
{
54
55
};
56
57
# ifndef HAVE_IF_NAMETOINDEX
58
+# ifdef __cplusplus
59
+}
60
+# endif
61
# include <stdlib.h> /* a define may change from the real atoi declaration */
62
+# ifdef __cplusplus
63
+extern "C" {
64
+# endif
65
static inline int if_nametoindex(const char *name)
66
{
67
return atoi(name);
68
69
#ifdef __APPLE__
70
# define fdatasync fsync
71
72
+# ifdef __cplusplus
73
+}
74
+# endif
75
# include <time.h>
76
+# ifdef __cplusplus
77
+extern "C" {
78
+# endif
79
# ifndef TIMER_ABSTIME
80
# define TIMER_ABSTIME 0x01
81
# endif
82
83
84
#ifndef _WIN32
85
# ifndef HAVE_CLOCK_NANOSLEEP
86
+# ifdef __cplusplus
87
+}
88
+# endif
89
# include <time.h>
90
+# ifdef __cplusplus
91
+extern "C" {
92
+# endif
93
int clock_nanosleep(clockid_t clock_id, int flags,
94
const struct timespec *rqtp, struct timespec *rmtp);
95
# endif
96
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/include/vlc_fourcc.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/include/vlc_fourcc.h
Changed
9
1
2
#define VLC_CODEC_TRUEMOTION2 VLC_FOURCC('T','M','2','0')
3
#define VLC_CODEC_QTRLE VLC_FOURCC('r','l','e',' ')
4
#define VLC_CODEC_QDRAW VLC_FOURCC('q','d','r','w')
5
+#define VLC_CODEC_QOI VLC_FOURCC('q','o','i','f')
6
#define VLC_CODEC_QPEG VLC_FOURCC('Q','P','E','G')
7
#define VLC_CODEC_ULTI VLC_FOURCC('U','L','T','I')
8
#define VLC_CODEC_VIXL VLC_FOURCC('V','I','X','L')
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/include/vlc_frame.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/include/vlc_frame.h
Changed
26
1
2
void *base, size_t length);
3
4
/**
5
+ * Creates a custom frame.
6
+ *
7
+ * This function initialize a frame of timed data allocated by custom means.
8
+ * This allows passing data without copying even if the data has been allocated
9
+ * with unusual means or outside of LibVLC.
10
+ *
11
+ * Normally, frames are allocated and initialized by vlc_frame_Alloc() instead.
12
+ *
13
+ * @param cbs structure of custom callbacks to handle the frame IN
14
+ * @param base start address of the frame data
15
+ * @param length byte length of the frame data
16
+ *
17
+ * @return the created frame, or NULL on memory error.
18
+ */
19
+VLC_API vlc_frame_t *vlc_frame_New(const struct vlc_frame_callbacks *cbs,
20
+ void *base, size_t length);
21
+
22
+/**
23
* Allocates a frame.
24
*
25
* Creates a new frame with the requested size.
26
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/include/vlc_input_item.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/include/vlc_input_item.h
Changed
59
1
2
3
typedef struct input_item_opaque input_item_opaque_t;
4
typedef struct input_item_slave input_item_slave_t;
5
-typedef struct input_preparser_callbacks_t input_preparser_callbacks_t;
6
7
struct info_t
8
{
9
10
META_REQUEST_OPTION_NONE = 0x00,
11
META_REQUEST_OPTION_SCOPE_LOCAL = 0x01,
12
META_REQUEST_OPTION_SCOPE_NETWORK = 0x02,
13
- META_REQUEST_OPTION_SCOPE_ANY = 0x03,
14
- META_REQUEST_OPTION_FETCH_LOCAL = 0x04,
15
- META_REQUEST_OPTION_FETCH_NETWORK = 0x08,
16
- META_REQUEST_OPTION_FETCH_ANY = 0x0C,
17
- META_REQUEST_OPTION_DO_INTERACT = 0x10,
18
- META_REQUEST_OPTION_NO_SKIP = 0x20,
19
+ META_REQUEST_OPTION_SCOPE_ANY =
20
+ META_REQUEST_OPTION_SCOPE_LOCAL|META_REQUEST_OPTION_SCOPE_NETWORK,
21
+ META_REQUEST_OPTION_SCOPE_FORCED = 0x04,
22
+ META_REQUEST_OPTION_FETCH_LOCAL = 0x08,
23
+ META_REQUEST_OPTION_FETCH_NETWORK = 0x10,
24
+ META_REQUEST_OPTION_FETCH_ANY =
25
+ META_REQUEST_OPTION_FETCH_LOCAL|META_REQUEST_OPTION_FETCH_NETWORK,
26
+ META_REQUEST_OPTION_DO_INTERACT = 0x20,
27
} input_item_meta_request_option_t;
28
29
/* status of the on_preparse_ended() callback */
30
31
ITEM_PREPARSE_DONE
32
};
33
34
-typedef struct input_preparser_callbacks_t {
35
+struct vlc_metadata_cbs {
36
void (*on_preparse_ended)(input_item_t *, enum input_item_preparse_status status, void *userdata);
37
- void (*on_subtree_added)(input_item_t *, input_item_node_t *subtree, void *userdata);
38
-} input_preparser_callbacks_t;
39
-
40
-typedef struct input_fetcher_callbacks_t {
41
void (*on_art_fetch_ended)(input_item_t *, bool fetched, void *userdata);
42
-} input_fetcher_callbacks_t;
43
+ void (*on_subtree_added)(input_item_t *, input_item_node_t *subtree, void *userdata);
44
+};
45
46
VLC_API int libvlc_MetadataRequest( libvlc_int_t *, input_item_t *,
47
input_item_meta_request_option_t,
48
- const input_preparser_callbacks_t *cbs,
49
+ const struct vlc_metadata_cbs *cbs,
50
void *cbs_userdata,
51
int, void * );
52
-VLC_API int libvlc_ArtRequest(libvlc_int_t *, input_item_t *,
53
- input_item_meta_request_option_t,
54
- const input_fetcher_callbacks_t *cbs,
55
- void *cbs_userdata );
56
VLC_API void libvlc_MetadataCancel( libvlc_int_t *, void * );
57
58
/******************
59
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/include/vlc_picture.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/include/vlc_picture.h
Changed
18
1
2
3
#include <assert.h>
4
#include <vlc_atomic.h>
5
+#include <vlc_es.h>
6
7
#ifdef __cplusplus
8
extern "C" {
9
10
* This file defines picture structures and functions in vlc
11
*/
12
13
-#include <vlc_es.h>
14
-
15
/** Description of a planar graphic field */
16
typedef struct plane_t
17
{
18
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/include/vlc_plugin.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/include/vlc_plugin.h
Changed
10
1
2
#ifndef LIBVLC_MODULES_MACROS_H
3
# define LIBVLC_MODULES_MACROS_H 1
4
5
+#include <stdint.h>
6
+
7
/**
8
* \file
9
* This file implements plugin (module) macros used to define a vlc module.
10
_service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/include/vlc_preparser.h
Added
111
1
2
+/*****************************************************************************
3
+ * preparser.h
4
+ *****************************************************************************
5
+ * Copyright (C) 1999-2023 VLC authors and VideoLAN
6
+ *
7
+ * Authors: Samuel Hocevar <sam@zoy.org>
8
+ * Clément Stenac <zorglub@videolan.org>
9
+ *
10
+ * This program is free software; you can redistribute it and/or modify it
11
+ * under the terms of the GNU Lesser General Public License as published by
12
+ * the Free Software Foundation; either version 2.1 of the License, or
13
+ * (at your option) any later version.
14
+ *
15
+ * This program is distributed in the hope that it will be useful,
16
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
+ * GNU Lesser General Public License for more details.
19
+ *
20
+ * You should have received a copy of the GNU Lesser General Public License
21
+ * along with this program; if not, write to the Free Software Foundation,
22
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23
+ *****************************************************************************/
24
+
25
+#ifndef VLC_PREPARSER_H
26
+#define VLC_PREPARSER_H 1
27
+
28
+#include <vlc_input_item.h>
29
+
30
+/**
31
+ * @defgroup vlc_preparser Preparser
32
+ * @ingroup input
33
+ * @{
34
+ * @file
35
+ * VLC Preparser API
36
+ */
37
+
38
+/**
39
+ * Preparser opaque structure.
40
+ *
41
+ * The preparser object will retrieve the meta data of any given input item in
42
+ * an asynchronous way.
43
+ * It will also issue art fetching requests.
44
+ */
45
+typedef struct vlc_preparser_t vlc_preparser_t;
46
+
47
+/**
48
+ * This function creates the preparser object and thread.
49
+ *
50
+ * @param obj the parent object
51
+ * @return a valid preparser object or NULL in case of error
52
+ */
53
+VLC_API vlc_preparser_t *vlc_preparser_New( vlc_object_t *obj );
54
+
55
+/**
56
+ * This function enqueues the provided item to be preparsed or fetched.
57
+ *
58
+ * The input item is retained until the preparsing is done or until the
59
+ * preparser object is deleted.
60
+ *
61
+ * @param preparser the preparser object
62
+ * @param item a valid item to preparse
63
+ * @param option preparse flag, cf @ref input_item_meta_request_option_t
64
+ * @param cbs callback to listen to events (can't be NULL)
65
+ * @param cbs_userdata opaque pointer used by the callbacks
66
+ * @param timeout maximum time allowed to preparse the item. If -1, the default
67
+ * "preparse-timeout" option will be used as a timeout. If 0, it will wait
68
+ * indefinitely. If > 0, the timeout will be used (in milliseconds).
69
+ * @param id unique id provided by the caller. This is can be used to cancel
70
+ * the request with vlc_preparser_Cancel()
71
+ * @returns VLC_SUCCESS if the item was scheduled for preparsing, an error code
72
+ * otherwise
73
+ * If this returns an error, the on_preparse_ended will *not* be invoked
74
+ */
75
+VLC_API int vlc_preparser_Push( vlc_preparser_t *preparser, input_item_t *item,
76
+ input_item_meta_request_option_t option,
77
+ const struct vlc_metadata_cbs *cbs,
78
+ void *cbs_userdata,
79
+ int timeout, void *id );
80
+
81
+/**
82
+ * This function cancel all preparsing requests for a given id
83
+ *
84
+ * @param preparser the preparser object
85
+ * @param id unique id given to vlc_preparser_Push()
86
+ */
87
+VLC_API void vlc_preparser_Cancel( vlc_preparser_t *preparser, void *id );
88
+
89
+/**
90
+ * This function destroys the preparser object and thread.
91
+ *
92
+ * @param preparser the preparser object
93
+ * All pending input items will be released.
94
+ */
95
+VLC_API void vlc_preparser_Delete( vlc_preparser_t *preparser );
96
+
97
+/**
98
+ * This function deactivates the preparser
99
+ *
100
+ * All pending requests will be removed, and it will block until the currently
101
+ * running entity has finished (if any).
102
+ *
103
+ * @param preparser the preparser object
104
+ */
105
+VLC_API void vlc_preparser_Deactivate( vlc_preparser_t *preparser );
106
+
107
+/** @} vlc_preparser */
108
+
109
+#endif
110
+
111
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/include/vlc_sout.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/include/vlc_sout.h
Changed
20
1
2
#ifndef VLC_SOUT_H_
3
#define VLC_SOUT_H_
4
5
-#ifdef __cplusplus
6
-extern "C" {
7
-#endif
8
-
9
#include <sys/types.h>
10
#include <vlc_es.h>
11
#include <vlc_clock.h>
12
13
+#ifdef __cplusplus
14
+extern "C" {
15
+#endif
16
+
17
/**
18
* \defgroup sout Stream output
19
* \ingroup output
20
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/lib/media.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/lib/media.c
Changed
44
1
2
return 1;
3
}
4
5
-static const input_preparser_callbacks_t input_preparser_callbacks = {
6
+static const struct vlc_metadata_cbs preparser_callbacks = {
7
.on_preparse_ended = input_item_preparse_ended,
8
.on_subtree_added = input_item_subtree_added,
9
};
10
11
12
libvlc_int_t *libvlc = inst->p_libvlc_int;
13
input_item_t *item = media->p_input_item;
14
- input_item_meta_request_option_t parse_scope = META_REQUEST_OPTION_SCOPE_LOCAL;
15
+ input_item_meta_request_option_t parse_scope = 0;
16
int ret;
17
unsigned int ref = atomic_load_explicit(&media->worker_count,
18
memory_order_relaxed);
19
20
memory_order_relaxed,
21
memory_order_relaxed));
22
23
+ if (parse_flag & libvlc_media_parse_local)
24
+ parse_scope |= META_REQUEST_OPTION_SCOPE_LOCAL;
25
if (parse_flag & libvlc_media_parse_network)
26
parse_scope |= META_REQUEST_OPTION_SCOPE_NETWORK;
27
+ if (parse_flag & libvlc_media_parse_forced)
28
+ parse_scope |= META_REQUEST_OPTION_SCOPE_FORCED;
29
if (parse_flag & libvlc_media_fetch_local)
30
parse_scope |= META_REQUEST_OPTION_FETCH_LOCAL;
31
if (parse_flag & libvlc_media_fetch_network)
32
parse_scope |= META_REQUEST_OPTION_FETCH_NETWORK;
33
if (parse_flag & libvlc_media_do_interact)
34
parse_scope |= META_REQUEST_OPTION_DO_INTERACT;
35
- if (parse_flag & libvlc_media_no_skip)
36
- parse_scope |= META_REQUEST_OPTION_NO_SKIP;
37
38
ret = libvlc_MetadataRequest(libvlc, item, parse_scope,
39
- &input_preparser_callbacks, media,
40
+ &preparser_callbacks, media,
41
timeout, media);
42
if (ret != VLC_SUCCESS)
43
{
44
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/lib/picture.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/lib/picture.c
Changed
20
1
2
libvlc_picture_t *pic = malloc( sizeof( *pic ) );
3
if ( unlikely( pic == NULL ) )
4
return NULL;
5
- pic->converted = malloc( sizeof( *pic->converted ) );
6
+ pic->converted = block_New(&block_cbs, attachment->p_data,
7
+ attachment->i_data);
8
if ( unlikely( pic->converted == NULL ) )
9
{
10
free(pic);
11
12
vlc_atomic_rc_init( &pic->rc );
13
pic->attachment = vlc_input_attachment_Hold( attachment );
14
pic->time = VLC_TICK_INVALID;
15
- block_Init( pic->converted, &block_cbs, attachment->p_data,
16
- attachment->i_data);
17
video_format_Init( &pic->fmt, fcc );
18
switch ( fcc )
19
{
20
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/meson.build -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/meson.build
Changed
10
1
2
if intl_dep.found()
3
cdata.set('HAVE_GETTEXT', 1)
4
cdata.set('ENABLE_NLS', 1)
5
+
6
+ subdir('po')
7
endif
8
9
# Domain name i18n support via GNU libidn
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/access/Makefile.am -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/access/Makefile.am
Changed
10
1
2
access_LTLIBRARIES += libv4l2_plugin.la
3
endif
4
5
-libdshow_plugin_la_SOURCES = access/dshow/vlc_dshow.h access/dshow/dshow.cpp access/dshow/access.h \
6
+libdshow_plugin_la_SOURCES = access/dshow/dshow.cpp access/dshow/access.h \
7
access/dshow/filter.cpp access/dshow/filter.h access/dshow/crossbar.cpp ../src/win32/mta_holder.h
8
libdshow_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DSTRSAFE_NO_DEPRECATE
9
libdshow_plugin_la_CXXFLAGS = $(AM_CXXFLAGS) $(LIBCOMCXXFLAGS)
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/access/bluray.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/access/bluray.c
Changed
10
1
2
add_submodule()
3
set_description( "BluRay demuxer" )
4
set_subcategory( SUBCAT_INPUT_DEMUX )
5
- set_capability( "demux", 5 )
6
+ set_capability( "demux", 7 )
7
set_callbacks( blurayOpen, blurayClose )
8
#endif
9
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/access/dshow/crossbar.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/access/dshow/crossbar.cpp
Changed
13
1
2
3
#include <vlc_common.h>
4
5
-#include <assert.h>
6
+#include <cassert>
7
8
#include "access.h"
9
-#include "vlc_dshow.h"
10
11
namespace dshow {
12
13
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/access/dshow/dshow.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/access/dshow/dshow.cpp
Changed
15
1
2
#include <vlc_charset.h> /* FromWide */
3
4
#include <initguid.h>
5
-#include "vlc_dshow.h"
6
7
#include "access.h"
8
#include "filter.h"
9
10
+#include <wmcodecdsp.h>
11
+
12
#include "../src/win32/mta_holder.h"
13
14
namespace dshow {
15
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/access/dshow/filter.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/access/dshow/filter.cpp
Changed
21
1
2
#include <vlc_common.h>
3
#include <vlc_fourcc.h>
4
5
-#ifndef _MSC_VER
6
- /* Work-around a bug in w32api-2.5 */
7
-# define QACONTAINERFLAGS QACONTAINERFLAGS_SOMETHINGELSE
8
-#endif
9
-
10
#include "access.h"
11
#include "filter.h"
12
-#include "vlc_dshow.h"
13
14
#include <initguid.h>
15
16
+#include <wmcodecdsp.h>
17
+
18
#include <new>
19
20
namespace dshow {
21
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/access/dtv/bdagraph.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/access/dtv/bdagraph.cpp
Changed
10
1
2
# include <config.h>
3
#endif
4
5
-#include <assert.h>
6
+#include <cassert>
7
8
#include <vlc_common.h>
9
#include <vlc_block.h>
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/access/dvdnav.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/access/dvdnav.c
Changed
10
1
2
add_submodule()
3
set_description( N_("DVDnav demuxer") )
4
set_subcategory( SUBCAT_INPUT_DEMUX )
5
- set_capability( "demux", 5 )
6
+ set_capability( "demux", 7 )
7
set_callbacks( DemuxOpen, Close )
8
add_shortcut( "dvd", "iso" )
9
vlc_module_end ()
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/access/screen/dxgi.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/access/screen/dxgi.cpp
Changed
16
1
2
DXGI_OUTDUPL_DESC outDesc;
3
p_data->duplication->GetDesc(&outDesc);
4
5
- for (p_data->output_format = DxgiGetRenderFormatList();
6
- p_data->output_format->name != nullptr; ++p_data->output_format)
7
- {
8
- if (p_data->output_format->formatTexture == outDesc.ModeDesc.Format &&
9
- is_d3d11_opaque(p_data->output_format->fourcc))
10
- break;
11
- }
12
+ p_data->output_format = D3D11_RenderFormat(outDesc.ModeDesc.Format ,true);
13
if (unlikely(!p_data->output_format->name))
14
{
15
msg_Err(p_demux, "Unknown texture format %d", outDesc.ModeDesc.Format);
16
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/audio_filter/channel_mixer/spatialaudio.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/audio_filter/channel_mixer/spatialaudio.cpp
Changed
10
1
2
# include "config.h"
3
#endif
4
5
-#include <assert.h>
6
+#include <cassert>
7
8
#include <vlc_common.h>
9
#include <vlc_plugin.h>
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/codec/avcodec/d3d11va.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/codec/avcodec/d3d11va.c
Changed
100
1
2
return VLC_SUCCESS;
3
}
4
5
-static const d3d_format_t *D3D11_FindDXGIFormat(DXGI_FORMAT dxgi)
6
-{
7
- for (const d3d_format_t *output_format = DxgiGetRenderFormatList();
8
- output_format->name != NULL; ++output_format)
9
- {
10
- if (output_format->formatTexture == dxgi &&
11
- is_d3d11_opaque(output_format->fourcc))
12
- {
13
- return output_format;
14
- }
15
- }
16
- return NULL;
17
-}
18
-
19
static int DxSetupOutput(vlc_va_t *va, const directx_va_mode_t *mode, const video_format_t *fmt)
20
{
21
vlc_va_sys_t *sys = va->sys;
22
23
}
24
25
if (decoder_format == NULL || decoder_format->formatTexture != DXGI_FORMAT_NV12)
26
- processorInputidx++ = D3D11_FindDXGIFormat(DXGI_FORMAT_NV12);
27
- processorInputidx++ = D3D11_FindDXGIFormat(DXGI_FORMAT_420_OPAQUE);
28
+ processorInputidx++ = D3D11_RenderFormat(DXGI_FORMAT_NV12 ,true);
29
+ processorInputidx++ = D3D11_RenderFormat(DXGI_FORMAT_420_OPAQUE ,true);
30
processorInputidx++ = NULL;
31
32
/* */
33
34
vlc_va_sys_t *sys = va->sys;
35
HRESULT hr;
36
37
+ d3d11_device_lock(sys->d3d_dev);
38
void *pv;
39
hr = ID3D11Device_QueryInterface( sys->d3d_dev->d3ddevice, &IID_ID3D10Multithread, &pv);
40
if (SUCCEEDED(hr)) {
41
42
isXboxHardware(sys->d3d_dev))
43
{
44
msg_Warn(va, "%dx%d resolution not supported by your hardware", fmt->i_width, fmt->i_height);
45
+ d3d11_device_unlock(sys->d3d_dev);
46
return VLC_EGENERIC;
47
}
48
#endif
49
50
hr = ID3D11Device_CreateTexture2D( sys->d3d_dev->d3ddevice, &texDesc, NULL, &p_texture );
51
if (FAILED(hr)) {
52
msg_Err(va, "CreateTexture2D %zu failed. (hr=0x%lX)", surface_count, hr);
53
+ d3d11_device_unlock(sys->d3d_dev);
54
return VLC_EGENERIC;
55
}
56
57
58
if (FAILED(hr)) {
59
msg_Err(va, "CreateVideoDecoderOutputView %d failed. (hr=0x%lX)", surface_idx, hr);
60
ID3D11Texture2D_Release(p_texture);
61
+ d3d11_device_unlock(sys->d3d_dev);
62
return VLC_EGENERIC;
63
}
64
65
66
hr = ID3D11VideoDevice_GetVideoDecoderConfigCount( sys->d3ddec, &decoderDesc, &cfg_count );
67
if (FAILED(hr)) {
68
msg_Err(va, "GetVideoDecoderConfigCount failed. (hr=0x%lX)", hr);
69
+ d3d11_device_unlock(sys->d3d_dev);
70
return VLC_EGENERIC;
71
}
72
73
74
hr = ID3D11VideoDevice_GetVideoDecoderConfig( sys->d3ddec, &decoderDesc, i, &cfg_listi );
75
if (FAILED(hr)) {
76
msg_Err(va, "GetVideoDecoderConfig failed. (hr=0x%lX)", hr);
77
+ d3d11_device_unlock(sys->d3d_dev);
78
return VLC_EGENERIC;
79
}
80
}
81
82
}
83
if (cfg_score <= 0) {
84
msg_Err(va, "Failed to find a supported decoder configuration");
85
+ d3d11_device_unlock(sys->d3d_dev);
86
return VLC_EGENERIC;
87
}
88
89
90
if (FAILED(hr)) {
91
msg_Err(va, "ID3D11VideoDevice_CreateVideoDecoder failed. (hr=0x%lX)", hr);
92
sys->hw.decoder = NULL;
93
+ d3d11_device_unlock(sys->d3d_dev);
94
return VLC_EGENERIC;
95
}
96
+ d3d11_device_unlock(sys->d3d_dev);
97
sys->hw.decoder = decoder;
98
99
msg_Dbg(va, "DxCreateDecoderSurfaces succeed");
100
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/codec/avcodec/fourcc.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/codec/avcodec/fourcc.c
Changed
18
1
2
{ VLC_CODEC_LCL_MSZH, AV_CODEC_ID_MSZH },
3
{ VLC_CODEC_LCL_ZLIB, AV_CODEC_ID_ZLIB },
4
{ VLC_CODEC_QTRLE, AV_CODEC_ID_QTRLE },
5
+#if LIBAVCODEC_VERSION_CHECK(59, 33, 100)
6
+ { VLC_CODEC_QOI, AV_CODEC_ID_QOI },
7
+#endif
8
{ VLC_CODEC_TSCC, AV_CODEC_ID_TSCC },
9
{ VLC_CODEC_ULTI, AV_CODEC_ID_ULTI },
10
{ VLC_CODEC_QDRAW, AV_CODEC_ID_QDRAW },
11
{ VLC_CODEC_VIXL, AV_CODEC_ID_VIXL },
12
{ VLC_CODEC_QPEG, AV_CODEC_ID_QPEG },
13
{ VLC_CODEC_PNG, AV_CODEC_ID_PNG },
14
+ { VLC_CODEC_PNM, AV_CODEC_ID_PPM },
15
{ VLC_CODEC_PPM, AV_CODEC_ID_PPM },
16
/* AV_CODEC_ID_PBM */
17
{ VLC_CODEC_PGM, AV_CODEC_ID_PGM },
18
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/codec/avcodec/video.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/codec/avcodec/video.c
Changed
16
1
2
p_sys->framedrop = FRAMEDROP_NONE;
3
4
/* Set output properties */
5
- if( GetVlcChroma( &p_dec->fmt_out.video, p_context->pix_fmt ) != VLC_SUCCESS )
6
- {
7
- /* we are doomed. but not really, because most codecs set their pix_fmt later on */
8
- p_dec->fmt_out.i_codec = VLC_CODEC_I420;
9
- }
10
- p_dec->fmt_out.i_codec = p_dec->fmt_out.video.i_chroma;
11
+ if (GetVlcChroma( &p_dec->fmt_out.video, p_context->pix_fmt ) == VLC_SUCCESS)
12
+ p_dec->fmt_out.i_codec = p_dec->fmt_out.video.i_chroma;
13
14
p_dec->fmt_out.video.orientation = p_dec->fmt_in->video.orientation;
15
16
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/codec/dav1d.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/codec/dav1d.c
Changed
60
1
2
static int NewPicture(Dav1dPicture *img, void *cookie)
3
{
4
decoder_t *dec = cookie;
5
+ decoder_sys_t *p_sys = dec->p_sys;
6
7
video_format_t *v = &dec->fmt_out.video;
8
9
- v->i_visible_width = img->p.w;
10
- v->i_visible_height = img->p.h;
11
+ v->i_visible_width = img->seq_hdr->max_width;
12
+ v->i_visible_height = img->seq_hdr->max_height;
13
14
UpdateDecoderOutput(dec, img->seq_hdr);
15
16
17
v->multiview_mode = dec->fmt_in->video.multiview_mode;
18
v->pose = dec->fmt_in->video.pose;
19
dec->fmt_out.i_codec = FindVlcChroma(img);
20
- v->i_width = (img->p.w + 0x7F) & ~0x7F;
21
- v->i_height = (img->p.h + 0x7F) & ~0x7F;
22
+ v->i_width = (img->seq_hdr->max_width + 0x7F) & ~0x7F;
23
+ v->i_height = (img->seq_hdr->max_height + 0x7F) & ~0x7F;
24
v->i_chroma = dec->fmt_out.i_codec;
25
26
+ dec->i_extra_picture_buffers = p_sys->s.max_frame_delay;
27
+ if (img->seq_hdr->super_res)
28
+ // dav1d seems to buffer more pictures when using super resolution
29
+ dec->i_extra_picture_buffers += p_sys->s.max_frame_delay > 1 ? 2 : 1;
30
+
31
if (decoder_UpdateVideoFormat(dec) == 0)
32
{
33
picture_t *pic;
34
35
dec->fmt_out.video.i_frame_rate = dec->fmt_in->video.i_frame_rate;
36
dec->fmt_out.video.i_frame_rate_base = dec->fmt_in->video.i_frame_rate_base;
37
38
+ bool super_res = false;
39
if (!sequence_hdr)
40
{
41
dec->fmt_out.i_codec = VLC_CODEC_I420;
42
43
if (dec->fmt_out.video.transfer == TRANSFER_FUNC_UNDEF)
44
AV1_get_colorimetry(sequence_hdr, &dec->fmt_out.video.primaries, &dec->fmt_out.video.transfer,
45
&dec->fmt_out.video.space, &dec->fmt_out.video.color_range);
46
+ super_res = AV1_get_super_res(sequence_hdr);
47
}
48
dec->fmt_out.video.i_visible_width = dec->fmt_out.video.i_width;
49
dec->fmt_out.video.i_visible_height = dec->fmt_out.video.i_height;
50
51
dav1d_version(), p_sys->s.n_threads);
52
53
dec->i_extra_picture_buffers = p_sys->s.max_frame_delay;
54
+ if (super_res)
55
+ // dav1d seems to buffer more pictures when using super resolution
56
+ dec->i_extra_picture_buffers += p_sys->s.max_frame_delay > 1 ? 2 : 1;
57
#else
58
msg_Dbg(p_this, "Using dav1d version %s with %d/%d frame/tile threads",
59
dav1d_version(), p_sys->s.n_frame_threads, p_sys->s.n_tile_threads);
60
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/codec/gstreamer/gstdecode.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/codec/gstreamer/gstdecode.c
Changed
14
1
2
switch( GST_QUERY_TYPE ( p_query ) ){
3
case GST_QUERY_CAPS:
4
return gst_vlc_video_sink_query_caps( p_query );
5
- case GST_QUERY_ALLOCATION:
6
+ case GST_QUERY_ALLOCATION: {
7
GstBaseSink *p_bsink = GST_BASE_SINK_CAST( p_sys->p_decode_out );
8
GstBaseSinkClass *p_bclass = GST_BASE_SINK_GET_CLASS( p_bsink );
9
return p_bclass->propose_allocation( p_bsink, p_query );
10
+ }
11
default:
12
return FALSE;
13
}
14
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/codec/gstreamer/gstvlcpictureplaneallocator.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/codec/gstreamer/gstvlcpictureplaneallocator.c
Changed
10
1
2
3
#define gst_vlc_picture_plane_allocator_parent_class parent_class
4
G_DEFINE_TYPE (GstVlcPicturePlaneAllocator, gst_vlc_picture_plane_allocator, \
5
- GST_TYPE_ALLOCATOR);
6
+ GST_TYPE_ALLOCATOR)
7
8
static void gst_vlc_picture_plane_allocator_finalize( GObject *p_object );
9
static GstMemory* gst_vlc_picture_plane_allocator_dummy_alloc(
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/codec/gstreamer/gstvlcpictureplaneallocator.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/codec/gstreamer/gstvlcpictureplaneallocator.h
Changed
10
1
2
struct _GstVlcPicturePlaneAllocator
3
{
4
GstAllocator parent;
5
- picture_t pic_info;;
6
+ picture_t pic_info;
7
8
decoder_t *p_dec;
9
};
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/codec/gstreamer/gstvlcvideopool.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/codec/gstreamer/gstvlcvideopool.c
Changed
28
1
2
3
#define gst_vlc_video_pool_parent_class parent_class
4
G_DEFINE_TYPE (GstVlcVideoPool, gst_vlc_video_pool,
5
- GST_TYPE_BUFFER_POOL);
6
+ GST_TYPE_BUFFER_POOL)
7
8
static const gchar** gst_vlc_video_pool_get_options (GstBufferPool *p_pool)
9
{
10
11
12
gst_vlc_picture_plane_allocator_release( p_vpool->p_allocator, p_buffer );
13
14
- msg_Dbg( p_vpool->p_dec, "freed buffer %p", p_buffer );
15
+ msg_Dbg( p_vpool->p_dec, "freed buffer %p", (void*)p_buffer );
16
17
GST_BUFFER_POOL_CLASS( parent_class )->free_buffer( p_pool, p_buffer );
18
19
20
p_info->offset, p_info->stride );
21
}
22
23
- msg_Dbg( p_vpool->p_dec, "allocated buffer %p", *p_buffer );
24
+ msg_Dbg( p_vpool->p_dec, "allocated buffer %p", (void*)*p_buffer );
25
26
return GST_FLOW_OK;
27
}
28
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/codec/gstreamer/gstvlcvideosink.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/codec/gstreamer/gstvlcvideosink.c
Changed
10
1
2
static void gst_vlc_video_sink_finalize( GObject *p_obj );
3
4
#define gst_vlc_video_sink_parent_class parent_class
5
-G_DEFINE_TYPE( GstVlcVideoSink, gst_vlc_video_sink, GST_TYPE_BASE_SINK );
6
+G_DEFINE_TYPE( GstVlcVideoSink, gst_vlc_video_sink, GST_TYPE_BASE_SINK )
7
8
static void gst_vlc_video_sink_class_init( GstVlcVideoSinkClass *p_klass )
9
{
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/codec/libass.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/codec/libass.c
Changed
87
1
2
#include <vlc_codec.h>
3
#include <vlc_input.h>
4
#include <vlc_dialog.h>
5
+#include <vlc_stream.h>
6
7
#include <ass/ass.h>
8
9
10
11
static int BuildRegions( rectangle_t *p_region, int i_max_region, ASS_Image *p_img_list, int i_width, int i_height );
12
static void RegionDraw( subpicture_region_t *p_region, ASS_Image *p_img );
13
+static void OldEngineClunkyRollInfoPatch( decoder_t *p_dec, ASS_Track * );
14
15
//#define DEBUG_REGION
16
17
18
return VLC_EGENERIC;
19
}
20
ass_process_codec_private( p_track, p_dec->fmt_in->p_extra, p_dec->fmt_in->i_extra );
21
+ OldEngineClunkyRollInfoPatch( p_dec, p_track );
22
23
p_dec->fmt_out.i_codec = VLC_CODEC_RGBA;
24
25
26
#endif
27
}
28
29
+/* Patch Script Info aiming old and custom rendering engine
30
+ * See #27771 */
31
+static void OldEngineClunkyRollInfoPatch( decoder_t *p_dec, ASS_Track *p_track )
32
+{
33
+ if( !p_dec->fmt_in->i_extra )
34
+ return;
35
+
36
+ stream_t *p_memstream = vlc_stream_MemoryNew( p_dec, p_dec->fmt_in->p_extra,
37
+ p_dec->fmt_in->i_extra, true );
38
+ char *s = vlc_stream_ReadLine( p_memstream );
39
+ unsigned playres2 = {0, 0};
40
+ bool b_hotfix = false;
41
+ if( s && !strncmp( s, "Script Info", 13 ) )
42
+ {
43
+ free( s );
44
+ for( ;; )
45
+ {
46
+ s = vlc_stream_ReadLine( p_memstream );
47
+ if( !s || *s == '' /* Next section */ )
48
+ {
49
+ break;
50
+ }
51
+ else if( !strncmp( s, "PlayResX: ", 10 ) ||
52
+ !strncmp( s, "PlayResY: ", 10 ) )
53
+ {
54
+ playres'Y' - s7 = atoi( &s9 );
55
+ }
56
+ else if( !strncmp( s, "Original Script: ", 17 ) )
57
+ {
58
+ b_hotfix = !!strstr( s, "http://www.crunchyroll.com/user/" );
59
+ if( !b_hotfix )
60
+ break;
61
+ }
62
+ else if( !strncmp( s, "LayoutRes", 9 ) ||
63
+ !strncmp( s, "ScaledBorderAndShadow:", 22 ) )
64
+ {
65
+ /* They can still have fixed their mess in the future. Tell me, Marty. */
66
+ b_hotfix = false;
67
+ break;
68
+ }
69
+ }
70
+ }
71
+ free( s );
72
+ vlc_stream_Delete( p_memstream );
73
+ if( b_hotfix && playres0 && playres1 )
74
+ {
75
+ msg_Dbg( p_dec,"patching script info for custom rendering engine "
76
+ "(built against libass 0x%X)", LIBASS_VERSION );
77
+ /* Only modify struct _before_ any ass_process_chunk calls
78
+ (see ass_types.h documentation for when modifications are allowed) */
79
+ p_track->ScaledBorderAndShadow = 1;
80
+ p_track->YCbCrMatrix = YCBCR_NONE;
81
+#if LIBASS_VERSION >= 0x01600020
82
+ p_track->LayoutResX = playres0;
83
+ p_track->LayoutResY = playres1;
84
+#endif
85
+ }
86
+}
87
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/codec/meson.build -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/codec/meson.build
Changed
23
1
2
install: false
3
)
4
5
- mft_link_with = cc.find_library('mfplat'), d3d11_common_lib
6
+ mft_deps = cc.find_library('mfplat')
7
if get_option('winstore_app')
8
- mft_link_with += cc.find_library('d3d11')
9
+ mft_deps += cc.find_library('d3d11')
10
endif
11
vlc_modules += {
12
'name' : 'mft',
13
14
'../packetizer/h264_nal.c',
15
'../packetizer/hevc_nal.c'
16
),
17
- 'link_with' : mft_link_with
18
+ 'link_with' : d3d11_common_lib ,
19
+ 'dependencies' : mft_deps
20
}
21
endif
22
23
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/codec/mft.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/codec/mft.cpp
Changed
62
1
2
#undef WINAPI_FAMILY
3
#define WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP
4
5
-#include <assert.h>
6
+#include <cassert>
7
8
#include <vlc_common.h>
9
#include <vlc_plugin.h>
10
11
p_dec->fmt_out.video.i_width = desc.Width;
12
p_dec->fmt_out.video.i_height = desc.Height;
13
14
- for (const d3d_format_t *output_format = DxgiGetRenderFormatList();
15
- output_format->name != NULL; ++output_format)
16
- {
17
- if (output_format->formatTexture == desc.Format &&
18
- is_d3d11_opaque(output_format->fourcc))
19
- {
20
- p_sys->cfg = output_format;
21
- break;
22
- }
23
- }
24
+ p_sys->cfg = D3D11_RenderFormat(desc.Format ,true);
25
26
p_dec->fmt_out.i_codec = p_sys->cfg->fourcc;
27
p_dec->fmt_out.video.i_chroma = p_sys->cfg->fourcc;
28
29
30
static int SetD3D11(decoder_t *p_dec, d3d11_device_t *d3d_dev)
31
{
32
+ if (!(d3d_dev->d3ddevice->GetCreationFlags() & D3D11_CREATE_DEVICE_VIDEO_SUPPORT))
33
+ {
34
+ msg_Warn(p_dec, "the provided D3D11 device doesn't support decoding");
35
+ return VLC_EGENERIC;
36
+ }
37
+
38
mft_dec_sys_t *p_sys = static_cast<mft_dec_sys_t*>(p_dec->p_sys);
39
HRESULT hr;
40
hr = p_sys->fptr_MFCreateDXGIDeviceManager(&p_sys->dxgi_token, &p_sys->dxgi_manager);
41
42
hr = attributes->GetUINT32(MF_SA_D3D11_AWARE, &can_d3d11);
43
if (SUCCEEDED(hr) && can_d3d11)
44
{
45
- SetD3D11(p_dec, &devsys11->d3d_dev);
46
-
47
- IMFAttributes *outputAttr = NULL;
48
- hr = p_sys->mft->GetOutputStreamAttributes(p_sys->output_stream_id, &outputAttr);
49
- if (SUCCEEDED(hr))
50
+ if (SetD3D11(p_dec, &devsys11->d3d_dev) == VLC_SUCCESS)
51
{
52
- hr = outputAttr->SetUINT32(MF_SA_D3D11_BINDFLAGS, D3D11_BIND_SHADER_RESOURCE);
53
+ IMFAttributes *outputAttr = NULL;
54
+ hr = p_sys->mft->GetOutputStreamAttributes(p_sys->output_stream_id, &outputAttr);
55
+ if (SUCCEEDED(hr))
56
+ {
57
+ hr = outputAttr->SetUINT32(MF_SA_D3D11_BINDFLAGS, D3D11_BIND_SHADER_RESOURCE);
58
+ }
59
}
60
}
61
}
62
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/codec/omxil/mediacodec.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/codec/omxil/mediacodec.c
Changed
9
1
2
if (p_sys->b_adaptive)
3
msg_Dbg(p_dec, "mediacodec configured for adaptative playback");
4
args.video.b_adaptive_playback = p_sys->b_adaptive;
5
+ args.video.b_low_latency = var_InheritBool(p_dec, "low-delay");
6
}
7
else
8
{
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/codec/omxil/mediacodec.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/codec/omxil/mediacodec.h
Changed
9
1
2
int i_angle;
3
bool b_tunneled_playback;
4
bool b_adaptive_playback;
5
+ bool b_low_latency;
6
} video;
7
struct
8
{
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/codec/omxil/mediacodec_jni.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/codec/omxil/mediacodec_jni.c
Changed
72
1
2
#include <OMX_Core.h>
3
#include <OMX_Component.h>
4
#include "omxil_utils.h"
5
-#include "../../packetizer/hevc_nal.h"
6
7
#include "mediacodec.h"
8
#include "../../video_output/android/env.h"
9
10
-char* MediaCodec_GetName(vlc_object_t *p_obj, const char *psz_mime,
11
- int profile, int *p_quirks);
12
+char* MediaCodec_GetName(vlc_object_t *p_obj, vlc_fourcc_t codec,
13
+ const char *psz_mime, int profile, int *p_quirks);
14
15
#define THREAD_NAME "mediacodec_jni"
16
17
18
/*****************************************************************************
19
* MediaCodec_GetName
20
*****************************************************************************/
21
-char* MediaCodec_GetName(vlc_object_t *p_obj, const char *psz_mime,
22
- int profile, int *p_quirks)
23
+char* MediaCodec_GetName(vlc_object_t *p_obj, vlc_fourcc_t codec,
24
+ const char *psz_mime, int profile, int *p_quirks)
25
{
26
JNIEnv *env;
27
int num_codecs;
28
29
int omx_profile = (*env)->GetIntField(env, profile_level, jfields.profile_field);
30
(*env)->DeleteLocalRef(env, profile_level);
31
32
- int codec_profile = 0;
33
- if (strcmp(psz_mime, "video/avc") == 0)
34
- codec_profile = convert_omx_to_profile_idc(omx_profile);
35
- else if (strcmp(psz_mime, "video/hevc") == 0)
36
- {
37
- switch (omx_profile)
38
- {
39
- case 0x1: /* OMX_VIDEO_HEVCProfileMain */
40
- codec_profile = VLC_HEVC_PROFILE_MAIN;
41
- break;
42
- case 0x2: /* OMX_VIDEO_HEVCProfileMain10 */
43
- case 0x1000: /* OMX_VIDEO_HEVCProfileMain10HDR10 */
44
- codec_profile = VLC_HEVC_PROFILE_MAIN_10;
45
- break;
46
- }
47
- }
48
+ int codec_profile =
49
+ convert_omx_to_profile_idc(codec, omx_profile);
50
if (codec_profile != profile)
51
continue;
52
/* Some encoders set the level too high, thus we ignore it for the moment.
53
54
if (p_args->video.i_angle != 0)
55
SET_INTEGER(jformat, "rotation-degrees", p_args->video.i_angle);
56
57
+ if (p_args->video.b_low_latency)
58
+ SET_INTEGER(jformat, "low-latency", 1);
59
+
60
if (b_direct_rendering)
61
{
62
/* feature-tunneled-playback available since API 21 */
63
64
free(api->psz_name);
65
66
api->i_quirks = 0;
67
- api->psz_name = MediaCodec_GetName(api->p_obj, api->psz_mime,
68
+ api->psz_name = MediaCodec_GetName(api->p_obj, api->i_codec, api->psz_mime,
69
i_profile, &api->i_quirks);
70
if (!api->psz_name)
71
return MC_API_ERROR;
72
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/codec/omxil/mediacodec_ndk.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/codec/omxil/mediacodec_ndk.c
Changed
30
1
2
&& MC_API_AUDIO_QUIRKS_NEED_CHANNELS == OMXCODEC_AUDIO_QUIRKS_NEED_CHANNELS,
3
"mediacodec.h/omx_utils.h mismatch");
4
5
-char* MediaCodec_GetName(vlc_object_t *p_obj, const char *psz_mime,
6
- int hxxx_profile, int *p_quirks);
7
+char* MediaCodec_GetName(vlc_object_t *p_obj, vlc_fourcc_t codec,
8
+ const char *psz_mime, int profile, int *p_quirks);
9
10
#define THREAD_NAME "mediacodec_ndk"
11
12
13
return MC_API_ERROR;
14
}
15
16
+ if (p_args->video.b_low_latency)
17
+ syms.AMediaFormat.setInt32(p_sys->p_format, "low-latency", 1);
18
syms.AMediaFormat.setInt32(p_sys->p_format, "encoder", 0);
19
syms.AMediaFormat.setString(p_sys->p_format, "mime", api->psz_mime);
20
/* No limits for input size */
21
22
free(api->psz_name);
23
24
api->i_quirks = 0;
25
- api->psz_name = MediaCodec_GetName(api->p_obj, api->psz_mime,
26
+ api->psz_name = MediaCodec_GetName(api->p_obj, api->i_codec, api->psz_mime,
27
i_profile, &api->i_quirks);
28
if (!api->psz_name)
29
return MC_API_ERROR;
30
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/codec/omxil/omxil_utils.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/codec/omxil/omxil_utils.h
Changed
9
1
2
/*****************************************************************************
3
* H264 specific code
4
*****************************************************************************/
5
-size_t convert_omx_to_profile_idc(OMX_VIDEO_AVCPROFILETYPE profile_type);
6
-
7
-size_t convert_omx_to_level_idc(OMX_VIDEO_AVCLEVELTYPE level_type);
8
+int convert_omx_to_profile_idc(vlc_fourcc_t codec, int profile_type);
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/codec/omxil/utils.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/codec/omxil/utils.c
Changed
111
1
2
#include "qcom.h"
3
#include "../../video_chroma/copy.h"
4
#include "../../packetizer/h264_nal.h"
5
+#include "../../packetizer/hevc_nal.h"
6
+#include "../../packetizer/mpegvideo.h"
7
8
/*****************************************************************************
9
* Events utility functions
10
11
}
12
}
13
14
-static const struct
15
+struct omx_to_profile_idc
16
{
17
- OMX_VIDEO_AVCPROFILETYPE omx_profile;
18
- size_t profile_idc;
19
-} omx_to_profile_idc =
20
+ int omx_profile;
21
+ int profile_idc;
22
+};
23
+
24
+static const struct omx_to_profile_idc avc_omx_to_profile_idc =
25
{
26
{ OMX_VIDEO_AVCProfileBaseline, PROFILE_H264_BASELINE },
27
{ OMX_VIDEO_AVCProfileMain, PROFILE_H264_MAIN },
28
29
{ OMX_VIDEO_AVCProfileHigh444, PROFILE_H264_HIGH_444 },
30
};
31
32
-size_t convert_omx_to_profile_idc(OMX_VIDEO_AVCPROFILETYPE profile_type)
33
+static const struct omx_to_profile_idc hevc_omx_to_profile_idc =
34
{
35
- size_t array_length = sizeof(omx_to_profile_idc)/sizeof(omx_to_profile_idc0);
36
- for (size_t i = 0; i < array_length; ++i) {
37
- if (omx_to_profile_idci.omx_profile == profile_type)
38
- return omx_to_profile_idci.profile_idc;
39
- }
40
- return 0;
41
-}
42
+ { 0x1 /* OMX_VIDEO_HEVCProfileMain */, VLC_HEVC_PROFILE_MAIN },
43
+ { 0x2 /* OMX_VIDEO_HEVCProfileMain10 */, VLC_HEVC_PROFILE_MAIN_10 },
44
+ { 0x1000 /* OMX_VIDEO_HEVCProfileMain10HDR10 */, VLC_HEVC_PROFILE_MAIN_10 },
45
+};
46
47
-static const struct
48
+static const struct omx_to_profile_idc mpeg2_omx_to_profile_idc =
49
{
50
- OMX_VIDEO_AVCLEVELTYPE omx_level;
51
- size_t level_idc;
52
-} omx_to_level_idc =
53
-{
54
- { OMX_VIDEO_AVCLevel1, 10 },
55
- { OMX_VIDEO_AVCLevel1b, 9 },
56
- { OMX_VIDEO_AVCLevel11, 11 },
57
- { OMX_VIDEO_AVCLevel12, 12 },
58
- { OMX_VIDEO_AVCLevel13, 13 },
59
- { OMX_VIDEO_AVCLevel2, 20 },
60
- { OMX_VIDEO_AVCLevel21, 21 },
61
- { OMX_VIDEO_AVCLevel22, 22 },
62
- { OMX_VIDEO_AVCLevel3, 30 },
63
- { OMX_VIDEO_AVCLevel31, 31 },
64
- { OMX_VIDEO_AVCLevel32, 32 },
65
- { OMX_VIDEO_AVCLevel4, 40 },
66
- { OMX_VIDEO_AVCLevel41, 41 },
67
- { OMX_VIDEO_AVCLevel42, 42 },
68
- { OMX_VIDEO_AVCLevel5, 50 },
69
- { OMX_VIDEO_AVCLevel51, 51 },
70
+ { OMX_VIDEO_MPEG2ProfileHigh, PROFILE_MPEG2_HIGH },
71
+ { OMX_VIDEO_MPEG2ProfileSpatial, PROFILE_MPEG2_SPATIALLY_SCALABLE },
72
+ { OMX_VIDEO_MPEG2ProfileSNR, PROFILE_MPEG2_SNR_SCALABLE },
73
+ { OMX_VIDEO_MPEG2ProfileMain, PROFILE_MPEG2_MAIN },
74
+ { OMX_VIDEO_MPEG2ProfileSimple, PROFILE_MPEG2_SIMPLE },
75
+ { OMX_VIDEO_MPEG2Profile422, PROFILE_MPEG2_422 },
76
};
77
78
-size_t convert_omx_to_level_idc(OMX_VIDEO_AVCLEVELTYPE level_type)
79
+int convert_omx_to_profile_idc(vlc_fourcc_t codec, int profile_type)
80
{
81
- size_t array_length = sizeof(omx_to_level_idc)/sizeof(omx_to_level_idc0);
82
+ const struct omx_to_profile_idc *omx_to_profile_idc = NULL;
83
+ size_t array_length;
84
+ switch (codec)
85
+ {
86
+ case VLC_CODEC_H264:
87
+ omx_to_profile_idc = avc_omx_to_profile_idc;
88
+ array_length = ARRAY_SIZE(avc_omx_to_profile_idc);
89
+ break;
90
+ case VLC_CODEC_HEVC:
91
+ omx_to_profile_idc = hevc_omx_to_profile_idc;
92
+ array_length = ARRAY_SIZE(hevc_omx_to_profile_idc);
93
+ break;
94
+ case VLC_CODEC_MPGV:
95
+ case VLC_CODEC_MP2V:
96
+ omx_to_profile_idc = mpeg2_omx_to_profile_idc;
97
+ array_length = ARRAY_SIZE(mpeg2_omx_to_profile_idc);
98
+ break;
99
+ default:
100
+ return 0;
101
+ }
102
+
103
for (size_t i = 0; i < array_length; ++i) {
104
- if (omx_to_level_idci.omx_level == level_type)
105
- return omx_to_level_idci.level_idc;
106
+ if (omx_to_profile_idci.omx_profile == profile_type)
107
+ return omx_to_profile_idci.profile_idc;
108
}
109
return 0;
110
}
111
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/codec/videotoolbox/decoder.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/codec/videotoolbox/decoder.c
Changed
15
1
2
yuvmatrix = kCVImageBufferYCbCrMatrix_ITU_R_601_4;
3
break;
4
case COLOR_SPACE_BT2020:
5
- yuvmatrix = kCVImageBufferColorPrimaries_ITU_R_2020;
6
+ yuvmatrix = kCVImageBufferYCbCrMatrix_ITU_R_2020;
7
break;
8
case COLOR_SPACE_BT709:
9
default:
10
- yuvmatrix = kCVImageBufferColorPrimaries_ITU_R_709_2;
11
+ yuvmatrix = kCVImageBufferYCbCrMatrix_ITU_R_709_2;
12
break;
13
}
14
CFDictionarySetValue(decoderConfiguration, kCVImageBufferYCbCrMatrixKey,
15
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/demux/avformat/avformat.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/demux/avformat/avformat.c
Changed
19
1
2
set_subcategory( SUBCAT_INPUT_DEMUX )
3
set_description( N_("Avformat demuxer" ) )
4
set_shortname( N_("Avformat") )
5
- set_capability( "demux", 2 )
6
+ set_capability( "demux", 5 )
7
set_callbacks( avformat_OpenDemux, avformat_CloseDemux )
8
set_section( N_("Demuxer"), NULL )
9
add_string( "avformat-format", NULL, FORMAT_TEXT, FORMAT_LONGTEXT )
10
11
add_submodule ()
12
add_shortcut( "ffmpeg", "avformat" )
13
set_description( N_("Avformat muxer" ) )
14
- set_capability( "sout mux", 2 )
15
+ set_capability( "sout mux", 5 )
16
set_section( N_("Muxer"), NULL )
17
add_string( "sout-avformat-mux", NULL, MUX_TEXT, MUX_LONGTEXT )
18
add_string( "sout-avformat-options", NULL, AV_OPTIONS_TEXT, AV_OPTIONS_LONGTEXT )
19
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/demux/avi/avi.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/demux/avi/avi.c
Changed
201
1
2
3
typedef struct
4
{
5
- vlc_fourcc_t i_id;
6
- uint32_t i_flags;
7
uint64_t i_pos;
8
+ uint32_t i_flags;
9
uint32_t i_length;
10
uint64_t i_lengthtotal;
11
12
13
bool b_activated;
14
bool b_eof;
15
16
- unsigned int i_rate;
17
- unsigned int i_scale;
18
+ unsigned int i_rate; /* for audio & video */
19
+ unsigned int i_scale;/* for audio & video */
20
unsigned int i_samplesize;
21
22
struct bitmapinfoheader_properties bihprops;
23
24
25
int i_dv_audio_rate;
26
es_out_id_t *p_es_dv_audio;
27
+ /* SPU specific */
28
+ vlc_tick_t i_last_embedded_endtime;
29
+ vlc_tick_t i_next_embedded_time;
30
31
/* Avi Index */
32
avi_index_t idx;
33
34
unsigned int i_blockno;
35
unsigned int i_blocksize;
36
37
+ struct
38
+ {
39
+ bool b_ok;
40
+
41
+ int64_t i_toread;
42
+
43
+ int64_t i_posf; /* where we will read :
44
+ if i_idxposb == 0 : beginning of chunk (+8 to access data)
45
+ else : point on data directly */
46
+ } demuxctx;
47
+
48
} avi_track_t;
49
50
typedef struct
51
52
static void AVI_IndexCreate ( demux_t * );
53
54
static void AVI_ExtractSubtitle( demux_t *, unsigned int i_stream, avi_chunk_list_t *, avi_chunk_STRING_t * );
55
+static avi_track_t * AVI_GetVideoTrackForXsub( demux_sys_t * );
56
+static int AVI_SeekSubtitleTrack( demux_sys_t *, avi_track_t * );
57
58
static void AVI_DvHandleAudio( demux_t *, avi_track_t *, block_t * );
59
60
61
}
62
}
63
64
+#define XSUB_HEADER_SIZE 0x1B
65
+static int ExtractXsubSampleInfo( const uint8_t *p_buf,
66
+ vlc_tick_t *pi_start, vlc_tick_t *pi_end )
67
+{
68
+ unsigned t8;
69
+ char bufferXSUB_HEADER_SIZE + 1;
70
+ memcpy( buffer, p_buf, XSUB_HEADER_SIZE );
71
+ bufferXSUB_HEADER_SIZE = '\0';
72
+ if( sscanf( buffer, "%u:%2u:%2u.%3u-%u:%2u:%2u.%3u",
73
+ &t0, &t1, &t2, &t3, &t4, &t5, &t6, &t7 ) != 8 )
74
+ return VLC_EGENERIC;
75
+ *pi_start = vlc_tick_from_sec( t0 * 3600 + t1 * 60 + t2 ) +
76
+ VLC_TICK_FROM_MS(t3);
77
+ *pi_end = vlc_tick_from_sec( t4 * 3600 + t5 * 60 + t6 ) +
78
+ VLC_TICK_FROM_MS(t7);
79
+ return VLC_SUCCESS;
80
+}
81
+
82
+static int AVI_PeekSample( stream_t *s, size_t i_skip,
83
+ const uint8_t **pp_peek, size_t i_peek )
84
+{
85
+ ssize_t i_ret = vlc_stream_Peek( s, pp_peek, i_skip + i_peek );
86
+ *pp_peek += i_skip;
87
+ if ( i_ret < 0 || (size_t) i_ret != i_skip + i_peek )
88
+ return VLC_EGENERIC;
89
+ return VLC_SUCCESS;
90
+}
91
+
92
+static vlc_tick_t AVI_GetXsubSampleTimeAt( stream_t *s, uint64_t pos )
93
+{
94
+ const uint8_t *p_peek;
95
+ vlc_tick_t i_nzstart, i_nzend;
96
+ if( vlc_stream_Seek( s, pos ) != VLC_SUCCESS ||
97
+ AVI_PeekSample( s, 8, &p_peek, XSUB_HEADER_SIZE ) ||
98
+ ExtractXsubSampleInfo( p_peek, &i_nzstart, &i_nzend ) )
99
+ return VLC_TICK_INVALID;
100
+ return VLC_TICK_0 + i_nzstart;
101
+}
102
+
103
/*****************************************************************************
104
* Close: frees unused data
105
*****************************************************************************/
106
107
tk->i_samplesize = p_strh->i_samplesize;
108
msg_Dbg( p_demux, "stream%u rate:%u scale:%u samplesize:%u",
109
i, tk->i_rate, tk->i_scale, tk->i_samplesize );
110
- if( !tk->i_scale || !tk->i_rate || !(tk->i_rate * CLOCK_FREQ / tk->i_scale) )
111
- {
112
- free( tk );
113
- continue;
114
- }
115
116
switch( p_strh->i_type )
117
{
118
119
120
case( AVIFOURCC_vids ):
121
{
122
- if( p_vids->p_bih->biCompression == VLC_FOURCC( 'D', 'X', 'S', 'B' ) )
123
+ if( p_vids->p_bih->biCompression == FOURCC_DXSB )
124
{
125
msg_Dbg( p_demux, "stream%u subtitles", i );
126
es_format_Init( &tk->fmt, SPU_ES, p_vids->p_bih->biCompression );
127
+ tk->fmt.subs.spu.i_original_frame_width = p_vids->p_bih->biWidth;
128
+ tk->fmt.subs.spu.i_original_frame_height = p_vids->p_bih->biHeight;
129
break;
130
}
131
132
133
!strncasecmp( (char*)&p_strh->i_handler, "XVID", 4 ) )
134
{
135
tk->fmt.i_codec =
136
- tk->fmt.i_original_fourcc = VLC_FOURCC( 'X', 'V', 'I', 'D' );
137
+ tk->fmt.i_original_fourcc = FOURCC_XVID;
138
}
139
140
if( IsQNAPCodec( p_vids->p_bih->biCompression ) )
141
142
free( tk );
143
continue;
144
}
145
+
146
+ if( tk->fmt.i_cat != SPU_ES &&
147
+ (!tk->i_scale || !tk->i_rate || !(tk->i_rate * CLOCK_FREQ / tk->i_scale)) )
148
+ {
149
+ msg_Warn( p_demux, "stream%u has invalid timescale", i );
150
+ es_format_Clean(&tk->fmt);
151
+ free( tk );
152
+ continue;
153
+ }
154
+
155
tk->fmt.i_id = i;
156
if( p_strn && p_strn->p_str )
157
tk->fmt.psz_description = FromACP( p_strn->p_str );
158
159
*****************************************************************************/
160
161
static block_t * ReadFrame( demux_t *p_demux, const avi_track_t *tk,
162
- uint32_t i_header, uint32_t i_size )
163
+ uint32_t i_header, uint32_t i_osize )
164
{
165
/* skip header */
166
if( i_header )
167
168
}
169
170
/* read size padded on word boundary */
171
- i_size = __EVEN(i_size);
172
+ uint32_t i_size = __EVEN(i_osize);
173
174
if( i_size == 0 )
175
return block_Alloc(0); /* vlc_stream_Block can't read/alloc 0 sized */
176
177
if ( !p_frame )
178
return p_frame;
179
180
+ if( i_osize == i_size - 1 )
181
+ p_frame->i_buffer--;
182
+
183
+ if( tk->fmt.i_codec == FOURCC_DXSB && p_frame->i_buffer > XSUB_HEADER_SIZE )
184
+ {
185
+ vlc_tick_t i_start, i_end;
186
+ if( !ExtractXsubSampleInfo( p_frame->p_buffer, &i_start, &i_end ) )
187
+ {
188
+ p_frame->i_dts = p_frame->i_pts = VLC_TICK_0 + i_start;
189
+ if( i_end > i_start )
190
+ p_frame->i_length = i_start - i_end;
191
+ }
192
+ }
193
+
194
if( tk->bihprops.i_stride > INT32_MAX - 3 )
195
{
196
p_frame->i_buffer = 0;
197
198
*****************************************************************************
199
* Returns -1 in case of error, 0 in case of EOF, 1 otherwise
200
*****************************************************************************/
201
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/demux/avi/libavi.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/demux/avi/libavi.h
Changed
12
1
2
3
/* *** codex stuff *** */
4
5
+/* DivX */
6
+#define FOURCC_DXSB VLC_FOURCC('D','X','S','B') /* xsub */
7
+#define FOURCC_XVID VLC_FOURCC('X','V','I','D')
8
+
9
/* DV */
10
#define FOURCC_dvsd VLC_FOURCC('d','v','s','d')
11
#define FOURCC_dvhd VLC_FOURCC('d','v','h','d')
12
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/demux/cdg.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/demux/cdg.c
Changed
10
1
2
vlc_module_begin ()
3
set_description( N_("CDG demuxer") )
4
set_subcategory( SUBCAT_INPUT_DEMUX )
5
- set_capability( "demux", 3 )
6
+ set_capability( "demux", 6 )
7
set_callback( Open )
8
add_shortcut( "cdg", "subtitle" )
9
vlc_module_end ()
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/demux/mjpeg.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/demux/mjpeg.c
Changed
10
1
2
vlc_module_begin ()
3
set_shortname( "MJPEG")
4
set_description( N_("M-JPEG camera demuxer") )
5
- set_capability( "demux", 5 )
6
+ set_capability( "demux", 7 )
7
set_callback( Open )
8
set_subcategory( SUBCAT_INPUT_DEMUX )
9
add_float( "mjpeg-fps", 0.0, FPS_TEXT, FPS_LONGTEXT )
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/demux/mp4/libmp4.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/demux/mp4/libmp4.c
Changed
197
1
2
{
3
*pp_chain = p_box->p_next;
4
p_box->p_next = NULL;
5
+ p_box->p_father = NULL;
6
return p_box;
7
}
8
pp_chain = &p_box->p_next;
9
10
/* now copy compressed data */
11
memcpy( p_box->data.p_cmvd->p_data, p_peek,i_read);
12
13
- p_box->data.p_cmvd->b_compressed = 1;
14
-
15
#ifdef MP4_VERBOSE
16
msg_Dbg( p_stream, "read box: \"cmvd\" compressed data size %d",
17
p_box->data.p_cmvd->i_compressed_size );
18
19
20
static int MP4_ReadBox_cmov( stream_t *p_stream, MP4_Box_t *p_box )
21
{
22
+#ifndef HAVE_ZLIB
23
+ msg_Dbg( p_stream, "read box: \"cmov\" zlib unsupported" );
24
+ return 0;
25
+#else
26
+
27
MP4_Box_t *p_dcom;
28
MP4_Box_t *p_cmvd;
29
30
-#ifdef HAVE_ZLIB
31
stream_t *p_stream_memory;
32
z_stream z_data;
33
uint8_t *p_data;
34
- int i_result;
35
-#endif
36
-
37
- if( !( p_box->data.p_cmov = calloc(1, sizeof( MP4_Box_data_cmov_t ) ) ) )
38
- return 0;
39
-
40
- if( !p_box->p_father ||
41
- ( p_box->p_father->i_type != ATOM_moov &&
42
- p_box->p_father->i_type != ATOM_foov ) )
43
- {
44
- msg_Warn( p_stream, "Read box: \"cmov\" box alone" );
45
- return 1;
46
- }
47
48
if( !MP4_ReadBoxContainer( p_stream, p_box ) )
49
{
50
51
return 0;
52
}
53
54
-#ifndef HAVE_ZLIB
55
- msg_Dbg( p_stream, "read box: \"cmov\" zlib unsupported" );
56
- return 0;
57
-
58
-#else
59
/* decompress data */
60
/* allocate a new buffer */
61
if( !( p_data = malloc( p_cmvd->data.p_cmvd->i_uncompressed_size ) ) )
62
63
}
64
65
/* uncompress */
66
- i_result = inflate( &z_data, Z_NO_FLUSH );
67
- if( i_result != Z_OK && i_result != Z_STREAM_END )
68
+ if( inflate( &z_data, Z_FINISH ) != Z_STREAM_END )
69
{
70
msg_Err( p_stream, "read box: \"cmov\" error while uncompressing" );
71
+ inflateEnd( &z_data );
72
free( p_data );
73
return 0;
74
}
75
76
msg_Warn( p_stream, "read box: \"cmov\" uncompressing data size "
77
"mismatch" );
78
}
79
- p_cmvd->data.p_cmvd->i_uncompressed_size = z_data.total_out;
80
81
/* close zlib */
82
if( inflateEnd( &z_data ) != Z_OK )
83
84
"data (ignored)" );
85
}
86
87
- free( p_cmvd->data.p_cmvd->p_data );
88
- p_cmvd->data.p_cmvd->p_data = p_data;
89
- p_cmvd->data.p_cmvd->b_compressed = 0;
90
-
91
msg_Dbg( p_stream, "read box: \"cmov\" box successfully uncompressed" );
92
93
/* now create a memory stream */
94
- p_stream_memory =
95
- vlc_stream_MemoryNew( VLC_OBJECT(p_stream),
96
- p_cmvd->data.p_cmvd->p_data,
97
- p_cmvd->data.p_cmvd->i_uncompressed_size, true );
98
+ p_stream_memory = vlc_stream_MemoryNew( VLC_OBJECT(p_stream),
99
+ p_data, z_data.total_out, false );
100
+ if( !p_stream_memory )
101
+ {
102
+ free( p_data );
103
+ return 0;
104
+ }
105
106
/* and read uncompressd moov */
107
- p_box->data.p_cmov->p_moov = MP4_ReadBox( p_stream_memory, NULL );
108
+ MP4_Box_t *p_moov = MP4_ReadBox( p_stream_memory, NULL );
109
110
vlc_stream_Delete( p_stream_memory );
111
112
+ if( p_moov )
113
+ MP4_BoxAddChild( p_box, p_moov );
114
+
115
#ifdef MP4_VERBOSE
116
msg_Dbg( p_stream, "read box: \"cmov\" compressed movie header completed");
117
#endif
118
119
- return p_box->data.p_cmov->p_moov ? 1 : 0;
120
+ return p_moov ? 1 : 0;
121
#endif /* HAVE_ZLIB */
122
}
123
124
125
{
126
/* Containers */
127
{ ATOM_moov, MP4_ReadBoxContainer, 0 },
128
- { ATOM_foov, MP4_ReadBoxContainer, 0 },
129
{ ATOM_trak, MP4_ReadBoxContainer, ATOM_moov },
130
{ ATOM_trak, MP4_ReadBoxContainer, ATOM_foov },
131
{ ATOM_mdia, MP4_ReadBoxContainer, ATOM_trak },
132
133
{ ATOM_mvex, MP4_ReadBoxContainer, ATOM_moov },
134
{ ATOM_mvex, MP4_ReadBoxContainer, ATOM_ftyp },
135
136
+ /* Quicktime compression */
137
+ { ATOM_foov, MP4_ReadBoxContainer, 0 },
138
+ { ATOM_cmov, MP4_ReadBox_cmov, ATOM_foov },
139
+ { ATOM_cmov, MP4_ReadBox_cmov, ATOM_moov },
140
+ { ATOM_dcom, MP4_ReadBox_dcom, ATOM_cmov },
141
+ { ATOM_cmvd, MP4_ReadBox_cmvd, ATOM_cmov },
142
+
143
/* specific box */
144
{ ATOM_ftyp, MP4_ReadBox_ftyp, 0 },
145
{ ATOM_styp, MP4_ReadBox_ftyp, 0 },
146
- { ATOM_cmov, MP4_ReadBox_cmov, 0 },
147
{ ATOM_mvhd, MP4_ReadBox_mvhd, ATOM_moov },
148
{ ATOM_mvhd, MP4_ReadBox_mvhd, ATOM_foov },
149
{ ATOM_tkhd, MP4_ReadBox_tkhd, ATOM_trak },
150
151
{ ATOM_esds, MP4_ReadBox_esds, ATOM_mp4a },
152
{ ATOM_esds, MP4_ReadBox_esds, ATOM_mp4v },
153
{ ATOM_esds, MP4_ReadBox_esds, ATOM_mp4s },
154
- { ATOM_dcom, MP4_ReadBox_dcom, 0 },
155
{ ATOM_dfLa, MP4_ReadBox_Binary, ATOM_fLaC },
156
- { ATOM_cmvd, MP4_ReadBox_cmvd, 0 },
157
{ ATOM_av1C, MP4_ReadBox_av1C, ATOM_av01 },
158
{ ATOM_avcC, MP4_ReadBox_avcC, ATOM_avc1 },
159
{ ATOM_avcC, MP4_ReadBox_avcC, ATOM_avc3 },
160
161
goto error;
162
}
163
164
- MP4_Box_t *p_moov;
165
MP4_Box_t *p_cmov;
166
-
167
/* check if there is a cmov, if so replace
168
compressed moov by uncompressed one */
169
- if( ( ( p_moov = MP4_BoxGet( p_vroot, "moov" ) ) &&
170
- ( p_cmov = MP4_BoxGet( p_vroot, "moov/cmov" ) ) ) ||
171
- ( ( p_moov = MP4_BoxGet( p_vroot, "foov" ) ) &&
172
- ( p_cmov = MP4_BoxGet( p_vroot, "foov/cmov" ) ) ) )
173
+ if( ( p_cmov = MP4_BoxGet( p_vroot, "moov/cmov" ) ) ||
174
+ ( p_cmov = MP4_BoxGet( p_vroot, "foov/cmov" ) ) )
175
{
176
- /* rename the compressed moov as a box to skip */
177
- p_moov->i_type = ATOM_skip;
178
-
179
+ MP4_Box_t *p_moov = MP4_BoxExtract( &p_vroot->p_first, p_cmov->p_father->i_type );
180
/* get uncompressed p_moov */
181
- p_moov = p_cmov->data.p_cmov->p_moov;
182
- p_cmov->data.p_cmov->p_moov = NULL;
183
-
184
+ MP4_Box_t *p_umoov = MP4_BoxExtract( &p_cmov->p_first, ATOM_moov );
185
/* make p_root father of this new moov */
186
- p_moov->p_father = p_vroot;
187
-
188
- /* insert this new moov box as first child of p_root */
189
- p_moov->p_next = p_vroot->p_first;
190
- p_vroot->p_first = p_moov;
191
+ MP4_BoxAddChild( p_vroot, p_umoov );
192
+ /* Release old moov and compressed info */
193
+ MP4_BoxFree( p_moov );
194
}
195
196
return p_vroot;
197
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/demux/mp4/libmp4.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/demux/mp4/libmp4.h
Changed
28
1
2
{
3
uint32_t i_uncompressed_size;
4
uint32_t i_compressed_size;
5
-
6
- int b_compressed; /* Set to 1 if compressed data, 0 if uncompressed */
7
uint8_t *p_data;
8
9
} MP4_Box_data_cmvd_t;
10
11
-typedef struct MP4_Box_data_cmov_s
12
-{
13
- struct MP4_Box_s *p_moov; /* uncompressed moov */
14
-
15
-} MP4_Box_data_cmov_t;
16
-
17
typedef struct
18
{
19
uint32_t i_type;
20
21
22
MP4_Box_data_dcom_t *p_dcom;
23
MP4_Box_data_cmvd_t *p_cmvd;
24
- MP4_Box_data_cmov_t *p_cmov;
25
26
MP4_Box_data_moviehintinformation_rtp_t *p_moviehintinformation_rtp;
27
28
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/demux/mp4/mp4.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/demux/mp4/mp4.c
Changed
11
1
2
}
3
}
4
5
- msg_Dbg( p_demux, "seeking with %"PRId64 "ms %s to %ld", MS_FROM_VLC_TICK(i_date - i_start),
6
+ msg_Dbg( p_demux, "seeking with %"PRId64 "ms %s to %"PRId64,
7
+ MS_FROM_VLC_TICK(i_date - i_start),
8
!b_accurate ? "alignment" : "preroll (use input-fast-seek to avoid)", i_date );
9
10
for( i_track = 0; i_track < p_sys->i_tracks; i_track++ )
11
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/demux/mpeg/es.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/demux/mpeg/es.c
Changed
10
1
2
3
add_submodule()
4
set_description( N_("MPEG-4 video" ) )
5
- set_capability( "demux", 5 )
6
+ set_capability( "demux", 7 )
7
set_callbacks( OpenVideo, Close )
8
add_float( "es-fps", 25, FPS_TEXT, FPS_LONGTEXT )
9
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/demux/mpeg/h26x.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/demux/mpeg/h26x.c
Changed
19
1
2
set_shortname( "H264")
3
set_subcategory( SUBCAT_INPUT_DEMUX )
4
set_description( N_("H264 video demuxer" ) )
5
- set_capability( "demux", 6 )
6
+ set_capability( "demux", 8 )
7
set_section( N_("H264 video demuxer" ), NULL )
8
add_float( "h264-fps", 0.0, FPS_TEXT, FPS_LONGTEXT )
9
set_callbacks( OpenH264, Close )
10
11
set_shortname( "HEVC")
12
set_subcategory( SUBCAT_INPUT_DEMUX )
13
set_description( N_("HEVC/H.265 video demuxer" ) )
14
- set_capability( "demux", 6 )
15
+ set_capability( "demux", 8 )
16
set_section( N_("HEVC/H.265 video demuxer" ), NULL )
17
add_float( "hevc-fps", 0.0, FPS_TEXT, FPS_LONGTEXT )
18
set_callbacks( OpenHEVC, Close )
19
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/demux/mpeg/mpgv.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/demux/mpeg/mpgv.c
Changed
10
1
2
vlc_module_begin ()
3
set_subcategory( SUBCAT_INPUT_DEMUX )
4
set_description( N_("MPEG-I/II video demuxer" ) )
5
- set_capability( "demux", 5 )
6
+ set_capability( "demux", 7 )
7
set_callbacks( Open, Close )
8
add_shortcut( "mpgv" )
9
vlc_module_end ()
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/demux/mpeg/ps.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/demux/mpeg/ps.c
Changed
10
1
2
3
add_submodule ()
4
set_description( N_("MPEG-PS demuxer") )
5
- set_capability( "demux", 8 )
6
+ set_capability( "demux", 9 )
7
set_callbacks( Open, Close )
8
add_shortcut( "ps" )
9
vlc_module_end ()
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/demux/stl.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/demux/stl.c
Changed
10
1
2
vlc_module_begin()
3
set_description(N_("EBU STL subtitles parser"))
4
set_subcategory(SUBCAT_INPUT_DEMUX)
5
- set_capability("demux", 1)
6
+ set_capability("demux", 4)
7
set_callbacks(Open, Close)
8
add_shortcut("stl", "subtitle")
9
vlc_module_end()
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/demux/subtitle.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/demux/subtitle.c
Changed
192
1
2
}
3
4
/* */
5
- p_subtitle->i_start = i_start * p_props->i_microsecperframe;
6
- p_subtitle->i_stop = i_stop >= 0 ? (i_stop * p_props->i_microsecperframe) : -1;
7
+ p_subtitle->i_start = VLC_TICK_0 + i_start * p_props->i_microsecperframe;
8
+ p_subtitle->i_stop = i_stop >= 0 ? (VLC_TICK_0 + i_stop * p_props->i_microsecperframe) : -1;
9
p_subtitle->psz_text = psz_text;
10
return VLC_SUCCESS;
11
}
12
13
&h1, &m1, &s1, &d1, &h2, &m2, &s2, &d2) == 8 )
14
{
15
p_subtitle->i_start = vlc_tick_from_sec( h1 * 3600 + m1 * 60 + s1) +
16
- VLC_TICK_FROM_MS( d1 );
17
+ VLC_TICK_FROM_MS( d1 ) + VLC_TICK_0;
18
19
p_subtitle->i_stop = vlc_tick_from_sec( h2 * 3600 + m2 * 60 + s2 ) +
20
- VLC_TICK_FROM_MS( d2 );
21
+ VLC_TICK_FROM_MS( d2 ) + VLC_TICK_0;
22
return VLC_SUCCESS;
23
}
24
return VLC_EGENERIC;
25
26
}
27
28
p_subtitle->i_start = vlc_tick_from_sec( h1 * 3600 + m1 * 60 + s1 ) +
29
- VLC_TICK_FROM_MS( c1 * 10 );
30
+ VLC_TICK_FROM_MS( c1 * 10 ) + VLC_TICK_0;
31
p_subtitle->i_stop = vlc_tick_from_sec( h2 * 3600 + m2 * 60 + s2 ) +
32
- VLC_TICK_FROM_MS( c2 * 10 );
33
+ VLC_TICK_FROM_MS( c2 * 10 ) + VLC_TICK_0;
34
p_subtitle->psz_text = psz_text;
35
return VLC_SUCCESS;
36
}
37
38
if( sscanf( s, "%d:%d:%d%*c%^\r\n",
39
&h1, &m1, &s1, psz_text ) == 4 )
40
{
41
- p_subtitle->i_start = vlc_tick_from_sec( h1 * 3600 + m1 * 60 + s1 );
42
+ p_subtitle->i_start = VLC_TICK_0 + vlc_tick_from_sec( h1 * 3600 + m1 * 60 + s1 );
43
p_subtitle->i_stop = -1;
44
break;
45
}
46
47
}
48
}
49
50
- p_subtitle->i_start = VLC_TICK_FROM_MS(i_start);
51
+ p_subtitle->i_start = VLC_TICK_0 + VLC_TICK_FROM_MS(i_start);
52
p_subtitle->i_stop = -1;
53
p_subtitle->psz_text = strdup( text );
54
55
56
&h1, &m1, &s1, &c1 ) == 4 )
57
{
58
p_subtitle->i_start = vlc_tick_from_sec( h1 * 3600 + m1 * 60 + s1 ) +
59
- VLC_TICK_FROM_MS( c1 * 10 );
60
+ VLC_TICK_FROM_MS( c1 * 10 ) + VLC_TICK_0;
61
p_subtitle->i_stop = -1;
62
break;
63
}
64
65
if( sscanf( s, "%d %^\r\n", &i_start, psz_text ) == 2 ||
66
sscanf( s, "%d%d %^\r\n", &i_start, &i_stop, psz_text ) == 3)
67
{
68
- p_subtitle->i_start = VLC_TICK_FROM_MS(i_start * 100);
69
- p_subtitle->i_stop = i_stop >= 0 ? VLC_TICK_FROM_MS(i_stop * 100) : -1;
70
+ p_subtitle->i_start = VLC_TICK_0 + VLC_TICK_FROM_MS(i_start * 100);
71
+ p_subtitle->i_stop = i_stop >= 0 ? VLC_TICK_0 + VLC_TICK_FROM_MS(i_stop * 100) : -1;
72
break;
73
}
74
free( psz_text );
75
76
/* Starting of a subtitle */
77
if( i_firstline )
78
{
79
- p_subtitle->i_start = t * p_props->i_microsecperframe;
80
+ p_subtitle->i_start = VLC_TICK_0 + t * p_props->i_microsecperframe;
81
i_firstline = 0;
82
}
83
/* We have been too far: end of the subtitle, begin of next */
84
else
85
{
86
- p_subtitle->i_stop = t * p_props->i_microsecperframe;
87
+ p_subtitle->i_stop = VLC_TICK_0 + t * p_props->i_microsecperframe;
88
break;
89
}
90
}
91
92
if( sscanf (s, "%d,%d,\"%^\n\r", &t1, &t2, psz_text ) == 3 )
93
{
94
/* 1/10th of second ? Frame based ? FIXME */
95
- p_subtitle->i_start = 10 * t1;
96
- p_subtitle->i_stop = 10 * t2;
97
+ p_subtitle->i_start = VLC_TICK_0 + 10 * t1;
98
+ p_subtitle->i_stop = VLC_TICK_0 + 10 * t2;
99
/* Remove latest " */
100
psz_text strlen(psz_text) - 1 = '\0';
101
102
103
{
104
float f2 = vlc_strtof_c( psz_temp, NULL );
105
p_props->mpsub.f_total += f1 * p_props->mpsub.i_factor;
106
- p_subtitle->i_start = llroundf(10000.f * p_props->mpsub.f_total);
107
+ p_subtitle->i_start = VLC_TICK_0 + llroundf(10000.f * p_props->mpsub.f_total);
108
p_props->mpsub.f_total += f2 * p_props->mpsub.i_factor;
109
- p_subtitle->i_stop = llroundf(10000.f * p_props->mpsub.f_total);
110
+ p_subtitle->i_stop = VLC_TICK_0 + llroundf(10000.f * p_props->mpsub.f_total);
111
break;
112
}
113
}
114
115
if( sscanf( s, "%d:%d:%d.%d %d:%d:%d.%d %^\n\r",
116
&h1, &m1, &s1, &f1, &h2, &m2, &s2, &f2, psz_text ) == 9 )
117
{
118
- p_subtitle->i_start = vlc_tick_from_sec( ( h1 *3600 + m1 * 60 + s1 ) +
119
+ p_subtitle->i_start = VLC_TICK_0 + vlc_tick_from_sec( ( h1 *3600 + m1 * 60 + s1 ) +
120
(int64_t)( ( f1 + p_props->jss.i_time_shift ) / p_props->jss.i_time_resolution ) );
121
- p_subtitle->i_stop = vlc_tick_from_sec( ( h2 *3600 + m2 * 60 + s2 ) +
122
+ p_subtitle->i_stop = VLC_TICK_0 + vlc_tick_from_sec( ( h2 *3600 + m2 * 60 + s2 ) +
123
(int64_t)( ( f2 + p_props->jss.i_time_shift ) / p_props->jss.i_time_resolution ) );
124
break;
125
}
126
/* Short time lines */
127
else if( sscanf( s, "@%d @%d %^\n\r", &f1, &f2, psz_text ) == 3 )
128
{
129
- p_subtitle->i_start =
130
+ p_subtitle->i_start = VLC_TICK_0 +
131
vlc_tick_from_sec( (f1 + p_props->jss.i_time_shift ) / p_props->jss.i_time_resolution );
132
- p_subtitle->i_stop =
133
+ p_subtitle->i_stop = VLC_TICK_0 +
134
vlc_tick_from_sec( (f2 + p_props->jss.i_time_shift ) / p_props->jss.i_time_resolution );
135
break;
136
}
137
138
if( sscanf( s, "{%d:%d:%d}{%d:%d:%d}%^\r\n",
139
&h1, &m1, &s1, &h2, &m2, &s2, psz_text ) == 7 )
140
{
141
- p_subtitle->i_start = vlc_tick_from_sec( h1 * 3600 + m1 * 60 + s1 );
142
- p_subtitle->i_stop = vlc_tick_from_sec( h2 * 3600 + m2 * 60 + s2 );
143
+ p_subtitle->i_start = VLC_TICK_0 + vlc_tick_from_sec( h1 * 3600 + m1 * 60 + s1 );
144
+ p_subtitle->i_stop = VLC_TICK_0 + vlc_tick_from_sec( h2 * 3600 + m2 * 60 + s2 );
145
break;
146
}
147
free( psz_text );
148
149
150
/* Get the times */
151
int64_t i_time = ParseRealTime( psz_begin, &h1, &m1, &s1, &f1 );
152
- p_subtitle->i_start = i_time >= 0 ? i_time : 0;
153
+ p_subtitle->i_start = VLC_TICK_0 + (i_time >= 0 ? i_time : 0);
154
155
i_time = ParseRealTime( psz_end, &h2, &m2, &s2, &f2 );
156
- p_subtitle->i_stop = i_time >= 0 ? i_time : -1;
157
+ p_subtitle->i_stop = VLC_TICK_0 + (i_time >= 0 ? i_time : -1);
158
break;
159
}
160
}
161
162
if( sscanf( s, "%d:%d:%d%^\r\n",
163
&h1, &m1, &s1, psz_text ) == 4 )
164
{
165
- p_subtitle->i_start = vlc_tick_from_sec( h1 * 3600 + m1 * 60 + s1 );
166
+ p_subtitle->i_start = VLC_TICK_0 + vlc_tick_from_sec( h1 * 3600 + m1 * 60 + s1 );
167
168
s = TextGetLine( txt );
169
if( !s )
170
171
172
if( sscanf( s, "%d:%d:%d", &h1, &m1, &s1 ) == 3 )
173
{
174
- p_subtitle->i_start = vlc_tick_from_sec( h1 * 3600 + m1 * 60 + s1 );
175
+ p_subtitle->i_start = VLC_TICK_0 + vlc_tick_from_sec( h1 * 3600 + m1 * 60 + s1 );
176
177
s = TextGetLine( txt );
178
if( !s )
179
180
&h2, &m2, &s2, &d2 ) == 8 )
181
{
182
p_subtitle->i_start = vlc_tick_from_sec( h1 * 3600 + m1 * 60 + s1 ) +
183
- VLC_TICK_FROM_MS( d1 );
184
+ VLC_TICK_FROM_MS( d1 ) + VLC_TICK_0;
185
186
p_subtitle->i_stop = vlc_tick_from_sec( h2 * 3600 + m2 * 60 + s2 ) +
187
- VLC_TICK_FROM_MS( d2 );
188
+ VLC_TICK_FROM_MS( d2 ) + VLC_TICK_0;
189
if( p_subtitle->i_start < p_subtitle->i_stop )
190
break;
191
}
192
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/demux/ty.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/demux/ty.c
Changed
10
1
2
set_shortname( N_("TY") )
3
set_description(N_("TY Stream audio/video demux"))
4
set_subcategory( SUBCAT_INPUT_DEMUX )
5
- set_capability("demux", 6)
6
+ set_capability("demux", 8)
7
/* FIXME: there seems to be a segfault when using PVR access
8
* and TY demux has a bigger priority than PS
9
* Something must be wrong.
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/demux/vobsub.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/demux/vobsub.c
Changed
10
1
2
vlc_module_begin ()
3
set_description( N_("Vobsub subtitles parser") )
4
set_subcategory( SUBCAT_INPUT_DEMUX )
5
- set_capability( "demux", 1 )
6
+ set_capability( "demux", 4 )
7
8
set_callbacks( Open, Close )
9
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/demux/ytdl.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/demux/ytdl.c
Changed
10
1
2
set_shortname("YT-DL")
3
set_description("YT-DL extractor")
4
set_subcategory(SUBCAT_INPUT_STREAM_FILTER)
5
- set_capability("demux", 5)
6
+ set_capability("demux", 7)
7
set_callbacks(OpenFilter, Close)
8
add_bool("ytdl", true, N_("Enable YT-DL"), NULL)
9
change_safe()
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/Makefile.am -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/Makefile.am
Changed
27
1
2
gui/macosx/library/VLCLibraryTableCellView.h \
3
gui/macosx/library/VLCLibraryTableCellView.m \
4
gui/macosx/library/VLCLibraryTableCellViewProtocol.h \
5
+ gui/macosx/library/VLCLibraryTwoPaneSplitViewDelegate.h \
6
+ gui/macosx/library/VLCLibraryTwoPaneSplitViewDelegate.m \
7
gui/macosx/library/VLCLibraryUIUnits.h \
8
gui/macosx/library/VLCLibraryUIUnits.m \
9
gui/macosx/library/VLCLibraryWindow.h \
10
gui/macosx/library/VLCLibraryWindow.m \
11
gui/macosx/library/VLCLibraryWindowController.h \
12
gui/macosx/library/VLCLibraryWindowController.m \
13
+ gui/macosx/library/VLCLibraryWindowPersistentPreferences.h \
14
+ gui/macosx/library/VLCLibraryWindowPersistentPreferences.m \
15
gui/macosx/library/video-library/VLCLibraryVideoViewController.h \
16
gui/macosx/library/video-library/VLCLibraryVideoViewController.m \
17
gui/macosx/library/video-library/VLCLibraryVideoCollectionViewsStackViewController.h \
18
19
gui/macosx/windows/logging/VLCLogWindowController.m \
20
gui/macosx/windows/mainwindow/VLCControlsBarCommon.h \
21
gui/macosx/windows/mainwindow/VLCControlsBarCommon.m \
22
+ gui/macosx/windows/mainwindow/VLCMainVideoViewControlsBar.h \
23
+ gui/macosx/windows/mainwindow/VLCMainVideoViewControlsBar.m \
24
gui/macosx/windows/mainwindow/VLCMainWindowControlsBar.h \
25
gui/macosx/windows/mainwindow/VLCMainWindowControlsBar.m \
26
gui/macosx/windows/video/VLCAspectRatioRetainingVideoWindow.h \
27
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/UI/VLCLibraryWindow.xib -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/UI/VLCLibraryWindow.xib
Changed
105
1
2
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="d0e-29-yNq" userLabel="Song Name" customClass="VLCWrappableTextField">
3
<rect key="frame" x="-2" y="0.0" width="78" height="16"/>
4
<constraints>
5
+ <constraint firstAttribute="height" constant="16" id="aQy-pz-H7F"/>
6
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="60" id="uah-Xv-MK9"/>
7
</constraints>
8
- <textFieldCell key="cell" lineBreakMode="truncatingTail" alignment="right" title="Song Name" id="o4l-8l-eNX">
9
- <font key="font" metaFont="systemBold"/>
10
- <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
11
- <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
12
- </textFieldCell>
13
- </textField>
14
- <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="XbZ-eQ-zmA">
15
- <rect key="frame" x="76" y="0.0" width="14" height="16"/>
16
- <textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="·" id="iAI-Pb-eVu">
17
- <font key="font" metaFont="systemBlack" size="13"/>
18
- <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
19
- <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
20
- </textFieldCell>
21
- </textField>
22
- <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="0jI-HH-uWa" userLabel="Artist Name" customClass="VLCWrappableTextField">
23
- <rect key="frame" x="90" y="0.0" width="76" height="16"/>
24
- <constraints>
25
- <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="60" id="dVn-o0-6hg"/>
26
- </constraints>
27
- <textFieldCell key="cell" lineBreakMode="truncatingTail" alignment="left" title="Artist Name" id="n8Z-ER-5JE">
28
+ <textFieldCell key="cell" lineBreakMode="truncatingTail" alignment="right" title="Song Name · Artist Name" id="o4l-8l-eNX">
29
<font key="font" metaFont="system"/>
30
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
31
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
32
33
</constraints>
34
<visibilityPriorities>
35
<integer value="1000"/>
36
- <integer value="1000"/>
37
- <integer value="1000"/>
38
</visibilityPriorities>
39
<customSpacing>
40
<real value="3.4028234663852886e+38"/>
41
- <real value="3.4028234663852886e+38"/>
42
- <real value="3.4028234663852886e+38"/>
43
</customSpacing>
44
</stackView>
45
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="zOB-QJ-TUy" customClass="VLCTimeField">
46
47
<constraint firstItem="5o7-Z0-dqS" firstAttribute="centerY" secondItem="Ktr-qT-1fr" secondAttribute="centerY" id="6rb-4H-ISj"/>
48
<constraint firstItem="zOB-QJ-TUy" firstAttribute="centerY" secondItem="9Hg-t2-K5z" secondAttribute="centerY" id="Egp-c6-x6Y"/>
49
<constraint firstItem="oGd-mG-cFw" firstAttribute="centerY" secondItem="9Hg-t2-K5z" secondAttribute="centerY" id="Gzr-dU-oMG"/>
50
- <constraint firstItem="jlv-jC-dQB" firstAttribute="bottom" secondItem="9Hg-t2-K5z" secondAttribute="top" constant="-8" id="HiH-c5-MZq"/>
51
+ <constraint firstItem="9Hg-t2-K5z" firstAttribute="top" secondItem="jlv-jC-dQB" secondAttribute="bottom" constant="8" id="HiH-c5-MZq"/>
52
<constraint firstAttribute="bottom" secondItem="5o7-Z0-dqS" secondAttribute="bottom" id="Hui-Gh-xyv"/>
53
<constraint firstItem="jlv-jC-dQB" firstAttribute="top" secondItem="Ktr-qT-1fr" secondAttribute="top" id="ORY-q8-DFB"/>
54
<constraint firstItem="5o7-Z0-dqS" firstAttribute="top" secondItem="Ktr-qT-1fr" secondAttribute="top" id="Qmp-zE-IXn"/>
55
56
<action selector="segmentedControlAction:" target="QvC-M9-y7g" id="seg-Me-t1n"/>
57
</connections>
58
</segmentedControl>
59
+ <connections>
60
+ <action selector="segmentedTitleControlAction:" target="QvC-M9-y7g" id="YUg-2w-bwP"/>
61
+ </connections>
62
</toolbarItem>
63
<toolbarItem implicitItemIdentifier="NSToolbarFlexibleSpaceItem" id="89f-AL-zuU"/>
64
<toolbarItem implicitItemIdentifier="85037E27-D263-490C-B4B2-0EFE5B5837AA" label="Library View Type" paletteLabel="Library View Type" sizingBehavior="auto" id="kBa-MC-Mdq">
65
66
</segments>
67
</segmentedCell>
68
</segmentedControl>
69
+ <connections>
70
+ <action selector="gridVsListSegmentedControlAction:" target="QvC-M9-y7g" id="HMA-eG-oej"/>
71
+ </connections>
72
</toolbarItem>
73
<searchToolbarItem implicitItemIdentifier="A132890F-6B3D-4523-A71B-B00F095057C4" label="Search" paletteLabel="Search" visibilityPriority="1001" id="dv4-Il-y8X">
74
<nil key="toolTip"/>
75
76
<outlet property="mediaSourceCollectionViewScrollView" destination="cFG-c9-cI9" id="QQq-Ql-uQ7"/>
77
<outlet property="mediaSourceHomeButton" destination="jfA-Vr-sQc" id="oLM-NF-rqe"/>
78
<outlet property="mediaSourcePathControl" destination="Rjk-Q6-FYy" id="G63-NM-Ekn"/>
79
+ <outlet property="mediaSourcePathControlCollectionViewScrollViewBottomConstraint" destination="Lji-yk-wiI" id="BxP-JG-rlP"/>
80
+ <outlet property="mediaSourcePathControlTableViewScrollViewBottomConstraint" destination="Xao-NR-Utd" id="GYG-ye-2Rq"/>
81
<outlet property="mediaSourceTableView" destination="vpJ-Oz-Ebz" id="Hbo-Qw-JQd"/>
82
<outlet property="mediaSourceTableViewScrollView" destination="7WD-fy-WtJ" id="8As-1W-Af8"/>
83
<outlet property="mediaSourceView" destination="eHd-Q9-F8D" id="gfU-Jp-eFr"/>
84
85
</window>
86
<customObject id="Uzf-Tf-H8x" userLabel="Detached Window Controls Bar" customClass="VLCMainWindowControlsBar">
87
<connections>
88
- <outlet property="artistNameTextField" destination="0jI-HH-uWa" id="ftC-MD-ymJ"/>
89
- <outlet property="artistNameTextFieldWidthConstraint" destination="dVn-o0-6hg" id="f7h-af-ae8"/>
90
<outlet property="artworkButton" destination="15t-2s-22l" id="aR1-bU-1to"/>
91
<outlet property="artworkImageView" destination="5o7-Z0-dqS" id="Pns-yT-lKx"/>
92
<outlet property="backwardButton" destination="jGc-Xw-GYI" id="0AG-44-SN3"/>
93
94
<outlet property="fullscreenButton" destination="dwM-Uz-pAw" id="gXA-WS-Gig"/>
95
<outlet property="muteVolumeButton" destination="IAy-58-UPp" id="dDN-pE-Vmj"/>
96
<outlet property="playButton" destination="WgO-zh-k4s" id="0yC-Yh-H4V"/>
97
+ <outlet property="playingItemDisplayField" destination="d0e-29-yNq" id="QUe-1S-TQO"/>
98
<outlet property="repeatButton" destination="t4r-bt-Jxm" id="U7s-Tb-Ado"/>
99
<outlet property="shuffleButton" destination="SYG-jf-oHJ" id="b4m-v0-sC9"/>
100
- <outlet property="songArtistSeparatorTextField" destination="XbZ-eQ-zmA" id="lh8-I7-g90"/>
101
- <outlet property="songNameTextField" destination="d0e-29-yNq" id="JTI-XG-miC"/>
102
<outlet property="timeField" destination="zOB-QJ-TUy" id="mJL-1V-2lQ"/>
103
<outlet property="timeSlider" destination="9Hg-t2-K5z" id="sVe-s8-xW6"/>
104
<outlet property="trailingTimeField" destination="oGd-mG-cFw" id="geo-iq-0th"/>
105
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/UI/VLCMainVideoView.xib -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/UI/VLCMainVideoView.xib
Changed
201
1
2
<?xml version="1.0" encoding="UTF-8"?>
3
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" 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
<deployment version="101000" identifier="macosx"/>
7
- <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
8
+ <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
9
<capability name="Image references" minToolsVersion="12.0"/>
10
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
11
</dependencies>
12
13
</customObject>
14
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
15
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
16
- <customObject id="3" userLabel="Main Video View Controls Bar" customClass="VLCControlsBarCommon">
17
+ <customObject id="3" userLabel="Main Video View Controls Bar" customClass="VLCMainVideoViewControlsBar">
18
<connections>
19
+ <outlet property="audioButton" destination="cja-ZG-8LF" id="96C-CC-iV7"/>
20
<outlet property="backwardButton" destination="V9d-hX-iyg" id="ZFn-jn-7OB"/>
21
+ <outlet property="bookmarksButton" destination="4tZ-52-1q9" id="dAN-YB-YZ5"/>
22
<outlet property="forwardButton" destination="sF5-Z0-bef" id="H6w-Le-NAK"/>
23
<outlet property="fullscreenButton" destination="dYZ-ri-Kra" id="Cw2-BS-QG9"/>
24
<outlet property="fullscreenButtonWidthConstraint" destination="quS-fD-Od7" id="6hT-nR-yQI"/>
25
- <outlet property="muteVolumeButton" destination="tVB-Xs-sJJ" id="snj-OU-aTI"/>
26
<outlet property="playButton" destination="PCC-8a-sVF" id="ddT-ZM-Jhz"/>
27
- <outlet property="songNameTextField" destination="lEW-MN-FFU" id="btX-L9-7TO"/>
28
+ <outlet property="playingItemDisplayField" destination="lEW-MN-FFU" id="hKa-df-8UB"/>
29
+ <outlet property="subtitlesButton" destination="YTl-LZ-WDe" id="893-XB-eDY"/>
30
<outlet property="timeField" destination="3ri-8b-8mw" id="f0i-Gh-R8V"/>
31
<outlet property="timeSlider" destination="qNZ-Fh-W8i" id="Fkk-fj-s5Q"/>
32
<outlet property="trailingTimeField" destination="f4v-2z-dQ1" id="AXX-AU-lF0"/>
33
- <outlet property="volumeSlider" destination="lyY-Zo-4aH" id="HbX-7f-pNR"/>
34
</connections>
35
</customObject>
36
<customView id="WRu-Ic-lQK">
37
38
</textFieldCell>
39
</textField>
40
<textField wantsLayer="YES" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="lEW-MN-FFU" customClass="VLCWrappableTextField">
41
- <rect key="frame" x="18" y="59" width="495" height="28"/>
42
+ <rect key="frame" x="18" y="59" width="394" height="28"/>
43
<textFieldCell key="cell" controlSize="small" lineBreakMode="truncatingTail" allowsUndo="NO" sendsActionOnEndEditing="YES" alignment="left" placeholderString="Nothing Playing" usesSingleLineMode="YES" id="8l0-zS-fOa">
44
<font key="font" metaFont="systemBold" size="24"/>
45
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
46
47
<action selector="timeSliderAction:" target="3" id="W32-wA-rN9"/>
48
</connections>
49
</slider>
50
- <stackView distribution="fill" orientation="horizontal" alignment="centerY" spacing="20" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="sJu-ZK-5QH">
51
- <rect key="frame" x="531" y="59" width="169" height="32"/>
52
+ <stackView distribution="fill" orientation="horizontal" alignment="centerY" spacing="10" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="sJu-ZK-5QH">
53
+ <rect key="frame" x="430" y="59" width="270" height="32"/>
54
<subviews>
55
<stackView distribution="fill" orientation="horizontal" alignment="centerY" spacing="5" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Y8F-hr-iaW">
56
- <rect key="frame" x="0.0" y="0.0" width="117" height="32"/>
57
+ <rect key="frame" x="0.0" y="0.0" width="143" height="32"/>
58
<subviews>
59
- <button wantsLayer="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="tVB-Xs-sJJ" customClass="VLCImageButton">
60
+ <button wantsLayer="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cja-ZG-8LF" customClass="VLCImageButton">
61
<rect key="frame" x="0.0" y="-1" width="32" height="33"/>
62
<constraints>
63
- <constraint firstAttribute="width" constant="32" id="PGL-rL-Qcp"/>
64
- <constraint firstAttribute="width" secondItem="tVB-Xs-sJJ" secondAttribute="height" multiplier="1:1" id="qTO-ie-xwE"/>
65
+ <constraint firstAttribute="width" secondItem="cja-ZG-8LF" secondAttribute="height" multiplier="1:1" id="Hc7-cx-AiL"/>
66
+ <constraint firstAttribute="width" constant="32" id="NiS-Cd-FWu"/>
67
</constraints>
68
- <buttonCell key="cell" type="recessed" bezelStyle="recessed" image="volume.3.fill" catalog="system" imagePosition="only" alignment="center" controlSize="large" borderStyle="border" imageScaling="proportionallyUpOrDown" inset="2" id="skE-5H-zgX">
69
+ <buttonCell key="cell" type="recessed" bezelStyle="recessed" image="waveform.circle" catalog="system" imagePosition="only" alignment="center" controlSize="large" borderStyle="border" imageScaling="proportionallyUpOrDown" inset="2" id="5em-Cm-yoF">
70
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
71
<font key="font" metaFont="system"/>
72
</buttonCell>
73
<connections>
74
- <action selector="volumeAction:" target="3" id="4W0-Ft-7pO"/>
75
+ <action selector="openAudioMenu:" target="3" id="hHT-Oc-wgF"/>
76
</connections>
77
</button>
78
- <slider verticalHuggingPriority="750" horizontalCompressionResistancePriority="800" translatesAutoresizingMaskIntoConstraints="NO" id="lyY-Zo-4aH" customClass="VLCVolumeSlider">
79
+ <button wantsLayer="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="YTl-LZ-WDe" customClass="VLCImageButton">
80
+ <rect key="frame" x="37" y="-1" width="32" height="33"/>
81
+ <constraints>
82
+ <constraint firstAttribute="width" constant="32" id="lX6-ad-1gX"/>
83
+ <constraint firstAttribute="width" secondItem="YTl-LZ-WDe" secondAttribute="height" multiplier="1:1" id="vzf-FG-VLf"/>
84
+ </constraints>
85
+ <buttonCell key="cell" type="recessed" bezelStyle="recessed" image="text.bubble" catalog="system" imagePosition="only" alignment="center" controlSize="large" borderStyle="border" imageScaling="proportionallyUpOrDown" inset="2" id="1qF-LY-LkO">
86
+ <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
87
+ <font key="font" metaFont="system"/>
88
+ </buttonCell>
89
+ <connections>
90
+ <action selector="openSubtitlesMenu:" target="3" id="X6e-aG-mVF"/>
91
+ </connections>
92
+ </button>
93
+ <button wantsLayer="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="4tZ-52-1q9" customClass="VLCImageButton">
94
+ <rect key="frame" x="74" y="-1" width="32" height="33"/>
95
+ <constraints>
96
+ <constraint firstAttribute="width" constant="32" id="oY2-hp-RHB"/>
97
+ <constraint firstAttribute="width" secondItem="4tZ-52-1q9" secondAttribute="height" multiplier="1:1" id="pSW-vN-Ly5"/>
98
+ </constraints>
99
+ <buttonCell key="cell" type="recessed" bezelStyle="recessed" image="bookmark.circle" catalog="system" imagePosition="only" alignment="center" controlSize="large" borderStyle="border" imageScaling="proportionallyUpOrDown" inset="2" id="bGc-fn-jgQ">
100
+ <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
101
+ <font key="font" metaFont="system"/>
102
+ </buttonCell>
103
+ <connections>
104
+ <action selector="openBookmarks:" target="3" id="o6m-9M-L4U"/>
105
+ </connections>
106
+ </button>
107
+ <button wantsLayer="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="dYZ-ri-Kra" customClass="VLCImageButton">
108
+ <rect key="frame" x="111" y="-1" width="32" height="33"/>
109
+ <constraints>
110
+ <constraint firstAttribute="width" secondItem="dYZ-ri-Kra" secondAttribute="height" multiplier="1:1" id="cHQ-Fu-L8k"/>
111
+ <constraint firstAttribute="width" constant="32" id="quS-fD-Od7"/>
112
+ </constraints>
113
+ <buttonCell key="cell" type="recessed" bezelStyle="recessed" image="arrow.up.left.and.arrow.down.right" catalog="system" imagePosition="only" alignment="center" controlSize="large" borderStyle="border" imageScaling="proportionallyUpOrDown" inset="2" id="Z8g-js-0W6">
114
+ <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
115
+ <font key="font" metaFont="system"/>
116
+ </buttonCell>
117
+ <connections>
118
+ <action selector="fullscreen:" target="3" id="0Kk-UV-WtF"/>
119
+ </connections>
120
+ </button>
121
+ </subviews>
122
+ <constraints>
123
+ <constraint firstItem="YTl-LZ-WDe" firstAttribute="width" secondItem="YTl-LZ-WDe" secondAttribute="height" multiplier="1:1" id="2QI-lH-hlk"/>
124
+ <constraint firstItem="4tZ-52-1q9" firstAttribute="width" secondItem="4tZ-52-1q9" secondAttribute="height" multiplier="1:1" id="UdU-aK-B0s"/>
125
+ </constraints>
126
+ <visibilityPriorities>
127
+ <integer value="1000"/>
128
+ <integer value="1000"/>
129
+ <integer value="1000"/>
130
+ <integer value="1000"/>
131
+ </visibilityPriorities>
132
+ <customSpacing>
133
+ <real value="3.4028234663852886e+38"/>
134
+ <real value="3.4028234663852886e+38"/>
135
+ <real value="3.4028234663852886e+38"/>
136
+ <real value="3.4028234663852886e+38"/>
137
+ </customSpacing>
138
+ </stackView>
139
+ <stackView distribution="fill" orientation="horizontal" alignment="centerY" spacing="5" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="zyp-45-IgR">
140
+ <rect key="frame" x="153" y="0.0" width="117" height="32"/>
141
+ <subviews>
142
+ <button wantsLayer="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="afi-4d-rQk" customClass="VLCImageButton">
143
+ <rect key="frame" x="0.0" y="-1" width="32" height="33"/>
144
+ <constraints>
145
+ <constraint firstAttribute="width" secondItem="afi-4d-rQk" secondAttribute="height" multiplier="1:1" id="2lo-OW-sv9"/>
146
+ <constraint firstAttribute="width" constant="32" id="PWI-LB-n9j"/>
147
+ </constraints>
148
+ <buttonCell key="cell" type="recessed" bezelStyle="recessed" image="volume.3.fill" catalog="system" imagePosition="only" alignment="center" controlSize="large" borderStyle="border" imageScaling="proportionallyUpOrDown" inset="2" id="POe-ne-XtP">
149
+ <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
150
+ <font key="font" metaFont="system"/>
151
+ </buttonCell>
152
+ <connections>
153
+ <action selector="volumeAction:" target="3" id="GOu-6c-pg9"/>
154
+ </connections>
155
+ </button>
156
+ <slider verticalHuggingPriority="750" horizontalCompressionResistancePriority="800" translatesAutoresizingMaskIntoConstraints="NO" id="fKc-2d-Uu6" customClass="VLCVolumeSlider">
157
<rect key="frame" x="35" y="8" width="84" height="17"/>
158
<constraints>
159
- <constraint firstAttribute="width" constant="80" id="SeC-cP-5Dr"/>
160
+ <constraint firstAttribute="width" constant="80" id="cWg-Fr-x0Z"/>
161
</constraints>
162
- <sliderCell key="cell" controlSize="mini" continuous="YES" state="on" alignment="left" maxValue="512" doubleValue="50" tickMarkPosition="above" sliderType="linear" id="Zws-Wl-Ctp" customClass="VLCVolumeSliderCell"/>
163
+ <sliderCell key="cell" controlSize="mini" continuous="YES" state="on" alignment="left" maxValue="512" doubleValue="50" tickMarkPosition="above" sliderType="linear" id="Gp6-7o-lvj" customClass="VLCVolumeSliderCell"/>
164
<connections>
165
- <action selector="volumeAction:" target="3" id="rPg-yg-qAG"/>
166
+ <action selector="volumeAction:" target="3" id="soW-Fc-H3Y"/>
167
</connections>
168
</slider>
169
</subviews>
170
171
<real value="3.4028234663852886e+38"/>
172
</customSpacing>
173
</stackView>
174
- <button wantsLayer="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="dYZ-ri-Kra" customClass="VLCImageButton">
175
- <rect key="frame" x="137" y="-1" width="32" height="33"/>
176
- <constraints>
177
- <constraint firstAttribute="width" secondItem="dYZ-ri-Kra" secondAttribute="height" multiplier="1:1" id="cHQ-Fu-L8k"/>
178
- <constraint firstAttribute="width" constant="32" id="quS-fD-Od7"/>
179
- </constraints>
180
- <buttonCell key="cell" type="recessed" bezelStyle="recessed" image="NSEnterFullScreenTemplate" imagePosition="only" alignment="center" controlSize="large" borderStyle="border" imageScaling="proportionallyUpOrDown" inset="2" id="Z8g-js-0W6">
181
- <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
182
- <font key="font" metaFont="system"/>
183
- </buttonCell>
184
- <connections>
185
- <action selector="fullscreen:" target="3" id="0Kk-UV-WtF"/>
186
- </connections>
187
- </button>
188
</subviews>
189
<visibilityPriorities>
190
<integer value="1000"/>
191
192
<rect key="frame" x="260" y="208" width="200" height="64"/>
193
<subviews>
194
<button translatesAutoresizingMaskIntoConstraints="NO" id="V9d-hX-iyg" customClass="VLCImageButton">
195
- <rect key="frame" x="0.0" y="7" width="48" height="51"/>
196
+ <rect key="frame" x="0.0" y="6.5" width="48" height="51"/>
197
<constraints>
198
<constraint firstAttribute="width" constant="48" id="XBm-GM-29d"/>
199
<constraint firstAttribute="width" secondItem="V9d-hX-iyg" secondAttribute="height" multiplier="1:1" id="mjk-wN-72b"/>
200
201
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/library/VLCInputItem.m -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/VLCInputItem.m
Changed
10
1
2
});
3
}
4
5
-static const struct input_preparser_callbacks_t preparseCallbacks = {
6
+static const struct vlc_metadata_cbs preparseCallbacks = {
7
cb_preparse_ended,
8
cb_subtree_added,
9
};
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/library/VLCLibraryTableViewDelegate.m -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/VLCLibraryTableViewDelegate.m
Changed
15
1
2
cellView.identifier = self.cellViewIdentifier;
3
}
4
5
- cellView setRepresentedItem:vlcDataSource libraryItemAtRow:row forTableView:tableView;
6
+ NSObject<VLCMediaLibraryItemProtocol> * const libraryItem = vlcDataSource libraryItemAtRow:row forTableView:tableView;
7
+ if (libraryItem == nil) {
8
+ return nil;
9
+ }
10
+
11
+ cellView setRepresentedItem:libraryItem;
12
return cellView;
13
}
14
15
_service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/VLCLibraryTwoPaneSplitViewDelegate.h
Added
33
1
2
+/*****************************************************************************
3
+ * VLCLibraryTwoPaneSplitViewDelegate.h: MacOS X interface module
4
+ *****************************************************************************
5
+ * Copyright (C) 2023 VLC authors and VideoLAN
6
+ *
7
+ * Authors: Claudio Cambra <developer@claudiocambra.com>
8
+ *
9
+ * This program is free software; you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation; either version 2 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program; if not, write to the Free Software
21
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22
+ *****************************************************************************/
23
+
24
+#import "Cocoa/Cocoa.h"
25
+
26
+NS_ASSUME_NONNULL_BEGIN
27
+
28
+@interface VLCLibraryTwoPaneSplitViewDelegate : NSObject<NSSplitViewDelegate>
29
+
30
+@end
31
+
32
+NS_ASSUME_NONNULL_END
33
_service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/VLCLibraryTwoPaneSplitViewDelegate.m
Added
51
1
2
+/*****************************************************************************
3
+ * VLCLibraryTwoPaneSplitViewDelegate.m: MacOS X interface module
4
+ *****************************************************************************
5
+ * Copyright (C) 2023 VLC authors and VideoLAN
6
+ *
7
+ * Authors: Claudio Cambra <developer@claudiocambra.com>
8
+ *
9
+ * This program is free software; you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation; either version 2 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program; if not, write to the Free Software
21
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22
+ *****************************************************************************/
23
+
24
+#import "VLCLibraryTwoPaneSplitViewDelegate.h"
25
+
26
+#import "library/VLCLibraryUIUnits.h"
27
+#import "library/VLCLibraryWindow.h"
28
+
29
+#import "main/VLCMain.h"
30
+
31
+@implementation VLCLibraryTwoPaneSplitViewDelegate
32
+
33
+- (CGFloat)splitView:(NSSplitView *)splitView
34
+constrainMaxCoordinate:(CGFloat)proposedMinimumPosition
35
+ ofSubviewAt:(NSInteger)dividerIndex
36
+{
37
+ if (dividerIndex != 0) {
38
+ return proposedMinimumPosition;
39
+ }
40
+
41
+ VLCLibraryWindow * const libraryWindow = VLCMain.sharedInstance.libraryWindow;
42
+ const CGFloat libraryWindowWidth = libraryWindow.frame.size.width;
43
+
44
+ NSNumber * const leftPaneIndex = NSNumber numberWithLong:0;
45
+ NSNumber * const leftPaneMaxWidth = NSNumber numberWithDouble:libraryWindowWidth - VLCLibraryUIUnits librarySplitViewMainViewMinimumWidth;
46
+
47
+ return leftPaneMaxWidth.floatValue;
48
+}
49
+
50
+@end
51
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/library/VLCLibraryUIUnits.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/VLCLibraryUIUnits.h
Changed
10
1
2
3
+ (const CGFloat)controlsFadeAnimationDuration;
4
5
++ (const CGFloat)librarySplitViewMainViewMinimumWidth;
6
+
7
@end
8
9
NS_ASSUME_NONNULL_END
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/library/VLCLibraryUIUnits.m -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/VLCLibraryUIUnits.m
Changed
28
1
2
withItemsAspectRatio:(VLCLibraryCollectionViewItemAspectRatio)itemsAspectRatio
3
{
4
static uint numItemsInRow = 5;
5
+ static uint minItemsInRow = 2;
6
7
NSSize itemSize = self itemSizeForCollectionView:collectionView
8
withLayout:collectionViewLayout
9
10
withItemsAspectRatio:itemsAspectRatio
11
withNumberOfItemsInRow:numItemsInRow;
12
}
13
- while (itemSize.width < VLCLibraryUIUnits dynamicCollectionViewItemMinimumWidth) {
14
+ while (itemSize.width < VLCLibraryUIUnits dynamicCollectionViewItemMinimumWidth && numItemsInRow > minItemsInRow) {
15
--numItemsInRow;
16
itemSize = self itemSizeForCollectionView:collectionView
17
withLayout:collectionViewLayout
18
19
return 0.4f;
20
}
21
22
++ (const CGFloat)librarySplitViewMainViewMinimumWidth
23
+{
24
+ return 400.;
25
+}
26
+
27
@end
28
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/library/VLCLibraryWindow.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/VLCLibraryWindow.h
Changed
44
1
2
VLCLibraryStreamsSegment
3
};
4
5
-typedef NS_ENUM(NSUInteger, VLCViewModeSegment) {
6
- VLCGridViewModeSegment = 0,
7
- VLCListViewModeSegment
8
+typedef NS_ENUM(NSInteger, VLCLibraryViewModeSegment) {
9
+ VLCLibrarySmallestSentinelViewModeSegment = -1,
10
+ VLCLibraryGridViewModeSegment,
11
+ VLCLibraryListViewModeSegment,
12
+ VLCLibraryLargestSentinelViewModeSegment
13
};
14
15
@interface VLCLibraryWindow : VLCFullVideoViewWindow<NSUserInterfaceItemIdentification>
16
17
@property (readwrite, weak) IBOutlet NSView *mediaSourceView;
18
@property (readwrite, weak) IBOutlet NSButton *mediaSourceHomeButton;
19
@property (readwrite, weak) IBOutlet VLCInputNodePathControl *mediaSourcePathControl;
20
+@property (readwrite, weak) IBOutlet NSLayoutConstraint *mediaSourcePathControlTableViewScrollViewBottomConstraint;
21
+@property (readwrite, weak) IBOutlet NSLayoutConstraint *mediaSourcePathControlCollectionViewScrollViewBottomConstraint;
22
@property (readwrite, weak) IBOutlet NSScrollView *mediaSourceTableViewScrollView;
23
@property (readwrite, weak) IBOutlet NSTableView *mediaSourceTableView;
24
@property (readwrite, weak) IBOutlet NSScrollView *mediaSourceCollectionViewScrollView;
25
26
- (void)togglePlaylist;
27
- (void)hideControlsBar;
28
- (void)showControlsBar;
29
+- (void)updateGridVsListViewModeSegmentedControl;
30
31
- (IBAction)playlistDoubleClickAction:(id)sender;
32
- (IBAction)shuffleAction:(id)sender;
33
34
- (IBAction)showAndHidePlaylist:(id)sender;
35
- (IBAction)backwardsNavigationAction:(id)sender;
36
- (IBAction)forwardsNavigationAction:(id)sender;
37
-- (IBAction)segmentedControlAction:(id)sender;
38
+- (IBAction)segmentedTitleControlAction:(id)sender;
39
+- (IBAction)gridVsListSegmentedControlAction:(id)sender;
40
+
41
@end
42
43
NS_ASSUME_NONNULL_END
44
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/library/VLCLibraryWindow.m -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/VLCLibraryWindow.m
Changed
201
1
2
*****************************************************************************/
3
4
#import "VLCLibraryWindow.h"
5
-#include "VLCLibraryDataTypes.h"
6
+
7
+#import "VLCLibraryDataTypes.h"
8
+
9
#import "extensions/NSString+Helpers.h"
10
#import "extensions/NSFont+VLCAdditions.h"
11
#import "extensions/NSColor+VLCAdditions.h"
12
13
#import "library/VLCLibrarySortingMenuController.h"
14
#import "library/VLCLibraryNavigationStack.h"
15
#import "library/VLCLibraryUIUnits.h"
16
+#import "library/VLCLibraryWindowPersistentPreferences.h"
17
18
#import "library/video-library/VLCLibraryVideoCollectionViewsStackViewController.h"
19
#import "library/video-library/VLCLibraryVideoTableViewDataSource.h"
20
21
22
#import "library/audio-library/VLCLibraryAlbumTableCellView.h"
23
#import "library/audio-library/VLCLibraryAudioViewController.h"
24
+#import "library/audio-library/VLCLibraryAudioDataSource.h"
25
26
#import "media-source/VLCMediaSourceBaseDataSource.h"
27
#import "media-source/VLCLibraryMediaSourceViewController.h"
28
29
{
30
super encodeRestorableStateWithCoder:coder;
31
coder encodeInteger:_segmentedTitleControl.selectedSegment forKey:@"macosx-library-selected-segment";
32
- coder encodeInteger:_gridVsListSegmentedControl.selectedSegment forKey:@"macosx-library-view-mode-selected-segment";
33
coder encodeInteger:_audioSegmentedControl.selectedSegment forKey:@"macosx-library-audio-view-selected-segment";
34
}
35
36
37
38
#pragma mark - misc. user interactions
39
40
-- (void)setViewForSelectedSegment
41
+- (void)updateGridVsListViewModeSegmentedControl
42
{
43
- _currentSelectedSegment = _segmentedTitleControl.selectedSegment;
44
- _currentSelectedViewModeSegment = _gridVsListSegmentedControl.selectedSegment;
45
+ const VLCLibrarySegment selectedLibrarySegment = _segmentedTitleControl.selectedSegment;
46
+ VLCLibraryWindowPersistentPreferences * const preferences = VLCLibraryWindowPersistentPreferences.sharedInstance;
47
48
- VLCLibrarySegment selectedLibrarySegment = _segmentedTitleControl.selectedSegment;
49
switch (selectedLibrarySegment) {
50
case VLCLibraryVideoSegment:
51
+ _currentSelectedViewModeSegment = preferences.videoLibraryViewMode;
52
+ break;
53
+ case VLCLibraryMusicSegment:
54
+ {
55
+ const VLCAudioLibrarySegment selectedAudioSegment = _audioSegmentedControl.selectedSegment;
56
+ switch (selectedAudioSegment) {
57
+ case VLCAudioLibraryArtistsSegment:
58
+ _currentSelectedViewModeSegment = preferences.artistLibraryViewMode;
59
+ break;
60
+ case VLCAudioLibraryGenresSegment:
61
+ _currentSelectedViewModeSegment = preferences.genreLibraryViewMode;
62
+ break;
63
+ case VLCAudioLibraryAlbumsSegment:
64
+ _currentSelectedViewModeSegment = preferences.albumLibraryViewMode;
65
+ break;
66
+ case VLCAudioLibrarySongsSegment:
67
+ _currentSelectedViewModeSegment = preferences.songsLibraryViewMode;
68
+ break;
69
+ default:
70
+ break;
71
+ }
72
+ break;
73
+ }
74
+ case VLCLibraryBrowseSegment:
75
+ _currentSelectedViewModeSegment = preferences.browseLibraryViewMode;
76
+ break;
77
+ case VLCLibraryStreamsSegment:
78
+ _currentSelectedViewModeSegment = preferences.streamLibraryViewMode;
79
+ break;
80
+ default:
81
+ break;
82
+ }
83
+
84
+ _gridVsListSegmentedControl.selectedSegment = _currentSelectedViewModeSegment;
85
+}
86
+
87
+- (void)setViewForSelectedSegment
88
+{
89
+ switch (_currentSelectedSegment) {
90
+ case VLCLibraryVideoSegment:
91
self showVideoLibrary;
92
break;
93
case VLCLibraryMusicSegment:
94
95
break;
96
case VLCLibraryBrowseSegment:
97
case VLCLibraryStreamsSegment:
98
- self showMediaSourceLibraryWithSegment:selectedLibrarySegment;
99
+ self showMediaSourceLibraryWithSegment:_currentSelectedSegment;
100
break;
101
default:
102
break;
103
}
104
+
105
+ self invalidateRestorableState;
106
}
107
108
-- (IBAction)segmentedControlAction:(id)sender
109
+- (IBAction)segmentedTitleControlAction:(id)sender
110
{
111
- if (_segmentedTitleControl.selectedSegment == _currentSelectedSegment &&
112
- _gridVsListSegmentedControl.selectedSegment == _currentSelectedViewModeSegment) {
113
+ if (_segmentedTitleControl.selectedSegment == _currentSelectedSegment) {
114
return;
115
}
116
117
+ _currentSelectedSegment = _segmentedTitleControl.selectedSegment;
118
+ self setViewForSelectedSegment;
119
+ self updateGridVsListViewModeSegmentedControl;
120
+}
121
+
122
+- (IBAction)gridVsListSegmentedControlAction:(id)sender
123
+{
124
+ if (_gridVsListSegmentedControl.selectedSegment == _currentSelectedViewModeSegment) {
125
+ return;
126
+ }
127
+
128
+ _currentSelectedViewModeSegment = _gridVsListSegmentedControl.selectedSegment;
129
+
130
+ const VLCLibrarySegment selectedLibrarySegment = _segmentedTitleControl.selectedSegment;
131
+ VLCLibraryWindowPersistentPreferences * const preferences = VLCLibraryWindowPersistentPreferences.sharedInstance;
132
+
133
+ switch (selectedLibrarySegment) {
134
+ case VLCLibraryVideoSegment:
135
+ preferences.videoLibraryViewMode = _currentSelectedViewModeSegment;
136
+ break;
137
+ case VLCLibraryMusicSegment:
138
+ {
139
+ const VLCAudioLibrarySegment selectedAudioSegment = _audioSegmentedControl.selectedSegment;
140
+ switch (selectedAudioSegment) {
141
+ case VLCAudioLibraryArtistsSegment:
142
+ preferences.artistLibraryViewMode = _currentSelectedViewModeSegment;
143
+ break;
144
+ case VLCAudioLibraryGenresSegment:
145
+ preferences.genreLibraryViewMode = _currentSelectedViewModeSegment;
146
+ break;
147
+ case VLCAudioLibraryAlbumsSegment:
148
+ preferences.albumLibraryViewMode = _currentSelectedViewModeSegment;
149
+ break;
150
+ case VLCAudioLibrarySongsSegment:
151
+ preferences.songsLibraryViewMode = _currentSelectedViewModeSegment;
152
+ break;
153
+ default:
154
+ break;
155
+ }
156
+ break;
157
+ }
158
+ case VLCLibraryBrowseSegment:
159
+ preferences.browseLibraryViewMode = _currentSelectedViewModeSegment;
160
+ break;
161
+ case VLCLibraryStreamsSegment:
162
+ preferences.streamLibraryViewMode = _currentSelectedViewModeSegment;
163
+ break;
164
+ default:
165
+ break;
166
+ }
167
+
168
self setViewForSelectedSegment;
169
- self invalidateRestorableState;
170
}
171
172
- (void)hideToolbarItem:(NSToolbarItem *)toolbarItem
173
174
self setLibrarySearchToolbarItemVisible:YES;
175
_optionBarView.hidden = YES;
176
177
- _gridVsListSegmentedControl.target = self;
178
- _gridVsListSegmentedControl.action = @selector(segmentedControlAction:);
179
-
180
_libraryVideoViewController presentVideoView;
181
}
182
183
184
self setLibrarySearchToolbarItemVisible:YES;
185
_optionBarView.hidden = NO;
186
187
- _gridVsListSegmentedControl.target = self;
188
- _gridVsListSegmentedControl.action = @selector(segmentedControlAction:);
189
-
190
_libraryAudioViewController presentAudioView;
191
}
192
193
194
- (IBAction)goToBrowseSection:(id)sender
195
{
196
_segmentedTitleControl setSelected:YES forSegment:2;
197
- self segmentedControlAction:_segmentedTitleControl;
198
+ self segmentedTitleControlAction:_segmentedTitleControl;
199
}
200
201
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/library/VLCLibraryWindowController.m -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/VLCLibraryWindowController.m
Changed
17
1
2
VLCLibraryWindow *libraryWindow = VLCMain sharedInstance.libraryWindow;
3
4
NSInteger rememberedSelectedLibrarySegment = state decodeIntegerForKey:@"macosx-library-selected-segment";
5
- NSInteger rememberedSelectedLibraryViewModeSegment = state decodeIntegerForKey:@"macosx-library-view-mode-selected-segment";
6
NSInteger rememberedSelectedLibraryViewAudioSegment = state decodeIntegerForKey:@"macosx-library-audio-view-selected-segment";
7
8
libraryWindow.segmentedTitleControl setSelectedSegment:rememberedSelectedLibrarySegment;
9
- libraryWindow.gridVsListSegmentedControl setSelectedSegment:rememberedSelectedLibraryViewModeSegment;
10
libraryWindow.audioSegmentedControl setSelectedSegment:rememberedSelectedLibraryViewAudioSegment;
11
12
- libraryWindow segmentedControlAction:self;
13
+ libraryWindow segmentedTitleControlAction:self;
14
if (rememberedSelectedLibrarySegment == VLCLibraryMusicSegment) {
15
libraryWindow.libraryAudioViewController segmentedControlAction:self;
16
}
17
_service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/VLCLibraryWindowPersistentPreferences.h
Added
45
1
2
+/*****************************************************************************
3
+ * VLCLibraryWindowPersistentPreferences.h: MacOS X interface module
4
+ *****************************************************************************
5
+ * Copyright (C) 2023 VLC authors and VideoLAN
6
+ *
7
+ * Authors: Claudio Cambra <developer@claudiocambra.com>
8
+ *
9
+ * This program is free software; you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation; either version 2 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program; if not, write to the Free Software
21
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22
+ *****************************************************************************/
23
+
24
+#import <Cocoa/Cocoa.h>
25
+
26
+#import "VLCLibraryWindow.h"
27
+
28
+NS_ASSUME_NONNULL_BEGIN
29
+
30
+@interface VLCLibraryWindowPersistentPreferences : NSObject
31
+
32
++ (VLCLibraryWindowPersistentPreferences *)sharedInstance;
33
+
34
+@property (readwrite, nonatomic) VLCLibraryViewModeSegment videoLibraryViewMode;
35
+@property (readwrite, nonatomic) VLCLibraryViewModeSegment albumLibraryViewMode;
36
+@property (readwrite, nonatomic) VLCLibraryViewModeSegment genreLibraryViewMode;
37
+@property (readwrite, nonatomic) VLCLibraryViewModeSegment songsLibraryViewMode;
38
+@property (readwrite, nonatomic) VLCLibraryViewModeSegment artistLibraryViewMode;
39
+@property (readwrite, nonatomic) VLCLibraryViewModeSegment browseLibraryViewMode;
40
+@property (readwrite, nonatomic) VLCLibraryViewModeSegment streamLibraryViewMode;
41
+
42
+@end
43
+
44
+NS_ASSUME_NONNULL_END
45
_service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/VLCLibraryWindowPersistentPreferences.m
Added
161
1
2
+/*****************************************************************************
3
+ * VLCLibraryWindowPersistentPreferences.m: MacOS X interface module
4
+ *****************************************************************************
5
+ * Copyright (C) 2023 VLC authors and VideoLAN
6
+ *
7
+ * Authors: Claudio Cambra <developer@claudiocambra.com>
8
+ *
9
+ * This program is free software; you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation; either version 2 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program; if not, write to the Free Software
21
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22
+ *****************************************************************************/
23
+
24
+#import "VLCLibraryWindowPersistentPreferences.h"
25
+
26
+NSString * const VLCLibraryWindowPreferencePrefix = @"VLCLibraryWindow";
27
+
28
+NSString * const VLCLibraryVideoLibraryViewModePreferenceKey = @"VideoLibraryViewMode";
29
+NSString * const VLCLibraryAlbumLibraryViewModePreferenceKey = @"AlbumLibraryViewMode";
30
+NSString * const VLCLibraryGenreLibraryViewModePreferenceKey = @"GenreLibraryViewMode";
31
+NSString * const VLCLibrarySongsLibraryViewModePreferenceKey = @"SongsLibraryViewMode";
32
+NSString * const VLCLibraryArtistLibraryViewModePreferenceKey = @"ArtistLibraryViewMode";
33
+NSString * const VLCLibraryBrowseLibraryViewModePreferenceKey = @"BrowseLibraryViewMode";
34
+NSString * const VLCLibraryStreamLibraryViewModePreferenceKey = @"StreamLibraryViewMode";
35
+
36
+@implementation VLCLibraryWindowPersistentPreferences
37
+
38
+static VLCLibraryWindowPersistentPreferences *sharedInstance = nil;
39
+
40
++ (VLCLibraryWindowPersistentPreferences *)sharedInstance
41
+{
42
+ static dispatch_once_t pred;
43
+ dispatch_once(&pred, ^{
44
+ sharedInstance = VLCLibraryWindowPersistentPreferences alloc init;
45
+ });
46
+
47
+ return sharedInstance;
48
+}
49
+
50
+- (NSString * const)fullLibraryWindowKey:(NSString *)partialKey
51
+{
52
+ return NSString stringWithFormat:@"%@.%@", VLCLibraryWindowPreferencePrefix, partialKey;
53
+}
54
+
55
+- (const NSInteger)libraryViewModePreferenceWithKey:(NSString *)key
56
+{
57
+ NSUserDefaults * const standardUserDefaults = NSUserDefaults.standardUserDefaults;
58
+ NSString * const fullKey = self fullLibraryWindowKey:key;
59
+ NSInteger viewModeValue = standardUserDefaults integerForKey:fullKey;
60
+
61
+ if (viewModeValue <= VLCLibrarySmallestSentinelViewModeSegment ||
62
+ viewModeValue >= VLCLibraryLargestSentinelViewModeSegment) {
63
+
64
+ NSLog(@"WARNING: Retrieved invalid values for library view mode. Resorting to default.");
65
+ viewModeValue = VLCLibraryGridViewModeSegment; // Set to workable default
66
+ }
67
+
68
+ return viewModeValue;
69
+}
70
+
71
+- (void)setLibraryWindowViewModePreferenceWithKey:(NSString *)key
72
+ value:(VLCLibraryViewModeSegment)viewMode
73
+{
74
+ NSParameterAssert(viewMode > VLCLibrarySmallestSentinelViewModeSegment &&
75
+ viewMode < VLCLibraryLargestSentinelViewModeSegment);
76
+
77
+ NSUserDefaults * const standardUserDefaults = NSUserDefaults.standardUserDefaults;
78
+ NSString * const fullKey = self fullLibraryWindowKey:key;
79
+ standardUserDefaults setInteger:viewMode forKey:fullKey;
80
+}
81
+
82
+- (VLCLibraryViewModeSegment)videoLibraryViewMode
83
+{
84
+ return self libraryViewModePreferenceWithKey:VLCLibraryVideoLibraryViewModePreferenceKey;
85
+}
86
+
87
+- (void)setVideoLibraryViewMode:(VLCLibraryViewModeSegment)videoLibraryViewMode
88
+{
89
+ self setLibraryWindowViewModePreferenceWithKey:VLCLibraryVideoLibraryViewModePreferenceKey
90
+ value:videoLibraryViewMode;
91
+}
92
+
93
+- (VLCLibraryViewModeSegment)albumLibraryViewMode
94
+{
95
+ return self libraryViewModePreferenceWithKey:VLCLibraryAlbumLibraryViewModePreferenceKey;
96
+}
97
+
98
+- (void)setAlbumLibraryViewMode:(VLCLibraryViewModeSegment)albumLibraryViewMode
99
+{
100
+ self setLibraryWindowViewModePreferenceWithKey:VLCLibraryAlbumLibraryViewModePreferenceKey
101
+ value:albumLibraryViewMode;
102
+
103
+}
104
+
105
+- (VLCLibraryViewModeSegment)genreLibraryViewMode
106
+{
107
+ return self libraryViewModePreferenceWithKey:VLCLibraryGenreLibraryViewModePreferenceKey;
108
+}
109
+
110
+- (void)setGenreLibraryViewMode:(VLCLibraryViewModeSegment)genreLibraryViewMode
111
+{
112
+ self setLibraryWindowViewModePreferenceWithKey:VLCLibraryGenreLibraryViewModePreferenceKey
113
+ value:genreLibraryViewMode;
114
+}
115
+
116
+- (VLCLibraryViewModeSegment)songsLibraryViewMode
117
+{
118
+ return self libraryViewModePreferenceWithKey:VLCLibrarySongsLibraryViewModePreferenceKey;
119
+}
120
+
121
+- (void)setSongsLibraryViewMode:(VLCLibraryViewModeSegment)songsLibraryViewMode
122
+{
123
+ self setLibraryWindowViewModePreferenceWithKey:VLCLibrarySongsLibraryViewModePreferenceKey
124
+ value:songsLibraryViewMode;
125
+}
126
+
127
+- (VLCLibraryViewModeSegment)artistLibraryViewMode
128
+{
129
+ return self libraryViewModePreferenceWithKey:VLCLibraryArtistLibraryViewModePreferenceKey;
130
+}
131
+
132
+- (void)setArtistLibraryViewMode:(VLCLibraryViewModeSegment)artistLibraryViewMode
133
+{
134
+ self setLibraryWindowViewModePreferenceWithKey:VLCLibraryArtistLibraryViewModePreferenceKey
135
+ value:artistLibraryViewMode;
136
+}
137
+
138
+- (VLCLibraryViewModeSegment)browseLibraryViewMode
139
+{
140
+ return self libraryViewModePreferenceWithKey:VLCLibraryBrowseLibraryViewModePreferenceKey;
141
+}
142
+
143
+- (void)setBrowseLibraryViewMode:(VLCLibraryViewModeSegment)browseLibraryViewMode
144
+{
145
+ self setLibraryWindowViewModePreferenceWithKey:VLCLibraryBrowseLibraryViewModePreferenceKey
146
+ value:browseLibraryViewMode;
147
+}
148
+
149
+- (VLCLibraryViewModeSegment)streamLibraryViewMode
150
+{
151
+ return self libraryViewModePreferenceWithKey:VLCLibraryStreamLibraryViewModePreferenceKey;
152
+}
153
+
154
+- (void)setStreamLibraryViewMode:(VLCLibraryViewModeSegment)streamLibraryViewMode
155
+{
156
+ self setLibraryWindowViewModePreferenceWithKey:VLCLibraryStreamLibraryViewModePreferenceKey
157
+ value:streamLibraryViewMode;
158
+}
159
+
160
+@end
161
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/library/audio-library/VLCLibraryAlbumTableCellView.m -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/audio-library/VLCLibraryAlbumTableCellView.m
Changed
18
1
2
3
self.representedImageView.image = _representedAlbum.smallArtworkImage;
4
5
- _tracksDataSource.representedAlbum = _representedAlbum;
6
- _tracksTableView reloadData;
7
+ __weak typeof(self) weakSelf = self; // Prevent retain cycle
8
+ _tracksDataSource setRepresentedAlbum:_representedAlbum withCompletion:^{
9
+ __strong typeof(self) strongSelf = weakSelf;
10
+
11
+ if (strongSelf) {
12
+ strongSelf->_tracksTableView reloadData;
13
+ }
14
+ };
15
}
16
17
- (void)setRepresentedItem:(id<VLCMediaLibraryItemProtocol>)libraryItem
18
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/library/audio-library/VLCLibraryAlbumTracksDataSource.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/audio-library/VLCLibraryAlbumTracksDataSource.h
Changed
11
1
2
3
@property (readwrite, retain, nonatomic, nullable) VLCMediaLibraryAlbum *representedAlbum;
4
5
+- (void)setRepresentedAlbum:(VLCMediaLibraryAlbum*)album
6
+ withCompletion:(nullable void(^)(void))completionHandler;
7
+
8
@end
9
10
NS_ASSUME_NONNULL_END
11
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/library/audio-library/VLCLibraryAlbumTracksDataSource.m -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/audio-library/VLCLibraryAlbumTracksDataSource.m
Changed
62
1
2
const CGFloat VLCLibraryTracksRowHeight = 40.;
3
4
@interface VLCLibraryAlbumTracksDataSource ()
5
-{
6
- NSArray *_tracks;
7
-}
8
+
9
+@property (readwrite, atomic) NSArray<VLCMediaLibraryMediaItem*> *tracks;
10
+@property (readwrite, atomic) VLCMediaLibraryAlbum *internalAlbum;
11
+
12
@end
13
14
@implementation VLCLibraryAlbumTracksDataSource
15
16
+- (VLCMediaLibraryAlbum*)representedAlbum
17
+{
18
+ return self.internalAlbum;
19
+}
20
+
21
- (void)setRepresentedAlbum:(VLCMediaLibraryAlbum *)representedAlbum
22
{
23
- _representedAlbum = representedAlbum;
24
- _tracks = _representedAlbum tracksAsMediaItems;
25
+ self setRepresentedAlbum:representedAlbum withCompletion:nil;
26
+}
27
+
28
+- (void)setRepresentedAlbum:(id)album
29
+ withCompletion:(nullable void (^)(void))completionHandler
30
+{
31
+ self.internalAlbum = album;
32
+
33
+ dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INTERACTIVE, 0), ^{
34
+ self.tracks = self.representedAlbum tracksAsMediaItems;
35
+
36
+ dispatch_async(dispatch_get_main_queue(), ^{
37
+ if (completionHandler != nil) {
38
+ completionHandler();
39
+ }
40
+ });
41
+ });
42
}
43
44
- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView
45
{
46
- if (_representedAlbum != nil) {
47
- return _representedAlbum.numberOfTracks;
48
+ if (self.representedAlbum != nil) {
49
+ return self.representedAlbum.numberOfTracks;
50
}
51
52
return 0;
53
54
- (id<VLCMediaLibraryItemProtocol>)libraryItemAtRow:(NSInteger)row
55
forTableView:(NSTableView *)tableView
56
{
57
- return _tracksrow;
58
+ return self.tracksrow;
59
}
60
61
@end
62
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/library/audio-library/VLCLibraryAudioDataSource.m -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/audio-library/VLCLibraryAudioDataSource.m
Changed
201
1
2
#import "extensions/NSString+Helpers.h"
3
#import "extensions/NSPasteboardItem+VLCAdditions.h"
4
5
+#import "playlist/VLCPlayerController.h"
6
#import "playlist/VLCPlaylistController.h"
7
#import "playlist/VLCPlaylistItem.h"
8
#import "playlist/VLCPlaylistModel.h"
9
10
11
@interface VLCLibraryAudioDataSource ()
12
{
13
- NSArray *_displayedCollection;
14
enum vlc_ml_parent_type _currentParentType;
15
16
id<VLCMediaLibraryItemProtocol> _selectedCollectionViewItem;
17
18
id<VLCMediaLibraryItemProtocol> _selectedGroupSelectionTableViewItem;
19
id<VLCMediaLibraryItemProtocol> _selectedSongTableViewItem;
20
}
21
+
22
+@property (readwrite, atomic) NSArray *displayedCollection;
23
+
24
@end
25
26
@implementation VLCLibraryAudioDataSource
27
28
name:VLCLibraryModelGenreListUpdated
29
object:nil;
30
notificationCenter addObserver:self
31
- selector:@selector(playlistItemChanged:)
32
- name:VLCPlaylistCurrentItemChanged
33
+ selector:@selector(currentlyPlayingItemChanged:)
34
+ name:VLCPlayerCurrentMediaItemChanged
35
object:nil;
36
}
37
38
return self;
39
}
40
41
-- (void)playlistItemChanged:(NSNotification *)aNotification
42
+- (void)currentlyPlayingItemChanged:(NSNotification *)aNotification
43
{
44
- NSParameterAssert(aNotification);
45
- VLCPlaylistController *playlistController = (VLCPlaylistController *)aNotification.object;
46
- NSAssert(playlistController, @"Should receive valid playlist controller from notification");
47
- VLCPlaylistModel *playlistModel = playlistController.playlistModel;
48
- NSAssert(playlistModel, @"Should receive valid playlist model");
49
-
50
- // If we use the playlist's currentPlayingItem we will get the same item we had before.
51
- // Let's instead grab the playlist item from the playlist model, as we know this is
52
- // updated before the VLCPlaylistCurrentItemChanged notification is sent out
53
- size_t currentPlaylistIndex = playlistController.currentPlaylistIndex;
54
- if (currentPlaylistIndex < 0) {
55
- return;
56
- }
57
-
58
- VLCPlaylistItem *currentPlayingItem = playlistModel playlistItemAtIndex:currentPlaylistIndex;
59
- if (!currentPlayingItem) {
60
- return;
61
- }
62
-
63
- VLCInputItem *currentInputItem = currentPlayingItem.inputItem;
64
- if (!currentPlayingItem) {
65
+ VLCPlayerController * const playerController = VLCMain.sharedInstance.playlistController.playerController;
66
+ VLCInputItem * const currentInputItem = playerController.currentMedia;
67
+ if (!currentInputItem) {
68
return;
69
}
70
71
if (_currentParentType == VLC_ML_PARENT_UNKNOWN) {
72
- NSString *currentItemMrl = currentInputItem.MRL;
73
+ NSString * const currentItemMrl = currentInputItem.MRL;
74
75
- NSUInteger itemIndexInDisplayedCollection = self->_displayedCollection indexOfObjectPassingTest:^BOOL(id element, NSUInteger idx, BOOL *stop) {
76
- VLCMediaLibraryMediaItem *mediaItem = (VLCMediaLibraryMediaItem *)element;
77
+ const NSUInteger itemIndexInDisplayedCollection = self.displayedCollection indexOfObjectPassingTest:^BOOL(id element, NSUInteger idx, BOOL *stop) {
78
+ VLCMediaLibraryMediaItem * const mediaItem = (VLCMediaLibraryMediaItem *)element;
79
return mediaItem.inputItem.MRL isEqualToString:currentItemMrl;
80
};
81
82
83
return nil;
84
}
85
86
- return _displayedCollectionindexPath.item;
87
+ return self.displayedCollectionindexPath.item;
88
}
89
90
- (void)restoreSelectionState
91
92
93
- (NSUInteger)findSelectedItemNewIndex:(id<VLCMediaLibraryItemProtocol>)item
94
{
95
- return _displayedCollection indexOfObjectPassingTest:^BOOL(id element, NSUInteger idx, BOOL *stop) {
96
+ return self.displayedCollection indexOfObjectPassingTest:^BOOL(id element, NSUInteger idx, BOOL *stop) {
97
id<VLCMediaLibraryItemProtocol> itemElement = (id<VLCMediaLibraryItemProtocol>)element;
98
return itemElement.libraryID == item.libraryID;
99
};
100
101
102
- (void)reloadData
103
{
104
- self retainSelectedMediaItem;
105
- self->_displayedCollection = self collectionToDisplay;
106
- self resetLayoutsForOperation:^{
107
- self.collectionView reloadData;
108
- self.gridModeListTableView reloadData;
109
- self.gridModeListSelectionCollectionView reloadData;
110
- self.collectionSelectionTableView reloadData;
111
- self.groupSelectionTableView reloadData;
112
- self.songsTableView reloadData;
113
- };
114
- self restoreSelectionState;
115
+ dispatch_async(dispatch_get_main_queue(), ^{
116
+ self retainSelectedMediaItem;
117
+ self.displayedCollection = self collectionToDisplay;
118
+
119
+ self resetLayoutsForOperation:^{
120
+ self.collectionView reloadData;
121
+ self.gridModeListTableView reloadData;
122
+ self.gridModeListSelectionCollectionView reloadData;
123
+ self.collectionSelectionTableView reloadData;
124
+ self.groupSelectionTableView reloadData;
125
+ self.songsTableView reloadData;
126
+ };
127
+ self restoreSelectionState;
128
+ });
129
}
130
131
- (NSUInteger)indexForMediaLibraryItemWithId:(const int64_t)itemId
132
{
133
- return _displayedCollection indexOfObjectPassingTest:^BOOL(VLCMediaLibraryMediaItem * const mediaItem, const NSUInteger idx, BOOL * const stop) {
134
+ return self.displayedCollection indexOfObjectPassingTest:^BOOL(VLCMediaLibraryMediaItem * const mediaItem, const NSUInteger idx, BOOL * const stop) {
135
NSAssert(mediaItem != nil, @"Cache list should not contain nil media items");
136
return mediaItem.libraryID == itemId;
137
};
138
139
return;
140
}
141
142
- NSMutableArray * const mutableCollectionCopy = self->_displayedCollection mutableCopy;
143
+ NSMutableArray * const mutableCollectionCopy = self.displayedCollection mutableCopy;
144
mutableCollectionCopy replaceObjectAtIndex:index withObject:mediaItem;
145
- self->_displayedCollection = mutableCollectionCopy copy;
146
+ self.displayedCollection = mutableCollectionCopy copy;
147
148
NSIndexPath * const indexPath = NSIndexPath indexPathForItem:index inSection:0;
149
NSIndexSet * const rowIndexSet = NSIndexSet indexSetWithIndex:index;
150
151
return;
152
}
153
154
- NSMutableArray * const mutableCollectionCopy = self->_displayedCollection mutableCopy;
155
+ NSMutableArray * const mutableCollectionCopy = self.displayedCollection mutableCopy;
156
mutableCollectionCopy removeObjectAtIndex:index;
157
- self->_displayedCollection = mutableCollectionCopy copy;
158
+ self.displayedCollection = mutableCollectionCopy copy;
159
160
NSIndexPath * const indexPath = NSIndexPath indexPathForItem:index inSection:0;
161
NSIndexSet * const rowIndexSet = NSIndexSet indexSetWithIndex:index;
162
163
_audioLibrarySegment = audioLibrarySegment;
164
switch (_audioLibrarySegment) {
165
case VLCAudioLibraryArtistsSegment:
166
- _displayedCollection = self.libraryModel listOfArtists;
167
+ self.displayedCollection = self.libraryModel listOfArtists;
168
_currentParentType = VLC_ML_PARENT_ARTIST;
169
break;
170
case VLCAudioLibraryAlbumsSegment:
171
- _displayedCollection = self.libraryModel listOfAlbums;
172
+ self.displayedCollection = self.libraryModel listOfAlbums;
173
_currentParentType = VLC_ML_PARENT_ALBUM;
174
break;
175
case VLCAudioLibrarySongsSegment:
176
- _displayedCollection = self.libraryModel listOfAudioMedia;
177
+ self.displayedCollection = self.libraryModel listOfAudioMedia;
178
_currentParentType = VLC_ML_PARENT_UNKNOWN;
179
break;
180
case VLCAudioLibraryGenresSegment:
181
- _displayedCollection = self.libraryModel listOfGenres;
182
+ self.displayedCollection = self.libraryModel listOfGenres;
183
_currentParentType = VLC_ML_PARENT_GENRE;
184
break;
185
186
187
188
- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView
189
{
190
- NSInteger numItems = _displayedCollection.count;
191
+ const NSInteger numItems = self.displayedCollection.count;
192
return self displayAllArtistsGenresTableEntry ? numItems + 1 : numItems;
193
}
194
195
196
return VLCMediaLibraryDummyItem alloc initWithDisplayString:_NS("All artists")
197
withDetailString:@"";
198
} else if (viewDisplayingAllItemsEntry) {
199
- return _displayedCollectionrow - 1;
200
+ return self.displayedCollectionrow - 1;
201
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupDataSource.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupDataSource.h
Changed
10
1
2
3
@interface VLCLibraryAudioGroupDataSource : NSObject <VLCLibraryTableViewDataSource, VLCLibraryCollectionViewDataSource>
4
5
-@property (readwrite, retain, nullable) NSArray <VLCMediaLibraryAlbum *> *representedListOfAlbums;
6
+@property (readwrite, atomic, retain, nullable) NSArray <VLCMediaLibraryAlbum *> *representedListOfAlbums;
7
8
@end
9
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupDataSource.m -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupDataSource.m
Changed
55
1
2
3
- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView
4
{
5
- if (_representedListOfAlbums != nil) {
6
- return _representedListOfAlbums.count;
7
+ if (self.representedListOfAlbums != nil) {
8
+ return self.representedListOfAlbums.count;
9
}
10
11
return 0;
12
13
- (id<VLCMediaLibraryItemProtocol>)libraryItemAtRow:(NSInteger)row
14
forTableView:(NSTableView *)tableView
15
{
16
- return _representedListOfAlbumsrow;
17
+ return self.representedListOfAlbumsrow;
18
}
19
20
- (NSInteger)collectionView:(NSCollectionView *)collectionView
21
numberOfItemsInSection:(NSInteger)section
22
{
23
- return _representedListOfAlbums.count;
24
+ return self.representedListOfAlbums.count;
25
}
26
27
- (NSInteger)numberOfSectionsInCollectionView:(NSCollectionView *)collectionView
28
29
itemForRepresentedObjectAtIndexPath:(NSIndexPath *)indexPath
30
{
31
VLCLibraryCollectionViewItem *viewItem = collectionView makeItemWithIdentifier:VLCLibraryCellIdentifier forIndexPath:indexPath;
32
- viewItem.representedItem = _representedListOfAlbumsindexPath.item;
33
+ viewItem.representedItem = self.representedListOfAlbumsindexPath.item;
34
return viewItem;
35
}
36
37
38
39
VLCLibraryCollectionViewAlbumSupplementaryDetailView* albumSupplementaryDetailView = collectionView makeSupplementaryViewOfKind:kind withIdentifier:VLCLibraryCollectionViewAlbumSupplementaryDetailViewKind forIndexPath:indexPath;
40
41
- VLCMediaLibraryAlbum *album = _representedListOfAlbumsindexPath.item;
42
+ VLCMediaLibraryAlbum * const album = self.representedListOfAlbumsindexPath.item;
43
albumSupplementaryDetailView.representedAlbum = album;
44
albumSupplementaryDetailView.selectedItem = collectionView itemAtIndex:indexPath.item;
45
albumSupplementaryDetailView.parentScrollView = VLCMain sharedInstance.libraryWindow.audioCollectionViewScrollView;
46
47
- (id<VLCMediaLibraryItemProtocol>)libraryItemAtIndexPath:(NSIndexPath *)indexPath
48
forCollectionView:(NSCollectionView *)collectionView
49
{
50
- return _representedListOfAlbumsindexPath.item;
51
+ return self.representedListOfAlbumsindexPath.item;
52
}
53
54
@end
55
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/library/audio-library/VLCLibraryAudioViewController.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/audio-library/VLCLibraryAudioViewController.h
Changed
9
1
2
@property (readonly) NSScrollView *audioLibraryGridModeSplitViewListSelectionCollectionViewScrollView;
3
@property (readonly) NSCollectionView *audioLibraryGridModeSplitViewListSelectionCollectionView;
4
@property (readonly) NSSegmentedControl *audioSegmentedControl;
5
-@property (readonly) NSSegmentedControl *gridVsListSegmentedControl;
6
@property (readonly) NSSegmentedControl *segmentedTitleControl;
7
@property (readonly) NSImageView *placeholderImageView;
8
@property (readonly) NSTextField *placeholderLabel;
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/library/audio-library/VLCLibraryAudioViewController.m -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/audio-library/VLCLibraryAudioViewController.m
Changed
130
1
2
#import "library/VLCLibraryController.h"
3
#import "library/VLCLibraryModel.h"
4
#import "library/VLCLibraryNavigationStack.h"
5
+#import "library/VLCLibraryTwoPaneSplitViewDelegate.h"
6
#import "library/VLCLibraryWindow.h"
7
+#import "library/VLCLibraryWindowPersistentPreferences.h"
8
9
#import "library/audio-library/VLCLibraryAlbumTableCellView.h"
10
#import "library/audio-library/VLCLibraryAudioDataSource.h"
11
12
VLCLibraryCollectionViewDelegate *_audioLibraryCollectionViewDelegate;
13
VLCLibraryAudioTableViewDelegate *_audioLibraryTableViewDelegate;
14
VLCLibraryAudioGroupTableViewDelegate *_audioGroupLibraryTableViewDelegate;
15
+ VLCLibraryTwoPaneSplitViewDelegate *_splitViewDelegate;
16
}
17
@end
18
19
20
_audioLibraryCollectionViewDelegate = VLCLibraryCollectionViewDelegate alloc init;
21
_audioLibraryTableViewDelegate = VLCLibraryAudioTableViewDelegate alloc init;
22
_audioGroupLibraryTableViewDelegate = VLCLibraryAudioGroupTableViewDelegate alloc init;
23
+ _splitViewDelegate = VLCLibraryTwoPaneSplitViewDelegate alloc init;
24
25
+ self setupAudioPlaceholderView;
26
self setupAudioCollectionView;
27
self setupGridModeSplitView;
28
self setupAudioTableViews;
29
30
_audioLibraryGridModeSplitViewListSelectionCollectionView = libraryWindow.audioLibraryGridModeSplitViewListSelectionCollectionView;
31
32
_audioSegmentedControl = libraryWindow.audioSegmentedControl;
33
- _gridVsListSegmentedControl = libraryWindow.gridVsListSegmentedControl;
34
_segmentedTitleControl = libraryWindow.segmentedTitleControl;
35
_placeholderImageView = libraryWindow.placeholderImageView;
36
_placeholderLabel = libraryWindow.placeholderLabel;
37
38
39
- (void)setupAudioTableViews
40
{
41
+ _audioLibrarySplitView.delegate = _splitViewDelegate;
42
+
43
_audioCollectionSelectionTableView.dataSource = _audioDataSource;
44
_audioCollectionSelectionTableView.delegate = _audioLibraryTableViewDelegate;
45
46
47
48
- (void)setupGridModeSplitView
49
{
50
+ _audioLibraryGridModeSplitView.delegate = _splitViewDelegate;
51
+
52
_audioLibraryGridModeSplitViewListTableView.dataSource = _audioDataSource;
53
_audioLibraryGridModeSplitViewListTableView.delegate = _audioLibraryTableViewDelegate;
54
55
56
57
- (void)presentPlaceholderAudioView
58
{
59
- for (NSLayoutConstraint *constraint in _libraryWindow.libraryVideoViewController.videoPlaceholderImageViewSizeConstraints) {
60
+ for (NSLayoutConstraint * const constraint in _libraryWindow.libraryVideoViewController.videoPlaceholderImageViewSizeConstraints) {
61
constraint.active = NO;
62
}
63
- for (NSLayoutConstraint *constraint in _audioPlaceholderImageViewSizeConstraints) {
64
+ for (NSLayoutConstraint * const constraint in _audioPlaceholderImageViewSizeConstraints) {
65
constraint.active = YES;
66
}
67
68
- NSInteger selectedLibrarySegment = _audioSegmentedControl.selectedSegment;
69
+ const NSInteger selectedLibrarySegment = _audioSegmentedControl.selectedSegment;
70
71
if(selectedLibrarySegment < _placeholderImageNames.count && selectedLibrarySegment >= 0) {
72
_placeholderImageView.image = NSImage imageNamed:_placeholderImageNamesselectedLibrarySegment;
73
74
75
_emptyLibraryView.translatesAutoresizingMaskIntoConstraints = NO;
76
_libraryTargetView.subviews = @_emptyLibraryView;
77
- NSDictionary *dict = NSDictionaryOfVariableBindings(_emptyLibraryView);
78
+ NSDictionary * const dict = NSDictionaryOfVariableBindings(_emptyLibraryView);
79
_libraryTargetView addConstraints:NSLayoutConstraint constraintsWithVisualFormat:@"H:|_emptyLibraryView(>=572.)|" options:0 metrics:0 views:dict;
80
_libraryTargetView addConstraints:NSLayoutConstraint constraintsWithVisualFormat:@"V:|_emptyLibraryView(>=444.)|" options:0 metrics:0 views:dict;
81
82
83
84
- (void)updatePresentedView
85
{
86
- _audioDataSource.audioLibrarySegment = _audioSegmentedControl.selectedSegment;
87
+ const VLCAudioLibrarySegment audioLibrarySegment = _audioSegmentedControl.selectedSegment;
88
+ _audioDataSource.audioLibrarySegment = audioLibrarySegment;
89
90
if (_audioDataSource.libraryModel.listOfAudioMedia.count == 0) {
91
self presentPlaceholderAudioView;
92
93
self prepareAudioLibraryView;
94
self hideAllViews;
95
96
- if (self.gridVsListSegmentedControl.selectedSegment == VLCListViewModeSegment) {
97
+ VLCLibraryViewModeSegment viewModeSegment = VLCLibraryGridViewModeSegment; // default value
98
+ VLCLibraryWindowPersistentPreferences * const libraryWindowPrefs = VLCLibraryWindowPersistentPreferences.sharedInstance;
99
+
100
+ switch (audioLibrarySegment) {
101
+ case VLCAudioLibraryArtistsSegment:
102
+ viewModeSegment = libraryWindowPrefs.artistLibraryViewMode;
103
+ break;
104
+ case VLCAudioLibraryGenresSegment:
105
+ viewModeSegment = libraryWindowPrefs.genreLibraryViewMode;
106
+ break;
107
+ case VLCAudioLibrarySongsSegment:
108
+ viewModeSegment = libraryWindowPrefs.songsLibraryViewMode;
109
+ break;
110
+ case VLCAudioLibraryAlbumsSegment:
111
+ viewModeSegment = libraryWindowPrefs.albumLibraryViewMode;
112
+ break;
113
+ default:
114
+ break;
115
+ }
116
+
117
+ if (viewModeSegment == VLCLibraryListViewModeSegment) {
118
self presentAudioTableView;
119
- } else if (self.gridVsListSegmentedControl.selectedSegment == VLCGridViewModeSegment) {
120
+ } else if (viewModeSegment == VLCLibraryGridViewModeSegment) {
121
self presentAudioGridModeView;
122
+ } else {
123
+ NSAssert(false, @"View mode must be grid or list mode");
124
}
125
+
126
+ VLCMain.sharedInstance.libraryWindow updateGridVsListViewModeSegmentedControl;
127
}
128
}
129
130
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/library/audio-library/VLCLibraryCollectionViewAlbumSupplementaryDetailView.m -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/audio-library/VLCLibraryCollectionViewAlbumSupplementaryDetailView.m
Changed
19
1
2
_albumDetailsTextField.stringValue = _representedAlbum.artistName;
3
_albumYearAndDurationTextField.stringValue = NSString stringWithFormat:@"%u · %@", _representedAlbum.year, _representedAlbum.durationString;
4
_albumArtworkImageView.image = _representedAlbum.smallArtworkImage;
5
- _tracksDataSource.representedAlbum = _representedAlbum;
6
7
- _albumTracksTableView reloadData;
8
+ __weak typeof(self) weakSelf = self; // Prevent retain cycle
9
+ _tracksDataSource setRepresentedAlbum:_representedAlbum withCompletion:^{
10
+ __strong typeof(self) strongSelf = weakSelf;
11
+
12
+ if (strongSelf) {
13
+ strongSelf->_albumTracksTableView reloadData;
14
+ }
15
+ };
16
}
17
18
- (IBAction)playAction:(id)sender
19
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/library/audio-library/VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.m -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/audio-library/VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.m
Changed
18
1
2
}
3
4
_audioGroupNameTextField.stringValue = _representedAudioGroup.displayString;
5
- _audioGroupAlbumsDataSource.representedListOfAlbums = _representedAudioGroup.albums;
6
7
- _audioGroupAlbumsTableView reloadData;
8
+ dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INTERACTIVE, 0), ^{
9
+ self->_audioGroupAlbumsDataSource.representedListOfAlbums = self->_representedAudioGroup.albums;
10
+
11
+ dispatch_async(dispatch_get_main_queue(), ^{
12
+ self->_audioGroupAlbumsTableView reloadData;
13
+ });
14
+ });
15
}
16
17
@end
18
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/library/audio-library/VLCLibrarySongsTableViewSongPlayingTableCellView.m -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/audio-library/VLCLibrarySongsTableViewSongPlayingTableCellView.m
Changed
10
1
2
NSNotificationCenter *notificationCenter = NSNotificationCenter defaultCenter;
3
notificationCenter addObserver:self
4
selector:@selector(playStateOrItemChanged:)
5
- name:VLCPlaylistCurrentItemChanged
6
+ name:VLCPlayerCurrentMediaItemChanged
7
object:nil;
8
notificationCenter addObserver:self
9
selector:@selector(playStateOrItemChanged:)
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/library/media-source/VLCLibraryMediaSourceViewController.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/media-source/VLCLibraryMediaSourceViewController.h
Changed
10
1
2
@property (readonly) NSScrollView *tableViewScrollView;
3
@property (readonly) NSButton *homeButton;
4
@property (readonly) VLCInputNodePathControl *pathControl;
5
+@property (readonly) NSLayoutConstraint *pathControlBottomTableViewScrollViewConstraint;
6
+@property (readonly) NSLayoutConstraint *pathControlBottomCollectionViewScrollViewConstraint;
7
@property (readonly) NSSegmentedControl *gridVsListSegmentedControl;
8
9
@property (readonly) VLCMediaSourceBaseDataSource *baseDataSource;
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/library/media-source/VLCLibraryMediaSourceViewController.m -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/media-source/VLCLibraryMediaSourceViewController.m
Changed
20
1
2
_tableViewScrollView = libraryWindow.mediaSourceTableViewScrollView;
3
_homeButton = libraryWindow.mediaSourceHomeButton;
4
_pathControl = libraryWindow.mediaSourcePathControl;
5
+ _pathControlBottomTableViewScrollViewConstraint = libraryWindow.mediaSourcePathControlTableViewScrollViewBottomConstraint;
6
+ _pathControlBottomCollectionViewScrollViewConstraint = libraryWindow.mediaSourcePathControlCollectionViewScrollViewBottomConstraint;
7
_gridVsListSegmentedControl = libraryWindow.gridVsListSegmentedControl;
8
}
9
10
11
_baseDataSource.collectionViewScrollView = _collectionViewScrollView;
12
_baseDataSource.homeButton = _homeButton;
13
_baseDataSource.pathControl = _pathControl;
14
- _baseDataSource.gridVsListSegmentedControl = _gridVsListSegmentedControl;
15
+ _baseDataSource.pathControlBottomTableViewScrollViewConstraint = _pathControlBottomTableViewScrollViewConstraint;
16
+ _baseDataSource.pathControlBottomCollectionViewScrollViewConstraint = _pathControlBottomCollectionViewScrollViewConstraint;
17
_baseDataSource.tableView = _tableView;
18
_baseDataSource setupViews;
19
}
20
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/library/media-source/VLCMediaSourceBaseDataSource.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/media-source/VLCMediaSourceBaseDataSource.h
Changed
21
1
2
@property (readwrite) NSCollectionView *collectionView;
3
@property (readwrite) NSScrollView *collectionViewScrollView;
4
@property (readwrite) NSTableView *tableView;
5
-@property (readwrite) NSSegmentedControl *gridVsListSegmentedControl;
6
@property (readwrite) NSButton *homeButton;
7
@property (readwrite) VLCInputNodePathControl *pathControl;
8
+@property (readwrite) NSLayoutConstraint *pathControlBottomTableViewScrollViewConstraint;
9
+@property (readwrite) NSLayoutConstraint *pathControlBottomCollectionViewScrollViewConstraint;
10
@property (readwrite, nonatomic) VLCMediaSourceMode mediaSourceMode;
11
@property (readwrite, nonatomic) VLCMediaSourceDataSource *childDataSource;
12
13
14
- (void)reloadViews;
15
- (void)homeButtonAction:(id)sender;
16
- (void)pathControlAction:(id)sender;
17
-- (void)setGridOrListMode:(id)sender;
18
19
@end
20
21
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/library/media-source/VLCMediaSourceBaseDataSource.m -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/media-source/VLCMediaSourceBaseDataSource.m
Changed
115
1
2
#import "library/VLCLibraryCollectionViewSupplementaryElementView.h"
3
#import "library/VLCLibraryTableCellView.h"
4
#import "library/VLCLibraryUIUnits.h"
5
+#import "library/VLCLibraryWindowPersistentPreferences.h"
6
7
#import "main/VLCMain.h"
8
9
10
self.pathControl.action = @selector(pathControlAction:);
11
self.pathControl.target = self;
12
13
+ self togglePathControlVisibility:NO;
14
+
15
self.tableView.dataSource = self;
16
self.tableView.delegate = self;
17
self.tableView.hidden = YES;
18
19
20
- (void)reloadViews
21
{
22
- self.gridVsListSegmentedControl.action = @selector(setGridOrListMode:);
23
- self.gridVsListSegmentedControl.target = self;
24
- _gridViewMode = self.gridVsListSegmentedControl.selectedSegment == VLCGridViewModeSegment;
25
+ VLCLibraryViewModeSegment viewModeSegment = VLCLibraryGridViewModeSegment;
26
+ VLCLibraryWindowPersistentPreferences * const libraryWindowPrefs = VLCLibraryWindowPersistentPreferences.sharedInstance;
27
+
28
+ switch (_mediaSourceMode) {
29
+ case VLCMediaSourceModeLAN:
30
+ viewModeSegment = libraryWindowPrefs.browseLibraryViewMode;
31
+ break;
32
+ case VLCMediaSourceModeInternet:
33
+ viewModeSegment = libraryWindowPrefs.streamLibraryViewMode;
34
+ break;
35
+ default:
36
+ break;
37
+ }
38
39
- self setCurrentViewMode;
40
+ if (viewModeSegment == VLCLibraryGridViewModeSegment) {
41
+ self.collectionViewScrollView.hidden = NO;
42
+ self.tableView.hidden = YES;
43
+ self.collectionView reloadData;
44
+ } else if (viewModeSegment == VLCLibraryListViewModeSegment) {
45
+ self.collectionViewScrollView.hidden = YES;
46
+ self.tableView.hidden = NO;
47
+ self.tableView reloadData;
48
+ } else {
49
+ NSAssert(false, @"View mode must be grid or list mode");
50
+ }
51
}
52
53
- (void)loadMediaSources
54
55
56
self setChildDataSource:newChildDataSource;
57
VLCMain sharedInstance.libraryWindow.navigationStack appendCurrentLibraryState;
58
+
59
+ self togglePathControlVisibility:YES;
60
}
61
62
- (void)setChildDataSource:(VLCMediaSourceDataSource *)childDataSource
63
64
65
#pragma mark - user interaction with generic buttons
66
67
+- (void)togglePathControlVisibility:(BOOL)visible
68
+{
69
+ _homeButton.hidden = !visible;
70
+ _pathControl.hidden = !visible;
71
+ _pathControlBottomTableViewScrollViewConstraint.constant = visible ? VLCLibraryUIUnits mediumSpacing : 0;
72
+ _pathControlBottomCollectionViewScrollViewConstraint.constant = visible ? VLCLibraryUIUnits mediumSpacing : 0;
73
+}
74
+
75
- (void)returnHome
76
{
77
self.collectionView.dataSource = self;
78
79
self.pathControl clearInputNodePathControlItems;
80
81
self reloadData;
82
+
83
+ self togglePathControlVisibility:NO;
84
}
85
86
- (void)homeButtonAction:(id)sender
87
88
}
89
}
90
91
-- (void)setCurrentViewMode
92
-{
93
- if (_gridViewMode) {
94
- self.collectionViewScrollView.hidden = NO;
95
- self.tableView.hidden = YES;
96
- self.collectionView reloadData;
97
- } else {
98
- self.collectionViewScrollView.hidden = YES;
99
- self.tableView.hidden = NO;
100
- self.tableView reloadData;
101
- }
102
-}
103
-
104
-- (void)setGridOrListMode:(id)sender
105
-{
106
- _gridViewMode = self.gridVsListSegmentedControl.selectedSegment == VLCGridViewModeSegment;
107
- _childDataSource.gridViewMode = _gridViewMode;
108
-
109
- self setCurrentViewMode;
110
-}
111
-
112
#pragma mark - VLCMediaSource Delegation
113
114
- (void)mediaSourceChildrenReset:(NSNotification *)aNotification
115
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/library/media-source/VLCMediaSourceDataSource.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/media-source/VLCMediaSourceDataSource.h
Changed
9
1
2
@property (readwrite, assign) NSCollectionView *collectionView;
3
@property (readwrite, assign) NSTableView *tableView;
4
@property (readwrite) VLCInputNodePathControl *pathControl;
5
-@property (readwrite) BOOL gridViewMode;
6
7
- (void)setupViews;
8
- (VLCInputItem*)mediaSourceInputItemAtRow:(NSInteger)tableViewRow;
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/library/video-library/VLCLibraryVideoViewController.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/video-library/VLCLibraryVideoViewController.h
Changed
9
1
2
@property (readonly) NSTableView *videoLibraryGroupSelectionTableView;
3
@property (readonly) NSScrollView *videoLibraryGroupsTableViewScrollView;
4
@property (readonly) NSTableView *videoLibraryGroupsTableView;
5
-@property (readonly) NSSegmentedControl *gridVsListSegmentedControl;
6
@property (readonly) NSSegmentedControl *segmentedTitleControl;
7
@property (readonly) NSImageView *placeholderImageView;
8
@property (readonly) NSTextField *placeholderLabel;
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/library/video-library/VLCLibraryVideoViewController.m -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/library/video-library/VLCLibraryVideoViewController.m
Changed
65
1
2
3
#import "library/VLCLibraryController.h"
4
#import "library/VLCLibraryModel.h"
5
+#import "library/VLCLibraryTwoPaneSplitViewDelegate.h"
6
#import "library/VLCLibraryUIUnits.h"
7
#import "library/VLCLibraryWindow.h"
8
+#import "library/VLCLibraryWindowPersistentPreferences.h"
9
10
#import "library/audio-library/VLCLibraryAudioViewController.h"
11
12
13
@interface VLCLibraryVideoViewController ()
14
{
15
VLCLibraryVideoTableViewDelegate *_videoLibraryTableViewDelegate;
16
+ VLCLibraryTwoPaneSplitViewDelegate *_splitViewDelegate;
17
}
18
@end
19
20
21
22
if(self) {
23
_videoLibraryTableViewDelegate = VLCLibraryVideoTableViewDelegate alloc init;
24
+ _splitViewDelegate = VLCLibraryTwoPaneSplitViewDelegate alloc init;
25
26
self setupPropertiesFromLibraryWindow:libraryWindow;
27
self setupTableViewDataSource;
28
29
_videoLibraryGroupsTableViewScrollView = libraryWindow.videoLibraryGroupsTableViewScrollView;
30
_videoLibraryGroupsTableView = libraryWindow.videoLibraryGroupsTableView;
31
32
- _gridVsListSegmentedControl = libraryWindow.gridVsListSegmentedControl;
33
_segmentedTitleControl = libraryWindow.segmentedTitleControl;
34
_placeholderImageView = libraryWindow.placeholderImageView;
35
_placeholderLabel = libraryWindow.placeholderLabel;
36
37
38
- (void)setupTableViewDataSource
39
{
40
+ _videoLibrarySplitView.delegate = _splitViewDelegate;
41
_libraryVideoTableViewDataSource = VLCLibraryVideoTableViewDataSource alloc init;
42
_libraryVideoTableViewDataSource.libraryModel = VLCMain.sharedInstance.libraryController.libraryModel;
43
_libraryVideoTableViewDataSource.groupsTableView = _videoLibraryGroupsTableView;
44
45
_libraryTargetView addConstraints:NSLayoutConstraint constraintsWithVisualFormat:@"H:|_videoLibraryView(>=572.)|" options:0 metrics:0 views:dict;
46
_libraryTargetView addConstraints:NSLayoutConstraint constraintsWithVisualFormat:@"V:|_videoLibraryView(>=444.)|" options:0 metrics:0 views:dict;
47
48
- if (self.gridVsListSegmentedControl.selectedSegment == VLCGridViewModeSegment) {
49
+ const VLCLibraryViewModeSegment viewModeSegment = VLCLibraryWindowPersistentPreferences.sharedInstance.videoLibraryViewMode;
50
+
51
+ if (viewModeSegment == VLCLibraryGridViewModeSegment) {
52
_videoLibrarySplitView.hidden = YES;
53
_videoLibraryCollectionViewsStackViewScrollView.hidden = NO;
54
_libraryVideoCollectionViewsStackViewController reloadData;
55
- } else {
56
+ } else if (viewModeSegment == VLCLibraryListViewModeSegment) {
57
_videoLibrarySplitView.hidden = NO;
58
_videoLibraryCollectionViewsStackViewScrollView.hidden = YES;
59
_libraryVideoTableViewDataSource reloadData;
60
+ } else {
61
+ NSAssert(false, @"View mode must be grid or list mode");
62
}
63
}
64
65
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/menus/VLCMainMenu.m -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/menus/VLCMainMenu.m
Changed
10
1
2
object:nil;
3
notificationCenter addObserver:self
4
selector:@selector(mediaItemChanged:)
5
- name:VLCPlaylistCurrentItemChanged
6
+ name:VLCPlayerCurrentMediaItemChanged
7
object:nil;
8
notificationCenter addObserver:self
9
selector:@selector(voutListChanged:)
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/os-integration/VLCRemoteControlService.m -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/os-integration/VLCRemoteControlService.m
Changed
44
1
2
object:nil;
3
notificationCenter addObserver:self
4
selector:@selector(metaDataChangedForCurrentMedia:)
5
- name:VLCPlaylistCurrentItemChanged
6
+ name:VLCPlayerCurrentMediaItemChanged
7
object:nil;
8
notificationCenter addObserver:self
9
selector:@selector(playbackStateChanged:)
10
11
12
- (void)metaDataChangedForCurrentMedia:(NSNotification *)aNotification
13
{
14
- VLCInputItem *inputItem = _playerController.currentMedia;
15
+ VLCInputItem * const inputItem = _playerController.currentMedia;
16
17
- NSMutableDictionary *currentlyPlayingTrackInfo = NSMutableDictionary dictionary;
18
+ NSMutableDictionary * const currentlyPlayingTrackInfo = NSMutableDictionary dictionary;
19
self setTimeInformationForDictionary:currentlyPlayingTrackInfo;
20
self setRateInformationForDictionary:currentlyPlayingTrackInfo;
21
22
23
currentlyPlayingTrackInfoMPMediaItemPropertyAlbumTitle = inputItem.albumName;
24
currentlyPlayingTrackInfoMPMediaItemPropertyAlbumTrackNumber = @(inputItem.trackNumber intValue);
25
26
- vlc_tick_t duration = inputItem.duration;
27
+ const vlc_tick_t duration = inputItem.duration;
28
currentlyPlayingTrackInfoMPMediaItemPropertyPlaybackDuration = @(SEC_FROM_VLC_TICK(duration));
29
currentlyPlayingTrackInfoMPNowPlayingInfoPropertyIsLiveStream = @(duration <= 0);
30
31
- NSURL *artworkURL = inputItem.artworkURL;
32
+ NSURL * const artworkURL = inputItem.artworkURL;
33
if (artworkURL) {
34
- NSImage *coverArtImage = NSImage alloc initWithContentsOfURL:artworkURL;
35
+ NSImage * const coverArtImage = NSImage alloc initWithContentsOfURL:artworkURL;
36
if (coverArtImage) {
37
- MPMediaItemArtwork *mpartwork = MPMediaItemArtwork alloc initWithBoundsSize:coverArtImage.size
38
- requestHandler:^NSImage* _Nonnull(CGSize size) {
39
+ MPMediaItemArtwork * const mpartwork = MPMediaItemArtwork alloc initWithBoundsSize:coverArtImage.size
40
+ requestHandler:^NSImage* _Nonnull(CGSize size) {
41
return coverArtImage;
42
};
43
currentlyPlayingTrackInfoMPMediaItemPropertyArtwork = mpartwork;
44
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/panels/VLCInformationWindowController.m -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/panels/VLCInformationWindowController.m
Changed
26
1
2
NSNotificationCenter *notificationCenter = NSNotificationCenter defaultCenter;
3
if (_mainMenuInstance) {
4
notificationCenter addObserver:self
5
- selector:@selector(currentPlaylistItemChanged:)
6
- name:VLCPlaylistCurrentItemChanged
7
+ selector:@selector(currentPlayingItemChanged:)
8
+ name:VLCPlayerCurrentMediaItemChanged
9
object:nil;
10
notificationCenter addObserver:self
11
selector:@selector(updateStatistics:)
12
13
_lostAudioBuffersTextField setIntValue: 0;
14
}
15
16
-- (void)currentPlaylistItemChanged:(NSNotification *)aNotification
17
+- (void)currentPlayingItemChanged:(NSNotification *)aNotification
18
{
19
- VLCPlaylistController *playlistController = VLCMain sharedInstance playlistController;
20
- VLCInputItem *currentMediaItem = playlistController.currentlyPlayingInputItem;
21
+ VLCPlayerController * const playerController = VLCMain.sharedInstance.playlistController.playerController;
22
+ VLCInputItem * const currentMediaItem = playerController.currentMedia;
23
self setRepresentedInputItem:currentMediaItem;
24
}
25
26
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/playlist/VLCPlaybackContinuityController.m -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/playlist/VLCPlaybackContinuityController.m
Changed
31
1
2
NSNotificationCenter *notificationCenter = NSNotificationCenter defaultCenter;
3
notificationCenter addObserver:self
4
selector:@selector(inputItemChanged:)
5
- name:VLCPlaylistCurrentItemChanged
6
+ name:VLCPlayerCurrentMediaItemChanged
7
object:nil;
8
notificationCenter addObserver:self
9
selector:@selector(playbackStatusUpdated:)
10
11
12
- (void)inputItemChanged:(NSNotification *)aNotification
13
{
14
- VLCMain *mainInstance = VLCMain sharedInstance;
15
+ VLCPlayerController * const playerController = VLCMain.sharedInstance.playlistController.playerController;
16
+
17
// Cancel pending resume dialogs
18
_resumeDialogController cancel;
19
20
// object is hold here and released then it is dead
21
- _currentInput = mainInstance playlistController currentlyPlayingInputItem;
22
+ _currentInput = playerController.currentMedia;
23
if (_currentInput) {
24
- VLCPlaylistController *playlistController = aNotification.object;
25
- self continuePlaybackWhereYouLeftOff:_currentInput player:playlistController.playerController;
26
+ self continuePlaybackWhereYouLeftOff:_currentInput
27
+ player:playerController;
28
}
29
}
30
31
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/playlist/VLCPlaylistController.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/playlist/VLCPlaylistController.h
Changed
18
1
2
extern NSString *VLCPlaybackRepeatChanged;
3
extern NSString *VLCPlaybackHasPreviousChanged;
4
extern NSString *VLCPlaybackHasNextChanged;
5
-extern NSString *VLCPlaylistCurrentItemChanged;
6
+extern NSString *VLCPlaylistCurrentItemIndexChanged;
7
extern NSString *VLCPlaylistItemsAdded;
8
extern NSString *VLCPlaylistItemsRemoved;
9
10
11
* input of the currently playing item
12
@return returns the input item for the currently playing playlist item
13
@note the receiver is responsible for releasing the input item
14
- @note Subscribe to the VLCPlaylistCurrentItemChanged notification to be notified about changes
15
*/
16
@property (readonly, nullable) VLCInputItem *currentlyPlayingInputItem;
17
18
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/playlist/VLCPlaylistController.m -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/playlist/VLCPlaylistController.m
Changed
59
1
2
NSString *VLCPlaybackRepeatChanged = @"VLCPlaybackRepeatChanged";
3
NSString *VLCPlaybackHasPreviousChanged = @"VLCPlaybackHasPreviousChanged";
4
NSString *VLCPlaybackHasNextChanged = @"VLCPlaybackHasNextChanged";
5
-NSString *VLCPlaylistCurrentItemChanged = @"VLCPlaylistCurrentItemChanged";
6
+NSString *VLCPlaylistCurrentItemIndexChanged = @"VLCPlaylistCurrentItemIndexChanged";
7
NSString *VLCPlaylistItemsAdded = @"VLCPlaylistItemsAdded";
8
NSString *VLCPlaylistItemsRemoved = @"VLCPlaylistItemsRemoved";
9
10
11
- (void)playlistUpdatedForIndex:(size_t)firstUpdatedIndex items:(vlc_playlist_item_t *const *)items count:(size_t)numberOfItems;
12
- (void)playlistPlaybackRepeatUpdated:(enum vlc_playlist_playback_repeat)currentRepeatMode;
13
- (void)playlistPlaybackOrderUpdated:(enum vlc_playlist_playback_order)currentOrder;
14
-- (void)currentPlaylistItemChanged:(size_t)index;
15
+- (void)currentPlaylistItemIndexChanged:(size_t)index;
16
- (void)playlistHasPreviousItem:(BOOL)hasPrevious;
17
- (void)playlistHasNextItem:(BOOL)hasNext;
18
19
20
}
21
22
static void
23
-cb_playlist_current_item_changed(vlc_playlist_t *playlist,
24
+cb_playlist_current_item_index_changed(vlc_playlist_t *playlist,
25
ssize_t index,
26
void *p_data)
27
{
28
dispatch_async(dispatch_get_main_queue(), ^{
29
- VLCPlaylistController *playlistController = (__bridge VLCPlaylistController *)p_data;
30
- playlistController currentPlaylistItemChanged:index;
31
+ VLCPlaylistController * const playlistController = (__bridge VLCPlaylistController *)p_data;
32
+ playlistController currentPlaylistItemIndexChanged:index;
33
});
34
}
35
36
37
cb_playlist_items_updated,
38
cb_playlist_playback_repeat_changed,
39
cb_playlist_playback_order_changed,
40
- cb_playlist_current_item_changed,
41
+ cb_playlist_current_item_index_changed,
42
cb_playlist_has_prev_changed,
43
cb_playlist_has_next_changed,
44
};
45
46
_defaultNotificationCenter postNotificationName:VLCPlaybackOrderChanged object:self;
47
}
48
49
-- (void)currentPlaylistItemChanged:(size_t)index
50
+- (void)currentPlaylistItemIndexChanged:(size_t)index
51
{
52
_currentPlaylistIndex = index;
53
_playlistDataSource scrollToCurrentPlaylistItem;
54
- _defaultNotificationCenter postNotificationName:VLCPlaylistCurrentItemChanged object:self;
55
+ _defaultNotificationCenter postNotificationName:VLCPlaylistCurrentItemIndexChanged object:self;
56
}
57
58
- (void)playlistHasPreviousItem:(BOOL)hasPrevious
59
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/windows/mainwindow/VLCControlsBarCommon.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/windows/mainwindow/VLCControlsBarCommon.h
Changed
18
1
2
3
@property (readwrite, strong) IBOutlet VLCImageView *artworkImageView;
4
@property (readwrite, strong) IBOutlet NSButton *artworkButton;
5
-@property (readwrite, strong) IBOutlet VLCWrappableTextField *songNameTextField;
6
-@property (readwrite, strong) IBOutlet VLCWrappableTextField *artistNameTextField;
7
+@property (readwrite, strong) IBOutlet VLCWrappableTextField *playingItemDisplayField;
8
@property (readwrite, strong) IBOutlet VLCTimeField *timeField;
9
@property (readwrite, strong) IBOutlet VLCTimeField *trailingTimeField;
10
11
12
- (void)updateTimeSlider:(NSNotification *)aNotification;
13
- (void)updateVolumeSlider:(NSNotification *)aNotification;
14
- (void)updateMuteVolumeButton:(NSNotification *)aNotification;
15
+- (void)updateCurrentItemDisplayControls:(NSNotification *)aNotification;
16
17
@end
18
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/windows/mainwindow/VLCControlsBarCommon.m -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/windows/mainwindow/VLCControlsBarCommon.m
Changed
71
1
2
#import "extensions/NSString+Helpers.h"
3
#import "main/VLCMain.h"
4
#import "playlist/VLCPlaylistController.h"
5
+#import "playlist/VLCPlaylistItem.h"
6
+#import "playlist/VLCPlaylistModel.h"
7
#import "playlist/VLCPlayerController.h"
8
#import "library/VLCInputItem.h"
9
10
11
name:VLCPlayerStateChanged
12
object:nil;
13
notificationCenter addObserver:self
14
- selector:@selector(updatePlaybackControls:) name:VLCPlaylistCurrentItemChanged
15
+ selector:@selector(updateCurrentItemDisplayControls:)
16
+ name:VLCPlayerCurrentMediaItemChanged
17
object:nil;
18
notificationCenter addObserver:self
19
selector:@selector(fullscreenStateUpdated:)
20
21
// remove fullscreen button for lion fullscreen
22
if (_nativeFullscreenMode) {
23
self.fullscreenButtonWidthConstraint.constant = 0;
24
+ self.fullscreenButton.hidden = YES;
25
}
26
27
self.backwardButton.accessibilityTitle = _NS("Previous");
28
29
return;
30
}
31
32
- _songNameTextField.stringValue = inputItem.name;
33
- _artistNameTextField.stringValue = inputItem.artist;
34
-
35
- NSURL *artworkURL = inputItem.artworkURL;
36
-
37
- if (artworkURL) {
38
- _artworkImageView setImageURL:inputItem.artworkURL placeholderImage:NSImage imageNamed:@"noart";
39
- } else {
40
- _artworkImageView.image = NSImage imageNamed:@"noart";
41
- }
42
-
43
self.timeSlider setHidden:NO;
44
self.timeSlider setKnobHidden:NO;
45
self.timeSlider setFloatValue:_playerController.position;
46
47
self.backwardButton setEnabled: (b_seekable || _playlistController.hasPreviousPlaylistItem || b_chapters);
48
}
49
50
+- (void)updateCurrentItemDisplayControls:(NSNotification *)aNotification
51
+{
52
+ VLCInputItem * const inputItem = _playerController.currentMedia;
53
+ if (!inputItem) {
54
+ return;
55
+ }
56
+
57
+ _playingItemDisplayField.stringValue = inputItem.name;
58
+
59
+ NSURL * const artworkURL = inputItem.artworkURL;
60
+
61
+ if (artworkURL) {
62
+ _artworkImageView setImageURL:inputItem.artworkURL placeholderImage:NSImage imageNamed:@"noart";
63
+ } else {
64
+ _artworkImageView.image = NSImage imageNamed:@"noart";
65
+ }
66
+}
67
+
68
- (void)setPause
69
{
70
self.playButton setImage: _pauseImage;
71
_service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/windows/mainwindow/VLCMainVideoViewControlsBar.h
Added
41
1
2
+/*****************************************************************************
3
+ * VLCMainVideoViewControlsBar.h: MacOS X interface module
4
+ *****************************************************************************
5
+ * Copyright (C) 2023 VLC authors and VideoLAN
6
+ *
7
+ * Authors: Claudio Cambra <developer@claudiocambra.com>
8
+ *
9
+ * This program is free software; you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation; either version 2 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program; if not, write to the Free Software
21
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22
+ *****************************************************************************/
23
+
24
+#import "VLCControlsBarCommon.h"
25
+
26
+NS_ASSUME_NONNULL_BEGIN
27
+
28
+@interface VLCMainVideoViewControlsBar : VLCControlsBarCommon
29
+
30
+@property (readwrite, strong) IBOutlet NSButton *bookmarksButton;
31
+@property (readwrite, strong) IBOutlet NSButton *subtitlesButton;
32
+@property (readwrite, strong) IBOutlet NSButton *audioButton;
33
+
34
+- (IBAction)openBookmarks:(id)sender;
35
+- (IBAction)openSubtitlesMenu:(id)sender;
36
+- (IBAction)openAudioMenu:(id)sender;
37
+
38
+@end
39
+
40
+NS_ASSUME_NONNULL_END
41
_service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/windows/mainwindow/VLCMainVideoViewControlsBar.m
Added
75
1
2
+/*****************************************************************************
3
+ * VLCMainVideoViewControlsBar.m: MacOS X interface module
4
+ *****************************************************************************
5
+ * Copyright (C) 2023 VLC authors and VideoLAN
6
+ *
7
+ * Authors: Claudio Cambra <developer@claudiocambra.com>
8
+ *
9
+ * This program is free software; you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation; either version 2 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program; if not, write to the Free Software
21
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22
+ *****************************************************************************/
23
+
24
+#import "VLCMainVideoViewControlsBar.h"
25
+
26
+#import "extensions/NSString+Helpers.h"
27
+
28
+#import "main/VLCMain.h"
29
+
30
+#import "menus/VLCMainMenu.h"
31
+
32
+#import "panels/VLCBookmarksWindowController.h"
33
+
34
+#import "playlist/VLCPlaylistController.h"
35
+#import "playlist/VLCPlayerController.h"
36
+
37
+@implementation VLCMainVideoViewControlsBar
38
+
39
+- (void)awakeFromNib
40
+{
41
+ super awakeFromNib;
42
+
43
+ _bookmarksButton.toolTip = _NS("Bookmarks");
44
+ _bookmarksButton.accessibilityLabel = _bookmarksButton.toolTip;
45
+
46
+ _subtitlesButton.toolTip = _NS("Subtitle settings");
47
+ _subtitlesButton.accessibilityLabel = _subtitlesButton.toolTip;
48
+
49
+ _audioButton.toolTip = _NS("Audio settings");
50
+ _audioButton.accessibilityLabel = _audioButton.toolTip;
51
+}
52
+
53
+- (IBAction)openBookmarks:(id)sender
54
+{
55
+ VLCMain.sharedInstance.bookmarks toggleWindow:sender;
56
+}
57
+
58
+- (IBAction)openSubtitlesMenu:(id)sender
59
+{
60
+ NSMenu * const menu = VLCMain.sharedInstance.mainMenu.subtitlesMenu;
61
+ menu popUpMenuPositioningItem:nil
62
+ atLocation:_subtitlesButton.frame.origin
63
+ inView:((NSView *)sender).superview;
64
+}
65
+
66
+- (IBAction)openAudioMenu:(id)sender
67
+{
68
+ NSMenu * const menu = VLCMain.sharedInstance.mainMenu.audioMenu;
69
+ menu popUpMenuPositioningItem:nil
70
+ atLocation:_audioButton.frame.origin
71
+ inView:((NSView *)sender).superview;
72
+}
73
+
74
+@end
75
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/windows/mainwindow/VLCMainWindowControlsBar.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/windows/mainwindow/VLCMainWindowControlsBar.h
Changed
11
1
2
@property (readwrite, strong) IBOutlet NSButton *repeatButton;
3
@property (readwrite, strong) IBOutlet NSButton *shuffleButton;
4
5
-@property (readwrite, strong) IBOutlet NSLayoutConstraint *artistNameTextFieldWidthConstraint;
6
-
7
-@property (readwrite, strong) IBOutlet NSTextField *songArtistSeparatorTextField;
8
@property (readwrite, strong) IBOutlet NSButton *volumeUpButton;
9
10
- (IBAction)stop:(id)sender;
11
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/macosx/windows/mainwindow/VLCMainWindowControlsBar.m -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/macosx/windows/mainwindow/VLCMainWindowControlsBar.m
Changed
51
1
2
#import "main/VLCMain.h"
3
4
#import "playlist/VLCPlaylistController.h"
5
+#import "playlist/VLCPlaylistItem.h"
6
+#import "playlist/VLCPlaylistModel.h"
7
#import "playlist/VLCPlayerController.h"
8
9
#import "views/VLCTimeField.h"
10
11
NSNotificationCenter *notificationCenter = NSNotificationCenter defaultCenter;
12
notificationCenter addObserver:self
13
selector:@selector(updatePlaybackControls:)
14
- name:VLCPlaylistCurrentItemChanged
15
+ name:VLCPlayerCurrentMediaItemChanged
16
object:nil;
17
notificationCenter addObserver:self
18
selector:@selector(playbackStateChanged:)
19
20
self.volumeUpButton setEnabled: !b_muted;
21
}
22
23
+- (void)updateCurrentItemDisplayControls:(NSNotification *)aNotification;
24
+{
25
+ super updateCurrentItemDisplayControls:aNotification;
26
+
27
+ VLCInputItem * const inputItem = _playerController.currentMedia;
28
+ if (!inputItem) {
29
+ return;
30
+ }
31
+
32
+ NSFont * const boldSystemFont = NSFont boldSystemFontOfSize:12.;
33
+ NSDictionary<NSString *, id> * const boldAttribute = @{NSFontAttributeName: boldSystemFont};
34
+
35
+ NSMutableAttributedString * const displayString = NSMutableAttributedString alloc initWithString:inputItem.name attributes:boldAttribute;
36
+
37
+ if (inputItem.artist.length != 0) {
38
+ NSAttributedString * const separator = NSAttributedString alloc initWithString:@" · " attributes:boldAttribute;
39
+ displayString appendAttributedString:separator;
40
+
41
+ NSAttributedString * const artistString = NSAttributedString alloc initWithString:inputItem.artist;
42
+ displayString appendAttributedString:artistString;
43
+ }
44
+
45
+ self.playingItemDisplayField.attributedStringValue = displayString;
46
+}
47
+
48
- (void)updateMuteVolumeButtonImage
49
{
50
self.muteVolumeButton.image = imageFromRes(@"VLCVolumeOffTemplate");
51
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/Makefile.am -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/Makefile.am
Changed
10
1
2
gui/qt/util/qml/VanillaObject.qml \
3
gui/qt/util/qml/NativeMenu.qml \
4
gui/qt/util/qml/MLContextMenu.qml \
5
+ gui/qt/util/qml/ListViewRev15.qml \
6
+ gui/qt/util/qml/ListViewRev11.qml \
7
gui/qt/widgets/qml/ActionButtonOverlay.qml \
8
gui/qt/widgets/qml/ActionButtonPrimary.qml \
9
gui/qt/widgets/qml/BannerTabButton.qml \
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/dialogs_provider.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/dialogs_provider.cpp
Changed
19
1
2
# include "config.h"
3
#endif
4
5
+#include <vlc_common.h>
6
+#include <vlc_interface.h>
7
#include <vlc_intf_strings.h>
8
9
#include "qt.hpp"
10
11
#include "dialogs/playlists/playlists.hpp"
12
#include "dialogs/firstrun/firstrunwizard.hpp"
13
14
+#include <vlc_url.h>
15
+
16
#include <QEvent>
17
#include <QApplication>
18
#include <QSignalMapper>
19
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/dialogs_provider.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/dialogs_provider.hpp
Changed
19
1
2
# include "config.h"
3
#endif
4
5
-#include <assert.h>
6
+#include <cassert>
7
8
#include "qt.hpp"
9
10
11
#include <QObject>
12
#include <QStringList>
13
14
+#include <vlc_es.h>
15
+
16
#define TITLE_EXTENSIONS_MEDIA qtr( "Media Files" )
17
#define TITLE_EXTENSIONS_VIDEO qtr( "Video Files" )
18
#define TITLE_EXTENSIONS_AUDIO qtr( "Audio Files" )
19
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/epg/EPGView.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/epg/EPGView.hpp
Changed
10
1
2
3
#include "EPGProgram.hpp"
4
5
-#include <vlc_epg.h>
6
-
7
#include <QGraphicsView>
8
#include <QGraphicsScene>
9
#include <QHash>
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/epg/EPGWidget.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/epg/EPGWidget.hpp
Changed
9
1
2
3
#include "qt.hpp"
4
5
-#include <vlc_epg.h>
6
#include <vlc_input_item.h>
7
8
#include <QWidget>
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/extended/extended.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/extended/extended.cpp
Changed
10
1
2
# include "config.h"
3
#endif
4
5
-#include <assert.h>
6
+#include <cassert>
7
8
#include "extended.hpp"
9
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/extended/extended_panels.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/extended/extended_panels.cpp
Changed
15
1
2
#include "util/qt_dirs.hpp"
3
#include "widgets/native/customwidgets.hpp"
4
#include "dialogs/dialogs_provider.hpp"
5
+#include "util/vlctick.hpp"
6
7
#include "../../../../audio_filter/equalizer_presets.h"
8
#include <vlc_modules.h>
9
#include <vlc_plugin.h>
10
#include <vlc_player.h>
11
+#include <vlc_interface.h>
12
13
static bool filterIsPresent( const QString &filters, const QString &filter )
14
{
15
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/extensions/extensions.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/extensions/extensions.cpp
Changed
9
1
2
#include "extensions_manager.hpp" // for isUnloading()
3
4
#include <vlc_dialog.h>
5
+#include <vlc_extensions.h>
6
7
#include <QGridLayout>
8
#include <QPushButton>
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/extensions/extensions.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/extensions/extensions.hpp
Changed
27
1
2
#define EXTENSIONS_HPP
3
4
#include "qt.hpp"
5
-#include <vlc_extensions.h>
6
#include "util/singleton.hpp"
7
8
-#include "assert.h"
9
+#include <cassert>
10
11
#include <QDialog>
12
class QObject;
13
14
class ExtensionsDialogProvider;
15
class ExtensionDialog;
16
17
+extern "C" {
18
+ struct extensions_manager_t;
19
+ struct extension_widget_t;
20
+ typedef struct extension_dialog_t extension_dialog_t;
21
+ typedef struct extension_t extension_t;
22
+};
23
+
24
class ExtensionsDialogProvider : public QObject, public Singleton<ExtensionsDialogProvider>
25
{
26
/** This is the dialog provider for Extensions dialogs
27
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/extensions/extensions_manager.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/extensions/extensions_manager.cpp
Changed
11
1
2
#include <vlc_modules.h>
3
#include <vlc_interface.h>
4
#include <vlc_playlist.h>
5
-#include "assert.h"
6
+#include <vlc_extensions.h>
7
+#include <cassert>
8
9
#include <QMenu>
10
#include <QAction>
11
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/extensions/extensions_manager.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/extensions/extensions_manager.hpp
Changed
21
1
2
# include "config.h"
3
#endif
4
5
-#include <vlc_extensions.h>
6
-
7
#include "qt.hpp"
8
#include <player/player_controller.hpp>
9
#include "util/singleton.hpp"
10
11
12
class ExtensionsDialogProvider;
13
14
+extern "C" {
15
+ struct extensions_manager_t;
16
+};
17
+
18
class ExtensionsManager : public QObject, public Singleton<ExtensionsManager>
19
{
20
friend class Singleton<ExtensionsManager>;
21
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/fingerprint/chromaprint.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/fingerprint/chromaprint.cpp
Changed
9
1
2
3
#include "chromaprint.hpp"
4
#include <vlc_modules.h>
5
+#include <vlc_fingerprinter.h>
6
7
Chromaprint::Chromaprint( qt_intf_t *_p_intf ) : p_intf( _p_intf )
8
{
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/fingerprint/chromaprint.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/fingerprint/chromaprint.hpp
Changed
16
1
2
3
#include <QObject>
4
#include <QString>
5
-#include <vlc_fingerprinter.h>
6
#include "qt.hpp"
7
8
+extern "C" {
9
+ typedef struct fingerprint_request_t fingerprint_request_t;
10
+ typedef struct fingerprinter_thread_t fingerprinter_thread_t;
11
+};
12
+
13
class Chromaprint : public QObject
14
{
15
Q_OBJECT
16
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/fingerprint/fingerprintdialog.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/fingerprint/fingerprintdialog.cpp
Changed
10
1
2
3
#include "dialogs/fingerprint/chromaprint.hpp"
4
5
+#include <vlc_fingerprinter.h>
6
+
7
#include <QLabel>
8
#include <QListWidgetItem>
9
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/fingerprint/fingerprintdialog.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/fingerprint/fingerprintdialog.hpp
Changed
13
1
2
#include "qt.hpp"
3
4
#include <QDialog>
5
-#include <vlc_fingerprinter.h>
6
+
7
+extern "C" {
8
+ typedef struct fingerprint_request_t fingerprint_request_t;
9
+};
10
11
namespace Ui {
12
class FingerprintDialog;
13
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/gototime/gototime.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/gototime/gototime.cpp
Changed
9
1
2
#include "gototime.hpp"
3
4
#include "player/player_controller.hpp"
5
+#include "util/vlctick.hpp"
6
7
#include <QLabel>
8
#include <QTimeEdit>
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/help/aboutmodel.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/help/aboutmodel.cpp
Changed
10
1
2
3
#include "aboutmodel.hpp"
4
5
-#include "vlc_about.h"
6
+#include <vlc_about.h>
7
8
9
AboutModel::AboutModel(QObject *parent) : QObject(parent)
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/help/help.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/help/help.cpp
Changed
10
1
2
#include <QDate>
3
#include <QPushButton>
4
5
-#include <assert.h>
6
+#include <cassert>
7
8
HelpDialog::HelpDialog( qt_intf_t *_p_intf ) : QVLCFrame( _p_intf )
9
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/mediainfo/info_panels.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/mediainfo/info_panels.cpp
Changed
13
1
2
#include "dialogs/fingerprint/fingerprintdialog.hpp"
3
#include "dialogs/fingerprint/chromaprint.hpp"
4
5
-#include <assert.h>
6
+#include <cassert>
7
#include <vlc_url.h>
8
#include <vlc_meta.h>
9
+#include <vlc_input_item.h>
10
11
#include <QTreeWidget>
12
#include <QTableWidget>
13
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/messages/messages.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/messages/messages.cpp
Changed
15
1
2
#include <QMutex>
3
#include <QMutexLocker>
4
5
-#include <assert.h>
6
+#include <cassert>
7
8
#include <vlc_common.h>
9
#include <vlc_playlist.h>
10
#include <vlc_interface.h>
11
+#include <vlc_input_item.h>
12
13
14
#include "dialogs/messages/messages.hpp"
15
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/open/open.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/open/open.cpp
Changed
10
1
2
#include <QRegExp>
3
#include <QMenu>
4
5
+#include <vlc_url.h>
6
+
7
#ifndef NDEBUG
8
# define DEBUG_QT 1
9
#endif
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/open/open.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/open/open.hpp
Changed
9
1
2
#endif
3
4
#include <vlc_common.h>
5
-#include <vlc_url.h>
6
7
#include "widgets/native/qvlcframe.hpp"
8
#include "dialogs/open/open_panels.hpp"
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/open/open_panels.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/open/open_panels.cpp
Changed
18
1
2
# include "config.h"
3
#endif
4
5
-#include <assert.h>
6
+#include <cassert>
7
8
#include "qt.hpp"
9
#include "maininterface/mainctx.hpp"
10
11
#include <vlc_intf_strings.h>
12
#include <vlc_modules.h>
13
#include <vlc_plugin.h>
14
+#include <vlc_url.h>
15
#ifdef _WIN32
16
#include <vlc_charset.h> /* FromWide for Win32 */
17
#endif
18
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/open/openurl.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/open/openurl.cpp
Changed
10
1
2
#include <QVBoxLayout>
3
#include <QLineEdit>
4
5
-#include <assert.h>
6
+#include <cassert>
7
8
OpenUrlDialog::OpenUrlDialog( qt_intf_t *_p_intf,
9
bool _bClipboard ) :
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/plugins/plugins.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/plugins/plugins.cpp
Changed
13
1
2
#include "widgets/native/animators.hpp"
3
#include "util/imagehelper.hpp"
4
5
-#include <assert.h>
6
+#include <cassert>
7
8
#include <vlc_modules.h>
9
+#include <vlc_extensions.h>
10
11
#include <QTreeWidget>
12
#include <QStringList>
13
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/plugins/plugins.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/plugins/plugins.hpp
Changed
22
1
2
#include "widgets/native/qvlcframe.hpp"
3
#include "util/singleton.hpp"
4
5
-#include <vlc_extensions.h>
6
-#include <vlc_addons.h>
7
-
8
#include <QStringList>
9
#include <QTreeWidgetItem>
10
#include <QPushButton>
11
12
class DelegateAnimationHelper;
13
class AddonsSortFilterProxyModel;
14
15
+extern "C" {
16
+ typedef struct extension_t extension_t;
17
+};
18
+
19
class PluginDialog : public QVLCFrame, public Singleton<PluginDialog>
20
{
21
Q_OBJECT
22
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/preferences/complete_preferences.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/preferences/complete_preferences.cpp
Changed
10
1
2
#include "dialogs/preferences/preferences_widgets.hpp"
3
4
#include <vlc_modules.h>
5
-#include <assert.h>
6
+#include <cassert>
7
8
#define ITEM_HEIGHT 25
9
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/preferences/expert_model.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/preferences/expert_model.hpp
Changed
10
1
2
# include "config.h"
3
#endif
4
5
-#include <assert.h>
6
+#include <cassert>
7
8
#include <QAbstractListModel>
9
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/preferences/preferences_widgets.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/preferences/preferences_widgets.hpp
Changed
10
1
2
#endif
3
4
#include "qt.hpp"
5
-#include <assert.h>
6
+#include <cassert>
7
8
#include <QTreeWidgetItem>
9
#include <QLabel>
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/preferences/simple_preferences.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/preferences/simple_preferences.cpp
Changed
10
1
2
#include <QTreeWidget>
3
#include <QTreeWidgetItem>
4
5
-#include <assert.h>
6
+#include <cassert>
7
#include <math.h>
8
9
#define ICON_HEIGHT 48
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/preferences/simple_preferences.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/preferences/simple_preferences.hpp
Changed
10
1
2
#include "ui_sprefs_interface.h"
3
#include "ui_sprefs_medialibrary.h"
4
5
-#include <vlc_media_library.h>
6
-
7
class MLFoldersEditor;
8
9
#ifdef _WIN32
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/sout/profile_selector.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/sout/profile_selector.cpp
Changed
10
1
2
#include <QListWidgetItem>
3
#include <QFontMetrics>
4
5
-#include <assert.h>
6
+#include <cassert>
7
#include <vlc_modules.h>
8
9
#define CATPROP2NAME( val ) QString("valueholder_%1").arg( val )
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/dialogs/sout/sout.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/dialogs/sout/sout.cpp
Changed
10
1
2
3
#include <QString>
4
5
-#include <assert.h>
6
+#include <cassert>
7
#include <QWindow>
8
9
SoutDialog::SoutDialog( QWindow *parent, qt_intf_t *_p_intf, const QString& inputChain )
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/maininterface/compositor.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/maininterface/compositor.cpp
Changed
10
1
2
# include "compositor_x11.hpp"
3
#endif
4
5
+#include <vlc_window.h>
6
+
7
using namespace vlc;
8
9
template<typename T>
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/maininterface/compositor.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/maininterface/compositor.hpp
Changed
18
1
2
#include <QObject>
3
4
#include <vlc_common.h>
5
-#include <vlc_window.h>
6
7
#include "qt.hpp"
8
9
10
+extern "C" {
11
+ typedef struct vlc_window vlc_window_t;
12
+ typedef struct vlc_window_cfg vlc_window_cfg_t;
13
+}
14
+
15
class MainCtx;
16
class VideoWindowHandler;
17
class VideoSurfaceProvider;
18
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/maininterface/compositor_dcomp.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/maininterface/compositor_dcomp.cpp
Changed
10
1
2
3
#include <comdef.h>
4
5
+#include <vlc_window.h>
6
+
7
#include <QApplication>
8
#include <QDesktopWidget>
9
#include <QQuickWidget>
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/maininterface/compositor_dcomp_uisurface.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/maininterface/compositor_dcomp_uisurface.hpp
Changed
9
1
2
#include <memory>
3
4
#include <vlc_common.h>
5
-#include <vlc_interface.h> /* intf_thread_t */
6
7
#include <windows.h>
8
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/maininterface/compositor_win7.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/maininterface/compositor_win7.cpp
Changed
10
1
2
#include "mainctx_win32.hpp"
3
#include "mainui.hpp"
4
5
+#include <vlc_window.h>
6
+
7
#define D3D11_NO_HELPERS // avoid tons of warnings
8
#include <d3d11.h>
9
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/maininterface/compositor_x11.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/maininterface/compositor_x11.cpp
Changed
13
1
2
#include <QX11Info>
3
#include <QScreen>
4
5
+#ifdef HAVE_CONFIG_H
6
+# include "config.h"
7
+#endif
8
+#include <vlc_window.h>
9
+
10
#include "compositor_x11.hpp"
11
#include "compositor_x11_renderwindow.hpp"
12
#include "compositor_x11_uisurface.hpp"
13
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/maininterface/mainctx.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/maininterface/mainctx.cpp
Changed
19
1
2
#include <QFileInfo>
3
#endif
4
5
+#include <vlc_interface.h>
6
+
7
#define VLC_REFERENCE_SCALE_FACTOR 96.
8
9
using namespace vlc::playlist;
10
11
loadFromVLCOption(m_pinVideoControls, "qt-pin-controls", &MainCtx::pinVideoControlsChanged);
12
13
loadFromVLCOption(m_pinOpacity, "qt-fs-opacity", &MainCtx::pinOpacityChanged);
14
+
15
+ loadFromVLCOption(m_safeArea, "qt-safe-area", &MainCtx::safeAreaChanged);
16
}
17
18
void MainCtx::loadFromSettingsImpl(const bool callSignals)
19
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/maininterface/mainctx.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/maininterface/mainctx.hpp
Changed
36
1
2
Q_PROPERTY(QScreen* screen READ screen NOTIFY screenChanged)
3
Q_PROPERTY(bool useGlobalShortcuts READ getUseGlobalShortcuts WRITE setUseGlobalShortcuts NOTIFY useGlobalShortcutsChanged FINAL)
4
Q_PROPERTY(int maxVolume READ maxVolume NOTIFY maxVolumeChanged FINAL)
5
+ Q_PROPERTY(float safeArea READ safeArea NOTIFY safeAreaChanged FINAL)
6
7
Q_PROPERTY(CSDButtonModel *csdButtonModel READ csdButtonModel CONSTANT FINAL)
8
9
10
void setUseGlobalShortcuts(bool useGlobalShortcuts );
11
inline int maxVolume() const { return m_maxVolume; };
12
13
+ inline float safeArea() const { return m_safeArea; };
14
+
15
bool hasEmbededVideo() const;
16
VideoSurfaceProvider* getVideoSurfaceProvider() const;
17
void setVideoSurfaceProvider(VideoSurfaceProvider* videoSurfaceProvider);;
18
19
20
int m_maxVolume = 125;
21
22
+ float m_safeArea = 0.0;
23
+
24
std::unique_ptr<CSDButtonModel> m_csdButtonModel;
25
26
public slots:
27
28
29
void maxVolumeChanged();
30
31
+ void safeAreaChanged();
32
+
33
private:
34
void loadPrefs(bool callSignals);
35
void loadFromSettingsImpl(bool callSignals);
36
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/maininterface/mainctx_win32.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/maininterface/mainctx_win32.cpp
Changed
10
1
2
#include <QBitmap>
3
#include <QTimer>
4
5
-#include <assert.h>
6
+#include <cassert>
7
8
#include <QWindow>
9
#include QPNI_HEADER
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/maininterface/mainui.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/maininterface/mainui.cpp
Changed
25
1
2
#include "util/color_svg_image_provider.hpp"
3
#include "util/effects_image_provider.hpp"
4
#include "util/csdbuttonmodel.hpp"
5
+#include "util/vlctick.hpp"
6
7
#include "dialogs/help/aboutmodel.hpp"
8
#include "dialogs/dialogs_provider.hpp"
9
10
qmlRegisterType(QUrl("qrc:///util/TouchScreenTapHandlerRev11.qml"), uri, versionMajor, versionMinor, "TouchScreenTapHandlerCompat");
11
#endif
12
13
+ qmlRegisterType(QUrl(QStringLiteral(
14
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
15
+ "qrc:///util/ListViewRev15.qml"
16
+#else
17
+ "qrc:///util/ListViewRev11.qml"
18
+#endif
19
+ )),
20
+ uri, versionMajor, versionMinor, "ListViewCompat");
21
+
22
qmlProtectModule(uri, versionMajor);
23
}
24
25
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/maininterface/video_window_handler.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/maininterface/video_window_handler.cpp
Changed
18
1
2
m_videoFullScreen = fs;
3
if( fs )
4
{
5
+ m_lastWinGeometry = m_window->geometry();
6
+
7
int numscreen = var_InheritInteger( m_intf, "qt-fullscreen-screennumber" );
8
9
auto screenList = QApplication::screens();
10
11
/* To be sure window is on proper-screen in xinerama */
12
if( !screenres.contains( m_window->position() ) )
13
{
14
- m_lastWinGeometry = m_window->geometry();
15
m_window->setPosition(screenres.x(), screenres.y() );
16
}
17
}
18
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/maininterface/videosurface.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/maininterface/videosurface.cpp
Changed
9
1
2
#include "widgets/native/customwidgets.hpp" //for qtEventToVLCKey
3
#include <QSGRectangleNode>
4
#include <QThreadPool>
5
+#include <vlc_window.h>
6
7
WindowResizer::WindowResizer(vlc_window_t* window):
8
m_requestedWidth(0),
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/maininterface/videosurface.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/maininterface/videosurface.hpp
Changed
13
1
2
#include <QMutex>
3
#include <QRunnable>
4
#include "qt.hpp"
5
-#include "vlc_window.h"
6
+
7
+extern "C" {
8
+ typedef struct vlc_window vlc_window_t;
9
+}
10
11
class MainCtx;
12
13
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/medialib.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/medialib.cpp
Changed
51
1
2
return;
3
}
4
5
+ auto it = m_inputItemQuery.find(variantList);
6
+
7
+ if (it == m_inputItemQuery.end())
8
+ {
9
+ it = m_inputItemQuery.insert(variantList, {callback});
10
+ }
11
+ else
12
+ {
13
+ // be patient
14
+
15
+ for (const auto& it2 : it.value())
16
+ {
17
+ if (callback.strictlyEquals(it2))
18
+ return;
19
+ }
20
+
21
+ it.value().push_back(callback); // FIXME: Use an ordered set
22
+ return;
23
+ }
24
+
25
runOnMLThread<Ctx>(this,
26
//ML thread
27
mlIdList(vlc_medialibrary_t* ml, Ctx& ctx){
28
29
}
30
},
31
//UI thread
32
- this, callback(quint64, Ctx& ctx) mutable
33
+ this, it(quint64, Ctx& ctx) mutable
34
{
35
auto jsEngine = qjsEngine(this);
36
if (!jsEngine)
37
38
i++;
39
}
40
41
- callback.call({jsArray});
42
+ for (auto cb : qAsConst(it.value())) // TODO: Qt 6 use const reference
43
+ {
44
+ cb.call({jsArray});
45
+ }
46
+
47
+ m_inputItemQuery.erase(it);
48
});
49
}
50
51
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/medialib.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/medialib.hpp
Changed
10
1
2
quint64 m_taskId = 1;
3
QMap<quint64, RunOnMLThreadBaseRunner*> m_runningTasks;
4
QMultiMap<const QObject*, quint64> m_objectTasks;
5
+
6
+ QMap<QVariantList, QVector<QJSValue>> m_inputItemQuery;
7
};
8
9
class RunOnMLThreadBaseRunner : public QObject, public QRunnable
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlalbum.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlalbum.cpp
Changed
10
1
2
#include <cassert>
3
#include "mlalbum.hpp"
4
5
+#include "util/vlctick.hpp"
6
+
7
MLAlbum::MLAlbum(const vlc_ml_album_t *_data, QObject *_parent)
8
: QObject( _parent )
9
, MLItem ( MLItemId( _data->i_id, VLC_ML_PARENT_ALBUM ) )
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlalbum.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlalbum.hpp
Changed
23
1
2
3
#pragma once
4
5
-#ifdef HAVE_CONFIG_H
6
-#include "config.h"
7
-#endif
8
-#include "vlc_common.h"
9
-
10
#include <QObject>
11
#include <QString>
12
#include <QList>
13
#include <memory>
14
-#include "vlc_media_library.h"
15
#include "mlhelper.hpp"
16
#include "mlqmltypes.hpp"
17
-#include "util/vlctick.hpp"
18
+
19
+class VLCTick;
20
21
class MLAlbum : public QObject, public MLItem
22
{
23
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlalbummodel.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlalbummodel.cpp
Changed
10
1
2
3
#include "mlalbummodel.hpp"
4
5
+#include "util/vlctick.hpp"
6
+
7
QHash<QByteArray, vlc_ml_sorting_criteria_t> MLAlbumModel::M_names_to_criteria = {
8
{"id", VLC_ML_SORTING_DEFAULT},
9
{"title", VLC_ML_SORTING_ALBUM},
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlalbumtrack.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlalbumtrack.cpp
Changed
9
1
2
#include <cassert>
3
#include "mlalbumtrack.hpp"
4
#include "mlhelper.hpp"
5
+#include "util/vlctick.hpp"
6
7
MLAlbumTrack::MLAlbumTrack(vlc_medialibrary_t* _ml, const vlc_ml_media_t *_data, QObject *_parent )
8
: QObject( _parent )
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlalbumtrack.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlalbumtrack.hpp
Changed
28
1
2
3
#pragma once
4
5
-#ifdef HAVE_CONFIG_H
6
-#include "config.h"
7
-#endif
8
-#include "vlc_common.h"
9
-
10
#include <QObject>
11
#include <QString>
12
#include <memory>
13
14
-#include <vlc_media_library.h>
15
#include "mlhelper.hpp"
16
#include "mlqmltypes.hpp"
17
-#include "util/vlctick.hpp"
18
+
19
+class VLCTick;
20
+
21
+extern "C" {
22
+ struct vlc_medialibrary_t;
23
+ typedef struct vlc_ml_media_t vlc_ml_media_t;
24
+};
25
26
class MLAlbumTrack : public QObject, public MLItem
27
{
28
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlalbumtrackmodel.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlalbumtrackmodel.cpp
Changed
9
1
2
*****************************************************************************/
3
4
#include "mlalbumtrackmodel.hpp"
5
+#include "util/vlctick.hpp"
6
7
QHash<QByteArray, vlc_ml_sorting_criteria_t> MLAlbumTrackModel::M_names_to_criteria = {
8
{"id", VLC_ML_SORTING_DEFAULT},
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlartist.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlartist.hpp
Changed
26
1
2
#ifndef MLARTIST_HPP
3
#define MLARTIST_HPP
4
5
-#ifdef HAVE_CONFIG_H
6
-#include "config.h"
7
-#endif
8
-#include "vlc_common.h"
9
-
10
#include <QObject>
11
#include <QString>
12
#include <memory>
13
-#include <vlc_media_library.h>
14
15
#include "mlalbum.hpp"
16
#include "mlhelper.hpp"
17
#include "mlqmltypes.hpp"
18
19
+extern "C" {
20
+ typedef struct vlc_ml_artist_t vlc_ml_artist_t;
21
+};
22
+
23
class MLArtist : public QObject, public MLItem
24
{
25
Q_OBJECT
26
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlbasemodel.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlbasemodel.hpp
Changed
16
1
2
#ifdef HAVE_CONFIG_H
3
#include "config.h"
4
#endif
5
-#include "vlc_common.h"
6
+#include <vlc_common.h>
7
8
9
#include <memory>
10
#include <QAbstractListModel>
11
-#include "vlc_media_library.h"
12
+#include <vlc_media_library.h>
13
#include "mlqmltypes.hpp"
14
#include "medialib.hpp"
15
#include <memory>
16
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlbookmarkmodel.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlbookmarkmodel.hpp
Changed
12
1
2
#endif
3
4
#include <vlc_common.h>
5
-#include <vlc_media_library.h>
6
+#include <vlc_input_item.h>
7
#include <vlc_player.h>
8
-#include <vlc_threads.h>
9
#include <vlc_cxx_helpers.hpp>
10
11
#include "mlhelper.hpp"
12
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlfolder.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlfolder.cpp
Changed
10
1
2
3
#include "mlfolder.hpp"
4
5
+#include "util/vlctick.hpp"
6
+
7
// Ctor / dtor
8
9
MLFolder::MLFolder(const vlc_ml_folder_t * data)
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlfolder.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlfolder.hpp
Changed
11
1
2
3
// MediaLibrary includes
4
#include "mlqmltypes.hpp"
5
-#include "util/vlctick.hpp"
6
+
7
+class VLCTick;
8
9
class MLFolder : public MLItem
10
{
11
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlfoldersmodel.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlfoldersmodel.hpp
Changed
15
1
2
#include "mlhelper.hpp"
3
4
#include <maininterface/mainctx.hpp>
5
-#include <vlc_media_library.h>
6
+
7
+extern "C" {
8
+ struct vlc_medialibrary_t;
9
+ typedef struct vlc_ml_folder_t vlc_ml_folder_t;
10
+ typedef struct vlc_ml_event_t vlc_ml_event_t;
11
+};
12
13
class MLFoldersBaseModel : public QAbstractListModel
14
{
15
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlgroup.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlgroup.cpp
Changed
10
1
2
3
#include "mlgroup.hpp"
4
5
+#include "util/vlctick.hpp"
6
+
7
// VLC includes
8
#include "qt.hpp"
9
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlgroup.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlgroup.hpp
Changed
11
1
2
3
// MediaLibrary includes
4
#include "mlqmltypes.hpp"
5
-#include "util/vlctick.hpp"
6
+
7
+class VLCTick;
8
9
class MLGroup : public MLItem
10
{
11
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlhelper.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlhelper.hpp
Changed
10
1
2
#include "config.h"
3
#endif
4
5
-#include "vlc_media_library.h"
6
+#include <vlc_media_library.h>
7
#include <QString>
8
9
// Forward declarations
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mllistcache.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mllistcache.cpp
Changed
10
1
2
*****************************************************************************/
3
4
#include "mllistcache.hpp"
5
-#include "vlc_diffutil.h"
6
+#include <vlc_diffutil.h>
7
8
namespace {
9
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mllistcache.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mllistcache.hpp
Changed
10
1
2
# include "config.h"
3
#endif
4
5
-#include "vlc_common.h"
6
+#include <vlc_common.h>
7
#include <cassert>
8
#include <memory>
9
#include <vector>
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlplaylist.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlplaylist.cpp
Changed
9
1
2
3
// VLC includes
4
#include "qt.hpp"
5
+#include "util/vlctick.hpp"
6
7
//-------------------------------------------------------------------------------------------------
8
// Ctor / dtor
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlplaylist.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlplaylist.hpp
Changed
11
1
2
3
// MediaLibrary includes
4
#include "mlqmltypes.hpp"
5
-#include "util/vlctick.hpp"
6
+
7
+class VLCTick;
8
9
class MLPlaylist : public MLItem
10
{
11
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlplaylistlistmodel.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlplaylistlistmodel.cpp
Changed
10
1
2
#include <vlc_media_library.h>
3
#include <qt.hpp>
4
5
+#include "util/vlctick.hpp"
6
+
7
// MediaLibrary includes
8
#include "mlhelper.hpp"
9
#include "mlcustomcover.hpp"
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlplaylistmedia.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlplaylistmedia.cpp
Changed
9
1
2
3
// VLC includes
4
#include <qt.hpp>
5
+#include "util/vlctick.hpp"
6
7
//-------------------------------------------------------------------------------------------------
8
// Ctor / dtor
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlplaylistmedia.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlplaylistmedia.hpp
Changed
11
1
2
// MediaLibrary includes
3
// NOTE: We need that header for VideoDescription and AudioDescription.
4
#include "mlvideo.hpp"
5
-#include "util/vlctick.hpp"
6
+
7
+class VLCTick;
8
9
// Qt includes
10
#include <QUrl>
11
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlplaylistmodel.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlplaylistmodel.cpp
Changed
9
1
2
3
// Util includes
4
#include "util/qmlinputitem.hpp"
5
+#include "util/vlctick.hpp"
6
7
// MediaLibrary includes
8
#include "mlhelper.hpp"
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlqueryparams.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlqueryparams.hpp
Changed
10
1
2
#endif
3
4
#include <QByteArray>
5
-#include "vlc_media_library.h"
6
+#include <vlc_media_library.h>
7
8
/**
9
* C++ owned version of vlc_ml_query_params_t, so that it can be moved or
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlurlmodel.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlurlmodel.hpp
Changed
9
1
2
3
#include "mlbasemodel.hpp"
4
5
-#include <vlc_media_library.h>
6
#include "mlhelper.hpp"
7
#include "mlqmltypes.hpp"
8
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlvideo.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlvideo.cpp
Changed
18
1
2
3
#include <vlc_thumbnailer.h>
4
#include "mlhelper.hpp"
5
+#include "util/vlctick.hpp"
6
7
VideoDescription::VideoDescription(const QString &codec, const QString &language, const unsigned int fps)
8
: m_codec(codec)
9
10
else if ( maxWidth >= 1440 && maxHeight >= 1080 )
11
m_resolution = "HD";
12
else if ( maxWidth >= 720 && maxHeight >= 1280 )
13
- m_resolution = "720p";
14
+ m_resolution = "720p";
15
}
16
17
bool MLVideo::isNew() const
18
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlvideo.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlvideo.hpp
Changed
14
1
2
3
#include <vlc_media_library.h>
4
#include "mlqmltypes.hpp"
5
-#include "util/vlctick.hpp"
6
7
#include <functional>
8
9
+class VLCTick;
10
+
11
class VideoDescription
12
{
13
Q_GADGET
14
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlvideofoldersmodel.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlvideofoldersmodel.cpp
Changed
9
1
2
3
// Util includes
4
#include "util/covergenerator.hpp"
5
+#include "util/vlctick.hpp"
6
7
// MediaLibrary includes
8
#include "mlcustomcover.hpp"
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlvideogroupsmodel.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlvideogroupsmodel.cpp
Changed
9
1
2
3
// Util includes
4
#include "util/covergenerator.hpp"
5
+#include "util/vlctick.hpp"
6
7
// MediaLibrary includes
8
#include "mlcustomcover.hpp"
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/mlvideomodel.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/mlvideomodel.cpp
Changed
9
1
2
3
#include "mlvideomodel.hpp"
4
#include "mlhelper.hpp"
5
+#include "util/vlctick.hpp"
6
7
template<typename T>
8
QVariantList getVariantList(const QList<T> & desc)
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/qml/MusicArtistDelegate.qml -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/qml/MusicArtistDelegate.qml
Changed
10
1
2
onDoubleClicked: itemDoubleClicked(mouse)
3
4
Widgets.CurrentIndicator {
5
- height: parent.height - (margin * 2)
6
+ length: parent.height - (margin * 2)
7
8
margin: VLCStyle.dp(4, VLCStyle.scale)
9
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml
Changed
28
1
2
Row {
3
anchors.fill: parent
4
5
- anchors.leftMargin: root.leftPadding
6
-
7
visible: artistModel.count > 0
8
9
Widgets.KeyNavigableListView {
10
11
text: I18n.qtr("Artists")
12
font.pixelSize: VLCStyle.fontSize_large
13
color: artistList.colorContext.fg.primary
14
- leftPadding: VLCStyle.margin_normal
15
+ leftPadding: root.leftPadding + VLCStyle.margin_normal
16
bottomPadding: VLCStyle.margin_small
17
topPadding: VLCStyle.margin_xlarge
18
}
19
20
delegate: MusicArtistDelegate {
21
width: artistList.width
22
23
+ leftPadding: root.leftPadding
24
+
25
isCurrent: ListView.isCurrentItem
26
27
mlModel: artistModel
28
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/qml/PlaylistMedia.qml -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/qml/PlaylistMedia.qml
Changed
18
1
2
3
// NOTE: Dropping medialibrary content into the playlist.
4
} else if (Helpers.isValidInstanceOf(item, Widgets.DragItem)) {
5
- item.getSelectedInputItem(function(inputItems) {
6
- model.insert(inputItems, destinationIndex)
7
- })
8
+ if (item.inputItems) {
9
+ model.insert(item.inputItems, destinationIndex)
10
+ } else {
11
+ item.getSelectedInputItem(function(inputItems) {
12
+ model.insert(inputItems, destinationIndex)
13
+ })
14
+ }
15
}
16
17
root.forceActiveFocus()
18
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/qml/VideoAll.qml -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/qml/VideoAll.qml
Changed
31
1
2
3
property alias dragItem: dragItem
4
5
+ // function(model) -> strings....
6
+ // used to get grid labels per model item
7
+ property var gridLabels: getLabel
8
+ property var listLabels: getLabel
9
+
10
list: list
11
grid: grid
12
emptyLabel: emptylabel
13
14
&&
15
gridView.expandIndex !== gridItem.index) ? 0.7 : 1
16
17
- labels: root.onLabelGrid(model)
18
+ labels: root.gridLabels(model)
19
20
// FIXME: Sometimes MLBaseModel::getDataAt returns {} so we use 'isNew === true'.
21
showNewIndicator: (model.isNew === true)
22
23
24
onRightClick: root.contextMenu.popup(selectionModel.selectedIndexes, globalMousePos)
25
26
+ coverLabels: root.listLabels
27
+
28
// Functions
29
30
function onLabels(model) { return root.onLabelList(model); }
31
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/qml/VideoAllSubDisplay.qml -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/qml/VideoAllSubDisplay.qml
Changed
117
1
2
3
contextMenu: Util.MLContextMenu { model: _meta ? _meta.model : null; showPlayAsAudioAction: true }
4
5
+ gridLabels: !!_meta ? _meta.gridLabels : root.getLabel
6
+
7
+ listLabels: !!_meta ? _meta.listLabels : root.getLabel
8
+
9
// Functions
10
11
function _updateMetaModel(groupping) {
12
13
14
function setCurrentItemFocus(reason) {
15
if (headerItem && headerItem.focus)
16
- headerItem.forceActiveFocus(reason)
17
+ headerItem.forceActiveFocus(reason) // continue watching section
18
+ else if (currentItem.setCurrentItemFocus)
19
+ currentItem.setCurrentItemFocus(reason) // grid or list view
20
else
21
- currentItem.setCurrentItemFocus(reason)
22
+ currentItem.forceActiveFocus(reason) // empty label
23
}
24
25
// VideoAll events reimplementation
26
27
28
function onDoubleClick(object) { _meta.onDoubleClick(object) }
29
30
- function onLabelGrid(object) { return _meta.onLabelGrid(object) }
31
- function onLabelList(object) { return _meta.onLabelList(object) }
32
-
33
function isInfoExpandPanelAvailable(modelIndexData) {
34
return _meta.isInfoExpandPanelAvailable(modelIndexData)
35
}
36
37
38
property var model: MLVideoModel { ml: MediaLib }
39
40
+ property var gridLabels: root.getLabel
41
+
42
+ property var listLabels: root.getLabel
43
+
44
function onAction(indexes) {
45
MediaLib.addAndPlay(model.getIdsForIndexes(indexes))
46
g_mainDisplay.showPlayer()
47
48
49
function onDoubleClick(object) { g_mainDisplay.play(MediaLib, object.id) }
50
51
- function onLabelGrid(object) { return root.getLabel(object) }
52
- function onLabelList(object) { return root.getLabel(object) }
53
-
54
function isInfoExpandPanelAvailable(modelIndexData) { return true }
55
}
56
}
57
58
59
property var model: MLVideoGroupsModel { ml: MediaLib }
60
61
+ property var gridLabels: function (model) {
62
+ return root.getLabelGroup(model, I18n.qtr("%1 Videos"))
63
+ }
64
+
65
+ property var listLabels: function (model) {
66
+ return root.getLabelGroup(model, I18n.qtr("%1"))
67
+ }
68
+
69
function onAction(indexes) {
70
var index = indexes0
71
72
73
root.showList(object, Qt.MouseFocusReason)
74
}
75
76
- function onLabelGrid(object) {
77
- return root.getLabelGroup(object, I18n.qtr("%1 Videos"))
78
- }
79
-
80
- function onLabelList(object) {
81
- return root.getLabelGroup(object, I18n.qtr("%1"))
82
- }
83
-
84
function isInfoExpandPanelAvailable(modelIndexData) {
85
return modelIndexData.isVideo
86
}
87
88
89
property var model: MLVideoFoldersModel { ml: MediaLib }
90
91
+ property var gridLabels: function (model) {
92
+ return root.getLabelGroup(model, I18n.qtr("%1 Videos"))
93
+ }
94
+
95
+ property var listLabels: function (model) {
96
+ return root.getLabelGroup(model, I18n.qtr("%1"))
97
+ }
98
+
99
function onAction(indexes) {
100
var index = indexes0
101
102
103
root.showList(object, Qt.MouseFocusReason)
104
}
105
106
- function onLabelGrid(object) {
107
- return root.getLabelGroup(object, I18n.qtr("%1 Videos"))
108
- }
109
-
110
- function onLabelList(object) {
111
- return root.getLabelGroup(object, I18n.qtr("%1"))
112
- }
113
-
114
function isInfoExpandPanelAvailable(modelIndexData) {
115
return false
116
}
117
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/medialibrary/qml/VideoListDisplay.qml -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/medialibrary/qml/VideoListDisplay.qml
Changed
20
1
2
// NOTE: This is useful for groups because our main criteria is 'name' instead of 'title'.
3
property string mainCriteria: "title"
4
5
+ property alias coverLabels: tableColumns.titlecoverLabels
6
+
7
//---------------------------------------------------------------------------------------------
8
// Private
9
10
11
titleCover_width: VLCStyle.listAlbumCover_width
12
titleCover_radius: VLCStyle.listAlbumCover_radius
13
14
- function titlecoverLabels(model) {
15
- return listView_id.onLabels(model);
16
- }
17
+ titlecoverLabels: listView_id.onLabels
18
}
19
}
20
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/menus/menus.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/menus/menus.cpp
Changed
10
1
2
#include <vlc_common.h>
3
#include <vlc_intf_strings.h>
4
#include <vlc_aout.h> /* audio_output_t */
5
-#include <vlc_player.h>
6
+#include <vlc_interface.h>
7
8
#include "menus.hpp"
9
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/menus/qml_menu_wrapper.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/menus/qml_menu_wrapper.cpp
Changed
14
1
2
if (arrowsize <= 0)
3
arrowsize = 32;
4
5
+ qreal dpr = widget ? widget->devicePixelRatioF() : 1.0;
6
headerOption.rect = QRect(0, 0, arrowsize, arrowsize);
7
- QPixmap arrow(arrowsize, arrowsize);
8
+
9
+ QPixmap arrow(arrowsize * dpr, arrowsize * dpr);
10
+ arrow.setDevicePixelRatio(dpr);
11
arrow.fill(Qt::transparent);
12
13
{
14
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/network/mediatreelistener.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/network/mediatreelistener.hpp
Changed
11
1
2
#include "config.h"
3
#endif
4
5
-#include <vlc_media_library.h>
6
#include <vlc_media_source.h>
7
-#include <vlc_threads.h>
8
#include <vlc_cxx_helpers.hpp>
9
10
#include <memory>
11
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/network/networkdevicemodel.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/network/networkdevicemodel.hpp
Changed
11
1
2
#include <QAbstractListModel>
3
#include <QUrl>
4
5
-#include <vlc_media_library.h>
6
#include <vlc_media_source.h>
7
-#include <vlc_threads.h>
8
#include <vlc_cxx_helpers.hpp>
9
10
#include "mediatreelistener.hpp"
11
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/network/networkmediamodel.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/network/networkmediamodel.hpp
Changed
11
1
2
3
#include <QAbstractListModel>
4
5
-#include <vlc_media_library.h>
6
#include <vlc_media_source.h>
7
-#include <vlc_threads.h>
8
#include <vlc_cxx_helpers.hpp>
9
10
#include "mediatreelistener.hpp"
11
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/network/networksourcesmodel.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/network/networksourcesmodel.hpp
Changed
11
1
2
3
#include <QAbstractListModel>
4
5
-#include <vlc_media_library.h>
6
#include <vlc_media_source.h>
7
-#include <vlc_threads.h>
8
#include <vlc_cxx_helpers.hpp>
9
10
#include <maininterface/mainctx.hpp>
11
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/network/servicesdiscoverymodel.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/network/servicesdiscoverymodel.hpp
Changed
11
1
2
3
#include <QAbstractListModel>
4
5
-#include <vlc_media_library.h>
6
#include <vlc_media_source.h>
7
-#include <vlc_threads.h>
8
#include <vlc_addons.h>
9
#include <vlc_cxx_helpers.hpp>
10
11
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/player/player_controller.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/player/player_controller.cpp
Changed
34
1
2
#include <QSignalMapper>
3
#include <QThreadPool>
4
5
-#include <assert.h>
6
+#include <cassert>
7
8
#define POSITION_MIN_UPDATE_INTERVAL VLC_TICK_FROM_MS(15)
9
10
11
connect( &d_ptr->m_position_timer, &QTimer::timeout, this, &PlayerController::updatePositionFromTimer );
12
connect( &d_ptr->m_time_timer, &QTimer::timeout, this, &PlayerController::updateTimeFromTimer );
13
14
- input_fetcher_cbs.on_art_fetch_ended = onArtFetchEnded_callback;
15
+ input_preparser_cbs.on_art_fetch_ended = onArtFetchEnded_callback;
16
}
17
18
PlayerController::~PlayerController()
19
20
if ( status & ( ITEM_ART_NOTFOUND|ITEM_ART_FETCHED ) )
21
return;
22
}
23
- libvlc_ArtRequest( vlc_object_instance(d->p_intf), p_item,
24
- (b_forced) ? META_REQUEST_OPTION_FETCH_ANY
25
- : META_REQUEST_OPTION_FETCH_LOCAL,
26
- &input_fetcher_cbs, this );
27
+ libvlc_MetadataRequest( vlc_object_instance(d->p_intf), p_item,
28
+ (b_forced) ? META_REQUEST_OPTION_FETCH_ANY
29
+ : META_REQUEST_OPTION_FETCH_LOCAL,
30
+ &input_preparser_cbs, this, 0, NULL );
31
}
32
}
33
34
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/player/player_controller.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/player/player_controller.hpp
Changed
10
1
2
QSignalMapper *menusAudioMapper; //used by VLCMenuBar
3
4
/* updateArt gui request */
5
- input_fetcher_callbacks_t input_fetcher_cbs;
6
+ struct vlc_metadata_cbs input_preparser_cbs;
7
static void onArtFetchEnded_callback(input_item_t *, bool fetched, void *userdata);
8
void onArtFetchEnded(input_item_t *, bool fetched);
9
};
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/player/qml/ControlLayout.qml -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/player/qml/ControlLayout.qml
Changed
201
1
2
FocusScope {
3
id: controlLayout
4
5
- signal requestLockUnlockAutoHide(bool lock)
6
+ // Properties
7
+
8
+ property int contentWidth: 0
9
+
10
+ property int alignment: 0
11
+
12
+ property var altFocusAction: Navigation.defaultNavigationUp
13
+
14
+ readonly property ColorContext colorContext: ColorContext {
15
+ id: theme
16
+ colorSet: ColorContext.Window
17
+ }
18
+
19
+ // Aliases
20
+
21
+ property alias count: repeater.count
22
23
property alias model: repeater.model
24
25
- readonly property real minimumWidth: {
26
- var minimumWidth = 0
27
- var count = repeater.count
28
+ // Signals
29
30
- for (var i = 0; i < count; ++i) {
31
- var item = repeater.itemAt(i)
32
+ signal requestLockUnlockAutoHide(bool lock)
33
34
- if (item.minimumWidth !== undefined)
35
- minimumWidth += item.minimumWidth
36
- else
37
- minimumWidth += item.implicitWidth
38
- }
39
+ // Settings
40
+
41
+ implicitWidth: {
42
+ if (count === 0)
43
+ return 0
44
45
- minimumWidth += ((count - 1) * playerControlLayout.spacing)
46
+ var size = 0
47
48
- return minimumWidth
49
+ for (var i = 0; i < count; ++i) {
50
+ size += repeater.itemAt(i).preferredWidth
51
+ }
52
+
53
+ if (alignment)
54
+ // NOTE: We provision the spacing induced by the alignment item.
55
+ return size + count * rowLayout.spacing
56
+ else
57
+ return size + (count - 1) * rowLayout.spacing
58
}
59
60
- property bool rightAligned: false
61
+ implicitHeight: rowLayout.implicitHeight
62
63
Navigation.navigable: {
64
for (var i = 0; i < repeater.count; ++i) {
65
- if (repeater.itemAt(i).item.focus) {
66
+ var item = repeater.itemAt(i).item
67
+
68
+ if (item && item.focus) {
69
return true
70
}
71
}
72
return false
73
}
74
75
- implicitWidth: minimumWidth
76
- implicitHeight: rowLayout.implicitHeight
77
+ // Events
78
79
- property var altFocusAction: Navigation.defaultNavigationUp
80
+ Component.onCompleted: {
81
+ visibleChanged.connect(_handleFocus)
82
+ activeFocusChanged.connect(_handleFocus)
83
+ }
84
+
85
+ // Functions
86
87
function _handleFocus() {
88
if (typeof activeFocus === "undefined")
89
90
altFocusAction()
91
}
92
93
- Component.onCompleted: {
94
- visibleChanged.connect(_handleFocus)
95
- activeFocusChanged.connect(_handleFocus)
96
- }
97
+ function _updateContentWidth() {
98
+ var size = 0
99
100
- readonly property ColorContext colorContext: ColorContext {
101
- id: theme
102
- colorSet: ColorContext.Window
103
+ for (var i = 0; i < count; i++) {
104
+
105
+ var item = repeater.itemAt(i)
106
+
107
+ if (item === null || item.isActive === false)
108
+ continue
109
+
110
+ var width = item.width
111
+
112
+ if (width)
113
+ size += width + spacing
114
+ }
115
+
116
+ if (size)
117
+ contentWidth = size - spacing
118
+ else
119
+ contentWidth = size
120
}
121
122
+ // Children
123
+
124
RowLayout {
125
id: rowLayout
126
127
128
spacing: playerControlLayout.spacing
129
130
Item {
131
- Layout.fillWidth: rightAligned
132
+ Layout.fillWidth: (controlLayout.alignment === Qt.AlignRight)
133
}
134
135
Repeater {
136
id: repeater
137
138
// NOTE: We apply the 'navigation chain' after adding the item.
139
- onItemAdded: item.applyNavigation()
140
+ onItemAdded: {
141
+ item.applyNavigation()
142
+
143
+ controlLayout._updateContentWidth()
144
+ }
145
146
onItemRemoved: {
147
// NOTE: We update the 'navigation chain' after removing the item.
148
item.removeNavigation()
149
150
item.recoverFocus(index)
151
+
152
+ controlLayout._updateContentWidth()
153
}
154
155
delegate: Loader {
156
id: loader
157
158
+ // Properties
159
+
160
+ // NOTE: This is required for contentWidth because the visible property is delayed.
161
+ property bool isActive: (x + minimumWidth <= rowLayout.width)
162
+
163
+ property int minimumWidth: {
164
+ if (expandable)
165
+ return item.minimumWidth
166
+ else if (item)
167
+ return item.implicitWidth
168
+ else
169
+ return 0
170
+ }
171
+
172
+ property int preferredWidth: (item && item.preferredWidth) ? item.preferredWidth
173
+ : minimumWidth
174
+
175
+ readonly property bool expandable: (item && item.minimumWidth !== undefined)
176
+
177
+ // Settings
178
+
179
source: PlayerControlbarControls.control(model.id).source
180
181
focus: (index === 0)
182
183
- Layout.alignment: Qt.AlignVCenter | (rightAligned ? Qt.AlignRight : Qt.AlignLeft)
184
- Layout.minimumWidth: minimumWidth
185
Layout.fillWidth: expandable
186
- Layout.maximumWidth: item.implicitWidth
187
188
- readonly property real minimumWidth: (expandable ? item.minimumWidth : item.implicitWidth)
189
- readonly property bool expandable: (item.minimumWidth !== undefined)
190
+ Layout.minimumWidth: minimumWidth
191
+
192
+ Layout.preferredWidth: preferredWidth
193
+
194
+ Layout.maximumWidth: preferredWidth
195
+
196
+ Layout.alignment: (Qt.AlignVCenter | controlLayout.alignment)
197
198
BindingCompat {
199
delayed: true // this is important
200
target: loader
201
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/player/qml/PlayerControlLayout.qml -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/player/qml/PlayerControlLayout.qml
Changed
201
1
2
FocusScope {
3
id: playerControlLayout
4
5
- implicitWidth: layoutLoader_left.implicitWidth + layoutLoader_center.implicitWidth + layoutLoader_right.implicitWidth + 2 * layoutSpacing
6
- implicitHeight: VLCStyle.maxControlbarControlHeight
7
+ // Properties
8
9
property real defaultSize: VLCStyle.icon_normal // default size for IconToolButton based controls
10
11
property real spacing: VLCStyle.margin_normal // spacing between controls
12
- property real layoutSpacing: VLCStyle.margin_xxlarge // spacing between layouts (left, center, and right)
13
+
14
+ property real layoutSpacing: VLCStyle.margin_xlarge // spacing between layouts (left, center, and right)
15
16
property int identifier: -1
17
+
18
readonly property PlayerControlbarModel model: {
19
if (!!MainCtx.controlbarProfileModel.currentModel)
20
- MainCtx.controlbarProfileModel.currentModel.getModel(identifier)
21
+ return MainCtx.controlbarProfileModel.currentModel.getModel(identifier)
22
else
23
- null
24
+ return null
25
}
26
27
+ readonly property ColorContext colorContext: ColorContext {
28
+ id: theme
29
+ colorSet: ColorContext.Window
30
+ }
31
+
32
+ // Private
33
+
34
+ property int _minimumSpacing: layoutSpacing - spacing
35
+
36
+ // Signals
37
+
38
signal requestLockUnlockAutoHide(bool lock)
39
40
+ // Settings
41
+
42
+ implicitHeight: VLCStyle.maxControlbarControlHeight
43
+
44
+ // Events
45
+
46
Component.onCompleted: {
47
console.assert(identifier >= 0)
48
+
49
+ _updateLayout()
50
}
51
52
- readonly property ColorContext colorContext: ColorContext {
53
- id: theme
54
- colorSet: ColorContext.Window
55
+ onWidthChanged: _updateLayout()
56
+
57
+ // Functions
58
+
59
+ function _updateLayout() {
60
+ var item = loaderCenter.item
61
+
62
+ // NOTE: Sometimes this gets called before the item is loaded.
63
+ if (item === null)
64
+ return
65
+
66
+ if (item.count) {
67
+
68
+ loaderCenter.width = Math.min(loaderCenter.implicitWidth, width)
69
+
70
+ loaderLeft.width = loaderCenter.x - _minimumSpacing
71
+
72
+ loaderRight.width = width - loaderCenter.x - loaderCenter.width - _minimumSpacing
73
+
74
+ } else if (loaderRight.item.count) {
75
+
76
+ var implicitLeft = loaderLeft.implicitWidth
77
+ var implicitRight = loaderRight.implicitWidth
78
+
79
+ var total = implicitLeft + implicitRight
80
+
81
+ var size = total + _minimumSpacing
82
+
83
+ if (size > width) {
84
+ size = width - _minimumSpacing
85
+
86
+ // NOTE: When both sizes are equals we expand on the left.
87
+ if (implicitLeft >= implicitRight) {
88
+
89
+ loaderRight.width = Math.round(size * (implicitRight / total))
90
+
91
+ item = loaderRight.item
92
+
93
+ if (item === null)
94
+ return
95
+
96
+ var contentWidth = item.contentWidth
97
+
98
+ // NOTE: We assign the remaining width based on the contentWidth.
99
+ if (contentWidth)
100
+ loaderLeft.width = width - contentWidth - _minimumSpacing
101
+ else
102
+ loaderLeft.width = width
103
+ } else {
104
+ loaderLeft.width = Math.round(size * (implicitLeft / total))
105
+
106
+ item = loaderLeft.item
107
+
108
+ if (item === null)
109
+ return
110
+
111
+ var contentWidth = item.contentWidth
112
+
113
+ // NOTE: We assign the remaining width based on the contentWidth.
114
+ if (contentWidth)
115
+ loaderRight.width = width - contentWidth - _minimumSpacing
116
+ else
117
+ loaderRight.width = width
118
+ }
119
+ } else {
120
+ loaderLeft.width = implicitLeft
121
+ loaderRight.width = implicitRight
122
+ }
123
+ } else
124
+ loaderLeft.width = width
125
}
126
127
- Loader {
128
- id: layoutLoader_left
129
+ // Children
130
131
- anchors {
132
- right: layoutLoader_center.left
133
- left: parent.left
134
- top: parent.top
135
- bottom: parent.bottom
136
+ Loader {
137
+ id: loaderLeft
138
139
- // Spacing for the filler item acts as padding
140
- rightMargin: layoutSpacing - spacing
141
- }
142
+ anchors.left: parent.left
143
+ anchors.top: parent.top
144
+ anchors.bottom: parent.bottom
145
146
- active: !!playerControlLayout.model
147
- && !!playerControlLayout.model.left
148
+ active: !!playerControlLayout.model && !!playerControlLayout.model.left
149
150
focus: true
151
152
153
ctx: MainCtx
154
}
155
156
- Navigation.parentItem: playerControlLayout
157
- Navigation.rightItem: layoutLoader_center.item
158
+ alignment: Qt.AlignLeft
159
160
focus: true
161
162
altFocusAction: Navigation.defaultNavigationRight
163
164
+ Navigation.parentItem: playerControlLayout
165
+ Navigation.rightItem: loaderCenter.item
166
+
167
+ onImplicitWidthChanged: playerControlLayout._updateLayout()
168
+
169
+ onCountChanged: playerControlLayout._updateLayout()
170
+
171
onRequestLockUnlockAutoHide: playerControlLayout.requestLockUnlockAutoHide(lock)
172
}
173
}
174
175
Loader {
176
- id: layoutLoader_center
177
+ id: loaderCenter
178
179
- anchors {
180
- horizontalCenter: parent.horizontalCenter
181
- top: parent.top
182
- bottom: parent.bottom
183
- }
184
+ anchors.top: parent.top
185
+ anchors.bottom: parent.bottom
186
187
- active: !!playerControlLayout.model
188
- && !!playerControlLayout.model.center
189
+ anchors.horizontalCenter: parent.horizontalCenter
190
191
- width: (parent.width < implicitWidth) ? parent.width
192
- : implicitWidth
193
+ active: !!playerControlLayout.model && !!playerControlLayout.model.center
194
195
sourceComponent: ControlLayout {
196
model: ControlListFilter {
197
198
ctx: MainCtx
199
}
200
201
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/player/qml/controlbarcontrols/ArtworkInfoWidget.qml -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/player/qml/controlbarcontrols/ArtworkInfoWidget.qml
Changed
14
1
2
readonly property real minimumWidth: coverRect.implicitWidth +
3
+ (leftPadding + rightPadding)
4
5
+ readonly property int preferredWidth: minimumWidth + contentItem.spacing * 2
6
+ +
7
+ Math.max(titleLabel.implicitWidth,
8
+ artistLabel.implicitWidth,
9
+ progressIndicator.implicitWidth)
10
+
11
property bool _keyPressed: false
12
13
text: I18n.qtr("Open player")
14
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/playlist/playlist_common.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/playlist/playlist_common.cpp
Changed
28
1
2
3
#include "playlist_common.hpp"
4
5
+#ifdef HAVE_CONFIG_H
6
+# include "config.h"
7
+#endif
8
+#include <vlc_playlist.h>
9
+
10
+
11
12
PlaylistPtr::PlaylistPtr()
13
: m_playlist(nullptr)
14
15
return *this;
16
}
17
18
+PlaylistLocker::PlaylistLocker(vlc_playlist_t* playlist)
19
+ : m_playlist(playlist)
20
+{
21
+ vlc_playlist_Lock(m_playlist);
22
+}
23
+
24
+PlaylistLocker::~PlaylistLocker()
25
+{
26
+ vlc_playlist_Unlock(m_playlist);
27
+}
28
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/playlist/playlist_common.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/playlist/playlist_common.hpp
Changed
39
1
2
#ifndef PLAYLIST_COMMON_HPP
3
#define PLAYLIST_COMMON_HPP
4
5
-#ifdef HAVE_CONFIG_H
6
-# include "config.h"
7
-#endif
8
-
9
#include <QObject>
10
-#include <vlc_playlist.h>
11
+
12
+extern "C" {
13
+ typedef struct vlc_playlist vlc_playlist_t;
14
+}
15
16
// QObject wrapper to carry playlist ptr through QML
17
class PlaylistPtr
18
19
class PlaylistLocker
20
{
21
public:
22
- inline PlaylistLocker(vlc_playlist_t* playlist)
23
- : m_playlist(playlist)
24
- {
25
- vlc_playlist_Lock(m_playlist);
26
- }
27
+ PlaylistLocker(vlc_playlist_t* playlist);
28
29
- inline ~PlaylistLocker()
30
- {
31
- vlc_playlist_Unlock(m_playlist);
32
- }
33
+ ~PlaylistLocker();
34
35
+private:
36
vlc_playlist_t* m_playlist;
37
};
38
39
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/playlist/playlist_controller.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/playlist/playlist_controller.cpp
Changed
12
1
2
3
#include "playlist_controller.hpp"
4
#include "playlist_controller_p.hpp"
5
-#include "vlc_player.h"
6
-#include "vlc_url.h"
7
+#include <vlc_player.h>
8
+#include <vlc_url.h>
9
#include "util/qmlinputitem.hpp"
10
#include <algorithm>
11
#include <QVariant>
12
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/playlist/playlist_item.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/playlist/playlist_item.cpp
Changed
9
1
2
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
3
*****************************************************************************/
4
#include "playlist_item.hpp"
5
+#include <vlc_input_item.h>
6
7
//namespace vlc {
8
//namespace playlist {
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/playlist/playlist_item.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/playlist/playlist_item.hpp
Changed
12
1
2
# include "config.h"
3
#endif
4
5
-#include "vlc_player.h"
6
+#include <vlc_common.h>
7
#include <vlc_cxx_helpers.hpp>
8
-#include <vlc_input_item.h>
9
#include <vlc_playlist.h>
10
#include <QExplicitlySharedDataPointer>
11
#include <QUrl>
12
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/playlist/playlist_model.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/playlist/playlist_model.cpp
Changed
10
1
2
#include "playlist_model.hpp"
3
#include "playlist_model_p.hpp"
4
#include <algorithm>
5
-#include <assert.h>
6
+#include <cassert>
7
#include "util/qmlinputitem.hpp"
8
9
namespace vlc {
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/playlist/qml/PlaylistDelegate.qml -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/playlist/qml/PlaylistDelegate.qml
Changed
70
1
2
3
// Settings
4
5
- topPadding: VLCStyle.margin_xxsmall
6
+ topPadding: VLCStyle.playlistDelegate_verticalPadding
7
8
- bottomPadding: VLCStyle.margin_xxsmall
9
+ bottomPadding: VLCStyle.playlistDelegate_verticalPadding
10
11
- leftPadding: VLCStyle.margin_normal
12
+ leftPadding: VLCStyle.margin_xxsmall
13
14
rightPadding: Math.max(listView.scrollBarWidth, VLCStyle.margin_normal)
15
16
17
contentItem: RowLayout {
18
spacing: 0
19
20
+ Widgets.CurrentIndicator {
21
+ id: currentIndicator
22
+
23
+ // disable positioning via CurrentIndicator, manually position according to RowLayout
24
+ source: null
25
+
26
+ implicitWidth: VLCStyle.heightBar_xxxsmall
27
+ Layout.fillHeight: true
28
+
29
+ color: {
30
+ if (model.isCurrent)
31
+ return theme.accent
32
+
33
+ // based on design, ColorContext can't handle this case
34
+ if (!delegate.hovered)
35
+ return VLCStyle.setColorAlpha(theme.indicator, 0)
36
+
37
+ return theme.indicator
38
+ }
39
+ }
40
+
41
Item {
42
id: artworkItem
43
44
- Layout.preferredHeight: VLCStyle.icon_normal
45
- Layout.preferredWidth: VLCStyle.icon_normal
46
+ Layout.preferredHeight: VLCStyle.icon_playlistArt
47
+ Layout.preferredWidth: VLCStyle.icon_playlistArt
48
Layout.alignment: Qt.AlignVCenter
49
+ Layout.leftMargin: VLCStyle.margin_xsmall
50
51
Accessible.role: Accessible.Graphic
52
Accessible.name: I18n.qtr("Cover")
53
54
Layout.fillWidth: true
55
Layout.fillHeight: true
56
Layout.leftMargin: VLCStyle.margin_large
57
- spacing: 0
58
+ spacing: VLCStyle.margin_xsmall
59
60
Widgets.ListLabel {
61
id: textInfo
62
63
Layout.fillHeight: true
64
Layout.fillWidth: true
65
66
- font.weight: model.isCurrent ? Font.DemiBold : Font.Normal
67
text: (model.artist ? model.artist : I18n.qtr("Unknown Artist"))
68
color: theme.fg.primary
69
verticalAlignment: Text.AlignBottom
70
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/playlist/qml/PlaylistListView.qml -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/playlist/qml/PlaylistListView.qml
Changed
36
1
2
3
// NOTE: Dropping medialibrary content into the queue.
4
} else if (Helpers.isValidInstanceOf(item, Widgets.DragItem)) {
5
- item.getSelectedInputItem(function(inputItems) {
6
- if (!Array.isArray(inputItems) || inputItems.length === 0) {
7
- console.warn("can't convert items to input items");
8
- return
9
- }
10
- mainPlaylistController.insert(index, inputItems, false)
11
- })
12
+ if (item.inputItems) {
13
+ mainPlaylistController.insert(index, item.inputItems, false)
14
+ } else {
15
+ item.getSelectedInputItem(function(inputItems) {
16
+ if (!Array.isArray(inputItems) || inputItems.length === 0) {
17
+ console.warn("can't convert items to input items");
18
+ return
19
+ }
20
+ mainPlaylistController.insert(index, inputItems, false)
21
+ })
22
+ }
23
24
// NOTE: Dropping an external item (i.e. filesystem) into the queue.
25
} else if (drop.hasUrls) {
26
27
spacing: VLCStyle.margin_large
28
29
Widgets.IconLabel {
30
- Layout.preferredWidth: VLCStyle.icon_playlistHeader
31
+ // playlist cover column
32
+ Layout.preferredWidth: VLCStyle.icon_playlistArt
33
34
horizontalAlignment: Text.AlignHCenter
35
verticalAlignment: Text.AlignVCenter
36
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/qt.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/qt.cpp
Changed
48
1
2
#include <QVector>
3
#include "playlist/playlist_item.hpp"
4
5
+#include <vlc_interface.h>
6
#include <vlc_plugin.h>
7
#include <vlc_window.h>
8
+#include <vlc_player.h>
9
#include <vlc_cxx_helpers.hpp>
10
11
#include <QQuickWindow>
12
13
#define SMOOTH_SCROLLING_TEXT N_( "Use smooth scrolling in Flickable based views" )
14
#define SMOOTH_SCROLLING_LONGTEXT N_( "Deactivating this option will disable smooth scrolling in Flickable based views (such as the Playqueue)" )
15
16
+#define SAFE_AREA_TEXT N_( "Safe area for the user interface" )
17
+#define SAFE_AREA_LONGTEXT N_( "Sets the safe area percentage between 0.0 and 100 when you want " \
18
+ "to ensure the visibility of the user interface on a constrained " \
19
+ "viewport" )
20
+
21
static const int initial_prefs_view_list = { 0, 1, 2 };
22
static const char *const initial_prefs_view_list_texts =
23
{ N_("Simple"), N_("Advanced"), N_("Expert") };
24
25
26
add_bool( "qt-smooth-scrolling", true, SMOOTH_SCROLLING_TEXT, SMOOTH_SCROLLING_LONGTEXT )
27
28
+ add_float_with_range( "qt-safe-area", 0, 0, 100.0, SAFE_AREA_TEXT, SAFE_AREA_LONGTEXT )
29
+
30
cannot_unload_broken_library()
31
32
add_submodule ()
33
34
return ret ? VLC_SUCCESS : VLC_EGENERIC;
35
}
36
}
37
+
38
+vlc_player_locker::vlc_player_locker( vlc_player_t* p_player )
39
+ : p_player( p_player )
40
+{
41
+ vlc_player_Lock( p_player );
42
+}
43
+
44
+vlc_player_locker::~vlc_player_locker()
45
+{
46
+ vlc_player_Unlock( p_player );
47
+}
48
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/qt.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/qt.hpp
Changed
36
1
2
#endif
3
4
#include <vlc_common.h>
5
-#include <vlc_player.h>
6
7
#include <qconfig.h>
8
9
10
typedef struct intf_dialog_args_t intf_dialog_args_t;
11
typedef struct vlc_playlist vlc_playlist_t;
12
typedef struct intf_thread_t intf_thread_t;
13
+typedef struct vlc_player_t vlc_player_t;
14
}
15
16
namespace vlc {
17
18
* destroyed.
19
*/
20
struct vlc_player_locker {
21
- vlc_player_locker( vlc_player_t* p_player )
22
- : p_player( p_player )
23
- {
24
- vlc_player_Lock( p_player );
25
- }
26
-
27
- ~vlc_player_locker()
28
- {
29
- vlc_player_Unlock( p_player );
30
- }
31
+ vlc_player_locker( vlc_player_t* );
32
+ ~vlc_player_locker();
33
34
private:
35
vlc_player_t* p_player;
36
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/style/VLCStyle.qml -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/style/VLCStyle.qml
Changed
29
1
2
readonly property int icon_actionButton: icon_normal
3
readonly property int icon_PIP: icon_normal
4
readonly property int icon_CSD: icon_small
5
+ readonly property int icon_playlistArt: dp(32, scale)
6
7
readonly property int play_cover_small: dp(24, scale)
8
readonly property int play_cover_normal: dp(48, scale)
9
10
11
readonly property int artistBanner_height: dp(200, scale)
12
13
+ readonly property int playlistDelegate_verticalPadding: dp(6, scale)
14
+
15
//global application size, updated by the root widget
16
property int appWidth: 0
17
property int appHeight: 0
18
19
readonly property bool isScreenSmall: appWidth <= smallWidth
20
21
//global application margin "safe area"
22
- readonly property int applicationHorizontalMargin: 0
23
- readonly property int applicationVerticalMargin: 0
24
+ readonly property int applicationHorizontalMargin: MainCtx.safeArea * appWidth / 100
25
+ readonly property int applicationVerticalMargin: applicationHorizontalMargin
26
27
readonly property int globalToolbar_height: dp(40, scale)
28
readonly property int localToolbar_height: dp(48, scale)
29
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/style/colorcontext.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/style/colorcontext.cpp
Changed
13
1
2
return getColor(Decoration, Separator);
3
}
4
5
+QColor ColorContext::indicator() const
6
+{
7
+ return getColor(Decoration, Indicator);
8
+}
9
+
10
QColor ColorContext::shadow() const
11
{
12
return getColor(Decoration, Shadow);
13
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/style/colorcontext.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/style/colorcontext.hpp
Changed
25
1
2
Accent = VQTC_NAME_ACCENT,
3
Shadow = VQTC_NAME_SHADOW,
4
Separator = VQTC_NAME_SEPARATOR,
5
+ Indicator = VQTC_NAME_INDICATOR
6
};
7
8
Q_PROPERTY(SystemPalette* palette READ palette WRITE setPalette NOTIFY paletteChanged FINAL)
9
10
Q_PROPERTY(QColor visualFocus READ visualFocus NOTIFY colorsChanged FINAL)
11
Q_PROPERTY(QColor border READ border NOTIFY colorsChanged FINAL)
12
Q_PROPERTY(QColor separator READ separator NOTIFY colorsChanged FINAL)
13
+ Q_PROPERTY(QColor indicator READ indicator NOTIFY colorsChanged FINAL)
14
Q_PROPERTY(QColor shadow READ shadow NOTIFY colorsChanged FINAL)
15
Q_PROPERTY(QColor accent READ accent NOTIFY colorsChanged FINAL)
16
17
18
QColor visualFocus() const;
19
QColor border() const;
20
QColor separator() const;
21
+ QColor indicator() const;
22
QColor shadow() const;
23
QColor accent() const;
24
25
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/style/gtkthemeprovider/gtk_compat.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/style/gtkthemeprovider/gtk_compat.h
Changed
12
1
2
# include "config.h"
3
#endif
4
5
-#include "vlc_common.h"
6
-#include "vlc_picture.h"
7
+#include <vlc_common.h>
8
+#include <vlc_picture.h>
9
10
#include <algorithm>
11
12
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/style/gtkthemeprovider/gtk_util.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/style/gtkthemeprovider/gtk_util.h
Changed
10
1
2
#include "gtk_compat.h"
3
#include "scoped_gobject.h"
4
5
-#include "vlc_picture.h"
6
+#include <vlc_picture.h>
7
8
namespace gtk {
9
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/style/gtkthemeprovider/gtkthemeprovider.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/style/gtkthemeprovider/gtkthemeprovider.cpp
Changed
11
1
2
setGtkColorSetFg(obj, CS, VQTC_NAME_PRIMARY, ITEM_SELECTOR);
3
setGtkColorSetBorder(obj, CS, ITEM_SELECTOR);
4
setGtkColorSetHighlight(obj, CS, ITEM_SELECTOR);
5
+
6
+ const auto separator = GetSeparatorColor(" GtkListBoxRow#separator.horizontal");
7
+ setGtkColor(obj, CS, VQTC_SECTION_DECORATION, VQTC_NAME_INDICATOR, VQTC_STATE_NORMAL, separator);
8
}
9
10
#define COMBOBOX_SELECTOR VIEW_SELECTOR " GtkComboBoxText#combobox #box.linked #entry.combo"
11
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/style/qtthemeprovider.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/style/qtthemeprovider.hpp
Changed
9
1
2
VQTC_NAME_ACCENT,
3
VQTC_NAME_SHADOW,
4
VQTC_NAME_SEPARATOR,
5
+ VQTC_NAME_INDICATOR,
6
VQTC_NAME_COUNT
7
};
8
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/style/systempalette.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/style/systempalette.cpp
Changed
20
1
2
3
setColor(CS, C::Fg, C::Primary, C::Normal, Qt::black);
4
setColor(CS, C::Fg, C::Secondary, C::Normal, setColorAlpha(Qt::black, 0.6));
5
+
6
+ setColor(CS, C::Decoration, C::Indicator, C::Normal, QColor("#9e9e9e")); //FIXME not a predef
7
+
8
}
9
10
//Accent Buttons
11
12
13
setColor(CS, C::Fg, C::Primary, C::Normal, Qt::white);
14
setColor(CS, C::Fg, C::Secondary, C::Normal, setColorAlpha(Qt::white, 0.6));
15
+
16
+ setColor(CS, C::Decoration, C::Indicator, C::Normal, QColor("#666666")); //FIXME not a predef
17
}
18
19
//Accent Buttons
20
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/style/systempalettethemeprovider.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/style/systempalettethemeprovider.cpp
Changed
15
1
2
setQtColor(obj, CS, VQTC_SECTION_BG, VQTC_NAME_HIGHLIGHT, VQTC_STATE_FOCUSED, hightlightHover);
3
setQtColor(obj, CS, VQTC_SECTION_BG, VQTC_NAME_HIGHLIGHT, VQTC_STATE_HOVERED, hightlightHover);
4
setQtColor(obj, CS, VQTC_SECTION_FG, VQTC_NAME_HIGHLIGHT, VQTC_STATE_NORMAL, textOnHightlight);
5
+
6
+
7
+ const auto bg = palette.color(QPalette::AlternateBase);
8
+ const auto indicator = sys->m_isDark ? bg.lighter() : bg.darker();
9
+ setQtColor(obj, CS, VQTC_SECTION_DECORATION, VQTC_NAME_INDICATOR
10
+ , VQTC_STATE_NORMAL, indicator);
11
+
12
}
13
14
//Badge
15
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/style/windowsthemeprovider.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/style/windowsthemeprovider.cpp
Changed
10
1
2
setQtColor(obj, CS, VQTC_SECTION_DECORATION, VQTC_NAME_BORDER, VQTC_STATE_NORMAL, COLOR_BTNTEXT);
3
setQtColor(obj, CS, VQTC_SECTION_DECORATION, VQTC_NAME_BORDER, VQTC_STATE_FOCUSED, COLOR_HIGHLIGHT);
4
setQtColor(obj, CS, VQTC_SECTION_DECORATION, VQTC_NAME_BORDER, VQTC_STATE_HOVERED, COLOR_HIGHLIGHT);
5
+
6
+ setQtColor(obj, CS, VQTC_SECTION_DECORATION, VQTC_NAME_INDICATOR, VQTC_STATE_NORMAL, COLOR_HIGHLIGHT);
7
}
8
9
//set colors on all buttons
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/util/audio_device_model.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/util/audio_device_model.cpp
Changed
10
1
2
*****************************************************************************/
3
4
#include "audio_device_model.hpp"
5
+#include <vlc_player.h>
6
+#include <vlc_aout.h>
7
8
extern "C" {
9
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/util/audio_device_model.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/util/audio_device_model.hpp
Changed
20
1
2
3
#include <QAbstractListModel>
4
5
-#ifdef HAVE_CONFIG_H
6
-# include "config.h"
7
-#endif
8
-
9
#include "qt.hpp"
10
-#include <vlc_aout.h>
11
+
12
+extern "C" {
13
+ typedef struct vlc_player_aout_listener_id vlc_player_aout_listener_id;
14
+ typedef struct audio_output audio_output_t;
15
+ typedef struct vlc_player_t vlc_player_t;
16
+}
17
18
class AudioDeviceModel : public QAbstractListModel
19
{
20
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/util/effects_image_provider.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/util/effects_image_provider.cpp
Changed
41
1
2
// Copy the mask
3
QPainter painter(&ret);
4
painter.setCompositionMode(QPainter::CompositionMode_Source);
5
- const auto radius = effectiveBlurRadius();
6
+ const auto radius = m_blurRadius;
7
painter.drawImage(radius + m_xOffset, radius + m_yOffset, mask);
8
}
9
10
// Blur the mask
11
- qt_blurImage(ret, effectiveBlurRadius(), false);
12
+ qt_blurImage(ret, m_blurRadius, false);
13
14
return ret;
15
}
16
17
constexpr QSize boundingSize(const QSize& size) const
18
{
19
// Size of bounding rectangle of the effect
20
- const qreal radius = 2 * effectiveBlurRadius();
21
- return size + QSize(qAbs(m_xOffset) + radius, qAbs(m_yOffset) + radius);
22
+ const qreal diameter = m_blurRadius * 2;
23
+ return size + QSize(qAbs(m_xOffset) + diameter, qAbs(m_yOffset) + diameter);
24
}
25
26
protected:
27
28
QColor m_color {63, 63, 63, 180};
29
qreal m_xOffset = 0.0;
30
qreal m_yOffset = 0.0;
31
-
32
-private:
33
- constexpr qreal effectiveBlurRadius() const
34
- {
35
- // Translated blur radius for the Qt blur algorithm
36
- return 2.5 * (m_blurRadius + 1);
37
- }
38
};
39
40
class RoundedRectDropShadowEffect : public RectDropShadowEffect
41
_service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/util/qml/ListViewRev11.qml
Added
26
1
2
+/*****************************************************************************
3
+ * Copyright (C) 2023 VLC authors and VideoLAN
4
+ *
5
+ * This program is free software; you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation; either version 2 of the License, or
8
+ * ( at your option ) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program; if not, write to the Free Software
17
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
18
+ *****************************************************************************/
19
+
20
+
21
+import QtQuick 2.11
22
+
23
+ListView {
24
+
25
+}
26
_service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/util/qml/ListViewRev15.qml
Added
26
1
2
+/*****************************************************************************
3
+ * Copyright (C) 2023 VLC authors and VideoLAN
4
+ *
5
+ * This program is free software; you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation; either version 2 of the License, or
8
+ * ( at your option ) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program; if not, write to the Free Software
17
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
18
+ *****************************************************************************/
19
+
20
+
21
+import QtQuick 2.15
22
+
23
+ListView {
24
+
25
+}
26
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/util/renderer_manager.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/util/renderer_manager.cpp
Changed
36
1
2
#include "renderer_manager.hpp"
3
4
+#include <vlc_player.h>
5
+
6
#include <QApplication>
7
8
+#ifdef HAVE_CONFIG_H
9
+# include "config.h"
10
+#endif
11
+
12
+#include <vlc_common.h>
13
+#include <vlc_renderer_discovery.h>
14
+#include <vlc_player.h>
15
+
16
const QEvent::Type RendererManagerEvent::AddedEvent =
17
(QEvent::Type)QEvent::registerEventType();
18
const QEvent::Type RendererManagerEvent::RemovedEvent =
19
(QEvent::Type)QEvent::registerEventType();
20
21
+RendererManagerEvent::RendererManagerEvent(Type type, vlc_renderer_item_t* p_item_)
22
+ : QEvent( type ), p_item( p_item_ )
23
+{
24
+ vlc_renderer_item_hold( p_item );
25
+}
26
+
27
+RendererManagerEvent::~RendererManagerEvent()
28
+{
29
+ vlc_renderer_item_release( p_item );
30
+}
31
+
32
+
33
RendererManager::RendererManager( qt_intf_t *p_intf_ ) :
34
p_intf( p_intf_ ), p_selected_item( NULL )
35
{
36
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/util/renderer_manager.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/util/renderer_manager.hpp
Changed
45
1
2
#ifndef RENDERER_MANAGER_HPP
3
#define RENDERER_MANAGER_HPP
4
5
-#ifdef HAVE_CONFIG_H
6
-# include "config.h"
7
-#endif
8
-
9
#include "qt.hpp"
10
#include "util/singleton.hpp"
11
12
-#include <vlc_common.h>
13
-#include <vlc_renderer_discovery.h>
14
-
15
#include <QObject>
16
#include <QEvent>
17
#include <QTimer>
18
#include <QVector>
19
#include <QHash>
20
21
+extern "C" {
22
+ typedef struct vlc_renderer_item_t vlc_renderer_item_t;
23
+}
24
+
25
class RendererManagerEvent : public QEvent
26
{
27
public:
28
static const QEvent::Type AddedEvent;
29
static const QEvent::Type RemovedEvent;
30
31
- RendererManagerEvent( QEvent::Type type, vlc_renderer_item_t *p_item_ )
32
- : QEvent( type ), p_item( p_item_ )
33
- {
34
- vlc_renderer_item_hold( p_item );
35
- }
36
- virtual ~RendererManagerEvent()
37
- {
38
- vlc_renderer_item_release( p_item );
39
- }
40
+ RendererManagerEvent( QEvent::Type type, vlc_renderer_item_t *p_item_ );
41
+ virtual ~RendererManagerEvent();
42
43
vlc_renderer_item_t * getItem() const { return p_item; }
44
45
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/util/varcommon_p.hpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/util/varcommon_p.hpp
Changed
9
1
2
#include <vlc_cxx_helpers.hpp>
3
#include <vlc_vout.h>
4
#include <vlc_aout.h>
5
-#include <vlc_interface.h>
6
7
struct VLCObjectHolder
8
{
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/vlc.qrc -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/vlc.qrc
Changed
10
1
2
<file alias="VanillaObject.qml">util/qml/VanillaObject.qml</file>
3
<file alias="NativeMenu.qml">util/qml/NativeMenu.qml</file>
4
<file alias="MLContextMenu.qml">util/qml/MLContextMenu.qml</file>
5
+ <file alias="ListViewRev15.qml">util/qml/ListViewRev15.qml</file>
6
+ <file alias="ListViewRev11.qml">util/qml/ListViewRev11.qml</file>
7
</qresource>
8
<qresource prefix="/sd">
9
<file alias="capture-card.svg">pixmaps/sd/capture-card.svg</file>
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/widgets/native/interface_widgets.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/widgets/native/interface_widgets.cpp
Changed
10
1
2
#include <QUrl>
3
4
#include <math.h>
5
-#include <assert.h>
6
+#include <cassert>
7
8
#include <vlc_player.h>
9
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/widgets/qml/BannerTabButton.qml -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/widgets/qml/BannerTabButton.qml
Changed
10
1
2
}
3
4
Widgets.CurrentIndicator {
5
- width: tabRow.width
6
+ length: tabRow.width
7
8
orientation: Qt.Horizontal
9
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/widgets/qml/CurrentIndicator.qml -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/widgets/qml/CurrentIndicator.qml
Changed
74
1
2
import "qrc:///style/"
3
4
Rectangle {
5
+ id: root
6
7
property int orientation: Qt.Vertical
8
property int margin: VLCStyle.margin_xxxsmall
9
10
id: theme
11
}
12
13
- color: theme.accent
14
- width: orientation === Qt.Vertical ? VLCStyle.heightBar_xxxsmall : parent.width
15
- height: orientation === Qt.Horizontal ? VLCStyle.heightBar_xxxsmall : parent.height
16
+ property Item source: parent
17
+
18
+ property int length: 0
19
20
- onOrientationChanged: {
21
- if (orientation == Qt.Vertical) {
22
- anchors.horizontalCenter = undefined
23
- anchors.verticalCenter = Qt.binding(function () {
24
- return parent.verticalCenter
25
- })
26
- anchors.left = Qt.binding(function () {
27
- return parent.left
28
- })
29
- anchors.right = undefined
30
- anchors.leftMargin = Qt.binding(function () {
31
- return margin
32
- })
33
- anchors.bottomMargin = 0
34
- } else {
35
- anchors.top = undefined
36
- anchors.bottom = Qt.binding(function () {
37
- return parent.bottom
38
- })
39
- anchors.horizontalCenter = Qt.binding(function () {
40
- return parent.horizontalCenter
41
- })
42
- anchors.verticalCenter = undefined
43
- anchors.leftMargin = 0
44
- anchors.bottomMargin = Qt.binding(function () {
45
- return margin
46
- })
47
+ property var _position:
48
+ {
49
+ // for orientation == Qt.Vertical
50
+ "width" : VLCStyle.heightBar_xxxsmall,
51
+ "height": root.length,
52
+ "x": margin,
53
+ "y": !!source ? (source.height - root.length) / 2 : 0
54
+ },
55
+ {
56
+ // for orientation == Qt.Horizontal
57
+ "width": root.length,
58
+ "height": VLCStyle.heightBar_xxxsmall,
59
+ "x": !!source ? (source.width - root.length) / 2 : 0,
60
+ "y": !!source ? source.height - margin : 0,
61
}
62
- }
63
+
64
+
65
+ property var _currentPosition: (orientation === Qt.Vertical) ? _position0 : _position1
66
+
67
+ color: theme.accent
68
+
69
+ x: _currentPosition.x
70
+ y: _currentPosition.y
71
+ width: _currentPosition.width
72
+ height: _currentPosition.height
73
}
74
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/widgets/qml/DragItem.qml -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/widgets/qml/DragItem.qml
Changed
55
1
2
// string => role
3
property string titleRole: "title"
4
5
+ readonly property var inputItems: _inputItems
6
+
7
function coversXPos(index) {
8
return VLCStyle.margin_small + (coverSize / 3) * index;
9
}
10
11
if (!dragItem._active)
12
return
13
14
+ Qt.callLater(dragItem.getSelectedInputItem, dragItem.setInputItems)
15
+
16
var covers =
17
var titleList =
18
19
20
_title = titleList.join(",") + (indexes.length > _maxCovers ? "..." : "")
21
}
22
23
+ function setInputItems(inputItems) {
24
+ if (!Array.isArray(inputItems) || inputItems.length === 0) {
25
+ console.warn("can't convert items to input items");
26
+ dragItem._inputItems = null
27
+ return
28
+ }
29
+
30
+ dragItem._inputItems = inputItems
31
+ }
32
+
33
//---------------------------------------------------------------------------------------------
34
// Private
35
36
37
38
readonly property int _displayedCoversCount: Math.min(_indexesSize, _maxCovers + 1)
39
40
+ property var _inputItems
41
+
42
property var _data:
43
44
property var _covers:
45
46
// TODO: Rework D&D positioning
47
if (!Drag.active)
48
x = y = -1
49
+
50
+ if (!Drag.active)
51
+ dragItem._inputItems = undefined
52
}
53
54
//---------------------------------------------------------------------------------------------
55
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/widgets/qml/FadingEdgeListView.qml -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/widgets/qml/FadingEdgeListView.qml
Changed
10
1
2
import "qrc:///style/"
3
import "qrc:///util/Helpers.js" as Helpers
4
5
-ListView {
6
+ListViewCompat {
7
id: root
8
9
// backgroundColor is only needed for sub-pixel
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/widgets/qml/KeyNavigableListView.qml -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/widgets/qml/KeyNavigableListView.qml
Changed
15
1
2
3
// Events
4
5
+ Component.onCompleted: {
6
+ if (typeof root.reuseItems === "boolean") {
7
+ // Qt 5.15 feature, on by default here:
8
+ root.reuseItems = true
9
+ }
10
+ }
11
+
12
// NOTE: We always want a valid 'currentIndex' by default.
13
onCountChanged: if (count && currentIndex === -1) currentIndex = 0
14
15
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
Changed
21
1
2
3
Text {
4
text: (root.model.sortOrder === Qt.AscendingOrder) ? "▼" : "▲"
5
- visible: root.model.sortCriteria === modelData.criteria
6
+ visible: root.model.sortCriteria === modelData.model.criteria
7
font.pixelSize: VLCStyle.fontSize_normal
8
color: root.colorContext.accent
9
10
11
}
12
}
13
onClicked: {
14
- if (root.model.sortCriteria !== modelData.criteria)
15
- root.model.sortCriteria = modelData.criteria
16
+ if (root.model.sortCriteria !== modelData.model.criteria)
17
+ root.model.sortCriteria = modelData.model.criteria
18
else
19
root.model.sortOrder = (root.model.sortOrder === Qt.AscendingOrder) ? Qt.DescendingOrder : Qt.AscendingOrder
20
}
21
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/widgets/qml/TableColumns.qml -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/widgets/qml/TableColumns.qml
Changed
15
1
2
property int titleCover_height: VLCStyle.trackListAlbumCover_heigth
3
property int titleCover_radius: VLCStyle.trackListAlbumCover_radius
4
5
- // Functions
6
-
7
- function titlecoverLabels(model) {
8
- // implement this function to show labels in title Cover
9
+ // function (model) -> string...
10
+ // implement this function to show labels in title Cover
11
+ property var titlecoverLabels: function(model) {
12
return
13
}
14
15
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/qt/widgets/qml/VideoQualityLabels.qml -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/qt/widgets/qml/VideoQualityLabels.qml
Changed
30
1
2
import "qrc:///style/"
3
4
Row {
5
- property alias labels: repeater.model
6
+ id: root
7
+
8
+ property var labels
9
+
10
+ onLabelsChanged: {
11
+ // try to reuse items, texts are assigned with Binding
12
+ // extra items are hidden, Row should take care of them
13
+ if (repeater.count < labels.length)
14
+ repeater.model = labels.length
15
+ }
16
17
spacing: VLCStyle.margin_xxsmall
18
19
20
leftPadding: VLCStyle.margin_xxxsmall
21
rightPadding: VLCStyle.margin_xxxsmall
22
23
- text: modelData
24
+ visible: index < root.labels.length
25
+ text: index >= root.labels.length ? "" : root.labelsindex
26
+
27
font.pixelSize: VLCStyle.fontSize_normal
28
29
color: theme.fg.primary
30
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/skins2/controls/ctrl_generic.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/skins2/controls/ctrl_generic.cpp
Changed
10
1
2
#include "../utils/position.hpp"
3
#include "../utils/var_bool.hpp"
4
5
-#include <assert.h>
6
+#include <cassert>
7
8
9
CtrlGeneric::CtrlGeneric( intf_thread_t *pIntf, const UString &rHelp,
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/skins2/src/vlcproc.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/skins2/src/vlcproc.cpp
Changed
10
1
2
#include "../utils/var_string.hpp"
3
#include <sstream>
4
5
-#include <assert.h>
6
+#include <cassert>
7
8
void on_playlist_items_reset( vlc_playlist_t *playlist,
9
vlc_playlist_item_t *const items,
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/gui/skins2/x11/x11_window.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/gui/skins2/x11/x11_window.cpp
Changed
19
1
2
#include "x11_dragdrop.hpp"
3
#include "x11_factory.hpp"
4
5
-#include <assert.h>
6
+#include <cassert>
7
#include <limits.h>
8
9
#include <new>
10
11
event.format = 32;
12
event.data.l 0 = 1;
13
event.data.l 1 = NET_WM_STATE_FULLSCREEN;
14
-
15
+
16
XSendEvent( XDISPLAY,
17
DefaultRootWindow( XDISPLAY ),
18
False, SubstructureNotifyMask|SubstructureRedirectMask,
19
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/hw/d3d11/d3d11_decoder.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/hw/d3d11/d3d11_decoder.cpp
Changed
16
1
2
D3D11_TEXTURE2D_DESC outDesc;
3
src_sys->texture0->GetDesc(&outDesc);
4
5
- for (p_sys->output_format = DxgiGetRenderFormatList();
6
- p_sys->output_format->name != nullptr; ++p_sys->output_format)
7
- {
8
- if (p_sys->output_format->formatTexture == outDesc.Format &&
9
- is_d3d11_opaque(p_sys->output_format->fourcc))
10
- break;
11
- }
12
+ p_sys->output_format = D3D11_RenderFormat(outDesc.Format ,true);
13
if (unlikely(!p_sys->output_format->name))
14
{
15
msg_Err(p_dec, "Unknown texture format %d", outDesc.Format);
16
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/hw/d3d11/d3d11_deinterlace.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/hw/d3d11/d3d11_deinterlace.c
Changed
19
1
2
d3d11_decoder_device_t *dev_sys = GetD3D11OpaqueContext( filter->vctx_in );
3
sys->d3d_dev = &dev_sys->d3d_dev;
4
5
- for (const d3d_format_t *output_format = DxgiGetRenderFormatList();
6
- output_format->name != NULL; ++output_format)
7
- {
8
- if (output_format->formatTexture == vctx_sys->format &&
9
- is_d3d11_opaque(output_format->fourcc))
10
- {
11
- sys->output_format = output_format;
12
- break;
13
- }
14
- }
15
+ sys->output_format = D3D11_RenderFormat(vctx_sys->format ,true);
16
if (unlikely(sys->output_format == NULL))
17
goto error;
18
19
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/hw/d3d11/d3d11_filters.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/hw/d3d11/d3d11_filters.c
Changed
35
1
2
#include "d3d11_processor.h"
3
#include "../../video_chroma/d3d11_fmt.h"
4
5
-#ifdef __MINGW32__
6
+#if defined(__MINGW64_VERSION_MAJOR) && __MINGW64_VERSION_MAJOR < 8
7
#define D3D11_VIDEO_PROCESSOR_FILTER_CAPS_BRIGHTNESS 0x1
8
#define D3D11_VIDEO_PROCESSOR_FILTER_CAPS_CONTRAST 0x2
9
#define D3D11_VIDEO_PROCESSOR_FILTER_CAPS_HUE 0x4
10
#define D3D11_VIDEO_PROCESSOR_FILTER_CAPS_SATURATION 0x8
11
-#endif
12
+#endif // __MINGW64_VERSION_MAJOR<8
13
14
#define PROCESSOR_SLICES 2
15
16
17
{
18
d3d11_video_context_t *vctx_sys = GetD3D11ContextPrivate( p_filter->vctx_out );
19
20
- const d3d_format_t *cfg = NULL;
21
- for (const d3d_format_t *output_format = DxgiGetRenderFormatList();
22
- output_format->name != NULL; ++output_format)
23
- {
24
- if (output_format->formatTexture == vctx_sys->format &&
25
- is_d3d11_opaque(output_format->fourcc))
26
- {
27
- cfg = output_format;
28
- break;
29
- }
30
- }
31
+ const d3d_format_t *cfg = D3D11_RenderFormat(vctx_sys->format ,true);
32
if (unlikely(cfg == NULL))
33
return NULL;
34
35
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/hw/d3d11/d3d11_processor.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/hw/d3d11/d3d11_processor.h
Changed
23
1
2
3
#include "../../video_chroma/d3d11_fmt.h"
4
5
-#ifdef ID3D11VideoContext_VideoProcessorBlt
6
+#ifdef __cplusplus
7
+extern "C" {
8
+#endif
9
+
10
typedef struct
11
{
12
ID3D11VideoDevice *d3dviddev;
13
14
15
HRESULT D3D11_Assert_ProcessorInput(vlc_object_t *, d3d11_processor_t *, picture_sys_d3d11_t *);
16
#define D3D11_Assert_ProcessorInput(a,b,c) D3D11_Assert_ProcessorInput(VLC_OBJECT(a),b,c)
17
+
18
+#ifdef __cplusplus
19
+}
20
#endif
21
22
#endif /* VLC_D3D11_PROCESSOR_H */
23
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/hw/d3d11/d3d11_surface.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/hw/d3d11/d3d11_surface.c
Changed
20
1
2
3
d3d11_video_context_t *vctx_sys = GetD3D11ContextPrivate( p_filter->vctx_out );
4
5
- const d3d_format_t *cfg = NULL;
6
- for (const d3d_format_t *output_format = DxgiGetRenderFormatList();
7
- output_format->name != NULL; ++output_format)
8
- {
9
- if (output_format->formatTexture == vctx_sys->format &&
10
- !is_d3d11_opaque(output_format->fourcc))
11
- {
12
- cfg = output_format;
13
- break;
14
- }
15
- }
16
+ const d3d_format_t *cfg = D3D11_RenderFormat(vctx_sys->format ,false);
17
if (unlikely(cfg == NULL))
18
return NULL;
19
20
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/logger/json.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/logger/json.c
Changed
19
1
2
if (unlikely(sys == NULL))
3
return NULL;
4
5
- const struct vlc_tracer_operations *ops = &json_ops;
6
-
7
const char *filename = JSON_FILENAME;
8
9
char *path = var_InheritString(obj, "json-tracer-file");
10
11
setvbuf(sys->stream, NULL, _IOLBF, 0);
12
13
*sysp = sys;
14
- return ops;
15
+ return &json_ops;
16
}
17
18
#define LOGFILE_NAME_TEXT N_("Log filename")
19
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/lua/vlc.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/lua/vlc.c
Changed
10
1
2
add_shortcut( "luaplaylist" )
3
set_shortname( N_("Lua Playlist") )
4
set_description( N_("Lua Playlist Parser Interface") )
5
- set_capability( "demux", 2 )
6
+ set_capability( "demux", 5 )
7
set_callbacks( Import_LuaPlaylist, Close_LuaPlaylist )
8
9
add_submodule ()
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/meson.build -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/meson.build
Changed
14
1
2
3
if have_wayland
4
wayland_scanner = find_program(
5
- wayland_scanner_dep.get_pkgconfig_variable('wayland_scanner'),
6
+ wayland_scanner_dep.get_variable(pkgconfig: 'wayland_scanner'),
7
native: true
8
)
9
- wayland_protocols_dir = wayland_protocols_dep.get_pkgconfig_variable('pkgdatadir')
10
+ wayland_protocols_dir = wayland_protocols_dep.get_variable(pkgconfig: 'pkgdatadir')
11
endif
12
else
13
have_wayland = false
14
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/misc/medialibrary/fs/directory.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/misc/medialibrary/fs/directory.cpp
Changed
10
1
2
#include <vlc_cxx_helpers.hpp>
3
4
#include <algorithm>
5
-#include <assert.h>
6
+#include <cassert>
7
#include <medialibrary/filesystem/Errors.h>
8
#include <sys/stat.h>
9
#include <system_error>
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/packetizer/av1_obu.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/packetizer/av1_obu.c
Changed
42
1
2
3
p_seq->seq_profile = bs_read(&bs, 3);
4
p_seq->still_picture = bs_read1(&bs);
5
- const obu_u1_t reduced_still_picture_header = bs_read1(&bs);
6
- if(reduced_still_picture_header)
7
+ p_seq->reduced_still_picture_header = bs_read1(&bs);
8
+ if(p_seq->reduced_still_picture_header)
9
{
10
p_seq->operating_points0.seq_level_idx = bs_read(&bs, 5);
11
}
12
13
const obu_u4_t frame_height_bits_minus_1 = bs_read(&bs, 4);
14
p_seq->max_frame_width_minus_1 = bs_read(&bs, 1 + frame_width_bits_minus_1);
15
p_seq->max_frame_height_minus_1 = bs_read(&bs, 1 + frame_height_bits_minus_1);
16
- if(!reduced_still_picture_header)
17
+ if(!p_seq->reduced_still_picture_header)
18
{
19
p_seq->frame_id_numbers_present_flag = bs_read1(&bs);
20
if(p_seq->frame_id_numbers_present_flag)
21
22
p_seq->use_128x128_superblock = bs_read1(&bs);
23
p_seq->enable_filter_intra = bs_read1(&bs);
24
p_seq->enable_intra_edge_filter = bs_read1(&bs);
25
- if(!reduced_still_picture_header)
26
+ if(!p_seq->reduced_still_picture_header)
27
{
28
p_seq->enable_interintra_compound = bs_read1(&bs);
29
p_seq->enable_masked_compound = bs_read1(&bs);
30
31
return true;
32
}
33
34
+bool AV1_get_super_res(const av1_OBU_sequence_header_t *p_seq)
35
+{
36
+ return p_seq->enable_superres;
37
+}
38
+
39
bool AV1_get_colorimetry(const av1_OBU_sequence_header_t *p_seq,
40
video_color_primaries_t *p_primaries,
41
video_transfer_func_t *p_transfer,
42
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/packetizer/av1_obu.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/packetizer/av1_obu.h
Changed
9
1
2
video_color_primaries_t *, video_transfer_func_t *,
3
video_color_space_t *, video_color_range_t *);
4
bool AV1_get_frame_rate(const av1_OBU_sequence_header_t *, unsigned *, unsigned *);
5
+bool AV1_get_super_res(const av1_OBU_sequence_header_t *);
6
vlc_fourcc_t AV1_get_chroma(const av1_OBU_sequence_header_t *);
7
8
bool AV1_sequence_header_equal(const av1_OBU_sequence_header_t *,const av1_OBU_sequence_header_t *);
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/packetizer/h264.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/packetizer/h264.c
Changed
201
1
2
static block_t *ParseNALBlock( decoder_t *, bool *pb_ts_used, block_t * );
3
4
static block_t *OutputPicture( decoder_t *p_dec );
5
-static void PutSPS( decoder_t *p_dec, block_t *p_frag );
6
-static void PutPPS( decoder_t *p_dec, block_t *p_frag );
7
-static void PutSPSEXT( decoder_t *p_dec, block_t *p_frag );
8
+static void ReleaseXPS( decoder_sys_t *p_sys );
9
+static bool PutXPS( decoder_t *p_dec, uint8_t i_nal_type, block_t *p_frag );
10
static bool ParseSliceHeader( decoder_t *p_dec, const block_t *p_frag, h264_slice_t *p_slice );
11
static bool ParseSeiCallback( const hxxx_sei_data_t *, void * );
12
13
14
/*****************************************************************************
15
* Helpers
16
*****************************************************************************/
17
-
18
-static void StoreSPS( decoder_sys_t *p_sys, uint8_t i_id,
19
- block_t *p_block, h264_sequence_parameter_set_t *p_sps )
20
-{
21
- if( p_sys->spsi_id.p_block )
22
- block_Release( p_sys->spsi_id.p_block );
23
- if( p_sys->spsi_id.p_sps )
24
- h264_release_sps( p_sys->spsi_id.p_sps );
25
- if( p_sys->spsi_id.p_sps == p_sys->p_active_sps )
26
- p_sys->p_active_sps = NULL;
27
- p_sys->spsi_id.p_block = p_block;
28
- p_sys->spsi_id.p_sps = p_sps;
29
-}
30
-
31
-static void StorePPS( decoder_sys_t *p_sys, uint8_t i_id,
32
- block_t *p_block, h264_picture_parameter_set_t *p_pps )
33
+static void LastAppendXPSCopy( const block_t *p_block, block_t ***ppp_last )
34
{
35
- if( p_sys->ppsi_id.p_block )
36
- block_Release( p_sys->ppsi_id.p_block );
37
- if( p_sys->ppsi_id.p_pps )
38
- h264_release_pps( p_sys->ppsi_id.p_pps );
39
- if( p_sys->ppsi_id.p_pps == p_sys->p_active_pps )
40
- p_sys->p_active_pps = NULL;
41
- p_sys->ppsi_id.p_block = p_block;
42
- p_sys->ppsi_id.p_pps = p_pps;
43
+ if( !p_block )
44
+ return;
45
+ block_t *p_dup = block_Alloc( 4 + p_block->i_buffer );
46
+ if( p_dup )
47
+ {
48
+ memcpy( &p_dup->p_buffer0, annexb_startcode4, 4 );
49
+ memcpy( &p_dup->p_buffer4, p_block->p_buffer, p_block->i_buffer );
50
+ block_ChainLastAppend( ppp_last, p_dup );
51
+ }
52
}
53
54
-static void StoreSPSEXT( decoder_sys_t *p_sys, uint8_t i_id, block_t *p_block )
55
+static block_t * GatherSets( decoder_sys_t *p_sys, bool b_need_sps, bool b_need_pps )
56
{
57
- if( p_sys->spsexti_id.p_block )
58
- block_Release( p_sys->spsexti_id.p_block );
59
- p_sys->spsexti_id.p_block = p_block;
60
+ block_t *p_xpsnal = NULL;
61
+ block_t **pp_xpsnal_tail = &p_xpsnal;
62
+ for( int i = 0; i <= H264_SPS_ID_MAX && b_need_sps; i++ )
63
+ {
64
+ LastAppendXPSCopy( p_sys->spsi.p_block, &pp_xpsnal_tail );
65
+ /* 7.4.1.2.3, shall be the next NAL unit after a sequence parameter set NAL unit
66
+ * having the same value of seq_parameter_set_id */
67
+ LastAppendXPSCopy( p_sys->spsexti.p_block, &pp_xpsnal_tail );
68
+ }
69
+ for( int i = 0; i < H264_PPS_ID_MAX && b_need_pps; i++ )
70
+ LastAppendXPSCopy( p_sys->ppsi.p_block, &pp_xpsnal_tail );
71
+ return p_xpsnal;
72
}
73
74
static void ActivateSets( decoder_t *p_dec, const h264_sequence_parameter_set_t *p_sps,
75
76
77
if( p_dec->fmt_out.i_extra == 0 && p_pps )
78
{
79
- const block_t *p_spsblock = p_sys->spsp_sps->i_id.p_block;
80
- const block_t *p_ppsblock = p_sys->ppsp_pps->i_id.p_block;
81
- const block_t *p_spsextblock = p_sys->spsextp_sps->i_id.p_block;
82
-
83
- if( p_spsblock && p_ppsblock )
84
+ block_t *p_xpsblocks = GatherSets( p_sys, true, true );
85
+ if( p_xpsblocks )
86
{
87
- size_t i_alloc = p_ppsblock->i_buffer + p_spsblock->i_buffer;
88
- if( p_spsextblock )
89
- i_alloc += p_spsextblock->i_buffer;
90
- p_dec->fmt_out.p_extra = malloc( i_alloc );
91
+ size_t i_total;
92
+ block_ChainProperties( p_xpsblocks, NULL, &i_total, NULL );
93
+ p_dec->fmt_out.p_extra = malloc( i_total );
94
if( p_dec->fmt_out.p_extra )
95
{
96
- uint8_t*p_buf = p_dec->fmt_out.p_extra;
97
- p_dec->fmt_out.i_extra = i_alloc;
98
- memcpy( p_buf, p_spsblock->p_buffer, p_spsblock->i_buffer );
99
- p_buf += p_spsblock->i_buffer;
100
- if( p_spsextblock )
101
- {
102
- memcpy( p_buf, p_spsextblock->p_buffer, p_spsextblock->i_buffer );
103
- p_buf += p_spsextblock->i_buffer;
104
- }
105
- memcpy( p_buf, p_ppsblock->p_buffer, p_ppsblock->i_buffer );
106
+ p_dec->fmt_out.i_extra = i_total;
107
+ block_ChainExtract( p_xpsblocks, p_dec->fmt_out.p_extra, i_total );
108
}
109
+ block_ChainRelease( p_xpsblocks );
110
}
111
}
112
}
113
114
{
115
decoder_t *p_dec = (decoder_t*)p_this;
116
decoder_sys_t *p_sys = p_dec->p_sys;
117
- int i;
118
119
DropStoredNAL( p_sys );
120
- for( i = 0; i <= H264_SPS_ID_MAX; i++ )
121
- StoreSPS( p_sys, i, NULL, NULL );
122
- for( i = 0; i <= H264_PPS_ID_MAX; i++ )
123
- StorePPS( p_sys, i, NULL, NULL );
124
- for( i = 0; i <= H264_SPSEXT_ID_MAX; i++ )
125
- StoreSPSEXT( p_sys, i, NULL );
126
+ ReleaseXPS( p_sys );
127
128
packetizer_Clean( &p_sys->packetizer );
129
130
131
132
/* Stored for insert on keyframes */
133
if( i_nal_type == H264_NAL_SPS )
134
- {
135
- PutSPS( p_dec, p_frag );
136
- p_sys->b_new_sps = true;
137
- }
138
+ p_sys->b_new_sps |= PutXPS( p_dec, i_nal_type, p_frag );
139
else
140
- {
141
- PutPPS( p_dec, p_frag );
142
- p_sys->b_new_pps = true;
143
- }
144
+ p_sys->b_new_pps |= PutXPS( p_dec, i_nal_type, p_frag );
145
break;
146
147
case H264_NAL_SEI:
148
149
break;
150
151
case H264_NAL_SPS_EXT:
152
- PutSPSEXT( p_dec, p_frag );
153
+ PutXPS( p_dec, i_nal_type, p_frag );
154
if( p_sys->b_slice )
155
p_pic = OutputPicture( p_dec );
156
break;
157
158
}
159
160
/* Gather PPS/SPS if required */
161
- block_t *p_xpsnal = NULL;
162
- block_t **pp_xpsnal_tail = &p_xpsnal;
163
- if( b_need_sps_pps || p_sys->b_new_sps || p_sys->b_new_pps )
164
- {
165
- for( int i = 0; i <= H264_SPS_ID_MAX && (b_need_sps_pps || p_sys->b_new_sps); i++ )
166
- {
167
- if( p_sys->spsi.p_block )
168
- block_ChainLastAppend( &pp_xpsnal_tail, block_Duplicate( p_sys->spsi.p_block ) );
169
- /* 7.4.1.2.3, shall be the next NAL unit after a sequence parameter set NAL unit
170
- * having the same value of seq_parameter_set_id */
171
- if( p_sys->spsexti.p_block )
172
- block_ChainLastAppend( &pp_xpsnal_tail, block_Duplicate( p_sys->spsexti.p_block ) );
173
- }
174
- for( int i = 0; i < H264_PPS_ID_MAX && (b_need_sps_pps || p_sys->b_new_pps); i++ )
175
- {
176
- if( p_sys->ppsi.p_block )
177
- block_ChainLastAppend( &pp_xpsnal_tail, block_Duplicate( p_sys->ppsi.p_block ) );
178
- }
179
- }
180
+ block_t *p_xpsnal = GatherSets( p_sys, b_need_sps_pps|p_sys->b_new_sps,
181
+ b_need_sps_pps|p_sys->b_new_pps );
182
183
/* Now rebuild NAL Sequence, inserting PPS/SPS if any */
184
if( p_sys->leading.p_head &&
185
186
return p_pic;
187
}
188
189
-static void PutSPS( decoder_t *p_dec, block_t *p_frag )
190
+static int CmpXPS( const block_t *p_ref, const block_t *p_nal )
191
{
192
- decoder_sys_t *p_sys = p_dec->p_sys;
193
+ return p_ref == NULL ||
194
+ p_ref->i_buffer != p_nal->i_buffer ||
195
+ memcmp( p_ref->p_buffer, p_nal->p_buffer, p_nal->i_buffer );
196
+}
197
+
198
+#define wrap_h264_xps_decode(funcname ) \
199
+ static void *funcname ## _wrapper ( const uint8_t *a, size_t b, bool c ) \
200
+ { return funcname(a,b,c); }
201
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/packetizer/h264_nal.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/packetizer/h264_nal.c
Changed
43
1
2
return bo.b;
3
}
4
5
+bool h264_get_xps_id( const uint8_t *p_buf, size_t i_buf, uint8_t *pi_id )
6
+{
7
+ if( i_buf < 2 )
8
+ return false;
9
+
10
+ /* No need to lookup convert from emulation for that data */
11
+ uint8_t i_max, i_offset;
12
+ switch( h264_getNALType(p_buf) )
13
+ {
14
+ case H264_NAL_SPS:
15
+ i_offset = 1 + 3 /* profile constraint level */;
16
+ i_max = H264_SPS_ID_MAX;
17
+ break;
18
+ case H264_NAL_PPS:
19
+ i_offset = 1;
20
+ i_max = H264_PPS_ID_MAX;
21
+ break;
22
+ case H264_NAL_SPS_EXT:
23
+ i_offset = 1;
24
+ i_max = H264_SPSEXT_ID_MAX;
25
+ break;
26
+ default:
27
+ return false;
28
+ }
29
+
30
+ if( i_buf <= i_offset )
31
+ return false;
32
+
33
+ bs_t bs;
34
+ bs_init( &bs, &p_bufi_offset, i_buf - i_offset );
35
+ *pi_id = bs_read_ue( &bs );
36
+
37
+ return !bs_error( &bs ) && *pi_id <= i_max;
38
+}
39
+
40
static const h264_level_limits_t * h264_get_level_limits( const h264_sequence_parameter_set_t *p_sps )
41
{
42
uint16_t i_level_number = p_sps->i_level;
43
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/packetizer/h264_nal.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/packetizer/h264_nal.h
Changed
10
1
2
typedef struct h264_picture_parameter_set_t h264_picture_parameter_set_t;
3
typedef struct h264_sequence_parameter_set_extension_t h264_sequence_parameter_set_extension_t;
4
5
+bool h264_get_xps_id(const uint8_t *p_nalbuf, size_t i_nalbuf, uint8_t *pi_id);
6
+
7
h264_sequence_parameter_set_t * h264_decode_sps( const uint8_t *, size_t, bool );
8
h264_picture_parameter_set_t * h264_decode_pps( const uint8_t *, size_t, bool );
9
h264_sequence_parameter_set_extension_t * h264_decode_sps_extension( const uint8_t *, size_t, bool );
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/services_discovery/upnp.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/services_discovery/upnp.cpp
Changed
10
1
2
#include <vlc_services_discovery.h>
3
#include <vlc_renderer_discovery.h>
4
5
-#include <assert.h>
6
+#include <cassert>
7
#include <limits.h>
8
#include <algorithm>
9
#include <set>
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/stream_out/chromecast/chromecast_demux.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/stream_out/chromecast/chromecast_demux.cpp
Changed
10
1
2
3
#include "chromecast_common.h"
4
5
-#include <assert.h>
6
+#include <cassert>
7
#include <new>
8
9
static void on_paused_changed_cb(void *data, bool paused);
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/stream_out/renderer_common.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/stream_out/renderer_common.cpp
Changed
10
1
2
# include "config.h"
3
#endif
4
5
-#include <assert.h>
6
+#include <cassert>
7
#include <map>
8
#include <sstream>
9
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_chroma/d3d11_fmt.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_chroma/d3d11_fmt.c
Changed
64
1
2
return &pic_ctx->s;
3
}
4
5
-picture_t *D3D11_AllocPicture(vlc_object_t *obj,
6
- const video_format_t *fmt, vlc_video_context *vctx_out,
7
- bool shared, const d3d_format_t *cfg)
8
+int D3D11_PictureFill(vlc_object_t *obj, picture_t *pic,
9
+ vlc_video_context *vctx_out,
10
+ bool shared, const d3d_format_t *cfg)
11
{
12
if (unlikely(cfg == NULL))
13
- return NULL;
14
+ return VLC_EINVAL;
15
16
struct d3d11_pic_context *pic_ctx = calloc(1, sizeof(*pic_ctx));
17
if (unlikely(pic_ctx == NULL))
18
- return NULL;
19
+ return VLC_ENOMEM;
20
pic_ctx->picsys.sharedHandle = INVALID_HANDLE_VALUE;
21
22
- picture_t *pic = picture_NewFromFormat( fmt );
23
- if (unlikely(pic == NULL))
24
- {
25
- free(pic_ctx);
26
- return NULL;
27
- }
28
-
29
d3d11_decoder_device_t *dev_sys = GetD3D11OpaqueContext(vctx_out);
30
if (AllocateTextures(obj, &dev_sys->d3d_dev, cfg,
31
- fmt, shared, pic_ctx->picsys.texture, NULL) != VLC_SUCCESS)
32
+ &pic->format, shared, pic_ctx->picsys.texture, NULL) != VLC_SUCCESS)
33
{
34
- picture_Release(pic);
35
free(pic_ctx);
36
- return NULL;
37
+ return VLC_EGENERIC;
38
}
39
40
D3D11_AllocateResourceView(vlc_object_logger(obj), dev_sys->d3d_dev.d3ddevice, cfg, pic_ctx->picsys.texture, 0, pic_ctx->picsys.renderSrc);
41
42
vlc_video_context_Hold(vctx_out),
43
};
44
pic->context = &pic_ctx->s;
45
+ return VLC_SUCCESS;
46
+}
47
+
48
+picture_t *D3D11_AllocPicture(vlc_object_t *obj,
49
+ const video_format_t *fmt, vlc_video_context *vctx_out,
50
+ bool shared, const d3d_format_t *cfg)
51
+{
52
+ picture_t *pic = picture_NewFromFormat( fmt );
53
+ if (unlikely(pic == NULL))
54
+ return NULL;
55
+
56
+ if (D3D11_PictureFill(obj, pic, vctx_out, shared, cfg) != VLC_SUCCESS)
57
+ {
58
+ picture_Release(pic);
59
+ return NULL;
60
+ }
61
+
62
return pic;
63
}
64
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_chroma/d3d11_fmt.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_chroma/d3d11_fmt.h
Changed
35
1
2
3
void ReleaseD3D11PictureSys(picture_sys_d3d11_t *p_sys);
4
5
+static inline const d3d_format_t *D3D11_RenderFormat(DXGI_FORMAT opaque, bool gpu_based)
6
+{
7
+ for (const d3d_format_t *output_format = DxgiGetRenderFormatList();
8
+ output_format->name != NULL; ++output_format)
9
+ {
10
+ if (output_format->formatTexture == opaque &&
11
+ is_d3d11_opaque(output_format->fourcc) == gpu_based)
12
+ {
13
+ return output_format;
14
+ }
15
+ }
16
+ return NULL;
17
+}
18
+
19
+
20
/* map texture planes to resource views */
21
int D3D11_AllocateResourceView(struct vlc_logger *obj, ID3D11Device *d3ddevice,
22
const d3d_format_t *format,
23
24
25
picture_t *D3D11_AllocPicture(vlc_object_t *,
26
const video_format_t *, vlc_video_context *,
27
- bool, const d3d_format_t *);
28
+ bool shared, const d3d_format_t *);
29
+int D3D11_PictureFill(vlc_object_t *,
30
+ picture_t *, vlc_video_context *,
31
+ bool shared, const d3d_format_t *);
32
33
void D3D11_PictureAttach(picture_t *, ID3D11Texture2D *textures, const d3d_format_t *cfg);
34
35
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_filter/egl_pbuffer.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_filter/egl_pbuffer.c
Changed
43
1
2
return VLC_EGENERIC;
3
4
sys->current = true;
5
+
6
+ const opengl_vtable_t *vt = &sys->api.vt;
7
+ vt->BindBuffer(GL_PIXEL_PACK_BUFFER, sys->pixelbufferssys->current_flip);
8
+ vt->BindFramebuffer(GL_FRAMEBUFFER, sys->framebufferssys->current_flip);
9
+
10
return VLC_SUCCESS;
11
}
12
13
14
gl->ops = &gl_ops;
15
gl->offscreen_vflip = true;
16
17
- vlc_gl_MakeCurrent(gl);
18
+ eglMakeCurrent(sys->display, sys->surface, sys->surface,
19
+ sys->context);
20
+
21
+
22
int ret = vlc_gl_api_Init(&sys->api, gl);
23
if (ret != VLC_SUCCESS)
24
{
25
msg_Err(gl, "Failed to initialize gl_api");
26
- vlc_gl_ReleaseCurrent(gl);
27
+ eglMakeCurrent(sys->display, sys->surface, sys->surface,
28
+ EGL_NO_CONTEXT);
29
goto error2;
30
}
31
32
33
34
sys->current_flip = BUFFER_COUNT - 1;
35
BindDrawFramebuffer(sys);
36
-
37
- vlc_gl_ReleaseCurrent(gl);
38
+ eglMakeCurrent(sys->display, sys->surface, sys->surface,
39
+ EGL_NO_CONTEXT);
40
41
return VLC_SUCCESS;
42
43
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_filter/opengl.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_filter/opengl.c
Changed
10
1
2
3
if (sys->gl == NULL)
4
{
5
- msg_Err(obj, "Failed to create opengl context\n");
6
+ msg_Err(obj, "Failed to create opengl context");
7
goto gl_create_failure;
8
}
9
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_output/Makefile.am -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/Makefile.am
Changed
59
1
2
video_output/win32/events.c video_output/win32/events.h \
3
video_output/win32/builtin_shaders.h \
4
video_output/win32/win32touch.c video_output/win32/win32touch.h
5
-libdirect3d9_plugin_la_LIBADD = libchroma_copy.la libd3d9_common.la -lgdi32 $(LIBCOM) -luuid
6
+libdirect3d9_plugin_la_LIBADD = libchroma_copy.la libd3d9_common.la -lgdi32 -luser32 $(LIBCOM) -luuid
7
libdirect3d9_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)'
8
9
libglinterop_dxva2_plugin_la_SOURCES = video_output/opengl/interop_dxva2.c \
10
11
12
libdirect3d11_plugin_la_SOURCES = video_output/win32/direct3d11.cpp \
13
video_output/win32/d3d11_quad.cpp video_output/win32/d3d11_quad.h \
14
+ video_output/win32/d3d11_scaler.cpp video_output/win32/d3d11_scaler.h \
15
video_output/win32/d3d11_shaders.cpp video_output/win32/d3d11_shaders.h \
16
video_output/win32/d3d_shaders.c video_output/win32/d3d_shaders.h \
17
video_output/win32/d3d_dynamic_shader.c video_output/win32/d3d_dynamic_shader.h \
18
- video_output/win32/d3d11_swapchain.cpp video_output/win32/d3d11_swapchain.h \
19
- video_output/win32/dxgi_swapchain.cpp video_output/win32/dxgi_swapchain.h \
20
video_output/win32/common.c video_output/win32/common.h
21
libdirect3d11_plugin_la_CXXFLAGS = $(AM_CXXFLAGS) $(LIBCOMCXXFLAGS)
22
libdirect3d11_plugin_la_LIBADD = libchroma_copy.la libd3d11_common.la $(LIBCOM) -luuid
23
+libdirect3d11_plugin_la_CPPFLAGS = $(AM_CPPFLAGS)
24
if !HAVE_WINSTORE
25
+libdirect3d11_plugin_la_CPPFLAGS += -DHAVE_WIN32_SENSORS
26
libdirect3d11_plugin_la_SOURCES += video_output/win32/events.c \
27
video_output/win32/events.h \
28
+ video_output/win32/d3d11_swapchain.cpp video_output/win32/d3d11_swapchain.h \
29
+ video_output/win32/dxgi_swapchain.cpp video_output/win32/dxgi_swapchain.h \
30
video_output/win32/sensors.cpp \
31
video_output/win32/win32touch.c video_output/win32/win32touch.h
32
-libdirect3d11_plugin_la_LIBADD += -lgdi32
33
+libdirect3d11_plugin_la_LIBADD += -lgdi32 -luser32
34
else
35
libdirect3d11_plugin_la_LIBADD += -ld3d11
36
libdirect3d11_plugin_la_LIBADD += -ld3dcompiler_47
37
38
video_output/win32/events.c video_output/win32/events.h \
39
video_output/win32/sensors.cpp \
40
video_output/win32/win32touch.c video_output/win32/win32touch.h
41
+libglwin32_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DHAVE_WIN32_SENSORS
42
libglwin32_plugin_la_CXXFLAGS = $(AM_CXXFLAGS) $(LIBCOMCXXFLAGS)
43
libwgl_plugin_la_SOURCES = video_output/win32/wgl.c
44
45
-libglwin32_plugin_la_LIBADD = libchroma_copy.la -lopengl32 -lgdi32 $(LIBCOM) -luuid libvlc_opengl.la
46
+libglwin32_plugin_la_LIBADD = libchroma_copy.la -lopengl32 -lgdi32 -luser32 $(LIBCOM) -luuid libvlc_opengl.la
47
libwgl_plugin_la_LIBADD = -lopengl32 -lgdi32 libvlc_opengl.la
48
49
libglwin32_plugin_la_CFLAGS = $(AM_CFLAGS) $(OPENGL_COMMONCFLAGS)
50
51
video_output/win32/common.c video_output/win32/common.h \
52
video_output/win32/events.c video_output/win32/events.h \
53
video_output/win32/win32touch.c video_output/win32/win32touch.h
54
-libwingdi_plugin_la_LIBADD = libchroma_copy.la -lgdi32 $(LIBCOM) -luuid
55
+libwingdi_plugin_la_LIBADD = libchroma_copy.la -lgdi32 -luser32 $(LIBCOM) -luuid
56
if HAVE_WIN32_DESKTOP
57
vout_LTLIBRARIES += libwingdi_plugin.la
58
endif
59
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_output/opengl/filter_draw.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/opengl/filter_draw.c
Changed
9
1
2
3
vt->Clear(GL_COLOR_BUFFER_BIT);
4
vt->DrawArrays(GL_TRIANGLE_STRIP, 0, 4);
5
+ GL_ASSERT_NOERROR(vt);
6
7
return VLC_SUCCESS;
8
}
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_output/opengl/filter_mock.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/opengl/filter_mock.c
Changed
25
1
2
vt->DrawArrays(GL_TRIANGLES, 0, 3);
3
4
vt->Disable(GL_BLEND);
5
+ GL_ASSERT_NOERROR(vt);
6
7
return VLC_SUCCESS;
8
}
9
10
11
vt->Clear(GL_COLOR_BUFFER_BIT);
12
vt->DrawArrays(GL_TRIANGLES, 0, 3);
13
+ GL_ASSERT_NOERROR(vt);
14
15
return VLC_SUCCESS;
16
}
17
18
19
vt->Clear(GL_COLOR_BUFFER_BIT);
20
vt->DrawArrays(GL_TRIANGLE_STRIP, 0, 4);
21
+ GL_ASSERT_NOERROR(vt);
22
23
return VLC_SUCCESS;
24
}
25
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_output/opengl/filters.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/opengl/filters.c
Changed
103
1
2
3
#include "filter_priv.h"
4
#include "importer_priv.h"
5
+#include "gl_util.h"
6
7
/* The filter chain contains the sequential list of filters.
8
*
9
10
vlc_video_dovi_metadata_t dovi_rpu;
11
int has_dovi;
12
} pic;
13
+
14
+ struct vlc_gl_extension_vt extension_vt;
15
+
16
+ bool can_blit;
17
+ GLenum draw_framebuffer_target;
18
};
19
20
struct vlc_gl_filters *
21
22
filters->pic.pts = VLC_TICK_INVALID;
23
filters->pic.has_dovi = 0;
24
25
+ vlc_gl_LoadExtensionFunctions(filters->gl, &filters->extension_vt);
26
+
27
+ /* MSAA requires glBlitFramebuffer to resolve the samples, which is
28
+ * available starting with OpenGL ES 3 or OpenGL 3, and only available as an
29
+ * extension otherwise (ANGLE, NV). */
30
+ filters->can_blit = vlc_gl_GetVersionMajor(&filters->extension_vt) >= 3;
31
+
32
+ /* GL_DRAW_FRAMEBUFFER doesn't exist when OpenGL or OpenGL ES is < 3, and
33
+ * some needed extensions are not found, resulting in GL_INVALID_ENUM */
34
+ filters->draw_framebuffer_target = GL_DRAW_FRAMEBUFFER;
35
+ if (!filters->can_blit)
36
+ filters->draw_framebuffer_target = GL_FRAMEBUFFER;
37
+
38
+
39
+
40
return filters;
41
}
42
43
44
{
45
/* Compute the highest msaa_level among the filter and its subfilters */
46
unsigned msaa_level = 0;
47
- if (filters->api->supports_multisample)
48
+ if (filters->can_blit && filters->api->supports_multisample)
49
{
50
msaa_level = priv->filter.config.msaa_level;
51
vlc_list_foreach(subfilter_priv, &priv->blend_subfilters, node)
52
53
* one */
54
bool has_out = !is_last;
55
int ret = vlc_gl_filter_InitFramebuffers(filter, has_out);
56
+ GL_ASSERT_NOERROR(vt);
57
if (ret != VLC_SUCCESS)
58
return ret;
59
}
60
61
/* Restore bindings */
62
- vt->BindFramebuffer(GL_DRAW_FRAMEBUFFER, draw_framebuffer);
63
+ vt->BindFramebuffer(filters->draw_framebuffer_target, draw_framebuffer);
64
vt->BindRenderbuffer(GL_RENDERBUFFER, renderbuffer);
65
66
return VLC_SUCCESS;
67
68
69
/* Select the output texture associated to this plane */
70
GLuint draw_fb = priv->framebuffers_outi;
71
- vt->BindFramebuffer(GL_DRAW_FRAMEBUFFER, draw_fb);
72
+ vt->BindFramebuffer(filters->draw_framebuffer_target, draw_fb);
73
74
assert(!vlc_list_is_last(&priv->node, &filters->list));
75
vt->Viewport(0, 0, priv->tex_widthsi, priv->tex_heightsi);
76
77
draw_fb = priv->tex_count > 0 ? priv->framebuffers_out0
78
: draw_framebuffer;
79
80
- vt->BindFramebuffer(GL_DRAW_FRAMEBUFFER, draw_fb);
81
+ vt->BindFramebuffer(filters->draw_framebuffer_target, draw_fb);
82
83
if (vlc_list_is_last(&priv->node, &filters->list))
84
{
85
86
{
87
/* Reset the draw buffer, in case it has been changed from a
88
* filter draw() callback */
89
- vt->BindFramebuffer(GL_DRAW_FRAMEBUFFER, draw_fb);
90
+ vt->BindFramebuffer(filters->draw_framebuffer_target, draw_fb);
91
92
struct vlc_gl_filter *subfilter = &subfilter_priv->filter;
93
ret = subfilter->ops->draw(subfilter, NULL, &meta);
94
95
return ret;
96
}
97
98
- if (filter->config.msaa_level)
99
+ if (filters->can_blit && filter->config.msaa_level)
100
{
101
/* Never resolve multisampling to the default framebuffer */
102
assert(priv->tex_count == 1);
103
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_output/opengl/interop.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/opengl/interop.c
Changed
25
1
2
priv->gl.BindTexture(interop->tex_target, texturesi);
3
4
#if !defined(USE_OPENGL_ES2)
5
- /* Set the texture parameters */
6
- priv->gl.TexParameterf(interop->tex_target, GL_TEXTURE_PRIORITY, 1.0);
7
- priv->gl.TexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
8
+ if (interop->gl->api_type == VLC_OPENGL)
9
+ {
10
+ /* Set the texture parameters */
11
+ priv->gl.TexParameterf(interop->tex_target, GL_TEXTURE_PRIORITY, 1.0);
12
+ priv->gl.TexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
13
+ }
14
#endif
15
16
priv->gl.TexParameteri(interop->tex_target, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
17
18
priv->gl.TexParameteri(interop->tex_target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
19
priv->gl.TexParameteri(interop->tex_target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
20
}
21
+ GL_ASSERT_NOERROR(&priv->gl);
22
23
if (interop->ops->allocate_textures != NULL)
24
{
25
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_output/opengl/renderer.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/opengl/renderer.c
Changed
17
1
2
const opengl_vtable_t *vt = renderer->vt;
3
4
vt->Clear(GL_COLOR_BUFFER_BIT);
5
+ GL_ASSERT_NOERROR(vt);
6
7
vt->UseProgram(renderer->program_id);
8
9
10
renderer->var.ZoomMatrix);
11
12
vt->DrawElements(GL_TRIANGLES, renderer->nb_indices, GL_UNSIGNED_SHORT, 0);
13
+ GL_ASSERT_NOERROR(vt);
14
15
return VLC_SUCCESS;
16
}
17
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_output/win32/common.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/win32/common.c
Changed
121
1
2
#include "common.h"
3
#include "../../video_chroma/copy.h"
4
5
-void CommonInit(display_win32_area_t *area)
6
+void CommonInit(display_win32_area_t *area, const video_format_t *src_fmt)
7
{
8
+ ZeroMemory(&area->place, sizeof(area->place));
9
area->place_changed = false;
10
+ area->src_fmt = src_fmt;
11
}
12
13
#ifndef VLC_WINSTORE_APP
14
/* */
15
int CommonWindowInit(vout_display_t *vd, display_win32_area_t *area,
16
- vout_display_sys_win32_t *sys, bool projection_gestures)
17
+ bool projection_gestures)
18
{
19
if (unlikely(vd->cfg->window == NULL))
20
return VLC_EGENERIC;
21
22
/* */
23
-#if !defined(NDEBUG) && defined(HAVE_DXGIDEBUG_H)
24
- sys->dxgidebug_dll = LoadLibrary(TEXT("DXGIDEBUG.DLL"));
25
-#endif
26
- sys->hvideownd = NULL;
27
- sys->hparent = NULL;
28
-
29
- /* */
30
- sys->event = EventThreadCreate(VLC_OBJECT(vd), vd->cfg->window);
31
- if (!sys->event)
32
+ area->event = EventThreadCreate(VLC_OBJECT(vd), vd->cfg->window,
33
+ &vd->cfg->display,
34
+ projection_gestures ? &vd->owner : NULL);
35
+ if (!area->event)
36
return VLC_EGENERIC;
37
38
- /* */
39
- event_cfg_t cfg;
40
- memset(&cfg, 0, sizeof(cfg));
41
- cfg.width = vd->cfg->display.width;
42
- cfg.height = vd->cfg->display.height;
43
- cfg.is_projected = projection_gestures;
44
-
45
- event_hwnd_t hwnd;
46
- if (EventThreadStart(sys->event, &hwnd, &cfg))
47
- return VLC_EGENERIC;
48
-
49
- sys->hparent = hwnd.hparent;
50
- sys->hvideownd = hwnd.hvideownd;
51
-
52
- CommonPlacePicture(vd, area);
53
-
54
return VLC_SUCCESS;
55
}
56
+
57
+HWND CommonVideoHWND(const display_win32_area_t *area)
58
+{
59
+ return EventThreadVideoHWND(area->event);
60
+}
61
#endif /* !VLC_WINSTORE_APP */
62
63
/*****************************************************************************
64
65
{
66
/* Update the window position and size */
67
vout_display_place_t before_place = area->place;
68
- vout_display_PlacePicture(&area->place, vd->source, &vd->cfg->display);
69
+ vout_display_PlacePicture(&area->place, area->src_fmt, &vd->cfg->display);
70
71
/* Signal the change in size/position */
72
if (!vout_display_PlaceEquals(&before_place, &area->place))
73
74
75
#ifndef NDEBUG
76
msg_Dbg(vd, "UpdateRects source offset: %i,%i visible: %ix%i decoded: %ix%i",
77
- vd->source->i_x_offset, vd->source->i_y_offset,
78
- vd->source->i_visible_width, vd->source->i_visible_height,
79
- vd->source->i_width, vd->source->i_height);
80
+ area->src_fmt->i_x_offset, area->src_fmt->i_y_offset,
81
+ area->src_fmt->i_visible_width, area->src_fmt->i_visible_height,
82
+ area->src_fmt->i_width, area->src_fmt->i_height);
83
msg_Dbg(vd, "UpdateRects image_dst coords: %i,%i %ix%i",
84
area->place.x, area->place.y, area->place.width, area->place.height);
85
#endif
86
87
88
#ifndef VLC_WINSTORE_APP
89
/* */
90
-void CommonWindowClean(vout_display_sys_win32_t *sys)
91
+void CommonWindowClean(display_win32_area_t *sys)
92
{
93
- if (sys->event) {
94
- EventThreadStop(sys->event);
95
- EventThreadDestroy(sys->event);
96
- }
97
+ EventThreadDestroy(sys->event);
98
}
99
#endif /* !VLC_WINSTORE_APP */
100
101
-void CommonControl(vout_display_t *vd, display_win32_area_t *area, vout_display_sys_win32_t *sys, int query)
102
+void CommonControl(vout_display_t *vd, display_win32_area_t *area, int query)
103
{
104
switch (query) {
105
case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
106
#ifndef VLC_WINSTORE_APP
107
// Update dimensions
108
- if (sys->event != NULL)
109
+ if (area->event != NULL)
110
{
111
- RECT clientRect;
112
- GetClientRect(sys->hparent, &clientRect);
113
-
114
- SetWindowPos(sys->hvideownd, 0, 0, 0,
115
- RECTWidth(clientRect),
116
- RECTHeight(clientRect), SWP_NOZORDER|SWP_NOMOVE|SWP_NOACTIVATE);
117
+ EventThreadUpdateSize(area->event);
118
}
119
#endif /* !VLC_WINSTORE_APP */
120
// fallthrough
121
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_output/win32/common.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/win32/common.h
Changed
65
1
2
* event_thread_t: event thread
3
*****************************************************************************/
4
5
-typedef struct event_thread_t event_thread_t;
6
-
7
typedef struct display_win32_area_t
8
{
9
/* Coordinates of dest images (used when blitting to display) */
10
vout_display_place_t place;
11
bool place_changed;
12
+ struct event_thread_t *event; // only use if sys.event is not NULL
13
+
14
+ const video_format_t *src_fmt;
15
} display_win32_area_t;
16
17
#define RECTWidth(r) (LONG)((r).right - (r).left)
18
#define RECTHeight(r) (LONG)((r).bottom - (r).top)
19
20
/*****************************************************************************
21
- * vout_sys_t: video output method descriptor
22
- *****************************************************************************
23
- * This structure is part of the video output thread descriptor.
24
- * It describes the module specific properties of an output thread.
25
- *****************************************************************************/
26
-typedef struct vout_display_sys_win32_t
27
-{
28
- /* */
29
- event_thread_t *event;
30
-
31
- /* */
32
- HWND hvideownd; /* Handle of the video sub-window */
33
- HWND hparent; /* Handle of the parent window */
34
-
35
-# if !defined(NDEBUG) && defined(HAVE_DXGIDEBUG_H)
36
- HINSTANCE dxgidebug_dll;
37
-# endif
38
-} vout_display_sys_win32_t;
39
-
40
-
41
-/*****************************************************************************
42
* Prototypes from common.c
43
*****************************************************************************/
44
#ifndef VLC_WINSTORE_APP
45
-int CommonWindowInit(vout_display_t *, display_win32_area_t *, vout_display_sys_win32_t *,
46
+int CommonWindowInit(vout_display_t *, display_win32_area_t *,
47
bool projection_gestures);
48
-void CommonWindowClean(vout_display_sys_win32_t *);
49
+void CommonWindowClean(display_win32_area_t *);
50
+HWND CommonVideoHWND(const display_win32_area_t *);
51
#endif /* !VLC_WINSTORE_APP */
52
-void CommonControl(vout_display_t *, display_win32_area_t *, vout_display_sys_win32_t *, int );
53
+void CommonControl(vout_display_t *, display_win32_area_t *, int );
54
55
void CommonPlacePicture (vout_display_t *, display_win32_area_t *);
56
57
-void CommonInit(display_win32_area_t *);
58
-
59
-void* HookWindowsSensors(vout_display_t*, HWND);
60
-void UnhookWindowsSensors(void*);
61
+void CommonInit(display_win32_area_t *, const video_format_t *);
62
# ifdef __cplusplus
63
}
64
# endif
65
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_output/win32/d3d11_quad.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/win32/d3d11_quad.cpp
Changed
61
1
2
vlc_assert_unreachable();
3
}
4
}
5
+
6
+#ifdef HAVE_D3D11_4_H
7
+HRESULT D3D11_InitFence(d3d11_device_t & d3d_dev, d3d11_gpu_fence & fence)
8
+{
9
+ HRESULT hr;
10
+ ComPtr<ID3D11Device5> d3ddev5;
11
+ hr = d3d_dev.d3ddevice->QueryInterface(IID_GRAPHICS_PPV_ARGS(&d3ddev5));
12
+ if (FAILED(hr))
13
+ goto error;
14
+ hr = d3ddev5->CreateFence(fence.renderFence, D3D11_FENCE_FLAG_NONE, IID_GRAPHICS_PPV_ARGS(&fence.d3dRenderFence));
15
+ if (FAILED(hr))
16
+ goto error;
17
+ hr = d3d_dev.d3dcontext->QueryInterface(IID_GRAPHICS_PPV_ARGS(&fence.d3dcontext4));
18
+ if (FAILED(hr))
19
+ goto error;
20
+ fence.renderFinished = CreateEvent(nullptr, TRUE, FALSE, nullptr);
21
+ if (unlikely(fence.renderFinished == nullptr))
22
+ goto error;
23
+ return S_OK;
24
+error:
25
+ fence.d3dRenderFence.Reset();
26
+ fence.d3dcontext4.Reset();
27
+ CloseHandle(fence.renderFinished);
28
+ return hr;
29
+}
30
+
31
+void D3D11_ReleaseFence(d3d11_gpu_fence & fence)
32
+{
33
+ if (fence.d3dcontext4.Get())
34
+ {
35
+ fence.d3dRenderFence.Reset();
36
+ fence.d3dcontext4.Reset();
37
+ CloseHandle(fence.renderFinished);
38
+ fence.renderFinished = nullptr;
39
+ }
40
+}
41
+
42
+int D3D11_WaitFence(d3d11_gpu_fence & fence)
43
+{
44
+ if (fence.d3dcontext4.Get())
45
+ {
46
+ if (fence.renderFence == UINT64_MAX)
47
+ fence.renderFence = 0;
48
+ else
49
+ fence.renderFence++;
50
+
51
+ ResetEvent(fence.renderFinished);
52
+ fence.d3dRenderFence->SetEventOnCompletion(fence.renderFence, fence.renderFinished);
53
+ fence.d3dcontext4->Signal(fence.d3dRenderFence.Get(), fence.renderFence);
54
+
55
+ WaitForSingleObject(fence.renderFinished, INFINITE);
56
+ return VLC_SUCCESS;
57
+ }
58
+ return VLC_ENOTSUP;
59
+}
60
+#endif // HAVE_D3D11_4_H
61
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_output/win32/d3d11_quad.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/win32/d3d11_quad.h
Changed
32
1
2
3
#include "../../video_chroma/d3d11_fmt.h"
4
#include "d3d11_shaders.h"
5
+#ifdef HAVE_D3D11_4_H
6
+# include <d3d11_4.h>
7
+#endif
8
9
#define PS_CONST_LUMI_BOUNDS 0
10
#define VS_CONST_VIEWPOINT 1
11
12
typedef bool (*d3d11_select_plane_t)(void *opaque, size_t plane_index, ID3D11RenderTargetView **);
13
14
+#ifdef HAVE_D3D11_4_H
15
+struct d3d11_gpu_fence
16
+{
17
+ Microsoft::WRL::ComPtr<ID3D11Fence> d3dRenderFence;
18
+ Microsoft::WRL::ComPtr<ID3D11DeviceContext4> d3dcontext4;
19
+ UINT64 renderFence = 0;
20
+ HANDLE renderFinished = nullptr;
21
+};
22
+
23
+HRESULT D3D11_InitFence(d3d11_device_t &, d3d11_gpu_fence &);
24
+int D3D11_WaitFence(d3d11_gpu_fence &);
25
+void D3D11_ReleaseFence(d3d11_gpu_fence &);
26
+#endif
27
+
28
+
29
void D3D11_RenderQuad(d3d11_device_t *, d3d11_quad_t *, d3d11_vertex_shader_t *,
30
ID3D11ShaderResourceView *resourceViewsDXGI_MAX_SHADER_VIEW,
31
d3d11_select_plane_t selectPlane, void *selectOpaque);
32
_service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/win32/d3d11_scaler.cpp
Added
201
1
2
+// SPDX-License-Identifier: LGPL-2.1-or-later
3
+/*****************************************************************************
4
+ * d3d11_scaler: Direct3D11 VideoProcessor based output scaling
5
+ *****************************************************************************
6
+ * Copyright © 2023 Videolabs, VLC authors and VideoLAN
7
+ *
8
+ * Authors: Chilledheart <hukeyue@hotmail.com>
9
+ * Steve Lhomme <robux4@videolabs.io>
10
+ *****************************************************************************/
11
+
12
+#ifdef HAVE_CONFIG_H
13
+# include "config.h"
14
+#endif
15
+
16
+#include <vlc_common.h>
17
+
18
+#include "d3d11_scaler.h"
19
+
20
+#include <new>
21
+#include <wrl/client.h>
22
+using Microsoft::WRL::ComPtr;
23
+
24
+struct d3d11_scaler
25
+{
26
+ bool usable = false;
27
+ const d3d_format_t *d3d_fmt = nullptr;
28
+ vout_display_place_t place = {};
29
+ bool super_res = false;
30
+ bool upscaling = false;
31
+ UINT Width = 0;
32
+ UINT Height = 0;
33
+ ComPtr<ID3D11VideoDevice> d3dviddev;
34
+ ComPtr<ID3D11VideoContext> d3dvidctx;
35
+ ComPtr<ID3D11VideoProcessorEnumerator> enumerator;
36
+ ComPtr<ID3D11VideoProcessor> processor;
37
+ ComPtr<ID3D11VideoProcessorOutputView> outputView;
38
+ ID3D11ShaderResourceView *SRVsDXGI_MAX_SHADER_VIEW = {};
39
+};
40
+
41
+static const d3d_format_t *GetDirectRenderingFormat(vlc_object_t *vd, d3d11_device_t *d3d_dev, vlc_fourcc_t i_src_chroma)
42
+{
43
+ UINT supportFlags = D3D11_FORMAT_SUPPORT_SHADER_LOAD | D3D11_FORMAT_SUPPORT_VIDEO_PROCESSOR_INPUT;
44
+ return FindD3D11Format( vd, d3d_dev, i_src_chroma, DXGI_RGB_FORMAT|DXGI_YUV_FORMAT, 0, 0, 0, DXGI_CHROMA_GPU, supportFlags );
45
+}
46
+
47
+d3d11_scaler *D3D11_UpscalerCreate(vlc_object_t *vd, d3d11_device_t *d3d_dev, vlc_fourcc_t i_chroma,
48
+ bool super_res)
49
+{
50
+ bool canProcess = !super_res;
51
+ // NVIDIA 530+ driver
52
+ if (d3d_dev->adapterDesc.VendorId == GPU_MANUFACTURER_NVIDIA &&
53
+ (d3d_dev->WDDM.revision * 10000 + d3d_dev->WDDM.build) > 153000)
54
+ {
55
+ // TODO refine which GPU can do it
56
+ canProcess = true;
57
+ }
58
+ else if (d3d_dev->adapterDesc.VendorId == GPU_MANUFACTURER_INTEL)
59
+ {
60
+ // TODO refine which GPU and drivers can do it
61
+ canProcess = true;
62
+ }
63
+
64
+ if (!canProcess)
65
+ {
66
+ msg_Err(vd, "Super Resolution filter not supported");
67
+ return nullptr;
68
+ }
69
+
70
+ const d3d_format_t *fmt = GetDirectRenderingFormat(vd, d3d_dev, i_chroma);
71
+ if (fmt == nullptr || fmt->formatTexture == DXGI_FORMAT_UNKNOWN)
72
+ {
73
+ msg_Warn(vd, "chroma upscale of %4.4s not supported", (char*)&i_chroma);
74
+ return nullptr;
75
+ }
76
+
77
+ d3d11_scaler *scaleProc = new (std::nothrow) d3d11_scaler;
78
+ if (unlikely(scaleProc == nullptr))
79
+ return nullptr;
80
+
81
+ HRESULT hr;
82
+ hr = d3d_dev->d3ddevice->QueryInterface(IID_GRAPHICS_PPV_ARGS(&scaleProc->d3dviddev));
83
+ if (unlikely(FAILED(hr)))
84
+ {
85
+ msg_Err(vd, "Could not Query ID3D11VideoDevice Interface. (hr=0x%lX)", hr);
86
+ goto error;
87
+ }
88
+
89
+ hr = d3d_dev->d3dcontext->QueryInterface(IID_GRAPHICS_PPV_ARGS(&scaleProc->d3dvidctx));
90
+ if (unlikely(FAILED(hr)))
91
+ {
92
+ msg_Err(vd, "Could not Query ID3D11VideoContext Interface. (hr=0x%lX)", hr);
93
+ goto error;
94
+ }
95
+
96
+ scaleProc->d3d_fmt = fmt;
97
+ scaleProc->super_res = super_res;
98
+ return scaleProc;
99
+error:
100
+ delete scaleProc;
101
+ return nullptr;
102
+}
103
+
104
+static void ReleaseSRVs(d3d11_scaler *scaleProc)
105
+{
106
+ for (size_t i=0; i<ARRAY_SIZE(scaleProc->SRVs); i++)
107
+ {
108
+ if (scaleProc->SRVsi)
109
+ {
110
+ scaleProc->SRVsi->Release();
111
+ scaleProc->SRVsi = nullptr;
112
+ }
113
+ }
114
+}
115
+
116
+int D3D11_UpscalerUpdate(vlc_object_t *vd, d3d11_scaler *scaleProc, d3d11_device_t*d3d_dev,
117
+ const video_format_t *fmt, video_format_t *quad_fmt,
118
+ const vout_display_placement *cfg)
119
+{
120
+ HRESULT hr;
121
+ ID3D11Texture2D *_upscaledDXGI_MAX_SHADER_VIEW;
122
+ ComPtr<ID3D11Texture2D> upscaled;
123
+ D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC outDesc{ };
124
+ D3D11_VIDEO_COLOR black{};
125
+ black.RGBA.A = 1.f;
126
+ bool upscale = false;
127
+
128
+ vout_display_place_t place{};
129
+ auto display = *cfg;
130
+ display.fitting = VLC_VIDEO_FIT_SMALLER;
131
+ vout_display_PlacePicture(&place, fmt, &display);
132
+
133
+ unsigned out_width, out_height;
134
+ out_width = (display.width + (scaleProc->d3d_fmt->widthDenominator-1)) & ~(scaleProc->d3d_fmt->widthDenominator-1);
135
+ out_height = (display.height + (scaleProc->d3d_fmt->heightDenominator-1)) & ~(scaleProc->d3d_fmt->heightDenominator-1);
136
+
137
+ quad_fmt->i_x_offset = 0;
138
+ quad_fmt->i_width = quad_fmt->i_visible_width = out_width;
139
+ quad_fmt->i_y_offset = 0;
140
+ quad_fmt->i_height = quad_fmt->i_visible_height = out_height;
141
+
142
+ if (scaleProc->Width == out_width && scaleProc->Height == out_height &&
143
+ vout_display_PlaceEquals(&scaleProc->place, &place))
144
+ // do nothing
145
+ return VLC_SUCCESS;
146
+ scaleProc->place = place;
147
+
148
+ scaleProc->usable = false;
149
+
150
+ if (scaleProc->enumerator.Get() == nullptr)
151
+ {
152
+ d3d11_device_lock(d3d_dev);
153
+ D3D11_VIDEO_PROCESSOR_CONTENT_DESC processorDesc{};
154
+ processorDesc.InputFrameFormat = D3D11_VIDEO_FRAME_FORMAT_PROGRESSIVE;
155
+ processorDesc.InputFrameRate = {
156
+ .Numerator = fmt->i_frame_rate,
157
+ .Denominator = fmt->i_frame_rate_base,
158
+ };
159
+ processorDesc.InputWidth = fmt->i_width;
160
+ processorDesc.InputHeight = fmt->i_height;
161
+ processorDesc.OutputWidth = out_width;
162
+ processorDesc.OutputHeight = out_height;
163
+ processorDesc.OutputFrameRate = {
164
+ .Numerator = fmt->i_frame_rate,
165
+ .Denominator = fmt->i_frame_rate_base,
166
+ };
167
+ processorDesc.Usage = D3D11_VIDEO_USAGE_PLAYBACK_NORMAL;
168
+ hr = scaleProc->d3dviddev->CreateVideoProcessorEnumerator(&processorDesc, &scaleProc->enumerator);
169
+ if (FAILED(hr))
170
+ {
171
+ msg_Dbg(vd, "Can't get a video processor for the video (error 0x%lx).", hr);
172
+ d3d11_device_unlock(d3d_dev);
173
+ goto done_super;
174
+ }
175
+
176
+ hr = scaleProc->d3dviddev->CreateVideoProcessor(scaleProc->enumerator.Get(), 0,
177
+ &scaleProc->processor);
178
+ d3d11_device_unlock(d3d_dev);
179
+ if (FAILED(hr))
180
+ {
181
+ msg_Dbg(vd, "failed to create the processor (error 0x%lx).", hr);
182
+ goto done_super;
183
+ }
184
+ }
185
+
186
+ if (scaleProc->Width != out_width || scaleProc->Height != out_height )
187
+ {
188
+ scaleProc->Width = out_width;
189
+ scaleProc->Height = out_height;
190
+
191
+ // we need a texture that will receive the upscale version
192
+ D3D11_TEXTURE2D_DESC texDesc;
193
+ ZeroMemory(&texDesc, sizeof(texDesc));
194
+ texDesc.MipLevels = 1;
195
+ texDesc.SampleDesc.Count = 1;
196
+ texDesc.MiscFlags = 0;
197
+ texDesc.BindFlags = D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE;
198
+ texDesc.Usage = D3D11_USAGE_DEFAULT;
199
+ texDesc.CPUAccessFlags = 0;
200
+ texDesc.ArraySize = 1;
201
_service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/win32/d3d11_scaler.h
Added
39
1
2
+// SPDX-License-Identifier: LGPL-2.1-or-later
3
+/*****************************************************************************
4
+ * d3d11_scaler: Direct3D11 VideoProcessor based output scaling
5
+ *****************************************************************************
6
+ * Copyright © 2023 Videolabs, VLC authors and VideoLAN
7
+ *
8
+ * Authors: Chilledheart <hukeyue@hotmail.com>
9
+ * Steve Lhomme <robux4@videolabs.io>
10
+ *****************************************************************************/
11
+
12
+#ifndef VLC_D3D11_SCALER_H
13
+#define VLC_D3D11_SCALER_H
14
+
15
+#include "../../video_chroma/d3d11_fmt.h"
16
+#include <vlc_vout_display.h>
17
+
18
+#ifdef __cplusplus
19
+extern "C" {
20
+#endif
21
+
22
+struct d3d11_scaler;
23
+
24
+struct d3d11_scaler *D3D11_UpscalerCreate(vlc_object_t *, d3d11_device_t*, vlc_fourcc_t i_chroma, bool super_res);
25
+void D3D11_UpscalerDestroy(struct d3d11_scaler *);
26
+int D3D11_UpscalerUpdate(vlc_object_t *, struct d3d11_scaler *, d3d11_device_t*,
27
+ const video_format_t *, video_format_t *,
28
+ const vout_display_placement *);
29
+int D3D11_UpscalerScale(vlc_object_t *, struct d3d11_scaler *, picture_sys_d3d11_t *);
30
+bool D3D11_UpscalerUsed(const struct d3d11_scaler *);
31
+void D3D11_UpscalerGetSRV(const struct d3d11_scaler *, ID3D11ShaderResourceView *SRVDXGI_MAX_SHADER_VIEW);
32
+void D3D11_UpscalerGetSize(const struct d3d11_scaler *, unsigned *i_width, unsigned *i_height);
33
+
34
+#ifdef __cplusplus
35
+}
36
+#endif
37
+
38
+#endif // VLC_D3D11_SCALER_H
39
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_output/win32/d3d11_shaders.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/win32/d3d11_shaders.h
Changed
25
1
2
/* A Quad is texture that can be displayed in a rectangle */
3
struct d3d11_quad_t
4
{
5
+ d3d11_quad_t()
6
+ {
7
+ video_format_Init(&quad_fmt, 0);
8
+ }
9
+
10
~d3d11_quad_t()
11
{
12
ReleaseD3D11PictureSys(&picSys);
13
+ video_format_Clean(&quad_fmt);
14
}
15
16
void Reset();
17
18
19
picture_sys_d3d11_t picSys = {};
20
d3d_quad_t generic = {};
21
+ video_format_t quad_fmt = {};
22
UINT resourceCount = 0;
23
Microsoft::WRL::ComPtr<ID3D11Buffer> vertexBuffer;
24
Microsoft::WRL::ComPtr<ID3D11Buffer> indexBuffer;
25
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_output/win32/d3d11_swapchain.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/win32/d3d11_swapchain.cpp
Changed
26
1
2
ComPtr<ID3D11RenderTargetView> swapchainTargetViewDXGI_MAX_RENDER_TARGET;
3
};
4
5
-DEFINE_GUID(GUID_SWAPCHAIN_WIDTH, 0xf1b59347, 0x1643, 0x411a, 0xad, 0x6b, 0xc7, 0x80, 0x17, 0x7a, 0x06, 0xb6);
6
-DEFINE_GUID(GUID_SWAPCHAIN_HEIGHT, 0x6ea976a0, 0x9d60, 0x4bb7, 0xa5, 0xa9, 0x7d, 0xd1, 0x18, 0x7f, 0xc9, 0xbd);
7
-
8
static bool UpdateSwapchain( d3d11_local_swapchain *display, const libvlc_video_render_cfg_t *cfg )
9
{
10
HRESULT hr;
11
12
return display;
13
}
14
15
-#if defined(HAVE_DCOMP_H) && !defined(VLC_WINSTORE_APP)
16
+#if defined(HAVE_DCOMP_H)
17
void *D3D11_CreateLocalSwapchainHandleDComp(vlc_object_t *o, void* dcompDevice, void* dcompVisual, d3d11_device_t *d3d_dev)
18
{
19
d3d11_local_swapchain *display = new (std::nothrow) d3d11_local_swapchain();
20
21
22
return display;
23
}
24
-#endif
25
+#endif // HAVE_DCOMP_H
26
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_output/win32/d3d11_swapchain.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/win32/d3d11_swapchain.h
Changed
22
1
2
#include "dxgi_swapchain.h"
3
#include "../../video_chroma/d3d11_fmt.h"
4
5
+#ifndef VLC_WINSTORE_APP
6
void *D3D11_CreateLocalSwapchainHandleHwnd(vlc_object_t *, HWND, d3d11_device_t *d3d_dev);
7
-#if defined(HAVE_DCOMP_H) && !defined(VLC_WINSTORE_APP)
8
+#if defined(HAVE_DCOMP_H)
9
void *D3D11_CreateLocalSwapchainHandleDComp(vlc_object_t *, void* dcompDevice, void* dcompVisual, d3d11_device_t *d3d_dev);
10
-#endif
11
+#endif // HAVE_DCOMP_H
12
13
void D3D11_LocalSwapchainCleanupDevice( void *opaque );
14
bool D3D11_LocalSwapchainUpdateOutput( void *opaque, const libvlc_video_render_cfg_t *cfg, libvlc_video_output_cfg_t *out );
15
16
bool D3D11_LocalSwapchainSelectPlane( void *opaque, size_t plane, void *output );
17
void D3D11_LocalSwapchainSwap( void *opaque );
18
void D3D11_LocalSwapchainSetMetadata( void *opaque, libvlc_video_metadata_type_t, const void * );
19
+#endif // !VLC_WINSTORE_APP
20
21
#endif /* VLC_D3D11_SWAPCHAIN_H */
22
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_output/win32/direct3d11.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/win32/direct3d11.cpp
Changed
201
1
2
#include <new>
3
4
#include "../../video_chroma/d3d11_fmt.h"
5
-#ifdef HAVE_D3D11_4_H
6
-#include <d3d11_4.h>
7
-#endif
8
9
#include "d3d11_quad.h"
10
#include "d3d11_shaders.h"
11
+#include "d3d11_scaler.h"
12
+#ifndef VLC_WINSTORE_APP
13
#include "d3d11_swapchain.h"
14
+#endif
15
16
#include "common.h"
17
#include "../../video_chroma/copy.h"
18
19
#define HW_BLENDING_LONGTEXT N_(\
20
"Try to use hardware acceleration for subtitle/OSD blending.")
21
22
+#define UPSCALE_MODE_TEXT N_("Video Upscaling Mode")
23
+#define UPSCALE_MODE_LONGTEXT N_("Select the upscaling mode for video.")
24
+
25
+static const char *const ppsz_upscale_mode = {
26
+ "linear", "point", "processor", "super" };
27
+static const char *const ppsz_upscale_mode_text = {
28
+ N_("Linear Sampler"), N_("Point Sampler"), N_("Video Processor"), N_("Super Resolution") };
29
+
30
vlc_module_begin ()
31
set_shortname("Direct3D11")
32
set_description(N_("Direct3D11 video output"))
33
34
35
add_bool("direct3d11-hw-blending", true, HW_BLENDING_TEXT, HW_BLENDING_LONGTEXT)
36
37
+ add_string("d3d11-upscale-mode", "linear", UPSCALE_MODE_TEXT, UPSCALE_MODE_LONGTEXT)
38
+ change_string_list(ppsz_upscale_mode, ppsz_upscale_mode_text)
39
+
40
add_shortcut("direct3d11")
41
set_callback_display(Open, 300)
42
vlc_module_end ()
43
44
+enum d3d11_upscale
45
+{
46
+ upscale_LinearSampler,
47
+ upscale_PointSampler,
48
+ upscale_VideoProcessor,
49
+ upscale_SuperResolution,
50
+};
51
+
52
typedef struct vout_display_sys_t
53
{
54
- vout_display_sys_win32_t sys; /* only use if sys.event is not NULL */
55
display_win32_area_t area;
56
57
int log_level;
58
59
- /* Sensors */
60
- void *p_sensors = NULL;
61
-
62
display_info_t display = {};
63
64
d3d11_device_t *d3d_dev = NULL;
65
66
d3d11_quad_t picQuad;
67
68
#ifdef HAVE_D3D11_4_H
69
- ComPtr<ID3D11Fence> d3dRenderFence;
70
- ComPtr<ID3D11DeviceContext4> d3dcontext4;
71
- UINT64 renderFence = 0;
72
- HANDLE renderFinished = NULL;
73
+ d3d11_gpu_fence fence;
74
#endif
75
76
picture_sys_d3d11_t stagingSys;
77
78
libvlc_video_makeCurrent_cb startEndRenderingCb;
79
libvlc_video_frameMetadata_cb sendMetadataCb;
80
libvlc_video_output_select_plane_cb selectPlaneCb;
81
+
82
+ // upscaling
83
+ enum d3d11_upscale upscaleMode;
84
+ d3d11_scaler *scaleProc;
85
} vout_display_sys_t;
86
87
static void Prepare(vout_display_t *, picture_t *, subpicture_t *subpicture, vlc_tick_t);
88
89
return VLC_EGENERIC;
90
}
91
92
- display_info_t new_display = { };
93
-
94
- for (const d3d_format_t *output_format = DxgiGetRenderFormatList();
95
- output_format->name != NULL; ++output_format)
96
+ if (sys->upscaleMode == upscale_VideoProcessor || sys->upscaleMode == upscale_SuperResolution)
97
{
98
- if (output_format->formatTexture == (DXGI_FORMAT)out.dxgi_format &&
99
- !is_d3d11_opaque(output_format->fourcc))
100
- {
101
- new_display.pixelFormat = output_format;
102
- break;
103
- }
104
+ D3D11_UpscalerUpdate(VLC_OBJECT(vd), sys->scaleProc, sys->d3d_dev,
105
+ vd->source, &sys->picQuad.quad_fmt, &vd->cfg->display);
106
}
107
+
108
+ display_info_t new_display = { };
109
+
110
+ new_display.pixelFormat = D3D11_RenderFormat((DXGI_FORMAT)out.dxgi_format, false);
111
if (unlikely(new_display.pixelFormat == NULL))
112
{
113
msg_Err(vd, "Could not find the output format.");
114
115
sys->picQuad.UpdateViewport( &rect_dst, sys->display.pixelFormat );
116
117
RECT source_rect;
118
- source_rect.left = vd->source->i_x_offset;
119
- source_rect.right = vd->source->i_x_offset + vd->source->i_visible_width;
120
- source_rect.top = vd->source->i_y_offset;
121
- source_rect.bottom = vd->source->i_y_offset + vd->source->i_visible_height;
122
+ source_rect.left = sys->picQuad.quad_fmt.i_x_offset;
123
+ source_rect.right = sys->picQuad.quad_fmt.i_x_offset + sys->picQuad.quad_fmt.i_visible_width;
124
+ source_rect.top = sys->picQuad.quad_fmt.i_y_offset;
125
+ source_rect.bottom = sys->picQuad.quad_fmt.i_y_offset + sys->picQuad.quad_fmt.i_visible_height;
126
d3d11_device_lock( sys->d3d_dev );
127
128
D3D11_UpdateQuadPosition(vd, sys->d3d_dev, &sys->picQuad, &source_rect,
129
130
if (ret != VLC_SUCCESS)
131
goto error;
132
133
- CommonInit(&sys->area);
134
+ CommonInit(&sys->area, &sys->picQuad.quad_fmt);
135
136
sys->outside_opaque = var_InheritAddress( vd, "vout-cb-opaque" );
137
sys->updateOutputCb = (libvlc_video_update_output_cb)var_InheritAddress( vd, "vout-cb-update-output" );
138
139
140
if ( sys->swapCb == NULL || sys->startEndRenderingCb == NULL || sys->updateOutputCb == NULL )
141
{
142
-#ifndef VLC_WINSTORE_APP
143
+#ifdef VLC_WINSTORE_APP
144
+ msg_Err(vd, "UWP apps needs to set an external rendering target");
145
+ goto error;
146
+#else // !VLC_WINSTORE_APP
147
if (vd->cfg->window->type == VLC_WINDOW_TYPE_HWND)
148
{
149
- if (CommonWindowInit(vd, &sys->area, &sys->sys,
150
+ if (CommonWindowInit(vd, &sys->area,
151
vd->source->projection_mode != PROJECTION_MODE_RECTANGULAR))
152
goto error;
153
}
154
155
-#endif /* !VLC_WINSTORE_APP */
156
-
157
/* use our internal swapchain callbacks */
158
-#if defined(HAVE_DCOMP_H) && !defined(VLC_WINSTORE_APP)
159
+#if defined(HAVE_DCOMP_H)
160
if (vd->cfg->window->type == VLC_WINDOW_TYPE_DCOMP)
161
sys->outside_opaque =
162
D3D11_CreateLocalSwapchainHandleDComp(VLC_OBJECT(vd),
163
vd->cfg->window->display.dcomp_device,
164
vd->cfg->window->handle.dcomp_visual, sys->d3d_dev);
165
else
166
-#endif
167
- sys->outside_opaque = D3D11_CreateLocalSwapchainHandleHwnd(VLC_OBJECT(vd), sys->sys.hvideownd, sys->d3d_dev);
168
+#endif //HAVE_DCOMP_H
169
+ sys->outside_opaque = D3D11_CreateLocalSwapchainHandleHwnd(VLC_OBJECT(vd), CommonVideoHWND(&sys->area), sys->d3d_dev);
170
if (unlikely(sys->outside_opaque == NULL))
171
goto error;
172
sys->updateOutputCb = D3D11_LocalSwapchainUpdateOutput;
173
174
sys->startEndRenderingCb = D3D11_LocalSwapchainStartEndRendering;
175
sys->sendMetadataCb = D3D11_LocalSwapchainSetMetadata;
176
sys->selectPlaneCb = D3D11_LocalSwapchainSelectPlane;
177
- }
178
-
179
-#ifndef VLC_WINSTORE_APP
180
- if (vd->source->projection_mode != PROJECTION_MODE_RECTANGULAR && sys->sys.hvideownd)
181
- sys->p_sensors = HookWindowsSensors(vd, sys->sys.hvideownd);
182
#endif // !VLC_WINSTORE_APP
183
+ }
184
185
if (Direct3D11Open(vd, fmtp, context)) {
186
msg_Err(vd, "Direct3D11 could not be opened");
187
188
vout_display_sys_t *sys = static_cast<vout_display_sys_t *>(vd->sys);
189
D3D_ReleaseShaderCompiler(sys->shaders);
190
#ifndef VLC_WINSTORE_APP
191
- UnhookWindowsSensors(sys->p_sensors);
192
- CommonWindowClean(&sys->sys);
193
+ CommonWindowClean(&sys->area);
194
#endif
195
Direct3D11Close(vd);
196
delete sys;
197
198
static int Control(vout_display_t *vd, int query)
199
{
200
vout_display_sys_t *sys = static_cast<vout_display_sys_t *>(vd->sys);
201
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_output/win32/direct3d9.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/win32/direct3d9.c
Changed
94
1
2
3
typedef struct vout_display_sys_t
4
{
5
- vout_display_sys_win32_t sys; /* only use if sys.event is not NULL */
6
display_win32_area_t area;
7
8
bool allow_hw_yuv; /* Should we use hardware YUV->RGB conversions */
9
10
RECT rect;
11
UINT width, height;
12
13
- GetClientRect(p_sys->sys.hvideownd, &rect);
14
+ GetClientRect(CommonVideoHWND(&sys->area), &rect);
15
width = RECTWidth(rect);
16
height = RECTHeight(rect);
17
18
19
20
HRESULT hr;
21
if (sys->d3d9_device->hd3d.use_ex) {
22
- hr = IDirect3DDevice9Ex_PresentEx(p_d3d9_dev->devex, &src, &src, sys->sys.hvideownd, NULL, 0);
23
+ hr = IDirect3DDevice9Ex_PresentEx(p_d3d9_dev->devex, &src, &src, CommonVideoHWND(&sys->area), NULL, 0);
24
} else {
25
- hr = IDirect3DDevice9_Present(p_d3d9_dev->dev, &src, &src, sys->sys.hvideownd, NULL);
26
+ hr = IDirect3DDevice9_Present(p_d3d9_dev->dev, &src, &src, CommonVideoHWND(&sys->area), NULL);
27
}
28
if (FAILED(hr)) {
29
msg_Dbg(vd, "Failed Present: 0x%lX", hr);
30
31
static int Control(vout_display_t *vd, int query)
32
{
33
vout_display_sys_t *sys = vd->sys;
34
- CommonControl(vd, &sys->area, &sys->sys, query);
35
+ CommonControl(vd, &sys->area, query);
36
return VLC_SUCCESS;
37
}
38
39
40
if (!sys)
41
return VLC_ENOMEM;
42
43
- CommonInit(&sys->area);
44
+ CommonInit(&sys->area, vd->source);
45
46
sys->outside_opaque = var_InheritAddress( vd, "vout-cb-opaque" );
47
sys->updateOutputCb = var_InheritAddress( vd, "vout-cb-update-output" );
48
49
if ( sys->swapCb == NULL || sys->startEndRenderingCb == NULL || sys->updateOutputCb == NULL )
50
{
51
/* use our own callbacks, since there isn't any external ones */
52
- if (CommonWindowInit(vd, &sys->area, &sys->sys, false))
53
+ if (CommonWindowInit(vd, &sys->area, false))
54
goto error;
55
56
sys->outside_opaque = vd;
57
58
sys->startEndRenderingCb = NULL;
59
}
60
61
+ CommonPlacePicture(vd, &sys->area);
62
+
63
sys->dec_device = context ? vlc_video_context_HoldDevice(context) : NULL;
64
sys->d3d9_device = GetD3D9OpaqueDevice(sys->dec_device);
65
if ( sys->d3d9_device == NULL )
66
67
goto error;
68
}
69
70
- if (sys->swapCb == LocalSwapchainSwap)
71
- CommonPlacePicture(vd, &sys->area);
72
-
73
sys->hxdll = Direct3D9LoadShaderLibrary();
74
if (!sys->hxdll)
75
msg_Warn(vd, "cannot load Direct3D9 Shader Library; HLSL pixel shading will be disabled.");
76
77
return VLC_SUCCESS;
78
error:
79
Direct3D9Close(vd);
80
- CommonWindowClean(&sys->sys);
81
+ CommonWindowClean(&sys->area);
82
Direct3D9Destroy(sys);
83
free(vd->sys);
84
return VLC_EGENERIC;
85
86
87
Direct3D9Close(vd);
88
89
- CommonWindowClean(&sys->sys);
90
+ CommonWindowClean(&sys->area);
91
92
Direct3D9Destroy(sys);
93
94
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_output/win32/dxgi_swapchain.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/win32/dxgi_swapchain.cpp
Changed
78
1
2
3
#include <vlc_es.h>
4
5
-#if defined(HAVE_DCOMP_H) && !defined(VLC_WINSTORE_APP)
6
+#if defined(HAVE_DCOMP_H)
7
# include <dcomp.h>
8
#endif
9
10
11
const dxgi_color_space *colorspace = nullptr;
12
13
swapchain_surface_type swapchainSurfaceType;
14
-#ifndef VLC_WINSTORE_APP
15
union {
16
HWND hwnd;
17
#if defined(HAVE_DCOMP_H)
18
19
} dcomp;
20
#endif // HAVE_DCOMP_H
21
} swapchainSurface;
22
-#endif /* !VLC_WINSTORE_APP */
23
24
ComPtr<IDXGISwapChain1> dxgiswapChain; /* DXGI 1.2 swap chain */
25
ComPtr<IDXGISwapChain4> dxgiswapChain4; /* DXGI 1.5 for HDR metadata */
26
27
color_spacesbest.color == (video_color_space_t) cfg->colorspace;
28
}
29
30
-#ifndef VLC_WINSTORE_APP
31
static void FillSwapChainDesc(dxgi_swapchain *display, UINT width, UINT height, DXGI_SWAP_CHAIN_DESC1 *out)
32
{
33
ZeroMemory(out, sizeof(*out));
34
35
}
36
#endif /* HAVE_DCOMP_H */
37
38
-#endif /* !VLC_WINSTORE_APP */
39
-
40
void DXGI_LocalSwapchainSwap( dxgi_swapchain *display )
41
{
42
DXGI_PRESENT_PARAMETERS presentParams = { };
43
44
return NULL;
45
46
display->obj = o;
47
-#ifndef VLC_WINSTORE_APP
48
display->swapchainSurfaceType = SWAPCHAIN_SURFACE_HWND;
49
display->swapchainSurface.hwnd = hwnd;
50
-#else // VLC_WINSTORE_APP
51
- VLC_UNUSED(hwnd);
52
-#endif // VLC_WINSTORE_APP
53
54
return display;
55
}
56
57
-#if defined(HAVE_DCOMP_H) && !defined(VLC_WINSTORE_APP)
58
+#if defined(HAVE_DCOMP_H)
59
dxgi_swapchain *DXGI_CreateLocalSwapchainHandleDComp(vlc_object_t *o, void* dcompDevice, void* dcompVisual)
60
{
61
dxgi_swapchain *display = new (std::nothrow) dxgi_swapchain();
62
63
UINT width = cfg->width ? cfg->width : 8;
64
UINT height = cfg->height ? cfg->height : 8;
65
66
-#ifndef VLC_WINSTORE_APP
67
if (display->dxgiswapChain.Get() && display->pixelFormat != newPixelFormat)
68
{
69
// the pixel format changed, we need a new swapchain
70
71
width, height);
72
73
}
74
-#endif /* !VLC_WINSTORE_APP */
75
if ( !display->dxgiswapChain.Get() )
76
return false;
77
78
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_output/win32/dxgi_swapchain.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/win32/dxgi_swapchain.h
Changed
15
1
2
3
struct dxgi_swapchain *DXGI_CreateLocalSwapchainHandleHwnd(vlc_object_t *, HWND);
4
5
-#if defined(HAVE_DCOMP_H) && !defined(VLC_WINSTORE_APP)
6
+#if defined(HAVE_DCOMP_H)
7
struct dxgi_swapchain *DXGI_CreateLocalSwapchainHandleDComp(vlc_object_t *,
8
void /*IDCompositionDevice*/ * dcompDevice,
9
void /*IDCompositionVisual*/ * dcompVisual);
10
-#endif
11
+#endif // HAVE_DCOMP_H
12
13
Microsoft::WRL::ComPtr<IDXGISwapChain1> & DXGI_GetSwapChain1( struct dxgi_swapchain * );
14
Microsoft::WRL::ComPtr<IDXGISwapChain4> & DXGI_GetSwapChain4( struct dxgi_swapchain * );
15
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_output/win32/events.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/win32/events.c
Changed
201
1
2
3
#include "events.h"
4
#include "common.h"
5
+#ifdef HAVE_WIN32_SENSORS
6
+#include "sensors.h"
7
+#endif
8
9
/*****************************************************************************
10
* Local prototypes.
11
12
vlc_thread_t thread;
13
vlc_mutex_t lock;
14
vlc_cond_t wait;
15
- bool b_ready;
16
- atomic_bool b_done;
17
+ bool b_ready; // the thread was started
18
bool b_error;
19
+ atomic_bool b_done;
20
21
- /* */
22
- bool is_projected;
23
+#ifdef HAVE_WIN32_SENSORS
24
+ /* Sensors */
25
+ const vout_display_owner_t *init_move;
26
+ void *p_sensors;
27
+#endif
28
29
/* Gestures */
30
- win32_gesture_sys_t *p_gesture;
31
+ struct win32_gesture_sys_t *p_gesture;
32
33
- RECT window_area;
34
+ unsigned init_width, init_height;
35
36
/* */
37
vlc_window_t *parent_window;
38
39
HWND hvideownd;
40
};
41
42
-/***************************
43
- * Local Prototypes *
44
- ***************************/
45
-/* Window Creation */
46
-static int Win32VoutCreateWindow( event_thread_t * );
47
-static void Win32VoutCloseWindow ( event_thread_t * );
48
-
49
-/*****************************************************************************
50
- * EventThread: Create video window & handle its messages
51
- *****************************************************************************
52
- * This function creates a video window and then enters an infinite loop
53
- * that handles the messages sent to that window.
54
- * The main goal of this thread is to isolate the Win32 PeekMessage function
55
- * because this one can block for a long time.
56
- *****************************************************************************/
57
-static void *EventThread( void *p_this )
58
+HWND EventThreadVideoHWND( const struct event_thread_t *p_event )
59
{
60
- vlc_thread_set_name("vlc-vout-hwnd");
61
-
62
- event_thread_t *p_event = (event_thread_t *)p_this;
63
- MSG msg;
64
- int canc = vlc_savecancel ();
65
-
66
-
67
- vlc_mutex_lock( &p_event->lock );
68
- /* Create a window for the video */
69
- /* Creating a window under Windows also initializes the thread's event
70
- * message queue */
71
- if( Win32VoutCreateWindow( p_event ) )
72
- p_event->b_error = true;
73
-
74
- p_event->b_ready = true;
75
- vlc_cond_signal( &p_event->wait );
76
-
77
- const bool b_error = p_event->b_error;
78
- vlc_mutex_unlock( &p_event->lock );
79
-
80
- if( b_error )
81
- {
82
- vlc_restorecancel( canc );
83
- return NULL;
84
- }
85
-
86
- /* Main loop */
87
- /* GetMessage will sleep if there's no message in the queue */
88
- for( ;; )
89
- {
90
- if( !GetMessage( &msg, 0, 0, 0 ) || atomic_load( &p_event->b_done ) )
91
- {
92
- break;
93
- }
94
-
95
- /* Messages we don't handle directly are dispatched to the
96
- * window procedure */
97
- TranslateMessage(&msg);
98
- DispatchMessage(&msg);
99
-
100
- } /* End Main loop */
101
-
102
- msg_Dbg( p_event->obj, "Win32 Vout EventThread terminating" );
103
-
104
- Win32VoutCloseWindow( p_event );
105
- vlc_restorecancel(canc);
106
- return NULL;
107
-}
108
-
109
-event_thread_t *EventThreadCreate( vlc_object_t *obj, vlc_window_t *parent_window)
110
-{
111
- if (parent_window->type != VLC_WINDOW_TYPE_HWND)
112
- return NULL;
113
- /* Create the Vout EventThread, this thread is created by us to isolate
114
- * the Win32 PeekMessage function calls. We want to do this because
115
- * Windows can stay blocked inside this call for a long time, and when
116
- * this happens it thus blocks vlc's video_output thread.
117
- * Vout EventThread will take care of the creation of the video
118
- * window (because PeekMessage has to be called from the same thread which
119
- * created the window). */
120
- msg_Dbg( obj, "creating Vout EventThread" );
121
- event_thread_t *p_event = malloc( sizeof(*p_event) );
122
- if( !p_event )
123
- return NULL;
124
-
125
- p_event->obj = obj;
126
- vlc_mutex_init( &p_event->lock );
127
- vlc_cond_init( &p_event->wait );
128
- atomic_init( &p_event->b_done, false );
129
-
130
- p_event->parent_window = parent_window;
131
-
132
- _snwprintf( p_event->class_video, ARRAY_SIZE(p_event->class_video),
133
- TEXT("VLC video output %p"), (void *)p_event );
134
- return p_event;
135
+ return p_event->hvideownd;
136
}
137
138
-void EventThreadDestroy( event_thread_t *p_event )
139
+void EventThreadDestroy( struct event_thread_t *p_event )
140
{
141
- free( p_event );
142
-}
143
-
144
-int EventThreadStart( event_thread_t *p_event, event_hwnd_t *p_hwnd, const event_cfg_t *p_cfg )
145
-{
146
- p_event->is_projected = p_cfg->is_projected;
147
- p_event->window_area.left = 0;
148
- p_event->window_area.top = 0;
149
- p_event->window_area.right = p_cfg->width;
150
- p_event->window_area.bottom = p_cfg->height;
151
-
152
- p_event->b_ready = false;
153
- atomic_store( &p_event->b_done, false);
154
- p_event->b_error = false;
155
-
156
- if( vlc_clone( &p_event->thread, EventThread, p_event ) )
157
- {
158
- msg_Err( p_event->obj, "cannot create Vout EventThread" );
159
- return VLC_EGENERIC;
160
- }
161
-
162
- vlc_mutex_lock( &p_event->lock );
163
- while( !p_event->b_ready )
164
- vlc_cond_wait( &p_event->wait, &p_event->lock );
165
- const bool b_error = p_event->b_error;
166
- vlc_mutex_unlock( &p_event->lock );
167
-
168
- if( b_error )
169
- {
170
- vlc_join( p_event->thread, NULL );
171
- p_event->b_ready = false;
172
- return VLC_EGENERIC;
173
- }
174
- msg_Dbg( p_event->obj, "Vout EventThread running" );
175
-
176
- /* */
177
- p_hwnd->parent_window = p_event->parent_window;
178
- p_hwnd->hparent = p_event->hparent;
179
- p_hwnd->hvideownd = p_event->hvideownd;
180
- return VLC_SUCCESS;
181
-}
182
-
183
-void EventThreadStop( event_thread_t *p_event )
184
-{
185
- if( !p_event->b_ready )
186
+ if ( p_event == NULL )
187
return;
188
189
atomic_store( &p_event->b_done, true );
190
191
PostMessage( p_event->hvideownd, WM_NULL, 0, 0);
192
193
vlc_join( p_event->thread, NULL );
194
- p_event->b_ready = false;
195
-}
196
197
+#ifdef HAVE_WIN32_SENSORS
198
+ if (p_event->p_sensors)
199
+ UnhookWindowsSensors(p_event->p_sensors);
200
+#endif
201
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_output/win32/events.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/win32/events.h
Changed
29
1
2
/**
3
* HWNDs manager.
4
*/
5
-typedef struct event_thread_t event_thread_t;
6
-
7
-typedef struct {
8
- bool is_projected;
9
- unsigned width;
10
- unsigned height;
11
-} event_cfg_t;
12
-
13
-typedef struct {
14
- vlc_window_t *parent_window;
15
- HWND hparent;
16
- HWND hvideownd;
17
-} event_hwnd_t;
18
-
19
-event_thread_t *EventThreadCreate( vlc_object_t *, vlc_window_t *);
20
-void EventThreadDestroy( event_thread_t * );
21
-int EventThreadStart( event_thread_t *, event_hwnd_t *, const event_cfg_t * );
22
-void EventThreadStop( event_thread_t * );
23
+struct event_thread_t *EventThreadCreate( vlc_object_t *, vlc_window_t *,
24
+ const struct vout_display_placement *,
25
+ const vout_display_owner_t * );
26
+void EventThreadDestroy( struct event_thread_t * );
27
+HWND EventThreadVideoHWND( const struct event_thread_t * );
28
+void EventThreadUpdateSize( struct event_thread_t * );
29
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_output/win32/glwin32.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/win32/glwin32.c
Changed
61
1
2
*****************************************************************************/
3
typedef struct vout_display_sys_t
4
{
5
- vout_display_sys_win32_t sys;
6
display_win32_area_t area;
7
8
vlc_gl_t *gl;
9
vout_display_opengl_t *vgl;
10
-
11
- /* Sensors */
12
- void *p_sensors;
13
} vout_display_sys_t;
14
15
static void Prepare(vout_display_t *, picture_t *, subpicture_t *, vlc_tick_t);
16
17
static int Control(vout_display_t *vd, int query)
18
{
19
vout_display_sys_t *sys = vd->sys;
20
- CommonControl(vd, &sys->area, &sys->sys, query);
21
+ CommonControl(vd, &sys->area, query);
22
return VLC_SUCCESS;
23
}
24
25
26
return NULL;
27
28
wnd->type = VLC_WINDOW_TYPE_HWND;
29
- wnd->handle.hwnd = sys->sys.hvideownd;
30
+ wnd->handle.hwnd = CommonVideoHWND(&sys->area);
31
wnd->ops = &embedVideoWindow_Ops;
32
return wnd;
33
}
34
35
return VLC_ENOMEM;
36
37
/* */
38
- CommonInit(&sys->area);
39
- if (CommonWindowInit(vd, &sys->area, &sys->sys,
40
+ CommonInit(&sys->area, vd->source);
41
+ if (CommonWindowInit(vd, &sys->area,
42
vd->source->projection_mode != PROJECTION_MODE_RECTANGULAR))
43
goto error;
44
-
45
- if (vd->source->projection_mode != PROJECTION_MODE_RECTANGULAR)
46
- sys->p_sensors = HookWindowsSensors(vd, sys->sys.hvideownd);
47
+ CommonPlacePicture(vd, &sys->area);
48
49
vlc_window_SetTitle(vd->cfg->window, VOUT_TITLE " (OpenGL output)");
50
51
52
vlc_object_delete(surface);
53
}
54
55
- UnhookWindowsSensors(sys->p_sensors);
56
- CommonWindowClean(&sys->sys);
57
+ CommonWindowClean(&sys->area);
58
59
free(sys);
60
}
61
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_output/win32/meson.build -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/win32/meson.build
Changed
71
1
2
#
3
4
# Direct3D11 video output
5
-d3d11_sources = files('direct3d11.cpp', 'd3d11_quad.cpp', 'd3d11_shaders.cpp', 'd3d_shaders.c', 'd3d_dynamic_shader.c', 'd3d11_swapchain.cpp', 'dxgi_swapchain.cpp', 'common.c')
6
+d3d11_sources = files('direct3d11.cpp', 'd3d11_quad.cpp', 'd3d11_scaler.cpp', 'd3d11_shaders.cpp', 'd3d_shaders.c', 'd3d_dynamic_shader.c', 'common.c')
7
d3d11_link_with = d3d11_common_lib
8
+d3d11_cargs =
9
+d3d11_deps =
10
if get_option('winstore_app')
11
- d3d11_link_with +=
12
+ d3d11_deps +=
13
cc.find_library('d3d11'),
14
cc.find_library('d3dcompiler_47')
15
16
else
17
- d3d11_sources += files('events.c', 'sensors.cpp', 'win32touch.c')
18
+ d3d11_sources += files('d3d11_swapchain.cpp', 'dxgi_swapchain.cpp', 'events.c', 'sensors.cpp', 'win32touch.c')
19
d3d11_link_with += chroma_copy_lib
20
+ d3d11_cargs += '-DHAVE_WIN32_SENSORS'
21
+ d3d11_deps +=
22
+ cc.find_library('user32')
23
+
24
endif
25
26
vlc_modules += {
27
'name' : 'direct3d11',
28
'sources' : d3d11_sources,
29
- 'link_with' : d3d11_link_with
30
+ 'link_with' : d3d11_link_with,
31
+ 'c_args' : d3d11_cargs,
32
+ 'dependencies' : d3d11_deps
33
}
34
35
if have_win_desktop
36
37
vlc_modules += {
38
'name' : 'direct3d9',
39
'sources' : files('direct3d9.c', 'common.c', 'events.c', 'sensors.cpp', 'win32touch.c'),
40
- 'link_with' : d3d9_common_lib, chroma_copy_lib
41
+ 'link_with' : d3d9_common_lib, chroma_copy_lib ,
42
+ 'dependencies' :
43
+ cc.find_library('user32')
44
+
45
}
46
47
# GDI video output
48
49
'name' : 'wingdi',
50
'sources' : files('wingdi.c', 'common.c', 'events.c', 'win32touch.c'),
51
'link_with' : chroma_copy_lib
52
+ 'dependencies' :
53
+ cc.find_library('user32')
54
+
55
}
56
57
opengl32_lib = cc.find_library('opengl32', required: false)
58
59
files('glwin32.c', 'common.c', 'events.c', 'sensors.cpp', 'win32touch.c'),
60
opengl_vout_commonsources
61
,
62
- 'c_args' : contrib_inc_args ,
63
- 'dependencies' : gl_common_dep, opengl32_lib
64
+ 'c_args' : contrib_inc_args, '-DHAVE_WIN32_SENSORS' ,
65
+ 'dependencies' : gl_common_dep, opengl32_lib,
66
+ cc.find_library('user32')
67
+
68
}
69
70
# WGL
71
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_output/win32/sensors.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/win32/sensors.cpp
Changed
71
1
2
#endif
3
4
#include "events.h"
5
-#include "common.h"
6
+#include "sensors.h"
7
8
#include <initguid.h>
9
#include <wrl/client.h>
10
11
class SensorReceiver : public ISensorEvents
12
{
13
public:
14
- SensorReceiver(vout_display_t *vd, const vlc_viewpoint_t & init_viewpoint)
15
- :vd(vd)
16
+ SensorReceiver(const vout_display_owner_t *o, const vlc_viewpoint_t & init_viewpoint)
17
+ :owner(*o)
18
,current_pos(init_viewpoint)
19
{}
20
21
22
old_pos.roll - current_pos.roll,
23
0.0f
24
};
25
- vout_display_SendEventViewpointMoved(vd, &vp);
26
+ if (owner.viewpoint_moved)
27
+ owner.viewpoint_moved(owner.sys, &vp);
28
return S_OK;
29
}
30
31
32
}
33
34
private:
35
- vout_display_t *const vd;
36
+ vout_display_owner_t owner;
37
vlc_viewpoint_t current_pos;
38
long m_cRef;
39
};
40
41
-void *HookWindowsSensors(vout_display_t *vd, HWND hwnd)
42
+void *HookWindowsSensors(vlc_logger *vd, const vout_display_owner_t *move, HWND hwnd)
43
{
44
ComPtr<ISensorManager> pSensorManager;
45
HRESULT hr = CoCreateInstance( __uuidof(SensorManager),
46
47
hr = pSensorManager->GetSensorsByType(SENSOR_TYPE_INCLINOMETER_3D, &pInclinometers);
48
if (FAILED(hr))
49
{
50
- msg_Dbg(vd, "inclinometer not found. (hr=0x%lX)", hr);
51
+ vlc_debug(vd, "inclinometer not found. (hr=0x%lX)", hr);
52
return NULL;
53
}
54
55
ULONG count;
56
pInclinometers->GetCount(&count);
57
- msg_Dbg(vd, "Found %lu inclinometer", count);
58
+ vlc_debug(vd, "Found %lu inclinometer", count);
59
for (ULONG i=0; i<count; ++i)
60
{
61
ComPtr<ISensor> pSensor;
62
63
PropVariantClear(&pvRot);
64
}
65
66
- SensorReceiver *received = new(std::nothrow) SensorReceiver(vd, start_viewpoint);
67
+ SensorReceiver *received = new(std::nothrow) SensorReceiver(move, start_viewpoint);
68
if (received)
69
{
70
pSensor->SetEventSink(received);
71
_service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/win32/sensors.h
Added
41
1
2
+/*****************************************************************************
3
+ * sensors.h: Windows sensor handling
4
+ *****************************************************************************
5
+ * Copyright © 2017 Steve Lhomme
6
+ * Copyright © 2017 VideoLabs
7
+ *
8
+ * Authors: Steve Lhomme <robux4@gmail.com>
9
+ *
10
+ * This program is free software; you can redistribute it and/or modify it
11
+ * under the terms of the GNU Lesser General Public License as published by
12
+ * the Free Software Foundation; either version 2.1 of the License, or
13
+ * (at your option) any later version.
14
+ *
15
+ * This program is distributed in the hope that it will be useful,
16
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
+ * GNU Lesser General Public License for more details.
19
+ *
20
+ * You should have received a copy of the GNU Lesser General Public License
21
+ * along with this program; if not, write to the Free Software Foundation,
22
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23
+ *****************************************************************************/
24
+
25
+
26
+#ifndef VLC_WIN32_COMMON_SENSOR_H
27
+#define VLC_WIN32_COMMON_SENSOR_H
28
+
29
+#ifdef __cplusplus
30
+extern "C" {
31
+#endif
32
+
33
+void* HookWindowsSensors(struct vlc_logger *, const vout_display_owner_t *, HWND);
34
+void UnhookWindowsSensors(void*);
35
+
36
+# ifdef __cplusplus
37
+}
38
+# endif
39
+
40
+#endif // VLC_WIN32_COMMON_SENSOR_H
41
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_output/win32/win32touch.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/win32/win32touch.c
Changed
201
1
2
3
#include <assert.h>
4
5
-static BOOL DecodeGestureAction( vlc_object_t *p_this, win32_gesture_sys_t *p_gesture, const GESTUREINFO* p_gi );
6
-static BOOL DecodeGestureProjection( vlc_object_t *p_this, win32_gesture_sys_t *p_gesture, const GESTUREINFO* p_gi );
7
+enum {
8
+ GESTURE_ACTION_UNDEFINED = 0,
9
+ GESTURE_ACTION_VOLUME,
10
+ GESTURE_ACTION_JUMP,
11
+ GESTURE_ACTION_BRIGHTNESS
12
+};
13
14
-LRESULT DecodeGesture( vlc_object_t *p_this, win32_gesture_sys_t *p_gesture,
15
- HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam )
16
+
17
+struct win32_gesture_sys_t
18
{
19
- if( !p_gesture )
20
- return DefWindowProc( hWnd, message, wParam, lParam );
21
+ DWORD i_type; /* Gesture ID */
22
+ int i_action; /* GESTURE_ACTION */
23
24
- GESTUREINFO gi;
25
- ZeroMemory( &gi, sizeof( GESTUREINFO ) );
26
- gi.cbSize = sizeof( GESTUREINFO );
27
+ int i_beginx; /* Start X position */
28
+ int i_beginy; /* Start Y position */
29
+ int i_lasty; /* Last known Y position for PAN */
30
+ double f_lastzoom; /* Last zoom factor */
31
32
- BOOL bResult = p_gesture->OurGetGestureInfo((HGESTUREINFO)lParam, &gi);
33
- BOOL bHandled = FALSE; /* Needed to release the handle */
34
+ ULONGLONG i_ullArguments; /* Base values to compare between 2 zoom gestures */
35
+ bool b_2fingers; /* Did we detect 2 fingers? */
36
37
- if( bResult )
38
- bHandled = p_gesture->DecodeGestureImpl(p_this, p_gesture, &gi);
39
- else
40
- {
41
- DWORD dwErr = GetLastError();
42
- if( dwErr > 0 )
43
- msg_Err( p_this, "Could not retrieve a valid GESTUREINFO structure" );
44
- }
45
+ bool (*DecodeGestureImpl)( vlc_object_t *, struct win32_gesture_sys_t *, const GESTUREINFO* );
46
+};
47
48
- if( bHandled )
49
- {
50
- /* Close the Handle, if we handled the gesture, a contrario
51
- * from the doc example */
52
- p_gesture->OurCloseGestureInfoHandle((HGESTUREINFO)lParam);
53
- return 0;
54
- }
55
- else
56
- return DefWindowProc( hWnd, message, wParam, lParam );
57
-}
58
59
-static BOOL DecodeGestureAction( vlc_object_t *p_this, win32_gesture_sys_t *p_gesture, const GESTUREINFO* p_gi )
60
+static bool DecodeGestureAction( vlc_object_t *p_this, struct win32_gesture_sys_t *p_gesture, const GESTUREINFO* p_gi )
61
{
62
- BOOL bHandled = FALSE; /* Needed to release the handle */
63
+ bool bHandled = false; /* Needed to release the handle */
64
switch ( p_gi->dwID )
65
{
66
case GID_BEGIN:
67
68
break;
69
case GID_PAN:
70
p_gesture->i_type = GID_PAN;
71
- bHandled = TRUE;
72
+ bHandled = true;
73
74
if (p_gi->dwFlags & GF_BEGIN) {
75
p_gesture->i_beginx = p_gi->ptsLocation.x;
76
77
case GID_TWOFINGERTAP:
78
p_gesture->i_type = GID_TWOFINGERTAP;
79
var_SetInteger( vlc_object_instance(p_this), "key-action", ACTIONID_PLAY_PAUSE );
80
- bHandled = TRUE;
81
+ bHandled = true;
82
break;
83
case GID_ZOOM:
84
p_gesture->i_type = GID_ZOOM;
85
86
default:
87
msg_Err( p_this, "Unmanaged dwFlag: %lx", p_gi->dwFlags );
88
}
89
- bHandled = TRUE;
90
+ bHandled = true;
91
break;
92
case WM_VSCROLL:
93
- bHandled = TRUE;
94
+ bHandled = true;
95
break;
96
default:
97
break;
98
99
}
100
101
102
-static BOOL DecodeGestureProjection( vlc_object_t *p_this, win32_gesture_sys_t *p_gesture, const GESTUREINFO* p_gi )
103
+static bool DecodeGestureProjection( vlc_object_t *p_this, struct win32_gesture_sys_t *p_gesture, const GESTUREINFO* p_gi )
104
{
105
//vout_display_t *vd = (vout_display_t *)p_this;
106
107
- BOOL bHandled = FALSE; /* Needed to release the handle */
108
+ bool bHandled = false; /* Needed to release the handle */
109
switch ( p_gi->dwID )
110
{
111
case GID_BEGIN:
112
113
case GID_PAN:
114
//vd->cfg->display.width;
115
p_gesture->i_type = GID_PAN;
116
- bHandled = TRUE;
117
+ bHandled = true;
118
if (p_gi->dwFlags & GF_BEGIN) {
119
p_gesture->i_beginx = p_gi->ptsLocation.x;
120
p_gesture->i_beginy = p_gi->ptsLocation.y;
121
122
case GID_TWOFINGERTAP:
123
p_gesture->i_type = GID_TWOFINGERTAP;
124
var_SetInteger( vlc_object_instance(p_this), "key-action", ACTIONID_PLAY_PAUSE );
125
- bHandled = TRUE;
126
+ bHandled = true;
127
break;
128
case GID_ZOOM:
129
p_gesture->i_type = GID_ZOOM;
130
- bHandled = TRUE;
131
+ bHandled = true;
132
switch( p_gi->dwFlags )
133
{
134
case GF_BEGIN:
135
136
}
137
break;
138
case WM_VSCROLL:
139
- bHandled = TRUE;
140
+ bHandled = true;
141
break;
142
default:
143
break;
144
145
return bHandled;
146
}
147
148
-BOOL InitGestures( HWND hwnd, win32_gesture_sys_t **pp_gesture, bool b_isProjected )
149
+bool DecodeGesture( vlc_object_t *p_this, struct win32_gesture_sys_t *p_gesture,
150
+ HGESTUREINFO hGestureInfo )
151
+{
152
+ if( !p_gesture )
153
+ return false;
154
+
155
+ GESTUREINFO gi;
156
+ ZeroMemory( &gi, sizeof( GESTUREINFO ) );
157
+ gi.cbSize = sizeof( GESTUREINFO );
158
+
159
+ if( GetGestureInfo(hGestureInfo, &gi) )
160
+ {
161
+ if( p_gesture->DecodeGestureImpl(p_this, p_gesture, &gi) )
162
+ {
163
+ /* Close the Handle, if we handled the gesture, a contrario
164
+ * from the doc example */
165
+ CloseGestureInfoHandle(hGestureInfo);
166
+ return true;
167
+ }
168
+ }
169
+ else
170
+ {
171
+ DWORD dwErr = GetLastError();
172
+ if( dwErr > 0 )
173
+ msg_Err( p_this, "Could not retrieve a valid GESTUREINFO structure" );
174
+ }
175
+
176
+ return false;
177
+}
178
+
179
+struct win32_gesture_sys_t *InitGestures( HWND hwnd, bool b_isProjected )
180
{
181
BOOL result = FALSE;
182
GESTURECONFIG config = { 0, 0, 0 };
183
184
config.dwBlock = GC_PAN_WITH_INERTIA;
185
}
186
187
- win32_gesture_sys_t *p_gesture = malloc( sizeof(win32_gesture_sys_t) );
188
- if( !p_gesture )
189
- {
190
- *pp_gesture = NULL;
191
- return FALSE;
192
- }
193
-
194
- HINSTANCE h_user32_dll = LoadLibrary(TEXT("user32.dll"));
195
- if( !h_user32_dll )
196
- {
197
- *pp_gesture = NULL;
198
- free( p_gesture );
199
- return FALSE;
200
- }
201
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_output/win32/win32touch.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/win32/win32touch.h
Changed
46
1
2
extern "C" {
3
#endif
4
5
-enum {
6
- GESTURE_ACTION_UNDEFINED = 0,
7
- GESTURE_ACTION_VOLUME,
8
- GESTURE_ACTION_JUMP,
9
- GESTURE_ACTION_BRIGHTNESS
10
-};
11
+struct win32_gesture_sys_t;
12
13
+struct win32_gesture_sys_t *InitGestures( HWND hwnd, bool b_isProjected );
14
15
-typedef struct win32_gesture_sys_t {
16
- DWORD i_type; /* Gesture ID */
17
- int i_action; /* GESTURE_ACTION */
18
+bool DecodeGesture( vlc_object_t *, struct win32_gesture_sys_t *, HGESTUREINFO );
19
20
- int i_beginx; /* Start X position */
21
- int i_beginy; /* Start Y position */
22
- int i_lasty; /* Last known Y position for PAN */
23
- double f_lastzoom; /* Last zoom factor */
24
-
25
- ULONGLONG i_ullArguments; /* Base values to compare between 2 zoom gestures */
26
- bool b_2fingers; /* Did we detect 2 fingers? */
27
-
28
- BOOL (*DecodeGestureImpl)( vlc_object_t *p_this, struct win32_gesture_sys_t *p_gesture, const GESTUREINFO* p_gi );
29
-
30
- HINSTANCE huser_dll; /* user32.dll */
31
- BOOL (WINAPI * OurCloseGestureInfoHandle)(HGESTUREINFO hGestureInfo);
32
- BOOL (WINAPI * OurGetGestureInfo)(HGESTUREINFO hGestureInfo, PGESTUREINFO pGestureInfo);
33
-} win32_gesture_sys_t;
34
-
35
-
36
-BOOL InitGestures( HWND hwnd, win32_gesture_sys_t **p_gesture, bool b_isProjected );
37
-
38
-LRESULT DecodeGesture( vlc_object_t *p_intf, win32_gesture_sys_t *p_gesture,
39
- HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam );
40
-
41
-void CloseGestures( win32_gesture_sys_t *p_gesture );
42
+void CloseGestures( struct win32_gesture_sys_t * );
43
44
#ifdef __cplusplus
45
}
46
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/modules/video_output/win32/wingdi.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/modules/video_output/win32/wingdi.c
Changed
79
1
2
*****************************************************************************/
3
typedef struct vout_display_sys_t
4
{
5
- vout_display_sys_win32_t sys;
6
display_win32_area_t area;
7
8
int i_depth;
9
10
static int Control(vout_display_t *vd, int query)
11
{
12
vout_display_sys_t *sys = vd->sys;
13
- CommonControl(vd, &sys->area, &sys->sys, query);
14
+ CommonControl(vd, &sys->area, query);
15
return VLC_SUCCESS;
16
}
17
18
19
if (!sys)
20
return VLC_ENOMEM;
21
22
- CommonInit(&sys->area);
23
- if (CommonWindowInit(vd, &sys->area, &sys->sys, false))
24
+ CommonInit(&sys->area, vd->source);
25
+ if (CommonWindowInit(vd, &sys->area, false))
26
goto error;
27
+ CommonPlacePicture(vd, &sys->area);
28
29
/* */
30
if (Init(vd, fmtp))
31
32
33
Clean(vd);
34
35
- CommonWindowClean(&sys->sys);
36
+ CommonWindowClean(&sys->area);
37
38
- free(vd->sys);
39
+ free(sys);
40
}
41
42
static void Display(vout_display_t *vd, picture_t *picture)
43
44
vout_display_sys_t *sys = vd->sys;
45
VLC_UNUSED(picture);
46
47
- HDC hdc = GetDC(sys->sys.hvideownd);
48
+ HDC hdc = GetDC(CommonVideoHWND(&sys->area));
49
50
if (sys->area.place_changed)
51
{
52
53
SRCCOPY);
54
}
55
56
- ReleaseDC(sys->sys.hvideownd, hdc);
57
+ ReleaseDC(CommonVideoHWND(&sys->area), hdc);
58
}
59
60
static int Init(vout_display_t *vd, video_format_t *fmt)
61
62
/* Initialize an offscreen bitmap for direct buffer operations. */
63
64
/* */
65
- HDC window_dc = GetDC(sys->sys.hvideownd);
66
+ HDC window_dc = GetDC(CommonVideoHWND(&sys->area));
67
68
/* */
69
sys->i_depth = GetDeviceCaps(window_dc, PLANES) *
70
71
sys->off_dc = CreateCompatibleDC(window_dc);
72
73
SelectObject(sys->off_dc, sys->off_bitmap);
74
- ReleaseDC(sys->sys.hvideownd, window_dc);
75
+ ReleaseDC(CommonVideoHWND(&sys->area), window_dc);
76
77
return VLC_SUCCESS;
78
}
79
_service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/po/meson.build
Added
20
1
2
+i18n = import('i18n')
3
+
4
+add_project_arguments(f'-DGETTEXT_PACKAGE="@vlc_package_name@"',
5
+ language: 'c', 'cpp', 'objc')
6
+i18n.gettext(vlc_package_name,
7
+ args:
8
+ '--keyword=_',
9
+ '--keyword=N_',
10
+ '--keyword=_NS',
11
+ '--keyword=qtr',
12
+ '--keyword=Q_',
13
+ '--language=C++',
14
+ '--keyword=vlc_ngettext:1,2',
15
+ '--keyword=vlc_pgettext:1c,2',
16
+ '--keyword=_PNS:1c,2',
17
+ '--add-comments=xgettext:',
18
+ '--from-code=UTF-8',
19
+ )
20
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/src/Makefile.am -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/src/Makefile.am
Changed
17
1
2
../include/vlc_playlist_export.h \
3
../include/vlc_plugin.h \
4
../include/vlc_probe.h \
5
+ ../include/vlc_preparser.h \
6
../include/vlc_queue.h \
7
../include/vlc_rand.h \
8
../include/vlc_renderer_discovery.h \
9
10
preparser/fetcher.c \
11
preparser/fetcher.h \
12
preparser/preparser.c \
13
- preparser/preparser.h \
14
input/item.c \
15
input/access.c \
16
clock/clock_internal.c \
17
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/src/input/decoder.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/src/input/decoder.c
Changed
10
1
2
/* The decoder's main loop */
3
vlc_fifo_Lock( p_owner->p_fifo );
4
5
- while( !p_owner->aborting )
6
+ while( !p_owner->aborting || p_owner->flushing )
7
{
8
if( p_owner->flushing )
9
{ /* Flush before/regardless of pause. We do not want to resume just
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/src/input/es_out.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/src/input/es_out.c
Changed
10
1
2
}
3
free( psz_alloc );
4
5
- input_item_SetPreparsed( p_item, true );
6
+ input_item_SetPreparsed( p_item );
7
8
input_SendEventMeta( p_input );
9
/* TODO handle sout meta ? */
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/src/input/input.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/src/input/input.c
Changed
33
1
2
}
3
}
4
5
+int input_SetEsCatDelay(input_thread_t *input, enum es_format_category_e cat,
6
+ vlc_tick_t delay)
7
+{
8
+ input_thread_private_t *sys = input_priv(input);
9
+ /* A failure can only happen in the input_ControlPush section. */
10
+ int ret = VLC_SUCCESS;
11
+
12
+ if (!sys->is_running && !sys->is_stopped)
13
+ {
14
+ /* Not running, send the control synchronously since we are sure that
15
+ * it won't block */
16
+ es_out_SetDelay(sys->p_es_out_display, cat, delay);
17
+ }
18
+ else
19
+ {
20
+ const input_control_param_t param = {
21
+ .cat_delay = { cat, delay }
22
+ };
23
+ ret = input_ControlPush(input, INPUT_CONTROL_SET_CATEGORY_DELAY,
24
+ ¶m);
25
+ }
26
+
27
+ return ret;
28
+}
29
+
30
void input_SetEsCatIds(input_thread_t *input, enum es_format_category_e cat,
31
const char *str_ids)
32
{
33
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/src/input/input_interface.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/src/input/input_interface.h
Changed
10
1
2
/**********************************************************************
3
* Item metadata
4
**********************************************************************/
5
-void input_item_SetPreparsed( input_item_t *p_i, bool b_preparsed );
6
+void input_item_SetPreparsed( input_item_t *p_i );
7
void input_item_SetArtNotFound( input_item_t *p_i, bool b_not_found );
8
void input_item_SetArtFetched( input_item_t *p_i, bool b_art_fetched );
9
void input_item_SetEpg( input_item_t *p_item, const vlc_epg_t *p_epg, bool );
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/src/input/input_internal.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/src/input/input_internal.h
Changed
28
1
2
void input_SetProgramId(input_thread_t *input, int group_id);
3
4
/**
5
+ * Set the default delay applied to the given category.
6
+ *
7
+ * Set the default delay for the given \p es_format_category_e synchronously
8
+ * if the input is not running yet, otherwise push a control to signal to the
9
+ * input which delay should be updated.
10
+ *
11
+ * @param input Any input to change the delay for.
12
+ * @param cat The ES category to apply the delay to.
13
+ * @param delay The delay to apply to the category, a positive delay shifting
14
+ * the track to the future.
15
+ * @return VLC_SUCCESS when the delay has been applied, or signal an error
16
+ * otherwise.
17
+ *
18
+ * @note This function can be called before start or while running.
19
+ * @note This function is not thread-safe, the caller should handle the locking.
20
+ */
21
+int input_SetEsCatDelay(input_thread_t *input, enum es_format_category_e cat,
22
+ vlc_tick_t delay);
23
+
24
+/**
25
* Set the list of string ids to enable for a category
26
*
27
* cf. ES_OUT_SET_ES_CAT_IDS
28
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/src/input/item.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/src/input/item.c
Changed
22
1
2
.u.input_item_error_when_reading_changed.new_value = b_error } );
3
}
4
}
5
-void input_item_SetPreparsed( input_item_t *p_i, bool b_preparsed )
6
+void input_item_SetPreparsed( input_item_t *p_i )
7
{
8
bool b_send_event = false;
9
10
vlc_mutex_lock( &p_i->lock );
11
12
int status = vlc_meta_GetStatus(p_i->p_meta);
13
- int new_status;
14
- if( b_preparsed )
15
- new_status = status | ITEM_PREPARSED;
16
- else
17
- new_status = status & ~ITEM_PREPARSED;
18
+ int new_status = status | ITEM_PREPARSED;
19
if( status != new_status )
20
{
21
vlc_meta_SetStatus(p_i->p_meta, new_status);
22
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/src/libvlc.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/src/libvlc.c
Changed
102
1
2
#endif
3
4
#include <vlc_common.h>
5
+#include <vlc_preparser.h>
6
#include "../lib/libvlc_internal.h"
7
8
#include "modules/modules.h"
9
#include "config/configuration.h"
10
-#include "preparser/preparser.h"
11
#include "media_source/media_source.h"
12
13
#include <stdio.h> /* sprintf() */
14
15
/*
16
* Meta data handling
17
*/
18
- priv->parser = input_preparser_New(VLC_OBJECT(p_libvlc));
19
+ priv->parser = vlc_preparser_New(VLC_OBJECT(p_libvlc));
20
if( !priv->parser )
21
goto error;
22
23
24
libvlc_priv_t *priv = libvlc_priv (p_libvlc);
25
26
if (priv->parser != NULL)
27
- input_preparser_Deactivate(priv->parser);
28
+ vlc_preparser_Deactivate(priv->parser);
29
30
/* Ask the interfaces to stop and destroy them */
31
msg_Dbg( p_libvlc, "removing all interfaces" );
32
33
#endif
34
35
if (priv->parser != NULL)
36
- input_preparser_Delete(priv->parser);
37
+ vlc_preparser_Delete(priv->parser);
38
39
if (priv->main_playlist)
40
vlc_playlist_Delete(priv->main_playlist);
41
42
43
int vlc_MetadataRequest(libvlc_int_t *libvlc, input_item_t *item,
44
input_item_meta_request_option_t i_options,
45
- const input_preparser_callbacks_t *cbs,
46
+ const struct vlc_metadata_cbs *cbs,
47
void *cbs_userdata,
48
int timeout, void *id)
49
{
50
51
if (unlikely(priv->parser == NULL))
52
return VLC_ENOMEM;
53
54
- return input_preparser_Push( priv->parser, item, i_options, cbs,
55
+ return vlc_preparser_Push( priv->parser, item, i_options, cbs,
56
cbs_userdata, timeout, id );
57
}
58
59
60
*/
61
int libvlc_MetadataRequest(libvlc_int_t *libvlc, input_item_t *item,
62
input_item_meta_request_option_t i_options,
63
- const input_preparser_callbacks_t *cbs,
64
+ const struct vlc_metadata_cbs *cbs,
65
void *cbs_userdata,
66
int timeout, void *id)
67
{
68
69
}
70
71
/**
72
- * Requests retrieving/downloading art for an input item.
73
- * The retrieval is performed asynchronously.
74
- */
75
-int libvlc_ArtRequest(libvlc_int_t *libvlc, input_item_t *item,
76
- input_item_meta_request_option_t i_options,
77
- const input_fetcher_callbacks_t *cbs,
78
- void *cbs_userdata)
79
-{
80
- libvlc_priv_t *priv = libvlc_priv(libvlc);
81
- assert(i_options & META_REQUEST_OPTION_FETCH_ANY);
82
-
83
- if (unlikely(priv->parser == NULL))
84
- return VLC_ENOMEM;
85
-
86
- input_preparser_fetcher_Push(priv->parser, item, i_options,
87
- cbs, cbs_userdata);
88
- return VLC_SUCCESS;
89
-}
90
-
91
-/**
92
* Cancels extraction of the meta data for an input item.
93
*
94
* This does nothing if the input item is already processed or if it was not
95
96
if (unlikely(priv->parser == NULL))
97
return;
98
99
- input_preparser_Cancel(priv->parser, id);
100
+ vlc_preparser_Cancel(priv->parser, id);
101
}
102
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/src/libvlc.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/src/libvlc.h
Changed
19
1
2
vlc_keystore *p_memory_keystore; ///< memory keystore
3
intf_thread_t *interfaces; ///< Linked-list of interfaces
4
vlc_playlist_t *main_playlist;
5
- struct input_preparser_t *parser; ///< Input item meta data handler
6
+ struct vlc_preparser_t *parser; ///< Input item meta data handler
7
vlc_media_source_provider_t *media_source_provider;
8
vlc_actions_t *actions; ///< Hotkeys handler
9
struct vlc_medialibrary_t *p_media_library; ///< Media library instance
10
11
12
int vlc_MetadataRequest(libvlc_int_t *libvlc, input_item_t *item,
13
input_item_meta_request_option_t i_options,
14
- const input_preparser_callbacks_t *cbs,
15
+ const struct vlc_metadata_cbs *cbs,
16
void *cbs_userdata,
17
int timeout, void *id);
18
19
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/src/libvlccore.sym -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/src/libvlccore.sym
Changed
26
1
2
vlc_frame_heap_Alloc
3
vlc_frame_Init
4
vlc_frame_mmap_Alloc
5
+vlc_frame_New
6
vlc_frame_shm_Alloc
7
vlc_frame_Realloc
8
vlc_frame_Release
9
10
libvlc_SetExitHandler
11
libvlc_MetadataRequest
12
libvlc_MetadataCancel
13
-libvlc_ArtRequest
14
vlc_UrlParse
15
vlc_UrlParseFixup
16
vlc_UrlClean
17
18
vlc_input_attachment_Release
19
vlc_input_attachment_New
20
vlc_input_attachment_Hold
21
+vlc_preparser_New
22
+vlc_preparser_Push
23
+vlc_preparser_Cancel
24
+vlc_preparser_Delete
25
+vlc_preparser_Deactivate
26
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/src/media_source/media_tree.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/src/media_source/media_tree.c
Changed
25
1
2
return true;
3
}
4
5
-static const input_preparser_callbacks_t input_preparser_callbacks = {
6
+static const struct vlc_metadata_cbs preparser_callbacks = {
7
.on_subtree_added = media_subtree_changed,
8
.on_preparse_ended = media_subtree_preparse_ended
9
};
10
11
VLC_UNUSED(libvlc);
12
VLC_UNUSED(media);
13
VLC_UNUSED(id);
14
- VLC_UNUSED(input_preparser_callbacks);
15
+ VLC_UNUSED(preparser_callbacks);
16
#else
17
media->i_preparse_depth = 1;
18
vlc_MetadataRequest(libvlc, media, META_REQUEST_OPTION_SCOPE_ANY |
19
META_REQUEST_OPTION_DO_INTERACT,
20
- &input_preparser_callbacks, tree, 0, id);
21
+ &preparser_callbacks, tree, 0, id);
22
#endif
23
}
24
25
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/src/meson.build -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/src/meson.build
Changed
9
1
2
'preparser/fetcher.c',
3
'preparser/fetcher.h',
4
'preparser/preparser.c',
5
- 'preparser/preparser.h',
6
'input/item.c',
7
'input/access.c',
8
'clock/clock_internal.c',
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/src/misc/fourcc.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/src/misc/fourcc.c
Changed
10
1
2
VLC_CODEC_NVDEC_OPAQUE_16B,
3
VLC_CODEC_NVDEC_OPAQUE_444,
4
VLC_CODEC_NVDEC_OPAQUE_444_16B,
5
+ VLC_CODEC_YUV420A,
6
+ VLC_CODEC_YUV422A,
7
0,
8
};
9
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/src/misc/fourcc_list.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/src/misc/fourcc_list.h
Changed
19
1
2
E("X263", "Xirlink H263"),
3
/* Zygo (partial) */
4
E("ZyGo", "ITU H263+"),
5
+ A("HAVI"),
6
7
/* H263i */
8
B(VLC_CODEC_H263I, "I263.I"),
9
10
B(VLC_CODEC_QDRAW, "Apple QuickDraw Video"),
11
A("qdrw"),
12
13
+ B(VLC_CODEC_QOI, "Quite OK Image Format"),
14
+ A("qoif"),
15
+
16
B(VLC_CODEC_QPEG, "QPEG Video"),
17
A("QPEG"),
18
A("Q1.0"),
19
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/src/misc/frame.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/src/misc/frame.c
Changed
167
1
2
dst->i_length = src->i_length;
3
}
4
5
+vlc_frame_t *vlc_frame_New(const struct vlc_frame_callbacks *cbs,
6
+ void *buf, size_t size)
7
+{
8
+ vlc_frame_t *f = malloc(sizeof (*f));
9
+ if (unlikely(f == NULL))
10
+ return NULL;
11
+
12
+ return vlc_frame_Init(f, cbs, buf, size);
13
+}
14
+
15
vlc_frame_t *vlc_frame_Init(vlc_frame_t *restrict f, const struct vlc_frame_callbacks *cbs,
16
void *buf, size_t size)
17
{
18
19
return f;
20
}
21
22
-static void vlc_frame_generic_Release (vlc_frame_t *frame)
23
-{
24
- /* That is always true for frames allocated with vlc_frame_Alloc(). */
25
- assert (frame->p_start == (unsigned char *)(frame + 1));
26
- free (frame);
27
-}
28
-
29
-static const struct vlc_frame_callbacks vlc_frame_generic_cbs =
30
-{
31
- vlc_frame_generic_Release,
32
-};
33
-
34
/** Initial memory alignment of data frame.
35
* @note This must be a multiple of sizeof(void*) and a power of two.
36
* libavcodec AVX optimizations require at least 32-bytes. */
37
38
return NULL;
39
}
40
41
+ static_assert ((VLC_FRAME_PADDING % VLC_FRAME_ALIGN) == 0,
42
+ "VLC_FRAME_PADDING must be a multiple of VLC_FRAME_ALIGN");
43
+
44
/* 2 * VLC_FRAME_PADDING: pre + post padding */
45
- const size_t alloc = sizeof (vlc_frame_t) + VLC_FRAME_ALIGN + (2 * VLC_FRAME_PADDING)
46
- + size;
47
- if (unlikely(alloc <= size))
48
+ size_t capacity = (2 * VLC_FRAME_PADDING) + size;
49
+ unsigned char *buf;
50
+#ifdef HAVE_ALIGNED_ALLOC
51
+ capacity += (-size) % VLC_FRAME_ALIGN;
52
+ buf = aligned_alloc(VLC_FRAME_ALIGN, capacity);
53
+#else
54
+ capacity += VLC_FRAME_ALIGN;
55
+ buf = malloc(capacity);
56
+#endif
57
+ if (unlikely(buf == NULL))
58
return NULL;
59
60
- vlc_frame_t *f = malloc (alloc);
61
- if (unlikely(f == NULL))
62
- return NULL;
63
+ vlc_frame_t *f = vlc_frame_heap_Alloc(buf, capacity);
64
+ if (likely(f != NULL)) {
65
+#ifndef HAVE_ALIGNED_ALLOC
66
+ /* Alignment */
67
+ buf += (-(uintptr_t)(void *)buf) % (uintptr_t)VLC_FRAME_ALIGN;
68
+#endif
69
+ /* Header reserve */
70
+ buf += VLC_FRAME_PADDING;
71
+ f->p_buffer = buf;
72
+ f->i_buffer = size;
73
+ }
74
75
- vlc_frame_Init(f, &vlc_frame_generic_cbs, f + 1, alloc - sizeof (*f));
76
- static_assert ((VLC_FRAME_PADDING % VLC_FRAME_ALIGN) == 0,
77
- "VLC_FRAME_PADDING must be a multiple of VLC_FRAME_ALIGN");
78
- f->p_buffer += VLC_FRAME_PADDING + VLC_FRAME_ALIGN - 1;
79
- f->p_buffer = (void *)(((uintptr_t)f->p_buffer) & ~(VLC_FRAME_ALIGN - 1));
80
- f->i_buffer = size;
81
return f;
82
}
83
84
85
86
vlc_frame_t *vlc_frame_heap_Alloc (void *addr, size_t length)
87
{
88
- vlc_frame_t *frame = malloc (sizeof (*frame));
89
- if (frame == NULL)
90
- {
91
- free (addr);
92
- return NULL;
93
- }
94
-
95
- return vlc_frame_Init(frame, &vlc_frame_heap_cbs, addr, length);
96
+ vlc_frame_t *frame = vlc_frame_New(&vlc_frame_heap_cbs, addr, length);
97
+ if (unlikely(frame == NULL))
98
+ free(addr);
99
+ return frame;
100
}
101
102
#ifdef HAVE_MMAP
103
104
long page_mask = sysconf(_SC_PAGESIZE) - 1;
105
size_t left = ((uintptr_t)addr) & page_mask;
106
size_t right = (-length) & page_mask;
107
-
108
- vlc_frame_t *frame = malloc (sizeof (*frame));
109
- if (frame == NULL)
110
- {
111
- munmap (addr, length);
112
- return NULL;
113
- }
114
-
115
- vlc_frame_Init(frame, &vlc_frame_mmap_cbs,
116
- ((char *)addr) - left, left + length + right);
117
- frame->p_buffer = addr;
118
- frame->i_buffer = length;
119
+ vlc_frame_t *frame = vlc_frame_New(&vlc_frame_mmap_cbs,
120
+ ((char *)addr) - left,
121
+ left + length + right);
122
+ if (likely(frame != NULL)) {
123
+ frame->p_buffer = addr;
124
+ frame->i_buffer = length;
125
+ } else
126
+ munmap(addr, length);
127
return frame;
128
}
129
#else
130
131
132
vlc_frame_t *vlc_frame_shm_Alloc (void *addr, size_t length)
133
{
134
- vlc_frame_t *frame = malloc (sizeof (*frame));
135
+ vlc_frame_t *frame = vlc_frame_New(&vlc_frame_shm_cbs, (uint8_t *)addr,
136
+ length);
137
if (unlikely(frame == NULL))
138
- {
139
- shmdt (addr);
140
- return NULL;
141
- }
142
-
143
- return vlc_frame_Init(frame, &vlc_frame_shm_cbs, (uint8_t *)addr, length);
144
+ shmdt(addr);
145
+ return frame;
146
}
147
#else
148
vlc_frame_t *vlc_frame_shm_Alloc (void *addr, size_t length)
149
150
vlc_frame_Release (frame);
151
frame = NULL;
152
errno = EIO;
153
- goto done;
154
}
155
+done:
156
#else // !_WIN32
157
for (size_t i = 0; i < length;)
158
{
159
160
i += len;
161
}
162
#endif // !_WIN32
163
-done:
164
vlc_cleanup_pop ();
165
return frame;
166
}
167
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/src/misc/image.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/src/misc/image.c
Changed
17
1
2
{ VLC_FOURCC('x','c','f',' '), "xcf" },
3
{ VLC_CODEC_PCX, "pcx" },
4
{ VLC_CODEC_GIF, "gif" },
5
+ { VLC_CODEC_QOI, "qoi" },
6
{ VLC_CODEC_SVG, "svg" },
7
{ VLC_CODEC_TIFF, "tif" },
8
{ VLC_CODEC_TIFF, "tiff" },
9
10
{ VLC_CODEC_BPG, "image/bpg" },
11
{ VLC_CODEC_PCX, "image/pcx" },
12
{ VLC_CODEC_PNG, "image/png" },
13
+ { VLC_CODEC_QOI, "image/qoi" },
14
{ VLC_CODEC_SVG, "image/svg+xml" },
15
{ VLC_CODEC_TIFF, "image/tiff" },
16
{ VLC_CODEC_TARGA, "image/x-tga" },
17
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/src/misc/mime.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/src/misc/mime.c
Changed
9
1
2
{ ".jpg", "image/jpeg" },
3
{ ".jpeg", "image/jpeg" },
4
{ ".png", "image/png" },
5
+ { ".qoi", "image/qoi" },
6
{ ".pct", "image/x-pict" },
7
/* same as modules/mux/mpjpeg.c here: */
8
{ ".mpjpeg","multipart/x-mixed-replace; boundary=7b3cc56e5f51db803f790dad720ed50a" },
9
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/src/player/input.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/src/player/input.c
Changed
15
1
2
input->cat_delaysi = cat_delaysi;
3
if (cat_delaysi != 0)
4
{
5
- const input_control_param_t param = {
6
- .cat_delay = { i, cat_delaysi }
7
- };
8
- int ret = input_ControlPush(input->thread,
9
- INPUT_CONTROL_SET_CATEGORY_DELAY,
10
- ¶m);
11
+ int ret = input_SetEsCatDelay(input->thread, i, cat_delaysi);
12
if (ret == VLC_SUCCESS)
13
vlc_player_SendEvent(player, on_category_delay_changed, i,
14
cat_delaysi);
15
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/src/player/player.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/src/player/player.c
Changed
12
1
2
delay = *cat_delay;
3
}
4
5
- const input_control_param_t param = { .cat_delay = { cat, delay } };
6
- int ret = input_ControlPush(input->thread, INPUT_CONTROL_SET_CATEGORY_DELAY,
7
- ¶m);
8
+ int ret = input_SetEsCatDelay(input->thread, cat, delay);
9
if (ret == VLC_SUCCESS)
10
{
11
vlc_player_osd_Message(player, _("%s delay: %i ms"),
12
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/src/playlist/preparse.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/src/playlist/preparse.c
Changed
26
1
2
vlc_playlist_Unlock(playlist);
3
}
4
5
-static const input_preparser_callbacks_t input_preparser_callbacks = {
6
+static const struct vlc_metadata_cbs preparser_callbacks = {
7
.on_preparse_ended = on_preparse_ended,
8
.on_subtree_added = on_subtree_added,
9
};
10
11
#ifdef TEST_PLAYLIST
12
VLC_UNUSED(playlist);
13
VLC_UNUSED(input);
14
- VLC_UNUSED(input_preparser_callbacks);
15
+ VLC_UNUSED(preparser_callbacks);
16
#else
17
/* vlc_MetadataRequest is not exported */
18
vlc_MetadataRequest(playlist->libvlc, input,
19
META_REQUEST_OPTION_SCOPE_LOCAL |
20
META_REQUEST_OPTION_FETCH_LOCAL,
21
- &input_preparser_callbacks, playlist, -1, NULL);
22
+ &preparser_callbacks, playlist, -1, NULL);
23
#endif
24
}
25
26
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/src/preparser/fetcher.h -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/src/preparser/fetcher.h
Changed
12
1
2
*/
3
typedef struct input_fetcher_t input_fetcher_t;
4
5
+typedef struct input_fetcher_callbacks_t {
6
+ void (*on_art_fetch_ended)(input_item_t *, bool fetched, void *userdata);
7
+} input_fetcher_callbacks_t;
8
+
9
/**
10
* This function creates the fetcher object and thread.
11
*/
12
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/src/preparser/preparser.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/src/preparser/preparser.c
Changed
201
1
2
#include <vlc_common.h>
3
#include <vlc_atomic.h>
4
#include <vlc_executor.h>
5
+#include <vlc_preparser.h>
6
7
#include "input/input_interface.h"
8
#include "input/input_internal.h"
9
-#include "preparser.h"
10
#include "fetcher.h"
11
12
-struct input_preparser_t
13
+struct vlc_preparser_t
14
{
15
vlc_object_t* owner;
16
input_fetcher_t* fetcher;
17
18
19
struct task
20
{
21
- input_preparser_t *preparser;
22
+ vlc_preparser_t *preparser;
23
input_item_t *item;
24
input_item_meta_request_option_t options;
25
- const input_preparser_callbacks_t *cbs;
26
+ const struct vlc_metadata_cbs *cbs;
27
void *userdata;
28
void *id;
29
vlc_tick_t timeout;
30
31
input_item_parser_id_t *parser;
32
33
vlc_sem_t preparse_ended;
34
- vlc_sem_t fetch_ended;
35
atomic_int preparse_status;
36
atomic_bool interrupted;
37
38
struct vlc_runnable runnable; /**< to be passed to the executor */
39
40
- struct vlc_list node; /**< node of input_preparser_t.submitted_tasks */
41
+ struct vlc_list node; /**< node of vlc_preparser_t.submitted_tasks */
42
};
43
44
static void RunnableRun(void *);
45
46
static struct task *
47
-TaskNew(input_preparser_t *preparser, input_item_t *item,
48
+TaskNew(vlc_preparser_t *preparser, input_item_t *item,
49
input_item_meta_request_option_t options,
50
- const input_preparser_callbacks_t *cbs, void *userdata,
51
+ const struct vlc_metadata_cbs *cbs, void *userdata,
52
void *id, vlc_tick_t timeout)
53
{
54
assert(timeout >= 0);
55
56
57
task->parser = NULL;
58
vlc_sem_init(&task->preparse_ended, 0);
59
- vlc_sem_init(&task->fetch_ended, 0);
60
atomic_init(&task->preparse_status, ITEM_PREPARSE_SKIPPED);
61
atomic_init(&task->interrupted, false);
62
63
64
}
65
66
static void
67
-PreparserAddTask(input_preparser_t *preparser, struct task *task)
68
+PreparserAddTask(vlc_preparser_t *preparser, struct task *task)
69
{
70
vlc_mutex_lock(&preparser->lock);
71
vlc_list_append(&task->node, &preparser->submitted_tasks);
72
73
}
74
75
static void
76
-PreparserRemoveTask(input_preparser_t *preparser, struct task *task)
77
+PreparserRemoveTask(vlc_preparser_t *preparser, struct task *task)
78
{
79
vlc_mutex_lock(&preparser->lock);
80
vlc_list_remove(&task->node);
81
82
}
83
84
static void
85
-NotifyPreparseEnded(struct task *task)
86
+NotifyPreparseEnded(struct task *task, bool art_fetched)
87
{
88
- if (task->cbs && task->cbs->on_preparse_ended) {
89
+ if (task->cbs == NULL)
90
+ return;
91
+
92
+ if (task->options & META_REQUEST_OPTION_FETCH_ANY
93
+ && task->cbs->on_art_fetch_ended)
94
+ task->cbs->on_art_fetch_ended(task->item, art_fetched,
95
+ task->userdata);
96
+
97
+ if (task->cbs->on_preparse_ended) {
98
int status = atomic_load_explicit(&task->preparse_status,
99
memory_order_relaxed);
100
task->cbs->on_preparse_ended(task->item, status, task->userdata);
101
102
103
struct task *task = userdata;
104
105
- vlc_sem_post(&task->fetch_ended);
106
+ if (!atomic_load(&task->interrupted))
107
+ input_item_SetPreparsed(task->item);
108
+
109
+ NotifyPreparseEnded(task, fetched);
110
+ TaskDelete(task);
111
}
112
113
static const input_fetcher_callbacks_t input_fetcher_callbacks = {
114
115
input_item_parser_id_Release(task->parser);
116
}
117
118
-static void
119
+static int
120
Fetch(struct task *task)
121
{
122
input_fetcher_t *fetcher = task->preparser->fetcher;
123
if (!fetcher || !(task->options & META_REQUEST_OPTION_FETCH_ANY))
124
- return;
125
-
126
- int ret =
127
- input_fetcher_Push(fetcher, task->item,
128
- task->options & META_REQUEST_OPTION_FETCH_ANY,
129
- &input_fetcher_callbacks, task);
130
- if (ret != VLC_SUCCESS)
131
- return;
132
+ return VLC_ENOENT;
133
134
- /* Wait until the end of fetching (fetching is not interruptible) */
135
- vlc_sem_wait(&task->fetch_ended);
136
+ return input_fetcher_Push(fetcher, task->item,
137
+ task->options & META_REQUEST_OPTION_FETCH_ANY,
138
+ &input_fetcher_callbacks, task);
139
}
140
141
static void
142
143
vlc_thread_set_name("vlc-run-prepars");
144
145
struct task *task = userdata;
146
+ vlc_preparser_t *preparser = task->preparser;
147
148
vlc_tick_t deadline = task->timeout ? vlc_tick_now() + task->timeout
149
: VLC_TICK_INVALID;
150
151
- if (atomic_load(&task->interrupted))
152
- goto end;
153
+ if (task->options & (META_REQUEST_OPTION_SCOPE_ANY|
154
+ META_REQUEST_OPTION_SCOPE_FORCED))
155
+ {
156
+ if (atomic_load(&task->interrupted))
157
+ {
158
+ PreparserRemoveTask(preparser, task);
159
+ goto end;
160
+ }
161
+
162
+ Parse(task, deadline);
163
+ }
164
165
- Parse(task, deadline);
166
+ PreparserRemoveTask(preparser, task);
167
168
if (atomic_load(&task->interrupted))
169
goto end;
170
171
- Fetch(task);
172
+ int ret = Fetch(task);
173
174
- if (atomic_load(&task->interrupted))
175
- goto end;
176
+ if (ret == VLC_SUCCESS)
177
+ return; /* Remove the task and notify from the fetcher callback */
178
179
- input_item_SetPreparsed(task->item, true);
180
+ if (!atomic_load(&task->interrupted))
181
+ input_item_SetPreparsed(task->item);
182
183
end:
184
- NotifyPreparseEnded(task);
185
- input_preparser_t *preparser = task->preparser;
186
- PreparserRemoveTask(preparser, task);
187
+ NotifyPreparseEnded(task, false);
188
TaskDelete(task);
189
}
190
191
192
vlc_sem_post(&task->preparse_ended);
193
}
194
195
-input_preparser_t* input_preparser_New( vlc_object_t *parent )
196
+vlc_preparser_t* vlc_preparser_New( vlc_object_t *parent )
197
{
198
- input_preparser_t* preparser = malloc( sizeof *preparser );
199
+ vlc_preparser_t* preparser = malloc( sizeof *preparser );
200
if (!preparser)
201
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/src/test/shared_data_ptr.cpp -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/src/test/shared_data_ptr.cpp
Changed
7
1
2
-#include <assert.h>
3
+#include <cassert>
4
#include <algorithm>
5
#include <random>
6
#include <vector>
7
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/src/win32/dirs.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/src/win32/dirs.c
Changed
11
1
2
#endif
3
#include <vlc_common.h>
4
5
-#ifdef __MINGW32__
6
-# include <w32api.h>
7
-#endif
8
#include <direct.h>
9
#include <shlobj.h>
10
11
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/test/libvlc/media.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/test/libvlc/media.c
Changed
10
1
2
3
vlc_sem_t sem;
4
vlc_sem_init (&sem, 0);
5
- const struct input_preparser_callbacks_t cbs = {
6
+ const struct vlc_metadata_cbs cbs = {
7
.on_preparse_ended = input_item_preparse_timeout,
8
};
9
i_ret = libvlc_MetadataRequest(vlc->p_libvlc_int, p_item,
10
_service:obs_scm:vlc-beta-20230331.181e91d001.obscpio/test/src/input/decoder/input_decoder.c -> _service:obs_scm:vlc-beta-20230421.8d930c5670.obscpio/test/src/input/decoder/input_decoder.c
Changed
12
1
2
static void DecoderFlush(decoder_t *dec)
3
{
4
struct input_decoder_scenario *scenario = &input_decoder_scenarioscurrent_scenario;
5
- assert(scenario->decoder_flush != NULL);
6
- return scenario->decoder_flush(dec);
7
+ if (scenario->decoder_flush != NULL)
8
+ scenario->decoder_flush(dec);
9
}
10
11
static void CloseDecoder(vlc_object_t *obj)
12
_service:obs_scm:vlc-beta.obsinfo
Changed
9
1
2
name: vlc-beta
3
-version: 20230331.181e91d001
4
-mtime: 1680257182
5
-commit: 181e91d00132d57205936d1cd6844b08756b0b4c
6
+version: 20230421.8d930c5670
7
+mtime: 1682043073
8
+commit: 8d930c56700387bddc399872c69ec88b4c0c6387
9
vlc-beta.rebase-changes.sh
Added
71
1
2
+#!/bin/bash
3
+set -e
4
+unset LANG
5
+unset ${!LC_*}
6
+read td < <(mktemp --directory --tmpdir=/dev/shm .XXX)
7
+trap "rm -rf '${td}'" EXIT
8
+#
9
+d_extract="${td}/e"
10
+d_old="${td}/o"
11
+d_new="${td}/n"
12
+#
13
+read vlc_beta_pkg < <(readlink -f "$1")
14
+read vlc_git < <(readlink -f "$2")
15
+#
16
+test -f "${vlc_git}/.git/config"
17
+test -f "${vlc_beta_pkg}/.osc/_package"
18
+read pkg < "$_"
19
+test "${pkg}" = 'vlc-beta'
20
+mkdir "${d_extract}" "${d_old}" "${d_new}"
21
+pushd "${vlc_beta_pkg}" > /dev/null
22
+for patch in *.patch
23
+do
24
+ sed '
25
+ /^---:blank:/d
26
+ /^+++:blank:/d
27
+ /^@@:blank:/d
28
+ ' < "${patch}" > "${d_old}/${patch}"
29
+done
30
+pushd "${vlc_git}" > /dev/null
31
+git --no-pager checkout master
32
+git --no-pager pull
33
+git --no-pager checkout vlc-beta
34
+git --no-pager rebase master
35
+git --no-pager format-patch --quiet --output-directory "${d_extract}" master..HEAD
36
+#
37
+sed -i -n '
38
+: sep
39
+n
40
+/^---$/b stat
41
+b sep
42
+: stat
43
+n
44
+/^$/b body
45
+b stat
46
+: body
47
+n
48
+/^diff:blank:\+--git:blank:\+/b body
49
+/^index:blank:\+0-9a-f\+/b body
50
+p
51
+b body
52
+' "${d_extract}"/*.patch
53
+pushd "${d_extract}" > /dev/null
54
+for patch in *.patch
55
+do
56
+ o="${patch}"
57
+ n="${patch#*-}"
58
+ mv "${o}" "${n}"
59
+ sed '
60
+ /^---:blank:/d
61
+ /^+++:blank:/d
62
+ /^@@:blank:/d
63
+ ' < "${n}" > "${d_new}/${n}"
64
+ if diff -u "${d_old}/${n}" "${d_new}/${n}"
65
+ then
66
+ rm "${n}"
67
+ else
68
+ mv -vit "${vlc_beta_pkg}" "${n}"
69
+ fi
70
+done
71