[vlc-devel] commit: modules: Use access_GetParentInput and demux_GetParentInput. ( Pierre d'Herbemont )
git version control
git at videolan.org
Fri Aug 21 12:34:07 CEST 2009
vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> | Fri Aug 21 12:28:16 2009 +0200| [a2ddba3398a932c1ffef33a2adc0891559e56614] | committer: Pierre d'Herbemont
modules: Use access_GetParentInput and demux_GetParentInput.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a2ddba3398a932c1ffef33a2adc0891559e56614
---
modules/access/cdda.c | 2 +-
modules/access/cdda/access.c | 3 +--
modules/access/cdda/info.c | 2 +-
modules/access/dvdnav.c | 2 +-
modules/access/mms/mmsh.c | 2 +-
modules/access/vcdx/access.c | 4 +---
modules/demux/mp4/mp4.c | 2 +-
modules/demux/playlist/playlist.c | 2 +-
modules/misc/lua/demux.c | 3 +--
modules/services_discovery/sap.c | 3 +--
10 files changed, 10 insertions(+), 15 deletions(-)
diff --git a/modules/access/cdda.c b/modules/access/cdda.c
index 9681e18..7527b56 100644
--- a/modules/access/cdda.c
+++ b/modules/access/cdda.c
@@ -177,7 +177,7 @@ static int Open( vlc_object_t *p_this )
if( p_sys->i_track < 0 )
{
/* 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;
if( p_input )
diff --git a/modules/access/cdda/access.c b/modules/access/cdda/access.c
index db3ed3e..29d14d2 100644
--- a/modules/access/cdda/access.c
+++ b/modules/access/cdda/access.c
@@ -664,8 +664,7 @@ int CDDAOpen( vlc_object_t *p_this )
config_GetInt( p_this, MODULE_STRING "-blocks-per-read" );
p_cdda->last_disc_frame =
cdio_get_track_lsn( p_cdio, CDIO_CDROM_LEADOUT_TRACK );
- p_cdda->p_input = vlc_object_find( p_access, VLC_OBJECT_INPUT,
- FIND_PARENT );
+ p_cdda->p_input = access_GetParentInput( p_access );
if( 0 == p_cdda->i_blocks_per_read )
p_cdda->i_blocks_per_read = DEFAULT_BLOCKS_PER_READ;
diff --git a/modules/access/cdda/info.c b/modules/access/cdda/info.c
index 1d7c36f..dc3448f 100644
--- a/modules/access/cdda/info.c
+++ b/modules/access/cdda/info.c
@@ -860,7 +860,7 @@ CDDAFixupPlaylist( access_t *p_access, cdda_data_t *p_cdda,
}
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 )
return VLC_EGENERIC;
diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
index d6bcb5a..fa12a18 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -339,7 +339,7 @@ static int Open( vlc_object_t *p_this )
/* FIXME hack hack hack hack FIXME */
/* 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, "y-start", VLC_VAR_INTEGER );
var_Create( p_sys->p_input, "x-end", VLC_VAR_INTEGER );
diff --git a/modules/access/mms/mmsh.c b/modules/access/mms/mmsh.c
index 8d8c55b..ff66d39 100644
--- a/modules/access/mms/mmsh.c
+++ b/modules/access/mms/mmsh.c
@@ -167,7 +167,7 @@ int MMSHOpen( access_t *p_access )
{
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;
if( !p_input )
diff --git a/modules/access/vcdx/access.c b/modules/access/vcdx/access.c
index b04c549..f3c6192 100644
--- a/modules/access/vcdx/access.c
+++ b/modules/access/vcdx/access.c
@@ -894,9 +894,7 @@ VCDOpen ( vlc_object_t *p_this )
"-track-length" );
p_vcdplayer->in_still = false;
p_vcdplayer->play_item.type = VCDINFO_ITEM_TYPE_NOTFOUND;
- p_vcdplayer->p_input = vlc_object_find( p_access,
- VLC_OBJECT_INPUT,
- FIND_PARENT );
+ p_vcdplayer->p_input = access_GetParentInput( p_access );
// p_vcdplayer->p_meta = vlc_meta_New();
p_vcdplayer->p_segments = NULL;
p_vcdplayer->p_entries = NULL;
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index c3f7e50..2915d01 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -369,7 +369,7 @@ static int Open( vlc_object_t * p_this )
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 );
for( i = 0; i < i_count; i++ )
diff --git a/modules/demux/playlist/playlist.c b/modules/demux/playlist/playlist.c
index 45749be..484bb2b 100644
--- a/modules/demux/playlist/playlist.c
+++ b/modules/demux/playlist/playlist.c
@@ -167,7 +167,7 @@ vlc_module_end ()
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 );
vlc_gc_incref(p_current_input);
vlc_object_release(p_input_thread);
diff --git a/modules/misc/lua/demux.c b/modules/misc/lua/demux.c
index d7f4445..0635ecf 100644
--- a/modules/misc/lua/demux.c
+++ b/modules/misc/lua/demux.c
@@ -248,8 +248,7 @@ static int Demux( demux_t *p_demux )
lua_State *L = p_demux->p_sys->L;
char *psz_filename = p_demux->p_sys->psz_filename;
- 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 );
playlist_t *p_playlist = pl_Hold( p_demux );
diff --git a/modules/services_discovery/sap.c b/modules/services_discovery/sap.c
index 2e1d070..9e7b15e 100644
--- a/modules/services_discovery/sap.c
+++ b/modules/services_discovery/sap.c
@@ -651,8 +651,7 @@ static int Demux( demux_t *p_demux )
input_thread_t *p_input;
input_item_t *p_parent_input;
- p_input = (input_thread_t *)vlc_object_find( p_demux, VLC_OBJECT_INPUT,
- FIND_PARENT );
+ p_input = demux_GetParentInput( p_demux );
assert( p_input );
if( !p_input )
{
More information about the vlc-devel
mailing list