[vlc-commits] mkv: renamed matroska_segment_c::{Select, UnSelect}
Filip Roséen
git at videolan.org
Mon May 9 15:09:27 CEST 2016
vlc | branch: master | Filip Roséen <filip at videolabs.io> | Mon May 9 14:53:06 2016 +0200| [5263c190882994f9ed643911ac03be939e720878] | committer: Jean-Baptiste Kempf
mkv: renamed matroska_segment_c::{Select, UnSelect}
matroska_segment_c::Select and matroska_segment_c::Unselect are used to
create/destroy ESs, with that said they are better named ESCreate and
ESDestroy.
Given their name and functionality there is no need (or reason) to send
ES_OUT_SET_NEXT_DISPLAY_TIME from the creator, nor is it necessary to
jump to some particular file-offset (since this is handled by a call to
code that invokes seek in the relevant places).
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5263c190882994f9ed643911ac03be939e720878
---
modules/demux/mkv/demux.cpp | 5 +++--
modules/demux/mkv/matroska_segment.cpp | 4 ++--
modules/demux/mkv/matroska_segment.hpp | 4 ++--
modules/demux/mkv/mkv.cpp | 2 +-
modules/demux/mkv/virtual_segment.cpp | 2 +-
5 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/modules/demux/mkv/demux.cpp b/modules/demux/mkv/demux.cpp
index 78ebd61..aeb707c 100644
--- a/modules/demux/mkv/demux.cpp
+++ b/modules/demux/mkv/demux.cpp
@@ -781,9 +781,10 @@ bool demux_sys_t::PreparePlayback( virtual_segment_c & new_vsegment, mtime_t i_m
if ( p_current_vsegment != &new_vsegment )
{
if ( p_current_vsegment->CurrentSegment() != NULL )
- p_current_vsegment->CurrentSegment()->UnSelect();
+ p_current_vsegment->CurrentSegment()->ESDestroy();
p_current_vsegment = &new_vsegment;
+ p_current_vsegment->CurrentSegment()->ESCreate();
i_current_title = p_current_vsegment->i_sys_title;
}
if( !p_current_vsegment->CurrentSegment() )
@@ -795,7 +796,7 @@ bool demux_sys_t::PreparePlayback( virtual_segment_c & new_vsegment, mtime_t i_m
/* add information */
p_current_vsegment->CurrentSegment()->InformationCreate( );
- p_current_vsegment->CurrentSegment()->Select( i_mk_date );
+ p_current_vsegment->CurrentSegment()->ESCreate( );
/* Seek to the beginning */
p_current_vsegment->Seek(p_current_vsegment->CurrentSegment()->sys.demuxer,
diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index db45b04..6e582d6 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -926,7 +926,7 @@ void matroska_segment_c::EnsureDuration()
es.I_O().setFilePointer( i_current_position, seek_beginning );
}
-bool matroska_segment_c::Select( mtime_t i_mk_start_time )
+bool matroska_segment_c::ESCreate()
{
/* add all es */
msg_Dbg( &sys.demuxer, "found %d es", static_cast<int>( tracks.size() ) );
@@ -960,7 +960,7 @@ bool matroska_segment_c::Select( mtime_t i_mk_start_time )
return true;
}
-void matroska_segment_c::UnSelect( )
+void matroska_segment_c::ESDestroy( )
{
sys.p_ev->ResetPci();
diff --git a/modules/demux/mkv/matroska_segment.hpp b/modules/demux/mkv/matroska_segment.hpp
index a653d76..d596cb3 100644
--- a/modules/demux/mkv/matroska_segment.hpp
+++ b/modules/demux/mkv/matroska_segment.hpp
@@ -138,11 +138,11 @@ public:
int BlockGet( KaxBlock * &, KaxSimpleBlock * &, bool *, bool *, int64_t *);
- bool Select( mtime_t i_mk_start_time );
- void UnSelect();
int FindTrackByBlock(tracks_map_t::iterator* track_it, const KaxBlock *, const KaxSimpleBlock * );
+ bool ESCreate( );
+ void ESDestroy( );
static bool CompareSegmentUIDs( const matroska_segment_c * item_a, const matroska_segment_c * item_b );
diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index 7323b42..ad90cc6 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -282,7 +282,7 @@ static void Close( vlc_object_t *p_this )
{
matroska_segment_c *p_segment = p_vsegment->CurrentSegment();
if( p_segment )
- p_segment->UnSelect();
+ p_segment->ESDestroy();
}
delete p_sys;
diff --git a/modules/demux/mkv/virtual_segment.cpp b/modules/demux/mkv/virtual_segment.cpp
index 1b0b674..e41e16a 100644
--- a/modules/demux/mkv/virtual_segment.cpp
+++ b/modules/demux/mkv/virtual_segment.cpp
@@ -534,7 +534,7 @@ void virtual_segment_c::Seek( demux_t & demuxer, mtime_t i_mk_date, virtual_chap
if ( p_current_vchapter )
{
KeepTrackSelection( p_current_vchapter->segment, p_vchapter->segment );
- p_current_vchapter->segment.UnSelect();
+ p_current_vchapter->segment.ESDestroy();
}
msg_Dbg( &demuxer, "SWITCH CHAPTER uid=%" PRId64, p_vchapter->p_chapter ? p_vchapter->p_chapter->i_uid : 0 );
p_current_vchapter = p_vchapter;
More information about the vlc-commits
mailing list