}
/* do parsing */
- if( i_level == 1 )
+ switch ( i_level )
{
+ case 1:
if( MKV_IS_ID( el, KaxCluster ) )
{
cluster = (KaxCluster*)el;
{
msg_Dbg( &sys.demuxer, "unknown (%s)", typeid( el ).name() );
}
- }
- else if( i_level == 2 )
- {
+ break;
+ case 2:
if( MKV_IS_ID( el, KaxClusterTimecode ) )
{
KaxClusterTimecode &ctc = *(KaxClusterTimecode*)el;
{
ep->Down();
}
- }
- else if( i_level == 3 )
- {
+ break;
+ case 3:
if( MKV_IS_ID( el, KaxBlock ) )
{
*pp_block = (KaxBlock*)el;
}
}
}
- }
- else
- {
+ break;
+ default:
msg_Err( &sys.demuxer, "invalid level = %d", i_level );
return VLC_EGENERIC;
}
// get current button
best = 0;
dist = 0x08000000; /* >> than (720*720)+(567*567); */
- for(button = 1; button <= pci->hli.hl_gi.btn_ns; button++) {
+ for(button = 1; button <= pci->hli.hl_gi.btn_ns; button++)
+ {
btni_t *button_ptr = &(pci->hli.btnit[button-1]);
if((valx.i_int >= button_ptr->x_start) && (valx.i_int <= button_ptr->x_end) &&
}
}
}
- // select new button
- if ( best != 0 && best != p_sys->i_curr_button )
+
+ if ( best != 0)
{
- vlc_value_t val;
btni_t *button_ptr = &(pci->hli.btnit[best-1]);
- p_sys->dvd_interpretor.SetSPRM( 0x88, best );
+ msg_Dbg( &p_sys->demuxer, "Clicked button %d", best );
// process the button action
- if ( !p_sys->dvd_interpretor.Interpret( button_ptr->cmd.bytes, 8 ) )
+ p_sys->dvd_interpretor.SetSPRM( 0x88, best );
+ p_sys->dvd_interpretor.Interpret( button_ptr->cmd.bytes, 8 );
+
+ // select new button
+ if ( best != p_sys->i_curr_button )
{
+ vlc_value_t val;
+
if( var_Get( p_sys->p_input, "highlight-mutex", &val ) == VLC_SUCCESS )
{
vlc_mutex_t *p_mutex = (vlc_mutex_t *) val.p_address;
vlc_mutex_unlock( p_mutex );
p_sys->i_curr_button = best;
- msg_Dbg( &p_sys->demuxer, "Selected button %d", best );
}
}
}
uint16 i_pgcn = (p_command[6] << 8) + p_command[7];
msg_Dbg( &sys.demuxer, "Link PGCN(%d)", i_pgcn );
- p_chapter = sys.BrowseCodecPrivate( 1, MatchPgcNumber, &i_pgcn, 2, p_segment );
+ p_chapter = sys.p_current_segment->BrowseCodecPrivate( 1, MatchPgcNumber, &i_pgcn, 2 );
if ( p_chapter != NULL )
{
- // if the segment is not part of the current segment, select the new one
- if ( p_segment != sys.p_current_segment )
- {
- sys.PreparePlayback( p_segment );
- }
-
p_chapter->Enter( true );
// jump to the location in the found segment
- p_segment->Seek( sys.demuxer, p_chapter->i_user_start_time, -1, p_chapter );
+ sys.p_current_segment->Seek( sys.demuxer, p_chapter->i_user_start_time, -1, p_chapter );
f_result = true;
}
break;