From 708049c3a8e43fd04f75b9befbe30e9855693179 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sat, 21 Feb 2009 15:55:36 +0200 Subject: [PATCH] Fix documentation --- bindings/cil/src/exception.cs | 7 ++----- bindings/cil/src/instance.cs | 3 +++ bindings/cil/src/marshal.cs | 7 +++++++ bindings/cil/src/media.cs | 19 ++++++++++++++++++- bindings/cil/src/player.cs | 1 + 5 files changed, 31 insertions(+), 6 deletions(-) diff --git a/bindings/cil/src/exception.cs b/bindings/cil/src/exception.cs index cc1d7742b9..9a9ce5a2ba 100644 --- a/bindings/cil/src/exception.cs +++ b/bindings/cil/src/exception.cs @@ -60,11 +60,8 @@ namespace VideoLAN.LibVLC }; /** - * @section Internals - */ - - /** - * libvlc_exception_t: structure for unmanaged LibVLC exceptions + * @brief NativeException: CIL representation for libvlc_exception_t. + * @ingroup Internals */ [StructLayout (LayoutKind.Sequential)] public sealed class NativeException : IDisposable diff --git a/bindings/cil/src/instance.cs b/bindings/cil/src/instance.cs index 1641613705..6970082ba7 100644 --- a/bindings/cil/src/instance.cs +++ b/bindings/cil/src/instance.cs @@ -36,6 +36,9 @@ namespace VideoLAN.LibVLC */ internal sealed class InstanceHandle : NonNullHandle { + /** + * NonNullHandle.Destroy + */ protected override void Destroy () { LibVLC.Release (handle, null); diff --git a/bindings/cil/src/marshal.cs b/bindings/cil/src/marshal.cs index b68059bfb4..9d37394900 100644 --- a/bindings/cil/src/marshal.cs +++ b/bindings/cil/src/marshal.cs @@ -50,6 +50,9 @@ namespace VideoLAN.LibVLC } } + /** + * Destroys an handle. Cannot fail. + */ protected abstract void Destroy (); /** @@ -80,6 +83,10 @@ namespace VideoLAN.LibVLC this.handle = null; } + /** + * Checks if the LibVLC run-time raised an exception + * If so, raises a CIL exception. + */ protected void Raise () { ex.Raise (); diff --git a/bindings/cil/src/media.cs b/bindings/cil/src/media.cs index f5415f561e..3a001b4324 100644 --- a/bindings/cil/src/media.cs +++ b/bindings/cil/src/media.cs @@ -33,6 +33,9 @@ namespace VideoLAN.LibVLC */ internal sealed class MediaHandle : NonNullHandle { + /** + * NonNullHandle.Destroy + */ protected override void Destroy () { LibVLC.MediaRelease (handle); @@ -41,7 +44,8 @@ namespace VideoLAN.LibVLC /** * @brief Media: a source media - * Use this class to extract meta-informations from a media. + * @ingroup API + * Each media object represents an input media, such as a file or an URL. */ public class Media : BaseObject { @@ -67,6 +71,19 @@ namespace VideoLAN.LibVLC Raise (); } + /** + * Add VLC input item options to the media. + * @param options VLC options in VLC input item format + * (see example below) + * @param trusted whether the options are set by a trusted agent + * (e.g. the local computer configuration) or not + * (e.g. a downloaded file). + * @code + * Media m = new Media(vlc, "http://www.example.com/music.ogg"); + * m.AddOptions(":http-user-agent=LibVLC.Net " + * + ":http-proxy=proxy:8080", true); + * @endcode + */ public void AddOptions (string options, bool trusted) { U8String uopts = new U8String (options); diff --git a/bindings/cil/src/player.cs b/bindings/cil/src/player.cs index db96bae449..ce1d3255a2 100644 --- a/bindings/cil/src/player.cs +++ b/bindings/cil/src/player.cs @@ -68,6 +68,7 @@ namespace VideoLAN.LibVLC /** * @brief MediaPlayer: a simple media player + * @ingroup API * Use this class to play a media. */ public class MediaPlayer : BaseObject -- 2.39.2