_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

movie.cpp File Reference
#include <cstdlib>
#include <vorbis/codec.h>
#include <vorbis/vorbisfile.h>
#include <theora/theora.h>
#include "stratagus.h"
#include "movie.h"
#include "iocompat.h"
#include "iolib.h"
#include "network.h"
#include "sound.h"
#include "sound_server.h"
#include "video.h"
#include "SDL.h"
#include "SDL_endian.h"

movie.cpp - Movie playback functions.

SDL_Surface * TheScreen
 Internal screen. More...
 
static bool MovieStop
 
int OggGetNextPage (ogg_page *page, ogg_sync_state *sync, CFile *f)
 
int OggInit (CFile *f, OggData *data)
 
void OggFree (OggData *data)
 
static void MovieCallbackButtonPressed (unsigned)
 
static void MovieCallbackButtonReleased (unsigned)
 
static void MovieCallbackKeyPressed (unsigned, unsigned)
 
static void MovieCallbackKeyReleased (unsigned, unsigned)
 
static void MovieCallbackKeyRepeated (unsigned, unsigned)
 
static void MovieCallbackMouseMove (const PixelPos &)
 
static void MovieCallbackMouseExit ()
 
static int OutputTheora (OggData *data, SDL_Texture *yuv_overlay, SDL_Rect *rect)
 
static int TheoraProcessData (OggData *data)
 
int PlayMovie (const std::string &name)
 Play a movie file. More...
 
static void RenderToSurface (SDL_Surface *surface, SDL_Texture *yuv_overlay, SDL_Rect *rect, OggData *data)
 

Function Documentation

◆ MovieCallbackButtonPressed()

static void MovieCallbackButtonPressed ( unsigned  )
static

Callbacks for movie input.

◆ MovieCallbackButtonReleased()

static void MovieCallbackButtonReleased ( unsigned  )
static

◆ MovieCallbackKeyPressed()

static void MovieCallbackKeyPressed ( unsigned  ,
unsigned   
)
static

◆ MovieCallbackKeyReleased()

static void MovieCallbackKeyReleased ( unsigned  ,
unsigned   
)
static

◆ MovieCallbackKeyRepeated()

static void MovieCallbackKeyRepeated ( unsigned  ,
unsigned   
)
static

◆ MovieCallbackMouseExit()

static void MovieCallbackMouseExit ( )
static

◆ MovieCallbackMouseMove()

static void MovieCallbackMouseMove ( const PixelPos )
static

◆ OggFree()

void OggFree ( OggData data)

◆ OggGetNextPage()

int OggGetNextPage ( ogg_page *  page,
ogg_sync_state *  sync,
CFile f 
)

◆ OggInit()

int OggInit ( CFile f,
OggData data 
)

◆ OutputTheora()

static int OutputTheora ( OggData data,
SDL_Texture *  yuv_overlay,
SDL_Rect *  rect 
)
static

Draw Ogg data to the overlay

◆ PlayMovie()

int PlayMovie ( const std::string &  name)

Play a movie file.

Play a video file.

Parameters
nameFilename of movie file.
Returns
Non-zero if file isn't a supported movie.

◆ RenderToSurface()

static void RenderToSurface ( SDL_Surface *  surface,
SDL_Texture *  yuv_overlay,
SDL_Rect *  rect,
OggData data 
)
static

◆ TheoraProcessData()

static int TheoraProcessData ( OggData data)
static

Process Ogg data

Variable Documentation

◆ MovieStop

bool MovieStop
static

◆ TheScreen

SDL_Surface* TheScreen

Internal screen.

(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.