Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • videolan/vlc
  • chouquette/vlc
  • bakiewicz.marek122/vlc
  • devnexen/vlc
  • rohanrajpal/vlc
  • blurrrb/vlc
  • gsoc/gsoc2019/darkapex/vlc
  • b1ue/vlc
  • fkuehne/vlc
  • magsoft/vlc
  • chub/vlc
  • cramiro9/vlc
  • robUx4/vlc
  • rom1v/vlc
  • akshayaky/vlc
  • tmk907/vlc
  • akymaster/vlc
  • govind.sharma/vlc
  • psilokos/vlc
  • xjbeta/vlc
  • jahan/vlc
  • 1480c1/vlc
  • amanchande/vlc
  • aaqib/vlc
  • rist/vlc
  • apol/vlc
  • mindfreeze/vlc
  • alexandre-janniaux/vlc
  • sandsmark/vlc
  • jagannatharjun/vlc
  • gsoc/gsoc2020/matiaslgonzalez/vlc
  • gsoc/gsoc2020/jagannatharjun/vlc
  • mstorsjo/vlc
  • gsoc/gsoc2020/vedenta/vlc
  • gsoc/gsoc2020/arnav-ishaan/vlc
  • gsoc/gsoc2020/andreduong/vlc
  • fuzun/vlc
  • gsoc/gsoc2020/vatsin/vlc
  • gsoc/gsoc2020/sagid/vlc
  • yaron/vlc
  • Phoenix/vlc
  • Garf/vlc
  • ePiratWorkarounds/vlc
  • tguillem/vlc
  • jnqnfe/vlc
  • mdc/vlc
  • Vedaa/vlc
  • rasa/vlc
  • quink/vlc
  • yealo/vlc
  • aleksey_ak/vlc
  • ePirat/vlc
  • ilya.yanok/vlc
  • asenat/vlc
  • m/vlc
  • bunjee/vlc
  • BLumia/vlc
  • sagudev/vlc
  • hamedmonji30/vlc
  • nullgemm/vlc
  • DivyamAhuja/vlc
  • thesamesam/vlc
  • dag7/vlc
  • snehil101/vlc
  • haasn/vlc
  • jbk/vlc
  • ValZapod/vlc
  • mfkl/vlc
  • WangChuan/vlc
  • core1024/vlc
  • GhostVaibhav/vlc
  • dfuhrmann/vlc
  • davide.prade/vlc
  • tmatth/vlc
  • Courmisch/vlc
  • zouya/vlc
  • hpi/vlc
  • EwoutH/vlc
  • aleung27/vlc
  • hengwu0/vlc
  • saladin/vlc
  • ashuio/vlc
  • richselwood/vlc
  • verma16Ayush/vlc
  • chemicalflash/vlc
  • PoignardAzur/vlc
  • huangjieNT/vlc
  • Blake-Haydon/vlc
  • AnuthaDev/vlc
  • gsoc/gsoc2021/mpd/vlc
  • nicolas_lequec/vlc
  • sambassaly/vlc
  • thresh/vlc
  • bonniegong/vlc
  • myaashish/vlc
  • stavros.vagionitis/vlc
  • ileoo/vlc
  • louis-santucci/vlc
  • cchristiansen/vlc
  • sabyasachi07/vlc
  • AbduAmeen/vlc
  • ashishb0410/vlc
  • urbanhusky/vlc
  • davidepietrasanta/vlc
  • riksleutelstad/vlc
  • jeremyVignelles/vlc
  • komh/vlc
  • iamjithinjohn/vlc
  • JohannesKauffmann/vlc2
  • kunglao/vlc
  • natzberg/vlc
  • jill/vlc
  • cwendling/vlc
  • adufou/vlc
  • ErwanAirone/vlc
  • HasinduDilshan10/vlc
  • vagrantc/vlc
  • rafiv/macos-bigsur-icon
  • Aymeriic/vlc
  • saranshg20/vlc
  • metzlove24/vlc
  • linkfanel/vlc
  • Ds886/vlc
  • metehan-arslan/vlc
  • Skantes/vlc
  • kgsandundananjaya96/vlc
  • mitchcapper/vlc
  • advaitgupta/vlc
  • StefanBruens/vlc
  • ratajs/vlc
  • T.M.F.B.3761/vlc
  • m222059/vlc
  • casemerrick/vlc
  • joshuaword2alt/vlc
  • sjwaddy/vlc
  • dima/vlc
  • Ybalrid/vlc
  • umxprime/vlc
  • eschmidt/vlc
  • vannieuwenhuysenmichelle/vlc
  • badcf00d/vlc
  • wesinator/vlc
  • louis/vlc
  • xqq/vlc
  • EmperorYP7/vlc
  • NicoLiam/vlc
  • loveleen/vlc
  • rofferom/vlc
  • rbultje/vlc
  • TheUnamed/vlc
  • pratiksharma341/vlc
  • Saurab17/vlc
  • purist.coder/vlc
  • Shuicheng/vlc
  • mdrrubel292/vlc
  • silverbleu00/vlc
  • metif12/vlc
  • asher-m/vlc
  • jeffk/vlc
  • Brandonbr1/vlc
  • beautyyuyanli/vlc
  • rego21/vlc
  • muyangren907/vlc
  • collectionbylawrencejason/vlc
  • evelez/vlc
  • GSMgeeth/vlc
  • Oneric/vlc
  • TJ5/vlc
  • XuanTung95/vlc
  • darrenjenny21/vlc
  • Trenly/vlc
  • RockyTDR/vlc
  • mjakubowski/vlc
  • caprica/vlc
  • ForteFrankie/vlc
  • seannamiller19/vlc
  • junlon2006/vlc
  • kiwiren6666/vlc
  • iuseiphonexs/vlc
  • fenngtun/vlc
  • Rajdutt999/vlc
  • typx/vlc
  • leon.vitanos/vlc
  • robertogarci0938/vlc
  • gsoc/gsoc2022/luc65r/vlc-mpd
  • skeller/vlc
  • MCJack123/vlc
  • luc65r/vlc-mpd
  • popov895/vlc
  • claucambra/vlc
  • brad/vlc
  • matthewmurua88/vlc
  • Tomas8874/vlc
  • philenotfound/vlc
  • makita-do3/vlc
  • LZXCorp/vlc
  • mar0x/vlc
  • senojetkennedy0102/vlc
  • shaneb243/vlc
  • ahmadbader/vlc
  • rajduttcse26/vlc-audio-filters
  • Juniorzito8415/vlc
  • achernyakov/vlc
  • lucasjetgroup/vlc
  • pupdoggy666/vlc
  • gmde9363/vlc
  • alexnwayne/vlc
  • bahareebrahimi781/vlc
  • hamad633666/vlc
  • umghof3112/vlc
  • joe0199771874/vlc
  • Octocats66666666/vlc
  • jjm_223/vlc
  • btech10110.19/vlc
  • sunnykfc028/vlc-audio-filters
  • loic/vlc
  • nguyenminhducmx1/vlc
  • JanekKrueger/vlc
  • bstubbington2/vlc
  • rcombs/vlc
  • Ordissimo/vlc
  • king7532/vlc
  • noobsauce101/vlc
  • schong0525/vlc
  • myQwil/vlc
  • apisbg91/vlc
  • geeboy0101017/vlc
  • kim.faughey/vlc
  • nurupo/vlc
  • yyusea/vlc
  • 0711235879.khco/vlc
  • ialo/vlc
  • iloveyeye2/vlc
  • gdtdftdqtd/vlc
  • leandroconsiglio/vlc
  • AndyHTML2012/vlc
  • ncz/vlc
  • lucenticus/vlc
  • knr1931/vlc
  • kjoonlee/vlc
  • chandrakant100/vlc-qt
  • johge42/vlc
  • polter/vlc
  • hexchain/vlc
  • Tushwrld/vlc
  • mztea928/vlc
  • jbelloncastro/vlc
  • alvinhochun/vlc
  • ghostpiratecrow/vlc
  • ujjwaltwitx/vlc
  • alexsonarin06/vlc
  • adrianbon76/vlc
  • altsod/vlc
  • damien.lucas44/vlc
  • dmytrivtaisa/vlc
  • utk202/vlc
  • aaxhrj/vlc
  • thomas.hermes/vlc
  • structurenewworldorder/vlc
  • slomo/vlc
  • wantlamy/vlc
  • musc.o3cminc/vlc
  • thebarshablog/vlc
  • kerrick/vlc
  • kratos142518/vlc
  • leogps/vlc
  • vacantron/vlc
  • luna_koly/vlc
  • Ratio2/vlc
  • anuoshemohammad/vlc
  • apsun/vlc
  • aaa1115910/vlc
  • alimotmoyo/vlc
  • Ambossmann/vlc
  • Sam-LearnsToCode/vlc
  • Chilledheart/vlc
  • Labnann/vlc
  • ktcoooot1/vlc
  • mohit-marathe/vlc
  • johnddx/vlc
  • manstabuk/vlc
  • Omar-ahmed314/vlc
  • vineethkm/vlc
  • 9Enemi86/vlc
  • radoslav.m.panteleev/vlc
  • ashishami2002/vlc
  • Corbax/vlc
  • firnasahmed/vlc
  • pelayarmalam4/vlc
  • c0ff330k/vlc
  • shikhindahikar/vlc
  • l342723951/vlc
  • christianschwandner/vlc
  • douniwan5788/vlc
  • 7damian7/vlc
  • ferdnyc/vlc
  • f.ales1/vlc
  • pandagby/vlc
  • BaaBaa/vlc
  • jewe37/vlc
  • w00drow/vlc
  • russelltg/vlc
  • ironicallygod/vlc
  • soumyaDghosh/vlc
  • linzihao1999/vlc
  • deyayush6/vlc
  • mibi88/vlc
  • newabdallah10/vlc
  • jhorbincolombia/vlc
  • rimvihaqueshupto/vlc
  • andrewkhon98/vlc
  • fab78/vlc
  • lapaz17/vlc
  • amanna13/vlc
  • mdakram28/vlc
  • 07jw1980/vlc
  • sohamgupta/vlc
  • Eson-Jia1/vlc
  • Sumou/vlc
  • vikram-kangotra/vlc
  • chalice191/vlc
  • olivercalder/vlc
  • aaasg4001/vlc
  • zipdox/vlc
  • kwizart/vlc
  • Dragon-S/vlc
  • jdemeule/vlc
  • gabriel_lt/vlc
  • locutusofborg/vlc
  • sammirata/vlc-librist
  • another/vlc
  • Benjamin_Loison/vlc
  • ahmedmoselhi/vlc
  • petergaal/vlc
  • huynhsontung/vlc
  • dariusmihut/vlc
  • tvermaashutosh/vlc
  • buti/vlc
  • Niram7777/vlc
  • rohan-here/vlc
  • balaji-sivasakthi/vlc
  • rlindner81/vlc
  • Kakadus/vlc
  • djain/vlc
  • ABBurmeister/vlc
  • craighuggins/vlc
  • orbea/vlc
  • maxos/vlc
  • aakarshmj/vlc
  • kblaschke/vlc
  • ankitm/vlc
  • advait-0/vlc
  • mohak2003/vlc
  • yselkowitz/vlc
  • AZM999/vlc-azm
  • andrey.turkin/vlc
  • Disha-Baghel/vlc
  • nowrep/vlc
  • Apeng/vlc
  • Choucroute_melba/vlc
  • autra/vlc
  • eclipseo/vlc
  • fhuber/vlc
  • olafhering/vlc
  • sdasda7777/vlc
  • 1div0/vlc
  • skosnits/vlc-extended-playlist-support
  • dnicolson/vlc
  • Timshel/vlc
  • octopols/vlc
  • MangalK/vlc
  • nima64/vlc
  • misawai/vlc
  • Alexander-Wilms/vlc
  • Maxime2/vlc-fork-for-visualizer
  • ww/vlc
  • jeske/vlc
  • sgross-emlix/vlc
  • morenonatural/vlc
  • freakingLovesVLC/vlc
  • borisgolovnev/vlc
  • mpromonet/vlc
  • diogo.simao-marques/vlc
  • masstock/vlc
  • pratikpatel8982/vlc
  • hugok79/vlc
  • longervision/vlc
  • abhiudaysurya/vlc
  • rishabhgarg/vlc
  • tumic/vlc
  • cart/vlc
  • shubham442/vlc
  • Aditya692005/vlc
  • sammirata/vlc4
  • syrykh/vlc
  • Vvorcun/macos-new-icon
  • AyaanshC/vlc
  • nasso/vlc
  • Quark/vlc
  • sebastinas/vlc
  • rhstone/vlc
  • talregev/vlc
  • Managor/vlc
