MMSFlash Class Reference

Handles Flash playback and navigation. More...

#include <mmsflash.h>

List of all members.


Public Member Functions

 MMSFlash (MMSWindow *window)
 The Flash constructor.
 ~MMSFlash ()
 The Flash destructor.
void startPlaying (string filename)
 Start loading/playing of the given flash file.
bool isReady ()
 Is the flash file ready for playing?
bool isPlaying (bool wait=false)
 Is the flash file playing?

Private Member Functions

void loader (bool &stop)
 Internal method: Loading Flash, runs in the loader thread.
void player (bool &stop)
 Internal method: Playing Flash, runs in the player thread.
void stopThreads (void)
 Internal method: Stop my threads.
unsigned int mapKey (MMSKeySymbol key)
 Internal method: Map keys.
bool onHandleInput (MMSWindow *window, MMSInputEvent *input)
 Internal method: Will be called on user input.

Private Attributes

bool ready
 this class is ready for playing
bool playing
 this class is playing
MMSMutex lock
 to make it thread-safe :)
MMSWindowwindow
 window that will display the flash file
string filename
 flash file to play
void * swfdec_player
 swfdec player
double swfdec_rate
 frame rate
int width
 width of the flash image
int height
 height of the flash image
MMSFBSurfaceflash_temp_surface
 temporary surface to let the swfdec render to
void * cairosurface
 temporary cairo surface
void * cairo
 temporary cairo
MMSFlashThreadloaderthread
 loader thread
MMSFlashThreadplayerthread
 player thread

Static Private Attributes

static bool swfdec_initialized = false
 swfdec must be initialized once

Friends

class MMSFlashThread

Detailed Description

Handles Flash playback and navigation.

Author:
Jens Schneider

Definition at line 46 of file mmsflash.h.


Constructor & Destructor Documentation

MMSFlash::MMSFlash ( MMSWindow window  ) 

The Flash constructor.

Definition at line 51 of file mmsflash.cpp.

MMSFlash::~MMSFlash (  ) 

The Flash destructor.

Definition at line 75 of file mmsflash.cpp.


Member Function Documentation

void MMSFlash::loader ( bool &  stop  )  [private]

Internal method: Loading Flash, runs in the loader thread.

Definition at line 84 of file mmsflash.cpp.

void MMSFlash::player ( bool &  stop  )  [private]

Internal method: Playing Flash, runs in the player thread.

Definition at line 179 of file mmsflash.cpp.

void MMSFlash::stopThreads ( void   )  [private]

Internal method: Stop my threads.

Definition at line 231 of file mmsflash.cpp.

unsigned int MMSFlash::mapKey ( MMSKeySymbol  key  )  [private]

Internal method: Map keys.

Definition at line 243 of file mmsflash.cpp.

bool MMSFlash::onHandleInput ( MMSWindow window,
MMSInputEvent input 
) [private]

Internal method: Will be called on user input.

Definition at line 436 of file mmsflash.cpp.

void MMSFlash::startPlaying ( string  filename  ) 

Start loading/playing of the given flash file.

If a other file is currently playing, the playback will be stopped before starting the new one.

Parameters:
filename flash file to play

Definition at line 488 of file mmsflash.cpp.

bool MMSFlash::isReady (  ) 

Is the flash file ready for playing?

Returns:
true if ready, else there are problems while loading the flash file
Note:
This function is waiting for the ready or error state.

Definition at line 517 of file mmsflash.cpp.

bool MMSFlash::isPlaying ( bool  wait = false  ) 

Is the flash file playing?

Returns:
true if playing

Definition at line 529 of file mmsflash.cpp.


Friends And Related Function Documentation

friend class MMSFlashThread [friend]

Definition at line 136 of file mmsflash.h.


Member Data Documentation

bool MMSFlash::swfdec_initialized = false [static, private]

swfdec must be initialized once

Definition at line 49 of file mmsflash.h.

bool MMSFlash::ready [private]

this class is ready for playing

Definition at line 52 of file mmsflash.h.

bool MMSFlash::playing [private]

this class is playing

Definition at line 55 of file mmsflash.h.

to make it thread-safe :)

Definition at line 58 of file mmsflash.h.

window that will display the flash file

Definition at line 61 of file mmsflash.h.

string MMSFlash::filename [private]

flash file to play

Definition at line 64 of file mmsflash.h.

void* MMSFlash::swfdec_player [private]

swfdec player

Definition at line 67 of file mmsflash.h.

double MMSFlash::swfdec_rate [private]

frame rate

Definition at line 70 of file mmsflash.h.

int MMSFlash::width [private]

width of the flash image

Definition at line 73 of file mmsflash.h.

int MMSFlash::height [private]

height of the flash image

Definition at line 76 of file mmsflash.h.

temporary surface to let the swfdec render to

Definition at line 79 of file mmsflash.h.

void* MMSFlash::cairosurface [private]

temporary cairo surface

Definition at line 82 of file mmsflash.h.

void* MMSFlash::cairo [private]

temporary cairo

Definition at line 85 of file mmsflash.h.

loader thread

Definition at line 88 of file mmsflash.h.

player thread

Definition at line 91 of file mmsflash.h.


The documentation for this class was generated from the following files: