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

Add libvlc_media_add_option_untrusted()

Based on 059a3399 by Laurent Aimar
parent dc12c9b3
...@@ -265,6 +265,24 @@ VLC_PUBLIC_API void libvlc_media_add_option( ...@@ -265,6 +265,24 @@ 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 ); libvlc_exception_t * p_e );
/**
* Add an option to the media from an untrusted source.
*
* This option will be used to determine how the media_player will
* read the media. This allows to use VLC's advanced
* reading/streaming options on a per-media basis.
*
* The options are detailed in vlc --long-help, for instance "--sout-all"
*
* \param p_instance the instance
* \param ppsz_options the options (as a string)
* \param p_e an initialized exception pointer
*/
VLC_PUBLIC_API void libvlc_media_add_option_untrusted(
libvlc_media_t * p_md,
const char * ppsz_options,
libvlc_exception_t * p_e );
/** /**
* Retain a reference to a media descriptor object (libvlc_media_t). Use * Retain a reference to a media descriptor object (libvlc_media_t). Use
......
...@@ -350,6 +350,20 @@ void libvlc_media_add_option( ...@@ -350,6 +350,20 @@ void libvlc_media_add_option(
VLC_INPUT_OPTION_UNIQUE|VLC_INPUT_OPTION_TRUSTED ); VLC_INPUT_OPTION_UNIQUE|VLC_INPUT_OPTION_TRUSTED );
} }
/**************************************************************************
* Same as libvlc_media_add_option but with untrusted source.
**************************************************************************/
void libvlc_media_add_option_untrusted(
libvlc_media_t * p_md,
const char * ppsz_option,
libvlc_exception_t *p_e )
{
VLC_UNUSED(p_e);
input_item_AddOpt( p_md->p_input_item, ppsz_option,
VLC_INPUT_OPTION_UNIQUE );
}
/************************************************************************** /**************************************************************************
* Delete a media descriptor object * Delete a media descriptor object
**************************************************************************/ **************************************************************************/
......
...@@ -37,6 +37,7 @@ libvlc_log_iterator_has_next ...@@ -37,6 +37,7 @@ libvlc_log_iterator_has_next
libvlc_log_iterator_next libvlc_log_iterator_next
libvlc_log_open libvlc_log_open
libvlc_media_add_option libvlc_media_add_option
libvlc_media_add_option_untrusted
libvlc_media_discoverer_event_manager libvlc_media_discoverer_event_manager
libvlc_media_discoverer_is_running libvlc_media_discoverer_is_running
libvlc_media_discoverer_localized_name libvlc_media_discoverer_localized_name
......
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