[vlc-commits] test: player timer: fix disabled tests
vlc | branch: master | Francois Cartegnie | Thu Dec 10 11:35:08 2020 +0100| [0009bf351ba1905072027e13b0c3bb6ecf94ac16] | committer: Francois Cartegnie test: player timer: fix disabled tests all good for 4 months > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0009bf351ba1905072027e13b0c3bb6ecf94ac16 --- test/src/player/player.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/test/src/player/player.c b/test/src/player/player.c index 931b05a9c1..57e1bbbdfa 100644 --- a/test/src/player/player.c +++ b/test/src/player/player.c @@ -2854,10 +2854,6 @@ main(void) test_init(); struct ctx ctx; -ctx_init(&ctx, 0); -test_audio_loudness_meter(&ctx); -ctx_destroy(&ctx); -return 0; /* Test with --aout=none --vout=none */ ctx_init(&ctx, DISABLE_VIDEO_OUTPUT | DISABLE_AUDIO_OUTPUT); @@ -2883,7 +2879,6 @@ main(void) test_programs(&ctx); test_timers(&ctx); test_teletext(&ctx); -test_audio_loudness_meter(&ctx); test_delete_while_playback(VLC_OBJECT(ctx.vlc->p_libvlc_int), true); test_delete_while_playback(VLC_OBJECT(ctx.vlc->p_libvlc_int), false); @@ -2892,6 +2887,7 @@ main(void) /* Test with --no-video */ ctx_init(&ctx, DISABLE_VIDEO); test_es_selection_override(&ctx); +test_audio_loudness_meter(&ctx); ctx_destroy(&ctx); return 0; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] test: player timer: check it really does something
vlc | branch: master | Francois Cartegnie | Fri Dec 11 14:35:08 2020 +0100| [6005c8c7478ac88ad02964b6f0172d9eb447ba53] | committer: Francois Cartegnie test: player timer: check it really does something > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6005c8c7478ac88ad02964b6f0172d9eb447ba53 --- test/src/player/player.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/src/player/player.c b/test/src/player/player.c index 57e1bbbdfa..704b3f8b4d 100644 --- a/test/src/player/player.c +++ b/test/src/player/player.c @@ -2301,6 +2301,8 @@ test_timers_playback(struct ctx *ctx, struct timer_state timers[], struct timer_state *timer = &timers[timer_idx]; vec_report_timer *vec = &timer->vec; +assert(vec->size > 1); + for (size_t i = 1; i < vec->size; ++i) { struct report_timer *prev_report = &vec->data[i - 1]; @@ -2362,6 +2364,7 @@ test_timers_playback(struct ctx *ctx, struct timer_state timers[], /* It should not receive all update points */ assert(vec->size < MAX_UPDATE_COUNT); +assert(vec->size > 1); for (size_t i = 1; i < vec->size; ++i) { ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] demux: adaptive: have peek on buffered chunks up to max cache
vlc/vlc-3.0 | branch: master | Francois Cartegnie | Mon Sep 7 15:39:25 2020 +0200| [62859f82a20a83bc91a5f6ef7ebfd7d41cc96aed] | committer: Francois Cartegnie demux: adaptive: have peek on buffered chunks up to max cache (cherry picked from commit 467c01b34a7034277fa0cd5e3eac05242a9b5888) > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=62859f82a20a83bc91a5f6ef7ebfd7d41cc96aed --- modules/demux/adaptive/plumbing/SourceStream.cpp | 106 +++ modules/demux/adaptive/plumbing/SourceStream.hpp | 5 +- 2 files changed, 72 insertions(+), 39 deletions(-) diff --git a/modules/demux/adaptive/plumbing/SourceStream.cpp b/modules/demux/adaptive/plumbing/SourceStream.cpp index bdd6fc12ad..feecd1de2f 100644 --- a/modules/demux/adaptive/plumbing/SourceStream.cpp +++ b/modules/demux/adaptive/plumbing/SourceStream.cpp @@ -204,11 +204,13 @@ BufferedChunksSourceStream::BufferedChunksSourceStream(vlc_object_t *p_obj_, Abs i_global_offset = 0; i_bytestream_offset = 0; block_BytestreamInit( &bs ); +p_peekdata = NULL; } BufferedChunksSourceStream::~BufferedChunksSourceStream() { block_BytestreamEmpty( &bs ); +invalidatePeek(); } void BufferedChunksSourceStream::Reset() @@ -216,42 +218,40 @@ void BufferedChunksSourceStream::Reset() block_BytestreamEmpty( &bs ); i_bytestream_offset = 0; i_global_offset = 0; +invalidatePeek(); AbstractChunksSourceStream::Reset(); } -ssize_t BufferedChunksSourceStream::Read(uint8_t *buf, size_t size) +ssize_t BufferedChunksSourceStream::doRead(uint8_t *buf, size_t i_toread) { -size_t i_copied = 0; -size_t i_toread = size; - -while(i_toread && !b_eof) +size_t i_remain = block_BytestreamRemaining(&bs) - i_bytestream_offset; +if(i_remain < i_toread) { -size_t i_remain = block_BytestreamRemaining(&bs) - i_bytestream_offset; +fillByteStream(i_bytestream_offset + i_toread); +i_remain = block_BytestreamRemaining(&bs) - i_bytestream_offset; +if(i_remain == 0) +return 0; +} -if(i_remain < i_toread) -{ -block_t *p_add = source->readNextBlock(); -if(p_add) -{ -i_remain += p_add->i_buffer; -block_BytestreamPush(&bs, p_add); +if(i_remain < i_toread) +i_toread = i_remain; -} -else b_eof = true; -} +if(buf) +block_PeekOffsetBytes(&bs, i_bytestream_offset, buf, i_toread); -size_t i_read; -if(i_remain >= i_toread) -i_read = i_toread; -else -i_read = i_remain; +return i_toread; +} -if(buf) -block_PeekOffsetBytes(&bs, i_bytestream_offset, &buf[i_copied], i_read); -i_bytestream_offset += i_read; -i_copied += i_read; -i_toread -= i_read; -} +ssize_t BufferedChunksSourceStream::Read(uint8_t *buf, size_t i_toread) +{ +invalidatePeek(); + +ssize_t i_read = doRead(buf, i_toread); +if(i_read <= 0) +return i_read; + +i_bytestream_offset += i_read; +i_toread -= i_read; if(i_bytestream_offset > MAX_BACKEND) { @@ -264,37 +264,58 @@ ssize_t BufferedChunksSourceStream::Read(uint8_t *buf, size_t size) i_global_offset += i_drop; } } - -return i_copied; +return i_read; } int BufferedChunksSourceStream::Seek(uint64_t i_seek) { -if(i_seek < i_global_offset || - i_seek - i_global_offset > block_BytestreamRemaining(&bs)) +if(i_seek < i_global_offset) /* can't seek into discarded data */ +{ +msg_Err(p_obj, "tried to seek back in cache %" PRIu64 " < %" PRIu64, +i_seek, i_global_offset); +return VLC_EGENERIC; +} +size_t i_bsseekoffset = i_seek - i_global_offset; +fillByteStream(i_bsseekoffset); +if(block_BytestreamRemaining(&bs) < i_bsseekoffset) +{ +msg_Err(p_obj, "tried to seek too far in cache %" PRIu64 " < %" PRIu64 " < %" PRIu64, +i_global_offset, i_seek, i_global_offset + block_BytestreamRemaining(&bs)); return VLC_EGENERIC; +} +invalidatePeek(); i_bytestream_offset = i_seek - i_global_offset; return VLC_SUCCESS; } size_t BufferedChunksSourceStream::Peek(const uint8_t **pp, size_t sz) { -fillByteStream(); -if(block_BytestreamRemaining(&bs) == 0) +sz = std::min(sz, (size_t)MAX_BACKEND); +invalidatePeek(); +p_peekdata = block_Alloc(sz); +if(!p_peekdata) +return 0; +ssize_t i_read = doRead(p_peekdata->p_buffer, sz); +if(i_read <= 0) +{ +invalidatePeek(); return 0; -*pp = bs.p_block->p_buffer; -return std::min(bs.p_block->i_buffer, sz); +} +*pp = p_peekdata->p_buffer; +return i_read; } std::string BufferedChunksSourceStream::getContentType() { -fillByteStream(); +if(block_BytestreamRemaining(&bs) == 0) +fill
[vlc-commits] demux: dash: fix startnumber on template node inheritance (#25082)
vlc/vlc-3.0 | branch: master | Francois Cartegnie | Sat Sep 5 16:33:49 2020 +0200| [26fdfd482cffd9aad2db049879d6de66f74b826f] | committer: Francois Cartegnie demux: dash: fix startnumber on template node inheritance (#25082) (cherry picked from commit eb1e8a6082791a97e371199884c98d00108b43de) > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=26fdfd482cffd9aad2db049879d6de66f74b826f --- modules/demux/adaptive/playlist/SegmentTemplate.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/demux/adaptive/playlist/SegmentTemplate.cpp b/modules/demux/adaptive/playlist/SegmentTemplate.cpp index 990ee0bb1c..b13f85a494 100644 --- a/modules/demux/adaptive/playlist/SegmentTemplate.cpp +++ b/modules/demux/adaptive/playlist/SegmentTemplate.cpp @@ -96,6 +96,9 @@ size_t MediaSegmentTemplate::pruneBySequenceNumber(uint64_t number) uint64_t MediaSegmentTemplate::inheritStartNumber() const { +if( startNumber != std::numeric_limits::max() ) +return startNumber; + const SegmentInformation *ulevel = parentSegmentInformation ? parentSegmentInformation : NULL; for( ; ulevel ; ulevel = ulevel->parent ) ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] demux: adaptive: fix buffered amount condition
vlc/vlc-3.0 | branch: master | Francois Cartegnie | Fri Sep 11 16:25:44 2020 +0200| [9e6746aa3fc2a64de7659af2c51985db5f68b7aa] | committer: Francois Cartegnie demux: adaptive: fix buffered amount condition on seek or activation, the seek reference point is inside a segment and if that segment is longer than buffering duration, it could never start. (segment start + buffering amount < deadline) (cherry picked from commit 15f5497b25797f3d190598a0f523ad6031cb7cd1) > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=9e6746aa3fc2a64de7659af2c51985db5f68b7aa --- modules/demux/adaptive/PlaylistManager.cpp| 2 +- modules/demux/adaptive/Streams.cpp| 8 modules/demux/adaptive/Streams.hpp| 2 +- modules/demux/adaptive/plumbing/CommandsQueue.cpp | 9 +++-- modules/demux/adaptive/plumbing/CommandsQueue.hpp | 2 +- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/modules/demux/adaptive/PlaylistManager.cpp b/modules/demux/adaptive/PlaylistManager.cpp index 302987813d..5d80b358e0 100644 --- a/modules/demux/adaptive/PlaylistManager.cpp +++ b/modules/demux/adaptive/PlaylistManager.cpp @@ -231,7 +231,7 @@ AbstractStream::buffering_status PlaylistManager::bufferize(mtime_t i_nzdeadline PrioritizedAbstractStream &p = *it; p.st = *sit; p.status = p.st->getLastBufferStatus(); -p.demuxed_amount = p.st->getDemuxedAmount(); +p.demuxed_amount = p.st->getDemuxedAmount(i_nzdeadline); ++it; } std::sort(prioritized_streams.begin(), prioritized_streams.end(), streamCompare); diff --git a/modules/demux/adaptive/Streams.cpp b/modules/demux/adaptive/Streams.cpp index b75312e416..99bf531c22 100644 --- a/modules/demux/adaptive/Streams.cpp +++ b/modules/demux/adaptive/Streams.cpp @@ -298,9 +298,9 @@ AbstractStream::buffering_status AbstractStream::getLastBufferStatus() const return last_buffer_status; } -mtime_t AbstractStream::getDemuxedAmount() const +mtime_t AbstractStream::getDemuxedAmount(mtime_t from) const { -return fakeEsOut()->commandsQueue()->getDemuxedAmount(); +return fakeEsOut()->commandsQueue()->getDemuxedAmount(from); } AbstractStream::buffering_status AbstractStream::bufferize(mtime_t nz_deadline, @@ -373,7 +373,7 @@ AbstractStream::buffering_status AbstractStream::doBufferize(mtime_t nz_deadline const int64_t i_total_buffering = i_min_buffering + i_extra_buffering; -mtime_t i_demuxed = fakeEsOut()->commandsQueue()->getDemuxedAmount(); +mtime_t i_demuxed = fakeEsOut()->commandsQueue()->getDemuxedAmount(nz_deadline); segmentTracker->notifyBufferingLevel(i_min_buffering, i_demuxed, i_total_buffering); if(i_demuxed < i_total_buffering) /* not already demuxed */ { @@ -405,7 +405,7 @@ AbstractStream::buffering_status AbstractStream::doBufferize(mtime_t nz_deadline vlc_mutex_unlock(&lock); return AbstractStream::buffering_end; } -i_demuxed = fakeEsOut()->commandsQueue()->getDemuxedAmount(); +i_demuxed = fakeEsOut()->commandsQueue()->getDemuxedAmount(nz_deadline); segmentTracker->notifyBufferingLevel(i_min_buffering, i_demuxed, i_total_buffering); } vlc_mutex_unlock(&lock); diff --git a/modules/demux/adaptive/Streams.hpp b/modules/demux/adaptive/Streams.hpp index a1f5631b7a..539b772d4a 100644 --- a/modules/demux/adaptive/Streams.hpp +++ b/modules/demux/adaptive/Streams.hpp @@ -84,7 +84,7 @@ namespace adaptive } buffering_status; buffering_status bufferize(mtime_t, unsigned, unsigned); buffering_status getLastBufferStatus() const; -mtime_t getDemuxedAmount() const; +mtime_t getDemuxedAmount(mtime_t) const; status dequeue(mtime_t, mtime_t *); bool decodersDrained(); virtual bool setPosition(mtime_t, bool); diff --git a/modules/demux/adaptive/plumbing/CommandsQueue.cpp b/modules/demux/adaptive/plumbing/CommandsQueue.cpp index 2d31733588..7cc9feaeae 100644 --- a/modules/demux/adaptive/plumbing/CommandsQueue.cpp +++ b/modules/demux/adaptive/plumbing/CommandsQueue.cpp @@ -432,9 +432,14 @@ bool CommandsQueue::isEOF() const return b; } -mtime_t CommandsQueue::getDemuxedAmount() const +mtime_t CommandsQueue::getDemuxedAmount(mtime_t from) const { -return bufferinglevel - getFirstDTS(); +if( from > bufferinglevel || from < getFirstDTS() ) +return 0; +if( from > getFirstDTS() ) +return bufferinglevel - from; +else +return bufferinglevel - getFirstDTS(); } mtime_t CommandsQueue::getBufferingLevel() const diff --git a/modules/demux/adaptive/plumbing/CommandsQueue.hpp b/modules/demux/adaptive/plumbing/CommandsQueue.hpp index b36dd5c332..6ee9a6ab36 100644 --- a/modules/demux/adaptive/plumbing/CommandsQueue.hpp +++ b/modules/demux/adaptive/plumbing/CommandsQueue.hpp @@ -164,7 +164,7 @@ namespace adaptive void setEOF( bool );
[vlc-commits] demux: adaptive: fix regression with non zero starting content
vlc/vlc-3.0 | branch: master | Francois Cartegnie | Thu Oct 8 12:41:46 2020 +0200| [bfadf89d5d51b536f8337edc68ff8b38447ed876] | committer: Francois Cartegnie demux: adaptive: fix regression with non zero starting content regression by 15f5497b25797f3d190598a0f523ad6031cb7cd1 (cherry picked from commit 694c5b02e9c996353e20dc494ab49c6e8a81a60e) > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=bfadf89d5d51b536f8337edc68ff8b38447ed876 --- modules/demux/adaptive/plumbing/CommandsQueue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/demux/adaptive/plumbing/CommandsQueue.cpp b/modules/demux/adaptive/plumbing/CommandsQueue.cpp index 7cc9feaeae..1f66972f56 100644 --- a/modules/demux/adaptive/plumbing/CommandsQueue.cpp +++ b/modules/demux/adaptive/plumbing/CommandsQueue.cpp @@ -434,7 +434,7 @@ bool CommandsQueue::isEOF() const mtime_t CommandsQueue::getDemuxedAmount(mtime_t from) const { -if( from > bufferinglevel || from < getFirstDTS() ) +if( from > bufferinglevel ) return 0; if( from > getFirstDTS() ) return bufferinglevel - from; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] demux: adaptive: fix read cache truncation
vlc/vlc-3.0 | branch: master | Francois Cartegnie | Wed Oct 7 22:21:03 2020 +0200| [237b9d237a1f4abb00c51337e4609b83be82fbd2] | committer: Francois Cartegnie demux: adaptive: fix read cache truncation regression from 467c01b34a7034277fa0cd5e3eac05242a9b5888 (cherry picked from commit 752a6c481dac14faa13875bd395fb520496a11c6) > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=237b9d237a1f4abb00c51337e4609b83be82fbd2 --- modules/demux/adaptive/plumbing/SourceStream.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/demux/adaptive/plumbing/SourceStream.cpp b/modules/demux/adaptive/plumbing/SourceStream.cpp index feecd1de2f..6cb4a88972 100644 --- a/modules/demux/adaptive/plumbing/SourceStream.cpp +++ b/modules/demux/adaptive/plumbing/SourceStream.cpp @@ -312,10 +312,9 @@ std::string BufferedChunksSourceStream::getContentType() return source->getContentType(); } -void BufferedChunksSourceStream::fillByteStream(size_t sz) +void BufferedChunksSourceStream::fillByteStream(size_t level) { -sz = std::min(sz, (size_t)MAX_BACKEND); -while(!b_eof && sz > block_BytestreamRemaining(&bs)) +while(!b_eof && level > block_BytestreamRemaining(&bs)) { block_t *p_block = source->readNextBlock(); b_eof = !p_block; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] demux: adaptive: remove mishandled sequence offset
vlc/vlc-3.0 | branch: master | Francois Cartegnie | Thu Nov 26 14:14:25 2020 +0100| [0280fe07b5044646f33916db01f0b312439c16b7] | committer: Francois Cartegnie demux: adaptive: remove mishandled sequence offset mishandled in lookups. should be enforced in parsing. refs VLCKit/-/issues/382 (cherry picked from commit 39c471fa38bbb4894a5a53c003d07aa41fd6d412) (cherry picked from commit 444c839b2b56b176fee1f84a081e6b39a6b6474f) > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=0280fe07b5044646f33916db01f0b312439c16b7 --- modules/demux/adaptive/playlist/Segment.cpp | 10 +++--- modules/demux/adaptive/playlist/Segment.h | 2 -- modules/demux/hls/playlist/HLSSegment.cpp | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/modules/demux/adaptive/playlist/Segment.cpp b/modules/demux/adaptive/playlist/Segment.cpp index 44c17c1c6d..b4d5f6d7cf 100644 --- a/modules/demux/adaptive/playlist/Segment.cpp +++ b/modules/demux/adaptive/playlist/Segment.cpp @@ -39,9 +39,6 @@ using namespace adaptive::http; using namespace adaptive::playlist; -const int ISegment::SEQUENCE_INVALID = 0; -const int ISegment::SEQUENCE_FIRST = 1; - ISegment::ISegment(const ICanonicalUrl *parent): ICanonicalUrl( parent ), startByte (0), @@ -51,7 +48,7 @@ ISegment::ISegment(const ICanonicalUrl *parent): classId = CLASSID_ISEGMENT; startTime.Set(0); duration.Set(0); -sequence = SEQUENCE_INVALID; +sequence = 0; templated = false; discontinuity = false; } @@ -122,7 +119,7 @@ void ISegment::setByteRange(size_t start, size_t end) void ISegment::setSequenceNumber(uint64_t seq) { -sequence = SEQUENCE_FIRST + seq; +sequence = seq; } uint64_t ISegment::getSequenceNumber() const @@ -209,8 +206,7 @@ void Segment::addSubSegment(SubSegment *subsegment) { /* Use our own sequence number, and since it it now uneffective, also for next subsegments numbering */ -subsegment->setSequenceNumber(getSequenceNumber()); -setSequenceNumber(getSequenceNumber()); +subsegment->setSequenceNumber(subsegments.size()); } subsegments.push_back(subsegment); } diff --git a/modules/demux/adaptive/playlist/Segment.h b/modules/demux/adaptive/playlist/Segment.h index 10c481f041..46b4b131ad 100644 --- a/modules/demux/adaptive/playlist/Segment.h +++ b/modules/demux/adaptive/playlist/Segment.h @@ -94,8 +94,6 @@ namespace adaptive int classId; booltemplated; uint64_tsequence; -static const intSEQUENCE_INVALID; -static const intSEQUENCE_FIRST; }; class Segment : public ISegment diff --git a/modules/demux/hls/playlist/HLSSegment.cpp b/modules/demux/hls/playlist/HLSSegment.cpp index 9c1a067344..2ad4187a3e 100644 --- a/modules/demux/hls/playlist/HLSSegment.cpp +++ b/modules/demux/hls/playlist/HLSSegment.cpp @@ -44,7 +44,7 @@ bool HLSSegment::prepareChunk(SharedResources *res, SegmentChunk *chunk, BaseRep { if (encryption.iv.size() != 16) { -uint64_t sequence = getSequenceNumber() - Segment::SEQUENCE_FIRST; +uint64_t sequence = getSequenceNumber(); encryption.iv.clear(); encryption.iv.resize(16); encryption.iv[15] = (sequence >> 0) & 0xff; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] demux: adaptive: fix negative livestart number
vlc/vlc-3.0 | branch: master | Francois Cartegnie | Thu Nov 26 21:07:39 2020 +0100| [4da275b85ea69a963fee1497e7e5911a9ad713af] | committer: Francois Cartegnie demux: adaptive: fix negative livestart number (cherry picked from commit a0d053d40295be6c30cbe023a460865ffd3b2f83) > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=4da275b85ea69a963fee1497e7e5911a9ad713af --- modules/demux/adaptive/logic/BufferingLogic.cpp | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/demux/adaptive/logic/BufferingLogic.cpp b/modules/demux/adaptive/logic/BufferingLogic.cpp index c95efc803e..f230daa56f 100644 --- a/modules/demux/adaptive/logic/BufferingLogic.cpp +++ b/modules/demux/adaptive/logic/BufferingLogic.cpp @@ -302,11 +302,14 @@ uint64_t DefaultBufferingLogic::getLiveStartSegmentNumber(BaseRepresentation *re uint64_t safeedgenumber = back->getSequenceNumber() - std::min((uint64_t)list.size() - 1, (uint64_t)SAFETY_BUFFERING_EDGE_OFFSET); - uint64_t safestartnumber = availableliststartnumber; -if(safeedgenumber > safestartnumber) -safestartnumber -= std::min(safeedgenumber-safestartnumber - 1, -(uint64_t)SAFETY_EXPURGING_OFFSET); + +for(unsigned i=0; i= safeedgenumber) +break; +safestartnumber++; +} stime_t maxbufferizable = 0; stime_t safeedgeduration = 0; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] On the road to 3.0.12
vlc/vlc-3.0 | branch: master | Hugo Beauzée-Luyssen | Mon Dec 14 12:28:28 2020 +0100| [ed5d14181c22edddc40e859e85c233c20f08c693] | committer: Hugo Beauzée-Luyssen On the road to 3.0.12 > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=ed5d14181c22edddc40e859e85c233c20f08c693 --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 376f5200e7..3fc09545d0 100644 --- a/configure.ac +++ b/configure.ac @@ -2,11 +2,11 @@ dnl Autoconf settings for vlc AC_COPYRIGHT([Copyright 1999-2020 VLC authors and VideoLAN]) -AC_INIT(vlc, 3.0.11.1) +AC_INIT(vlc, 3.0.12) VERSION_MAJOR=3 VERSION_MINOR=0 -VERSION_REVISION=11 -VERSION_EXTRA=1 +VERSION_REVISION=12 +VERSION_EXTRA=0 VERSION_DEV= PKGDIR="vlc" ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] network: http auth: Remove VLA usages
vlc | branch: master | Hugo Beauzée-Luyssen | Thu Dec 10 17:31:28 2020 +0100| [1e56827c79b662cec37c580d596630412ebeca68] | committer: Hugo Beauzée-Luyssen network: http auth: Remove VLA usages > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1e56827c79b662cec37c580d596630412ebeca68 --- src/network/http_auth.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/network/http_auth.c b/src/network/http_auth.c index 599fda6286..76f91fe7d9 100644 --- a/src/network/http_auth.c +++ b/src/network/http_auth.c @@ -42,10 +42,9 @@ /* * "RFC 2617: Basic and Digest Access Authentication" header parsing */ -static char *AuthGetParam( const char *psz_header, const char *psz_param ) +#define AuthGetParam( HEADER, PARAM ) AuthGetParamConcat( HEADER, PARAM "=\"" ) +static char *AuthGetParamConcat( const char *psz_header, const char *psz_what ) { -char psz_what[strlen(psz_param)+3]; -sprintf( psz_what, "%s=\"", psz_param ); psz_header = strstr( psz_header, psz_what ); if ( psz_header ) { @@ -62,10 +61,9 @@ static char *AuthGetParam( const char *psz_header, const char *psz_param ) } } -static char *AuthGetParamNoQuotes( const char *psz_header, const char *psz_param ) +#define AuthGetParamNoQuotes( HEADER, PARAM ) AuthGetParamNoQuotesConcat( HEADER, PARAM "=" ) +static char *AuthGetParamNoQuotesConcat( const char *psz_header, const char *psz_what ) { -char psz_what[strlen(psz_param)+2]; -sprintf( psz_what, "%s=", psz_param ); psz_header = strstr( psz_header, psz_what ); if ( psz_header ) { ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] qt: no longer filter manually video medias in MLRecentsVideoModel
vlc | branch: master | Pierre Lamot | Wed Dec 9 11:20:07 2020 +0100| [afae92a5d6f745f92fb0dee956af44982c507f31] | committer: Pierre Lamot qt: no longer filter manually video medias in MLRecentsVideoModel > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=afae92a5d6f745f92fb0dee956af44982c507f31 --- .../gui/qt/medialibrary/mlrecentsvideomodel.cpp| 32 ++ .../gui/qt/medialibrary/mlrecentsvideomodel.hpp| 3 -- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/modules/gui/qt/medialibrary/mlrecentsvideomodel.cpp b/modules/gui/qt/medialibrary/mlrecentsvideomodel.cpp index 7835fae2a7..2085a68d18 100644 --- a/modules/gui/qt/medialibrary/mlrecentsvideomodel.cpp +++ b/modules/gui/qt/medialibrary/mlrecentsvideomodel.cpp @@ -125,15 +125,10 @@ size_t MLRecentsVideoModel::Loader::count() const MLQueryParams params = getParams(); auto queryParams = params.toCQueryParams(); -// FIXME: count() may not depend on load(), since the call to load() -// depends on count() - -(void) queryParams; - -if (m_numberOfItemsToShow == -1) { -return m_video_count; -} -return std::min(m_video_count, m_numberOfItemsToShow); +size_t realCount = vlc_ml_count_history_by_type( m_ml, &queryParams, VLC_ML_MEDIA_TYPE_VIDEO ); +if (m_numberOfItemsToShow >= 0) +return std::min( realCount, static_cast(m_numberOfItemsToShow) ); +return realCount; } std::vector> @@ -142,17 +137,20 @@ MLRecentsVideoModel::Loader::load(size_t index, size_t count) const MLQueryParams params = getParams(index, count); auto queryParams = params.toCQueryParams(); -ml_unique_ptr media_list{ vlc_ml_list_history( -m_ml, &queryParams ) }; +std::vector> res; +if (m_numberOfItemsToShow >= 0) +{ +if (queryParams.i_offset <= static_cast(m_numberOfItemsToShow)) + queryParams.i_nbResults = static_cast(m_numberOfItemsToShow) - queryParams.i_offset; +else +return res; +} + +ml_unique_ptr media_list{ vlc_ml_list_history_by_type( +m_ml, &queryParams, VLC_ML_MEDIA_TYPE_VIDEO ) }; if ( media_list == nullptr ) return {}; -std::vector> res; -m_video_count = 0; for( vlc_ml_media_t &media: ml_range_iterate( media_list ) ) -if( media.i_type == VLC_ML_MEDIA_TYPE_VIDEO ) -{ -m_video_count++; res.emplace_back( std::make_unique( m_ml, &media ) ); -} return res; } diff --git a/modules/gui/qt/medialibrary/mlrecentsvideomodel.hpp b/modules/gui/qt/medialibrary/mlrecentsvideomodel.hpp index 9eb63a0bbe..4231b6bbdd 100644 --- a/modules/gui/qt/medialibrary/mlrecentsvideomodel.hpp +++ b/modules/gui/qt/medialibrary/mlrecentsvideomodel.hpp @@ -71,9 +71,6 @@ private: private: int m_numberOfItemsToShow; -// FIXME: count() may not depend on load(), since the call to load() -// depends on count() -mutable int m_video_count; }; }; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] medialib: add function to get media history by type
vlc | branch: master | Pierre Lamot | Wed Dec 9 11:19:08 2020 +0100| [b03d64acfb13b69276180e0131218f6dc1a01007] | committer: Pierre Lamot medialib: add function to get media history by type > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b03d64acfb13b69276180e0131218f6dc1a01007 --- include/vlc_media_library.h| 22 ++ modules/misc/medialibrary/medialib.cpp | 22 ++ 2 files changed, 44 insertions(+) diff --git a/include/vlc_media_library.h b/include/vlc_media_library.h index fbc8ff8676..fde638692d 100644 --- a/include/vlc_media_library.h +++ b/include/vlc_media_library.h @@ -400,6 +400,8 @@ enum vlc_ml_list_queries VLC_ML_COUNT_PLAYLISTS, /**< arg1 (out): size_t* */ VLC_ML_LIST_HISTORY, /**< arg1 (out): vlc_ml_media_list_t** */ VLC_ML_COUNT_HISTORY, /**< arg1 (out): size_t* */ +VLC_ML_LIST_HISTORY_BY_TYPE, /**< arg1 vlc_ml_media_type_t: the media type. arg2 (out): vlc_ml_media_list_t** */ +VLC_ML_COUNT_HISTORY_BY_TYPE, /**< arg1 vlc_ml_media_type_t: the media type. arg2 (out): vlc_ml_media_list_t***/ VLC_ML_LIST_STREAM_HISTORY, /**< arg1 (out): vlc_ml_media_list_t** */ VLC_ML_COUNT_STREAM_HISTORY, /**< arg1 (out): size_t* */ @@ -1439,6 +1441,26 @@ static inline size_t vlc_ml_count_history( vlc_medialibrary_t* p_ml, const vlc_m } +static inline vlc_ml_media_list_t* vlc_ml_list_history_by_type( vlc_medialibrary_t* p_ml, const vlc_ml_query_params_t* params, vlc_ml_media_type_t type ) +{ +vlc_assert( p_ml != NULL ); +vlc_ml_media_list_t* res; +if ( vlc_ml_list( p_ml, VLC_ML_LIST_HISTORY_BY_TYPE, params, (int)type, &res ) != VLC_SUCCESS ) +return NULL; +return res; +} + +static inline size_t vlc_ml_count_history_by_type( vlc_medialibrary_t* p_ml, const vlc_ml_query_params_t* params, vlc_ml_media_type_t type ) +{ +vlc_assert( p_ml != NULL ); +size_t count; +if ( vlc_ml_list( p_ml, VLC_ML_COUNT_HISTORY_BY_TYPE, params, (int)type, &count ) != VLC_SUCCESS ) +return 0; +return count; +} + + + static inline vlc_ml_media_list_t* vlc_ml_list_stream_history( vlc_medialibrary_t* p_ml, const vlc_ml_query_params_t* params ) { vlc_assert( p_ml != NULL ); diff --git a/modules/misc/medialibrary/medialib.cpp b/modules/misc/medialibrary/medialib.cpp index 5f3c2fc493..3cd342f833 100644 --- a/modules/misc/medialibrary/medialib.cpp +++ b/modules/misc/medialibrary/medialib.cpp @@ -882,6 +882,28 @@ int MediaLibrary::List( int listQuery, const vlc_ml_query_params_t* params, va_l vlc_assert_unreachable(); } } +case VLC_ML_COUNT_HISTORY_BY_TYPE: +case VLC_ML_LIST_HISTORY_BY_TYPE: +{ +auto type = va_arg(args, int); +auto query = m_ml->history(static_cast( type )); +if ( query == nullptr ) +return VLC_EGENERIC; + +switch ( listQuery ) +{ +case VLC_ML_LIST_HISTORY_BY_TYPE: +*va_arg( args, vlc_ml_media_list_t**) = +ml_convert_list( +query->items( nbItems, offset ) ); +return VLC_SUCCESS; +case VLC_ML_COUNT_HISTORY_BY_TYPE: +*va_arg( args, size_t* ) = query->count(); +return VLC_SUCCESS; +default: +vlc_assert_unreachable(); +} +} case VLC_ML_LIST_STREAM_HISTORY: case VLC_ML_COUNT_STREAM_HISTORY: { ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] medialib: factorise history retrieval calls
vlc | branch: master | Pierre Lamot | Wed Dec 9 11:43:52 2020 +0100| [69d98183b7ce5fc95540c45e1787f7f58340d19f] | committer: Pierre Lamot medialib: factorise history retrieval calls > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=69d98183b7ce5fc95540c45e1787f7f58340d19f --- modules/misc/medialibrary/medialib.cpp | 63 ++ 1 file changed, 26 insertions(+), 37 deletions(-) diff --git a/modules/misc/medialibrary/medialib.cpp b/modules/misc/medialibrary/medialib.cpp index 3cd342f833..2db89a39cc 100644 --- a/modules/misc/medialibrary/medialib.cpp +++ b/modules/misc/medialibrary/medialib.cpp @@ -861,69 +861,58 @@ int MediaLibrary::List( int listQuery, const vlc_ml_query_params_t* params, va_l case VLC_ML_LIST_PLAYLISTS: case VLC_ML_COUNT_PLAYLISTS: return listPlaylist( listQuery, paramsPtr, psz_pattern, nbItems, offset, args ); -case VLC_ML_LIST_HISTORY: case VLC_ML_COUNT_HISTORY: +case VLC_ML_LIST_HISTORY: +case VLC_ML_COUNT_HISTORY_BY_TYPE: +case VLC_ML_LIST_HISTORY_BY_TYPE: +case VLC_ML_COUNT_STREAM_HISTORY: +case VLC_ML_LIST_STREAM_HISTORY: { -auto query = m_ml->history(); -if ( query == nullptr ) -return VLC_EGENERIC; +medialibrary::Query query; switch ( listQuery ) { -case VLC_ML_LIST_HISTORY: -*va_arg( args, vlc_ml_media_list_t**) = -ml_convert_list( -query->items( nbItems, offset ) ); -return VLC_SUCCESS; case VLC_ML_COUNT_HISTORY: -*va_arg( args, size_t* ) = query->count(); -return VLC_SUCCESS; +case VLC_ML_LIST_HISTORY: +query = m_ml->history(); +break; +case VLC_ML_COUNT_HISTORY_BY_TYPE: +case VLC_ML_LIST_HISTORY_BY_TYPE: +{ +auto type = va_arg(args, int); +query = m_ml->history(static_cast( type )); +break; +} +case VLC_ML_COUNT_STREAM_HISTORY: +case VLC_ML_LIST_STREAM_HISTORY: +query = m_ml->streamHistory(); +break; default: vlc_assert_unreachable(); } -} -case VLC_ML_COUNT_HISTORY_BY_TYPE: -case VLC_ML_LIST_HISTORY_BY_TYPE: -{ -auto type = va_arg(args, int); -auto query = m_ml->history(static_cast( type )); + if ( query == nullptr ) return VLC_EGENERIC; switch ( listQuery ) { +case VLC_ML_LIST_HISTORY: case VLC_ML_LIST_HISTORY_BY_TYPE: +case VLC_ML_LIST_STREAM_HISTORY: *va_arg( args, vlc_ml_media_list_t**) = ml_convert_list( query->items( nbItems, offset ) ); return VLC_SUCCESS; +case VLC_ML_COUNT_HISTORY: case VLC_ML_COUNT_HISTORY_BY_TYPE: +case VLC_ML_COUNT_STREAM_HISTORY: *va_arg( args, size_t* ) = query->count(); return VLC_SUCCESS; default: vlc_assert_unreachable(); } } -case VLC_ML_LIST_STREAM_HISTORY: -case VLC_ML_COUNT_STREAM_HISTORY: -{ -auto query = m_ml->streamHistory(); -if ( query == nullptr ) -return VLC_EGENERIC; -switch ( listQuery ) -{ -case VLC_ML_LIST_STREAM_HISTORY: -*va_arg( args, vlc_ml_media_list_t**) = -ml_convert_list( -query->items( nbItems, offset ) ); -return VLC_SUCCESS; -case VLC_ML_COUNT_STREAM_HISTORY: -*va_arg( args, size_t* ) = query->count(); -return VLC_SUCCESS; -default: -vlc_assert_unreachable(); -} -} + } return VLC_SUCCESS; } ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] input: unknown length is zero
vlc | branch: master | Francois Cartegnie | Thu Dec 3 16:07:46 2020 +0100| [3781e1dca6f5bdbb945f3d38941abd8560817db9] | committer: Francois Cartegnie input: unknown length is zero This partially reverts commit d34852727700e98ef5533bfdaead574ec1700f2a. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3781e1dca6f5bdbb945f3d38941abd8560817db9 --- src/input/es_out.c | 2 +- src/input/input.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/input/es_out.c b/src/input/es_out.c index ab3134ab9f..7d178a5e78 100644 --- a/src/input/es_out.c +++ b/src/input/es_out.c @@ -3701,7 +3701,7 @@ static int EsOutVaPrivControlLocked( es_out_t *out, int query, va_list args ) i_time = VLC_TICK_0; } -if( i_length != VLC_TICK_INVALID ) +if( i_length != 0 ) f_position -= (double)i_delay / i_length; if( f_position < 0 ) f_position = 0; diff --git a/src/input/input.c b/src/input/input.c index dafead8408..730d99db01 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -630,7 +630,7 @@ static void MainLoopStatistics( input_thread_t *p_input ) i_time = VLC_TICK_INVALID; if( demux_Control( priv->master->p_demux, DEMUX_GET_LENGTH, &i_length ) ) -i_length = VLC_TICK_INVALID; +i_length = 0; /* In case of failure (not implemented or in case of seek), use the last * normal_time value (that is VLC_TICK_0 by default). */ @@ -1288,8 +1288,8 @@ static int Init( input_thread_t * p_input ) /* Init length */ vlc_tick_t i_length; if( demux_Control( master->p_demux, DEMUX_GET_LENGTH, &i_length ) ) -i_length = VLC_TICK_INVALID; -if( i_length == VLC_TICK_INVALID ) +i_length = 0; +if( i_length == 0 ) i_length = input_item_GetDuration( priv->p_item ); input_SendEventTimes( p_input, 0.0, VLC_TICK_INVALID, priv->normal_time, ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] macosx: codesign: Check whether vlc-cache-gen can be executed
vlc | branch: master | David Fuhrmann | Mon Dec 14 20:22:24 2020 +0100| [18271e16182312cc2d0a80848d562e52efc2ebf8] | committer: David Fuhrmann macosx: codesign: Check whether vlc-cache-gen can be executed Check whether vlc-cache-gen can actually be executed, to detect whether it is available for the right architecture. If it is not available, support the possibility to not sign the plugins.dat cache file. Also support the case the cache file is not there from the beginning. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=18271e16182312cc2d0a80848d562e52efc2ebf8 --- extras/package/macosx/codesign.sh | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/extras/package/macosx/codesign.sh b/extras/package/macosx/codesign.sh index 22f6cbb61a..3d6e796aad 100755 --- a/extras/package/macosx/codesign.sh +++ b/extras/package/macosx/codesign.sh @@ -79,13 +79,19 @@ if [ -e "./vlc-cache-gen" ]; then VLCCACHEGEN="./vlc-cache-gen" fi +$VLCCACHEGEN --help 1>/dev/null 2>&1 && returncode=$? || returncode=$? +if [ $returncode -ne 0 ]; then +info "WARN: Cannot execute vlc-cache-gen with path '$VLCCACHEGEN' (wrong arch?)" +VLCCACHEGEN="" +fi + if [ -z "$VLCCACHEGEN" ]; then -info "WARN: Cannot find vlc-cache-gen, cache will be corrupt after signing" +info "WARN: Cannot find vlc-cache-gen, cache will be removed for signing" fi SCRIPTDIR=$(dirname "$0") if [ ! -z "$RUNTIME" ]; then -RUNTIME_FLAGS="--options runtime --entitlements $SCRIPTDIR/vlc-hardening.entitlements" +RUNTIME_FLAGS="--options runtime --entitlements $SCRIPTDIR/vlc-hardening.entitlements" fi # Call with $1 = file or folder @@ -124,10 +130,11 @@ done if [ ! -z "$VLCCACHEGEN" ]; then $VLCCACHEGEN VLC.app/Contents/Frameworks/plugins +sign "VLC.app/Contents/Frameworks/plugins/plugins.dat" +else +rm "VLC.app/Contents/Frameworks/plugins/plugins.dat" || true fi -sign "VLC.app/Contents/Frameworks/plugins/plugins.dat" - info "Signing the libraries" for i in $(find VLC.app/Contents/Frameworks -type f -name "*.dylib" -d 1 -exec echo {} \;) ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] contrib: sparkle: call install_name_tool on actual file
vlc | branch: master | David Fuhrmann | Mon Dec 14 20:13:25 2020 +0100| [80d4dd9157fc410c1541973ae2ad2a4767fea65f] | committer: David Fuhrmann contrib: sparkle: call install_name_tool on actual file Calling on the symlink replaces that symlink with the real file with latest versions of that tool. This invalidated the framework structure of the Sparkle.framework. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=80d4dd9157fc410c1541973ae2ad2a4767fea65f --- contrib/src/sparkle/rules.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/src/sparkle/rules.mak b/contrib/src/sparkle/rules.mak index da34dc8af4..0a79e1a9a7 100644 --- a/contrib/src/sparkle/rules.mak +++ b/contrib/src/sparkle/rules.mak @@ -19,7 +19,7 @@ sparkle: Sparkle-$(SPARKLE_VERSION).zip .sum-sparkle .sparkle: sparkle # Build Sparkle and change the @rpath cd $< && xcodebuild $(XCODE_FLAGS) - cd $< && install_name_tool -id @executable_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle build/Release/Sparkle.framework/Sparkle + cd $< && install_name_tool -id @executable_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle build/Release/Sparkle.framework/Versions/A/Sparkle # Install cd $< && mkdir -p "$(PREFIX)/Frameworks" && \ rm -Rf "$(PREFIX)/Frameworks/Sparkle.framework" && \ ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] contrib: sparkle: call install_name_tool on actual file
vlc/vlc-3.0 | branch: master | David Fuhrmann | Mon Dec 14 20:13:25 2020 +0100| [81087465d4cb1abfc3f1a9f7abac44cb8767d55e] | committer: David Fuhrmann contrib: sparkle: call install_name_tool on actual file Calling on the symlink replaces that symlink with the real file with latest versions of that tool. This invalidated the framework structure of the Sparkle.framework. (cherry picked from commit 80d4dd9157fc410c1541973ae2ad2a4767fea65f) Signed-off-by: David Fuhrmann > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=81087465d4cb1abfc3f1a9f7abac44cb8767d55e --- contrib/src/sparkle/rules.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/src/sparkle/rules.mak b/contrib/src/sparkle/rules.mak index da34dc8af4..0a79e1a9a7 100644 --- a/contrib/src/sparkle/rules.mak +++ b/contrib/src/sparkle/rules.mak @@ -19,7 +19,7 @@ sparkle: Sparkle-$(SPARKLE_VERSION).zip .sum-sparkle .sparkle: sparkle # Build Sparkle and change the @rpath cd $< && xcodebuild $(XCODE_FLAGS) - cd $< && install_name_tool -id @executable_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle build/Release/Sparkle.framework/Sparkle + cd $< && install_name_tool -id @executable_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle build/Release/Sparkle.framework/Versions/A/Sparkle # Install cd $< && mkdir -p "$(PREFIX)/Frameworks" && \ rm -Rf "$(PREFIX)/Frameworks/Sparkle.framework" && \ ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] macosx: codesign: Check whether vlc-cache-gen can be executed
vlc/vlc-3.0 | branch: master | David Fuhrmann | Mon Dec 14 20:27:04 2020 +0100| [c8ab476aa089c71799db5624c809b5c83ceab825] | committer: David Fuhrmann macosx: codesign: Check whether vlc-cache-gen can be executed Check whether vlc-cache-gen can actually be executed, to detect whether it is available for the right architecture. If it is not available, support the possibility to not sign the plugins.dat cache file. Also support the case the cache file is not there from the beginning. (manual bp of 18271e16182312cc2d0a80848d562e52efc2ebf8) > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=c8ab476aa089c71799db5624c809b5c83ceab825 --- extras/package/macosx/codesign.sh | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/extras/package/macosx/codesign.sh b/extras/package/macosx/codesign.sh index 36e7213157..76711bae4a 100755 --- a/extras/package/macosx/codesign.sh +++ b/extras/package/macosx/codesign.sh @@ -79,13 +79,19 @@ if [ -e "./vlc-cache-gen" ]; then VLCCACHEGEN="./vlc-cache-gen" fi +$VLCCACHEGEN --help 1>/dev/null 2>&1 && returncode=$? || returncode=$? +if [ $returncode -ne 0 ]; then +info "WARN: Cannot execute vlc-cache-gen with path '$VLCCACHEGEN' (wrong arch?)" +VLCCACHEGEN="" +fi + if [ -z "$VLCCACHEGEN" ]; then -info "WARN: Cannot find vlc-cache-gen, cache will be corrupt after signing" +info "WARN: Cannot find vlc-cache-gen, cache will be removed for signing" fi SCRIPTDIR=$(dirname "$0") if [ ! -z "$RUNTIME" ]; then -RUNTIME_FLAGS="--options runtime --entitlements $SCRIPTDIR/vlc-hardening.entitlements" +RUNTIME_FLAGS="--options runtime --entitlements $SCRIPTDIR/vlc-hardening.entitlements" fi # Call with $1 = file or folder @@ -156,10 +162,11 @@ done if [ ! -z "$VLCCACHEGEN" ]; then $VLCCACHEGEN VLC.app/Contents/MacOS/plugins +sign "VLC.app/Contents/MacOS/plugins/plugins.dat" +else +rm "VLC.app/Contents/MacOS/plugins/plugins.dat" || true fi -sign "VLC.app/Contents/MacOS/plugins/plugins.dat" - info "Signing the libraries" for i in $(find VLC.app/Contents/MacOS/lib -type f -exec echo {} \;) ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] l10n: Catalan update
vlc/vlc-3.0 | branch: master | VideoLAN | Fri Dec 4 14:06:26 2020 +0100| [2db917fab36bbc6719767735c472f8675861d113] | committer: David Fuhrmann l10n: Catalan update InfoPlist.strings: 100% translated Signed-off-by: David Fuhrmann > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=2db917fab36bbc6719767735c472f8675861d113 --- modules/gui/macosx/Resources/ca.lproj/InfoPlist.strings | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/gui/macosx/Resources/ca.lproj/InfoPlist.strings b/modules/gui/macosx/Resources/ca.lproj/InfoPlist.strings index 7d58088ed3..6af4011459 100644 --- a/modules/gui/macosx/Resources/ca.lproj/InfoPlist.strings +++ b/modules/gui/macosx/Resources/ca.lproj/InfoPlist.strings @@ -1,10 +1,10 @@ /* Localized versions of Info.plist keys */ -"NSCameraUsageDescription" = "El VLC vol accedir a la càmera tal com ha demanat l'usuari."; -"NSMicrophoneUsageDescription" = "El VLC vol accedir al micròfon tal com ha demanat l'usuari."; -"NSAppleEventsUsageDescription" = "El VLC vol fer una pausa i reprendre els reproductors multimèdia externs."; -"NSDesktopFolderUsageDescription" = "El VLC vol accedir a la carpeta d'escriptori tal com l'ha sol·licitat l'usuari."; -"NSDocumentsFolderUsageDescription" = "El VLC vol accedir a la carpeta de documents tal com ha demanat l'usuari."; -"NSDownloadsFolderUsageDescription" = "El VLC vol accedir a la carpeta de baixades tal com ha demanat l'usuari."; -"NSNetworkVolumesUsageDescription" = "El VLC vol accedir a un volum de xarxa tal com ha demanat l'usuari."; -"NSRemovableVolumesUsageDescription" = "El VLC vol accedir a un volum extraïble tal com l'ha sol·licitat l'usuari."; +"NSCameraUsageDescription" = "VLC vol accedir la teva càmera tal com ha demanat l'usuari."; +"NSMicrophoneUsageDescription" = "VLC vol accedir el micròfon tal com ha demanat l'usuari."; +"NSAppleEventsUsageDescription" = "VLC vol fer una pausa i reprendre els reproductors multimèdia externs."; +"NSDesktopFolderUsageDescription" = "VLC vol accedir a la carpeta d'escriptori tal com l'ha sol·licitat l'usuari."; +"NSDocumentsFolderUsageDescription" = "VLC vol accedir la carpeta de documents tal com ha demanat l'usuari."; +"NSDownloadsFolderUsageDescription" = "VLC vol accedir la carpeta de baixades tal com ha demanat l'usuari."; +"NSNetworkVolumesUsageDescription" = "VLC vol accedir un volum de xarxa tal com ha demanat l'usuari."; +"NSRemovableVolumesUsageDescription" = "VLC vol accedir un volum extraïble tal com ha sol·licitat l'usuari."; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] l10n: Romanian update
vlc/vlc-3.0 | branch: master | Eduard Pintilie | Wed Dec 9 17:53:12 2020 +0100| [22138a6916a6816cab8132c4113ebe21bd817a66] | committer: David Fuhrmann l10n: Romanian update InfoPlist.strings: 100% translated Signed-off-by: David Fuhrmann > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=22138a6916a6816cab8132c4113ebe21bd817a66 --- modules/gui/macosx/Resources/ro.lproj/InfoPlist.strings | 10 ++ 1 file changed, 10 insertions(+) diff --git a/modules/gui/macosx/Resources/ro.lproj/InfoPlist.strings b/modules/gui/macosx/Resources/ro.lproj/InfoPlist.strings new file mode 100644 index 00..e225004793 --- /dev/null +++ b/modules/gui/macosx/Resources/ro.lproj/InfoPlist.strings @@ -0,0 +1,10 @@ +/* Localized versions of Info.plist keys */ + +"NSCameraUsageDescription" = "VLC dorește să acceseze camera la cererea utilizatorului."; +"NSMicrophoneUsageDescription" = "VLC dorește să acceseze microfonul la cererea utilizatorului."; +"NSAppleEventsUsageDescription" = "VLC dorește să oprească redarea și să reia playerele media externe."; +"NSDesktopFolderUsageDescription" = "VLC dorește să acceseze folderul desktop la cererea utilizatorului."; +"NSDocumentsFolderUsageDescription" = "VLC dorește să acceseze folderul de documente la cererea utilizatorului."; +"NSDownloadsFolderUsageDescription" = "VLC dorește să acceseze folderul de descărcări, la cererea utilizatorului."; +"NSNetworkVolumesUsageDescription" = "VLC dorește să acceseze un volum din rețea la cererea utilizatorului."; +"NSRemovableVolumesUsageDescription" = "VLC dorește să acceseze un volum amovibil, la cererea utilizatorului."; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] macosx: fix make dist
vlc/vlc-3.0 | branch: master | David Fuhrmann | Mon Dec 14 20:45:14 2020 +0100| [96fc54755d18b1091673043a965eafc71bf2af99] | committer: David Fuhrmann macosx: fix make dist > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=96fc54755d18b1091673043a965eafc71bf2af99 --- modules/gui/macosx/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/gui/macosx/Makefile.am b/modules/gui/macosx/Makefile.am index cb1962ad94..99bb7df691 100644 --- a/modules/gui/macosx/Makefile.am +++ b/modules/gui/macosx/Makefile.am @@ -1,6 +1,6 @@ SUFFIXES += .xib -libmacosx_plugin_la_OBJCFLAGS = $(AM_OBJCFLAGS) -fobjc-exceptions -fobjc-arc +libmacosx_plugin_la_OBJCFLAGS = $(AM_OBJCFLAGS) -fobjc-exceptions -fobjc-arc libmacosx_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(guidir)' \ -Wl,-framework,Cocoa -Wl,-framework,CoreServices \ -Wl,-framework,AVFoundation -Wl,-framework,CoreMedia -Wl,-framework,IOKit \ @@ -759,6 +759,7 @@ EXTRA_DIST += \ gui/macosx/Resources/pl.lproj/InfoPlist.strings \ gui/macosx/Resources/pt-BR.lproj/InfoPlist.strings \ gui/macosx/Resources/pt-PT.lproj/InfoPlist.strings \ + gui/macosx/Resources/ro.lproj/InfoPlist.strings \ gui/macosx/Resources/sk.lproj/InfoPlist.strings \ gui/macosx/Resources/sl.lproj/InfoPlist.strings \ gui/macosx/Resources/sv.lproj/InfoPlist.strings \ ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] backport pick original rist access_output module (blind copy)
vlc/vlc-3.0 | branch: master | Sergio Ammirata | Sun Jul 26 15:40:14 2020 -0400| [126b263a7d99af0e58b92b1ba57d28ec81b04dfb] | committer: Pierre Ynard backport pick original rist access_output module (blind copy) > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=126b263a7d99af0e58b92b1ba57d28ec81b04dfb --- modules/access_output/rist.c | 870 +++ 1 file changed, 870 insertions(+) Diff: http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commitdiff;h=126b263a7d99af0e58b92b1ba57d28ec81b04dfb ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] Adjust for 4.0 to 3.0 differences in rist access module
vlc/vlc-3.0 | branch: master | Sergio Ammirata | Sun Jul 26 15:47:50 2020 -0400| [bcf7edd8f3e84333460fa780c84491a27c321721] | committer: Pierre Ynard Adjust for 4.0 to 3.0 differences in rist access module > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=bcf7edd8f3e84333460fa780c84491a27c321721 --- modules/access/rist.c | 60 +++ modules/access/rist.h | 8 --- 2 files changed, 37 insertions(+), 31 deletions(-) diff --git a/modules/access/rist.c b/modules/access/rist.c index 009c17790d..6b06542cab 100644 --- a/modules/access/rist.c +++ b/modules/access/rist.c @@ -2,7 +2,7 @@ * rist.c: RIST (Reliable Internet Stream Transport) input module * * Copyright (C) 2018, DVEO, the Broadcast Division of Computer Modules, Inc. - * Copyright (C) 2018, SipRadius LLC + * Copyright (C) 2018-2020, SipRadius LLC * * Authors: Sergio Ammirata * Daniele Lacamera @@ -30,14 +30,11 @@ #include #include #include -#include #include #include #include #include -#ifdef HAVE_POLL_H #include -#endif #include #include #include @@ -75,7 +72,7 @@ enum NACK_TYPE { NACK_FMT_BITMASK }; -typedef struct +struct stream_sys_t { struct rist_flow *flow; char sender_name[MAX_CNAME]; @@ -91,8 +88,7 @@ typedef struct bool b_sendblindnacks; bool b_disablenacks; bool b_flag_discontinuity; -bool dead; -vlc_queue_t queue; +block_fifo_t *p_fifo; vlc_mutex_t lock; uint64_t last_message; uint64_t last_reset; @@ -107,7 +103,7 @@ typedef struct uint32_t i_recovered_packets; uint32_t i_reordered_packets; uint32_t i_total_packets; -} stream_sys_t; +}; static int Control(stream_t *p_access, int i_query, va_list args) { @@ -121,7 +117,7 @@ static int Control(stream_t *p_access, int i_query, va_list args) break; case STREAM_GET_PTS_DELAY: -*va_arg( args, vlc_tick_t * ) = VLC_TICK_FROM_MS( +*va_arg( args, int64_t * ) = RIST_TICK_FROM_MS( var_InheritInteger(p_access, "network-caching") ); break; @@ -406,7 +402,7 @@ static void send_nacks(stream_t *p_access, struct rist_flow *flow) { memcpy(pkt_nacks->p_buffer, nacks, nacks_len * 2); pkt_nacks->i_buffer = nacks_len * 2; -vlc_queue_Enqueue(&p_sys->queue, pkt_nacks); +block_FifoPut( p_sys->p_fifo, pkt_nacks ); } } } @@ -675,7 +671,7 @@ static bool rist_input(stream_t *p_access, struct rist_flow *flow, uint8_t *buf, pkt->buffer->i_buffer = len; memcpy(pkt->buffer->p_buffer, buf, len); pkt->rtp_ts = pkt_ts; -p_sys->last_data_rx = vlc_tick_now(); +p_sys->last_data_rx = mdate(); /* Reset the try counter regardless of wether it was a retransmit or not */ flow->nacks_retries[idx] = 0; @@ -776,12 +772,14 @@ static void *rist_thread(void *data) { stream_t *p_access = data; stream_sys_t *p_sys = p_access->p_sys; -block_t *pkt_nacks; /* Process nacks every 5ms */ /* We only ask for the relevant ones */ -while ((pkt_nacks = vlc_queue_DequeueKillable(&p_sys->queue, - &p_sys->dead)) != NULL) { +for (;;) { +block_t *pkt_nacks = block_FifoGet(p_sys->p_fifo); + +int canc = vlc_savecancel(); + /* there are two bytes per nack */ uint16_t nack_count = (uint16_t)pkt_nacks->i_buffer/2; switch(p_sys->nack_type) { @@ -796,6 +794,8 @@ static void *rist_thread(void *data) if (nack_count > 1) msg_Dbg(p_access, "Sent %u NACKs !!!", nack_count); block_Release(pkt_nacks); + +vlc_restorecancel (canc); } return NULL; @@ -917,12 +917,12 @@ static block_t *BlockRIST(stream_t *p_access, bool *restrict eof) buf = NULL; } -now = vlc_tick_now(); +now = mdate(); /* Process stats and print them out */ /* We need to measure some items every 70ms */ uint64_t interval = (now - flow->feedback_time); -if ( interval > VLC_TICK_FROM_MS(RTCP_INTERVAL) ) +if ( interval > RIST_TICK_FROM_MS(RTCP_INTERVAL) ) { if (p_sys->i_poll_timeout_nonzero_count > 0) { @@ -941,7 +941,7 @@ static block_t *BlockRIST(stream_t *p_access, bool *restrict eof) } /* We print out the stats once per second */ interval = (now - p_sys->i_last_stat); -if ( interval > VLC_TICK_FROM_MS(STATS_INTERVAL) ) +if ( interval > RIST_TICK_FROM_MS(STATS_INTERVAL) ) { if ( p_sys->i_lost_packets > 0) msg_Err(p_access, "We have %d lost packets", p_sys->i_lost_packets); @@ -969,17 +969,17 @@ static block_t *BlockRIST(stream_t *p_access,
[vlc-commits] backport pick original rist access module (blind copy)
vlc/vlc-3.0 | branch: master | Sergio Ammirata | Sun Jul 26 15:38:39 2020 -0400| [277502589bc9c37a4294d3247c22ad13e04740bd] | committer: Pierre Ynard backport pick original rist access module (blind copy) > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=277502589bc9c37a4294d3247c22ad13e04740bd --- modules/access/rist.c | 1156 + modules/access/rist.h | 367 2 files changed, 1523 insertions(+) Diff: http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commitdiff;h=277502589bc9c37a4294d3247c22ad13e04740bd ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] Adjust for 4.0 to 3.0 differences in rist access_output
vlc/vlc-3.0 | branch: master | Sergio Ammirata | Sun Jul 26 16:10:46 2020 -0400| [cfd957f902bd01620ca62cc56404379f5a697ba1] | committer: Pierre Ynard Adjust for 4.0 to 3.0 differences in rist access_output > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=cfd957f902bd01620ca62cc56404379f5a697ba1 --- modules/access_output/rist.c | 57 +++- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/modules/access_output/rist.c b/modules/access_output/rist.c index 61066bdc2b..bf22e42e1f 100644 --- a/modules/access_output/rist.c +++ b/modules/access_output/rist.c @@ -2,7 +2,7 @@ * * rist.c: RIST (Reliable Internet Stream Transport) output module * * Copyright (C) 2018, DVEO, the Broadcast Division of Computer Modules, Inc. - * Copyright (C) 2018, SipRadius LLC + * Copyright (C) 2018-2020, SipRadius LLC * * Authors: Sergio Ammirata * Daniele Lacamera @@ -33,16 +33,11 @@ #include #include #include -#include #include #include -#ifdef HAVE_POLL_H #include -#endif #include -#ifdef HAVE_SYS_SOCKET_H #include -#endif #include #include #include @@ -77,7 +72,7 @@ static const char *const ppsz_sout_options[] = { NULL }; -typedef struct +struct sout_access_out_sys_t { struct rist_flow *flow; uint16_t rtp_counter; @@ -93,13 +88,12 @@ typedef struct block_t *p_pktbuffer; uint64_t i_ticks_caching; uint32_t ssrc; -bool dead; -vlc_queue_t queue; +block_fifo_t *p_fifo; /* stats variables */ uint64_t i_last_stat; uint32_t i_retransmit_packets; uint32_t i_total_packets; -} sout_access_out_sys_t; +}; static struct rist_flow *rist_init_tx() { @@ -386,7 +380,7 @@ static void rist_rtcp_send(sout_access_out_t *p_access) fractions <<= 32ULL; fractions /= 100ULL; rtcp_sr_set_ntp_time_lsw(p_sr, (uint32_t)fractions); -rtcp_sr_set_rtp_time(p_sr, rtp_get_ts(vlc_tick_now())); +rtcp_sr_set_rtp_time(p_sr, rtp_get_ts(mdate())); vlc_mutex_lock( &p_sys->lock ); rtcp_sr_set_packet_count(p_sr, flow->packets_count); rtcp_sr_set_octet_count(p_sr, flow->bytes_count); @@ -469,8 +463,8 @@ static void *rist_thread(void *data) } /* And, in any case: */ -now = vlc_tick_now(); -if ((now - p_sys->last_rtcp_tx) > VLC_TICK_FROM_MS(RTCP_INTERVAL)) +now = mdate(); +if ((now - p_sys->last_rtcp_tx) > RIST_TICK_FROM_MS(RTCP_INTERVAL)) { rist_rtcp_send(p_access); p_sys->last_rtcp_tx = now; @@ -488,20 +482,22 @@ static void* ThreadSend( void *data ) { sout_access_out_t *p_access = data; sout_access_out_sys_t *p_sys = p_access->p_sys; -vlc_tick_t i_caching = p_sys->i_ticks_caching; +uint64_t i_caching = p_sys->i_ticks_caching; struct rist_flow *flow = p_sys->flow; -block_t *out; -while ((out = vlc_queue_DequeueKillable(&p_sys->queue, -&p_sys->dead)) != NULL) +for (;;) { ssize_t len = 0; uint16_t seq = 0; uint32_t pkt_ts = 0; +block_t *out = block_FifoGet( p_sys->p_fifo ); -vlc_tick_wait (out->i_dts + i_caching); +block_cleanup_push( out ); +mwait (out->i_dts + (mtime_t)i_caching); +vlc_cleanup_pop(); len = out->i_buffer; +int canc = vlc_savecancel(); seq = rtp_get_seqnum(out->p_buffer); pkt_ts = rtp_get_timestamp(out->p_buffer); @@ -553,9 +549,9 @@ static void* ThreadSend( void *data ) vlc_mutex_unlock( &p_sys->lock ); /* We print out the stats once per second */ -uint64_t now = vlc_tick_now(); +uint64_t now = mdate(); uint64_t interval = (now - p_sys->i_last_stat); -if ( interval > VLC_TICK_FROM_MS(STATS_INTERVAL) ) +if ( interval > RIST_TICK_FROM_MS(STATS_INTERVAL) ) { if (p_sys->i_retransmit_packets > 0) { @@ -571,6 +567,8 @@ static void* ThreadSend( void *data ) p_sys->i_total_packets = 0; } p_sys->i_total_packets++; + +vlc_restorecancel (canc); } return NULL; } @@ -589,7 +587,8 @@ static void SendtoFIFO( sout_access_out_t *p_access, block_t *buffer ) uint32_t pkt_ts = rtp_get_ts(buffer->i_dts); rtp_set_timestamp(bufhdr, pkt_ts); -vlc_queue_Enqueue(&p_sys->queue, block_Duplicate(buffer)); +block_t *pkt = block_Duplicate(buffer); +block_FifoPut( p_sys->p_fifo, pkt ); } static ssize_t Write( sout_access_out_t *p_access, block_t *p_buffer ) @@ -685,6 +684,9 @@ static void Clean( sout_access_out_t *p_access ) { sout_access_out_sys_t *p_sys = p_access->p_sys; +if( likely(p_sys->p_fifo != NULL) ) +block_FifoRelease( p_sys->p_fifo ); + if ( p_sys->flow )
[vlc-commits] Remove external bitstream dependencies from rist modules
vlc/vlc-3.0 | branch: master | Sergio Ammirata | Mon Nov 2 15:42:29 2020 -0500| [df6cf9ed63285dbe4792feb47b182e7363f10cb2] | committer: Pierre Ynard Remove external bitstream dependencies from rist modules > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=df6cf9ed63285dbe4792feb47b182e7363f10cb2 --- modules/access/rist.c| 4 - modules/access/rist.h| 230 ++- modules/access_output/rist.c | 5 - 3 files changed, 229 insertions(+), 10 deletions(-) diff --git a/modules/access/rist.c b/modules/access/rist.c index 6b06542cab..8e81383b68 100644 --- a/modules/access/rist.c +++ b/modules/access/rist.c @@ -35,10 +35,6 @@ #include #include #include -#include -#include -#include -#include #include "rist.h" diff --git a/modules/access/rist.h b/modules/access/rist.h index 263b43cb2e..cc48a31f61 100644 --- a/modules/access/rist.h +++ b/modules/access/rist.h @@ -366,4 +366,232 @@ static bool is_multicast_address(char *psz_dst_server) freeaddrinfo(res); return ismulticast; -} \ No newline at end of file +} + +// imported from bitstream +#define RTP_HEADER_SIZE 12 +#define RTCP_SR_SIZE 28 +#define RTCP_SDES_SIZE10 +#define RTCP_FB_HEADER_SIZE 12 +#define RTCP_FB_FCI_GENERIC_NACK_SIZE 4 +#define RTCP_PT_SR200 +#define RTCP_PT_RR201 +#define RTCP_PT_SDES 202 +#define RTCP_PT_RTPFB 205 + +static inline uint32_t rtp_get_timestamp(const uint8_t *p_rtp) +{ +return (p_rtp[4] << 24) | (p_rtp[5] << 16) | (p_rtp[6] << 8) | p_rtp[7]; +} + +static inline void rtp_set_timestamp(uint8_t *p_rtp, uint32_t i_timestamp) +{ +p_rtp[4] = (i_timestamp >> 24) & 0xff; +p_rtp[5] = (i_timestamp >> 16) & 0xff; +p_rtp[6] = (i_timestamp >> 8) & 0xff; +p_rtp[7] = i_timestamp & 0xff; +} + +static inline uint16_t rtp_get_seqnum(const uint8_t *p_rtp) +{ +return (p_rtp[2] << 8) | p_rtp[3]; +} + +static inline void rtp_set_seqnum(uint8_t *p_rtp, uint16_t i_seqnum) +{ +p_rtp[2] = i_seqnum >> 8; +p_rtp[3] = i_seqnum & 0xff; +} + +static inline int8_t rtcp_sdes_get_name_length(const uint8_t *p_rtcp_sdes) +{ +return p_rtcp_sdes[9]; +} + +static inline uint16_t rtcp_get_length(const uint8_t *p_rtcp) +{ +return (p_rtcp[2] << 8) | p_rtcp[3]; +} + +static inline void rtcp_set_length(uint8_t *p_rtcp, + uint16_t length) +{ +p_rtcp[2] = length >> 8; +p_rtcp[3] = length & 0xff; +} + +static inline uint8_t rtcp_get_pt(const uint8_t *p_rtcp) +{ +return p_rtcp[1]; +} + +static inline void rtcp_set_pt(uint8_t *p_rtcp, uint8_t pt) +{ +p_rtcp[1] = pt; +} + +static inline bool rtp_check_hdr(const uint8_t *p_rtp) +{ +return (p_rtp[0] & 0xc0) == 0x80; +} + +static inline void rtp_set_hdr(uint8_t *p_rtp) +{ +p_rtp[0] = 0x80; +} + +static inline void rtcp_rr_set_pt(uint8_t *p_rtcp_rr) +{ +rtcp_set_pt(p_rtcp_rr, RTCP_PT_RR); +} + +static inline void rtcp_fb_set_int_ssrc_pkt_sender(uint8_t *p_rtcp_fb, uint32_t i_ssrc) +{ +p_rtcp_fb[4] = (i_ssrc >> 24) & 0xff; +p_rtcp_fb[5] = (i_ssrc >> 16) & 0xff; +p_rtcp_fb[6] = (i_ssrc >> 8) & 0xff; +p_rtcp_fb[7] = i_ssrc & 0xff; +} + +static inline void rtp_set_cc(uint8_t *p_rtp, uint8_t i_cc) +{ +p_rtp[0] &= 0xf0; +p_rtp[0] |= i_cc & 0xf; +} + +static inline void rtcp_sdes_set_pt(uint8_t *p_rtcp_rr) +{ +rtcp_set_pt(p_rtcp_rr, RTCP_PT_SDES); +} + +static inline void rtcp_sdes_set_cname(uint8_t *p_rtcp_sdes, uint8_t cname) +{ +p_rtcp_sdes[8] = cname; +} + +static inline void rtcp_sdes_set_name_length(uint8_t *p_rtcp_sdes, +int8_t name_length) +{ +p_rtcp_sdes[9] = name_length; +} + +static inline uint8_t rtcp_fb_get_fmt(const uint8_t *p_rtcp) +{ +return p_rtcp[0] & 0x1f; +} + +static inline void rtcp_fb_set_fmt(uint8_t *p_rtcp, uint8_t fmt) +{ +p_rtcp[0] |= fmt & 0x1f; +} + +static inline uint16_t rtcp_fb_nack_get_packet_id(const uint8_t *p_rtcp_fb_nack) +{ +return (p_rtcp_fb_nack[0] << 8) | p_rtcp_fb_nack[1]; +} + +static inline void rtcp_fb_nack_set_packet_id(uint8_t *p_rtcp_fb_nack, + uint16_t packet_id) +{ +p_rtcp_fb_nack[0] = (packet_id >> 8) & 0xff; +p_rtcp_fb_nack[1] = packet_id & 0xff; +} + +static inline uint16_t rtcp_fb_nack_get_bitmask_lost(const uint8_t *p_rtcp_fb_nack) +{ +return (p_rtcp_fb_nack[2] << 8) | p_rtcp_fb_nack[3]; +} + +static inline void rtcp_fb_nack_set_bitmask_lost(uint8_t *p_rtcp_fb_nack, + uint16_t bitmask) +{ +p_rtcp_fb_nack[2] = (bitmask >> 8) & 0xff; +p_rtcp_fb_nack[3] = bitmask & 0xff; +} + +static inline void rtcp_fb_get_ssrc_media_src(const uint8_t *p_rtcp_fb, + uint8_t pi_ssrc[4]) +{ +pi_ssrc[0] = p_rtcp_fb[8]; +pi_ssrc[1] = p_rtcp_fb[9]; +pi_ssrc[2
[vlc-commits] Protect against namespace collisions after the bitstream import
vlc/vlc-3.0 | branch: master | Sergio Ammirata | Mon Nov 2 16:08:06 2020 -0500| [f2789e08d8702cfaa1aa580aa3d522bbde07491a] | committer: Pierre Ynard Protect against namespace collisions after the bitstream import > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=f2789e08d8702cfaa1aa580aa3d522bbde07491a --- modules/access/rist.c| 102 +-- modules/access/rist.h| 96 modules/access_output/rist.c | 92 +++--- 3 files changed, 145 insertions(+), 145 deletions(-) Diff: http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commitdiff;h=f2789e08d8702cfaa1aa580aa3d522bbde07491a ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] Backport makefile changes for rist input and output modules
vlc/vlc-3.0 | branch: master | Sergio Ammirata | Sat Nov 21 08:12:54 2020 -0500| [dbff76e0199e29a953aa26f42450e5b640ff2fa8] | committer: Pierre Ynard Backport makefile changes for rist input and output modules > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=dbff76e0199e29a953aa26f42450e5b640ff2fa8 --- modules/access/Makefile.am| 7 +++ modules/access_output/Makefile.am | 6 ++ 2 files changed, 13 insertions(+) diff --git a/modules/access/Makefile.am b/modules/access/Makefile.am index 5d2a5f915c..c8b0513637 100644 --- a/modules/access/Makefile.am +++ b/modules/access/Makefile.am @@ -428,3 +428,10 @@ libaccess_srt_plugin_la_LIBADD = $(SRT_LIBS) libaccess_srt_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(accessdir)' access_LTLIBRARIES += $(LTLIBaccess_srt) EXTRA_LTLIBRARIES += libaccess_srt_plugin.la + +### RIST ### + +librist_plugin_la_SOURCES = access/rist.c access/rist.h +librist_plugin_la_CFLAGS = $(AM_CFLAGS) +librist_plugin_la_LIBADD = $(SOCKET_LIBS) +access_LTLIBRARIES += librist_plugin.la diff --git a/modules/access_output/Makefile.am b/modules/access_output/Makefile.am index 26560f400c..0ebc28b9f9 100644 --- a/modules/access_output/Makefile.am +++ b/modules/access_output/Makefile.am @@ -35,3 +35,9 @@ libaccess_output_srt_plugin_la_LIBADD = $(SRT_LIBS) $(LIBPTHREAD) libaccess_output_srt_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(access_outdir)' access_out_LTLIBRARIES += $(LTLIBaccess_output_srt) EXTRA_LTLIBRARIES += libaccess_output_srt_plugin.la + +### RIST ### +libaccess_output_rist_plugin_la_SOURCES = access_output/rist.c access/rist.h +libaccess_output_rist_plugin_la_CFLAGS = $(AM_CFLAGS) +libaccess_output_rist_plugin_la_LIBADD = $(SOCKET_LIBS) $(LIBPTHREAD) +access_out_LTLIBRARIES += libaccess_output_rist_plugin.la ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] Update NEWS
vlc/vlc-3.0 | branch: master | Sergio Ammirata | Sat Nov 21 08:18:23 2020 -0500| [86747e636de5f5fd63f819644a1bcbc69980cff0] | committer: Pierre Ynard Update NEWS > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=86747e636de5f5fd63f819644a1bcbc69980cff0 --- NEWS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/NEWS b/NEWS index 2baae88eef..150177692a 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,12 @@ Changes between 3.0.11.1 and 3.0.12: -- +Access: + * Add new RIST access module compliant with simple profile (VSF_TR-06-1) + +Access Output: + * Add new RIST access output module compliant with simple profile (VSF_TR-06-1) + Demux: * Fixed adaptive's handling of resolution settings ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits