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

libvlc_media_*: remove a bunch of useless exception parameters

parent 0102564f
...@@ -136,12 +136,11 @@ VLC_PUBLIC_API libvlc_media_t * libvlc_media_new_as_node( ...@@ -136,12 +136,11 @@ VLC_PUBLIC_API libvlc_media_t * libvlc_media_new_as_node(
* *
* \param p_instance the instance * \param p_instance the instance
* \param ppsz_options the options (as a string) * \param ppsz_options the options (as a string)
* \param p_e an initialized exception pointer
*/ */
VLC_PUBLIC_API void libvlc_media_add_option( VLC_PUBLIC_API void libvlc_media_add_option(
libvlc_media_t * p_md, libvlc_media_t * p_md,
const char * ppsz_options, const char * ppsz_options );
libvlc_exception_t * p_e );
/** /**
* Add an option to the media with configurable flags. * Add an option to the media with configurable flags.
* *
...@@ -154,13 +153,11 @@ VLC_PUBLIC_API void libvlc_media_add_option( ...@@ -154,13 +153,11 @@ VLC_PUBLIC_API void libvlc_media_add_option(
* \param p_instance the instance * \param p_instance the instance
* \param ppsz_options the options (as a string) * \param ppsz_options the options (as a string)
* \param i_flags the flags for this option * \param i_flags the flags for this option
* \param p_e an initialized exception pointer
*/ */
VLC_PUBLIC_API void libvlc_media_add_option_flag( VLC_PUBLIC_API void libvlc_media_add_option_flag(
libvlc_media_t * p_md, libvlc_media_t * p_md,
const char * ppsz_options, const char * ppsz_options,
libvlc_media_option_t i_flags, libvlc_media_option_t i_flags );
libvlc_exception_t * p_e );
/** /**
...@@ -190,11 +187,9 @@ VLC_PUBLIC_API void libvlc_media_release( ...@@ -190,11 +187,9 @@ VLC_PUBLIC_API void libvlc_media_release(
* Get the media resource locator (mrl) from a media descriptor object * Get the media resource locator (mrl) from a media descriptor object
* *
* \param p_md a media descriptor object * \param p_md a media descriptor object
* \param p_e an initialized exception object
* \return string with mrl of media descriptor object * \return string with mrl of media descriptor object
*/ */
VLC_PUBLIC_API char * libvlc_media_get_mrl( libvlc_media_t * p_md, VLC_PUBLIC_API char * libvlc_media_get_mrl( libvlc_media_t * p_md );
libvlc_exception_t * p_e );
/** /**
* Duplicate a media descriptor object. * Duplicate a media descriptor object.
...@@ -208,13 +203,12 @@ VLC_PUBLIC_API libvlc_media_t * libvlc_media_duplicate( libvlc_media_t * ); ...@@ -208,13 +203,12 @@ VLC_PUBLIC_API libvlc_media_t * libvlc_media_duplicate( libvlc_media_t * );
* *
* \param p_meta_desc the media to read * \param p_meta_desc the media to read
* \param e_meta the meta to read * \param e_meta the meta to read
* \param p_e an initialized exception pointer
* \return the media's meta * \return the media's meta
*/ */
VLC_PUBLIC_API char * libvlc_media_get_meta( VLC_PUBLIC_API char * libvlc_media_get_meta(
libvlc_media_t *p_meta_desc, libvlc_media_t *p_meta_desc,
libvlc_meta_t e_meta, libvlc_meta_t e_meta );
libvlc_exception_t *p_e );
/** /**
* Get current state of media descriptor object. Possible media states * Get current state of media descriptor object. Possible media states
* are defined in libvlc_structures.c ( libvlc_NothingSpecial=0, * are defined in libvlc_structures.c ( libvlc_NothingSpecial=0,
...@@ -224,12 +218,10 @@ VLC_PUBLIC_API char * libvlc_media_get_meta( ...@@ -224,12 +218,10 @@ VLC_PUBLIC_API char * libvlc_media_get_meta(
* *
* @see libvlc_state_t * @see libvlc_state_t
* \param p_meta_desc a media descriptor object * \param p_meta_desc a media descriptor object
* \param p_e an initialized exception object
* \return state of media descriptor object * \return state of media descriptor object
*/ */
VLC_PUBLIC_API libvlc_state_t libvlc_media_get_state( VLC_PUBLIC_API libvlc_state_t libvlc_media_get_state(
libvlc_media_t *p_meta_desc, libvlc_media_t *p_meta_desc );
libvlc_exception_t *p_e );
/** /**
...@@ -238,7 +230,6 @@ VLC_PUBLIC_API libvlc_state_t libvlc_media_get_state( ...@@ -238,7 +230,6 @@ VLC_PUBLIC_API libvlc_state_t libvlc_media_get_state(
* libvlc_media_list_release() to decrement the reference counting. * libvlc_media_list_release() to decrement the reference counting.
* *
* \param p_md media descriptor object * \param p_md media descriptor object
* \param p_e initalized exception object
* \return list of media descriptor subitems or NULL * \return list of media descriptor subitems or NULL
*/ */
...@@ -247,20 +238,17 @@ VLC_PUBLIC_API libvlc_state_t libvlc_media_get_state( ...@@ -247,20 +238,17 @@ VLC_PUBLIC_API libvlc_state_t libvlc_media_get_state(
#define VLC_FORWARD_DECLARE_OBJECT(a) struct a #define VLC_FORWARD_DECLARE_OBJECT(a) struct a
VLC_PUBLIC_API VLC_FORWARD_DECLARE_OBJECT(libvlc_media_list_t *) VLC_PUBLIC_API VLC_FORWARD_DECLARE_OBJECT(libvlc_media_list_t *)
libvlc_media_subitems( libvlc_media_t *p_md, libvlc_media_subitems( libvlc_media_t *p_md );
libvlc_exception_t *p_e );
/** /**
* Get event manager from media descriptor object. * Get event manager from media descriptor object.
* NOTE: this function doesn't increment reference counting. * NOTE: this function doesn't increment reference counting.
* *
* \param p_md a media descriptor object * \param p_md a media descriptor object
* \param p_e an initialized exception object
* \return event manager object * \return event manager object
*/ */
VLC_PUBLIC_API libvlc_event_manager_t * VLC_PUBLIC_API libvlc_event_manager_t *
libvlc_media_event_manager( libvlc_media_t * p_md, libvlc_media_event_manager( libvlc_media_t * p_md );
libvlc_exception_t * p_e );
/** /**
* Get duration (in ms) of media descriptor object item. * Get duration (in ms) of media descriptor object item.
...@@ -277,12 +265,10 @@ VLC_PUBLIC_API libvlc_time_t ...@@ -277,12 +265,10 @@ VLC_PUBLIC_API libvlc_time_t
* Get preparsed status for media descriptor object. * Get preparsed status for media descriptor object.
* *
* \param p_md media descriptor object * \param p_md media descriptor object
* \param p_e an initialized exception object
* \return true if media object has been preparsed otherwise it returns false * \return true if media object has been preparsed otherwise it returns false
*/ */
VLC_PUBLIC_API int VLC_PUBLIC_API int
libvlc_media_is_preparsed( libvlc_media_t * p_md, libvlc_media_is_preparsed( libvlc_media_t * p_md );
libvlc_exception_t * p_e );
/** /**
* Sets media descriptor's user_data. user_data is specialized data * Sets media descriptor's user_data. user_data is specialized data
...@@ -291,12 +277,10 @@ VLC_PUBLIC_API int ...@@ -291,12 +277,10 @@ VLC_PUBLIC_API int
* *
* \param p_md media descriptor object * \param p_md media descriptor object
* \param p_new_user_data pointer to user data * \param p_new_user_data pointer to user data
* \param p_e an initialized exception object
*/ */
VLC_PUBLIC_API void VLC_PUBLIC_API void
libvlc_media_set_user_data( libvlc_media_t * p_md, libvlc_media_set_user_data( libvlc_media_t * p_md,
void * p_new_user_data, void * p_new_user_data );
libvlc_exception_t * p_e);
/** /**
* Get media descriptor's user_data. user_data is specialized data * Get media descriptor's user_data. user_data is specialized data
...@@ -304,11 +288,9 @@ VLC_PUBLIC_API void ...@@ -304,11 +288,9 @@ VLC_PUBLIC_API void
* an native object that references a libvlc_media_t pointer * an native object that references a libvlc_media_t pointer
* *
* \param p_md media descriptor object * \param p_md media descriptor object
* \param p_e an initialized exception object
*/ */
VLC_PUBLIC_API void * VLC_PUBLIC_API void *
libvlc_media_get_user_data( libvlc_media_t * p_md, libvlc_media_get_user_data( libvlc_media_t * p_md );
libvlc_exception_t * p_e);
/** @}*/ /** @}*/
......
...@@ -1070,14 +1070,7 @@ int VLCPlugin::playlist_add_extended_untrusted(const char *mrl, int optc, const ...@@ -1070,14 +1070,7 @@ int VLCPlugin::playlist_add_extended_untrusted(const char *mrl, int optc, const
return -1; return -1;
for( int i = 0; i < optc; ++i ) for( int i = 0; i < optc; ++i )
{ libvlc_media_add_option_flag(p_m, optv[i], libvlc_media_option_unique);
libvlc_media_add_option_flag(p_m, optv[i], libvlc_media_option_unique, ex);
if( libvlc_exception_raised(ex) )
{
libvlc_media_release(p_m);
return -1;
}
}
libvlc_media_list_lock(_p_mlist); libvlc_media_list_lock(_p_mlist);
libvlc_media_list_add_media(_p_mlist,p_m,ex); libvlc_media_list_add_media(_p_mlist,p_m,ex);
......
...@@ -358,7 +358,7 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self) ...@@ -358,7 +358,7 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
p_md = libvlc_media_duplicate( [media libVLCMediaDescriptor] ); p_md = libvlc_media_duplicate( [media libVLCMediaDescriptor] );
for( NSString * key in [options allKeys] ) for( NSString * key in [options allKeys] )
{ {
libvlc_media_add_option(p_md, [[NSString stringWithFormat:@"%@=#%@", key, [options objectForKey:key]] UTF8String], NULL); libvlc_media_add_option(p_md, [[NSString stringWithFormat:@"%@=#%@", key, [options objectForKey:key]] UTF8String]);
} }
return [VLCMedia mediaWithLibVLCMediaDescriptor:p_md]; return [VLCMedia mediaWithLibVLCMediaDescriptor:p_md];
} }
......
...@@ -328,14 +328,7 @@ int VlcPlugin::playlist_add_extended_untrusted( const char *mrl, const char *nam ...@@ -328,14 +328,7 @@ int VlcPlugin::playlist_add_extended_untrusted( const char *mrl, const char *nam
return -1; return -1;
for( int i = 0; i < optc; ++i ) for( int i = 0; i < optc; ++i )
{ libvlc_media_add_option_flag(p_m, optv[i], libvlc_media_option_unique);
libvlc_media_add_option_flag(p_m, optv[i], libvlc_media_option_unique, ex);
if( libvlc_exception_raised(ex) )
{
libvlc_media_release(p_m);
return -1;
}
}
libvlc_media_list_lock(libvlc_media_list); libvlc_media_list_lock(libvlc_media_list);
libvlc_media_list_add_media(libvlc_media_list,p_m,ex); libvlc_media_list_add_media(libvlc_media_list,p_m,ex);
......
...@@ -155,7 +155,7 @@ import_mlist_rec( libvlc_media_list_view_t * p_mlv, ...@@ -155,7 +155,7 @@ import_mlist_rec( libvlc_media_list_view_t * p_mlv,
libvlc_media_list_t * p_submlist; libvlc_media_list_t * p_submlist;
p_md = libvlc_media_list_item_at_index( p_mlist, i, p_e ); p_md = libvlc_media_list_item_at_index( p_mlist, i, p_e );
vlc_array_append( &p_mlv->p_this_view_data->array, p_md ); vlc_array_append( &p_mlv->p_this_view_data->array, p_md );
p_submlist = libvlc_media_subitems( p_md, p_e ); p_submlist = libvlc_media_subitems( p_md );
if( p_submlist ) if( p_submlist )
{ {
libvlc_media_list_lock( p_submlist ); libvlc_media_list_lock( p_submlist );
......
...@@ -82,7 +82,7 @@ hierarch_media_list_view_children_at_index( libvlc_media_list_view_t * p_mlv, ...@@ -82,7 +82,7 @@ hierarch_media_list_view_children_at_index( libvlc_media_list_view_t * p_mlv,
libvlc_media_list_view_t * p_ret; libvlc_media_list_view_t * p_ret;
p_md = libvlc_media_list_item_at_index( p_mlv->p_mlist, index, p_e ); p_md = libvlc_media_list_item_at_index( p_mlv->p_mlist, index, p_e );
if( !p_md ) return NULL; if( !p_md ) return NULL;
p_submlist = libvlc_media_subitems( p_md, p_e ); 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, p_e );
......
...@@ -68,7 +68,7 @@ hierarch_node_media_list_view_count( libvlc_media_list_view_t * p_mlv, ...@@ -68,7 +68,7 @@ hierarch_node_media_list_view_count( libvlc_media_list_view_t * p_mlv,
{ {
p_md = libvlc_media_list_item_at_index( p_mlv->p_mlist, i, p_e ); p_md = libvlc_media_list_item_at_index( p_mlv->p_mlist, i, p_e );
if( !p_md ) continue; if( !p_md ) continue;
p_submlist = libvlc_media_subitems( p_md, p_e ); p_submlist = libvlc_media_subitems( p_md );
if( !p_submlist ) continue; if( !p_submlist ) continue;
libvlc_media_release( p_md ); libvlc_media_release( p_md );
libvlc_media_list_release( p_submlist ); libvlc_media_list_release( p_submlist );
...@@ -96,7 +96,7 @@ hierarch_node_media_list_view_item_at_index( libvlc_media_list_view_t * p_mlv, ...@@ -96,7 +96,7 @@ hierarch_node_media_list_view_item_at_index( libvlc_media_list_view_t * p_mlv,
{ {
p_md = libvlc_media_list_item_at_index( p_mlv->p_mlist, i, p_e ); p_md = libvlc_media_list_item_at_index( p_mlv->p_mlist, i, p_e );
if( !p_md ) continue; if( !p_md ) continue;
p_submlist = libvlc_media_subitems( p_md, p_e ); p_submlist = libvlc_media_subitems( p_md );
if( !p_submlist ) continue; if( !p_submlist ) continue;
libvlc_media_list_release( p_submlist ); libvlc_media_list_release( p_submlist );
current_index++; current_index++;
...@@ -124,7 +124,7 @@ hierarch_node_media_list_view_children_at_index( libvlc_media_list_view_t * p_ml ...@@ -124,7 +124,7 @@ hierarch_node_media_list_view_children_at_index( libvlc_media_list_view_t * p_ml
libvlc_media_list_view_t * p_ret; libvlc_media_list_view_t * p_ret;
p_md = hierarch_node_media_list_view_item_at_index( p_mlv, index, p_e ); p_md = hierarch_node_media_list_view_item_at_index( p_mlv, index, p_e );
if( !p_md ) return NULL; if( !p_md ) return NULL;
p_submlist = libvlc_media_subitems( p_md, p_e ); 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, p_e );
...@@ -146,7 +146,7 @@ index_of_item( libvlc_media_list_view_t * p_mlv, libvlc_media_t * p_md ) ...@@ -146,7 +146,7 @@ index_of_item( libvlc_media_list_view_t * p_mlv, libvlc_media_t * p_md )
{ {
p_iter_md = libvlc_media_list_item_at_index( p_mlv->p_mlist, i, NULL ); p_iter_md = libvlc_media_list_item_at_index( p_mlv->p_mlist, i, NULL );
if( !p_iter_md ) continue; if( !p_iter_md ) continue;
p_submlist = libvlc_media_subitems( p_iter_md, NULL ); p_submlist = libvlc_media_subitems( p_iter_md );
if( !p_submlist ) continue; if( !p_submlist ) continue;
libvlc_media_list_release( p_submlist ); libvlc_media_list_release( p_submlist );
libvlc_media_release( p_iter_md ); libvlc_media_release( p_iter_md );
...@@ -162,7 +162,7 @@ item_is_already_added( libvlc_media_t * p_md ) ...@@ -162,7 +162,7 @@ item_is_already_added( libvlc_media_t * p_md )
{ {
libvlc_media_list_t * p_submlist; libvlc_media_list_t * p_submlist;
p_submlist = libvlc_media_subitems( p_md, NULL ); p_submlist = libvlc_media_subitems( p_md );
if( !p_submlist ) return false; if( !p_submlist ) return false;
int count = libvlc_media_list_count( p_submlist, NULL ); int count = libvlc_media_list_count( p_submlist, NULL );
libvlc_media_list_release( p_submlist ); libvlc_media_list_release( p_submlist );
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
# include "config.h" # include "config.h"
#endif #endif
#include <assert.h>
#include <vlc/libvlc.h> #include <vlc/libvlc.h>
#include <vlc/libvlc_media.h> #include <vlc/libvlc_media.h>
#include <vlc/libvlc_media_list.h> // For the subitems, here for convenience #include <vlc/libvlc_media_list.h> // For the subitems, here for convenience
...@@ -491,7 +493,6 @@ libvlc_media_set_state( libvlc_media_t *p_md, ...@@ -491,7 +493,6 @@ libvlc_media_set_state( libvlc_media_t *p_md,
libvlc_state_t state ) libvlc_state_t state )
{ {
libvlc_event_t event; libvlc_event_t event;
VLC_UNUSED(p_e);
p_md->state = state; p_md->state = state;
...@@ -529,7 +530,7 @@ libvlc_media_event_manager( libvlc_media_t * p_md ) ...@@ -529,7 +530,7 @@ libvlc_media_event_manager( libvlc_media_t * p_md )
* Get duration of media object (in ms) * Get duration of media object (in ms)
**************************************************************************/ **************************************************************************/
int64_t int64_t
libvlc_media_get_duration( libvlc_media_t * p_md ) libvlc_media_get_duration( libvlc_media_t * p_md, libvlc_exception_t *p_e )
{ {
assert( p_md ); assert( p_md );
...@@ -550,14 +551,9 @@ int ...@@ -550,14 +551,9 @@ int
libvlc_media_is_preparsed( libvlc_media_t * p_md ) libvlc_media_is_preparsed( libvlc_media_t * p_md )
{ {
assert( p_md ); assert( p_md );
VLC_UNUSED(p_e);
if( !p_md->p_input_item ) if( !p_md->p_input_item )
{
libvlc_exception_raise( p_e );
libvlc_printerr( "No input item" );
return false; return false;
}
return input_item_IsPreparsed( p_md->p_input_item ); return input_item_IsPreparsed( p_md->p_input_item );
} }
......
...@@ -80,7 +80,7 @@ static void services_discovery_item_added( const vlc_event_t * p_event, ...@@ -80,7 +80,7 @@ static void services_discovery_item_added( const vlc_event_t * p_event,
{ {
libvlc_media_t * p_catmd; libvlc_media_t * p_catmd;
p_catmd = libvlc_media_new_as_node( p_mdis->p_libvlc_instance, psz_cat, NULL ); p_catmd = libvlc_media_new_as_node( p_mdis->p_libvlc_instance, psz_cat, NULL );
p_mlist = libvlc_media_subitems( p_catmd, NULL ); p_mlist = libvlc_media_subitems( p_catmd );
p_mlist->b_read_only = true; p_mlist->b_read_only = true;
/* Insert the newly created mlist in our dictionary */ /* Insert the newly created mlist in our dictionary */
......
...@@ -48,8 +48,6 @@ libvlc_media_t * libvlc_media_new_from_input_item( ...@@ -48,8 +48,6 @@ libvlc_media_t * libvlc_media_new_from_input_item(
libvlc_instance_t *, input_item_t *, libvlc_instance_t *, input_item_t *,
libvlc_exception_t * ); libvlc_exception_t * );
void libvlc_media_set_state( void libvlc_media_set_state( libvlc_media_t *, libvlc_state_t );
libvlc_media_t *, libvlc_state_t,
libvlc_exception_t * );
#endif #endif
...@@ -127,7 +127,7 @@ get_path_rec( const libvlc_media_list_path_t path, libvlc_media_list_t * p_curre ...@@ -127,7 +127,7 @@ get_path_rec( const libvlc_media_list_path_t path, libvlc_media_list_t * p_curre
if( p_md == p_searched_md ) if( p_md == p_searched_md )
return libvlc_media_list_path_copy_by_appending( path, i ); /* Found! */ return libvlc_media_list_path_copy_by_appending( path, i ); /* Found! */
libvlc_media_list_t * p_subitems = libvlc_media_subitems( p_md, NULL ); libvlc_media_list_t * p_subitems = libvlc_media_subitems( p_md );
libvlc_media_release( p_md ); libvlc_media_release( p_md );
if( p_subitems ) if( p_subitems )
{ {
...@@ -175,7 +175,7 @@ libvlc_media_list_item_at_path( libvlc_media_list_t * p_mlist, const libvlc_medi ...@@ -175,7 +175,7 @@ libvlc_media_list_item_at_path( libvlc_media_list_t * p_mlist, const libvlc_medi
if( path[i+1] == -1 ) if( path[i+1] == -1 )
return p_md; return p_md;
p_current_mlist = libvlc_media_subitems( p_md, NULL ); p_current_mlist = libvlc_media_subitems( p_md );
libvlc_media_release( p_md ); libvlc_media_release( p_md );
if( !p_current_mlist ) if( !p_current_mlist )
...@@ -211,7 +211,7 @@ libvlc_media_list_parentlist_at_path( libvlc_media_list_t * p_mlist, const libvl ...@@ -211,7 +211,7 @@ libvlc_media_list_parentlist_at_path( libvlc_media_list_t * p_mlist, const libvl
p_md = libvlc_media_list_item_at_index( p_current_mlist, path[i], NULL ); p_md = libvlc_media_list_item_at_index( p_current_mlist, path[i], NULL );
p_current_mlist = libvlc_media_subitems( p_md, NULL ); p_current_mlist = libvlc_media_subitems( p_md );
libvlc_media_release( p_md ); libvlc_media_release( p_md );
if( !p_current_mlist ) if( !p_current_mlist )
...@@ -236,7 +236,7 @@ libvlc_media_list_sublist_at_path( libvlc_media_list_t * p_mlist, const libvlc_m ...@@ -236,7 +236,7 @@ libvlc_media_list_sublist_at_path( libvlc_media_list_t * p_mlist, const libvlc_m
if( !p_md ) if( !p_md )
return NULL; return NULL;
ret = libvlc_media_subitems( p_md, NULL ); ret = libvlc_media_subitems( p_md );
libvlc_media_release( p_md ); libvlc_media_release( p_md );
return ret; return ret;
......
...@@ -61,7 +61,7 @@ install_md_listener( libvlc_media_list_view_t * p_mlv, ...@@ -61,7 +61,7 @@ install_md_listener( libvlc_media_list_view_t * p_mlv,
libvlc_media_t * p_md) libvlc_media_t * p_md)
{ {
libvlc_media_list_t * p_mlist; libvlc_media_list_t * p_mlist;
if((p_mlist = libvlc_media_subitems( p_md, NULL ))) if((p_mlist = libvlc_media_subitems( p_md )))
{ {
libvlc_media_list_lock( p_mlist ); libvlc_media_list_lock( p_mlist );
int i, count = libvlc_media_list_count( p_mlist, NULL ); int i, count = libvlc_media_list_count( p_mlist, NULL );
...@@ -110,7 +110,7 @@ uninstall_md_listener( libvlc_media_list_view_t * p_mlv, ...@@ -110,7 +110,7 @@ uninstall_md_listener( libvlc_media_list_view_t * p_mlv,
media_list_subitem_added, p_mlv, &ignored_exception ); media_list_subitem_added, p_mlv, &ignored_exception );
if( libvlc_exception_raised( &ignored_exception ) ) if( libvlc_exception_raised( &ignored_exception ) )
libvlc_exception_clear( &ignored_exception ); /* We don't care if we encounter an exception */ libvlc_exception_clear( &ignored_exception ); /* We don't care if we encounter an exception */
if((p_mlist = libvlc_media_subitems( p_md, NULL ))) if((p_mlist = libvlc_media_subitems( p_md )))
{ {
libvlc_media_list_lock( p_mlist ); libvlc_media_list_lock( p_mlist );
libvlc_event_detach( p_mlist->p_event_manager, libvlc_event_detach( p_mlist->p_event_manager,
...@@ -160,7 +160,7 @@ media_list_subitem_added( const libvlc_event_t * p_event, void * p_user_data ) ...@@ -160,7 +160,7 @@ media_list_subitem_added( const libvlc_event_t * p_event, void * p_user_data )
libvlc_media_t * p_submd = p_event->u.media_subitem_added.new_child; libvlc_media_t * p_submd = p_event->u.media_subitem_added.new_child;
libvlc_media_t * p_md = p_event->p_obj; libvlc_media_t * p_md = p_event->p_obj;
if((p_mlist = libvlc_media_subitems( p_md, NULL ))) if((p_mlist = libvlc_media_subitems( p_md )))
{ {
/* We have a mlist to which we're going to listen to events /* We have a mlist to which we're going to listen to events
* thus, no need to wait for SubItemAdded events */ * thus, no need to wait for SubItemAdded events */
...@@ -449,7 +449,7 @@ libvlc_media_list_view_children_for_item( libvlc_media_list_view_t * p_mlv, ...@@ -449,7 +449,7 @@ libvlc_media_list_view_children_for_item( libvlc_media_list_view_t * p_mlv,
libvlc_media_list_t * p_mlist; libvlc_media_list_t * p_mlist;
libvlc_media_list_view_t * ret; libvlc_media_list_view_t * ret;
p_mlist = libvlc_media_subitems(p_md, p_e); p_mlist = libvlc_media_subitems(p_md);
if(!p_mlist) return NULL; if(!p_mlist) return NULL;
ret = p_mlv->pf_constructor( p_mlist, p_e ); ret = p_mlv->pf_constructor( p_mlist, p_e );
......
...@@ -166,7 +166,7 @@ input_seekable_changed( vlc_object_t * p_this, char const * psz_cmd, ...@@ -166,7 +166,7 @@ input_seekable_changed( vlc_object_t * p_this, char const * psz_cmd,
libvlc_media_player_t * p_mi = p_userdata; libvlc_media_player_t * p_mi = p_userdata;
libvlc_event_t event; libvlc_event_t event;
libvlc_media_set_state( p_mi->p_md, libvlc_NothingSpecial, NULL); libvlc_media_set_state( p_mi->p_md, libvlc_NothingSpecial );
event.type = libvlc_MediaPlayerSeekableChanged; event.type = libvlc_MediaPlayerSeekableChanged;
event.u.media_player_seekable_changed.new_seekable = newval.b_bool; event.u.media_player_seekable_changed.new_seekable = newval.b_bool;
...@@ -185,7 +185,7 @@ input_pausable_changed( vlc_object_t * p_this, char const * psz_cmd, ...@@ -185,7 +185,7 @@ input_pausable_changed( vlc_object_t * p_this, char const * psz_cmd,
libvlc_media_player_t * p_mi = p_userdata; libvlc_media_player_t * p_mi = p_userdata;
libvlc_event_t event; libvlc_event_t event;
libvlc_media_set_state( p_mi->p_md, libvlc_NothingSpecial, NULL); libvlc_media_set_state( p_mi->p_md, libvlc_NothingSpecial );
event.type = libvlc_MediaPlayerPausableChanged; event.type = libvlc_MediaPlayerPausableChanged;
event.u.media_player_pausable_changed.new_pausable = newval.b_bool; event.u.media_player_pausable_changed.new_pausable = newval.b_bool;
...@@ -240,7 +240,7 @@ input_event_changed( vlc_object_t * p_this, char const * psz_cmd, ...@@ -240,7 +240,7 @@ input_event_changed( vlc_object_t * p_this, char const * psz_cmd,
return VLC_SUCCESS; return VLC_SUCCESS;
} }
libvlc_media_set_state( p_mi->p_md, libvlc_state, NULL ); libvlc_media_set_state( p_mi->p_md, libvlc_state );
libvlc_event_send( p_mi->p_event_manager, &event ); libvlc_event_send( p_mi->p_event_manager, &event );
} }
else if( newval.i_int == INPUT_EVENT_ABORT ) else if( newval.i_int == INPUT_EVENT_ABORT )
...@@ -248,7 +248,7 @@ input_event_changed( vlc_object_t * p_this, char const * psz_cmd, ...@@ -248,7 +248,7 @@ input_event_changed( vlc_object_t * p_this, char const * psz_cmd,
libvlc_state_t libvlc_state = libvlc_Stopped; libvlc_state_t libvlc_state = libvlc_Stopped;
event.type = libvlc_MediaPlayerStopped; event.type = libvlc_MediaPlayerStopped;
libvlc_media_set_state( p_mi->p_md, libvlc_state, NULL ); libvlc_media_set_state( p_mi->p_md, libvlc_state );
libvlc_event_send( p_mi->p_event_manager, &event ); libvlc_event_send( p_mi->p_event_manager, &event );
} }
else if( newval.i_int == INPUT_EVENT_POSITION ) else if( newval.i_int == INPUT_EVENT_POSITION )
...@@ -486,7 +486,7 @@ void libvlc_media_player_set_media( ...@@ -486,7 +486,7 @@ void libvlc_media_player_set_media(
!p_mi->p_input_thread->b_error ); !p_mi->p_input_thread->b_error );
if( p_mi->p_md ) if( p_mi->p_md )
libvlc_media_set_state( p_mi->p_md, libvlc_NothingSpecial, p_e ); libvlc_media_set_state( p_mi->p_md, libvlc_NothingSpecial );
libvlc_media_release( p_mi->p_md ); libvlc_media_release( p_mi->p_md );
...@@ -659,7 +659,7 @@ void libvlc_media_player_stop( libvlc_media_player_t *p_mi, ...@@ -659,7 +659,7 @@ void libvlc_media_player_stop( libvlc_media_player_t *p_mi,
{ {
/* Send a stop notification event only if we are in playing, /* Send a stop notification event only if we are in playing,
* buffering or paused states */ * buffering or paused states */
libvlc_media_set_state( p_mi->p_md, libvlc_Stopped, p_e ); libvlc_media_set_state( p_mi->p_md, libvlc_Stopped );
/* Construct and send the event */ /* Construct and send the event */
libvlc_event_t event; libvlc_event_t event;
...@@ -1091,7 +1091,7 @@ libvlc_state_t libvlc_media_player_get_state( ...@@ -1091,7 +1091,7 @@ libvlc_state_t libvlc_media_player_get_state(
return state; return state;
} }
state = libvlc_media_get_state( p_mi->p_md, NULL ); state = libvlc_media_get_state( p_mi->p_md );
if( state == libvlc_Playing ) if( state == libvlc_Playing )
{ {
float caching; float caching;
......
...@@ -208,7 +208,7 @@ mediacontrol_start( mediacontrol_Instance *self, ...@@ -208,7 +208,7 @@ mediacontrol_start( mediacontrol_Instance *self,
{ {
/* A media was defined. Get its mrl to reuse it, but reset the options /* A media was defined. Get its mrl to reuse it, but reset the options
(because start-time may have been set on the previous invocation */ (because start-time may have been set on the previous invocation */
psz_name = libvlc_media_get_mrl( p_media, &ex ); psz_name = libvlc_media_get_mrl( p_media );
HANDLE_LIBVLC_EXCEPTION_VOID( &ex ); HANDLE_LIBVLC_EXCEPTION_VOID( &ex );
/* Create a new media */ /* Create a new media */
...@@ -224,7 +224,7 @@ mediacontrol_start( mediacontrol_Instance *self, ...@@ -224,7 +224,7 @@ mediacontrol_start( mediacontrol_Instance *self,
psz_from = ( char * )malloc( 20 * sizeof( char ) ); psz_from = ( char * )malloc( 20 * sizeof( char ) );
i_from = private_mediacontrol_position2microsecond( self->p_media_player, a_position ) / 1000000; i_from = private_mediacontrol_position2microsecond( self->p_media_player, a_position ) / 1000000;
snprintf( psz_from, 20, "start-time=%"PRId64, i_from ); snprintf( psz_from, 20, "start-time=%"PRId64, i_from );
libvlc_media_add_option( p_media, psz_from, &ex ); libvlc_media_add_option( p_media, psz_from );
HANDLE_LIBVLC_EXCEPTION_VOID( &ex ); HANDLE_LIBVLC_EXCEPTION_VOID( &ex );
} }
...@@ -315,7 +315,7 @@ mediacontrol_get_mrl( mediacontrol_Instance *self, ...@@ -315,7 +315,7 @@ mediacontrol_get_mrl( mediacontrol_Instance *self,
{ {
char * psz_mrl; char * psz_mrl;
psz_mrl = libvlc_media_get_mrl( p_media, &ex ); psz_mrl = libvlc_media_get_mrl( p_media );
HANDLE_LIBVLC_EXCEPTION_NULL( &ex ); HANDLE_LIBVLC_EXCEPTION_NULL( &ex );
return psz_mrl; return psz_mrl;
} }
...@@ -406,7 +406,7 @@ mediacontrol_get_stream_information( mediacontrol_Instance *self, ...@@ -406,7 +406,7 @@ mediacontrol_get_stream_information( mediacontrol_Instance *self,
break; break;
} }
retval->url = libvlc_media_get_mrl( p_media, &ex ); retval->url = libvlc_media_get_mrl( p_media );
retval->position = libvlc_media_player_get_time( self->p_media_player, &ex ); retval->position = libvlc_media_player_get_time( self->p_media_player, &ex );
if( libvlc_exception_raised( &ex ) ) if( libvlc_exception_raised( &ex ) )
......
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