Kore
Loading...
Searching...
No Matches
video.h File Reference

Hardware-assisted video decoding support. Actually supported formats vary per target-system. More...

#include <kinc/global.h>
#include <kinc/backend/video.h>
#include <kinc/graphics4/texture.h>

Go to the source code of this file.

Data Structures

struct  kinc_video

Typedefs

typedef struct kinc_video kinc_video_t

Functions

KINC_FUNC const char ** kinc_video_formats (void)
 Returns the list of video formats which are supported on the current system.
KINC_FUNC void kinc_video_init (kinc_video_t *video, const char *filename)
 Prepares a video object based on an encoded video-file.
KINC_FUNC void kinc_video_destroy (kinc_video_t *video)
 Destroys a video object.
KINC_FUNC void kinc_video_play (kinc_video_t *video, bool loop)
 Starts playing a video.
KINC_FUNC void kinc_video_pause (kinc_video_t *video)
 Pauses a video.
KINC_FUNC void kinc_video_stop (kinc_video_t *video)
 Stops a video which is equivalent to pausing it and setting the position to 0.
KINC_FUNC int kinc_video_width (kinc_video_t *video)
 Gets the width of the video in pixels.
KINC_FUNC int kinc_video_height (kinc_video_t *video)
 Gets the height of the video in pixels.
KINC_FUNC kinc_g4_texture_t * kinc_video_current_image (kinc_video_t *video)
 Gets the current image of a playing video which can be rendered using any of Kinc's graphics APIs.
KINC_FUNC double kinc_video_duration (kinc_video_t *video)
 Gets the duration of the video in seconds.
KINC_FUNC double kinc_video_position (kinc_video_t *video)
 Returns the current playback-position of the video in seconds.
KINC_FUNC bool kinc_video_finished (kinc_video_t *video)
 Returns whether the video reached its end.
KINC_FUNC bool kinc_video_paused (kinc_video_t *video)
 Returns whether the video is currently paused.
KINC_FUNC void kinc_video_update (kinc_video_t *video, double time)
 Call this every frame to update the video. This is not required on all targets but where it's not required the function just does nothing - so please call it.

Detailed Description

Hardware-assisted video decoding support. Actually supported formats vary per target-system.

Function Documentation

◆ kinc_video_current_image()

KINC_FUNC kinc_g4_texture_t * kinc_video_current_image ( kinc_video_t * video)

Gets the current image of a playing video which can be rendered using any of Kinc's graphics APIs.

Returns
The current image of a playing video

◆ kinc_video_duration()

KINC_FUNC double kinc_video_duration ( kinc_video_t * video)

Gets the duration of the video in seconds.

Returns
The duration of the video in seconds

◆ kinc_video_finished()

KINC_FUNC bool kinc_video_finished ( kinc_video_t * video)

Returns whether the video reached its end.

Returns
the end-state of the video

◆ kinc_video_formats()

KINC_FUNC const char ** kinc_video_formats ( void )

Returns the list of video formats which are supported on the current system.

Returns
A NULL-terminated list of strings representing the supported video-formats

◆ kinc_video_height()

KINC_FUNC int kinc_video_height ( kinc_video_t * video)

Gets the height of the video in pixels.

Returns
The height of the video in pixels

◆ kinc_video_paused()

KINC_FUNC bool kinc_video_paused ( kinc_video_t * video)

Returns whether the video is currently paused.

Returns
The current pause state of the video

◆ kinc_video_position()

KINC_FUNC double kinc_video_position ( kinc_video_t * video)

Returns the current playback-position of the video in seconds.

Returns
The current playback-position in seconds

◆ kinc_video_width()

KINC_FUNC int kinc_video_width ( kinc_video_t * video)

Gets the width of the video in pixels.

Returns
The width of the video in pixels