streamer_ctrl.h

Go to the documentation of this file.
00001 /*
00002  *  Copyright (C) Massimo Cora' 2005 <maxcvs@email.it>
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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 // forward
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,         // 1 for single mode, 2+ for multi stream
00046                                 int audio_stream = -1 ,         // -1 for no audio grab, 0, 1, ... for the input port.
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         // just to accomplish callbacks
00059         static void fake_destroy_image_context( char*, void* );
00060         static void fake_create_image_context( char*, void* );
00061 
00062 private:        // functions
00063         void* Entry();
00064         void StreamerCtrlThread::initializeOmniStuff( IplImage *image_to_parse ,
00065                                                                                                  void* buffered_image_multi_vstream_callback_data );
00066 
00067 private:        // data
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

Generated on Tue Dec 26 10:32:39 2006 for Omnimeeting by  doxygen 1.4.7