OStreamUCast Class Reference

#include <OStreamUCast.hh>

List of all members.


Detailed Description

Unicast stream. Will manage commands like startStreaming, stopStreaming, and will raise one(single-stream) or more (multi-stream) RTSP servers.
See also:
OStreamReceiver

Definition at line 50 of file OStreamUCast.hh.

Public Member Functions

 OStreamUCast (on_parsable_image_cb *f, void *parsable_image_callback_data, int num_of_streams=1)
 Constructor.
virtual ~OStreamUCast ()
bool startStreaming (int encoding_type, char *file_path=NULL, int camera_num=0, int audio_num=-1, const char *subsessionUrl="testStream", unsigned short port_rtsp=8554, unsigned int fps=25)
 Starts the On Demand RTPS Server.
bool stopStreaming ()
 Stop streaming command.
char * getUrlToPlay ()
 Get the rtsp url playable by a rtsp-compatible program.

Private Member Functions

void createRTSPInstance (Port &port_to_listen)
 Create the RTSP instance.
void createServerMediaSession (int encoding_type, char *sub_url, char *file_path, int camera_num, int audio_num)

Private Attributes

on_parsable_image_cbf_parsable_image_cb
 Callback function.
char _watchVariable
unsigned int _fps
 Frames Per Second.
unsigned int _num_of_streams
 Number of streams this class will manage.
bool _multi_stream_mode
 Specify if the class manage a multi stream mode or not.
void * _parsable_image_callback_data
 Callback data.
list< OStreamOnDemandSMS * > * _dms_list
 STL container for OStreamOnDemandSMS pointers.
RTSPServer * _rtspServer
ServerMediaSession * _sms
TaskScheduler * _scheduler
UsageEnvironment * _env


Constructor & Destructor Documentation

OStreamUCast::OStreamUCast ( on_parsable_image_cb f,
void *  parsable_image_callback_data,
int  num_of_streams = 1 
)

Parameters:
f Callback function for parsable functions.
parsable_image_callback_data Callback data.
num_of_streams If it's == 1 then single-stream mode, other than use multi-stream.

Definition at line 26 of file OStreamUCast.cpp.

References _dms_list, _env, _multi_stream_mode, _num_of_streams, _scheduler, and _watchVariable.

OStreamUCast::~OStreamUCast (  )  [virtual]

Definition at line 46 of file OStreamUCast.cpp.

References _env, and _scheduler.


Member Function Documentation

void OStreamUCast::createRTSPInstance ( Port &  port_to_listen  )  [private]

Parameters:
port_to_listen Port the server will listen to.

Definition at line 108 of file OStreamUCast.cpp.

References _env, _rtspServer, and NULL.

Referenced by startStreaming().

Here is the caller graph for this function:

void OStreamUCast::createServerMediaSession ( int  encoding_type,
char *  sub_url,
char *  file_path,
int  camera_num,
int  audio_num 
) [private]

Definition at line 123 of file OStreamUCast.cpp.

References _dms_list, _env, _multi_stream_mode, _num_of_streams, _parsable_image_callback_data, _rtspServer, _sms, OStreamOnDemandSMS::createNew(), DEBUG_PRINT, f_parsable_image_cb, NULL, OSTREAM_ENCODING_MP3, and OSTREAM_ENCODING_NONE.

Referenced by startStreaming().

Here is the call graph for this function:

Here is the caller graph for this function:

char * OStreamUCast::getUrlToPlay (  ) 

Returns:
Something like like "rtsp://12.23.45.56:8554/testStream".

Definition at line 204 of file OStreamUCast.cpp.

References _rtspServer, and _sms.

bool OStreamUCast::startStreaming ( int  encoding_type,
char *  file_path = NULL,
int  camera_num = 0,
int  audio_num = -1,
const char *  subsessionUrl = "testStream",
unsigned short  port_rtsp = 8554,
unsigned int  fps = 25 
)

Parameters:
encoding_type Encoding type.
file_path File path. If this is != NULL camera_num won't be used [i.e. for hardware].
camera_num Number of input camera mapped by system. Used only if file_path = NULL
audio_num Number of input microphone mapped by system. Used only if audio_num is != -1
subsessionUrl The "testStream" part out of an url like "rtsp://12.23.45.56:8554/testStream"
port_rtsp The port on which the RTSPServer will listen to.
fps Frames Per Second.
See also:
ostream_encoding_type
Returns:
true on success, false on insuccess.

Definition at line 56 of file OStreamUCast.cpp.

References _env, _fps, _watchVariable, createRTSPInstance(), and createServerMediaSession().

Referenced by StreamerCtrlThread::Entry().

Here is the call graph for this function:

Here is the caller graph for this function:

bool OStreamUCast::stopStreaming (  ) 

Returns:
true on success, false on insuccess.

Definition at line 92 of file OStreamUCast.cpp.

References _rtspServer, _sms, and _watchVariable.

Referenced by StreamerCtrlThread::stopStreaming().

Here is the caller graph for this function:


Member Data Documentation

list<OStreamOnDemandSMS *>* OStreamUCast::_dms_list [private]

Definition at line 123 of file OStreamUCast.hh.

Referenced by createServerMediaSession(), and OStreamUCast().

UsageEnvironment* OStreamUCast::_env [private]

Definition at line 129 of file OStreamUCast.hh.

Referenced by createRTSPInstance(), createServerMediaSession(), OStreamUCast(), startStreaming(), and ~OStreamUCast().

unsigned int OStreamUCast::_fps [private]

Definition at line 111 of file OStreamUCast.hh.

Referenced by startStreaming().

bool OStreamUCast::_multi_stream_mode [private]

Definition at line 117 of file OStreamUCast.hh.

Referenced by createServerMediaSession(), and OStreamUCast().

unsigned int OStreamUCast::_num_of_streams [private]

Definition at line 114 of file OStreamUCast.hh.

Referenced by createServerMediaSession(), and OStreamUCast().

void* OStreamUCast::_parsable_image_callback_data [private]

Definition at line 120 of file OStreamUCast.hh.

Referenced by createServerMediaSession().

RTSPServer* OStreamUCast::_rtspServer [private]

See also:
http://www.live555.com/liveMedia/public/doxygen/html

Definition at line 126 of file OStreamUCast.hh.

Referenced by createRTSPInstance(), createServerMediaSession(), getUrlToPlay(), and stopStreaming().

TaskScheduler* OStreamUCast::_scheduler [private]

Definition at line 128 of file OStreamUCast.hh.

Referenced by OStreamUCast(), and ~OStreamUCast().

ServerMediaSession* OStreamUCast::_sms [private]

Definition at line 127 of file OStreamUCast.hh.

Referenced by createServerMediaSession(), getUrlToPlay(), and stopStreaming().

char OStreamUCast::_watchVariable [private]

See also:
OStreamUCast constructor.

Definition at line 108 of file OStreamUCast.hh.

Referenced by OStreamUCast(), startStreaming(), and stopStreaming().

on_parsable_image_cb* OStreamUCast::f_parsable_image_cb [private]

Definition at line 104 of file OStreamUCast.hh.

Referenced by createServerMediaSession().


The documentation for this class was generated from the following files:
Generated on Tue Dec 26 10:38:45 2006 for Omnimeeting by  doxygen 1.4.7