#include "cl_cinematic_ogm.h"
#include "cl_cinematic.h"
#include "../renderer/r_draw.h"
#include "../sound/s_main.h"
#include "../sound/s_music.h"
#include <ogg/ogg.h>
#include <vorbis/codec.h>
Go to the source code of this file.
Data Structures | |
struct | yuvTable_t |
struct | ogmCinematic_t |
Defines | |
#define | OGG_BUFFER_SIZE (8 * 1024) |
#define | OGMCIN (*((ogmCinematic_t*)cin->codecData)) |
#define | OGM_CINEMATIC_BPP 4 |
#define | SIZEOF_RAWBUFF SAMPLE_SIZE * 4048 |
Functions | |
static int | CIN_OGM_LoadBlockToSync (cinematic_t *cin) |
static int | CIN_OGM_LoadPagesToStream (cinematic_t *cin) |
static qboolean | CIN_OGM_LoadAudioFrame (cinematic_t *cin) |
static int | CIN_OGM_LoadVideoFrame (cinematic_t *cin) |
static qboolean | CIN_OGM_LoadFrame (cinematic_t *cin) |
int | CIN_OGM_PlayCinematic (cinematic_t *cin, const char *filename) |
static void | CIN_OGM_DrawCinematic (cinematic_t *cin) |
qboolean | CIN_OGM_RunCinematic (cinematic_t *cin) |
void | CIN_OGM_StopCinematic (cinematic_t *cin) |
void | CIN_OGM_Init (void) |
Variables | |
static yuvTable_t | ogmCin_yuvTable |
static byte | rawBuffer [SIZEOF_RAWBUFF] |
Definition in file cl_cinematic_ogm.c.
#define OGG_BUFFER_SIZE (8 * 1024) |
Definition at line 39 of file cl_cinematic_ogm.c.
Referenced by CIN_OGM_LoadBlockToSync().
#define OGM_CINEMATIC_BPP 4 |
Definition at line 85 of file cl_cinematic_ogm.c.
#define OGMCIN (*((ogmCinematic_t*)cin->codecData)) |
Definition at line 83 of file cl_cinematic_ogm.c.
Referenced by CIN_OGM_DrawCinematic(), CIN_OGM_LoadAudioFrame(), CIN_OGM_LoadBlockToSync(), CIN_OGM_LoadFrame(), CIN_OGM_LoadPagesToStream(), CIN_OGM_LoadVideoFrame(), CIN_OGM_PlayCinematic(), CIN_OGM_RunCinematic(), and CIN_OGM_StopCinematic().
#define SIZEOF_RAWBUFF SAMPLE_SIZE * 4048 |
Definition at line 220 of file cl_cinematic_ogm.c.
static void CIN_OGM_DrawCinematic | ( | cinematic_t * | cin | ) | [static] |
Definition at line 730 of file cl_cinematic_ogm.c.
References CIN_STATUS_NONE, cinematic_s::h, OGMCIN, R_DrawTexture(), R_UploadData(), cinematic_s::status, cinematic_s::w, cinematic_s::x, and cinematic_s::y.
Referenced by CIN_OGM_RunCinematic().
void CIN_OGM_Init | ( | void | ) |
Definition at line 794 of file cl_cinematic_ogm.c.
References f, long(), yuvTable_t::ub, yuvTable_t::ug, yuvTable_t::vg, yuvTable_t::vr, and yuvTable_t::yy.
Referenced by CIN_Init().
static qboolean CIN_OGM_LoadAudioFrame | ( | cinematic_t * | cin | ) | [static] |
Definition at line 226 of file cl_cinematic_ogm.c.
References f, i, int(), left, M_AddToSampleBuffer(), cinematic_s::noSound, OGMCIN, and right.
Referenced by CIN_OGM_LoadFrame().
static int CIN_OGM_LoadBlockToSync | ( | cinematic_t * | cin | ) | [static] |
Definition at line 170 of file cl_cinematic_ogm.c.
References FS_Read(), OGG_BUFFER_SIZE, and OGMCIN.
Referenced by CIN_OGM_LoadFrame(), and CIN_OGM_PlayCinematic().
static qboolean CIN_OGM_LoadFrame | ( | cinematic_t * | cin | ) | [static] |
Definition at line 487 of file cl_cinematic_ogm.c.
References CIN_OGM_LoadAudioFrame(), CIN_OGM_LoadBlockToSync(), CIN_OGM_LoadPagesToStream(), CIN_OGM_LoadVideoFrame(), OGMCIN, qfalse, and qtrue.
Referenced by CIN_OGM_RunCinematic().
static int CIN_OGM_LoadPagesToStream | ( | cinematic_t * | cin | ) | [static] |
Definition at line 188 of file cl_cinematic_ogm.c.
References OGMCIN.
Referenced by CIN_OGM_LoadFrame(), and CIN_OGM_PlayCinematic().
static int CIN_OGM_LoadVideoFrame | ( | cinematic_t * | cin | ) | [static] |
Definition at line 462 of file cl_cinematic_ogm.c.
References OGMCIN.
Referenced by CIN_OGM_LoadFrame().
int CIN_OGM_PlayCinematic | ( | cinematic_t * | cin, | |
const char * | filename | |||
) |
vorbis/theora-header & init in sub-functions
"clean" error-returns ...
Definition at line 563 of file cl_cinematic_ogm.c.
References CIN_OGM_LoadBlockToSync(), CIN_OGM_LoadPagesToStream(), CIN_OGM_StopCinematic(), CINEMATIC_TYPE_OGM, cinematic_s::cinematicType, CL_Milliseconds(), cinematic_s::codecData, Com_Printf(), FILE_READ, FS_OpenFile(), M_PlayMusicStream(), Mem_PoolAlloc, OGMCIN, qtrue, and vid_genericPool.
Referenced by CIN_PlayCinematic().
qboolean CIN_OGM_RunCinematic | ( | cinematic_t * | cin | ) |
Definition at line 745 of file cl_cinematic_ogm.c.
References CIN_OGM_DrawCinematic(), CIN_OGM_LoadFrame(), CL_Milliseconds(), OGMCIN, qfalse, and qtrue.
Referenced by CIN_RunCinematic().
void CIN_OGM_StopCinematic | ( | cinematic_t * | cin | ) |
Definition at line 759 of file cl_cinematic_ogm.c.
References cinematic_s::codecData, FS_CloseFile(), M_StopMusicStream(), Mem_Free, and OGMCIN.
Referenced by CIN_OGM_PlayCinematic(), and CIN_StopCinematic().
yuvTable_t ogmCin_yuvTable [static] |
Definition at line 81 of file cl_cinematic_ogm.c.
Definition at line 221 of file cl_cinematic_ogm.c.