[vlc-commits] [Git][videolan/vlc][master] 4 commits: fourcc: define code point for RTP video/raw
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC Commits: 77eab7cd by Rémi Denis-Courmont at 2022-03-16T07:46:28+00:00 fourcc: define code point for RTP video/raw - - - - - 2ba4b4e5 by Rémi Denis-Courmont at 2022-03-16T07:46:28+00:00 rtp: helpers to parse a=fmtp lines - - - - - ba8e70e2 by Rémi Denis-Courmont at 2022-03-16T07:46:28+00:00 rtp: raw video payload format parser - - - - - 75c7e781 by Rémi Denis-Courmont at 2022-03-16T07:46:28+00:00 rtp: decoder for RTP video/raw (RFC4175) This implements progressive content for most formats defined in IETF RFC4175. This only takes care of converting the RTP payloads into VLC picture buffers; parsing the RTP headers remains the job of the RTP access module. For consistency, this uses exclusively planar formats. Later optimisations could substitute packed formats selectively. - - - - - 7 changed files: - include/vlc_fourcc.h - modules/access/rtp/Makefile.am - + modules/access/rtp/fmtp.h - + modules/access/rtp/raw.c - modules/codec/Makefile.am - + modules/codec/rtp-rawvid.c - src/misc/fourcc_list.h Changes: = include/vlc_fourcc.h = @@ -193,6 +193,7 @@ #define VLC_CODEC_IMM5VLC_FOURCC('I','M','M','5') #define VLC_CODEC_AGM VLC_FOURCC('A','G','M','0') #define VLC_CODEC_NOTCHLC VLC_FOURCC('n','c','l','c') +#define VLC_CODEC_RTP_VIDEO_RAW VLC_FOURCC('R','T','P','V') /*** * Chromas = modules/access/rtp/Makefile.am = @@ -28,12 +28,15 @@ librtp_plugin_la_LIBADD += libvlc_srtp.la $(GCRYPT_LIBS) librtp_plugin_la_DEPENDENCIES += libvlc_srtp.la endif +noinst_HEADERS += access/rtp/fmtp.h + # RTP payload parser plugins rtpparsedir = $(accessdir)/rtp rtpparse_LTLIBRARIES = \ librtp_ac3_plugin.la \ librtp_mpeg12_plugin.la \ librtp_pcm_plugin.la \ + librtp_raw_plugin.la \ librtp_h264_plugin.la \ librtp_xiph_plugin.la @@ -43,6 +46,8 @@ librtp_mpeg12_plugin_la_SOURCES = access/rtp/mpeg12.c librtp_pcm_plugin_la_SOURCES = access/rtp/pcm.c librtp_pcm_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/access/rtp +librtp_raw_plugin_la_SOURCES = access/rtp/raw.c + librtp_h264_plugin_la_SOURCES = access/rtp/h264.c librtp_xiph_plugin_la_SOURCES = access/rtp/xiph.c = modules/access/rtp/fmtp.h = @@ -0,0 +1,106 @@ +/** + * @file fmtp.h + * @brief SDP format parameters (fmtp) helpers + */ +/* + * Copyright © 2022 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 + / + +#include +#include +#include +#include + +static inline +const char *vlc_sdp_fmtp_get_str(const struct vlc_sdp_pt *desc, + const char *name, size_t *restrict lenp) +{ +const char *p = desc->parameters; +size_t namelen = strlen(name); + +while (p != NULL) { +p += strspn(p, " "); + +if (strncmp(p, name, namelen) == 0 && p[namelen] == '=') { +p += namelen + 1; +*lenp = strcspn(p, ";"); +return p; +} + +p = strchr(p, ';'); +if (p != NULL) +p++; +} + +return NULL; +} + +static +int vlc_sdp_fmtp_get_ull(const struct vlc_sdp_pt *desc, const char *name, + unsigned long long *restrict res) +{ +size_t len; +const char *n = vlc_sdp_fmtp_get_str(desc, name, &len); +if (n == NULL) +return -ENOENT; +if (len == 0) +return -EINVAL; + +char *end; +unsigned long long ull = strtoull(n, &end, 10); +if (end != n + len) +return -EINVAL; + +*res = ull; +return 0; +} + +static inline +int vlc_sdp_fmtp_get_u16(const struct vlc_sdp_pt *desc, const char *name, + uint16_t *restrict res) +{ +unsigned long long ull; +int err = vlc_sdp_fmtp_get_ull(desc, name, &ull); +if (err == 0) { +if (ull >> 16) +return -ERANGE; + +*res = ull; +} +return err; +} + +s
[vlc-commits] [Git][videolan/vlc][master] vlc_timestamp_helper: fix compilation from C++ modules
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC Commits: cd570400 by Steve Lhomme at 2022-03-16T08:51:05+00:00 vlc_timestamp_helper: fix compilation from C++ modules - - - - - 1 changed file: - include/vlc_timestamp_helper.h Changes: = include/vlc_timestamp_helper.h = @@ -43,10 +43,10 @@ typedef struct static inline timestamp_fifo_t *timestamp_FifoNew(uint32_t capacity) { -timestamp_fifo_t *fifo = calloc(1, sizeof(*fifo)); +timestamp_fifo_t *fifo = (timestamp_fifo_t *)calloc(1, sizeof(*fifo)); if (!fifo) return NULL; -fifo->buffer = vlc_alloc(capacity, sizeof(*fifo->buffer)); +fifo->buffer = (vlc_tick_t*)vlc_alloc(capacity, sizeof(*fifo->buffer)); if (!fifo->buffer) { free(fifo); return NULL; View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/cd570400d71a4afb79802d0b32718230544e7f69 -- View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/cd570400d71a4afb79802d0b32718230544e7f69 You're receiving this email because of your account on code.videolan.org. VideoLAN code repository instance___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] [Git][videolan/vlc][master] libvlc: media: remove state handling
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC Commits: a0b1b870 by Thomas Guillem at 2022-03-16T10:01:32+00:00 libvlc: media: remove state handling Incomplete since c0c35a50025df54cee95ddb00b325438b1f47e5e The state should be fetched from the player, the list_player or the parser. Fixes #26705 - - - - - 6 changed files: - include/vlc/libvlc_events.h - include/vlc/libvlc_media.h - lib/libvlc.sym - lib/media.c - lib/media_internal.h - lib/media_player.c Changes: = include/vlc/libvlc_events.h = @@ -72,17 +72,12 @@ enum libvlc_event_e { libvlc_MediaParsedChanged, /* Removed: libvlc_MediaFreed, */ +/* Removed: libvlc_MediaStateChanged */ -/** - * \link #libvlc_state_t State\endlink of the \link - * #libvlc_media_t media item\endlink changed - * \see libvlc_media_get_state() - */ -libvlc_MediaStateChanged = libvlc_MediaParsedChanged + 2, /** * Subitem tree was added to a \link #libvlc_media_t media item\endlink */ -libvlc_MediaSubItemTreeAdded, +libvlc_MediaSubItemTreeAdded = libvlc_MediaParsedChanged + 3, /** * A thumbnail generation for this \link #libvlc_media_t media \endlink completed. * \see libvlc_media_thumbnail_request_by_time() = include/vlc/libvlc_media.h = @@ -496,20 +496,6 @@ LIBVLC_API void libvlc_media_set_meta( libvlc_media_t *p_md, */ LIBVLC_API int libvlc_media_save_meta( libvlc_media_t *p_md ); - -/** - * Get current state of media descriptor object. Possible media states are - * libvlc_NothingSpecial=0, libvlc_Opening, libvlc_Playing, libvlc_Paused, - * libvlc_Stopped, libvlc_Stopping, libvlc_Error. - * - * \see libvlc_state_t - * \param p_md a media descriptor object - * \return state of media descriptor object - */ -LIBVLC_API libvlc_state_t libvlc_media_get_state( - libvlc_media_t *p_md ); - - /** * Get the current statistics about the media * \param p_md media descriptor object = lib/libvlc.sym = @@ -73,7 +73,6 @@ libvlc_media_get_duration libvlc_media_get_filestat libvlc_media_get_meta libvlc_media_get_mrl -libvlc_media_get_state libvlc_media_get_stats libvlc_media_get_tracklist libvlc_media_get_type = lib/media.c = @@ -513,8 +513,6 @@ libvlc_media_t * libvlc_media_new_from_input_item( vlc_mutex_init(&p_md->subitems_lock); atomic_init(&p_md->worker_count, 0); -p_md->state = libvlc_NothingSpecial; - /* A media descriptor can be a playlist. When you open a playlist * It can give a bunch of item to read. */ p_md->p_subitems= NULL; @@ -736,31 +734,6 @@ int libvlc_media_save_meta( libvlc_media_t *p_md ) return input_item_WriteMeta( p_obj, p_md->p_input_item ) == VLC_SUCCESS; } -// Getter for state information -libvlc_state_t -libvlc_media_get_state( libvlc_media_t *p_md ) -{ -assert( p_md ); -return p_md->state; -} - -// Setter for state information (LibVLC Internal) -void -libvlc_media_set_state( libvlc_media_t *p_md, - libvlc_state_t state ) -{ -libvlc_event_t event; - -p_md->state = state; - -/* Construct the event */ -event.type = libvlc_MediaStateChanged; -event.u.media_state_changed.new_state = state; - -/* Send the event */ -libvlc_event_send( &p_md->event_manager, &event ); -} - // Get subitems of media descriptor object. libvlc_media_list_t * libvlc_media_subitems( libvlc_media_t * p_md ) = lib/media_internal.h = @@ -38,7 +38,6 @@ struct libvlc_media_t input_item_t *p_input_item; libvlc_instance_t *p_libvlc_instance; -libvlc_state_t state; vlc_atomic_rc_trc; VLC_FORWARD_DECLARE_OBJECT(libvlc_media_list_t*) p_subitems; /* A media descriptor can have Sub items. This is the only dependency we really have on media_list */ @@ -62,7 +61,6 @@ struct libvlc_media_t libvlc_media_t * libvlc_media_new_from_input_item( libvlc_instance_t *, input_item_t * ); -void libvlc_media_set_state( libvlc_media_t *, libvlc_state_t ); void libvlc_media_add_subtree(libvlc_media_t *, input_item_node_t *); static inline enum es_format_category_e = lib/media_player.c = @@ -38,7 +38,6 @@ #include #include "libvlc_internal.h" -#include "media_internal.h" // libvlc_media_set_state() #include "media_player_internal.h" #include "renderer_discoverer_internal.h" View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a0b1b8703558b45e931b69fcf00642f503b6f45a -- View it on GitLab: https://code.videolan.org/videolan/vlc/-
[vlc-commits] [Git][videolan/libvlcpp][master] 3 commits: Media: Remove media states bindings in 4.0
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / libvlcpp Commits: 38a18211 by Hugo Beauzée-Luyssen at 2022-03-16T13:37:46+01:00 Media: Remove media states bindings in 4.0 - - - - - cdbae9df by Hugo Beauzée-Luyssen at 2022-03-16T13:38:01+01:00 EventManager: Remove onStateChange event - - - - - acb78a24 by Hugo Beauzée-Luyssen at 2022-03-16T13:57:17+01:00 CI: Bump unstable image - - - - - 3 changed files: - .gitlab-ci.yml - vlcpp/EventManager.hpp - vlcpp/Media.hpp Changes: = .gitlab-ci.yml = @@ -1,6 +1,6 @@ variables: VLC30_IMAGE: registry.videolan.org/medialibrary:20201009131431 - VLC40_IMAGE: registry.videolan.org/libvlcpp-unstable:20220314072210 + VLC40_IMAGE: registry.videolan.org/libvlcpp-unstable:20220316125112 .common_build: rules: = vlcpp/EventManager.hpp = @@ -355,7 +355,6 @@ class MediaEventManager : public EventManager (*callback)( media != nullptr ? std::make_shared( media, true ) : nullptr ); }); } -#endif /** * \brief onStateChanged Registers an event called when the Media state changes @@ -372,6 +371,7 @@ class MediaEventManager : public EventManager (*callback)( e->u.media_state_changed.new_state ); }); } +#endif /** * \brief onSubItemTreeAdded Registers an event called when all subitem have been added. = vlcpp/Media.hpp = @@ -470,6 +470,7 @@ public: return libvlc_media_save_meta(*this) != 0; } +#if LIBVLC_VERSION_INT < LIBVLC_VERSION(4, 0, 0, 0) /** * Get current state of media descriptor object. Possible media states * are defined in libvlc_structures.c ( libvlc_NothingSpecial=0, @@ -484,7 +485,7 @@ public: { return libvlc_media_get_state(*this); } - +#endif /** * Get the current statistics about the media * View it on GitLab: https://code.videolan.org/videolan/libvlcpp/-/compare/3f6cc938c237bd3be79e66bbe8400f8b62a7ad50...acb78a24d95029f7b4a5e5e68cbf464bbc76c63d -- View it on GitLab: https://code.videolan.org/videolan/libvlcpp/-/compare/3f6cc938c237bd3be79e66bbe8400f8b62a7ad50...acb78a24d95029f7b4a5e5e68cbf464bbc76c63d You're receiving this email because of your account on code.videolan.org. VideoLAN code repository instance___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] Bump vlcpp submodule
npapi-vlc | branch: master | Hugo Beauzée-Luyssen | Wed Mar 16 14:07:27 2022 +0100| [d3f2ef1eba1e86ac9ec143f42717b15df773ba07] | committer: Hugo Beauzée-Luyssen Bump vlcpp submodule > https://code.videolan.org/videolan/npapi-vlc/commit/d3f2ef1eba1e86ac9ec143f42717b15df773ba07 --- vlcpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlcpp b/vlcpp index 3f6cc93..acb78a2 16 --- a/vlcpp +++ b/vlcpp @@ -1 +1 @@ -Subproject commit 3f6cc938c237bd3be79e66bbe8400f8b62a7ad50 +Subproject commit acb78a24d95029f7b4a5e5e68cbf464bbc76c63d ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] [Git][videolan/npapi-vlc][master] Bump vlcpp submodule
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC Browser Plugins Commits: d3f2ef1e by Hugo Beauzée-Luyssen at 2022-03-16T14:07:27+01:00 Bump vlcpp submodule - - - - - 1 changed file: - vlcpp Changes: = vlcpp = @@ -1 +1 @@ -Subproject commit 3f6cc938c237bd3be79e66bbe8400f8b62a7ad50 +Subproject commit acb78a24d95029f7b4a5e5e68cbf464bbc76c63d View it on GitLab: https://code.videolan.org/videolan/npapi-vlc/-/commit/d3f2ef1eba1e86ac9ec143f42717b15df773ba07 -- View it on GitLab: https://code.videolan.org/videolan/npapi-vlc/-/commit/d3f2ef1eba1e86ac9ec143f42717b15df773ba07 You're receiving this email because of your account on code.videolan.org. VideoLAN code repository instance___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] [Git][videolan/vlc][master] opengl: handle downscaled luminance components
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC Commits: 05572e3f by Romain Vimont at 2022-03-16T15:39:54+00:00 opengl: handle downscaled luminance components Commit d8aebc365d81e76d4d502e7f97464f8fb3d65482 said: > The texture scaling factor represents how a plane is scaled compared > to the first plane, so by definition, the first plane is not scaled > (its ratio is 1:1). However, with YUY2 pictures, half the horizontal resolution is currently lost by the interop. Therefore, until this is fixed, the sampler must scale accordingly. This reverts commit d8aebc365d81e76d4d502e7f97464f8fb3d65482. Fixes #26682 - - - - - 1 changed file: - modules/video_output/opengl/importer.c Changes: = modules/video_output/opengl/importer.c = @@ -341,8 +341,14 @@ vlc_gl_importer_Update(struct vlc_gl_importer *importer, picture_t *picture) /* The transformation is the same for all planes, even with power-of-two * textures. */ -float scale_w = glfmt->tex_widths[0]; -float scale_h = glfmt->tex_heights[0]; +/* FIXME The first plane may have a ratio != 1:1, because with YUV 4:2:2 + * formats, the Y2 value is ignored so half the horizontal resolution + * is lost, see interop_yuv_base_init(). Once this is fixed, the + * multiplication by den/num may be removed. */ +float scale_w = glfmt->tex_widths[0] * interop->texs[0].w.den + / interop->texs[0].w.num; +float scale_h = glfmt->tex_heights[0] * interop->texs[0].h.den + / interop->texs[0].h.num; /* Warning: if NPOT is not supported a larger texture is allocated. This will cause right and bottom coordinates to View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/05572e3fd57c332280987f835ca047f005f5328e -- View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/05572e3fd57c332280987f835ca047f005f5328e You're receiving this email because of your account on code.videolan.org. VideoLAN code repository instance___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] [Git][videolan/vlc][master] contrib: upnp: do not try to detach detached thread
Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC Commits: 4a44a134 by Steve Lhomme at 2022-03-16T17:01:31+00:00 contrib: upnp: do not try to detach detached thread This is a cherry-pick of a patch in the 1.6.x branch that has not been released yet. - - - - - 2 changed files: - + contrib/src/upnp/0001-Do-not-try-to-detach-detached-thread-the-result-is-u.patch - contrib/src/upnp/rules.mak Changes: = contrib/src/upnp/0001-Do-not-try-to-detach-detached-thread-the-result-is-u.patch = @@ -0,0 +1,30 @@ +From de5cd603acd5c81ec947fd9664817231a3d2c418 Mon Sep 17 00:00:00 2001 +From: Jean-Francois Dockes +Date: Sun, 27 Jan 2019 10:44:17 +0100 +Subject: [PATCH] Do not try to detach detached thread, the result is + undefined. Fixes issue #102 + +(cherry picked from commit 386b7ed79146ecf7a3bba49f48cb8f41a9b49170) +--- + threadutil/src/ThreadPool.c | 5 - + 1 file changed, 5 deletions(-) + +diff --git a/threadutil/src/ThreadPool.c b/threadutil/src/ThreadPool.c +index fcf71087..8c6cd092 100644 +--- a/threadutil/src/ThreadPool.c b/threadutil/src/ThreadPool.c +@@ -651,11 +651,6 @@ static int CreateWorker( + rc = ithread_create(&temp, &attr, WorkerThread, tp); + ithread_attr_destroy(&attr); + if (rc == 0) { +- rc = ithread_detach(temp); +- /* ithread_detach will return EINVAL if thread has been +- successfully detached by ithread_create */ +- if (rc == EINVAL) +- rc = 0; + tp->pendingWorkerThreadStart = 1; + /* wait until the new worker thread starts */ + while (tp->pendingWorkerThreadStart) { +-- +2.27.0.windows.1 + = contrib/src/upnp/rules.mak = @@ -30,6 +30,7 @@ endif upnp: libupnp-$(UPNP_VERSION).tar.bz2 .sum-upnp $(UNPACK) + $(APPLY) $(SRC)/upnp/0001-Do-not-try-to-detach-detached-thread-the-result-is-u.patch ifdef HAVE_WIN32 $(APPLY) $(SRC)/upnp/libupnp-win32.patch $(APPLY) $(SRC)/upnp/libupnp-win64.patch View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/4a44a134ac10a3bf57ae1bd679cad1d0a77f91a7 -- View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/4a44a134ac10a3bf57ae1bd679cad1d0a77f91a7 You're receiving this email because of your account on code.videolan.org. VideoLAN code repository instance___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] [Git][videolan/vlc][master] 15 commits: demux: adaptive: force early output of first demuxed times
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC Commits: e8be1a4e by Francois Cartegnie at 2022-03-16T20:52:37+00:00 demux: adaptive: force early output of first demuxed times - - - - - 5da424a6 by Francois Cartegnie at 2022-03-16T20:52:37+00:00 demux: adaptive: add buffering media level to command queue - - - - - 49f71855 by Francois Cartegnie at 2022-03-16T20:52:37+00:00 demux: adaptive: refer to previous segment end time - - - - - e136c8ac by Francois Cartegnie at 2022-03-16T20:52:37+00:00 demux: adaptive: reset segment time context on segment gap - - - - - 235471cf by Francois Cartegnie at 2022-03-16T20:52:37+00:00 demux: adaptive: no buffering on no deadline - - - - - b2d6205d by Francois Cartegnie at 2022-03-16T20:52:37+00:00 demux: adaptive: only return bufferized amount past deadline - - - - - 310f94ef by Francois Cartegnie at 2022-03-16T20:52:37+00:00 demux: adaptive: rewrite media timeline fallback - - - - - 9819fd9b by Francois Cartegnie at 2022-03-16T20:52:37+00:00 demux: adaptive: call queue to create ES on empty content/subtitles otherwise it is delayed until first data/pcr - - - - - 40ea2e85 by Francois Cartegnie at 2022-03-16T20:52:37+00:00 demux: adaptive: use member for isContiguous - - - - - dff467b4 by Francois Cartegnie at 2022-03-16T20:52:37+00:00 adaptive: test: add low delay offset check - - - - - 65d2dccf by Francois Cartegnie at 2022-03-16T20:52:37+00:00 demux: hls: rename error prone method - - - - - 4aa0143c by Francois Cartegnie at 2022-03-16T20:52:37+00:00 demux: adaptive: use timestamp 0 offset in timestamp mappings Fixes returning INVALID timestamp when mapping to 0. - - - - - f2414d86 by Francois Cartegnie at 2022-03-16T20:52:37+00:00 demux: adaptive: fix init setting expected timestamp for non sms - - - - - 8f8ea977 by Francois Cartegnie at 2022-03-16T20:52:37+00:00 demux: adaptive: ensure es is created in test - - - - - fafd64e0 by Francois Cartegnie at 2022-03-16T20:52:37+00:00 demux: adaptive: properly prune relative segmentlist - - - - - 12 changed files: - modules/demux/adaptive/PlaylistManager.cpp - modules/demux/adaptive/Streams.cpp - modules/demux/adaptive/Streams.hpp - modules/demux/adaptive/playlist/SegmentList.cpp - modules/demux/adaptive/plumbing/CommandsQueue.cpp - modules/demux/adaptive/plumbing/CommandsQueue.hpp - modules/demux/adaptive/plumbing/FakeESOut.cpp - modules/demux/adaptive/plumbing/FakeESOut.hpp - modules/demux/adaptive/test/playlist/M3U8.cpp - modules/demux/adaptive/test/plumbing/FakeEsOut.cpp - modules/demux/hls/HLSStreams.cpp - modules/demux/hls/HLSStreams.hpp Changes: = modules/demux/adaptive/PlaylistManager.cpp = @@ -232,10 +232,6 @@ AbstractStream::BufferingStatus PlaylistManager::bufferize(Times deadline, PrioritizedAbstractStream &p = *it; p.st = stream; p.status = p.st->getBufferAndStatus(deadline, i_min_buffering, i_max_buffering, &p.demuxed_amount); -p.demuxed_amount = p.st->getDemuxedAmount(deadline).continuous; -vlc_tick_t mediaAmount; -if(p.st->getMediaAdvanceAmount(&mediaAmount) && mediaAmount > p.demuxed_amount) -p.demuxed_amount = mediaAmount; ++it; } std::sort(prioritized_streams.begin(), prioritized_streams.end(), streamCompare); = modules/demux/adaptive/Streams.cpp = @@ -47,6 +47,7 @@ AbstractStream::AbstractStream(demux_t * demux_) eof = false; valid = true; disabled = false; +contiguous = true; segmentgap = false; discontinuity = false; needrestart = false; @@ -92,7 +93,8 @@ bool AbstractStream::init(const StreamFormat &format_, SegmentTracker *tracker) segmentTracker = tracker; segmentTracker->registerListener(this); segmentTracker->notifyBufferingState(true); - fakeesout->setExpectedTimestamp(segmentTracker->getPlaybackTime()); +if(mightalwaysstartfromzero) +fakeesout->setExpectedTimestamp(VLC_TICK_0 + segmentTracker->getPlaybackTime()); declaredCodecs(); return true; } @@ -159,10 +161,10 @@ bool AbstractStream::resetForNewPosition(vlc_tick_t seekMediaTime) fakeEsOut()->commandsQueue()->Abort( true ); startTimeContext = SegmentTimes(); currentTimeContext = SegmentTimes(); -prevTimeContext = SegmentTimes(); +prevEndTimeContext = SegmentTimes(); currentChunk = getNextChunk(); if(mightalwaysstartfromzero) -fakeEsOut()->setExpectedTimestamp(seekMediaTime); +fakeEsOut()->setExpectedTimestamp(VLC_TICK_0 + seekMediaTime); if( !restartDemux() ) { msg_Info(p_realdemux, "Restart demux failed"); @@ -318,11 +320,6 @@ void AbstractStream::setDisabled(bool b) disabled