Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals

Ars::XMPEG Class Reference

#include <xmpeg.h>

Inheritance diagram for Ars::XMPEG:

Inheritance graph
[legend]
Collaboration diagram for Ars::XMPEG:

Collaboration graph
[legend]

Public Member Functions

 XMPEG (void)
 ~XMPEG (void)
virtual void Init (icstring &aStr)
virtual const bool SetupWindow (const Message &msg)
 Initialize the XMPEG.

const bool Play (void)
SMPEG * GetMPEG (void) const
const SMPEG_Info & GetInfo (void) const
void EndPlay (void)

Private Attributes

std::string sct
std::string key
std::string fname
SMPEG_Info mpegInfo
SMPEG * mpeg

Constructor & Destructor Documentation

Ars::XMPEG::XMPEG void   ) 
 

Construct a new XMPEG

Parameters:
WindowRect A CRect that defines the outer limits of the control
aStr the rest of the resource to initialize the object

Definition at line 5 of file xmpeg.cpp.

00006 : mpeg( 0 )
00007 {
00008 }

Ars::XMPEG::~XMPEG void   ) 
 

Definition at line 10 of file xmpeg.cpp.

References mpeg.

00011 {
00012         if( mpeg )
00013                 SMPEG_delete( mpeg );
00014         mpeg = 0;
00015 }


Member Function Documentation

void Ars::XMPEG::EndPlay void   ) 
 

Definition at line 70 of file xmpeg.cpp.

References mpeg.

00071 {
00072         if( mpeg )
00073         {
00074                 SMPEG_delete( mpeg );
00075                 mpeg = 0;
00076         }
00077 }

const SMPEG_Info& Ars::XMPEG::GetInfo void   )  const [inline]
 

Definition at line 33 of file xmpeg.h.

References mpegInfo.

00033 {       return mpegInfo;        }

SMPEG* Ars::XMPEG::GetMPEG void   )  const [inline]
 

Definition at line 32 of file xmpeg.h.

References mpeg.

00032 {       return mpeg;    }

void Ars::XMPEG::Init icstring aStr  )  [virtual]
 

Initialize the thing object via a string the CAR identifiers used are: mpeg: "section" "key" "fname" NB if fname starts with @ the string is the key of associated with afilename in the global Cfg file

Reimplemented from Ars::XImage.

Definition at line 17 of file xmpeg.cpp.

References fname, icstring, key, and sct.

00018 {
00019         XImage::Init( aStr );
00020 
00021         icstring        tmp = Rsrc::FindCrdOf( aStr , "mpeg" );
00022 
00023         sct = Rsrc::GetStr( tmp );
00024         key = Rsrc::GetStr( tmp );
00025         fname = Rsrc::GetStr( tmp );
00026 }

const bool Ars::XMPEG::Play void   ) 
 

Definition at line 59 of file xmpeg.cpp.

References mpeg.

00060 {
00061         if( mpeg )
00062         {
00063                 if( SMPEG_status( mpeg ) != SMPEG_PLAYING )
00064                         SMPEG_play( mpeg );
00065                 return SMPEG_status( mpeg ) == SMPEG_PLAYING;
00066         }
00067         return false;
00068 }

const bool Ars::XMPEG::SetupWindow const Message msg  )  [virtual]
 

Initialize the XMPEG.

Reimplemented from Ars::XImage.

Definition at line 28 of file xmpeg.cpp.

References fname, Cfg::GetCfg(), Cfg::Handler::GetCfgFile(), Ars::HPaint::GetGDI(), key, mpeg, mpegInfo, and sct.

00029 {
00030         XImage::SetupWindow( msg );
00031 
00032         if( !mpeg )
00033                 if( !sct.empty() || !key.empty() || !fname.empty() )
00034                 {
00035                         if( key.empty() )
00036                                 mpeg = SMPEG_new( fname.empty() ? sct.c_str() : fname.c_str() , &mpegInfo , 1 );
00037                         else
00038                         {
00039                                 if( fname.empty() )
00040                                         fname = Cfg::GetCfg().GetCfgFile( "Paths" , "Animate" );
00041                                 Cfg::Handler &h = Cfg::GetCfg( fname );
00042 
00043                                 mpeg = SMPEG_new( h.GetCfgFile( sct , key ).c_str() , &mpegInfo , 1 );
00044                         }
00045                 }
00046 
00047 //      SMPEG_enableaudio( mpeg , 1 );
00048         SMPEG_enablevideo( mpeg , 1 );
00049         SMPEG_setvolume( mpeg , 100 );
00050 
00051         SMPEG_setdisplay( mpeg , GetGDI() , 0 , 0 );
00052         SMPEG_move( mpeg , x , y );
00053         SMPEG_scaleXY( mpeg , w , h );
00054 
00055         return true;
00056 }


Field Documentation

std::string Ars::XMPEG::fname [private]
 

Reimplemented from Ars::XImage.

Definition at line 9 of file xmpeg.h.

Referenced by Init(), and SetupWindow().

std::string Ars::XMPEG::key [private]
 

Reimplemented from Ars::XImage.

Definition at line 9 of file xmpeg.h.

Referenced by Init(), and SetupWindow().

SMPEG* Ars::XMPEG::mpeg [private]
 

Definition at line 11 of file xmpeg.h.

Referenced by EndPlay(), GetMPEG(), Play(), SetupWindow(), and ~XMPEG().

SMPEG_Info Ars::XMPEG::mpegInfo [private]
 

Definition at line 10 of file xmpeg.h.

Referenced by GetInfo(), and SetupWindow().

std::string Ars::XMPEG::sct [private]
 

Reimplemented from Ars::XImage.

Definition at line 9 of file xmpeg.h.

Referenced by Init(), and SetupWindow().


The documentation for this class was generated from the following files:
Generated on Fri Dec 5 04:07:01 2003 for Borqueror by doxygen 1.3.3