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