}
};
+ /**
+ * @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
{
get
{
- MemoryHandle str = LibVLC.MediaGetMRL (Handle, ex);
+ StringHandle str = LibVLC.MediaGetMRL (Handle, ex);
Raise ();
return str.Transform ();
}
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
- * might be incorrect and unknown (VLC usually returns 0 then).
+ * might be incorrect and unknown (VLC usually returns 0 or -1 then).
*/
public long Duration
{