Commit 5fb1ac63 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

lib: remove libvlc_event_manager_register_event_type()

parent b5985e1d
......@@ -51,8 +51,6 @@
* {
* ...
* 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)
* ...
* }
*
......@@ -130,18 +128,6 @@ void libvlc_event_manager_release( libvlc_event_manager_t * p_em )
free( p_em );
}
/**************************************************************************
* libvlc_event_manager_register_event_type (internal) :
*
* Init an object's event manager.
**************************************************************************/
void libvlc_event_manager_register_event_type(
libvlc_event_manager_t * p_em,
libvlc_event_type_t event_type )
{
(void) p_em; (void) event_type;
}
/**************************************************************************
* libvlc_event_send (internal) :
*
......
......@@ -95,10 +95,6 @@ libvlc_event_manager_t * libvlc_event_manager_new(void * p_obj);
void libvlc_event_manager_release(
libvlc_event_manager_t * p_em );
void libvlc_event_manager_register_event_type(
libvlc_event_manager_t * p_em,
libvlc_event_type_t event_type );
void libvlc_event_send(
libvlc_event_manager_t * p_em,
libvlc_event_t * p_event );
......
......@@ -362,15 +362,6 @@ libvlc_media_t * libvlc_media_new_from_input_item(
return NULL;
}
libvlc_event_manager_t *em = p_md->p_event_manager;
libvlc_event_manager_register_event_type(em, libvlc_MediaMetaChanged);
libvlc_event_manager_register_event_type(em, libvlc_MediaSubItemAdded);
libvlc_event_manager_register_event_type(em, libvlc_MediaFreed);
libvlc_event_manager_register_event_type(em, libvlc_MediaDurationChanged);
libvlc_event_manager_register_event_type(em, libvlc_MediaStateChanged);
libvlc_event_manager_register_event_type(em, libvlc_MediaParsedChanged);
libvlc_event_manager_register_event_type(em, libvlc_MediaSubItemTreeAdded);
vlc_gc_incref( p_md->p_input_item );
install_input_item_observer( p_md );
......
......@@ -217,11 +217,6 @@ libvlc_media_discoverer_new( libvlc_instance_t * p_inst, const char * psz_name )
return NULL;
}
libvlc_event_manager_register_event_type( p_mdis->p_event_manager,
libvlc_MediaDiscovererStarted );
libvlc_event_manager_register_event_type( p_mdis->p_event_manager,
libvlc_MediaDiscovererEnded );
p_mdis->p_sd = vlc_sd_Create( (vlc_object_t*)p_inst->p_libvlc_int,
psz_name );
if( unlikely(p_mdis->p_sd == NULL) )
......
......@@ -169,17 +169,6 @@ libvlc_media_list_new( libvlc_instance_t * p_inst )
p_mlist->b_read_only = false;
libvlc_event_manager_register_event_type( p_mlist->p_event_manager,
libvlc_MediaListItemAdded );
libvlc_event_manager_register_event_type( p_mlist->p_event_manager,
libvlc_MediaListWillAddItem );
libvlc_event_manager_register_event_type( p_mlist->p_event_manager,
libvlc_MediaListItemDeleted );
libvlc_event_manager_register_event_type( p_mlist->p_event_manager,
libvlc_MediaListWillDeleteItem );
libvlc_event_manager_register_event_type( p_mlist->p_event_manager,
libvlc_MediaListEndReached );
vlc_mutex_init( &p_mlist->object_lock );
vlc_mutex_init( &p_mlist->refcount_lock ); // FIXME: spinlock?
......
......@@ -496,14 +496,6 @@ libvlc_media_list_player_new(libvlc_instance_t * p_instance)
goto error;
}
libvlc_event_manager_register_event_type( p_mlp->p_event_manager,
libvlc_MediaListPlayerNextItemSet );
libvlc_event_manager_register_event_type( p_mlp->p_event_manager,
libvlc_MediaListPlayerStopped );
libvlc_event_manager_register_event_type( p_mlp->p_event_manager,
libvlc_MediaListPlayerPlayed );
p_mlp->e_playback_mode = libvlc_playback_mode_default;
if (vlc_clone(&p_mlp->thread, playlist_thread, p_mlp,
VLC_THREAD_PRIORITY_LOW))
{
......
......@@ -95,12 +95,6 @@ static void libvlc_media_player_destroy( libvlc_media_player_t *p_mi );
* Shortcuts
*/
#define register_event(a, b) __register_event(a, libvlc_MediaPlayer ## b)
static inline void __register_event(libvlc_media_player_t *mp, libvlc_event_type_t type)
{
libvlc_event_manager_register_event_type(mp->p_event_manager, type);
}
/*
* The input lock protects the input and input resource pointer.
* It MUST NOT be used from callbacks.
......@@ -687,46 +681,12 @@ libvlc_media_player_new( libvlc_instance_t *instance )
}
vlc_mutex_init(&mp->object_lock);
register_event(mp, NothingSpecial);
register_event(mp, Opening);
register_event(mp, Buffering);
register_event(mp, Playing);
register_event(mp, Paused);
register_event(mp, Stopped);
register_event(mp, Forward);
register_event(mp, Backward);
register_event(mp, EndReached);
register_event(mp, EncounteredError);
register_event(mp, SeekableChanged);
register_event(mp, PositionChanged);
register_event(mp, TimeChanged);
register_event(mp, LengthChanged);
register_event(mp, TitleChanged);
register_event(mp, PausableChanged);
register_event(mp, Vout);
register_event(mp, ScrambledChanged);
register_event(mp, ESAdded);
register_event(mp, ESDeleted);
register_event(mp, ESSelected);
register_event(mp, Corked);
register_event(mp, Uncorked);
register_event(mp, Muted);
register_event(mp, Unmuted);
register_event(mp, AudioVolume);
register_event(mp, AudioDevice);
var_AddCallback(mp, "corks", corks_changed, NULL);
var_AddCallback(mp, "audio-device", audio_device_changed, NULL);
var_AddCallback(mp, "mute", mute_changed, NULL);
var_AddCallback(mp, "volume", volume_changed, NULL);
/* Snapshot initialization */
register_event(mp, SnapshotTaken);
register_event(mp, MediaChanged);
/* Attach a var callback to the global object to provide the glue between
* vout_thread that generates the event and media_player that re-emits it
* with its own event manager
......
......@@ -128,39 +128,6 @@ static int libvlc_vlm_init( libvlc_instance_t *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(
p_instance->libvlc_vlm.p_event_manager,
libvlc_VlmMediaAdded );
libvlc_event_manager_register_event_type(
p_instance->libvlc_vlm.p_event_manager,
libvlc_VlmMediaRemoved );
libvlc_event_manager_register_event_type(
p_instance->libvlc_vlm.p_event_manager,
libvlc_VlmMediaChanged );
libvlc_event_manager_register_event_type(
p_instance->libvlc_vlm.p_event_manager,
libvlc_VlmMediaInstanceStarted );
libvlc_event_manager_register_event_type(
p_instance->libvlc_vlm.p_event_manager,
libvlc_VlmMediaInstanceStopped );
libvlc_event_manager_register_event_type(
p_instance->libvlc_vlm.p_event_manager,
libvlc_VlmMediaInstanceStatusInit );
libvlc_event_manager_register_event_type(
p_instance->libvlc_vlm.p_event_manager,
libvlc_VlmMediaInstanceStatusOpening );
libvlc_event_manager_register_event_type(
p_instance->libvlc_vlm.p_event_manager,
libvlc_VlmMediaInstanceStatusPlaying );
libvlc_event_manager_register_event_type(
p_instance->libvlc_vlm.p_event_manager,
libvlc_VlmMediaInstanceStatusPause );
libvlc_event_manager_register_event_type(
p_instance->libvlc_vlm.p_event_manager,
libvlc_VlmMediaInstanceStatusEnd );
libvlc_event_manager_register_event_type(
p_instance->libvlc_vlm.p_event_manager,
libvlc_VlmMediaInstanceStatusError );
}
if( !p_instance->libvlc_vlm.p_vlm )
......
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