Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Enumerations | Functions | Variables
movie.cpp File Reference
#include <SDL_opengl.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <memory>
#include "SDL_audio.h"
#include "SDL_endian.h"
#include "SDL_mutex.h"
#include "SDL_stdinc.h"
#include "SDL_thread.h"
#include "inexor/engine/frame.hpp"
#include "inexor/engine/glexts.hpp"
#include "inexor/engine/movie.hpp"
#include "inexor/engine/rendergl.hpp"
#include "inexor/engine/rendertarget.hpp"
#include "inexor/engine/rendertext.hpp"
#include "inexor/engine/shader.hpp"
#include "inexor/io/Logging.hpp"
#include "inexor/io/legacy/stream.hpp"
#include "inexor/network/SharedVar.hpp"
#include "inexor/shared/command.hpp"
#include "inexor/shared/cube_endian.hpp"
#include "inexor/shared/cube_formatting.hpp"
#include "inexor/shared/cube_loops.hpp"
#include "inexor/shared/cube_queue.hpp"
#include "inexor/shared/cube_tools.hpp"
#include "inexor/shared/cube_types.hpp"
#include "inexor/shared/cube_vector.hpp"
#include "inexor/shared/geom.hpp"
#include "inexor/shared/tools.hpp"
#include "inexor/texture/texture.hpp"
#include "inexor/ui/screen/ScreenManager.hpp"
#include "inexor/util/legacy_time.hpp"

Classes

struct  unionfind
 
struct  unionfind::ufval
 
struct  aviindexentry
 
struct  avisegmentinfo
 
struct  aviwriter
 
struct  recorder::soundbuffer
 
struct  recorder::videobuffer
 

Namespaces

 recorder
 

Enumerations

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

Functions

 VAR (dbgmovie, 0, 0, 1)
 
 VAR (movieaccelblit, 0, 0, 1)
 
 VAR (movieaccelyuv, 0, 1, 1)
 
 VARP (movieaccel, 0, 1, 1)
 
 VARP (moviesync, 0, 0, 1)
 
 FVARP (movieminquality, 0, 0, 1)
 
bool recorder::isrecording ()
 
float recorder::calcquality ()
 
int recorder::gettime ()
 
int recorder::videoencoder (void *data)
 
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::cleanup ()
 
void recorder::stop ()
 
void recorder::readbuffer (videobuffer &m, uint nextframe)
 
bool recorder::readbuffer ()
 
void recorder::drawhud ()
 
void recorder::capture (bool overlay)
 
 VARP (moview, 0, 320, 10000)
 
 VARP (movieh, 0, 240, 10000)
 
 VARP (moviefps, 1, 24, 1000)
 
 VARP (moviesound, 0, 0, 0)
 
void movie (char *name)
 
 COMMAND (movie,"s")
 
 ICOMMAND (movierecording,"",(), intret(recorder::isrecording()?1:0))
 

Variables

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

Function Documentation

COMMAND ( movie  ,
"s"   
)
FVARP ( movieminquality  ,
,
,
 
)
ICOMMAND ( movierecording  ,
""  ,
()  ,
intret(recorder::isrecording()?1:0)   
)
void movie ( char *  name)
VAR ( dbgmovie  ,
,
,
 
)
VAR ( movieaccelblit  ,
,
,
 
)
VAR ( movieaccelyuv  ,
,
,
 
)
VARP ( movieaccel  ,
,
,
 
)
VARP ( moviesync  ,
,
,
 
)
VARP ( moview  ,
,
320  ,
10000   
)
VARP ( movieh  ,
,
240  ,
10000   
)
VARP ( moviefps  ,
,
24  ,
1000   
)
VARP ( moviesound  ,
,
,
 
)