X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bindings%2Fcil%2Fsrc%2Fmedia.cs;fp=bindings%2Fcil%2Fsrc%2Fmedia.cs;h=5c3b0cf24a5d4c2ef666b32624a8ed59b054b737;hb=60a842695c2a896fabc16dac503210a0f36f7a36;hp=a6ed833c7cd8ea5a7edc256e3d300bd9bb8ff64b;hpb=97bda2d0ab1e3d00aa00fe801531b0e1a570c57d;p=vlc diff --git a/bindings/cil/src/media.cs b/bindings/cil/src/media.cs index a6ed833c7c..5c3b0cf24a 100644 --- a/bindings/cil/src/media.cs +++ b/bindings/cil/src/media.cs @@ -42,6 +42,24 @@ namespace VideoLAN.LibVLC } }; + /** + * @brief State: media/player state + * + * Media and Player objects are always in one of these state. + * @see Media::State and @see Player::State. + */ + public enum State + { + NothingSpecial, /**< Nothing going on */ + Opening, /**< Being opened */ + Buffering, /**< Buffering before play */ + Playing, /**< Playing */ + Paused, /**< Paused */ + Stopped, /**< Stopped */ + Ended, /**< Played until the end */ + Error, /**< Failed */ + }; + /** * @brief Media: a source media * @ingroup API @@ -121,6 +139,19 @@ namespace VideoLAN.LibVLC return new Media (LibVLC.MediaDuplicate (Handle)); } + /** + * Current state of the media. + */ + public State State + { + get + { + State ret = LibVLC.MediaGetState (Handle, ex); + Raise (); + return ret; + } + } + /** * Duration of the media in microseconds. The precision of the result * depends on the input stram protocol and file format. The value