mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-06 20:30:36 +08:00
This intentionally will not build without --enable-ffmpeg for now. We add new functions to the RenderAPI called AVI_Think and AVI_SetParm. Game developer is supposed to call AVI_Think each frame and set video playback parameters through AVI_SetParm function. What's tested: * Intro cinematics. * Looping videos. * Playing back an hour long video. * API extension (PrimeXT's avi branch at https://github.com/a1batross/PrimeXT). What's broken: * There is no way to seek a video file, only rewind to the start.
41 lines
1.6 KiB
C
41 lines
1.6 KiB
C
/*
|
|
avi.h -- common avi support header
|
|
Copyright (C) 2018 a1batross, Uncle Mike
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
*/
|
|
#ifndef AVI_H
|
|
#define AVI_H
|
|
|
|
//
|
|
// avikit.c
|
|
//
|
|
typedef struct movie_state_s movie_state_t;
|
|
int AVI_GetVideoFrameNumber( movie_state_t *Avi, float time );
|
|
byte *AVI_GetVideoFrame( movie_state_t *Avi, int frame );
|
|
qboolean AVI_GetVideoInfo( movie_state_t *Avi, int *xres, int *yres, float *duration );
|
|
qboolean AVI_GetAudioInfo( movie_state_t *Avi, wavdata_t *snd_info );
|
|
int AVI_GetAudioChunk( movie_state_t *Avi, char *audiodata, int offset, int length );
|
|
void AVI_OpenVideo( movie_state_t *Avi, const char *filename, qboolean load_audio, int quiet );
|
|
movie_state_t *AVI_LoadVideo( const char *filename, qboolean load_audio );
|
|
int AVI_TimeToSoundPosition( movie_state_t *Avi, int time );
|
|
void AVI_CloseVideo( movie_state_t *Avi );
|
|
qboolean AVI_IsActive( movie_state_t *Avi );
|
|
void AVI_FreeVideo( movie_state_t *Avi );
|
|
movie_state_t *AVI_GetState( int num );
|
|
qboolean AVI_Initailize( void );
|
|
void AVI_Shutdown( void );
|
|
|
|
qboolean AVI_SetParm( movie_state_t *Avi, enum movie_parms_e parm, ... );
|
|
qboolean AVI_Think( movie_state_t *Avi );
|
|
|
|
#endif // AVI_H
|