Kore
Loading...
Searching...
No Matches
video.h
Go to the documentation of this file.
1#pragma once
2
3#include <kinc/global.h>
4
5#include <kinc/backend/video.h>
7
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17typedef struct kinc_video {
18 kinc_video_impl_t impl;
19} kinc_video_t;
20
25KINC_FUNC const char **kinc_video_formats(void);
26
30KINC_FUNC void kinc_video_init(kinc_video_t *video, const char *filename);
31
35KINC_FUNC void kinc_video_destroy(kinc_video_t *video);
36
40KINC_FUNC void kinc_video_play(kinc_video_t *video, bool loop);
41
45KINC_FUNC void kinc_video_pause(kinc_video_t *video);
46
50KINC_FUNC void kinc_video_stop(kinc_video_t *video);
51
56KINC_FUNC int kinc_video_width(kinc_video_t *video);
57
62KINC_FUNC int kinc_video_height(kinc_video_t *video);
63
68KINC_FUNC kinc_g4_texture_t *kinc_video_current_image(kinc_video_t *video);
69
74KINC_FUNC double kinc_video_duration(kinc_video_t *video);
75
80KINC_FUNC double kinc_video_position(kinc_video_t *video);
81
86KINC_FUNC bool kinc_video_finished(kinc_video_t *video);
87
92KINC_FUNC bool kinc_video_paused(kinc_video_t *video);
93
98KINC_FUNC void kinc_video_update(kinc_video_t *video, double time);
99
100#ifdef __cplusplus
101}
102#endif
Provides basic functionality that's used all over the place. There's usually no need to manually incl...
Provides functions for handling textures.
Definition video.h:17
KINC_FUNC void kinc_video_destroy(kinc_video_t *video)
Destroys a video object.
KINC_FUNC void kinc_video_pause(kinc_video_t *video)
Pauses a video.
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 int kinc_video_height(kinc_video_t *video)
Gets the height of the video in pixels.
KINC_FUNC void kinc_video_play(kinc_video_t *video, bool loop)
Starts playing a video.
KINC_FUNC bool kinc_video_paused(kinc_video_t *video)
Returns whether the video is currently paused.
KINC_FUNC bool kinc_video_finished(kinc_video_t *video)
Returns whether the video reached its end.
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 void kinc_video_init(kinc_video_t *video, const char *filename)
Prepares a video object based on an encoded video-file.
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_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 req...
KINC_FUNC int kinc_video_width(kinc_video_t *video)
Gets the width of the video in pixels.
KINC_FUNC double kinc_video_position(kinc_video_t *video)
Returns the current playback-position of the video in seconds.