Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Enumerations | Functions | Variables
recorder Namespace Reference

Classes

struct  soundbuffer
 
struct  videobuffer
 

Enumerations

enum  { REC_OK = 0, REC_USERHALT, REC_TOOSLOW, REC_FILERROR }
 
enum  { MAXSOUNDBUFFERS = 128 }
 
enum  { MAXVIDEOBUFFERS = 2 }
 

Functions

bool isrecording ()
 
float calcquality ()
 
int gettime ()
 
int videoencoder (void *data)
 
void soundencoder (void *udata, Uint8 *stream, int len)
 
void start (const char *filename, int videofps, int videow, int videoh, bool sound)
 
void cleanup ()
 
void stop ()
 
void readbuffer (videobuffer &m, uint nextframe)
 
bool readbuffer ()
 
void drawhud ()
 
void capture (bool overlay)
 

Variables

static enum recorder:: { ... }  state = REC_OK
 
static aviwriterfile = nullptr
 
static int starttime = 0
 
static int stats [1000]
 
static int statsindex = 0
 
static uint dps = 0
 
static queue< soundbuffer,
MAXSOUNDBUFFERS
soundbuffers
 
static SDL_mutex * soundlock = nullptr
 
static queue< videobuffer,
MAXVIDEOBUFFERS
videobuffers
 
static uint lastframe = ~0U
 
static GLuint scalefb = 0
 
static GLuint scaletex [2] = { 0, 0 }
 
static uint scalew = 0
 
static uint scaleh = 0
 
static GLuint encodefb = 0
 
static GLuint encoderb = 0
 
static SDL_Thread * thread = nullptr
 
static SDL_mutex * videolock = nullptr
 
static SDL_cond * shouldencode = nullptr
 
static SDL_cond * shouldread = nullptr
 

Enumeration Type Documentation

anonymous enum
Enumerator
REC_OK 
REC_USERHALT 
REC_TOOSLOW 
REC_FILERROR 
anonymous enum
Enumerator
MAXSOUNDBUFFERS 
anonymous enum
Enumerator
MAXVIDEOBUFFERS 

Function Documentation

float recorder::calcquality ( )

References dps, file, and aviwriter::videofps.

Referenced by drawhud(), and videoencoder().

void recorder::capture ( bool  overlay)
void recorder::cleanup ( )
void recorder::drawhud ( )
int recorder::gettime ( )
bool recorder::isrecording ( )

References file.

Referenced by movie().

void recorder::readbuffer ( videobuffer &  m,
uint  nextframe 
)
bool recorder::readbuffer ( )
void recorder::soundencoder ( void udata,
Uint8 *  stream,
int  len 
)
void recorder::start ( const char *  filename,
int  videofps,
int  videow,
int  videoh,
bool  sound 
)
void recorder::stop ( )
int recorder::videoencoder ( void data)

Variable Documentation

uint recorder::dps = 0
static

Referenced by calcquality(), start(), and videoencoder().

GLuint recorder::encodefb = 0
static

Referenced by cleanup(), and readbuffer().

GLuint recorder::encoderb = 0
static

Referenced by cleanup(), and readbuffer().

aviwriter* recorder::file = nullptr
static
uint recorder::lastframe = ~0U
static

Referenced by readbuffer(), and start().

GLuint recorder::scalefb = 0
static

Referenced by cleanup(), and readbuffer().

uint recorder::scaleh = 0
static

Referenced by cleanup(), and readbuffer().

GLuint recorder::scaletex[2] = { 0, 0 }
static

Referenced by cleanup(), and readbuffer().

uint recorder::scalew = 0
static

Referenced by cleanup(), and readbuffer().

SDL_cond* recorder::shouldencode = nullptr
static

Referenced by readbuffer(), start(), stop(), and videoencoder().

SDL_cond * recorder::shouldread = nullptr
static

Referenced by readbuffer(), start(), stop(), and videoencoder().

queue<soundbuffer, MAXSOUNDBUFFERS> recorder::soundbuffers
static
SDL_mutex* recorder::soundlock = nullptr
static
int recorder::starttime = 0
static
enum { ... } recorder::state
int recorder::stats[1000]
static

Referenced by start(), and videoencoder().

int recorder::statsindex = 0
static

Referenced by start(), and videoencoder().

SDL_Thread* recorder::thread = nullptr
static

Referenced by genpvs(), resolverloop(), start(), stop(), and TEST().

queue<videobuffer, MAXVIDEOBUFFERS> recorder::videobuffers
static

Referenced by readbuffer(), start(), stop(), and videoencoder().

SDL_mutex* recorder::videolock = nullptr
static

Referenced by readbuffer(), start(), stop(), and videoencoder().