feat: step to adjacent decoded video frames

This commit is contained in:
2026-10-10 17:49:04 +02:00
parent 310be5aa61
commit a99b0c1168
6 changed files with 311 additions and 29 deletions
+4 -1
View File
@@ -17,7 +17,7 @@ typedef struct PlayerState {
double duration;
bool has_audio;
bool has_video;
// True from accepted seek until all queued seeks on this timeline finish.
// True until all accepted seeks/frame steps on this timeline finish.
bool seek_pending;
// Display width / height, including sample aspect ratio; zero without video.
double video_aspect_ratio;
@@ -32,6 +32,9 @@ bool player_open(Player *player, const char *path);
bool player_play(Player *player);
bool player_pause(Player *player);
bool player_seek(Player *player, double seconds);
// Direction must be -1 (previous) or +1 (next). Requires ready video media.
// Pauses playback and selects the adjacent decoded presentation frame.
bool player_step_frame(Player *player, int direction);
bool player_close(Player *player);
// Synchronous, thread-safe gain; survives open, seek, and close. Zero mutes.
// Rejects null handles and non-finite/out-of-range values without changing gain.