int b_ok; /* The track is usable */
int b_enable; /* is the trak enable by default */
- vlc_bool_t b_selected; /* is the trak being played */
- vlc_bool_t b_chapter; /* True when used for chapter only */
+ bool b_selected; /* is the trak being played */
+ bool b_chapter; /* True when used for chapter only */
es_format_t fmt;
es_out_id_t *p_es;
MP4_Box_t *p_stsd; /* will contain all data to initialize decoder */
MP4_Box_t *p_sample;/* point on actual sdsd */
- vlc_bool_t b_drms;
+ bool b_drms;
void *p_drms;
} mp4_track_t;
}
/* Function to lookup the currently playing item */
-static vlc_bool_t FindItem( demux_t *p_demux, playlist_t *p_playlist,
+static bool FindItem( demux_t *p_demux, playlist_t *p_playlist,
playlist_item_t **pp_item );
static void LoadChapter( demux_t *p_demux );
MP4_Box_t *p_trak;
unsigned int i;
- vlc_bool_t b_seekable;
+ bool b_seekable;
/* A little test to see if it could be a mp4 */
if( stream_Peek( p_demux->s, &p_peek, 8 ) < 8 ) return VLC_EGENERIC;
playlist_item_t *p_current, *p_item_in_category;
int i_count = MP4_BoxCount( p_rmra, "rmda" );
int i;
- vlc_bool_t b_play = VLC_FALSE;
+ bool b_play = false;
msg_Dbg( p_demux, "detected playlist mov file (%d ref)", i_count );
if( p_playlist )
{
b_play = FindItem( p_demux, p_playlist, &p_current );
- p_item_in_category = playlist_ItemToNode( p_playlist, p_current, VLC_TRUE );
+ p_item_in_category = playlist_ItemToNode( p_playlist, p_current, true );
p_current->p_input->i_type = ITEM_TYPE_PLAYLIST;
for( i = 0; i < i_count; i++ )
playlist_BothAddInput( p_playlist, p_input,
p_item_in_category,
PLAYLIST_APPEND, PLAYLIST_END,
- NULL, NULL, VLC_FALSE );
+ NULL, NULL, false );
vlc_gc_decref( p_input );
}
}
if( b_play && p_item_in_category &&
p_item_in_category->i_children > 0 )
{
- playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, VLC_TRUE,
+ playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, true,
p_item_in_category, NULL );
}
vlc_object_release( p_playlist );
i_track++ )
{
mp4_track_t *tk = &p_sys->track[i_track];
- vlc_bool_t b;
+ bool b;
if( !tk->b_ok || tk->b_chapter ||
( tk->b_selected && tk->i_sample >= tk->i_sample_count ) )
static int TrackGotoChunkSample( demux_t *p_demux, mp4_track_t *p_track,
unsigned int i_chunk, unsigned int i_sample )
{
- vlc_bool_t b_reselect = VLC_FALSE;
+ bool b_reselect = false;
/* now see if actual es is ok */
if( (p_track->i_chunk >= p_track->i_chunk_count - 1) ||
msg_Err( p_demux, "cannot create es for track[Id 0x%x]",
p_track->i_track_ID );
- p_track->b_ok = VLC_FALSE;
- p_track->b_selected = VLC_FALSE;
+ p_track->b_ok = false;
+ p_track->b_selected = false;
return VLC_EGENERIC;
}
}
/* hint track unsupported */
/* set default value (-> track unusable) */
- p_track->b_ok = VLC_FALSE;
- p_track->b_enable = VLC_FALSE;
- p_track->b_selected = VLC_FALSE;
- p_track->b_chapter = VLC_FALSE;
+ p_track->b_ok = false;
+ p_track->b_enable = false;
+ p_track->b_selected = false;
+ p_track->b_chapter = false;
es_format_Init( &p_track->fmt, UNKNOWN_ES, 0 );
{
if( p_track->i_track_ID == p_chap->i_track_ID[i] )
{
- p_track->b_chapter = VLC_TRUE;
+ p_track->b_chapter = true;
break;
}
}
p_track->i_track_ID );
return;
}
- p_track->b_ok = VLC_TRUE;
+ p_track->b_ok = true;
#if 0
{
int i;
{
unsigned int i_chunk;
- p_track->b_ok = VLC_FALSE;
- p_track->b_enable = VLC_FALSE;
- p_track->b_selected = VLC_FALSE;
+ p_track->b_ok = false;
+ p_track->b_enable = false;
+ p_track->b_selected = false;
es_format_Clean( &p_track->fmt );
if( p_track->p_es )
{
es_out_Control( p_demux->out, ES_OUT_SET_ES_STATE,
- p_track->p_es, VLC_FALSE );
+ p_track->p_es, false );
}
- p_track->b_selected = VLC_FALSE;
+ p_track->b_selected = false;
}
static int MP4_TrackSeek( demux_t *p_demux, mp4_track_t *p_track,
if( !p_track->b_ok || p_track->b_chapter )
return VLC_EGENERIC;
- p_track->b_selected = VLC_FALSE;
+ p_track->b_selected = false;
if( TrackTimeToSampleChunk( p_demux, p_track, i_start,
&i_chunk, &i_sample ) )
return VLC_EGENERIC;
}
- p_track->b_selected = VLC_TRUE;
+ p_track->b_selected = true;
if( TrackGotoChunkSample( p_demux, p_track, i_chunk, i_sample ) ==
VLC_SUCCESS )
{
- p_track->b_selected = VLC_TRUE;
+ p_track->b_selected = true;
es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME,
p_track->p_es, i_start );
}
}
-static vlc_bool_t FindItem( demux_t *p_demux, playlist_t *p_playlist,
+static bool FindItem( demux_t *p_demux, playlist_t *p_playlist,
playlist_item_t **pp_item )
{
input_thread_t *p_input = (input_thread_t *)vlc_object_find( p_demux, VLC_OBJECT_INPUT, FIND_PARENT );
- vlc_bool_t b_play = var_CreateGetBool( p_demux, "playlist-autostart" );
+ bool b_play = var_CreateGetBool( p_demux, "playlist-autostart" );
*pp_item = NULL;
if( p_input )
{
msg_Dbg( p_playlist, "starting playlist playback" );
*pp_item = p_playlist->status.p_item;
- b_play = VLC_TRUE;
+ b_play = true;
}
else
{
input_item_t *p_current = input_GetItem( p_input );
- *pp_item = playlist_ItemGetByInput( p_playlist, p_current, VLC_FALSE );
+ *pp_item = playlist_ItemGetByInput( p_playlist, p_current, false );
if( !*pp_item )
msg_Dbg( p_playlist, "unable to find item in playlist");
msg_Dbg( p_playlist, "not starting playlist playback");
- b_play = VLC_FALSE;
+ b_play = false;
}
vlc_object_release( p_input );
}