Commit a2ddba33 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

modules: Use access_GetParentInput and demux_GetParentInput.

parent 0d1f966a
...@@ -177,7 +177,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -177,7 +177,7 @@ static int Open( vlc_object_t *p_this )
if( p_sys->i_track < 0 ) if( p_sys->i_track < 0 )
{ {
/* We only do separate items if the whole disc is requested */ /* We only do separate items if the whole disc is requested */
input_thread_t *p_input = (input_thread_t*)vlc_object_find( p_access, VLC_OBJECT_INPUT, FIND_PARENT ); input_thread_t *p_input = access_GetParentInput( p_access );
i_ret = -1; i_ret = -1;
if( p_input ) if( p_input )
......
...@@ -664,8 +664,7 @@ int CDDAOpen( vlc_object_t *p_this ) ...@@ -664,8 +664,7 @@ int CDDAOpen( vlc_object_t *p_this )
config_GetInt( p_this, MODULE_STRING "-blocks-per-read" ); config_GetInt( p_this, MODULE_STRING "-blocks-per-read" );
p_cdda->last_disc_frame = p_cdda->last_disc_frame =
cdio_get_track_lsn( p_cdio, CDIO_CDROM_LEADOUT_TRACK ); cdio_get_track_lsn( p_cdio, CDIO_CDROM_LEADOUT_TRACK );
p_cdda->p_input = vlc_object_find( p_access, VLC_OBJECT_INPUT, p_cdda->p_input = access_GetParentInput( p_access );
FIND_PARENT );
if( 0 == p_cdda->i_blocks_per_read ) if( 0 == p_cdda->i_blocks_per_read )
p_cdda->i_blocks_per_read = DEFAULT_BLOCKS_PER_READ; p_cdda->i_blocks_per_read = DEFAULT_BLOCKS_PER_READ;
......
...@@ -860,7 +860,7 @@ CDDAFixupPlaylist( access_t *p_access, cdda_data_t *p_cdda, ...@@ -860,7 +860,7 @@ CDDAFixupPlaylist( access_t *p_access, cdda_data_t *p_cdda,
} }
else else
{ {
input_thread_t *p_input = (input_thread_t*)vlc_object_find( p_access, VLC_OBJECT_INPUT, FIND_PARENT ); input_thread_t *p_input = access_GetParentInput( p_access );
if( !p_input ) if( !p_input )
return VLC_EGENERIC; return VLC_EGENERIC;
......
...@@ -339,7 +339,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -339,7 +339,7 @@ static int Open( vlc_object_t *p_this )
/* FIXME hack hack hack hack FIXME */ /* FIXME hack hack hack hack FIXME */
/* Get p_input and create variable */ /* Get p_input and create variable */
p_sys->p_input = vlc_object_find( p_demux, VLC_OBJECT_INPUT, FIND_PARENT ); p_sys->p_input = demux_GetParentInput( p_demux );
var_Create( p_sys->p_input, "x-start", VLC_VAR_INTEGER ); var_Create( p_sys->p_input, "x-start", VLC_VAR_INTEGER );
var_Create( p_sys->p_input, "y-start", VLC_VAR_INTEGER ); var_Create( p_sys->p_input, "y-start", VLC_VAR_INTEGER );
var_Create( p_sys->p_input, "x-end", VLC_VAR_INTEGER ); var_Create( p_sys->p_input, "x-end", VLC_VAR_INTEGER );
......
...@@ -167,7 +167,7 @@ int MMSHOpen( access_t *p_access ) ...@@ -167,7 +167,7 @@ int MMSHOpen( access_t *p_access )
{ {
msg_Dbg( p_access, "redirection to %s", psz_location ); msg_Dbg( p_access, "redirection to %s", psz_location );
input_thread_t * p_input = vlc_object_find( p_access, VLC_OBJECT_INPUT, FIND_PARENT ); input_thread_t * p_input = access_GetParentInput( p_access );
input_item_t * p_new_loc; input_item_t * p_new_loc;
if( !p_input ) if( !p_input )
......
...@@ -894,9 +894,7 @@ VCDOpen ( vlc_object_t *p_this ) ...@@ -894,9 +894,7 @@ VCDOpen ( vlc_object_t *p_this )
"-track-length" ); "-track-length" );
p_vcdplayer->in_still = false; p_vcdplayer->in_still = false;
p_vcdplayer->play_item.type = VCDINFO_ITEM_TYPE_NOTFOUND; p_vcdplayer->play_item.type = VCDINFO_ITEM_TYPE_NOTFOUND;
p_vcdplayer->p_input = vlc_object_find( p_access, p_vcdplayer->p_input = access_GetParentInput( p_access );
VLC_OBJECT_INPUT,
FIND_PARENT );
// p_vcdplayer->p_meta = vlc_meta_New(); // p_vcdplayer->p_meta = vlc_meta_New();
p_vcdplayer->p_segments = NULL; p_vcdplayer->p_segments = NULL;
p_vcdplayer->p_entries = NULL; p_vcdplayer->p_entries = NULL;
......
...@@ -369,7 +369,7 @@ static int Open( vlc_object_t * p_this ) ...@@ -369,7 +369,7 @@ static int Open( vlc_object_t * p_this )
msg_Dbg( p_demux, "detected playlist mov file (%d ref)", i_count ); msg_Dbg( p_demux, "detected playlist mov file (%d ref)", i_count );
input_thread_t *p_input = vlc_object_find( p_demux, VLC_OBJECT_INPUT, FIND_PARENT ); input_thread_t *p_input = demux_GetParentInput( p_demux );
input_item_t *p_current = input_GetItem( p_input ); input_item_t *p_current = input_GetItem( p_input );
for( i = 0; i < i_count; i++ ) for( i = 0; i < i_count; i++ )
......
...@@ -167,7 +167,7 @@ vlc_module_end () ...@@ -167,7 +167,7 @@ vlc_module_end ()
input_item_t * GetCurrentItem(demux_t *p_demux) input_item_t * GetCurrentItem(demux_t *p_demux)
{ {
input_thread_t *p_input_thread = (input_thread_t *)vlc_object_find( p_demux, VLC_OBJECT_INPUT, FIND_PARENT );; input_thread_t *p_input_thread = demux_GetParentInput( p_demux );
input_item_t *p_current_input = input_GetItem( p_input_thread ); input_item_t *p_current_input = input_GetItem( p_input_thread );
vlc_gc_incref(p_current_input); vlc_gc_incref(p_current_input);
vlc_object_release(p_input_thread); vlc_object_release(p_input_thread);
......
...@@ -248,8 +248,7 @@ static int Demux( demux_t *p_demux ) ...@@ -248,8 +248,7 @@ static int Demux( demux_t *p_demux )
lua_State *L = p_demux->p_sys->L; lua_State *L = p_demux->p_sys->L;
char *psz_filename = p_demux->p_sys->psz_filename; char *psz_filename = p_demux->p_sys->psz_filename;
input_thread_t *p_input_thread = (input_thread_t *) input_thread_t *p_input_thread = demux_GetParentInput( p_demux );
vlc_object_find( p_demux, VLC_OBJECT_INPUT, FIND_PARENT );
input_item_t *p_current_input = input_GetItem( p_input_thread ); input_item_t *p_current_input = input_GetItem( p_input_thread );
playlist_t *p_playlist = pl_Hold( p_demux ); playlist_t *p_playlist = pl_Hold( p_demux );
......
...@@ -651,8 +651,7 @@ static int Demux( demux_t *p_demux ) ...@@ -651,8 +651,7 @@ static int Demux( demux_t *p_demux )
input_thread_t *p_input; input_thread_t *p_input;
input_item_t *p_parent_input; input_item_t *p_parent_input;
p_input = (input_thread_t *)vlc_object_find( p_demux, VLC_OBJECT_INPUT, p_input = demux_GetParentInput( p_demux );
FIND_PARENT );
assert( p_input ); assert( p_input );
if( !p_input ) if( !p_input )
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment