00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include "pipeline/CameraThread.h"
00012 #include "pipeline/CameraLoader.h"
00013 #include "pipeline/Dispatcher.h"
00014 #include "pipeline/FrameQueue.h"
00015
00016 #include "pipeline/UnitLoader.h"
00017
00018 #include "pipeline/ImagePixelFormats.h"
00019
00020 using namespace NSPipeline;
00021
00022
00023
00024 int main()
00025 {
00026 #if 0
00027
00028
00029
00030
00031 TFrameQueue * pipeline_queue = new TFrameQueue;
00032 TDispatcher * pipeline_dispatcher = new TDispatcher( pipeline_queue );
00033
00034
00035
00036 TCameraLoader * pipeline_cameraLoader = new TCameraLoader;
00037 TCameraAbstract * pipeline_camera = pipeline_cameraLoader->GetCamera_DirectShow( "jmeno_souboru_s_dll_knihovnou_pro_dshow_kameru" );
00038
00039
00040
00041 pipeline_dispatcher->SetFramesInfo( pipeline_camera->GetWidth(), pipeline_camera->GetHeight() );
00042
00043
00044
00045 TCameraThread * pipeline_cameraThread = new TCameraThread( pipeline_dispatcher, pipeline_camera, 40, 100 );
00046
00047
00048
00049
00050 TUnitLoader pipeline_unit01_loader;
00051
00052
00053 TUnitInterface * pipeline_unit01 =
00054 pipeline_unit01_loader.GetUnit_BASIC( "soubor_dll_s_jednotkou", pipeline_dispatcher );
00055
00056
00057 pipeline_unit01->Start();
00058
00059
00060
00061
00062
00063 pipeline_cameraThread->Start();
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074 pipeline_unit01->Stop();
00075 pipeline_unit01->Release();
00076 pipeline_unit01 = NULL;
00077
00078
00079
00080
00081 pipeline_cameraThread->Stop();
00082
00083
00084 pipeline_queue->Free();
00085 pipeline_dispatcher->Free();
00086
00087
00088 delete pipeline_cameraThread;
00089 pipeline_camera->Destroy();
00090 pipeline_camera = NULL;
00091 delete pipeline_cameraLoader;
00092
00093
00094 delete pipeline_dispatcher;
00095 delete pipeline_queue;
00096
00097
00098
00099 #endif
00100
00101 return 0;
00102 }