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

Remove some unused p_e parameters and propagate

parent 1e87443a
...@@ -50,11 +50,10 @@ typedef struct libvlc_media_library_t libvlc_media_library_t; ...@@ -50,11 +50,10 @@ typedef struct libvlc_media_library_t libvlc_media_library_t;
* Create an new Media Library object * Create an new Media Library object
* *
* \param p_libvlc_instance the libvlc instance * \param p_libvlc_instance the libvlc instance
* \param p_e an initialized exception pointer * \return a new object or NULL on error
*/ */
VLC_PUBLIC_API libvlc_media_library_t * VLC_PUBLIC_API libvlc_media_library_t *
libvlc_media_library_new( libvlc_instance_t * p_inst, libvlc_media_library_new( libvlc_instance_t * p_inst );
libvlc_exception_t * p_e );
/** /**
* Release media library object. This functions decrements the * Release media library object. This functions decrements the
......
...@@ -49,11 +49,10 @@ typedef struct libvlc_media_list_view_t libvlc_media_list_view_t; ...@@ -49,11 +49,10 @@ typedef struct libvlc_media_list_view_t libvlc_media_list_view_t;
* Create an empty media list. * Create an empty media list.
* *
* \param p_libvlc libvlc instance * \param p_libvlc libvlc instance
* \param p_e an initialized exception pointer * \return empty media list, or NULL on error
* \return empty media list
*/ */
VLC_PUBLIC_API libvlc_media_list_t * VLC_PUBLIC_API libvlc_media_list_t *
libvlc_media_list_new( libvlc_instance_t *, libvlc_exception_t * ); libvlc_media_list_new( libvlc_instance_t * );
/** /**
* Release media list created with libvlc_media_list_new(). * Release media list created with libvlc_media_list_new().
...@@ -213,16 +212,13 @@ VLC_PUBLIC_API libvlc_media_list_view_t * ...@@ -213,16 +212,13 @@ VLC_PUBLIC_API libvlc_media_list_view_t *
* Get a hierarchical media list view of media list items * Get a hierarchical media list view of media list items
* *
* \param p_ml a media list instance * \param p_ml a media list instance
* \param p_ex an exception instance
* \return hierarchical media list view instance * \return hierarchical media list view instance
*/ */
VLC_PUBLIC_API libvlc_media_list_view_t * VLC_PUBLIC_API libvlc_media_list_view_t *
libvlc_media_list_hierarchical_view( libvlc_media_list_t *, libvlc_media_list_hierarchical_view( libvlc_media_list_t * );
libvlc_exception_t * );
VLC_PUBLIC_API libvlc_media_list_view_t * VLC_PUBLIC_API libvlc_media_list_view_t *
libvlc_media_list_hierarchical_node_view( libvlc_media_list_t * p_ml, libvlc_media_list_hierarchical_node_view( libvlc_media_list_t * p_ml );
libvlc_exception_t * p_ex);
/** /**
* Get libvlc_event_manager from this media list instance. * Get libvlc_event_manager from this media list instance.
......
...@@ -186,8 +186,7 @@ libvlc_media_list_flat_view( libvlc_media_list_t * p_mlist, ...@@ -186,8 +186,7 @@ libvlc_media_list_flat_view( libvlc_media_list_t * p_mlist,
flat_media_list_view_children_at_index, flat_media_list_view_children_at_index,
libvlc_media_list_flat_view, libvlc_media_list_flat_view,
flat_media_list_view_release, flat_media_list_view_release,
p_this_view_data, p_this_view_data );
p_e );
libvlc_media_list_lock( p_mlist ); libvlc_media_list_lock( p_mlist );
import_mlist_rec( p_mlv, p_mlist, p_e ); import_mlist_rec( p_mlv, p_mlist, p_e );
libvlc_media_list_view_set_ml_notification_callback( p_mlv, libvlc_media_list_view_set_ml_notification_callback( p_mlv,
......
...@@ -86,7 +86,7 @@ hierarch_media_list_view_children_at_index( libvlc_media_list_view_t * p_mlv, ...@@ -86,7 +86,7 @@ hierarch_media_list_view_children_at_index( libvlc_media_list_view_t * p_mlv,
p_submlist = libvlc_media_subitems( p_md ); p_submlist = libvlc_media_subitems( p_md );
libvlc_media_release( p_md ); libvlc_media_release( p_md );
if( !p_submlist ) return NULL; if( !p_submlist ) return NULL;
p_ret = libvlc_media_list_hierarchical_view( p_submlist, p_e ); p_ret = libvlc_media_list_hierarchical_view( p_submlist );
libvlc_media_list_release( p_submlist ); libvlc_media_list_release( p_submlist );
return p_ret; return p_ret;
...@@ -162,8 +162,7 @@ hierarch_media_list_view_release( libvlc_media_list_view_t * p_mlv ) ...@@ -162,8 +162,7 @@ hierarch_media_list_view_release( libvlc_media_list_view_t * p_mlv )
* libvlc_media_list_flat_view (Public) * libvlc_media_list_flat_view (Public)
**************************************************************************/ **************************************************************************/
libvlc_media_list_view_t * libvlc_media_list_view_t *
libvlc_media_list_hierarchical_view( libvlc_media_list_t * p_mlist, libvlc_media_list_hierarchical_view( libvlc_media_list_t * p_mlist )
libvlc_exception_t * p_e )
{ {
trace("\n"); trace("\n");
libvlc_media_list_view_t * p_mlv; libvlc_media_list_view_t * p_mlv;
...@@ -173,8 +172,7 @@ libvlc_media_list_hierarchical_view( libvlc_media_list_t * p_mlist, ...@@ -173,8 +172,7 @@ libvlc_media_list_hierarchical_view( libvlc_media_list_t * p_mlist,
hierarch_media_list_view_children_at_index, hierarch_media_list_view_children_at_index,
libvlc_media_list_hierarchical_view, libvlc_media_list_hierarchical_view,
hierarch_media_list_view_release, hierarch_media_list_view_release,
NULL, NULL );
p_e );
libvlc_media_list_lock( p_mlist ); libvlc_media_list_lock( p_mlist );
libvlc_event_attach( p_mlv->p_mlist->p_event_manager, libvlc_event_attach( p_mlv->p_mlist->p_event_manager,
libvlc_MediaListItemAdded, libvlc_MediaListItemAdded,
......
...@@ -127,7 +127,7 @@ hierarch_node_media_list_view_children_at_index( libvlc_media_list_view_t * p_ml ...@@ -127,7 +127,7 @@ hierarch_node_media_list_view_children_at_index( libvlc_media_list_view_t * p_ml
p_submlist = libvlc_media_subitems( p_md ); p_submlist = libvlc_media_subitems( p_md );
libvlc_media_release( p_md ); libvlc_media_release( p_md );
if( !p_submlist ) return NULL; if( !p_submlist ) return NULL;
p_ret = libvlc_media_list_hierarchical_node_view( p_submlist, p_e ); p_ret = libvlc_media_list_hierarchical_node_view( p_submlist );
libvlc_media_list_release( p_submlist ); libvlc_media_list_release( p_submlist );
return p_ret; return p_ret;
...@@ -282,8 +282,7 @@ hierarch_node_media_list_view_release( libvlc_media_list_view_t * p_mlv ) ...@@ -282,8 +282,7 @@ hierarch_node_media_list_view_release( libvlc_media_list_view_t * p_mlv )
* libvlc_media_list_flat_view (Public) * libvlc_media_list_flat_view (Public)
**************************************************************************/ **************************************************************************/
libvlc_media_list_view_t * libvlc_media_list_view_t *
libvlc_media_list_hierarchical_node_view( libvlc_media_list_t * p_mlist, libvlc_media_list_hierarchical_node_view( libvlc_media_list_t * p_mlist )
libvlc_exception_t * p_e )
{ {
trace("\n"); trace("\n");
libvlc_media_list_view_t * p_mlv; libvlc_media_list_view_t * p_mlv;
...@@ -293,8 +292,7 @@ libvlc_media_list_hierarchical_node_view( libvlc_media_list_t * p_mlist, ...@@ -293,8 +292,7 @@ libvlc_media_list_hierarchical_node_view( libvlc_media_list_t * p_mlist,
hierarch_node_media_list_view_children_at_index, hierarch_node_media_list_view_children_at_index,
libvlc_media_list_hierarchical_node_view, libvlc_media_list_hierarchical_node_view,
hierarch_node_media_list_view_release, hierarch_node_media_list_view_release,
NULL, NULL );
p_e );
libvlc_media_list_lock( p_mlist ); libvlc_media_list_lock( p_mlist );
libvlc_event_attach( p_mlv->p_mlist->p_event_manager, libvlc_event_attach( p_mlv->p_mlist->p_event_manager,
libvlc_MediaListItemAdded, libvlc_MediaListItemAdded,
......
...@@ -101,7 +101,7 @@ static void input_item_subitem_added( const vlc_event_t *p_event, ...@@ -101,7 +101,7 @@ static void input_item_subitem_added( const vlc_event_t *p_event,
/* Add this to our media list */ /* Add this to our media list */
if( !p_md->p_subitems ) if( !p_md->p_subitems )
{ {
p_md->p_subitems = libvlc_media_list_new( p_md->p_libvlc_instance, NULL ); p_md->p_subitems = libvlc_media_list_new( p_md->p_libvlc_instance );
libvlc_media_list_set_media( p_md->p_subitems, p_md ); libvlc_media_list_set_media( p_md->p_subitems, p_md );
} }
if( p_md->p_subitems ) if( p_md->p_subitems )
...@@ -346,7 +346,7 @@ libvlc_media_t * libvlc_media_new_as_node( ...@@ -346,7 +346,7 @@ libvlc_media_t * libvlc_media_new_as_node(
p_md = libvlc_media_new_from_input_item( p_instance, p_md = libvlc_media_new_from_input_item( p_instance,
p_input_item, p_e ); p_input_item, p_e );
p_md->p_subitems = libvlc_media_list_new( p_md->p_libvlc_instance, NULL ); p_md->p_subitems = libvlc_media_list_new( p_md->p_libvlc_instance );
return p_md; return p_md;
} }
......
...@@ -184,7 +184,7 @@ libvlc_media_discoverer_new_from_name( libvlc_instance_t * p_inst, ...@@ -184,7 +184,7 @@ libvlc_media_discoverer_new_from_name( libvlc_instance_t * p_inst,
} }
p_mdis->p_libvlc_instance = p_inst; p_mdis->p_libvlc_instance = p_inst;
p_mdis->p_mlist = libvlc_media_list_new( p_inst, NULL ); p_mdis->p_mlist = libvlc_media_list_new( p_inst );
p_mdis->p_mlist->b_read_only = true; p_mdis->p_mlist->b_read_only = true;
p_mdis->running = false; p_mdis->running = false;
......
...@@ -57,8 +57,7 @@ struct libvlc_media_library_t ...@@ -57,8 +57,7 @@ struct libvlc_media_library_t
* new (Public) * new (Public)
**************************************************************************/ **************************************************************************/
libvlc_media_library_t * libvlc_media_library_t *
libvlc_media_library_new( libvlc_instance_t * p_inst, libvlc_media_library_new( libvlc_instance_t * p_inst )
libvlc_exception_t * p_e )
{ {
libvlc_media_library_t * p_mlib; libvlc_media_library_t * p_mlib;
...@@ -131,9 +130,7 @@ libvlc_media_library_load( libvlc_media_library_t * p_mlib, ...@@ -131,9 +130,7 @@ libvlc_media_library_load( libvlc_media_library_t * p_mlib,
if( p_mlib->p_mlist ) if( p_mlib->p_mlist )
libvlc_media_list_release( p_mlib->p_mlist ); libvlc_media_list_release( p_mlib->p_mlist );
p_mlib->p_mlist = libvlc_media_list_new( p_mlib->p_mlist = libvlc_media_list_new( p_mlib->p_libvlc_instance );
p_mlib->p_libvlc_instance,
p_e );
libvlc_media_list_add_file_content( p_mlib->p_mlist, psz_uri, p_e ); libvlc_media_list_add_file_content( p_mlib->p_mlist, psz_uri, p_e );
free( psz_uri ); free( psz_uri );
......
...@@ -151,8 +151,7 @@ int mlist_is_writable( libvlc_media_list_t *p_mlist, libvlc_exception_t *p_e ) ...@@ -151,8 +151,7 @@ int mlist_is_writable( libvlc_media_list_t *p_mlist, libvlc_exception_t *p_e )
* Init an object. * Init an object.
**************************************************************************/ **************************************************************************/
libvlc_media_list_t * libvlc_media_list_t *
libvlc_media_list_new( libvlc_instance_t * p_inst, libvlc_media_list_new( libvlc_instance_t * p_inst )
libvlc_exception_t * p_e )
{ {
libvlc_media_list_t * p_mlist; libvlc_media_list_t * p_mlist;
......
...@@ -303,8 +303,7 @@ libvlc_media_list_view_new( libvlc_media_list_t * p_mlist, ...@@ -303,8 +303,7 @@ libvlc_media_list_view_new( libvlc_media_list_t * p_mlist,
libvlc_media_list_view_children_at_index_func_t pf_children_at_index, libvlc_media_list_view_children_at_index_func_t pf_children_at_index,
libvlc_media_list_view_constructor_func_t pf_constructor, libvlc_media_list_view_constructor_func_t pf_constructor,
libvlc_media_list_view_release_func_t pf_release, libvlc_media_list_view_release_func_t pf_release,
void * this_view_data, void * this_view_data )
libvlc_exception_t * p_e )
{ {
libvlc_media_list_view_t * p_mlv; libvlc_media_list_view_t * p_mlv;
p_mlv = calloc( 1, sizeof(libvlc_media_list_view_t) ); p_mlv = calloc( 1, sizeof(libvlc_media_list_view_t) );
......
...@@ -86,8 +86,7 @@ libvlc_media_list_view_t * libvlc_media_list_view_new( ...@@ -86,8 +86,7 @@ libvlc_media_list_view_t * libvlc_media_list_view_new(
libvlc_media_list_view_children_at_index_func_t pf_children_at_index, libvlc_media_list_view_children_at_index_func_t pf_children_at_index,
libvlc_media_list_view_constructor_func_t pf_constructor, libvlc_media_list_view_constructor_func_t pf_constructor,
libvlc_media_list_view_release_func_t pf_release, libvlc_media_list_view_release_func_t pf_release,
void * this_view_data, void * this_view_data );
libvlc_exception_t * p_e );
void libvlc_media_list_view_set_ml_notification_callback( void libvlc_media_list_view_set_ml_notification_callback(
libvlc_media_list_view_t * p_mlv, libvlc_media_list_view_t * p_mlv,
......
...@@ -35,8 +35,8 @@ static void test_media_list (const char ** argv, int argc) ...@@ -35,8 +35,8 @@ static void test_media_list (const char ** argv, int argc)
vlc = libvlc_new (argc, argv, &ex); vlc = libvlc_new (argc, argv, &ex);
catch (); catch ();
ml = libvlc_media_list_new (vlc, &ex); ml = libvlc_media_list_new (vlc);
catch (); assert (ml != NULL);
md1 = libvlc_media_new (vlc, "/dev/null", &ex); md1 = libvlc_media_new (vlc, "/dev/null", &ex);
catch (); catch ();
......
...@@ -107,8 +107,8 @@ static void test_media_list_player_items_queue(const char** argv, int argc) ...@@ -107,8 +107,8 @@ static void test_media_list_player_items_queue(const char** argv, int argc)
md = libvlc_media_new (vlc, file, &ex); md = libvlc_media_new (vlc, file, &ex);
catch (); catch ();
ml = libvlc_media_list_new (vlc, &ex); ml = libvlc_media_list_new (vlc);
catch (); assert (ml != NULL);
mlp = libvlc_media_list_player_new (vlc, &ex); mlp = libvlc_media_list_player_new (vlc, &ex);
catch (); catch ();
...@@ -178,8 +178,8 @@ static void test_media_list_player_previous(const char** argv, int argc) ...@@ -178,8 +178,8 @@ static void test_media_list_player_previous(const char** argv, int argc)
md = libvlc_media_new (vlc, file, &ex); md = libvlc_media_new (vlc, file, &ex);
catch (); catch ();
ml = libvlc_media_list_new (vlc, &ex); ml = libvlc_media_list_new (vlc);
catch (); assert (ml != NULL);
mlp = libvlc_media_list_player_new (vlc, &ex); mlp = libvlc_media_list_player_new (vlc, &ex);
catch (); catch ();
...@@ -255,8 +255,8 @@ static void test_media_list_player_next(const char** argv, int argc) ...@@ -255,8 +255,8 @@ static void test_media_list_player_next(const char** argv, int argc)
md = libvlc_media_new (vlc, file, &ex); md = libvlc_media_new (vlc, file, &ex);
catch (); catch ();
ml = libvlc_media_list_new (vlc, &ex); ml = libvlc_media_list_new (vlc);
catch (); assert (ml != NULL);
mlp = libvlc_media_list_player_new (vlc, &ex); mlp = libvlc_media_list_player_new (vlc, &ex);
catch (); catch ();
...@@ -331,8 +331,8 @@ static void test_media_list_player_pause_stop(const char** argv, int argc) ...@@ -331,8 +331,8 @@ static void test_media_list_player_pause_stop(const char** argv, int argc)
md = libvlc_media_new (vlc, file, &ex); md = libvlc_media_new (vlc, file, &ex);
catch (); catch ();
ml = libvlc_media_list_new (vlc, &ex); ml = libvlc_media_list_new (vlc);
catch (); assert (ml != NULL);
mlp = libvlc_media_list_player_new (vlc, &ex); mlp = libvlc_media_list_player_new (vlc, &ex);
...@@ -378,8 +378,8 @@ static void test_media_list_player_play_item_at_index(const char** argv, int arg ...@@ -378,8 +378,8 @@ static void test_media_list_player_play_item_at_index(const char** argv, int arg
md = libvlc_media_new (vlc, file, &ex); md = libvlc_media_new (vlc, file, &ex);
catch (); catch ();
ml = libvlc_media_list_new (vlc, &ex); ml = libvlc_media_list_new (vlc);
catch (); assert (ml != NULL);
mlp = libvlc_media_list_player_new (vlc, &ex); mlp = libvlc_media_list_player_new (vlc, &ex);
...@@ -458,23 +458,23 @@ static void test_media_list_player_playback_options (const char** argv, int argc ...@@ -458,23 +458,23 @@ static void test_media_list_player_playback_options (const char** argv, int argc
md5 = libvlc_media_new (vlc, file, &ex); md5 = libvlc_media_new (vlc, file, &ex);
catch (); catch ();
ml = libvlc_media_list_new (vlc, &ex); ml = libvlc_media_list_new (vlc);
catch (); assert (ml != NULL);
ml2 = libvlc_media_list_new (vlc, &ex); ml2 = libvlc_media_list_new (vlc);
catch (); assert (ml2 != NULL);
ml3 = libvlc_media_list_new (vlc, &ex); ml3 = libvlc_media_list_new (vlc);
catch (); assert (ml3 != NULL);
ml4 = libvlc_media_list_new (vlc, &ex); ml4 = libvlc_media_list_new (vlc);
catch (); assert (ml4 != NULL);
ml5 = libvlc_media_list_new (vlc, &ex); ml5 = libvlc_media_list_new (vlc);
catch (); assert (ml5 != NULL);
ml6 = libvlc_media_list_new (vlc, &ex); ml6 = libvlc_media_list_new (vlc);
catch (); assert (ml6 != NULL);
media_list_add_file_path (vlc, ml2, file); media_list_add_file_path (vlc, ml2, file);
media_list_add_file_path (vlc, ml2, file); media_list_add_file_path (vlc, ml2, file);
......
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