Commit b941c1e4 authored by Rafaël Carré's avatar Rafaël Carré

vlc_object_get(): removes unused parameter

parent fb4f6e01
......@@ -98,7 +98,7 @@ VLC_EXPORT( void *, __vlc_object_create, ( vlc_object_t *, int ) );
VLC_EXPORT( void, __vlc_object_destroy, ( vlc_object_t * ) );
VLC_EXPORT( void, __vlc_object_attach, ( vlc_object_t *, vlc_object_t * ) );
VLC_EXPORT( void, __vlc_object_detach, ( vlc_object_t * ) );
VLC_EXPORT( void *, __vlc_object_get, ( vlc_object_t *, int ) );
VLC_EXPORT( void *, vlc_object_get, ( int ) );
VLC_EXPORT( void *, __vlc_object_find, ( vlc_object_t *, int, int ) );
VLC_EXPORT( void *, __vlc_object_find_name, ( vlc_object_t *, const char *, int ) );
VLC_EXPORT( void, __vlc_object_yield, ( vlc_object_t * ) );
......@@ -121,9 +121,6 @@ VLC_EXPORT( void, vlc_list_release, ( vlc_list_t * ) );
#define vlc_object_attach(a,b) \
__vlc_object_attach( VLC_OBJECT(a), VLC_OBJECT(b) )
#define vlc_object_get(a,b) \
__vlc_object_get( VLC_OBJECT(a),b)
#define vlc_object_find(a,b,c) \
__vlc_object_find( VLC_OBJECT(a),b,c)
......
......@@ -425,7 +425,7 @@ ConfigItem::ConfigItem( intf_thread_t * _p_intf, char * name,
module_t * p_module = NULL;
if( fType == TYPE_MODULE )
{
p_module = (module_t *) vlc_object_get( p_intf, fObjectId );
p_module = (module_t *) vlc_object_get( fObjectId );
}
else
{
......
......@@ -786,8 +786,7 @@
vlc_thread_set_priority( VLCIntf , VLC_THREAD_PRIORITY_LOW );
p_object = (vlc_object_t *)vlc_object_get( VLCIntf,
[o_data objectID] );
p_object = (vlc_object_t *)vlc_object_get( [o_data objectID] );
if( p_object != NULL )
{
......
......@@ -550,7 +550,7 @@ static VLCTreeItem *o_root_item = nil;
/* Get a pointer to the module */
if( i_object_category == -1 )
{
p_parser = (module_t *) vlc_object_get( p_intf, i_object_id );
p_parser = (module_t *) vlc_object_get( i_object_id );
if( !p_parser || ((vlc_object_t*)p_parser)->i_object_type != VLC_OBJECT_MODULE )
{
/* 0OOoo something went really bad */
......
......@@ -54,10 +54,10 @@ static QActionGroup *currentGroup;
// Add static entries to menus
void addDPStaticEntry( QMenu *menu,
const QString text,
char *help,
char *icon,
const char *help,
const char *icon,
const char *member,
char *shortcut )
const char *shortcut )
{
if( !EMPTY_STR( icon ) > 0 )
{
......@@ -78,8 +78,8 @@ void addDPStaticEntry( QMenu *menu,
void addMIMStaticEntry( intf_thread_t *p_intf,
QMenu *menu,
const QString text,
char *help,
char *icon,
const char *help,
const char *icon,
const char *member )
{
if( strlen( icon ) > 0 )
......@@ -775,7 +775,7 @@ QMenu * QVLCMenu::Populate( intf_thread_t *p_intf,
continue;
}
p_object = ( vlc_object_t * )vlc_object_get( p_intf, objects[i] );
p_object = ( vlc_object_t * )vlc_object_get( objects[i] );
if( p_object == NULL ) continue;
b_section_empty = VLC_FALSE;
......@@ -1046,8 +1046,7 @@ void QVLCMenu::CreateAndConnect( QMenu *menu, const char *psz_var,
void QVLCMenu::DoAction( intf_thread_t *p_intf, QObject *data )
{
MenuItemData *itemData = qobject_cast<MenuItemData *>( data );
vlc_object_t *p_object = ( vlc_object_t * )vlc_object_get( p_intf,
itemData->i_object_id );
vlc_object_t *p_object = ( vlc_object_t * )vlc_object_get( itemData->i_object_id );
if( p_object == NULL ) return;
var_Set( p_object, itemData->psz_var, itemData->val );
......
......@@ -493,7 +493,7 @@ void RefreshMenu( intf_thread_t *p_intf, vector<MenuItemExt*> *p_menu_list,
continue;
}
p_object = (vlc_object_t *)vlc_object_get( p_intf, pi_objects[i] );
p_object = (vlc_object_t *)vlc_object_get( pi_objects[i] );
if( p_object == NULL ) continue;
b_section_empty = VLC_FALSE;
......@@ -764,7 +764,7 @@ void OnMenuEvent( intf_thread_t *p_intf, int id )
if( p_menuitemext )
{
vlc_object_t *p_object = (vlc_object_t *)
vlc_object_get( p_intf, p_menuitemext->i_object_id );
vlc_object_get( p_menuitemext->i_object_id );
if( p_object == NULL ) return;
var_Set( p_object, p_menuitemext->psz_var, p_menuitemext->val );
......
......@@ -705,7 +705,7 @@ PrefsPanel::PrefsPanel( HWND parent, HINSTANCE hInst, intf_thread_t *_p_intf,
else
{
/* Get a pointer to the module */
p_module = (module_t *)vlc_object_get( p_intf, i_object_id );
p_module = (module_t *)vlc_object_get( i_object_id );
if( p_module->i_object_type != VLC_OBJECT_MODULE )
{
/* 0OOoo something went really bad */
......
......@@ -900,7 +900,7 @@ PrefsPanel::PrefsPanel( wxWindow* parent, intf_thread_t *_p_intf,
if( config_data->i_type == TYPE_MODULE )
{
p_module = (module_t *)
vlc_object_get( p_intf, config_data->i_object_id );
vlc_object_get( config_data->i_object_id );
}
else
{
......
......@@ -591,8 +591,7 @@ void Menu::Populate( ArrayOfStrings & ras_varnames,
continue;
}
p_object = (vlc_object_t *)vlc_object_get( p_intf,
rai_objects[i] );
p_object = (vlc_object_t *)vlc_object_get( rai_objects[i] );
if( p_object == NULL ) continue;
b_section_empty = VLC_FALSE;
......@@ -1026,8 +1025,7 @@ void MenuEvtHandler::OnMenuEvent( wxCommandEvent& event )
wxMenuItemExt *p_menuitemext = (wxMenuItemExt *)p_menuitem;
vlc_object_t *p_object;
p_object = (vlc_object_t *)vlc_object_get( p_intf,
p_menuitemext->i_object_id );
p_object = (vlc_object_t *)vlc_object_get( p_menuitemext->i_object_id );
if( p_object == NULL ) return;
wxMutexGuiLeave(); // We don't want deadlocks
......
......@@ -306,7 +306,7 @@ static int Stress( vlc_object_t *p_this, char const *psz_cmd,
for( i = MAXLOOK * i_level; i--; )
{
int id = (int) (MAXOBJ * i_level * 1.0 * rand() / (RAND_MAX));
vlc_object_get( p_this, pp_objects[id]->i_object_id );
vlc_object_get( pp_objects[id]->i_object_id );
vlc_object_release( p_this );
}
......
......@@ -71,9 +71,7 @@ static void release_input_thread( libvlc_media_instance_t *p_mi )
if( !p_mi || p_mi->i_input_id == -1 )
return;
p_input_thread = (input_thread_t*)vlc_object_get(
p_mi->p_libvlc_instance->p_libvlc_int,
p_mi->i_input_id );
p_input_thread = (input_thread_t*)vlc_object_get( p_mi->i_input_id );
p_mi->i_input_id = -1;
......@@ -128,9 +126,7 @@ input_thread_t *libvlc_get_input_thread( libvlc_media_instance_t *p_mi,
RAISENULL( "Input is NULL" );
}
p_input_thread = (input_thread_t*)vlc_object_get(
p_mi->p_libvlc_instance->p_libvlc_int,
p_mi->i_input_id );
p_input_thread = (input_thread_t*)vlc_object_get( p_mi->i_input_id );
if( !p_input_thread )
{
vlc_mutex_unlock( &p_mi->object_lock );
......@@ -149,6 +145,7 @@ input_state_changed( vlc_object_t * p_this, char const * psz_cmd,
vlc_value_t oldval, vlc_value_t newval,
void * p_userdata )
{
VLC_UNUSED(oldval);
libvlc_media_instance_t * p_mi = p_userdata;
libvlc_event_t event;
libvlc_event_type_t type = newval.i_int;
......@@ -190,6 +187,7 @@ input_position_changed( vlc_object_t * p_this, char const * psz_cmd,
vlc_value_t oldval, vlc_value_t newval,
void * p_userdata )
{
VLC_UNUSED(oldval);
libvlc_media_instance_t * p_mi = p_userdata;
vlc_value_t val;
......@@ -222,6 +220,7 @@ input_time_changed( vlc_object_t * p_this, char const * psz_cmd,
vlc_value_t oldval, vlc_value_t newval,
void * p_userdata )
{
VLC_UNUSED(oldval);
libvlc_media_instance_t * p_mi = p_userdata;
vlc_value_t val;
......@@ -540,8 +539,7 @@ void libvlc_media_instance_play( libvlc_media_instance_t *p_mi,
p_mi->p_md->p_input_item, VLC_FALSE );
/* Released in _release() */
p_input_thread = (input_thread_t*)vlc_object_get( p_mi->p_libvlc_instance->p_libvlc_int,
p_mi->i_input_id );
p_input_thread = (input_thread_t*)vlc_object_get( p_mi->i_input_id );
if( !p_input_thread )
{
......
......@@ -147,9 +147,7 @@ libvlc_video_take_snapshot( libvlc_media_instance_t *p_mi, char *psz_filepath,
var_SetInteger( p_vout, "snapshot-width", i_width );
var_SetInteger( p_vout, "snapshot-height", i_height );
p_input_thread = (input_thread_t*)vlc_object_get(
p_mi->p_libvlc_instance->p_libvlc_int,
p_mi->i_input_id );
p_input_thread = (input_thread_t*)vlc_object_get( p_mi->i_input_id );
if( !p_input_thread )
{
libvlc_exception_raise( p_e, "Input does not exist" );
......@@ -278,6 +276,8 @@ void libvlc_video_set_parent( libvlc_instance_t *p_instance, libvlc_drawable_t d
libvlc_drawable_t libvlc_video_get_parent( libvlc_instance_t *p_instance, libvlc_exception_t *p_e )
{
VLC_UNUSED(p_e);
libvlc_drawable_t result;
result = var_GetInteger( p_instance->p_libvlc_int, "drawable" );
......
......@@ -416,7 +416,7 @@ __vlc_object_destroy
__vlc_object_detach
__vlc_object_find
__vlc_object_find_name
__vlc_object_get
vlc_object_get
__vlc_object_kill
__vlc_object_lock
__vlc_object_release
......
......@@ -708,7 +708,7 @@ void __vlc_object_kill( vlc_object_t *p_this )
* This function looks for the object whose i_object_id field is i_id. We
* use a dichotomy so that lookups are in log2(n).
*****************************************************************************/
void * __vlc_object_get( vlc_object_t *p_this, int i_id )
void * vlc_object_get( int i_id )
{
int i_max, i_middle;
vlc_object_t **pp_objects;
......@@ -1074,11 +1074,11 @@ static int DumpCommand( vlc_object_t *p_this, char const *psz_cmd,
char *end;
int i_id = strtol( newval.psz_string, &end, 0 );
if( end != newval.psz_string )
p_object = vlc_object_get( p_this, i_id );
p_object = vlc_object_get( i_id );
else
{
/* try using the object's name to find it */
vlc_object_t *p_libvlc = vlc_object_get( p_this, 1 );
vlc_object_t *p_libvlc = vlc_object_get( 1 );
if( p_libvlc )
{
/* Look in p_libvlc's children tree */
......
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