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

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

#include <kore3/global.h>
#include <kore3/backend/video.h>
#include <kore3/gpu/texture.h>

Go to the source code of this file.

Data Structures

struct  kore_video

Typedefs

typedef struct kore_video kore_video

Functions

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_init (kore_video *video, const char *filename)
 Prepares a video object based on an encoded video-file.
KORE_FUNC void kore_video_destroy (kore_video *video)
 Destroys a video object.
KORE_FUNC void kore_video_play (kore_video *video, bool loop)
 Starts playing a video.
KORE_FUNC void kore_video_pause (kore_video *video)
 Pauses a video.
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 int kore_video_width (kore_video *video)
 Gets the width of the video in pixels.
KORE_FUNC int kore_video_height (kore_video *video)
 Gets the height of the video in pixels.
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 double kore_video_duration (kore_video *video)
 Gets the duration of the video in seconds.
KORE_FUNC double kore_video_position (kore_video *video)
 Returns the current playback-position of the video in seconds.
KORE_FUNC bool kore_video_finished (kore_video *video)
 Returns whether the video reached its end.
KORE_FUNC bool kore_video_paused (kore_video *video)
 Returns whether the video is currently paused.
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 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

◆ kore_video_current_image()

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.

Returns
The current image of a playing video

◆ kore_video_duration()

KORE_FUNC double kore_video_duration ( kore_video * video)

Gets the duration of the video in seconds.

Returns
The duration of the video in seconds

◆ kore_video_finished()

KORE_FUNC bool kore_video_finished ( kore_video * video)

Returns whether the video reached its end.

Returns
the end-state of the video

◆ kore_video_formats()

KORE_FUNC const char ** kore_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

◆ kore_video_height()

KORE_FUNC int kore_video_height ( kore_video * video)

Gets the height of the video in pixels.

Returns
The height of the video in pixels

◆ kore_video_paused()

KORE_FUNC bool kore_video_paused ( kore_video * video)

Returns whether the video is currently paused.

Returns
The current pause state of the video

◆ kore_video_position()

KORE_FUNC double kore_video_position ( kore_video * video)

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

Returns
The current playback-position in seconds

◆ kore_video_width()

KORE_FUNC int kore_video_width ( kore_video * video)

Gets the width of the video in pixels.

Returns
The width of the video in pixels