#include <receiver_ctrl.h>
Collaboration diagram for ReceiverCtrlThread:
Definition at line 60 of file receiver_ctrl.h.
Public Member Functions | |
ReceiverCtrlThread (class MainFrame *main_frame_instance) | |
virtual | ~ReceiverCtrlThread () |
void | Create (const wxString destRTSPUrl, bool is_multi_stream=false) |
void | StopReceiving () |
bool | isReceiving () |
bool | isShuttingDown () |
void | doOmniStuffParsing (IplImage *image_received, int stream_id) |
void | notifyMainThread (IplImage *image_received, int stream_id) |
void | initializeOmniStuff (IplImage *image_to_parse) |
Static Public Member Functions | |
static bool | onImageReceivedFromNet (IplImage *image_received, int stream_id, const void *client_data) |
static bool | onAudioFrameReceivedFromNet (unsigned char *audio_buf, int audio_buf_size, int stream_id, const void *client_data) |
static void | fake_destroy_image_context (char *, void *) |
static void | fake_create_image_context (char *, void *) |
static void | ready_to_send_image (IplImage *image, int stream_id, char *__unused__, void *callback_data) |
Private Member Functions | |
void * | Entry () |
void | parseErrorStatus (int err_status) |
void | doAudioParsing (unsigned char *audio_buf, int audio_buf_size, int stream_id) |
void | fmod_init () |
void | ERRCHECK (FMOD_RESULT result) |
Static Private Member Functions | |
static void | add_available_bytes (unsigned char *bytes_to_add_buff, unsigned int bytes_to_add_size) |
static FMOD_RESULT F_CALLBACK | fmod_read_cb (void *handle, void *buffer, unsigned int sizebytes, unsigned int *bytesread, void *userdata) |
static FMOD_RESULT F_CALLBACK | fmod_close_cb (void *handle, void *userdata) |
static FMOD_RESULT F_CALLBACK | fmod_open_cb (const char *name, int unicode, unsigned int *filesize, void **handle, void **userdata) |
static FMOD_RESULT F_CALLBACK | fmod_seek_cb (void *handle, unsigned int pos, void *userdata) |
Private Attributes | |
OmniAlgoSimpleDetection< OmniFastLookupTable, int, IplImage, CvPoint > * | _ctrl_lookup |
OmniAlgoSimpleDetection< OmniGCardConverter, double, IplImage, CvPoint > * | _ctrl_gcard |
OmniAlgoVRFilterDetection< OmniFastLookupTable, int, IplImage, CvPoint > * | _ctrl_vr_lookup |
OmniAlgoVRFilterDetection< OmniGCardConverter, double, IplImage, CvPoint > * | _ctrl_vr_gcard |
MainFrame * | _main_frame_pointer |
OStreamReceiver * | _receiver |
bool | _receiving_status |
bool | _shutting_down |
bool | _ctrl_initialized |
bool | _is_multi_stream |
bool | _gcard_use |
FMOD::System * | _system |
FMOD::Sound * | _sound |
FMOD::Channel * | _channel |
FMOD_RESULT | _result |
unsigned int | _version |
bool | _fmod_initialized |
ReceiverCtrlThread::ReceiverCtrlThread | ( | class MainFrame * | main_frame_instance | ) |
Definition at line 24 of file receiver_ctrl.cpp.
ReceiverCtrlThread::~ReceiverCtrlThread | ( | ) | [virtual] |
void ReceiverCtrlThread::add_available_bytes | ( | unsigned char * | bytes_to_add_buff, | |
unsigned int | bytes_to_add_size | |||
) | [static, private] |
Definition at line 572 of file receiver_ctrl.cpp.
References DEBUG_PRINT, DROP_PACKET_BOUND, g_available_bytes, g_mutex_sound, g_prebuff_ptr, g_read_data_ptr, g_shared_buffer, and g_shared_buffer_size.
Referenced by doAudioParsing().
Here is the caller graph for this function:
void ReceiverCtrlThread::Create | ( | const wxString | destRTSPUrl, | |
bool | is_multi_stream = false | |||
) |
Definition at line 47 of file receiver_ctrl.cpp.
References _gcard_use, _is_multi_stream, _main_frame_pointer, _receiver, MainFrame::GetGCardUseStatus(), onAudioFrameReceivedFromNet(), and onImageReceivedFromNet().
Referenced by DialogOptions::OnOptionsButtonOkClick().
Here is the call graph for this function:
Here is the caller graph for this function:
void ReceiverCtrlThread::doAudioParsing | ( | unsigned char * | audio_buf, | |
int | audio_buf_size, | |||
int | stream_id | |||
) | [private] |
Definition at line 643 of file receiver_ctrl.cpp.
References _channel, _fmod_initialized, _result, _sound, _system, add_available_bytes(), DEBUG_PRINT, ERRCHECK(), fmod_init(), g_available_bytes, g_prebuff_ptr, g_read_data_ptr, g_shared_buffer, g_shared_buffer_size, and NULL.
Referenced by onAudioFrameReceivedFromNet().
Here is the call graph for this function:
Here is the caller graph for this function:
void ReceiverCtrlThread::doOmniStuffParsing | ( | IplImage * | image_received, | |
int | stream_id | |||
) |
Definition at line 341 of file receiver_ctrl.cpp.
References _ctrl_gcard, _ctrl_initialized, _ctrl_lookup, _ctrl_vr_gcard, _ctrl_vr_lookup, _gcard_use, _main_frame_pointer, DEBUG_PRINT, MainFrame::GetAlgoSimpleStatus(), initializeOmniStuff(), OmniAlgoVRFilterDetection< ConverterT, AngleT, ImageT, PointT >::loop_next_frame(), OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::loop_next_frame(), and NULL.
Referenced by onImageReceivedFromNet().
Here is the call graph for this function:
Here is the caller graph for this function:
void * ReceiverCtrlThread::Entry | ( | ) | [private] |
Definition at line 135 of file receiver_ctrl.cpp.
References _main_frame_pointer, _receiver, _receiving_status, _shutting_down, ERROR_NORMAL_STATUS, OStreamReceiver::isReadyToStream(), MainFrame::OnReceiverCtrlThreadEnd(), parseErrorStatus(), and OStreamReceiver::startReceiving().
Here is the call graph for this function:
void ReceiverCtrlThread::ERRCHECK | ( | FMOD_RESULT | result | ) | [private] |
Definition at line 421 of file receiver_ctrl.cpp.
Referenced by doAudioParsing(), and fmod_init().
Here is the caller graph for this function:
void ReceiverCtrlThread::fake_create_image_context | ( | char * | , | |
void * | ||||
) | [static] |
Definition at line 183 of file receiver_ctrl.cpp.
Referenced by initializeOmniStuff().
Here is the caller graph for this function:
void ReceiverCtrlThread::fake_destroy_image_context | ( | char * | , | |
void * | ||||
) | [static] |
Definition at line 179 of file receiver_ctrl.cpp.
Referenced by initializeOmniStuff().
Here is the caller graph for this function:
FMOD_RESULT F_CALLBACK ReceiverCtrlThread::fmod_close_cb | ( | void * | handle, | |
void * | userdata | |||
) | [static, private] |
Definition at line 522 of file receiver_ctrl.cpp.
References DEBUG_PRINT.
Referenced by fmod_init().
Here is the caller graph for this function:
void ReceiverCtrlThread::fmod_init | ( | ) | [private] |
Definition at line 535 of file receiver_ctrl.cpp.
References _channel, _result, _system, _version, DEBUG_PRINT, ERRCHECK(), fmod_close_cb(), fmod_open_cb(), fmod_read_cb(), fmod_seek_cb(), and g_mutex_sound.
Referenced by doAudioParsing().
Here is the call graph for this function:
Here is the caller graph for this function:
FMOD_RESULT F_CALLBACK ReceiverCtrlThread::fmod_open_cb | ( | const char * | name, | |
int | unicode, | |||
unsigned int * | filesize, | |||
void ** | handle, | |||
void ** | userdata | |||
) | [static, private] |
Definition at line 512 of file receiver_ctrl.cpp.
References DEBUG_PRINT.
Referenced by fmod_init().
Here is the caller graph for this function:
FMOD_RESULT F_CALLBACK ReceiverCtrlThread::fmod_read_cb | ( | void * | handle, | |
void * | buffer, | |||
unsigned int | sizebytes, | |||
unsigned int * | bytesread, | |||
void * | userdata | |||
) | [static, private] |
Definition at line 430 of file receiver_ctrl.cpp.
References DEBUG_PRINT, g_available_bytes, g_mutex_sound, g_prebuff_ptr, g_read_data_ptr, g_shared_buffer, and g_shared_buffer_size.
Referenced by fmod_init().
Here is the caller graph for this function:
FMOD_RESULT F_CALLBACK ReceiverCtrlThread::fmod_seek_cb | ( | void * | handle, | |
unsigned int | pos, | |||
void * | userdata | |||
) | [static, private] |
Definition at line 529 of file receiver_ctrl.cpp.
References DEBUG_PRINT.
Referenced by fmod_init().
Here is the caller graph for this function:
void ReceiverCtrlThread::initializeOmniStuff | ( | IplImage * | image_to_parse | ) |
Definition at line 198 of file receiver_ctrl.cpp.
References _ctrl_gcard, _ctrl_initialized, _ctrl_lookup, _ctrl_vr_gcard, _ctrl_vr_lookup, _gcard_use, _main_frame_pointer, DEBUG_PRINT, fake_create_image_context(), fake_destroy_image_context(), MainFrame::GetAlgoSimpleStatus(), MainFrame::GetCascadeArray(), MainFrame::GetCascadeSize(), MainFrame::GetCenterX(), MainFrame::GetCenterY(), MainFrame::GetFlippedModeStatus(), MainFrame::GetFreezeFrameBound(), MainFrame::GetMaxRadius(), MainFrame::GetMinRadius(), MainFrame::GetTrackWindowHitrate(), MainFrame::is_face_detect_options_set(), OmniGCardConverter::is_initialized(), OmniFastLookupTable::is_initialized(), NULL, ready_to_send_image(), OmniAlgoVRFilterDetection< ConverterT, AngleT, ImageT, PointT >::register_all_image_callbacks(), and OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::register_all_image_callbacks().
Referenced by doOmniStuffParsing().
Here is the call graph for this function:
Here is the caller graph for this function:
bool ReceiverCtrlThread::isReceiving | ( | ) |
Definition at line 65 of file receiver_ctrl.cpp.
References _receiving_status.
Referenced by DialogOptions::Create(), MainFrame::OnCloseWindow(), MainFrame::OnMenuitemActionsStopReceivingClick(), DialogOptions::OnOptionsButtonOkClick(), and MainFrame::~MainFrame().
Here is the caller graph for this function:
bool ReceiverCtrlThread::isShuttingDown | ( | ) |
void ReceiverCtrlThread::notifyMainThread | ( | IplImage * | image_received, | |
int | stream_id | |||
) |
Definition at line 160 of file receiver_ctrl.cpp.
References _main_frame_pointer, _image_received_data::image, IMAGE_RECEIVED_EVENT, and _image_received_data::stream_id.
Referenced by onImageReceivedFromNet(), and ready_to_send_image().
Here is the caller graph for this function:
bool ReceiverCtrlThread::onAudioFrameReceivedFromNet | ( | unsigned char * | audio_buf, | |
int | audio_buf_size, | |||
int | stream_id, | |||
const void * | client_data | |||
) | [static] |
Definition at line 684 of file receiver_ctrl.cpp.
References doAudioParsing().
Referenced by Create().
Here is the call graph for this function:
Here is the caller graph for this function:
bool ReceiverCtrlThread::onImageReceivedFromNet | ( | IplImage * | image_received, | |
int | stream_id, | |||
const void * | client_data | |||
) | [static] |
Definition at line 373 of file receiver_ctrl.cpp.
References _is_multi_stream, _main_frame_pointer, doOmniStuffParsing(), MainFrame::is_face_detect_options_set(), and notifyMainThread().
Referenced by Create().
Here is the call graph for this function:
Here is the caller graph for this function:
void ReceiverCtrlThread::parseErrorStatus | ( | int | err_status | ) | [private] |
Definition at line 91 of file receiver_ctrl.cpp.
References ERROR_FAILED_CREATE_MEDIASESSION, ERROR_FAILED_CREATE_RTSP_CLIENT, ERROR_FAILED_FILE_SINK_CREATION, ERROR_FAILED_SDP_DESCRIPTION, ERROR_FAILED_SETUP_STREAMS, ERROR_FAILED_TO_CREATE_RECEIVER, ERROR_NORMAL_STATUS, ERROR_UNKOWN_ERROR, and WORKER_EVENT.
Referenced by Entry().
Here is the caller graph for this function:
void ReceiverCtrlThread::ready_to_send_image | ( | IplImage * | image, | |
int | stream_id, | |||
char * | __unused__, | |||
void * | callback_data | |||
) | [static] |
Definition at line 187 of file receiver_ctrl.cpp.
References notifyMainThread().
Referenced by initializeOmniStuff().
Here is the call graph for this function:
Here is the caller graph for this function:
void ReceiverCtrlThread::StopReceiving | ( | ) |
Definition at line 81 of file receiver_ctrl.cpp.
References _receiver, _shutting_down, and OStreamReceiver::stopReceiving().
Referenced by MainFrame::OnMenuitemActionsStopReceivingClick(), and MainFrame::~MainFrame().
Here is the call graph for this function:
Here is the caller graph for this function:
FMOD::Channel* ReceiverCtrlThread::_channel [private] |
OmniAlgoSimpleDetection<OmniGCardConverter, double, IplImage, CvPoint>* ReceiverCtrlThread::_ctrl_gcard [private] |
Definition at line 104 of file receiver_ctrl.h.
Referenced by doOmniStuffParsing(), and initializeOmniStuff().
bool ReceiverCtrlThread::_ctrl_initialized [private] |
Definition at line 113 of file receiver_ctrl.h.
Referenced by doOmniStuffParsing(), and initializeOmniStuff().
OmniAlgoSimpleDetection<OmniFastLookupTable, int, IplImage, CvPoint>* ReceiverCtrlThread::_ctrl_lookup [private] |
Definition at line 103 of file receiver_ctrl.h.
Referenced by doOmniStuffParsing(), and initializeOmniStuff().
OmniAlgoVRFilterDetection<OmniGCardConverter, double, IplImage, CvPoint>* ReceiverCtrlThread::_ctrl_vr_gcard [private] |
Definition at line 107 of file receiver_ctrl.h.
Referenced by doOmniStuffParsing(), and initializeOmniStuff().
OmniAlgoVRFilterDetection<OmniFastLookupTable, int, IplImage, CvPoint>* ReceiverCtrlThread::_ctrl_vr_lookup [private] |
Definition at line 106 of file receiver_ctrl.h.
Referenced by doOmniStuffParsing(), and initializeOmniStuff().
bool ReceiverCtrlThread::_fmod_initialized [private] |
bool ReceiverCtrlThread::_gcard_use [private] |
Definition at line 115 of file receiver_ctrl.h.
Referenced by Create(), doOmniStuffParsing(), and initializeOmniStuff().
bool ReceiverCtrlThread::_is_multi_stream [private] |
Definition at line 114 of file receiver_ctrl.h.
Referenced by Create(), and onImageReceivedFromNet().
MainFrame* ReceiverCtrlThread::_main_frame_pointer [private] |
Definition at line 109 of file receiver_ctrl.h.
Referenced by Create(), doOmniStuffParsing(), Entry(), initializeOmniStuff(), notifyMainThread(), and onImageReceivedFromNet().
OStreamReceiver* ReceiverCtrlThread::_receiver [private] |
Definition at line 110 of file receiver_ctrl.h.
Referenced by Create(), Entry(), StopReceiving(), and ~ReceiverCtrlThread().
bool ReceiverCtrlThread::_receiving_status [private] |
FMOD_RESULT ReceiverCtrlThread::_result [private] |
bool ReceiverCtrlThread::_shutting_down [private] |
Definition at line 112 of file receiver_ctrl.h.
Referenced by Entry(), isShuttingDown(), and StopReceiving().
FMOD::Sound* ReceiverCtrlThread::_sound [private] |
FMOD::System* ReceiverCtrlThread::_system [private] |
unsigned int ReceiverCtrlThread::_version [private] |