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 165
View file
_service:obs_scm:vlc-beta-20220120.44414977b8.obscpio/contrib/src/ebml/missing-limits-include.patch
Added
@@ -0,0 +1,36 @@ +From f0bfd53647961e799a43d918c46cf3b6bff89806 Mon Sep 17 00:00:00 2001 +From: Moritz Bunkus <mo@bunkus.online> +Date: Sat, 27 Feb 2021 20:36:52 +0100 +Subject: [PATCH] include appropriate header files for std::numeric_limits + +Fixes #80. +--- + ChangeLog | 4 ++++ + src/EbmlString.cpp | 1 + + src/EbmlUnicodeString.cpp | 1 + + 3 files changed, 6 insertions(+) + +diff --git a/src/EbmlString.cpp b/src/EbmlString.cpp +index 27e55fd..4c05fcf 100644 +--- a/src/EbmlString.cpp ++++ b/src/EbmlString.cpp +@@ -34,6 +34,7 @@ + \author Steve Lhomme <robux4 @ users.sf.net> + */ + #include <cassert> ++#include <limits> + + #include "ebml/EbmlString.h" + +diff --git a/src/EbmlUnicodeString.cpp b/src/EbmlUnicodeString.cpp +index 496a16a..99fc073 100644 +--- a/src/EbmlUnicodeString.cpp ++++ b/src/EbmlUnicodeString.cpp +@@ -36,6 +36,7 @@ + */ + + #include <cassert> ++#include <limits> + + #include "ebml/EbmlUnicodeString.h" +
View file
_service:obs_scm:vlc-beta-20220119.f850dd9155.obscpio/contrib/src/ebml/rules.mak -> _service:obs_scm:vlc-beta-20220120.44414977b8.obscpio/contrib/src/ebml/rules.mak
Changed
@@ -14,6 +14,7 @@ ebml: libebml-$(EBML_VERSION).tar.xz .sum-ebml $(UNPACK) + $(APPLY) $(SRC)/ebml/missing-limits-include.patch $(MOVE) .ebml: ebml toolchain.cmake
View file
_service:obs_scm:vlc-beta-20220119.f850dd9155.obscpio/contrib/src/main.mak -> _service:obs_scm:vlc-beta-20220120.44414977b8.obscpio/contrib/src/main.mak
Changed
@@ -389,7 +389,7 @@ ifdef HAVE_DARWIN_OS AUTORECONF = AUTOPOINT=true autoreconf else -AUTORECONF = autoreconf +AUTORECONF = GTKDOCIZE=true autoreconf endif RECONF = mkdir -p -- $(PREFIX)/share/aclocal && \ cd $< && $(AUTORECONF) -fiv $(ACLOCAL_AMFLAGS)
View file
_service:obs_scm:vlc-beta-20220120.44414977b8.obscpio/contrib/src/qt/qt-fix-gcc11-build.patch
Added
@@ -0,0 +1,30 @@ +--- qt/src/corelib/global/qfloat16.h.old 2022-01-18 17:46:03.821787862 +0100 ++++ qt/src/corelib/global/qfloat16.h 2022-01-18 17:46:52.824906487 +0100 +@@ -44,6 +44,7 @@ + #include <QtCore/qglobal.h> + #include <QtCore/qmetatype.h> + #include <string.h> ++#include <limits> + + #if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__) + // All processors that support AVX2 do support F16C too. That doesn't mean +--- qt/src/corelib/text/qbytearraymatcher.h.old 2022-01-18 17:47:49.667887059 +0100 ++++ qt/src/corelib/text/qbytearraymatcher.h 2022-01-18 17:48:09.055540031 +0100 +@@ -41,6 +41,7 @@ + #define QBYTEARRAYMATCHER_H + + #include <QtCore/qbytearray.h> ++#include <limits> + + QT_BEGIN_NAMESPACE + +--- qt/src/3rdparty/angle/src/libANGLE/HandleAllocator.cpp.old 2022-01-18 17:55:16.527952044 +0100 ++++ qt/src/3rdparty/angle/src/libANGLE/HandleAllocator.cpp 2022-01-18 17:55:28.315744081 +0100 +@@ -10,6 +10,7 @@ + #include "libANGLE/HandleAllocator.h" + + #include <algorithm> ++#include <limits> + + #include "common/debug.h" +
View file
_service:obs_scm:vlc-beta-20220119.f850dd9155.obscpio/contrib/src/qt/rules.mak -> _service:obs_scm:vlc-beta-20220120.44414977b8.obscpio/contrib/src/qt/rules.mak
Changed
@@ -50,6 +50,7 @@ cd $(UNPACK_DIR); for i in QtFontDatabaseSupport QtWindowsUIAutomationSupport QtEventDispatcherSupport QtCore; do \ sed -i -e 's,"../../../../../src,"../src,g' include/$$i/$(QT_VERSION)/$$i/private/*.h; done endif + $(APPLY) $(SRC)/qt/qt-fix-gcc11-build.patch endif $(MOVE)
View file
_service:obs_scm:vlc-beta-20220120.44414977b8.obscpio/contrib/src/qtdeclarative/fix-gcc11-build.patch
Added
@@ -0,0 +1,11 @@ +--- qtdeclarative/src/3rdparty/masm/yarr/Yarr.h.old 2022-01-18 18:04:29.778230868 +0100 ++++ qtdeclarative/src/3rdparty/masm/yarr/Yarr.h 2022-01-18 18:04:57.625743037 +0100 +@@ -27,7 +27,7 @@ + + #pragma once + +-#include <limits.h> ++#include <limits> + #include "YarrErrorCode.h" + + namespace JSC { namespace Yarr {
View file
_service:obs_scm:vlc-beta-20220119.f850dd9155.obscpio/contrib/src/qtdeclarative/rules.mak -> _service:obs_scm:vlc-beta-20220120.44414977b8.obscpio/contrib/src/qtdeclarative/rules.mak
Changed
@@ -21,6 +21,7 @@ qtdeclarative: qtdeclarative-everywhere-src-$(QTDECLARATIVE_VERSION).tar.xz .sum-qtdeclarative $(UNPACK) + $(APPLY) $(SRC)/qtdeclarative/fix-gcc11-build.patch $(MOVE) QT_DECLARATIVE_CONFIG := \
View file
_service:obs_scm:vlc-beta-20220120.44414977b8.obscpio/contrib/src/srt/fix-gcc11-build.patch
Added
@@ -0,0 +1,22 @@ +From f1b35cbf5b9b42b031e9b119e4c802b5f744468c Mon Sep 17 00:00:00 2001 +From: Christophe Giboudeaux <krop@users.noreply.github.com> +Date: Wed, 10 Feb 2021 12:42:45 +0000 +Subject: [PATCH] [core] Fix build with GCC 11. (#1806) + +The 'limits' header must be included explicitly. +--- + srtcore/sync.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/srtcore/sync.h b/srtcore/sync.h +index 59c125a75..9f01ca91e 100644 +--- a/srtcore/sync.h ++++ b/srtcore/sync.h +@@ -15,6 +15,7 @@ + //#define ENABLE_CXX17 + + #include <cstdlib> ++#include <limits> + #ifdef ENABLE_STDCXX_SYNC + #include <chrono> + #include <thread>
View file
_service:obs_scm:vlc-beta-20220119.f850dd9155.obscpio/contrib/src/srt/rules.mak -> _service:obs_scm:vlc-beta-20220120.44414977b8.obscpio/contrib/src/srt/rules.mak
Changed
@@ -27,6 +27,7 @@ srt: srt-$(SRT_VERSION).tar.gz .sum-srt $(UNPACK) $(APPLY) $(SRC)/srt/0001-core-ifdef-MSG_TRUNC-nixes-fix.patch + $(APPLY) $(SRC)/srt/fix-gcc11-build.patch $(call pkg_static,"scripts/srt.pc.in") mv srt-$(SRT_VERSION) $@ && touch $@
View file
_service:obs_scm:vlc-beta-20220119.f850dd9155.obscpio/include/vlc_config_cat.h -> _service:obs_scm:vlc-beta-20220120.44414977b8.obscpio/include/vlc_config_cat.h
Changed
@@ -192,15 +192,15 @@ struct config_category_t { - int id; - int general_subcat; + enum vlc_config_cat id; + enum vlc_config_subcat general_subcat; const char *help; }; struct config_subcategory_t { - int id; - int cat; + enum vlc_config_subcat id; + enum vlc_config_cat cat; const char *name; const char *help; }; @@ -263,7 +263,7 @@ /** Get the table index for the given category entry. */ VLC_USED -static inline int vlc_config_cat_IndexOf( int cat ) +static inline int vlc_config_cat_IndexOf( enum vlc_config_cat cat ) { int index = -1; for( unsigned i = 0; i < ARRAY_SIZE(categories_array); i++ ) @@ -279,7 +279,7 @@ /** Get the table index for the given subcategory entry. */ VLC_USED -static inline int vlc_config_subcat_IndexOf( int subcat ) +static inline int vlc_config_subcat_IndexOf( enum vlc_config_subcat subcat ) { int index = -1; for( unsigned i = 0; i < ARRAY_SIZE(subcategories_array); i++ ) @@ -309,7 +309,7 @@ * a child node of a subcategory node. */ VLC_USED -static inline int vlc_config_cat_GetGeneralSubcat( int cat ) +static inline enum vlc_config_subcat vlc_config_cat_GetGeneralSubcat( enum vlc_config_cat cat ) { int i = vlc_config_cat_IndexOf( cat ); return (i != -1) ? categories_array[i].general_subcat : SUBCAT_UNKNOWN; @@ -317,7 +317,7 @@ /** Get the name for a subcategory. */ VLC_USED -static inline const char *vlc_config_subcat_GetName( int subcat ) +static inline const char *vlc_config_subcat_GetName( enum vlc_config_subcat subcat ) { int i = vlc_config_subcat_IndexOf( subcat ); return (i != -1) ? vlc_gettext(subcategories_array[i].name) : NULL; @@ -325,7 +325,7 @@ /** Get the help text for a subcategory. */ VLC_USED -static inline const char *vlc_config_subcat_GetHelp( int subcat ) +static inline const char *vlc_config_subcat_GetHelp( enum vlc_config_subcat subcat ) { int i = vlc_config_subcat_IndexOf( subcat ); return (i != -1) ? vlc_gettext(subcategories_array[i].help) : NULL; @@ -333,15 +333,15 @@ /** Get the name for a category. */ VLC_USED -static inline const char *vlc_config_cat_GetName( int cat ) +static inline const char *vlc_config_cat_GetName( enum vlc_config_cat cat ) { - int subcat = vlc_config_cat_GetGeneralSubcat( cat ); + enum vlc_config_subcat subcat = vlc_config_cat_GetGeneralSubcat( cat ); return vlc_config_subcat_GetName( subcat ); } /** Get the help text for a category. */ VLC_USED -static inline const char *vlc_config_cat_GetHelp( int cat ) +static inline const char *vlc_config_cat_GetHelp( enum vlc_config_cat cat ) { int i = vlc_config_cat_IndexOf( cat ); return (i != -1) ? vlc_gettext(categories_array[i].help) : NULL; @@ -349,7 +349,7 @@ /** Get the parent category for the given subcategory. */ VLC_USED -static inline int vlc_config_cat_FromSubcat( int subcat ) +static inline enum vlc_config_cat vlc_config_cat_FromSubcat( enum vlc_config_subcat subcat ) { int i = vlc_config_subcat_IndexOf( subcat ); return (i != -1) ? subcategories_array[i].cat : CAT_UNKNOWN; @@ -357,11 +357,11 @@ /** Check if the given subcategory is a "general" one. */ VLC_USED -static inline bool vlc_config_subcat_IsGeneral( int subcat ) +static inline bool vlc_config_subcat_IsGeneral( enum vlc_config_subcat subcat ) { if( subcat == SUBCAT_UNKNOWN ) return false; - int cat = vlc_config_cat_FromSubcat( subcat ); + enum vlc_config_cat cat = vlc_config_cat_FromSubcat( subcat ); return (subcat == vlc_config_cat_GetGeneralSubcat( cat )); }
View file
_service:obs_scm:vlc-beta-20220119.f850dd9155.obscpio/include/vlc_plugin.h -> _service:obs_scm:vlc-beta-20220120.44414977b8.obscpio/include/vlc_plugin.h
Changed
@@ -143,64 +143,75 @@ #define IsConfigFloatType(type) \ ((type) == CONFIG_ITEM_FLOAT) -/* Hidden categories and subcategories */ -/* Any options under this will be hidden in the GUI preferences, but will be - listed in cmdline help output. */ -#define CAT_HIDDEN -1 -#define SUBCAT_HIDDEN -1 - -/* Unknown/unset/invalid */ -#define CAT_UNKNOWN 0 -#define SUBCAT_UNKNOWN 0 - -/* Categories and subcategories */ -#define CAT_INTERFACE 1 -#define SUBCAT_INTERFACE_GENERAL 101 -#define SUBCAT_INTERFACE_MAIN 102 -#define SUBCAT_INTERFACE_CONTROL 103 -#define SUBCAT_INTERFACE_HOTKEYS 104 - -#define CAT_AUDIO 2 -#define SUBCAT_AUDIO_GENERAL 201 -#define SUBCAT_AUDIO_AOUT 202 -#define SUBCAT_AUDIO_AFILTER 203 -#define SUBCAT_AUDIO_VISUAL 204 -#define SUBCAT_AUDIO_RESAMPLER 206 - -#define CAT_VIDEO 3 -#define SUBCAT_VIDEO_GENERAL 301 -#define SUBCAT_VIDEO_VOUT 302 -#define SUBCAT_VIDEO_VFILTER 303 -#define SUBCAT_VIDEO_SUBPIC 305 -#define SUBCAT_VIDEO_SPLITTER 306 - -#define CAT_INPUT 4 -#define SUBCAT_INPUT_GENERAL 401 -#define SUBCAT_INPUT_ACCESS 402 -#define SUBCAT_INPUT_DEMUX 403 -#define SUBCAT_INPUT_VCODEC 404 -#define SUBCAT_INPUT_ACODEC 405 -#define SUBCAT_INPUT_SCODEC 406 -#define SUBCAT_INPUT_STREAM_FILTER 407 - -#define CAT_SOUT 5 -#define SUBCAT_SOUT_GENERAL 501 -#define SUBCAT_SOUT_STREAM 502 -#define SUBCAT_SOUT_MUX 503 -#define SUBCAT_SOUT_ACO 504 -#define SUBCAT_SOUT_PACKETIZER 505 -#define SUBCAT_SOUT_VOD 507 -#define SUBCAT_SOUT_RENDERER 508 - -#define CAT_ADVANCED 6 -#define SUBCAT_ADVANCED_MISC 602 -#define SUBCAT_ADVANCED_NETWORK 603 - -#define CAT_PLAYLIST 7 -#define SUBCAT_PLAYLIST_GENERAL 701 -#define SUBCAT_PLAYLIST_SD 702 -#define SUBCAT_PLAYLIST_EXPORT 703 +/* Config category */ +enum vlc_config_cat +{ + /* Hidden category. + Any options under this will be hidden in the GUI preferences, but will + be listed in cmdline help output. */ + CAT_HIDDEN = -1, + + CAT_UNKNOWN = 0, + + CAT_INTERFACE = 1, + CAT_AUDIO = 2, + CAT_VIDEO = 3, + CAT_INPUT = 4, + CAT_SOUT = 5, + CAT_ADVANCED = 6, + CAT_PLAYLIST = 7, +}; +/* Config subcategory */ +enum vlc_config_subcat +{ + /* Hidden subcategory. + Any options under this will be hidden in the GUI preferences, but will + be listed in cmdline help output. */ + SUBCAT_HIDDEN = -1, + + SUBCAT_UNKNOWN = 0, + + SUBCAT_INTERFACE_GENERAL = 101, + SUBCAT_INTERFACE_MAIN = 102, + SUBCAT_INTERFACE_CONTROL = 103, + SUBCAT_INTERFACE_HOTKEYS = 104, + + SUBCAT_AUDIO_GENERAL = 201, + SUBCAT_AUDIO_AOUT = 202, + SUBCAT_AUDIO_AFILTER = 203, + SUBCAT_AUDIO_VISUAL = 204, + SUBCAT_AUDIO_RESAMPLER = 206, + + SUBCAT_VIDEO_GENERAL = 301, + SUBCAT_VIDEO_VOUT = 302, + SUBCAT_VIDEO_VFILTER = 303, + SUBCAT_VIDEO_SUBPIC = 305, + SUBCAT_VIDEO_SPLITTER = 306, + + SUBCAT_INPUT_GENERAL = 401, + SUBCAT_INPUT_ACCESS = 402, + SUBCAT_INPUT_DEMUX = 403, + SUBCAT_INPUT_VCODEC = 404, + SUBCAT_INPUT_ACODEC = 405, + SUBCAT_INPUT_SCODEC = 406, + SUBCAT_INPUT_STREAM_FILTER = 407, + + SUBCAT_SOUT_GENERAL = 501, + SUBCAT_SOUT_STREAM = 502, + SUBCAT_SOUT_MUX = 503, + SUBCAT_SOUT_ACO = 504, + SUBCAT_SOUT_PACKETIZER = 505, + SUBCAT_SOUT_VOD = 507, + SUBCAT_SOUT_RENDERER = 508, + + SUBCAT_ADVANCED_MISC = 602, + SUBCAT_ADVANCED_NETWORK = 603, + + SUBCAT_PLAYLIST_GENERAL = 701, + SUBCAT_PLAYLIST_SD = 702, + SUBCAT_PLAYLIST_EXPORT = 703, +}; /** * Current plugin ABI version
View file
_service:obs_scm:vlc-beta-20220119.f850dd9155.obscpio/modules/codec/avcodec/video.c -> _service:obs_scm:vlc-beta-20220120.44414977b8.obscpio/modules/codec/avcodec/video.c
Changed
@@ -529,7 +529,9 @@ i_thread_count = __MIN( i_thread_count, p_codec->id == AV_CODEC_ID_HEVC ? 32 : 16 ); msg_Dbg( p_dec, "allowing %d thread(s) for decoding", i_thread_count ); p_context->thread_count = i_thread_count; +#if LIBAVCODEC_VERSION_MAJOR < 60 p_context->thread_safe_callbacks = true; +#endif switch( p_codec->id ) {
View file
_service:obs_scm:vlc-beta-20220119.f850dd9155.obscpio/modules/demux/Makefile.am -> _service:obs_scm:vlc-beta-20220120.44414977b8.obscpio/modules/demux/Makefile.am
Changed
@@ -45,6 +45,9 @@ libnsv_plugin_la_SOURCES = demux/nsv.c demux_LTLIBRARIES += libnsv_plugin.la +libhx_plugin_la_SOURCES = demux/hx.c +demux_LTLIBRARIES += libhx_plugin.la + libps_plugin_la_SOURCES = demux/mpeg/ps.c demux/mpeg/ps.h demux/mpeg/pes.h demux_LTLIBRARIES += libps_plugin.la
View file
_service:obs_scm:vlc-beta-20220120.44414977b8.obscpio/modules/demux/hx.c
Added
@@ -0,0 +1,385 @@ +/***************************************************************************** + * hx.c : raw video / audio IP cam demuxer + ***************************************************************************** + * Copyright (C) 2022 - VideoLabs, 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. + *****************************************************************************/ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include <vlc_common.h> +#include <vlc_plugin.h> +#include <vlc_demux.h> + +/* All Marker formats: + * [tag.4][size.4][tag dependant.8] */ +static const char HXVS[4] = { 'H', 'X', 'V', 'S' }; /* H264 file tag */ +static const char HXVT[4] = { 'H', 'X', 'V', 'T' }; /* HEVC */ +static const char HXVF[4] = { 'H', 'X', 'V', 'F' }; /* Video samples */ +static const char HXAF[4] = { 'H', 'X', 'A', 'F' }; /* Audio samples */ +static const char HXFI[4] = { 'H', 'X', 'F', 'I' }; /* RAP Index */ + +#define HX_HEADER_SIZE 16 +#define HX_INDEX_SIZE 200000 + +struct hxfi_index +{ + uint32_t offset; + uint32_t time; +}; + +typedef struct +{ + es_out_id_t *p_es_video; + es_out_id_t *p_es_audio; + vlc_tick_t video_pts; + vlc_tick_t audio_pts; + vlc_tick_t pcr; + uint32_t video_pts_offset; + uint32_t audio_pts_offset; + uint32_t duration; + DECL_ARRAY(struct hxfi_index) index; +} hx_sys_t; + +static int LoadIndex(demux_t *p_demux) +{ + hx_sys_t *p_sys = p_demux->p_sys; + + /* From what I understand: + * Header HXFI[size.4][duration.4][?.4] + * Size is always 200K, predictable file offset + * All indexes entries are 4/4 bytes + * zero filled empty entries + */ + + uint64_t size; + if(vlc_stream_GetSize(p_demux->s, &size) != VLC_SUCCESS || + size < HX_INDEX_SIZE + HX_HEADER_SIZE) + return VLC_EGENERIC; + + if(vlc_stream_Seek(p_demux->s, size - HX_INDEX_SIZE - HX_HEADER_SIZE) != VLC_SUCCESS) + return VLC_EGENERIC; + + uint8_t temp[HX_HEADER_SIZE]; + if(vlc_stream_Read(p_demux->s, temp, HX_HEADER_SIZE) != HX_HEADER_SIZE || + memcmp(temp, HXFI, 4)) + { + msg_Warn(p_demux, "Could not find index at expected location"); + return VLC_EGENERIC; + } + + p_sys->duration = GetDWLE(temp + 8); + msg_Dbg(p_demux, "Reading Index Length @%" PRIu32 "ms", p_sys->duration); + + uint32_t prevtime = UINT32_MAX; + for(;;) + { + if(vlc_stream_Read(p_demux->s, temp, 8) != 8) + break; + struct hxfi_index entry; + entry.offset = GetDWLE(temp); + entry.time = GetDWLE(temp + 4); + if(entry.offset == 0) + break; + if(entry.time != prevtime) + { + prevtime = entry.time; + ARRAY_APPEND(p_sys->index, entry); + } + } + msg_Dbg(p_demux, "Using %d entries from HXFI index", p_sys->index.i_size); + return VLC_SUCCESS; +} + +static struct hxfi_index LookupIndex(hx_sys_t *p_sys, uint32_t time) +{ + struct hxfi_index entry = { 0, 0 }; + if(p_sys->index.i_size) + { + unsigned l = 0, h = p_sys->index.i_size - 1; + while(l <= h) + { + unsigned m = (l + h) >> 1; + if(p_sys->index.p_elems[m].time > time) + { + if(m == 0) + break; + h = m -1; + } + else + { + /* store lowest as temp result */ + entry = p_sys->index.p_elems[m]; + if(entry.time == time) + break; + l = m + 1; + } + }; + } + return entry; +} + +static int Demux(demux_t *p_demux) +{ + hx_sys_t *p_sys = p_demux->p_sys; + + uint8_t header[HX_HEADER_SIZE]; + if(vlc_stream_Read(p_demux->s, header, HX_HEADER_SIZE) != HX_HEADER_SIZE) + return VLC_DEMUXER_EOF; + + es_out_id_t *es = NULL; + vlc_tick_t *ppts; + uint32_t *ppts_offset; + + if(!memcmp(header, HXVF, 4)) + { + es = p_sys->p_es_video; + ppts = &p_sys->video_pts; + ppts_offset = &p_sys->video_pts_offset; + } + else if(!memcmp(header, HXAF, 4)) + { + es = p_sys->p_es_audio; + ppts = &p_sys->audio_pts; + ppts_offset = &p_sys->audio_pts_offset; + } + else if(!memcmp(header, HXVS, 4) || !memcmp(header, HXVT, 4)) + { + return VLC_DEMUXER_SUCCESS; + } + else + { + msg_Dbg(p_demux, "EOF on %4.4s", (const char *) header); + return VLC_DEMUXER_EOF; + } + + uint32_t sz = GetDWLE(header + 4); + int i_ret = VLC_DEMUXER_SUCCESS; + + if(es) + { + /* [HXAF.4][size.4][pts.4][?.4] */ + /* [HXVF.4][size.4][pts.4][?.4] */ + *ppts = VLC_TICK_0; + if(*ppts_offset != UINT32_MAX) + *ppts += VLC_TICK_FROM_MS(GetDWLE(&header[8]) - *ppts_offset); + else + *ppts_offset = GetDWLE(&header[8]); + + block_t *p_block = vlc_stream_Block(p_demux->s, sz); + if(p_block == NULL) + return VLC_DEMUXER_EOF; + + if(p_block->i_buffer < sz) + i_ret = VLC_DEMUXER_EOF; + + if(p_sys->p_es_audio == es) + { + /* HXAF sample format prefix [?.1/channels.1/rate.1/?.1] */ + const uint8_t audioprefix[4] = {0x00, 0x01, 0x50, 0x00}; + if(p_block->i_buffer >= 4 && + !memcmp(p_block->p_buffer, audioprefix, 4)) + { + p_block->i_buffer -= 4; + p_block->p_buffer += 4; + }
View file
_service:obs_scm:vlc-beta-20220119.f850dd9155.obscpio/modules/gui/macosx/preferences/prefs.m -> _service:obs_scm:vlc-beta-20220120.44414977b8.obscpio/modules/gui/macosx/preferences/prefs.m
Changed
@@ -111,25 +111,25 @@ @interface VLCTreeBranchItem : VLCTreeItem { enum VLCTreeBranchType _branchType; - int _category; - int _subcategory; + enum vlc_config_cat _category; + enum vlc_config_subcat _subcategory; /* for plugin type */ module_config_t * _configItems; unsigned int _configSize; } -+ (VLCTreeBranchItem *)newCategoryTreeBranch:(int)category; -+ (VLCTreeBranchItem *)newSubcategoryTreeBranch:(int)subcategory; ++ (VLCTreeBranchItem *)newCategoryTreeBranch:(enum vlc_config_cat)category; ++ (VLCTreeBranchItem *)newSubcategoryTreeBranch:(enum vlc_config_subcat)subcategory; + (VLCTreeBranchItem *)newPluginTreeBranch:(module_t *)plugin; -- (id)initWithCategory:(int)category; -- (id)initWithSubcategory:(int)subcategory; +- (id)initWithCategory:(enum vlc_config_cat)category; +- (id)initWithSubcategory:(enum vlc_config_subcat)subcategory; - (id)initWithPlugin:(module_t *)plugin; -- (VLCTreeBranchItem *)childRepresentingSubcategory:(int)category; +- (VLCTreeBranchItem *)childRepresentingSubcategory:(enum vlc_config_cat)category; - (enum VLCTreeBranchType)branchType; -- (int)category; -- (int)subcategory; +- (enum vlc_config_cat)category; +- (enum vlc_config_subcat)subcategory; - (module_config_t *)configItems; - (unsigned int)configSize; @end @@ -148,7 +148,7 @@ { module_config_t * _configItems; } -- (VLCTreeBranchItem *)childRepresentingCategory:(int)category; +- (VLCTreeBranchItem *)childRepresentingCategory:(enum vlc_config_cat)category; @end #pragma mark - @@ -446,7 +446,7 @@ #pragma mark - @implementation VLCTreeMainItem -- (VLCTreeBranchItem *)childRepresentingCategory:(int)category +- (VLCTreeBranchItem *)childRepresentingCategory:(enum vlc_config_cat)category { NSUInteger childrenCount = [[self children] count]; for (int i = 0; i < childrenCount; i++) { @@ -476,8 +476,8 @@ VLCTreeBranchItem * subcategoryItem = nil; VLCTreeBranchItem * pluginItem = nil; module_config_t *p_configs = NULL; - int cat = CAT_UNKNOWN; - int subcat = SUBCAT_UNKNOWN; + enum vlc_config_cat cat = CAT_UNKNOWN; + enum vlc_config_subcat subcat = SUBCAT_UNKNOWN; bool subcat_is_general = false; bool plugin_node_added = false; bool pending_tree_node_creation = false; @@ -503,7 +503,7 @@ int configType = p_configs[j].i_type; if (configType == CONFIG_SUBCATEGORY) { - subcat = (int) p_configs[j].value.i; + subcat = (enum vlc_config_subcat) p_configs[j].value.i; cat = vlc_config_cat_FromSubcat(subcat); subcat_is_general = vlc_config_subcat_IsGeneral(subcat); pending_tree_node_creation = true; @@ -603,16 +603,16 @@ #pragma mark - @implementation VLCTreeBranchItem -+ (VLCTreeBranchItem *)newCategoryTreeBranch:(int)category ++ (VLCTreeBranchItem *)newCategoryTreeBranch:(enum vlc_config_cat)category { if (!vlc_config_cat_GetName(category)) { - msg_Err(getIntf(), "failed to get name for category %i", category); + msg_Err(getIntf(), "failed to get name for category %i", (int)category); return nil; } return [[[self class] alloc] initWithCategory:category]; } -+ (VLCTreeBranchItem *)newSubcategoryTreeBranch:(int)subcategory ++ (VLCTreeBranchItem *)newSubcategoryTreeBranch:(enum vlc_config_subcat)subcategory { if (!vlc_config_subcat_GetName(subcategory)) return nil; @@ -624,7 +624,7 @@ return [[[self class] alloc] initWithPlugin:plugin]; } -- (id)initWithCategory:(int)category +- (id)initWithCategory:(enum vlc_config_cat)category { NSString * name = _NS(vlc_config_cat_GetName(category)); if (self = [super initWithName:name]) { @@ -638,7 +638,7 @@ return self; } -- (id)initWithSubcategory:(int)subcategory +- (id)initWithSubcategory:(enum vlc_config_subcat)subcategory { NSString * name = _NS(vlc_config_subcat_GetName(subcategory)); if (self = [super initWithName:name]) { @@ -672,7 +672,7 @@ module_config_free(_configItems); } -- (VLCTreeBranchItem *)childRepresentingSubcategory:(int)subcategory +- (VLCTreeBranchItem *)childRepresentingSubcategory:(enum vlc_config_subcat)subcategory { assert([self isKindOfClass:[VLCTreeBranchItem class]]); NSUInteger childrenCount = [[self children] count]; @@ -689,12 +689,12 @@ return _branchType; } -- (int)category +- (enum vlc_config_cat)category { return _category; } -- (int)subcategory +- (enum vlc_config_subcat)subcategory { return _subcategory; }
View file
_service:obs_scm:vlc-beta-20220119.f850dd9155.obscpio/modules/gui/qt/dialogs/preferences/complete_preferences.cpp -> _service:obs_scm:vlc-beta-20220120.44414977b8.obscpio/modules/gui/qt/dialogs/preferences/complete_preferences.cpp
Changed
@@ -65,8 +65,8 @@ main_module = module_get_main(); assert( main_module ); - int cat = CAT_UNKNOWN; - int subcat = SUBCAT_UNKNOWN; + enum vlc_config_cat cat = CAT_UNKNOWN; + enum vlc_config_subcat subcat = SUBCAT_UNKNOWN; QTreeWidgetItem *cat_item = nullptr; /* Create base cat/subcat tree from core config set */ @@ -80,7 +80,7 @@ if( p_item->i_type != CONFIG_SUBCATEGORY ) continue; - subcat = p_item->value.i; + subcat = (enum vlc_config_subcat) p_item->value.i; cat = vlc_config_cat_FromSubcat(subcat); if( cat == CAT_UNKNOWN || cat == CAT_HIDDEN ) @@ -124,7 +124,7 @@ if( p_item->i_type == CONFIG_SUBCATEGORY ) { - subcat = p_item->value.i; + subcat = (enum vlc_config_subcat) p_item->value.i; cat = vlc_config_cat_FromSubcat( subcat ); continue; } @@ -180,9 +180,9 @@ resizeColumnToContents( 0 ); } -QTreeWidgetItem *PrefsTree::createCatNode( int cat ) +QTreeWidgetItem *PrefsTree::createCatNode( enum vlc_config_cat cat ) { - int general_subcat = vlc_config_cat_GetGeneralSubcat( cat ); + enum vlc_config_subcat general_subcat = vlc_config_cat_GetGeneralSubcat( cat ); assert(general_subcat != SUBCAT_UNKNOWN && general_subcat != SUBCAT_HIDDEN); PrefsTreeItem *item = new PrefsTreeItem( PrefsTreeItem::CATEGORY_NODE ); @@ -212,8 +212,8 @@ item->setIcon( 0, icon ); //current_item->setSizeHint( 0, QSize( -1, ITEM_HEIGHT ) ); - int cat_index = vlc_config_cat_IndexOf( cat ); - int general_subcat_index = vlc_config_subcat_IndexOf( general_subcat ); + int cat_index = (int) vlc_config_cat_IndexOf( cat ); + int general_subcat_index = (int) vlc_config_subcat_IndexOf( general_subcat ); this->catMap[cat_index] = item; this->subcatMap[general_subcat_index] = item; @@ -223,7 +223,7 @@ return item; } -QTreeWidgetItem *PrefsTree::createSubcatNode( QTreeWidgetItem * cat, int subcat ) +QTreeWidgetItem *PrefsTree::createSubcatNode( QTreeWidgetItem * cat, enum vlc_config_subcat subcat ) { assert( cat ); @@ -238,7 +238,7 @@ item->setText( 0, item->name ); //item->setSizeHint( 0, QSize( -1, ITEM_HEIGHT ) ); - int subcat_index = vlc_config_subcat_IndexOf( subcat ); + int subcat_index = (int) vlc_config_subcat_IndexOf( subcat ); this->subcatMap[subcat_index] = item; cat->addChild( item ); @@ -269,13 +269,13 @@ parent->addChild( item ); } -QTreeWidgetItem *PrefsTree::findCatItem( int cat ) +QTreeWidgetItem *PrefsTree::findCatItem( enum vlc_config_cat cat ) { int cat_index = vlc_config_cat_IndexOf( cat ); return this->catMap[cat_index]; } -QTreeWidgetItem *PrefsTree::findSubcatItem( int subcat ) +QTreeWidgetItem *PrefsTree::findSubcatItem( enum vlc_config_subcat subcat ) { int subcat_index = vlc_config_subcat_IndexOf( subcat ); return this->subcatMap[subcat_index]; @@ -461,7 +461,7 @@ bool PrefsTreeItem::contains( const QString &text, Qt::CaseSensitivity cs ) { bool is_core = this->node_type != PrefsTreeItem::PLUGIN_NODE; - int id = this->subcat_id; + enum vlc_config_subcat id = this->subcat_id; /* find our module */ module_t *p_module;
View file
_service:obs_scm:vlc-beta-20220119.f850dd9155.obscpio/modules/gui/qt/dialogs/preferences/complete_preferences.hpp -> _service:obs_scm:vlc-beta-20220120.44414977b8.obscpio/modules/gui/qt/dialogs/preferences/complete_preferences.hpp
Changed
@@ -78,8 +78,8 @@ AdvPrefsPanel *panel; QString name; QString help; - int cat_id; - int subcat_id; + enum vlc_config_cat cat_id; + enum vlc_config_subcat subcat_id; module_t *p_module; char *module_name; bool module_is_loaded; @@ -101,11 +101,11 @@ } private: - QTreeWidgetItem *createCatNode( int cat ); - QTreeWidgetItem *createSubcatNode( QTreeWidgetItem * cat, int subcat ); + QTreeWidgetItem *createCatNode( enum vlc_config_cat cat ); + QTreeWidgetItem *createSubcatNode( QTreeWidgetItem * cat, enum vlc_config_subcat subcat ); void createPluginNode( QTreeWidgetItem * parent, module_t *mod ); - QTreeWidgetItem *findCatItem( int cat ); - QTreeWidgetItem *findSubcatItem( int subcat ); + QTreeWidgetItem *findCatItem( enum vlc_config_cat cat ); + QTreeWidgetItem *findSubcatItem( enum vlc_config_subcat subcat ); bool filterItems( PrefsTreeItem *item, const QString &text, Qt::CaseSensitivity cs ); bool collapseUnselectedItems( PrefsTreeItem *item ); void updateLoadedStatus( PrefsTreeItem *item , QSet<QString> *loaded );
View file
_service:obs_scm:vlc-beta-20220119.f850dd9155.obscpio/modules/gui/qt/maininterface/compositor_win7.cpp -> _service:obs_scm:vlc-beta-20220120.44414977b8.obscpio/modules/gui/qt/maininterface/compositor_win7.cpp
Changed
@@ -160,8 +160,8 @@ void CompositorWin7::unloadGUI() { - commonGUIDestroy(); m_qmlView.reset(); + commonGUIDestroy(); } bool CompositorWin7::setupVoutWindow(vout_window_t *p_wnd, VoutDestroyCb destroyCb)
View file
_service:obs_scm:vlc-beta-20220119.f850dd9155.obscpio/modules/gui/qt/maininterface/compositor_x11.cpp -> _service:obs_scm:vlc-beta-20220120.44414977b8.obscpio/modules/gui/qt/maininterface/compositor_x11.cpp
Changed
@@ -188,8 +188,8 @@ void CompositorX11::unloadGUI() { m_renderWindow->stopRendering(); - commonGUIDestroy(); m_qmlView.reset(); + commonGUIDestroy(); } void CompositorX11::onSurfacePositionChanged(const QPointF& position)
View file
_service:obs_scm:vlc-beta-20220119.f850dd9155.obscpio/modules/gui/qt/maininterface/mainui.cpp -> _service:obs_scm:vlc-beta-20220120.44414977b8.obscpio/modules/gui/qt/maininterface/mainui.cpp
Changed
@@ -66,49 +66,29 @@ template<class T> class SingletonRegisterHelper { - static QPointer<QObject> m_instance; - static QQmlEngine::ObjectOwnership m_ownership; + static QPointer<T> m_instance; public: static QObject* callback(QQmlEngine *engine, QJSEngine *) { assert(m_instance); - engine->setObjectOwnership(m_instance, m_ownership); + engine->setObjectOwnership(m_instance, QQmlEngine::ObjectOwnership::CppOwnership); return m_instance; } - template<class T2 = T, typename... Args> - static auto getCallback(Args&&... args) - { - if (!m_instance) - { - m_ownership = QQmlEngine::ObjectOwnership::JavaScriptOwnership; - m_instance = new T2(std::forward<Args>(args)...); - assert(!m_instance->parent()); - } - else - assert(sizeof...(args) == 0); - - return callback; - } - - template<class T2 = T> - static void setInstance(T2& instance) + static void setInstance(T* instance) { assert(!m_instance); - m_ownership = QQmlEngine::ObjectOwnership::CppOwnership; - m_instance = &instance; + m_instance = instance; } - static auto getInstance() + static T* getInstance() { - return static_cast<T*>(m_instance); + return m_instance; } }; template<class T> -QQmlEngine::ObjectOwnership SingletonRegisterHelper<T>::m_ownership = QQmlEngine::ObjectOwnership::JavaScriptOwnership; -template<class T> -QPointer<QObject> SingletonRegisterHelper<T>::m_instance = nullptr; +QPointer<T> SingletonRegisterHelper<T>::m_instance = nullptr; template<class T> void registerAnonymousType( const char *uri, int versionMajor ) @@ -135,18 +115,24 @@ assert(m_mainCtx); assert(m_interfaceWindow); - SingletonRegisterHelper<MainCtx>::setInstance(*mainCtx); + SingletonRegisterHelper<MainCtx>::setInstance(mainCtx); assert(m_intf->p_mainPlayerController); - SingletonRegisterHelper<PlayerController>::setInstance(*m_intf->p_mainPlayerController); + SingletonRegisterHelper<PlayerController>::setInstance(m_intf->p_mainPlayerController); assert(DialogsProvider::getInstance()); - SingletonRegisterHelper<DialogsProvider>::setInstance(*DialogsProvider::getInstance()); + SingletonRegisterHelper<DialogsProvider>::setInstance(DialogsProvider::getInstance()); + + SingletonRegisterHelper<NavigationHistory>::setInstance( new NavigationHistory(this) ); + SingletonRegisterHelper<I18n>::setInstance( new I18n(this) ); + SingletonRegisterHelper<SystemPalette>::setInstance( new SystemPalette(this) ); + SingletonRegisterHelper<DialogModel>::setInstance( new DialogModel(m_intf, this)); + SingletonRegisterHelper<QmlKeyHelper>::setInstance( new QmlKeyHelper(this) ); if (m_mainCtx->hasMediaLibrary()) { assert(m_mainCtx->getMediaLibrary()); - SingletonRegisterHelper<MediaLib>::setInstance(*m_mainCtx->getMediaLibrary()); + SingletonRegisterHelper<MediaLib>::setInstance(m_mainCtx->getMediaLibrary()); } registerQMLTypes(); @@ -217,13 +203,13 @@ const int versionMinor = 1; qmlRegisterSingletonType<MainCtx>(uri, versionMajor, versionMinor, "MainCtx", SingletonRegisterHelper<MainCtx>::callback); - qmlRegisterSingletonType<NavigationHistory>(uri, versionMajor, versionMinor, "History", SingletonRegisterHelper<NavigationHistory>::getCallback()); + qmlRegisterSingletonType<NavigationHistory>(uri, versionMajor, versionMinor, "History", SingletonRegisterHelper<NavigationHistory>::callback); qmlRegisterSingletonType<PlayerController>(uri, versionMajor, versionMinor, "Player", SingletonRegisterHelper<PlayerController>::callback); - qmlRegisterSingletonType<I18n>(uri, versionMajor, versionMinor, "I18n", SingletonRegisterHelper<I18n>::getCallback()); + qmlRegisterSingletonType<I18n>(uri, versionMajor, versionMinor, "I18n", SingletonRegisterHelper<I18n>::callback); qmlRegisterSingletonType<DialogsProvider>(uri, versionMajor, versionMinor, "DialogsProvider", SingletonRegisterHelper<DialogsProvider>::callback); - qmlRegisterSingletonType<SystemPalette>(uri, versionMajor, versionMinor, "SystemPalette", SingletonRegisterHelper<SystemPalette>::getCallback()); - qmlRegisterSingletonType<DialogModel>(uri, versionMajor, versionMinor, "DialogModel", SingletonRegisterHelper<DialogModel>::getCallback(m_intf)); - qmlRegisterSingletonType<QmlKeyHelper>(uri, versionMajor, versionMinor, "KeyHelper", SingletonRegisterHelper<QmlKeyHelper>::getCallback()); + qmlRegisterSingletonType<SystemPalette>(uri, versionMajor, versionMinor, "SystemPalette", SingletonRegisterHelper<SystemPalette>::callback); + qmlRegisterSingletonType<DialogModel>(uri, versionMajor, versionMinor, "DialogModel", SingletonRegisterHelper<DialogModel>::callback); + qmlRegisterSingletonType<QmlKeyHelper>(uri, versionMajor, versionMinor, "KeyHelper", SingletonRegisterHelper<QmlKeyHelper>::callback); qmlRegisterUncreatableType<QAbstractItemModel>(uri, versionMajor, versionMinor, "QtAbstractItemModel", ""); qmlRegisterUncreatableType<QWindow>(uri, versionMajor, versionMinor, "QtWindow", ""); @@ -349,4 +335,3 @@ msg_Warn( m_intf, "qml error %s:%i %s", qtu(error.url().toString()), error.line(), qtu(error.description()) ); } } -
View file
_service:obs_scm:vlc-beta.obsinfo
Changed
@@ -1,5 +1,5 @@ name: vlc-beta -version: 20220119.f850dd9155 -mtime: 1642600189 -commit: f850dd91554acc829dd0160e69382dfaa701f991 +version: 20220120.44414977b8 +mtime: 1642685637 +commit: 44414977b87af755837bc6ef6c66b5d19ed11c57
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
.