[vlc-commits] event: remove unused instance libvlc_event_manager_new() parameter
Rémi Denis-Courmont
git at videolan.org
Wed Aug 5 18:10:44 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul 30 23:47:20 2015 +0300| [7f4edacfd2812893c624433f1f9bff64bf6825e3] | committer: Rémi Denis-Courmont
event: remove unused instance libvlc_event_manager_new() parameter
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7f4edacfd2812893c624433f1f9bff64bf6825e3
---
lib/event.c | 5 +----
lib/event_internal.h | 4 +---
lib/libvlc_internal.h | 3 +--
lib/media.c | 2 +-
lib/media_discoverer.c | 2 +-
lib/media_library.c | 2 +-
lib/media_list.c | 2 +-
lib/media_list_player.c | 2 +-
lib/media_player.c | 2 +-
lib/vlm.c | 2 +-
10 files changed, 10 insertions(+), 16 deletions(-)
diff --git a/lib/event.c b/lib/event.c
index 7b42c53..3977643 100644
--- a/lib/event.c
+++ b/lib/event.c
@@ -68,7 +68,7 @@ group_contains_listener( libvlc_event_listeners_group_t * group,
* Init an object's event manager.
**************************************************************************/
libvlc_event_manager_t *
-libvlc_event_manager_new( void * p_obj, libvlc_instance_t * p_libvlc_inst )
+libvlc_event_manager_new( void * p_obj )
{
libvlc_event_manager_t * p_em;
@@ -81,9 +81,7 @@ libvlc_event_manager_new( void * p_obj, libvlc_instance_t * p_libvlc_inst )
p_em->p_obj = p_obj;
p_em->async_event_queue = NULL;
- p_em->p_libvlc_instance = p_libvlc_inst;
- libvlc_retain( p_libvlc_inst );
vlc_array_init( &p_em->listeners_groups );
vlc_mutex_init( &p_em->object_lock );
vlc_mutex_init_recursive( &p_em->event_sending_lock );
@@ -116,7 +114,6 @@ void libvlc_event_manager_release( libvlc_event_manager_t * p_em )
free( p_lg );
}
vlc_array_clear( &p_em->listeners_groups );
- libvlc_release( p_em->p_libvlc_instance );
free( p_em );
}
diff --git a/lib/event_internal.h b/lib/event_internal.h
index 5c3ab3e..c424cda 100644
--- a/lib/event_internal.h
+++ b/lib/event_internal.h
@@ -52,8 +52,7 @@
* libvlc_my_cool_object_new()
* {
* ...
- * p_self->p_event_manager = libvlc_event_manager_new( p_self,
- * p_self->p_libvlc_instance, p_e);
+ * p_self->p_event_manager = libvlc_event_manager_new( p_self )
* libvlc_event_manager_register_event_type(p_self->p_event_manager,
* libvlc_MyCoolObjectDidSomething, p_e)
* ...
@@ -87,7 +86,6 @@ typedef struct libvlc_event_listener_t
typedef struct libvlc_event_manager_t
{
void * p_obj;
- struct libvlc_instance_t * p_libvlc_instance;
vlc_array_t listeners_groups;
vlc_mutex_t object_lock;
vlc_mutex_t event_sending_lock;
diff --git a/lib/libvlc_internal.h b/lib/libvlc_internal.h
index 4008c53..8f0d8e7 100644
--- a/lib/libvlc_internal.h
+++ b/lib/libvlc_internal.h
@@ -90,8 +90,7 @@ void libvlc_threads_init (void);
void libvlc_threads_deinit (void);
/* Events */
-libvlc_event_manager_t * libvlc_event_manager_new(
- void * p_obj, libvlc_instance_t * p_libvlc_inst );
+libvlc_event_manager_t * libvlc_event_manager_new(void * p_obj);
void libvlc_event_manager_release(
libvlc_event_manager_t * p_em );
diff --git a/lib/media.c b/lib/media.c
index d76a3ab..493f95f 100644
--- a/lib/media.c
+++ b/lib/media.c
@@ -355,7 +355,7 @@ libvlc_media_t * libvlc_media_new_from_input_item(
* It can give a bunch of item to read. */
p_md->p_subitems = NULL;
- p_md->p_event_manager = libvlc_event_manager_new( p_md, p_instance );
+ p_md->p_event_manager = libvlc_event_manager_new( p_md );
if( unlikely(p_md->p_event_manager == NULL) )
{
free(p_md);
diff --git a/lib/media_discoverer.c b/lib/media_discoverer.c
index 1e9d163..ec1b288 100644
--- a/lib/media_discoverer.c
+++ b/lib/media_discoverer.c
@@ -210,7 +210,7 @@ libvlc_media_discoverer_new( libvlc_instance_t * p_inst, const char * psz_name )
vlc_dictionary_init( &p_mdis->catname_to_submedialist, 0 );
- p_mdis->p_event_manager = libvlc_event_manager_new( p_mdis, p_inst );
+ p_mdis->p_event_manager = libvlc_event_manager_new( p_mdis );
if( unlikely(p_mdis->p_event_manager == NULL) )
{
free( p_mdis );
diff --git a/lib/media_library.c b/lib/media_library.c
index 4bb07d5..8b69165 100644
--- a/lib/media_library.c
+++ b/lib/media_library.c
@@ -73,7 +73,7 @@ libvlc_media_library_new( libvlc_instance_t * p_inst )
p_mlib->i_refcount = 1;
p_mlib->p_mlist = NULL;
- p_mlib->p_event_manager = libvlc_event_manager_new( p_mlib, p_inst );
+ p_mlib->p_event_manager = libvlc_event_manager_new( p_mlib );
if( unlikely(p_mlib->p_event_manager == NULL) )
{
free(p_mlib);
diff --git a/lib/media_list.c b/lib/media_list.c
index 263b388..330aa53 100644
--- a/lib/media_list.c
+++ b/lib/media_list.c
@@ -160,7 +160,7 @@ libvlc_media_list_new( libvlc_instance_t * p_inst )
}
p_mlist->p_libvlc_instance = p_inst;
- p_mlist->p_event_manager = libvlc_event_manager_new( p_mlist, p_inst );
+ p_mlist->p_event_manager = libvlc_event_manager_new( p_mlist );
if( unlikely(p_mlist->p_event_manager == NULL) )
{
free(p_mlist);
diff --git a/lib/media_list_player.c b/lib/media_list_player.c
index 9ac935a..d2fe4d8 100644
--- a/lib/media_list_player.c
+++ b/lib/media_list_player.c
@@ -458,7 +458,7 @@ libvlc_media_list_player_new(libvlc_instance_t * p_instance)
return NULL;
}
- p_mlp->p_event_manager = libvlc_event_manager_new(p_mlp, p_instance);
+ p_mlp->p_event_manager = libvlc_event_manager_new(p_mlp);
if (unlikely(p_mlp->p_event_manager == NULL))
{
free (p_mlp);
diff --git a/lib/media_player.c b/lib/media_player.c
index ba7158e..5784dfb 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -678,7 +678,7 @@ libvlc_media_player_new( libvlc_instance_t *instance )
vlc_mutex_init (&mp->input.lock);
mp->i_refcount = 1;
- mp->p_event_manager = libvlc_event_manager_new(mp, instance);
+ mp->p_event_manager = libvlc_event_manager_new(mp);
if (unlikely(mp->p_event_manager == NULL))
{
input_resource_Release(mp->input.p_resource);
diff --git a/lib/vlm.c b/lib/vlm.c
index 735222d..2f5fc9a 100644
--- a/lib/vlm.c
+++ b/lib/vlm.c
@@ -125,7 +125,7 @@ static int libvlc_vlm_init( libvlc_instance_t *p_instance )
if( !p_instance->libvlc_vlm.p_event_manager )
{
p_instance->libvlc_vlm.p_event_manager =
- libvlc_event_manager_new( p_instance->libvlc_vlm.p_vlm, p_instance );
+ libvlc_event_manager_new( p_instance->libvlc_vlm.p_vlm );
if( unlikely(p_instance->libvlc_vlm.p_event_manager == NULL) )
return VLC_ENOMEM;
libvlc_event_manager_register_event_type(
More information about the vlc-commits
mailing list