403 results
Show changes
Commits on Source (6)
......@@ -91,7 +91,7 @@ bool dvd_chapter_codec_c::EnterLeaveHelper( char const * str_diag, std::vector<K
for( ; i_size > 0; i_size -=1, p_data += 8 )
{
msg_Dbg( &sys.demuxer, "%s", str_diag);
f_result |= sys.dvd_interpretor.Interpret( p_data );
f_result |= sys.GetDVDInterpretor().Interpret( p_data );
}
}
++it;
......@@ -285,7 +285,7 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si
msg_Dbg( &sys.demuxer, "JumpTT %d", i_title );
// find in the ChapProcessPrivate matching this Title level
p_vchapter = sys.BrowseCodecPrivate( 1, MatchTitleNumber, &i_title, sizeof(i_title), p_vsegment );
p_vchapter = sys.BrowseCodecPrivate( MATROSKA_CHAPTER_CODEC_DVD, MatchTitleNumber, &i_title, sizeof(i_title), p_vsegment );
if ( p_vsegment != NULL && p_vchapter != NULL )
{
/* enter via the First Cell */
......@@ -334,7 +334,7 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si
msg_Dbg( &sys.demuxer, "CallSS <unknown> (rsm_cell %x)", p_command[4]);
break;
}
p_vchapter = sys.BrowseCodecPrivate( 1, MatchPgcType, &p_type, 1, p_vsegment );
p_vchapter = sys.BrowseCodecPrivate( MATROSKA_CHAPTER_CODEC_DVD, MatchPgcType, &p_type, 1, p_vsegment );
if ( p_vsegment != NULL && p_vchapter != NULL )
{
/* enter via the first Cell */
......@@ -394,10 +394,10 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si
break;
}
// find the VMG
p_vchapter = sys.BrowseCodecPrivate( 1, MatchIsVMG, NULL, 0, p_vsegment );
p_vchapter = sys.BrowseCodecPrivate( MATROSKA_CHAPTER_CODEC_DVD, MatchIsVMG, NULL, 0, p_vsegment );
if ( p_vsegment != NULL )
{
p_vchapter = p_vsegment->BrowseCodecPrivate( 1, MatchPgcType, &p_type, 1 );
p_vchapter = p_vsegment->BrowseCodecPrivate( MATROSKA_CHAPTER_CODEC_DVD, MatchPgcType, &p_type, 1 );
if ( p_vchapter != NULL )
{
sys.JumpTo( *p_vsegment, *p_vchapter );
......@@ -432,16 +432,16 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si
break;
}
p_vchapter = sys.BrowseCodecPrivate( 1, MatchVTSMNumber, &p_command[4], 1, p_vsegment );
p_vchapter = sys.BrowseCodecPrivate( MATROSKA_CHAPTER_CODEC_DVD, MatchVTSMNumber, &p_command[4], 1, p_vsegment );
if ( p_vsegment != NULL && p_vchapter != NULL )
{
// find the title in the VTS
p_vchapter = p_vchapter->BrowseCodecPrivate( 1, MatchTitleNumber, &p_command[3], 1 );
p_vchapter = p_vchapter->BrowseCodecPrivate( MATROSKA_CHAPTER_CODEC_DVD, MatchTitleNumber, &p_command[3], 1 );
if ( p_vchapter != NULL )
{
// find the specified menu in the VTSM
p_vchapter = p_vsegment->BrowseCodecPrivate( 1, MatchPgcType, &p_type, 1 );
p_vchapter = p_vsegment->BrowseCodecPrivate( MATROSKA_CHAPTER_CODEC_DVD, MatchPgcType, &p_type, 1 );
if ( p_vchapter != NULL )
{
sys.JumpTo( *p_vsegment, *p_vchapter );
......@@ -468,22 +468,22 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si
msg_Dbg( &sys.demuxer, "JumpVTS Title (%d) PTT (%d)", i_title, i_ptt);
// find the current VTS content segment
p_vchapter = sys.p_current_vsegment->BrowseCodecPrivate( 1, MatchIsDomain, NULL, 0 );
p_vchapter = sys.p_current_vsegment->BrowseCodecPrivate( MATROSKA_CHAPTER_CODEC_DVD, MatchIsDomain, NULL, 0 );
if ( p_vchapter != NULL )
{
int16_t i_curr_title = ( p_vchapter->p_chapter )? p_vchapter->p_chapter->GetTitleNumber() : 0;
if ( i_curr_title > 0 )
{
p_vchapter = sys.BrowseCodecPrivate( 1, MatchVTSNumber, &i_curr_title, sizeof(i_curr_title), p_vsegment );
p_vchapter = sys.BrowseCodecPrivate( MATROSKA_CHAPTER_CODEC_DVD, MatchVTSNumber, &i_curr_title, sizeof(i_curr_title), p_vsegment );
if ( p_vsegment != NULL && p_vchapter != NULL )
{
// find the title in the VTS
p_vchapter = p_vchapter->BrowseCodecPrivate( 1, MatchTitleNumber, &i_title, sizeof(i_title) );
p_vchapter = p_vchapter->BrowseCodecPrivate( MATROSKA_CHAPTER_CODEC_DVD, MatchTitleNumber, &i_title, sizeof(i_title) );
if ( p_vchapter != NULL )
{
// find the chapter in the title
p_vchapter = p_vchapter->BrowseCodecPrivate( 1, MatchChapterNumber, &i_ptt, sizeof(i_ptt) );
p_vchapter = p_vchapter->BrowseCodecPrivate( MATROSKA_CHAPTER_CODEC_DVD, MatchChapterNumber, &i_ptt, sizeof(i_ptt) );
if ( p_vchapter != NULL )
{
sys.JumpTo( *p_vsegment, *p_vchapter );
......@@ -516,7 +516,7 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si
uint16_t i_pgcn = (p_command[6] << 8) + p_command[7];
msg_Dbg( &sys.demuxer, "Link PGCN(%d)", i_pgcn );
p_vchapter = sys.p_current_vsegment->BrowseCodecPrivate( 1, MatchPgcNumber, &i_pgcn, 2 );
p_vchapter = sys.p_current_vsegment->BrowseCodecPrivate( MATROSKA_CHAPTER_CODEC_DVD, MatchPgcNumber, &i_pgcn, 2 );
if ( p_vchapter != NULL )
{
sys.JumpTo( *sys.p_current_vsegment, *p_vchapter );
......@@ -531,7 +531,7 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si
p_vchapter = sys.p_current_vsegment->CurrentChapter();
msg_Dbg( &sys.demuxer, "LinkCN (cell %d)", i_cn );
p_vchapter = p_vchapter->BrowseCodecPrivate( 1, MatchCellNumber, &i_cn, 1 );
p_vchapter = p_vchapter->BrowseCodecPrivate( MATROSKA_CHAPTER_CODEC_DVD, MatchCellNumber, &i_cn, 1 );
if ( p_vchapter != NULL )
{
sys.JumpTo( *sys.p_current_vsegment, *p_vchapter );
......
......@@ -29,9 +29,6 @@
namespace mkv {
const int MATROSKA_CHAPTER_CODEC_NATIVE = 0x00;
const int MATROSKA_CHAPTER_CODEC_DVD = 0x01;
const binary MATROSKA_DVD_LEVEL_SS = 0x30;
const binary MATROSKA_DVD_LEVEL_LU = 0x2A;
const binary MATROSKA_DVD_LEVEL_TT = 0x28;
......@@ -45,9 +42,9 @@ struct demux_sys_t;
class chapter_codec_cmds_c
{
public:
chapter_codec_cmds_c( demux_sys_t & demuxer, int codec_id = -1)
:p_private_data(NULL)
,i_codec_id( codec_id )
chapter_codec_cmds_c( demux_sys_t & demuxer, enum chapter_codec_id codec_id)
:i_codec_id( codec_id )
,p_private_data(NULL)
,sys( demuxer )
{}
......@@ -72,6 +69,8 @@ public:
virtual std::string GetCodecName( bool ) const { return ""; }
virtual int16_t GetTitleNumber() { return -1; }
const enum chapter_codec_id i_codec_id;
KaxChapterProcessPrivate *p_private_data;
protected:
......@@ -79,7 +78,6 @@ protected:
std::vector<KaxChapterProcessData*> during_cmds;
std::vector<KaxChapterProcessData*> leave_cmds;
int i_codec_id;
demux_sys_t & sys;
};
......@@ -250,7 +248,7 @@ class dvd_chapter_codec_c : public chapter_codec_cmds_c
{
public:
dvd_chapter_codec_c( demux_sys_t & sys )
:chapter_codec_cmds_c( sys, 1 )
:chapter_codec_cmds_c( sys, MATROSKA_CHAPTER_CODEC_DVD )
{}
bool Enter();
......@@ -284,7 +282,7 @@ class matroska_script_codec_c : public chapter_codec_cmds_c
{
public:
matroska_script_codec_c( demux_sys_t & sys )
:chapter_codec_cmds_c( sys, 0 )
:chapter_codec_cmds_c( sys, MATROSKA_CHAPTER_CODEC_NATIVE )
,interpreter( sys )
{}
......
......@@ -38,17 +38,17 @@ chapter_item_c::~chapter_item_c()
vlc_delete_all( sub_chapters );
}
chapter_item_c *chapter_item_c::BrowseCodecPrivate( unsigned int codec_id,
chapter_item_c *chapter_item_c::BrowseCodecPrivate( chapter_codec_id codec_id,
bool (*match)(const chapter_codec_cmds_c &data, const void *p_cookie, size_t i_cookie_size ),
const void *p_cookie,
size_t i_cookie_size )
{
VLC_UNUSED( codec_id );
// this chapter
std::vector<chapter_codec_cmds_c*>::const_iterator index = codecs.begin();
while ( index != codecs.end() )
auto index = codecs.cbegin();
while ( index != codecs.cend() )
{
if ( match( **index ,p_cookie, i_cookie_size ) )
if ( (*index)->i_codec_id == codec_id &&
match( **index ,p_cookie, i_cookie_size ) )
return this;
++index;
}
......@@ -96,8 +96,8 @@ std::string chapter_item_c::GetCodecName( bool f_for_title ) const
{
std::string result;
std::vector<chapter_codec_cmds_c*>::const_iterator index = codecs.begin();
while ( index != codecs.end() )
auto index = codecs.cbegin();
while ( index != codecs.cend() )
{
result = (*index)->GetCodecName( f_for_title );
if ( !result.empty () )
......@@ -112,8 +112,8 @@ int16_t chapter_item_c::GetTitleNumber( ) const
{
int result = -1;
std::vector<chapter_codec_cmds_c*>::const_iterator index = codecs.begin();
while ( index != codecs.end() )
auto index = codecs.cbegin();
while ( index != codecs.cend() )
{
result = (*index)->GetTitleNumber( );
if ( result >= 0 )
......
......@@ -65,7 +65,7 @@ public:
virtual ~chapter_item_c();
void Append( const chapter_item_c & edition );
chapter_item_c * FindChapter( int64_t i_find_uid );
virtual chapter_item_c *BrowseCodecPrivate( unsigned int codec_id,
virtual chapter_item_c *BrowseCodecPrivate( chapter_codec_id codec_id,
bool (*match)(const chapter_codec_cmds_c &data, const void *p_cookie, size_t i_cookie_size ),
const void *p_cookie,
size_t i_cookie_size );
......
......@@ -323,7 +323,7 @@ matroska_segment_c *demux_sys_t::FindSegment( const EbmlBinary & uid ) const
return NULL;
}
virtual_chapter_c *demux_sys_t::BrowseCodecPrivate( unsigned int codec_id,
virtual_chapter_c *demux_sys_t::BrowseCodecPrivate( chapter_codec_id codec_id,
bool (*match)(const chapter_codec_cmds_c &data, const void *p_cookie, size_t i_cookie_size ),
const void *p_cookie,
size_t i_cookie_size,
......
......@@ -56,7 +56,6 @@ public:
,i_current_seekpoint(0)
,i_updates(0)
,p_current_vsegment(NULL)
,dvd_interpretor( *this )
,i_duration(-1)
,trust_cues(trust_cues)
,ev(&demux)
......@@ -90,15 +89,13 @@ public:
std::vector<virtual_segment_c*> used_vsegments;
virtual_segment_c *p_current_vsegment;
dvd_command_interpretor_c dvd_interpretor;
/* duration of the stream */
vlc_tick_t i_duration;
const bool trust_cues;
matroska_segment_c *FindSegment( const EbmlBinary & uid ) const;
virtual_chapter_c *BrowseCodecPrivate( unsigned int codec_id,
virtual_chapter_c *BrowseCodecPrivate( chapter_codec_id codec_id,
bool (*match)(const chapter_codec_cmds_c &data, const void *p_cookie, size_t i_cookie_size ),
const void *p_cookie,
size_t i_cookie_size,
......@@ -112,11 +109,24 @@ public:
bool AnalyseAllSegmentsFound( demux_t *p_demux, matroska_stream_c * );
void JumpTo( virtual_segment_c & vsegment, virtual_chapter_c & vchapter );
dvd_command_interpretor_c & GetDVDInterpretor()
{
if (!dvd_interpretor)
{
dvd_interpretor = std::make_unique<dvd_command_interpretor_c>( *this );
assert(dvd_interpretor);
}
return *dvd_interpretor;
}
uint8_t palette[4][4];
vlc_mutex_t lock_demuxer;
/* event */
event_thread_t ev;
private:
std::unique_ptr<dvd_command_interpretor_c> dvd_interpretor;
};
} // namespace
......
......@@ -172,7 +172,7 @@ void event_thread_t::ProcessNavAction( uint16_t button, pci_t* pci )
if( button <= 0 || button > pci->hli.hl_gi.btn_ns )
return;
p_sys->dvd_interpretor.SetSPRM( 0x88, button );
p_sys->GetDVDInterpretor().SetSPRM( 0x88, button );
btni_t button_ptr = pci->hli.btnit[button-1];
if ( button_ptr.auto_action_mode )
{
......@@ -180,7 +180,7 @@ void event_thread_t::ProcessNavAction( uint16_t button, pci_t* pci )
vlc_mutex_lock( &p_sys->lock_demuxer );
// process the button action
p_sys->dvd_interpretor.Interpret( button_ptr.cmd.bytes, 8 );
p_sys->GetDVDInterpretor().Interpret( button_ptr.cmd.bytes, 8 );
vlc_mutex_unlock( &p_sys->lock_demuxer );
vlc_mutex_lock( &lock );
......@@ -194,7 +194,7 @@ void event_thread_t::HandleKeyEvent( EventInfo const& ev )
demux_sys_t* p_sys = (demux_sys_t*)p_demux->p_sys;
pci_t *pci = &pci_packet;
uint16_t i_curr_button = p_sys->dvd_interpretor.GetSPRM( 0x88 );
uint16_t i_curr_button = p_sys->GetDVDInterpretor().GetSPRM( 0x88 );
if( i_curr_button <= 0 || i_curr_button > pci->hli.hl_gi.btn_ns )
return;
......@@ -213,7 +213,7 @@ void event_thread_t::HandleKeyEvent( EventInfo const& ev )
vlc_mutex_lock( &p_sys->lock_demuxer );
// process the button action
p_sys->dvd_interpretor.Interpret( button_ptr.cmd.bytes, 8 );
p_sys->GetDVDInterpretor().Interpret( button_ptr.cmd.bytes, 8 );
vlc_mutex_unlock( &p_sys->lock_demuxer );
vlc_mutex_lock( &lock );
......@@ -270,15 +270,15 @@ void event_thread_t::HandleMouseEvent( EventInfo const& event )
if ( best != 0)
{
btni_t button_ptr = pci->hli.btnit[best-1];
uint16_t i_curr_button = p_sys->dvd_interpretor.GetSPRM( 0x88 );
uint16_t i_curr_button = p_sys->GetDVDInterpretor().GetSPRM( 0x88 );
msg_Dbg( &p_sys->demuxer, "Clicked button %d", best );
vlc_mutex_unlock( &lock );
vlc_mutex_lock( &p_sys->lock_demuxer );
// process the button action
p_sys->dvd_interpretor.SetSPRM( 0x88, best );
p_sys->dvd_interpretor.Interpret( button_ptr.cmd.bytes, 8 );
p_sys->GetDVDInterpretor().SetSPRM( 0x88, best );
p_sys->GetDVDInterpretor().Interpret( button_ptr.cmd.bytes, 8 );
msg_Dbg( &p_sys->demuxer, "Processed button %d", best );
......
......@@ -1438,9 +1438,9 @@ void matroska_segment_c::ParseChapterAtom( int i_level, KaxChapterAtom *ca, chap
{
if( MKV_CHECKED_PTR_DECL( p_codec_id, KaxChapterProcessCodecID, cp[j] ) )
{
if ( static_cast<uint32_t>(*p_codec_id) == 0 )
if ( p_codec_id->GetValue() == MATROSKA_CHAPTER_CODEC_NATIVE )
p_ccodec = new matroska_script_codec_c( vars.obj->sys );
else if ( static_cast<uint32_t>(*p_codec_id) == 1 )
else if ( p_codec_id->GetValue() == MATROSKA_CHAPTER_CODEC_DVD )
p_ccodec = new dvd_chapter_codec_c( vars.obj->sys );
break;
}
......
......@@ -111,6 +111,12 @@ enum
MATROSKA_ENCODING_SCOPE_NEXT = 4 /* unsupported */
};
enum chapter_codec_id
{
MATROSKA_CHAPTER_CODEC_NATIVE = 0,
MATROSKA_CHAPTER_CODEC_DVD = 1,
};
#define MKVD_TIMECODESCALE 1000000
#define MKV_IS_ID( el, C ) ( el != NULL && (el->operator const EbmlId&()) == EBML_ID(C) && !el->IsDummy() )
......
......@@ -327,7 +327,7 @@ virtual_segment_c::~virtual_segment_c()
delete veditions[i];
}
virtual_chapter_c *virtual_segment_c::BrowseCodecPrivate( unsigned int codec_id,
virtual_chapter_c *virtual_segment_c::BrowseCodecPrivate( chapter_codec_id codec_id,
bool (*match)(const chapter_codec_cmds_c &data, const void *p_cookie, size_t i_cookie_size ),
const void *p_cookie,
size_t i_cookie_size )
......@@ -340,7 +340,7 @@ virtual_chapter_c *virtual_segment_c::BrowseCodecPrivate( unsigned int codec_id,
}
virtual_chapter_c * virtual_edition_c::BrowseCodecPrivate( unsigned int codec_id,
virtual_chapter_c * virtual_edition_c::BrowseCodecPrivate( chapter_codec_id codec_id,
bool (*match)(const chapter_codec_cmds_c &data, const void *p_cookie, size_t i_cookie_size ),
const void *p_cookie,
size_t i_cookie_size )
......@@ -359,7 +359,7 @@ virtual_chapter_c * virtual_edition_c::BrowseCodecPrivate( unsigned int codec_id
virtual_chapter_c * virtual_chapter_c::BrowseCodecPrivate( unsigned int codec_id,
virtual_chapter_c * virtual_chapter_c::BrowseCodecPrivate( chapter_codec_id codec_id,
bool (*match)(const chapter_codec_cmds_c &data, const void *p_cookie, size_t i_cookie_size ),
const void *p_cookie,
size_t i_cookie_size )
......
......@@ -55,7 +55,7 @@ public:
virtual_chapter_c * FindChapter( int64_t i_find_uid );
int PublishChapters( input_title_t & title, int & i_user_chapters, int i_level, bool allow_no_name );
virtual_chapter_c * BrowseCodecPrivate( unsigned int codec_id,
virtual_chapter_c * BrowseCodecPrivate( chapter_codec_id codec_id,
bool (*match)( const chapter_codec_cmds_c &data,
const void *p_cookie,
size_t i_cookie_size ),
......@@ -92,7 +92,7 @@ public:
virtual_chapter_c* getChapterbyTimecode( vlc_tick_t time );
std::string GetMainName();
int PublishChapters( input_title_t & title, int & i_user_chapters, int i_level );
virtual_chapter_c * BrowseCodecPrivate( unsigned int codec_id,
virtual_chapter_c * BrowseCodecPrivate( chapter_codec_id codec_id,
bool (*match)( const chapter_codec_cmds_c &data,
const void *p_cookie,
size_t i_cookie_size ),
......@@ -151,7 +151,7 @@ public:
inline std::vector<virtual_edition_c*>* Editions() { return &veditions; }
virtual_chapter_c *BrowseCodecPrivate( unsigned int codec_id,
virtual_chapter_c *BrowseCodecPrivate( chapter_codec_id codec_id,
bool (*match)( const chapter_codec_cmds_c &data,
const void *p_cookie,
size_t i_cookie_size ),
......