[vlc-devel] commit: Add libvlc_media_add_option_untrusted() ( Rémi Denis-Courmont )
git version control
git at videolan.org
Wed Feb 4 17:00:52 CET 2009
vlc | branch: 0.9-bugfix | Rémi Denis-Courmont <rdenis at simphalempin.com> | Wed Feb 4 17:33:50 2009 +0200| [918d00864fd730dcf5b41ef30635cc838f0ce502] | committer: Rémi Denis-Courmont
Add libvlc_media_add_option_untrusted()
Based on 059a3399daacd4532299d04cb2dd1a472cc25a83 by Laurent Aimar
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=918d00864fd730dcf5b41ef30635cc838f0ce502
---
include/vlc/libvlc.h | 18 ++++++++++++++++++
src/control/media.c | 14 ++++++++++++++
src/libvlc.sym | 1 +
3 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/include/vlc/libvlc.h b/include/vlc/libvlc.h
index 7f2f384..f262fb9 100644
--- a/include/vlc/libvlc.h
+++ b/include/vlc/libvlc.h
@@ -265,6 +265,24 @@ VLC_PUBLIC_API void libvlc_media_add_option(
libvlc_media_t * p_md,
const char * ppsz_options,
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
diff --git a/src/control/media.c b/src/control/media.c
index 0192227..b079aa8 100644
--- a/src/control/media.c
+++ b/src/control/media.c
@@ -351,6 +351,20 @@ void libvlc_media_add_option(
}
/**************************************************************************
+ * 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
**************************************************************************/
void libvlc_media_release( libvlc_media_t *p_md )
diff --git a/src/libvlc.sym b/src/libvlc.sym
index ce03edd..c5f0f42 100644
--- a/src/libvlc.sym
+++ b/src/libvlc.sym
@@ -37,6 +37,7 @@ libvlc_log_iterator_has_next
libvlc_log_iterator_next
libvlc_log_open
libvlc_media_add_option
+libvlc_media_add_option_untrusted
libvlc_media_discoverer_event_manager
libvlc_media_discoverer_is_running
libvlc_media_discoverer_localized_name
More information about the vlc-devel
mailing list