#include <RioMMEmbed.h>
Inherits CRioMMSlideShow.
Public Member Functions | |
CRioMMEmbed (char *, unsigned int, RioBlock, struct timeval RTT_average) | |
~CRioMMEmbed (void) | |
int | init (void) |
int | Cleanup (void) |
void | Stop (void) |
void | setSocket (int) |
void | setPort (int) |
bool | ChangeContext (const char *, int) |
void | SyncSpecific (void) |
Private Attributes | |
int | Socket |
struct sockaddr_in | remoteAddr |
Definition at line 28 of file RioMMEmbed.h.
CRioMMEmbed::CRioMMEmbed | ( | char * | VideoName, | |
unsigned int | blocksize, | |||
RioBlock | numBuffers, | |||
struct timeval | RTT_average | |||
) |
Definition at line 33 of file RioMMEmbed.cpp.
00035 : CRioMMSlideShow( VideoName, blocksize, numBuffers, RTT_average ) 00036 { 00037 /* Media Synchronization Language Version */ 00038 Major = 1; 00039 Minor = 0; 00040 Socket = 0; 00041 00042 /* There are no Netscape specific commands */ 00043 CommandsList = NULL; 00044 NumberOfCommands = 0; 00045 }
CRioMMEmbed::~CRioMMEmbed | ( | void | ) |
Definition at line 48 of file RioMMEmbed.cpp.
00049 { 00050 Cleanup(); 00051 }
bool CRioMMEmbed::ChangeContext | ( | const char * | file_name, | |
int | slide_number | |||
) | [virtual] |
Reimplemented from CRioMMSlideShow.
Definition at line 87 of file RioMMEmbed.cpp.
00088 { 00089 TString NextFileName; 00090 00091 NextFileName = file_name; 00092 if( NextFileName != CurrentFileName ) 00093 { 00094 if( NextFileName.BeginsWith( "LOCAL:" ) ) 00095 Command = "chgu file://" + TempDirectory + "/" + 00096 NextFileName.Substring( strlen( "LOCAL:" ) ); 00097 else 00098 Command = "chgu http://" + NextFileName; 00099 00100 if( Socket ) 00101 sendto( Socket, (const char *)Command, Command.Length() + 1, 0, 00102 (struct sockaddr *)&remoteAddr, sizeof( remoteAddr ) ); 00103 } 00104 00105 CRioMMSlideShow::ChangeContext( file_name, slide_number ); 00106 return true; 00107 }
int CRioMMEmbed::Cleanup | ( | void | ) | [virtual] |
Implements CRioMMSlideShow.
Definition at line 75 of file RioMMEmbed.cpp.
int CRioMMEmbed::init | ( | void | ) | [virtual] |
Reimplemented from CRioMMSlideShow.
Definition at line 54 of file RioMMEmbed.cpp.
void CRioMMEmbed::setPort | ( | int | port | ) |
Definition at line 66 of file RioMMEmbed.cpp.
00067 { 00068 Socket = socket( PF_INET, SOCK_DGRAM, 0 ); 00069 remoteAddr.sin_port = port; 00070 remoteAddr.sin_family = AF_INET; 00071 remoteAddr.sin_addr.s_addr = INADDR_ANY; 00072 }
void CRioMMEmbed::setSocket | ( | int | soc | ) |
Definition at line 60 of file RioMMEmbed.cpp.
00061 { 00062 Socket = soc; 00063 }
void CRioMMEmbed::Stop | ( | void | ) | [virtual] |
Reimplemented from CRioMMSlideShow.
Definition at line 81 of file RioMMEmbed.cpp.
00082 { 00083 CRioMMSlideShow::Stop(); 00084 }
void CRioMMEmbed::SyncSpecific | ( | void | ) | [virtual] |
struct sockaddr_in CRioMMEmbed::remoteAddr [private] |
Definition at line 32 of file RioMMEmbed.h.
int CRioMMEmbed::Socket [private] |
Definition at line 31 of file RioMMEmbed.h.