00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __STREAMER_CTRL_H__
00020 #define __STREAMER_CTRL_H__
00021
00022
00023 #include <wx/wx.h>
00024 #include <cv.h>
00025 #include <highgui.h>
00026
00027 #include <OStream.hh>
00028 #include <OmniStuff.hh>
00029 #include "main_frame.h"
00030
00031
00032 using namespace std;
00033
00034 class MainFrame;
00035
00036 class StreamerCtrlThread : public wxThread {
00037
00038 public:
00039 StreamerCtrlThread( MainFrame * main_frame_instance );
00040 virtual ~StreamerCtrlThread();
00041 void Create(bool gcard_use,
00042 const wxString proto,
00043 const wxString file_path,
00044 int cam_num,
00045 int num_of_streams = 1,
00046 int audio_stream = -1 ,
00047 const wxString sub_session = wxT( "testStream" ),
00048 unsigned short port_rtsp = 8554,
00049 unsigned int fps = 25 );
00050
00051 void stopStreaming();
00052 bool isStreaming();
00053
00054 static void onParsableImage( IplImage* image,
00055 void* buffered_image_multi_vstream_callback_data,
00056 void* callback_data );
00057
00058
00059 static void fake_destroy_image_context( char*, void* );
00060 static void fake_create_image_context( char*, void* );
00061
00062 private:
00063 void* Entry();
00064 void StreamerCtrlThread::initializeOmniStuff( IplImage *image_to_parse ,
00065 void* buffered_image_multi_vstream_callback_data );
00066
00067 private:
00068 OmniAlgoSimpleDetection<OmniFastLookupTable, int, IplImage, CvPoint> *_ctrl_lookup;
00069 OmniAlgoSimpleDetection<OmniGCardConverter, double, IplImage, CvPoint> *_ctrl_gcard;
00070
00071 OmniAlgoVRFilterDetection<OmniFastLookupTable, int, IplImage, CvPoint> *_ctrl_vr_lookup;
00072 OmniAlgoVRFilterDetection<OmniGCardConverter, double, IplImage, CvPoint> *_ctrl_vr_gcard;
00073
00074 MainFrame *_main_frame_pointer;
00075 OStreamUCast *_streamerUCast;
00076
00077 unsigned short _port_rtsp;
00078 int _fps;
00079 ostream_encoding_type _enc_proto;
00080 wxString *_sub_session;
00081 bool _streaming_status;
00082 bool _gcard_use;
00083 bool _algo_simple;
00084 bool _ctrl_initialized;
00085 char *_file_path;
00086 int _cam_num;
00087 int _num_of_streams;
00088 int _audio_num;
00089
00090 };
00091
00092
00093
00094
00095 #endif