#include <OStreamUCast.hh>
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_cb * | f_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 |
OStreamUCast::OStreamUCast | ( | on_parsable_image_cb * | f, | |
void * | parsable_image_callback_data, | |||
int | num_of_streams = 1 | |||
) |
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] |
void OStreamUCast::createRTSPInstance | ( | Port & | port_to_listen | ) | [private] |
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 | ( | ) |
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 | |||
) |
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. |
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 | ( | ) |
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:
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] |
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] |
RTSPServer* OStreamUCast::_rtspServer [private] |
Definition at line 126 of file OStreamUCast.hh.
Referenced by createRTSPInstance(), createServerMediaSession(), getUrlToPlay(), and stopStreaming().
TaskScheduler* OStreamUCast::_scheduler [private] |
ServerMediaSession* OStreamUCast::_sms [private] |
Definition at line 127 of file OStreamUCast.hh.
Referenced by createServerMediaSession(), getUrlToPlay(), and stopStreaming().
char OStreamUCast::_watchVariable [private] |
Definition at line 108 of file OStreamUCast.hh.
Referenced by OStreamUCast(), startStreaming(), and stopStreaming().