Kore 3
Loading...
Searching...
No Matches
video.h
Go to the documentation of this file.
1#ifndef KORE_VIDEO_HEADER
2#define KORE_VIDEO_HEADER
3
4#include <kore3/global.h>
5
6#include <kore3/backend/video.h>
7#include <kore3/gpu/texture.h>
8
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18typedef struct kore_video {
19 kore_video_impl impl;
21
26KORE_FUNC const char **kore_video_formats(void);
27
31KORE_FUNC void kore_video_init(kore_video *video, const char *filename);
32
36KORE_FUNC void kore_video_destroy(kore_video *video);
37
41KORE_FUNC void kore_video_play(kore_video *video, bool loop);
42
46KORE_FUNC void kore_video_pause(kore_video *video);
47
51KORE_FUNC void kore_video_stop(kore_video *video);
52
57KORE_FUNC int kore_video_width(kore_video *video);
58
63KORE_FUNC int kore_video_height(kore_video *video);
64
70
75KORE_FUNC double kore_video_duration(kore_video *video);
76
81KORE_FUNC double kore_video_position(kore_video *video);
82
87KORE_FUNC bool kore_video_finished(kore_video *video);
88
93KORE_FUNC bool kore_video_paused(kore_video *video);
94
99KORE_FUNC void kore_video_update(kore_video *video, double time);
100
101#ifdef __cplusplus
102}
103#endif
104
105#endif
Provides basic functionality that's used all over the place. There's usually no need to manually incl...
Definition texture.h:37
Definition video.h:18
Provides functions for handling textures.
KORE_FUNC kore_gpu_texture * kore_video_current_image(kore_video *video)
Gets the current image of a playing video which can be rendered using Kore's GPU API.
KORE_FUNC int kore_video_width(kore_video *video)
Gets the width of the video in pixels.
KORE_FUNC bool kore_video_finished(kore_video *video)
Returns whether the video reached its end.
KORE_FUNC double kore_video_position(kore_video *video)
Returns the current playback-position of the video in seconds.
KORE_FUNC void kore_video_pause(kore_video *video)
Pauses a video.
KORE_FUNC void kore_video_play(kore_video *video, bool loop)
Starts playing a video.
KORE_FUNC double kore_video_duration(kore_video *video)
Gets the duration of the video in seconds.
KORE_FUNC void kore_video_update(kore_video *video, double time)
Call this every frame to update the video. This is not required on all targets but where it's not req...
KORE_FUNC bool kore_video_paused(kore_video *video)
Returns whether the video is currently paused.
KORE_FUNC int kore_video_height(kore_video *video)
Gets the height of the video in pixels.
KORE_FUNC const char ** kore_video_formats(void)
Returns the list of video formats which are supported on the current system.
KORE_FUNC void kore_video_destroy(kore_video *video)
Destroys a video object.
KORE_FUNC void kore_video_stop(kore_video *video)
Stops a video which is equivalent to pausing it and setting the position to 0.
KORE_FUNC void kore_video_init(kore_video *video, const char *filename)
Prepares a video object based on an encoded video-file.