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 114
_service:obs_scm:vlc-beta-20211123.aaff6519b2.obscpio/contrib/src/taglib/0001-use-SetFilePointerEx-instead-of-SetFilePointer.patch
Deleted
x
1
2
-From d27cc3568c2c04e86a8ec6e29fcdf7e3814b0596 Mon Sep 17 00:00:00 2001
3
-From: Steve Lhomme <robux4@ycbcr.xyz>
4
-Date: Fri, 15 May 2020 09:25:40 +0200
5
-Subject: [PATCH 1/3] use SetFilePointerEx instead of SetFilePointer
6
-
7
-It's available on more Win10 versions with UCRT builds and provides the same
8
-features. The API is available since Windows XP.
9
----
10
- taglib/toolkit/tfilestream.cpp | 8 ++++++--
11
- 1 file changed, 6 insertions(+), 2 deletions(-)
12
-
13
-diff --git a/taglib/toolkit/tfilestream.cpp b/taglib/toolkit/tfilestream.cpp
14
-index 5205bae0..4b448271 100644
15
---- a/taglib/toolkit/tfilestream.cpp
16
-+++ b/taglib/toolkit/tfilestream.cpp
17
-@@ -364,7 +364,9 @@ void FileStream::seek(long offset, Position p)
18
- }
19
-
20
- SetLastError(NO_ERROR);
21
-- SetFilePointer(d->file, offset, NULL, whence);
22
-+ LARGE_INTEGER lOffset;
23
-+ lOffset.QuadPart = offset;
24
-+ SetFilePointerEx(d->file, lOffset, NULL, whence);
25
-
26
- const int lastError = GetLastError();
27
- if(lastError != NO_ERROR && lastError != ERROR_NEGATIVE_SEEK)
28
-@@ -411,7 +413,9 @@ long FileStream::tell() const
29
- #ifdef _WIN32
30
-
31
- SetLastError(NO_ERROR);
32
-- const DWORD position = SetFilePointer(d->file, 0, NULL, FILE_CURRENT);
33
-+ LARGE_INTEGER lOffset;
34
-+ lOffset.QuadPart = 0;
35
-+ const DWORD position = SetFilePointerEx(d->file, lOffset, NULL, FILE_CURRENT);
36
- if(GetLastError() == NO_ERROR) {
37
- return static_cast<long>(position);
38
- }
39
---
40
-2.26.0.windows.1
41
-
42
_service:obs_scm:vlc-beta-20211123.aaff6519b2.obscpio/contrib/src/taglib/0002-use-GetFileInformationByHandleEx-on-newer-builds-of-.patch
Deleted
41
1
2
-From 9c02a2c245bed1d70dbd80b0e63abbcdecb74761 Mon Sep 17 00:00:00 2001
3
-From: Steve Lhomme <robux4@ycbcr.xyz>
4
-Date: Fri, 15 May 2020 09:29:55 +0200
5
-Subject: [PATCH 2/3] use GetFileInformationByHandleEx on newer builds of
6
- Windows
7
-
8
-It's available since Vista and UWP builds that don't have GetFileSize.
9
-
10
-See https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis
11
----
12
- taglib/toolkit/tfilestream.cpp | 8 ++++++++
13
- 1 file changed, 8 insertions(+)
14
-
15
-diff --git a/taglib/toolkit/tfilestream.cpp b/taglib/toolkit/tfilestream.cpp
16
-index 4b448271..ad4443ea 100644
17
---- a/taglib/toolkit/tfilestream.cpp
18
-+++ b/taglib/toolkit/tfilestream.cpp
19
-@@ -441,10 +441,18 @@ long FileStream::length()
20
- #ifdef _WIN32
21
-
22
- SetLastError(NO_ERROR);
23
-+#if _WIN32_WINNT < _WIN32_WINNT_VISTA
24
- const DWORD fileSize = GetFileSize(d->file, NULL);
25
- if(GetLastError() == NO_ERROR) {
26
- return static_cast<long>(fileSize);
27
- }
28
-+#else // _WIN32_WINNT_VISTA
29
-+ FILE_STANDARD_INFO fStdInfo;
30
-+ BOOL success = GetFileInformationByHandleEx(d->file, FileStandardInfo, (LPVOID)&fStdInfo, sizeof(FILE_STANDARD_INFO));
31
-+ if(success) {
32
-+ return static_cast<long>(fStdInfo.EndOfFile.LowPart);
33
-+ }
34
-+#endif // _WIN32_WINNT_VISTA
35
- else {
36
- debug("FileStream::length() -- Failed to get the file size.");
37
- return 0;
38
---
39
-2.26.0.windows.1
40
-
41
_service:obs_scm:vlc-beta-20211123.aaff6519b2.obscpio/contrib/src/taglib/0003-don-t-use-CreateFile-in-UWP-builds.patch
Deleted
45
1
2
-From a9024bd18ce20653616e04702b5e220de56b6b2c Mon Sep 17 00:00:00 2001
3
-From: Steve Lhomme <robux4@ycbcr.xyz>
4
-Date: Fri, 15 May 2020 09:32:21 +0200
5
-Subject: [PATCH 3/3] don't use CreateFile in UWP builds
6
-
7
-CreateFile2 is available for such builds with more internal restrictions.
8
-
9
-See https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis
10
-https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfile2
11
----
12
- taglib/toolkit/tfilestream.cpp | 13 +++++++++++++
13
- 1 file changed, 13 insertions(+)
14
-
15
-diff --git a/taglib/toolkit/tfilestream.cpp b/taglib/toolkit/tfilestream.cpp
16
-index ad4443ea..10cd8d56 100644
17
---- a/taglib/toolkit/tfilestream.cpp
18
-+++ b/taglib/toolkit/tfilestream.cpp
19
-@@ -52,9 +52,22 @@ namespace
20
- const DWORD access = readOnly ? GENERIC_READ : (GENERIC_READ | GENERIC_WRITE);
21
-
22
- if(!path.wstr().empty())
23
-+#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
24
-+ {
25
-+ CREATEFILE2_EXTENDED_PARAMETERS createExParams;
26
-+ createExParams.dwSize = sizeof(createExParams);
27
-+ createExParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL;
28
-+ createExParams.dwFileFlags = 0;
29
-+ createExParams.dwSecurityQosFlags = 0;
30
-+ createExParams.lpSecurityAttributes = NULL;
31
-+ createExParams.hTemplateFile = NULL;
32
-+ return CreateFile2(path.wstr().c_str(), access, FILE_SHARE_READ, OPEN_EXISTING, &createExParams);
33
-+ }
34
-+#else // WINAPI_PARTITION_DESKTOP
35
- return CreateFileW(path.wstr().c_str(), access, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
36
- else if(!path.str().empty())
37
- return CreateFileA(path.str().c_str(), access, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
38
-+#endif // WINAPI_PARTITION_DESKTOP
39
- else
40
- return InvalidFileHandle;
41
- }
42
---
43
-2.26.0.windows.1
44
-
45
_service:obs_scm:vlc-beta-20211123.aaff6519b2.obscpio/contrib/src/taglib/use_resolvers_on_streams.patch
Deleted
46
1
2
-From e648e07b7ebc4a1254a8673388c8f578fedf62a6 Mon Sep 17 00:00:00 2001
3
-From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
4
-Date: Mon, 18 Mar 2019 15:57:28 +0100
5
-Subject: [PATCH] fileref: Use user defined resolvers with IOStream
6
-
7
----
8
- taglib/fileref.cpp | 14 +++++++-------
9
- 1 file changed, 7 insertions(+), 7 deletions(-)
10
-
11
-diff --git a/taglib/fileref.cpp b/taglib/fileref.cpp
12
-index 3a7f2c65..b0369a0c 100644
13
---- a/taglib/fileref.cpp
14
-+++ b/taglib/fileref.cpp
15
-@@ -88,13 +88,6 @@ namespace
16
- return 0;
17
- }
18
-
19
-- template <>
20
-- File *resolveFileType<IOStream *>(IOStream *arg, bool readProperties,
21
-- AudioProperties::ReadStyle style)
22
-- {
23
-- return 0;
24
-- }
25
--
26
- template <>
27
- File *resolveFileType<FileName>(FileName arg, bool readProperties,
28
- AudioProperties::ReadStyle style)
29
-@@ -109,6 +102,13 @@ namespace
30
- return 0;
31
- }
32
-
33
-+ template <>
34
-+ File *resolveFileType<IOStream *>(IOStream *arg, bool readProperties,
35
-+ AudioProperties::ReadStyle style)
36
-+ {
37
-+ return resolveFileType(arg->name(), readProperties, style);
38
-+ }
39
-+
40
- template <typename T>
41
- File* createInternal(T arg, bool readAudioProperties,
42
- AudioProperties::ReadStyle audioPropertiesStyle)
43
---
44
-2.20.1
45
-
46
_service:obs_scm:vlc-beta-20211123.aaff6519b2.obscpio/contrib/src/taglib/0001-Implement-ID3v2-readStyle-avoid-worst-case.patch -> _service:obs_scm:vlc-beta-20211125.7195529927.obscpio/contrib/src/taglib/0001-Implement-ID3v2-readStyle-avoid-worst-case.patch
Changed
118
1
2
-From 94b8f426233e87c0b3783b743ad5e3ed458147b1 Mon Sep 17 00:00:00 2001
3
+From be17e6084a151c901c3946ec7b37afabc3b84f5f Mon Sep 17 00:00:00 2001
4
From: Francois Cartegnie <fcvlcdev@free.fr>
5
Date: Tue, 11 Aug 2020 10:53:31 +0200
6
Subject: [PATCH] Implement ID3v2 readStyle, avoid worst case
7
8
3 files changed, 24 insertions(+), 14 deletions(-)
9
10
diff --git a/taglib/mpeg/mpegfile.cpp b/taglib/mpeg/mpegfile.cpp
11
-index af7253fa..59443027 100644
12
+index 5f14e49d..30124e0d 100644
13
--- a/taglib/mpeg/mpegfile.cpp
14
+++ b/taglib/mpeg/mpegfile.cpp
15
-@@ -80,30 +80,31 @@ public:
16
+@@ -132,30 +132,31 @@ bool MPEG::File::isSupported(IOStream *stream)
17
// public members
18
////////////////////////////////////////////////////////////////////////////////
19
20
21
}
22
23
MPEG::File::~File()
24
-@@ -441,11 +442,11 @@ bool MPEG::File::hasAPETag() const
25
+@@ -498,11 +499,11 @@ bool MPEG::File::hasAPETag() const
26
// private members
27
////////////////////////////////////////////////////////////////////////////////
28
29
30
31
if(d->ID3v2Location >= 0) {
32
d->tag.set(ID3v2Index, new ID3v2::Tag(this, d->ID3v2Location, d->ID3v2FrameFactory));
33
-@@ -478,7 +479,7 @@ void MPEG::File::read(bool readProperties)
34
+@@ -535,7 +536,7 @@ void MPEG::File::read(bool readProperties)
35
ID3v1Tag(true);
36
}
37
38
39
{
40
if(!isValid())
41
return -1;
42
-@@ -499,6 +500,9 @@ long MPEG::File::findID3v2()
43
- if(firstSyncByte(data[0]) && secondSynchByte(data[1]))
44
- return -1;
45
+@@ -558,6 +559,9 @@ long MPEG::File::findID3v2()
46
+ ByteVector tagHeaderBytes(3, '\0');
47
+ long position = 0;
48
49
-+ if(readStyle < Properties::ReadStyle::Accurate)
50
++ if(readStyle < Properties::Accurate)
51
+ return -1;
52
+
53
- // Look for the entire file, if neither an MEPG frame or ID3v2 tag was found
54
- // at the beginning of the file.
55
- // We don't care about the inefficiency of the code, since this is a seldom case.
56
+ while(true) {
57
+ seek(position);
58
+ const ByteVector buffer = readBlock(bufferSize());
59
diff --git a/taglib/mpeg/mpegfile.h b/taglib/mpeg/mpegfile.h
60
-index e9e97387..fb04c625 100644
61
+index 3fcb7272..22a282d9 100644
62
--- a/taglib/mpeg/mpegfile.h
63
+++ b/taglib/mpeg/mpegfile.h
64
-@@ -74,7 +74,8 @@ namespace TagLib {
65
+@@ -76,7 +76,8 @@ namespace TagLib {
66
* Constructs an MPEG file from \a file. If \a readProperties is true the
67
* file's audio properties will also be read.
68
*
69
70
*
71
* \deprecated This constructor will be dropped in favor of the one below
72
* in a future version.
73
-@@ -89,7 +90,8 @@ namespace TagLib {
74
+@@ -91,7 +92,8 @@ namespace TagLib {
75
* If this file contains and ID3v2 tag the frames will be created using
76
* \a frameFactory.
77
*
78
79
*/
80
// BIC: merge with the above constructor
81
File(FileName file, ID3v2::FrameFactory *frameFactory,
82
-@@ -106,7 +108,8 @@ namespace TagLib {
83
+@@ -108,7 +110,8 @@ namespace TagLib {
84
* If this file contains and ID3v2 tag the frames will be created using
85
* \a frameFactory.
86
*
87
88
*/
89
File(IOStream *stream, ID3v2::FrameFactory *frameFactory,
90
bool readProperties = true,
91
-@@ -374,8 +377,8 @@ namespace TagLib {
92
+@@ -375,8 +378,8 @@ namespace TagLib {
93
File(const File &);
94
File &operator=(const File &);
95
96
97
class FilePrivate;
98
FilePrivate *d;
99
diff --git a/taglib/toolkit/taglib.h b/taglib/toolkit/taglib.h
100
-index bd4886bd..dfabe3d4 100644
101
+index ffce61f7..38fee5d1 100644
102
--- a/taglib/toolkit/taglib.h
103
+++ b/taglib/toolkit/taglib.h
104
-@@ -44,6 +44,9 @@
105
- #define TAGLIB_CONSTRUCT_BITSET(x) static_cast<unsigned long>(x)
106
+@@ -54,6 +54,9 @@
107
+ #define TAGLIB_DEPRECATED
108
#endif
109
110
+/* VLC Specific patches implementations */
111
112
113
//! A namespace for all TagLib related classes and functions
114
--
115
-2.25.4
116
+2.33.0
117
118
_service:obs_scm:vlc-beta-20211123.aaff6519b2.obscpio/contrib/src/taglib/SHA512SUMS -> _service:obs_scm:vlc-beta-20211125.7195529927.obscpio/contrib/src/taglib/SHA512SUMS
Changed
4
1
2
-7846775c4954ea948fe4383e514ba7c11f55d038ee06b6ea5a0a1c1069044b348026e76b27aa4ba1c71539aa8143e1401fab39184cc6e915ba0ae2c06133cb98 taglib-1.11.1.tar.gz
3
+7e369faa5e3c6c6401052b7a19e35b0cf8c1e5ed9597053ac731a7718791d5d4803d1b18a93e903ec8c3fc6cb92e34d9616daa2ae4d326965d4c4d5624dcdaba taglib-1.12.tar.gz
4
_service:obs_scm:vlc-beta-20211123.aaff6519b2.obscpio/contrib/src/taglib/rules.mak -> _service:obs_scm:vlc-beta-20211125.7195529927.obscpio/contrib/src/taglib/rules.mak
Changed
20
1
2
# TagLib
3
4
-TAGLIB_VERSION := 1.11.1
5
+TAGLIB_VERSION := 1.12
6
TAGLIB_URL := https://taglib.org/releases/taglib-$(TAGLIB_VERSION).tar.gz
7
8
PKGS += taglib
9
10
11
taglib: taglib-$(TAGLIB_VERSION).tar.gz .sum-taglib
12
$(UNPACK)
13
- $(APPLY) $(SRC)/taglib/0001-use-SetFilePointerEx-instead-of-SetFilePointer.patch
14
- $(APPLY) $(SRC)/taglib/0002-use-GetFileInformationByHandleEx-on-newer-builds-of-.patch
15
- $(APPLY) $(SRC)/taglib/0003-don-t-use-CreateFile-in-UWP-builds.patch
16
- $(APPLY) $(SRC)/taglib/use_resolvers_on_streams.patch
17
$(APPLY) $(SRC)/taglib/0001-Implement-ID3v2-readStyle-avoid-worst-case.patch
18
$(MOVE)
19
20
_service:obs_scm:vlc-beta-20211123.aaff6519b2.obscpio/modules/access/rtp/Makefile.am -> _service:obs_scm:vlc-beta-20211125.7195529927.obscpio/modules/access/rtp/Makefile.am
Changed
13
1
2
librtp_plugin_la_LIBADD += libvlc_srtp.la $(GCRYPT_LIBS)
3
librtp_plugin_la_DEPENDENCIES += libvlc_srtp.la
4
endif
5
+
6
+# RTP payload parser plugins
7
+rtpparsedir = $(accessdir)/rtp
8
+rtpparse_LTLIBRARIES = \
9
+ librtp_pcm_plugin.la
10
+
11
+librtp_pcm_plugin_la_SOURCES = access/rtp/pcm.c
12
+librtp_pcm_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/access/rtp
13
_service:obs_scm:vlc-beta-20211125.7195529927.obscpio/modules/access/rtp/pcm.c
Added
201
1
2
+/**
3
+ * @file pcm.c
4
+ * @brief Real-Time Protocol (RTP) linear and logarithmic audio
5
+ */
6
+/*****************************************************************************
7
+ * Copyright © 2021 Rémi Denis-Courmont
8
+ *
9
+ * This library is free software; you can redistribute it and/or
10
+ * modify it under the terms of the GNU Lesser General Public License
11
+ * as published by the Free Software Foundation; either version 2.1
12
+ * of the License, or (at your option) any later version.
13
+ *
14
+ * This library 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
20
+ * License along with this library; if not, write to the Free Software
21
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22
+ ****************************************************************************/
23
+
24
+#ifdef HAVE_CONFIG_H
25
+# include <config.h>
26
+#endif
27
+#include <assert.h>
28
+#include <stdint.h>
29
+#include <stdlib.h>
30
+
31
+#include <vlc_common.h>
32
+#include <vlc_aout.h>
33
+#include <vlc_block.h>
34
+#include <vlc_es.h>
35
+#include <vlc_plugin.h>
36
+#include <vlc_strings.h>
37
+
38
+#include "rtp.h"
39
+#define RTP_MAX_CHANS 6
40
+
41
+struct rtp_pcm {
42
+ vlc_fourcc_t fourcc;
43
+ uint16_t channel_mask;
44
+ uint8_t sample_bits;
45
+ uint8_t channel_count;
46
+ bool channel_reorder;
47
+ uint8_t channel_map[RTP_MAX_CHANS];
48
+};
49
+
50
+static void *rtp_pcm_init(struct vlc_rtp_pt *pt)
51
+{
52
+ struct rtp_pcm *sys = pt->opaque;
53
+ es_format_t fmt;
54
+
55
+ es_format_Init(&fmt, AUDIO_ES, sys->fourcc);
56
+ fmt.audio.i_rate = pt->frequency;
57
+ fmt.audio.i_physical_channels = sys->channel_mask;
58
+ fmt.audio.i_channels = sys->channel_count;
59
+ aout_FormatPrepare(&fmt.audio);
60
+ return vlc_rtp_pt_request_es(pt, &fmt);
61
+}
62
+
63
+static void rtp_pcm_destroy(struct vlc_rtp_pt *pt, void *data)
64
+{
65
+ struct vlc_rtp_es *es = data;
66
+
67
+ vlc_rtp_es_destroy(es);
68
+ (void) pt;
69
+}
70
+
71
+static void rtp_pcm_reorder(void *restrict out, const void *restrict in,
72
+ size_t frames, size_t sample_size,
73
+ size_t channels, const uint8_t *restrict map)
74
+{
75
+ unsigned char *outp = out;
76
+ const unsigned char *inp = in;
77
+ const size_t frame_size = sample_size * channels;
78
+
79
+ if (sample_size == 0 || sample_size > 3)
80
+ vlc_assert_unreachable(); /* Let compiler optimise the memcpy(). */
81
+
82
+ for (size_t i = 0; i < frames; i++) {
83
+ for (size_t j = 0; j < channels; j++) {
84
+ memcpy(outp + (sample_size * map[j]), inp, sample_size);
85
+ inp += sample_size;
86
+ }
87
+
88
+ outp += frame_size;
89
+ }
90
+}
91
+
92
+static void rtp_pcm_decode(struct vlc_rtp_pt *pt, void *data, block_t *block)
93
+{
94
+ struct rtp_pcm *sys = pt->opaque;
95
+ struct vlc_rtp_es *es = data;
96
+ const size_t frame_bits = sys->channel_count * sys->sample_bits;
97
+ size_t frames = (8 * block->i_buffer) / frame_bits;
98
+
99
+ block->i_buffer = ((frames * frame_bits) + 7) / 8;
100
+ block->i_dts = VLC_TICK_INVALID;
101
+
102
+ if (sys->channel_reorder) {
103
+ block_t *reordered = block_Alloc(block->i_buffer);
104
+
105
+ assert((sys->sample_bits % 8) == 0);
106
+
107
+ if (likely(reordered != NULL)) {
108
+ block_CopyProperties(reordered, block);
109
+ rtp_pcm_reorder(reordered->p_buffer, block->p_buffer, frames,
110
+ sys->sample_bits / 8, sys->channel_count,
111
+ sys->channel_map);
112
+
113
+ }
114
+
115
+ block_Release(block);
116
+ block = reordered;
117
+
118
+ if (unlikely(block == NULL))
119
+ return;
120
+ }
121
+
122
+ vlc_rtp_es_send(es, block);
123
+}
124
+
125
+static void rtp_pcm_release(struct vlc_rtp_pt *pt)
126
+{
127
+ struct rtp_pcm *sys = pt->opaque;
128
+
129
+ free(sys);
130
+}
131
+
132
+static const struct vlc_rtp_pt_operations rtp_pcm_ops = {
133
+ rtp_pcm_release, rtp_pcm_init, rtp_pcm_destroy, rtp_pcm_decode,
134
+};
135
+
136
+static const uint32_t channel_masks[] = {
137
+ /* By default, there is only one channel. */
138
+ AOUT_CHAN_CENTER,
139
+ /*
140
+ * RTP/AVP recommends AIFF-C channel order by default (RFC3551 §4.1).
141
+ * For 1-4 channel(s), this works well.
142
+ */
143
+ AOUT_CHAN_CENTER, AOUT_CHANS_2_0, AOUT_CHANS_3_0, AOUT_CHANS_3_1,
144
+ /* AIFF-C says for 5 channels, and RFC says 3.2. We assume normal 5.0. */
145
+ AOUT_CHANS_5_0,
146
+ /* Accordingly for 6 channels, we assume normal 5.1 instead of AIFF-C's. */
147
+ AOUT_CHANS_5_1,
148
+};
149
+
150
+static const uint32_t channel_order[] = {
151
+ AOUT_CHAN_LEFT, AOUT_CHAN_REARLEFT, AOUT_CHAN_CENTER,
152
+ AOUT_CHAN_RIGHT, AOUT_CHAN_REARRIGHT, AOUT_CHAN_LFE, 0,
153
+};
154
+
155
+/* RTP puts right before center for 3.0, but center before right for 3.1! */
156
+static const uint32_t channel_order_3[RTP_MAX_CHANS] = {
157
+ AOUT_CHAN_LEFT, AOUT_CHAN_RIGHT, AOUT_CHAN_CENTER,
158
+};
159
+
160
+static_assert (ARRAY_SIZE(channel_masks) == RTP_MAX_CHANS + 1, "Bad masks");
161
+static_assert (ARRAY_SIZE(channel_order) == RTP_MAX_CHANS + 1, "Bad order");
162
+
163
+static int rtp_pcm_open(vlc_object_t *obj, struct vlc_rtp_pt *pt,
164
+ const struct vlc_sdp_pt *desc)
165
+{
166
+ vlc_fourcc_t fourcc;
167
+ unsigned bits;
168
+
169
+ if (vlc_ascii_strcasecmp(desc->name, "L8") == 0) {
170
+ fourcc = VLC_CODEC_U8; /* RFC3551 §4.5.10 */
171
+ bits = 8;
172
+
173
+ } else if (vlc_ascii_strcasecmp(desc->name, "L16") == 0) {
174
+ fourcc = VLC_CODEC_S16B; /* RFC3551 §4.5.11 */
175
+ bits = 16;
176
+
177
+ } else if (vlc_ascii_strcasecmp(desc->name, "L20") == 0) {
178
+ fourcc = VLC_CODEC_S20B; /* RFC3190 §4 */
179
+ bits = 20;
180
+
181
+ } else if (vlc_ascii_strcasecmp(desc->name, "L24") == 0) {
182
+ fourcc = VLC_CODEC_S24B; /* RFC3190 §4 */
183
+ bits = 24;
184
+
185
+ } else if (vlc_ascii_strcasecmp(desc->name, "PCMA") == 0) {
186
+ fourcc = VLC_CODEC_ALAW; /* RFC3551 §4.5.14 */
187
+ bits = 8;
188
+
189
+ } else if (vlc_ascii_strcasecmp(desc->name, "PCMU") == 0) {
190
+ fourcc = VLC_CODEC_MULAW; /* RFC3551 §4.5.14 */
191
+ bits = 8;
192
+
193
+ } else if (vlc_ascii_strcasecmp(desc->name, "DAT12") == 0) {
194
+ fourcc = VLC_CODEC_DAT12; /* RFC3190 §3 */
195
+ bits = 12;
196
+
197
+ } else
198
+ return VLC_ENOTSUP;
199
+
200
+ struct rtp_pcm *sys = malloc(sizeof (*sys));
201
_service:obs_scm:vlc-beta-20211123.aaff6519b2.obscpio/modules/access/rtp/rtpfmt.c -> _service:obs_scm:vlc-beta-20211125.7195529927.obscpio/modules/access/rtp/rtpfmt.c
Changed
82
1
2
* Static payload types handler
3
*/
4
5
-/* PT=0
6
- * PCMU: G.711 µ-law (RFC3551)
7
- */
8
-static void *pcmu_init(struct vlc_rtp_pt *pt)
9
-{
10
- es_format_t fmt;
11
-
12
- es_format_Init (&fmt, AUDIO_ES, VLC_CODEC_MULAW);
13
- fmt.audio.i_rate = pt->frequency;
14
- fmt.audio.i_channels = pt->channel_count ? pt->channel_count : 1;
15
- return vlc_rtp_pt_request_es(pt, &fmt);
16
-}
17
-
18
-static const struct vlc_rtp_pt_operations rtp_audio_pcmu = {
19
- NULL, pcmu_init, codec_destroy, codec_decode,
20
-};
21
-
22
/* PT=3
23
* GSM
24
*/
25
26
NULL, gsm_init, codec_destroy, codec_decode,
27
};
28
29
-/* PT=8
30
- * PCMA: G.711 A-law (RFC3551)
31
- */
32
-static void *pcma_init(struct vlc_rtp_pt *pt)
33
-{
34
- es_format_t fmt;
35
-
36
- es_format_Init (&fmt, AUDIO_ES, VLC_CODEC_ALAW);
37
- fmt.audio.i_rate = pt->frequency;
38
- fmt.audio.i_channels = pt->channel_count ? pt->channel_count : 1;
39
- return vlc_rtp_pt_request_es(pt, &fmt);
40
-}
41
-
42
-static const struct vlc_rtp_pt_operations rtp_audio_pcma = {
43
- NULL, pcma_init, codec_destroy, codec_decode,
44
-};
45
-
46
-/* PT=10,11
47
- * L16: 16-bits (network byte order) PCM
48
- */
49
-static void *l16_init(struct vlc_rtp_pt *pt)
50
-{
51
- es_format_t fmt;
52
-
53
- es_format_Init (&fmt, AUDIO_ES, VLC_CODEC_S16B);
54
- fmt.audio.i_rate = pt->frequency;
55
- fmt.audio.i_channels = pt->channel_count ? pt->channel_count : 1;
56
- return vlc_rtp_pt_request_es(pt, &fmt);
57
-}
58
-
59
-static const struct vlc_rtp_pt_operations rtp_audio_l16 = {
60
- NULL, l16_init, codec_destroy, codec_decode,
61
-};
62
-
63
/* PT=12
64
* QCELP
65
*/
66
67
pt->ops = NULL;
68
69
if (strcmp(desc->media->type, "audio") == 0) {
70
- if (strcmp(desc->name, "PCMU") == 0)
71
- pt->ops = &rtp_audio_pcmu;
72
- else if (strcmp(desc->name, "GSM") == 0)
73
+ if (strcmp(desc->name, "GSM") == 0)
74
pt->ops = &rtp_audio_gsm;
75
- else if (strcmp(desc->name, "PCMA") == 0)
76
- pt->ops = &rtp_audio_pcma;
77
- else if (strcmp(desc->name, "L16") == 0)
78
- pt->ops = &rtp_audio_l16;
79
else if (strcmp(desc->name, "QCELP") == 0)
80
pt->ops = &rtp_audio_qcelp;
81
else if (strcmp(desc->name, "MPA") == 0)
82
_service:obs_scm:vlc-beta-20211123.aaff6519b2.obscpio/modules/demux/mkv/mkv.cpp -> _service:obs_scm:vlc-beta-20211125.7195529927.obscpio/modules/demux/mkv/mkv.cpp
Changed
47
1
2
}
3
}
4
5
- /* update pcr */
6
+ if (UpdatePCR( p_demux ) != VLC_SUCCESS)
7
{
8
- vlc_tick_t i_pcr = VLC_TICK_INVALID;
9
-
10
- typedef matroska_segment_c::tracks_map_t tracks_map_t;
11
-
12
- for( tracks_map_t::const_iterator it = p_segment->tracks.begin(); it != p_segment->tracks.end(); ++it )
13
- {
14
- mkv_track_t &track = *it->second;
15
-
16
- if( track.i_last_dts == VLC_TICK_INVALID )
17
- continue;
18
-
19
- if( track.fmt.i_cat != VIDEO_ES && track.fmt.i_cat != AUDIO_ES )
20
- continue;
21
-
22
- if( track.i_last_dts < i_pcr || i_pcr == VLC_TICK_INVALID )
23
- {
24
- i_pcr = track.i_last_dts;
25
- }
26
- }
27
-
28
- if( i_pcr != VLC_TICK_INVALID && i_pcr > p_sys->i_pcr )
29
- {
30
- if( es_out_SetPCR( p_demux->out, i_pcr ) )
31
- {
32
- msg_Err( p_demux, "ES_OUT_SET_PCR failed, aborting." );
33
- delete block;
34
- delete additions;
35
- return VLC_DEMUXER_EGENERIC;
36
- }
37
-
38
- p_sys->i_pcr = i_pcr;
39
- }
40
+ msg_Err( p_demux, "ES_OUT_SET_PCR failed, aborting." );
41
+ delete block;
42
+ delete additions;
43
+ return VLC_DEMUXER_EGENERIC;
44
}
45
46
/* set pts */
47
_service:obs_scm:vlc-beta-20211123.aaff6519b2.obscpio/modules/demux/mkv/util.cpp -> _service:obs_scm:vlc-beta-20211125.7195529927.obscpio/modules/demux/mkv/util.cpp
Changed
57
1
2
return NULL;
3
}
4
5
+int UpdatePCR( demux_t * p_demux )
6
+{
7
+ demux_sys_t *p_sys = (demux_sys_t *)p_demux->p_sys;
8
+ matroska_segment_c *p_segment = p_sys->p_current_vsegment->CurrentSegment();
9
+
10
+ vlc_tick_t i_pcr = VLC_TICK_INVALID;
11
+
12
+ typedef matroska_segment_c::tracks_map_t tracks_map_t;
13
+
14
+ for( tracks_map_t::const_iterator it = p_segment->tracks.begin(); it != p_segment->tracks.end(); ++it )
15
+ {
16
+ mkv_track_t &track = *it->second;
17
+
18
+ if( track.i_last_dts == VLC_TICK_INVALID )
19
+ continue;
20
+
21
+ if( track.fmt.i_cat != VIDEO_ES && track.fmt.i_cat != AUDIO_ES )
22
+ continue;
23
+
24
+ if( track.i_last_dts < i_pcr || i_pcr == VLC_TICK_INVALID )
25
+ {
26
+ i_pcr = track.i_last_dts;
27
+ }
28
+ }
29
+
30
+ if( i_pcr != VLC_TICK_INVALID && i_pcr > p_sys->i_pcr )
31
+ {
32
+ if( es_out_SetPCR( p_demux->out, i_pcr ) )
33
+ {
34
+ msg_Err( p_demux, "ES_OUT_SET_PCR failed, aborting." );
35
+ return VLC_EGENERIC;
36
+ }
37
+
38
+ p_sys->i_pcr = i_pcr;
39
+ }
40
+
41
+ return VLC_SUCCESS;
42
+}
43
+
44
void send_Block( demux_t * p_demux, mkv_track_t * p_tk, block_t * p_block, unsigned int i_number_frames, int64_t i_duration )
45
{
46
demux_sys_t *p_sys = (demux_sys_t *)p_demux->p_sys;
47
48
p_tk->b_discontinuity = false;
49
}
50
51
+ if ( p_sys->i_pcr == VLC_TICK_INVALID )
52
+ UpdatePCR( p_demux );
53
+
54
es_out_Send( p_demux->out, p_tk->p_es, p_block);
55
}
56
57
_service:obs_scm:vlc-beta-20211123.aaff6519b2.obscpio/modules/demux/mkv/util.hpp -> _service:obs_scm:vlc-beta-20211125.7195529927.obscpio/modules/demux/mkv/util.hpp
Changed
9
1
2
block_t *WEBVTT_Repack_Sample(block_t *p_block, bool b_webm = false,
3
const uint8_t * = NULL, size_t = 0);
4
void send_Block( demux_t * p_demux, mkv_track_t * p_tk, block_t * p_block, unsigned int i_number_frames, int64_t i_duration );
5
+int UpdatePCR( demux_t * p_demux );
6
7
8
struct real_audio_private
9
_service:obs_scm:vlc-beta-20211123.aaff6519b2.obscpio/modules/demux/playlist/m3u.c -> _service:obs_scm:vlc-beta-20211125.7195529927.obscpio/modules/demux/playlist/m3u.c
Changed
201
1
2
if( meta->psz_tvgid )
3
input_item_AddInfo( p_input, "XMLTV", "tvg-id", "%s", meta->psz_tvgid );
4
if( meta->psz_grouptitle )
5
- input_item_SetAlbum( p_input, meta->psz_grouptitle );
6
+ input_item_SetPublisher( p_input, meta->psz_grouptitle );
7
8
input_item_node_AppendItem( p_node, p_input );
9
input_item_Release( p_input );
10
11
static int ReadDir( stream_t *p_demux, input_item_node_t *p_subitems )
12
{
13
char *psz_line;
14
+ char *psz_group = NULL; /* group is toggling tag */
15
struct entry_meta_s meta;
16
entry_meta_Init( &meta );
17
char * (*pf_dup) (const char *) = p_demux->p_sys;
18
19
meta.i_duration = INPUT_DURATION_INDEFINITE;
20
parseEXTINF( psz_parse, pf_dup, &meta );
21
}
22
+ else if( !strncasecmp( psz_parse, "EXTGRP:", sizeof("EXTGRP:") -1 ) )
23
+ {
24
+ psz_parse += sizeof("EXTGRP:") - 1;
25
+ if( *psz_parse )
26
+ {
27
+ free( psz_group );
28
+ psz_group = pf_dup( psz_parse );
29
+ }
30
+ }
31
else if( !strncasecmp( psz_parse, "EXTVLCOPT:",
32
sizeof("EXTVLCOPT:") -1 ) )
33
{
34
35
sizeof( "PLAYLIST:" ) - 1 ) )
36
{
37
psz_parse += sizeof( "PLAYLIST:" ) - 1;
38
- input_item_SetTitle( p_demux->p_input_item, psz_parse );
39
+ input_item_SetTitle( p_subitems->p_item, psz_parse );
40
}
41
}
42
else if( !strncasecmp( psz_parse, "RTSPtext", sizeof("RTSPtext") -1 ) )
43
44
if( !meta.psz_name && psz_parse )
45
/* Use filename as name for relative entries */
46
meta.psz_name = strdup( psz_parse );
47
+ if( psz_group && !meta.psz_grouptitle )
48
+ meta.psz_grouptitle = strdup( psz_group );
49
50
meta.psz_mrl = ProcessMRL( psz_parse, p_demux->psz_url );
51
free( psz_parse );
52
53
/* Cleanup state */
54
entry_meta_Clean( &meta );
55
entry_meta_Init( &meta );
56
+ free( psz_group );
57
}
58
}
59
return VLC_SUCCESS; /* Needed for correct operation of go back */
60
61
char *(*pf_dup)(const char *),
62
struct entry_meta_s *meta )
63
{
64
- char **ppsz_meta = NULL;
65
- if( strncmp( psz_string, "tvg-", 4 ) &&
66
- strncmp( psz_string, "group-", 6 ) )
67
- return;
68
- char *psz_sep = strchr( psz_string + 4, '=' );
69
- if( unlikely(!psz_sep) )
70
+ char *psz = strchr( psz_string, '=' );
71
+ if( unlikely(!psz) )
72
return;
73
- size_t i_keylen = psz_sep - psz_string;
74
-
75
- if( !strncmp( psz_string + 4, "logo", i_keylen - 4 ) )
76
- ppsz_meta = &meta->psz_album_art;
77
- else if( !strncmp( psz_string + 4, "name", i_keylen - 4 ) )
78
- ppsz_meta = &meta->psz_name;
79
- else if( !strncmp( psz_string + 4, "language", i_keylen - 4 ) )
80
- ppsz_meta = &meta->psz_language;
81
- else if( !strncmp( psz_string + 4, "id", i_keylen - 4 ) )
82
- ppsz_meta = &meta->psz_tvgid;
83
- else if( !strncmp( psz_string + 6, "title", i_keylen - 4 ) )
84
+
85
+ char **ppsz_meta = NULL;
86
+ *psz = 0;
87
+ if( !strncasecmp( psz_string, "tvg-", 4 ) )
88
+ {
89
+ if( !strcasecmp( psz_string + 4, "logo" ) )
90
+ ppsz_meta = &meta->psz_album_art;
91
+ else if( !strcasecmp( psz_string + 4, "name" ) )
92
+ ppsz_meta = &meta->psz_name;
93
+ else if( !strcasecmp( psz_string + 4, "language" ) )
94
+ ppsz_meta = &meta->psz_language;
95
+ else if( !strcasecmp( psz_string + 4, "id" ) )
96
+ ppsz_meta = &meta->psz_tvgid;
97
+ }
98
+ else if( !strcasecmp( psz_string, "group-title" ) )
99
+ {
100
ppsz_meta = &meta->psz_grouptitle;
101
+ }
102
+ *psz = '=';
103
104
if( !ppsz_meta || *ppsz_meta /* no overwrite */ )
105
return;
106
107
- char *psz_value = psz_sep + 1;
108
- size_t i_valuelen = strlen( psz_value );
109
+ size_t i_valuelen = strlen( ++psz );
110
if( unlikely(i_valuelen == 0) )
111
return;
112
113
- bool b_escaped = (*psz_value == '"');
114
+ bool b_escaped = (*psz == '"');
115
if( i_valuelen > 2 && b_escaped )
116
{
117
- psz_value[ i_valuelen - 1 ] = 0;
118
- *ppsz_meta = pf_dup( psz_value + 1 );
119
+ psz[ i_valuelen - 1 ] = 0;
120
+ *ppsz_meta = pf_dup( psz + 1 );
121
}
122
else
123
- *ppsz_meta = pf_dup( psz_value );
124
+ *ppsz_meta = pf_dup( psz );
125
}
126
127
static void parseEXTINFIptvDiotsInDuration( char *psz_string,
128
char *(*pf_dup)(const char *),
129
- struct entry_meta_s *meta )
130
+ struct entry_meta_s *meta,
131
+ char **ppsz_end )
132
{
133
for( ;; )
134
{
135
136
{
137
switch( *psz_string )
138
{
139
+ case ',': /* Last comma for title */
140
+ if(!b_escaped)
141
+ {
142
+ if(b_value)
143
+ {
144
+ *psz_string = '\0';
145
+ parseEXTINFIptvDiots( psz_start, pf_dup, meta );
146
+ }
147
+ *ppsz_end = psz_string + 1;
148
+ return;
149
+ }
150
+ break;
151
case '"':
152
if(!b_escaped && b_value)
153
return;
154
155
while( psz_string < end && ( *psz_string == '\t' || *psz_string == ' ' ) )
156
psz_string++;
157
158
- /* duration: read to next comma */
159
- char *psz_comma = strchr( psz_string, ',' );
160
- if( psz_comma )
161
- {
162
- *psz_comma = '\0'; /* Split strings */
163
- if( ++psz_comma < end )
164
- parseEXTINFTitle( psz_comma, pf_dup, meta );
165
- }
166
-
167
/* Parse duration */
168
char *psz_end = NULL;
169
- long i_parsed_duration = strtol( psz_string, &psz_end, 10 );
170
+ float i_parsed_duration = us_strtof( psz_string, &psz_end );
171
if( i_parsed_duration > 0 )
172
- meta->i_duration = vlc_tick_from_sec( i_parsed_duration );
173
+ meta->i_duration = vlc_tick_from_sec( (double)i_parsed_duration );
174
+
175
+ /* skip to first unmatched */
176
+ if( psz_end )
177
+ psz_string = psz_end;
178
+
179
+ /* skip whitespaces */
180
+ while( psz_string < end && ( *psz_string == '\t' || *psz_string == ' ' ) )
181
+ psz_string++;
182
+
183
+ if( psz_string == end )
184
+ return;
185
186
- if( psz_end && psz_end != psz_string && ( *psz_end == '\t' || *psz_end == ' ' ) )
187
+ /* EXTINF:1,title*/
188
+ /* EXTINF: -123.12 ,title*/
189
+ if( *psz_string == ',' )
190
{
191
- parseEXTINFIptvDiotsInDuration( psz_end, pf_dup, meta );
192
+ if( ++psz_string < end )
193
+ parseEXTINFTitle( psz_string, pf_dup, meta );
194
+ }
195
+ /* EXTINF: -1 tvg-foo="val" tvg-foo2="val",title */
196
+ /* EXTINF: -1 tvg-foo="val,val2" ,title */
197
+ else if( *psz_string >= 'A' && *psz_string <= 'z' )
198
+ {
199
+ psz_end = NULL;
200
+ parseEXTINFIptvDiotsInDuration( psz_string, pf_dup, meta, &psz_end );
201
_service:obs_scm:vlc-beta-20211123.aaff6519b2.obscpio/modules/services_discovery/mtp.c -> _service:obs_scm:vlc-beta-20211125.7195529927.obscpio/modules/services_discovery/mtp.c
Changed
10
1
2
3
static vlc_once_t mtp_init_once = VLC_STATIC_ONCE;
4
5
- vlc_once(&mtp_init_once, LIBMTP_Init, NULL);
6
+ vlc_once(&mtp_init_once, vlc_libmtp_init, NULL);
7
8
if (vlc_clone (&p_sys->thread, Run, p_sd, VLC_THREAD_PRIORITY_LOW))
9
{
10
_service:obs_scm:vlc-beta-20211123.aaff6519b2.obscpio/modules/video_output/libplacebo/utils.h -> _service:obs_scm:vlc-beta-20211125.7195529927.obscpio/modules/video_output/libplacebo/utils.h
Changed
41
1
2
#include <libplacebo/shaders/colorspace.h>
3
#include <libplacebo/utils/upload.h>
4
5
+#include "../opengl/gl_scale.h"
6
+
7
// Create a libplacebo context, hooked up to the log system; or NULL on OOM
8
struct pl_context *vlc_placebo_CreateContext(vlc_object_t *);
9
10
11
SCALE_CUSTOM,
12
};
13
14
+static const int libplacebo_scale_map[] = {
15
+ [VLC_GLSCALE_BUILTIN] = SCALE_BUILTIN,
16
+ [VLC_GLSCALE_SPLINE16] = SCALE_SPLINE16,
17
+ [VLC_GLSCALE_SPLINE36] = SCALE_SPLINE36,
18
+ [VLC_GLSCALE_SPLINE64] = SCALE_SPLINE64,
19
+ [VLC_GLSCALE_MITCHELL] = SCALE_MITCHELL,
20
+ [VLC_GLSCALE_BICUBIC] = SCALE_BICUBIC,
21
+ [VLC_GLSCALE_EWA_LANCZOS] = SCALE_EWA_LANCZOS,
22
+ [VLC_GLSCALE_NEAREST] = SCALE_NEAREST,
23
+ [VLC_GLSCALE_BILINEAR] = SCALE_BILINEAR,
24
+ [VLC_GLSCALE_GAUSSIAN] = SCALE_GAUSSIAN,
25
+ [VLC_GLSCALE_LANCZOS] = SCALE_LANCZOS,
26
+ [VLC_GLSCALE_GINSENG] = SCALE_GINSENG,
27
+ [VLC_GLSCALE_EWA_GINSENG] = SCALE_EWA_GINSENG,
28
+ [VLC_GLSCALE_EWA_HANN] = SCALE_EWA_HANN,
29
+ [VLC_GLSCALE_CATMULL_ROM] = SCALE_CATMULL_ROM,
30
+ [VLC_GLSCALE_ROBIDOUX] = SCALE_ROBIDOUX,
31
+ [VLC_GLSCALE_ROBIDOUXSHARP] = SCALE_ROBIDOUXSHARP,
32
+ [VLC_GLSCALE_EWA_ROBIDOUX] = SCALE_EWA_ROBIDOUX,
33
+ [VLC_GLSCALE_EWA_ROBIDOUXSHARP] = SCALE_EWA_ROBIDOUXSHARP,
34
+ [VLC_GLSCALE_SINC] = SCALE_SINC,
35
+ [VLC_GLSCALE_EWA_JINC] = SCALE_EWA_JINC,
36
+};
37
+
38
static const int scale_values[] = {
39
SCALE_BUILTIN,
40
SCALE_SPLINE16,
41
_service:obs_scm:vlc-beta-20211123.aaff6519b2.obscpio/modules/video_output/opengl/Makefile.am -> _service:obs_scm:vlc-beta-20211125.7195529927.obscpio/modules/video_output/opengl/Makefile.am
Changed
25
1
2
endif
3
4
OPENGL_VOUT_COMMONSOURCES = \
5
+ video_output/opengl/gl_scale.h \
6
video_output/opengl/renderer.c \
7
video_output/opengl/renderer.h \
8
video_output/opengl/sub_renderer.c \
9
10
noinst_LTLIBRARIES += libglfilter_mock_plugin.la
11
endif
12
13
+if HAVE_LIBPLACEBO
14
if HAVE_LIBPLACEBO_SCALE
15
16
libpl_scale_plugin_la_SOURCES = video_output/opengl/pl_scale.c
17
18
endif
19
20
endif
21
+endif
22
23
libegl_display_generic_plugin_la_SOURCES = video_output/opengl/egl_display_generic.c
24
libegl_display_generic_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(EGL_FLAGS)
25
_service:obs_scm:vlc-beta-20211123.aaff6519b2.obscpio/modules/video_output/opengl/filters.c -> _service:obs_scm:vlc-beta-20211125.7195529927.obscpio/modules/video_output/opengl/filters.c
Changed
9
1
2
if (ret != VLC_SUCCESS)
3
{
4
/* Creation failed, do not call close() */
5
+ msg_Err(filters->gl, "Could not load OpenGL filter '%s'", name);
6
filter->ops = NULL;
7
vlc_gl_filter_Delete(filter);
8
return NULL;
9
_service:obs_scm:vlc-beta-20211125.7195529927.obscpio/modules/video_output/opengl/gl_scale.h
Added
113
1
2
+/*****************************************************************************
3
++ * gl_scale.h
4
++ *****************************************************************************
5
++ * Copyright (C) 2021 VLC authors and VideoLAN
6
++ *
7
++ * This program is free software; you can redistribute it and/or modify it
8
++ * under the terms of the GNU Lesser General Public License as published by
9
++ * the Free Software Foundation; either version 2.1 of the License, or
10
++ * (at your option) any later version.
11
++ *
12
++ * This program is distributed in the hope that it will be useful,
13
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
++ * GNU Lesser General Public License for more details.
16
++ *
17
++ * You should have received a copy of the GNU Lesser General Public License
18
++ * along with this program; if not, write to the Free Software Foundation,
19
++ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
20
++ *****************************************************************************/
21
+
22
+#ifndef VLC_GL_SCALE_H
23
+#define VLC_GL_SCALE_H
24
+
25
+enum vlc_gl_scale {
26
+ VLC_GLSCALE_BUILTIN,
27
+ VLC_GLSCALE_SPLINE16,
28
+ VLC_GLSCALE_SPLINE36,
29
+ VLC_GLSCALE_SPLINE64,
30
+ VLC_GLSCALE_MITCHELL,
31
+ VLC_GLSCALE_BICUBIC,
32
+ VLC_GLSCALE_EWA_LANCZOS,
33
+ VLC_GLSCALE_NEAREST,
34
+ VLC_GLSCALE_BILINEAR,
35
+ VLC_GLSCALE_GAUSSIAN,
36
+ VLC_GLSCALE_LANCZOS,
37
+ VLC_GLSCALE_GINSENG,
38
+ VLC_GLSCALE_EWA_GINSENG,
39
+ VLC_GLSCALE_EWA_HANN,
40
+ VLC_GLSCALE_CATMULL_ROM,
41
+ VLC_GLSCALE_ROBIDOUX,
42
+ VLC_GLSCALE_ROBIDOUXSHARP,
43
+ VLC_GLSCALE_EWA_ROBIDOUX,
44
+ VLC_GLSCALE_EWA_ROBIDOUXSHARP,
45
+ VLC_GLSCALE_SINC,
46
+ VLC_GLSCALE_EWA_JINC,
47
+};
48
+
49
+static const int vlc_glscale_values[] = {
50
+ VLC_GLSCALE_BUILTIN,
51
+ VLC_GLSCALE_SPLINE16,
52
+ VLC_GLSCALE_SPLINE36,
53
+ VLC_GLSCALE_SPLINE64,
54
+ VLC_GLSCALE_MITCHELL,
55
+ VLC_GLSCALE_BICUBIC,
56
+ VLC_GLSCALE_EWA_LANCZOS,
57
+ VLC_GLSCALE_NEAREST,
58
+ VLC_GLSCALE_BILINEAR,
59
+ VLC_GLSCALE_GAUSSIAN,
60
+ VLC_GLSCALE_LANCZOS,
61
+ VLC_GLSCALE_GINSENG,
62
+ VLC_GLSCALE_EWA_GINSENG,
63
+ VLC_GLSCALE_EWA_HANN,
64
+ VLC_GLSCALE_CATMULL_ROM,
65
+ VLC_GLSCALE_ROBIDOUX,
66
+ VLC_GLSCALE_ROBIDOUXSHARP,
67
+ VLC_GLSCALE_EWA_ROBIDOUX,
68
+ VLC_GLSCALE_EWA_ROBIDOUXSHARP,
69
+ VLC_GLSCALE_SINC,
70
+ VLC_GLSCALE_EWA_JINC,
71
+};
72
+
73
+static const char *const vlc_glscale_text[] = {
74
+ "Built-in / fixed function (fast)",
75
+ "Spline 2 taps",
76
+ "Spline 3 taps (recommended upscaler)",
77
+ "Spline 4 taps",
78
+ "Mitchell-Netravali (recommended downscaler)",
79
+ "Bicubic",
80
+ "Jinc / EWA Lanczos 3 taps (high quality, slow)",
81
+ "Nearest neighbor",
82
+ "Bilinear",
83
+ "Gaussian",
84
+ "Lanczos 3 taps",
85
+ "Ginseng 3 taps",
86
+ "EWA Ginseng",
87
+ "EWA Hann",
88
+ "Catmull-Rom",
89
+ "Robidoux",
90
+ "RobidouxSharp",
91
+ "EWA Robidoux",
92
+ "EWA RobidouxSharp",
93
+ "Unwindowed sinc (clipped)",
94
+ "Unwindowed EWA Jinc (clipped)",
95
+};
96
+
97
+#define VLC_GL_UPSCALER_TEXT "OpenGL upscaler"
98
+#define VLC_GL_UPSCALER_LONGTEXT "Upscaler filter to apply during rendering"
99
+
100
+#define VLC_GL_DOWNSCALER_TEXT "OpenGL downscaler"
101
+#define VLC_GL_DOWNSCALER_LONGTEXT "Downscaler filter to apply during rendering"
102
+
103
+#define add_glscale_opts() \
104
+ set_section(N_("Scaling"), NULL) \
105
+ add_integer("gl-upscaler", VLC_GLSCALE_BUILTIN, VLC_GL_UPSCALER_TEXT, \
106
+ VLC_GL_UPSCALER_LONGTEXT) \
107
+ change_integer_list(vlc_glscale_values, vlc_glscale_text) \
108
+ add_integer("gl-downscaler", VLC_GLSCALE_BUILTIN, VLC_GL_DOWNSCALER_TEXT, \
109
+ VLC_GL_DOWNSCALER_LONGTEXT) \
110
+ change_integer_list(vlc_glscale_values, vlc_glscale_text) \
111
+
112
+#endif
113
_service:obs_scm:vlc-beta-20211123.aaff6519b2.obscpio/modules/video_output/opengl/pl_scale.c -> _service:obs_scm:vlc-beta-20211125.7195529927.obscpio/modules/video_output/opengl/pl_scale.c
Changed
24
1
2
#include "video_output/opengl/filter.h"
3
#include "video_output/opengl/gl_api.h"
4
#include "video_output/opengl/gl_common.h"
5
+#include "video_output/opengl/gl_scale.h"
6
#include "video_output/opengl/gl_util.h"
7
#include "video_output/opengl/sampler.h"
8
#include "video_output/libplacebo/utils.h"
9
10
};
11
12
sys->render_params = pl_render_default_params;
13
- sys->render_params.upscaler = scale_config[upscaler];
14
- sys->render_params.downscaler = scale_config[downscaler];
15
+
16
+ int upscaler_idx = libplacebo_scale_map[upscaler];
17
+ sys->render_params.upscaler = scale_config[upscaler_idx];
18
+
19
+ int downscaler_idx = libplacebo_scale_map[downscaler];
20
+ sys->render_params.downscaler = scale_config[downscaler_idx];
21
22
static const struct vlc_gl_filter_ops ops = {
23
.draw = Draw,
24
_service:obs_scm:vlc-beta-20211123.aaff6519b2.obscpio/modules/video_output/opengl/vout_helper.c -> _service:obs_scm:vlc-beta-20211125.7195529927.obscpio/modules/video_output/opengl/vout_helper.c
Changed
28
1
2
goto delete_interop;
3
}
4
5
- int upscaler = var_InheritInteger(gl, "pl-upscaler");
6
- int downscaler = var_InheritInteger(gl, "pl-downscaler");
7
+ int upscaler = var_InheritInteger(gl, "gl-upscaler");
8
+ int downscaler = var_InheritInteger(gl, "gl-downscaler");
9
10
if (upscaler || downscaler)
11
{
12
13
struct vlc_gl_filter *scale_filter =
14
vlc_gl_filters_Append(vgl->filters, "pl_scale", &cfg);
15
if (!scale_filter)
16
- msg_Warn(gl, "Could not load pl_scale");
17
+ {
18
+ if (upscaler)
19
+ msg_Err(gl, "Could not apply upscaler filter, "
20
+ "ignoring --gl-upscaler=%d", upscaler);
21
+ if (downscaler)
22
+ msg_Err(gl, "Could not apply downscaler filter, "
23
+ "ignoring --gl-downscaler=%d", downscaler);
24
+ }
25
}
26
27
/* The renderer is the only filter, for now */
28
_service:obs_scm:vlc-beta-20211123.aaff6519b2.obscpio/modules/video_output/opengl/vout_helper.h -> _service:obs_scm:vlc-beta-20211125.7195529927.obscpio/modules/video_output/opengl/vout_helper.h
Changed
42
1
2
#define VLC_OPENGL_VOUT_HELPER_H
3
4
#include "gl_common.h"
5
+#include "gl_scale.h"
6
7
#ifdef HAVE_LIBPLACEBO
8
#include "../libplacebo/utils.h"
9
10
-#define UPSCALER_TEXT "OpenGL upscaler"
11
-#define UPSCALER_LONGTEXT "Upscaler filter to apply during rendering"
12
-
13
-#define DOWNSCALER_TEXT "OpenGL downscaler"
14
-#define DOWNSCALER_LONGTEXT "Downscaler filter to apply during rendering"
15
-
16
-
17
#if PL_API_VER >= 10
18
#define add_desat_params() \
19
add_float("desat-strength", pl_color_map_default_params.desaturation_strength, \
20
21
#endif
22
23
#define add_glopts_placebo() \
24
- set_section(N_("Scaling"), NULL) \
25
- add_integer("pl-upscaler", SCALE_BUILTIN, UPSCALER_TEXT, \
26
- UPSCALER_LONGTEXT) \
27
- change_integer_list(scale_values, scale_text) \
28
- add_integer("pl-downscaler", SCALE_BUILTIN, DOWNSCALER_TEXT, \
29
- DOWNSCALER_LONGTEXT) \
30
- change_integer_list(scale_values, scale_text) \
31
set_section(N_("Colorspace conversion"), NULL) \
32
add_integer("rendering-intent", pl_color_map_default_params.intent, \
33
RENDER_INTENT_TEXT, RENDER_INTENT_LONGTEXT) \
34
35
36
#define add_glopts() \
37
add_module("glinterop", "glinterop", NULL, GLINTEROP_TEXT, GLINTEROP_LONGTEXT) \
38
+ add_glscale_opts() \
39
add_glopts_placebo ()
40
41
typedef struct vout_display_opengl_t vout_display_opengl_t;
42
_service:obs_scm:vlc-beta-20211123.aaff6519b2.obscpio/share/lua/playlist/youtube.lua -> _service:obs_scm:vlc-beta-20211125.7195529927.obscpio/share/lua/playlist/youtube.lua
Changed
20
1
2
alphabet2 = {
3
func = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",
4
match = {
5
+ -- function(){for(var d=64,e=[];++d-e.length-32;){switch(d){case 58:d-=14;case 91:case 92:case 93:continue;case 123:d=47;case 94:case 95:case 96:continue;case 46:d=95}e.push(String.fromCharCode(d))}return e}
6
-- function(){for(var d=64,e=[];++d-e.length-32;)switch(d){case 46:d=95;default:e.push(String.fromCharCode(d));case 94:case 95:case 96:break;case 123:d-=76;case 92:case 93:continue;case 58:d=44;case 91:}return e}
7
"^function%(%){[^}]-case 58:d%-=14;",
8
"^function%(%){[^}]-case 58:d=44;",
9
10
elseif string.match( datac, '^"[^"]*",' ) then
11
el, datac = string.match( datac, '^"([^"]*)",(.*)$' )
12
-- Integer input data
13
- elseif string.match( datac, '^-?%d+,' ) then
14
+ -- 1818016376,-648890305,-1200559E3, ...
15
+ elseif string.match( datac, '^%-?%d+,' ) or
16
+ string.match( datac, '^%-?%d+[eE]%-?%d+,' ) then
17
el, datac = string.match( datac, "^(.-),(.*)$" )
18
el = tonumber( el )
19
-- Reference to "n" parameter array
20
_service:obs_scm:vlc-beta-20211123.aaff6519b2.obscpio/src/input/meta.c -> _service:obs_scm:vlc-beta-20211125.7195529927.obscpio/src/input/meta.c
Changed
19
1
2
[vlc_meta_ShowName] = N_("Show Name"),
3
[vlc_meta_Actors] = N_("Actors"),
4
[vlc_meta_AlbumArtist] = N_("Album Artist"),
5
- [vlc_meta_DiscNumber] = N_("Disc number")
6
+ [vlc_meta_DiscNumber] = N_("Disc number"),
7
+ [vlc_meta_DiscTotal] = N_("Total disc number")
8
};
9
10
- assert (meta_type < (sizeof(posix_names) / sizeof(posix_names[0])));
11
+ assert (meta_type < ARRAY_SIZE(posix_names));
12
+ assert (strlen(posix_names[meta_type]));
13
return vlc_gettext (posix_names[meta_type]);
14
-};
15
+}
16
17
18
/**
19
_service:obs_scm:vlc-beta-20211123.aaff6519b2.obscpio/test/Makefile.am -> _service:obs_scm:vlc-beta-20211125.7195529927.obscpio/test/Makefile.am
Changed
18
1
2
test_modules_keystore \
3
test_modules_demux_timestamps_filter \
4
test_modules_demux_ts_pes \
5
+ test_modules_playlist_m3u \
6
$(NULL)
7
8
if ENABLE_SOUT
9
10
test_modules_demux_ts_pes_SOURCES = modules/demux/ts_pes.c \
11
../modules/demux/mpeg/ts_pes.c \
12
../modules/demux/mpeg/ts_pes.h
13
+test_modules_playlist_m3u_SOURCES = modules/demux/playlist/m3u.c
14
+test_modules_playlist_m3u_LDADD = $(LIBVLCCORE) $(LIBVLC)
15
16
17
checkall:
18
_service:obs_scm:vlc-beta-20211125.7195529927.obscpio/test/modules/demux/playlist
Added
2
1
+(directory)
2
_service:obs_scm:vlc-beta-20211125.7195529927.obscpio/test/modules/demux/playlist/m3u.c
Added
201
1
2
+/*****************************************************************************
3
+ * m3u.c: M3U unit testing
4
+ *****************************************************************************
5
+ * Copyright (C) 2021 VideoLabs, VideoLAN and VLC Authors
6
+ *
7
+ * This program is free software; you can redistribute it and/or modify it
8
+ * under the terms of the GNU Lesser General Public License as published by
9
+ * the Free Software Foundation; either version 2.1 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU Lesser General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU Lesser General Public License
18
+ * along with this program; if not, write to the Free Software Foundation,
19
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
20
+ *****************************************************************************/
21
+#ifdef HAVE_CONFIG_H
22
+# include "config.h"
23
+#endif
24
+
25
+#include <vlc/vlc.h>
26
+#include "../../../../lib/libvlc_internal.h"
27
+#include "../../../libvlc/test.h"
28
+
29
+#include <vlc_common.h>
30
+#include <vlc_modules.h>
31
+#include <vlc_demux.h>
32
+#include <vlc_meta.h>
33
+#include <vlc_input_item.h>
34
+
35
+#define BAILOUT(run) { fprintf(stderr, "failed %s line %d\n", run, __LINE__); \
36
+ return 1; }
37
+#define EXPECT(foo) if(!(foo)) BAILOUT(run)
38
+#define NOPFIL(n) "bar"#n
39
+#define NOPURI(n) INPUT_ITEM_URI_NOP "/" NOPFIL(n)
40
+
41
+static int runtest(const char *run,
42
+ libvlc_instance_t *vlc,
43
+ const char *data, size_t datasz,
44
+ int(*checkfunc)(const char *, const input_item_node_t *))
45
+{
46
+ stream_t *s = vlc_stream_MemoryNew(vlc->p_libvlc_int, (uint8_t *)data, datasz, true);
47
+ if(!s)
48
+ BAILOUT(run);
49
+
50
+ demux_t *pl = demux_New(VLC_OBJECT(vlc->p_libvlc_int), "m3u", INPUT_ITEM_URI_NOP, s, NULL);
51
+ if(!pl || !pl->pf_readdir)
52
+ {
53
+ vlc_stream_Delete(s);
54
+ BAILOUT(run);
55
+ }
56
+
57
+ int ret = 0;
58
+ input_item_t *p_item = input_item_New(NULL, NULL);
59
+ if(p_item)
60
+ {
61
+ input_item_node_t *p_node = input_item_node_Create(p_item);
62
+ if(p_node)
63
+ {
64
+ pl->pf_readdir(pl, p_node);
65
+ ret = checkfunc(run, p_node);
66
+ input_item_node_Delete(p_node);
67
+ }
68
+ else
69
+ {
70
+ ret = 1;
71
+ }
72
+ input_item_Release(p_item);
73
+ }
74
+ else
75
+ {
76
+ ret = 1;
77
+ }
78
+
79
+ demux_Delete(pl);
80
+
81
+ return ret;
82
+}
83
+
84
+const char m3uplaylist0[] =
85
+"#EXTM3U\n"
86
+"#JUNK\n"
87
+NOPFIL(0) "\n"
88
+NOPURI(1) "\n";
89
+
90
+static int check0(const char *run, const input_item_node_t *p_node)
91
+{
92
+ EXPECT(p_node->i_children == 2);
93
+
94
+ const input_item_t *p_item = p_node->pp_children[0]->p_item;
95
+ EXPECT(p_item->psz_name && p_item->psz_uri);
96
+ EXPECT(!strcmp(NOPURI(0), p_item->psz_uri));
97
+ EXPECT(!strcmp(NOPFIL(0), p_item->psz_name));
98
+ EXPECT(p_item->i_duration == INPUT_DURATION_INDEFINITE);
99
+
100
+ p_item = p_node->pp_children[1]->p_item;
101
+ EXPECT(p_item->psz_name && p_item->psz_uri);
102
+ EXPECT(!strcmp(p_item->psz_name, p_item->psz_uri));
103
+ EXPECT(!strcmp(NOPURI(1), p_item->psz_name));
104
+
105
+ return 0;
106
+}
107
+
108
+const char m3uplaylist1[] =
109
+"#EXTM3U\n"
110
+"#EXTINF: 1\n"
111
+NOPFIL(0) "\n"
112
+"#EXTINF: 1.11\n"
113
+NOPURI(1) "\n"
114
+"#EXTINF: -2,\n"
115
+"#JUNK:foo\n"
116
+NOPURI(2) "\n"
117
+"#EXTINF: 3,artist3 - name3\n"
118
+NOPURI(3) "\n"
119
+"#EXTINF: 4,,name4\n"
120
+NOPURI(4) "\n"
121
+"#EXTINF: 5,artist5,name5\n"
122
+NOPURI(5) "\n";
123
+
124
+static int check1(const char *run, const input_item_node_t *p_node)
125
+{
126
+ EXPECT(p_node->i_children == 6);
127
+
128
+ const input_item_t *p_item = p_node->pp_children[0]->p_item;
129
+ EXPECT(p_item->psz_name && p_item->psz_uri);
130
+ EXPECT(!strcmp(NOPFIL(0), p_item->psz_name));
131
+ EXPECT(p_item->i_duration == vlc_tick_from_sec(1));
132
+
133
+ p_item = p_node->pp_children[1]->p_item;
134
+ EXPECT(p_item->psz_name && p_item->psz_uri);
135
+ EXPECT(!strcmp(NOPURI(1), p_item->psz_name));
136
+ EXPECT(p_item->i_duration == vlc_tick_from_sec(1.11));
137
+
138
+ p_item = p_node->pp_children[2]->p_item;
139
+ EXPECT(p_item->psz_name && p_item->psz_uri);
140
+ EXPECT(!strcmp(NOPURI(2), p_item->psz_uri));
141
+ EXPECT(!strcmp(p_item->psz_name, p_item->psz_uri));
142
+ EXPECT(p_item->i_duration == INPUT_DURATION_INDEFINITE);
143
+
144
+ p_item = p_node->pp_children[3]->p_item;
145
+ EXPECT(p_item->psz_name && p_item->psz_uri);
146
+ EXPECT(!strcmp(NOPURI(3), p_item->psz_uri));
147
+ EXPECT(!strcmp("name3", p_item->psz_name));
148
+ const char *p = vlc_meta_Get(p_item->p_meta, vlc_meta_Artist);
149
+ EXPECT(p && !strcmp("artist3", p));
150
+
151
+ p_item = p_node->pp_children[4]->p_item;
152
+ EXPECT(p_item->psz_name && p_item->psz_uri);
153
+ EXPECT(!strcmp("name4", p_item->psz_name));
154
+ EXPECT(vlc_meta_Get(p_item->p_meta, vlc_meta_Artist) == NULL);
155
+
156
+ p_item = p_node->pp_children[5]->p_item;
157
+ EXPECT(p_item->psz_name && p_item->psz_uri);
158
+ EXPECT(!strcmp("name5", p_item->psz_name));
159
+ p = vlc_meta_Get(p_item->p_meta, vlc_meta_Artist);
160
+ EXPECT(p && !strcmp("artist5", p));
161
+
162
+ return 0;
163
+}
164
+
165
+const char m3uplaylist2[] =
166
+"#EXTM3U\n"
167
+"#PLAYLIST:playlist0\n"
168
+"#EXTINF:-1 tvg-id=\"id0\" tvg-logo=\"logo0\" group-title=\"group0\",name0\n"
169
+NOPURI(0)"\n"
170
+"#EXTGRP:group1\n"
171
+"#EXTINF:-1,name1\n"
172
+NOPURI(1)"\n"
173
+"#EXTINF:-1,name2\n"
174
+NOPURI(2)"\n";
175
+
176
+static int check2(const char *run, const input_item_node_t *p_node)
177
+{
178
+ EXPECT(p_node->i_children == 3);
179
+ const char *p = vlc_meta_Get(p_node->p_item->p_meta, vlc_meta_Title);
180
+ EXPECT(p && !strcmp(p, "playlist0"));
181
+
182
+ const input_item_t *p_item = p_node->pp_children[0]->p_item;
183
+ EXPECT(p_item->psz_name && p_item->psz_uri);
184
+ EXPECT(!strcmp(NOPURI(0), p_item->psz_uri));
185
+ EXPECT(!strcmp("name0", p_item->psz_name));
186
+ p = vlc_meta_Get(p_item->p_meta, vlc_meta_Publisher);
187
+ EXPECT(p && !strcmp("group0", p));
188
+ p = vlc_meta_Get(p_item->p_meta, vlc_meta_ArtworkURL);
189
+
190
+ p_item = p_node->pp_children[1]->p_item;
191
+ EXPECT(p_item->psz_name && p_item->psz_uri);
192
+ EXPECT(!strcmp(NOPURI(1), p_item->psz_uri));
193
+ EXPECT(!strcmp("name1", p_item->psz_name));
194
+ p = vlc_meta_Get(p_item->p_meta, vlc_meta_Publisher);
195
+ EXPECT(p && !strcmp("group1", p));
196
+
197
+ p_item = p_node->pp_children[2]->p_item;
198
+ EXPECT(p_item->psz_name && p_item->psz_uri);
199
+ EXPECT(!strcmp(NOPURI(2), p_item->psz_uri));
200
+ EXPECT(!strcmp("name2", p_item->psz_name));
201
_service:obs_scm:vlc-beta.obsinfo
Changed
10
1
2
name: vlc-beta
3
-version: 20211123.aaff6519b2
4
-mtime: 1637657829
5
-commit: aaff6519b2d24675b9a3ef8a066ebb735ed29ee4
6
+version: 20211125.7195529927
7
+mtime: 1637847475
8
+commit: 7195529927c75d021a4427becd5119677f8fe0d7
9
10