diff --git a/Vocaluxe/Lib/Video/IVideoDecoder.cs b/Vocaluxe/Lib/Video/IVideoDecoder.cs index 6c48a24e..cf17f822 100644 --- a/Vocaluxe/Lib/Video/IVideoDecoder.cs +++ b/Vocaluxe/Lib/Video/IVideoDecoder.cs @@ -23,31 +23,94 @@ namespace Vocaluxe.Lib.Video { interface IVideoDecoder { + /// + /// Initializes videodecoder. Got to be called before usage + /// + /// True on success, false if something went wrong. bool Init(); + + /// + /// Close all video streams + /// void CloseAll(); + /// + /// Loads the file with the given file path. + /// + /// Absolute file path of the video file + /// StreamID >=0 on success or -1 on failure int Load(string videoFileName); + + /// + /// Closes the stream with the given ID + /// + /// ID of the stream + /// true if stream was closed, false if stream doesn't exist or already closed bool Close(int streamID); + + /// + /// Gets the number of streams currently active + /// + /// int GetNumStreams(); + /// + /// Gets the length of the video in s + /// + /// Id of the stream + /// Length of the video in s float GetLength(int streamID); /// + /// Gets a frame of the video and sets the current video time /// - /// - /// - /// - /// - /// True if frame is valid + /// Id of the stream + /// Reference to already initialized video texture (from previous calls). If null, one will be created.
+ /// Returns the current video frame which might be outdated if time != current (internal) video position or unchanged (even null) if none is available. + /// The position in s of the video you want to get a frame of. If != current (internal) video position, it will seek to get to right position.
+ /// Note:Will be ignored for looped playback! + /// The actual position in s of the returned frame. Should be ~ time+VideoGap + /// True if frame is valid, false: frame and videoTime might be unchanged or invalid bool GetFrame(int streamID, ref CTexture frame, float time, out float videoTime); + /// + /// Seeks to given position + /// + /// Id of the stream + /// Position to seek to + /// New video gap -> Actual position will be start+gap + /// True on success bool Skip(int streamID, float start, float gap); + + /// + /// Set if the video should be looped + /// + /// Id of the stream + /// True if it should be looped void SetLoop(int streamID, bool loop); + + /// + /// Pauses the video (no new frames will be decoded) + /// + /// Id of the stream void Pause(int streamID); + + /// + /// Resumes a paused video + /// + /// Id of the stream void Resume(int streamID); + /// + /// Check if the given video is finished + /// + /// Id of the stream + /// True if all frames are shown bool Finished(int streamID); + /// + /// Do a step of the decoder in unthreaded decoders. Should be called once every frame. + /// void Update(); } } \ No newline at end of file