Ajout de l'ensemble du workspace.
[GPU.git] / WCudaMSE / BilatTools_OpenCV / src / core / capture / header / CaptureVideo.h
1 #ifndef CAPTURE_VIDEO_H_
2 #define CAPTURE_VIDEO_H_
3
4 #include "Capture_A.h"
5
6 using namespace cv;
7
8 /*----------------------------------------------------------------------*\
9 |* Declaration *|
10 \*---------------------------------------------------------------------*/
11
12 /*--------------------------------------*\
13 |* Public *|
14 \*-------------------------------------*/
15
16 /**
17 * http://opencv.willowgarage.com/wiki/VideoCodecs
18 *
19 * AVI 'I420' RAW I420 Uncompressed YUV, 4:2:0 chroma subsampled
20 *
21 * Soft convertion :
22 * (S1) mencoder
23 * http://www.mplayerhq.hu/design7/dload.html
24 * console: mencoder in.avi -ovc raw -vf format=i420 -oac mp3lame -o out.avi
25 * http://smplayer.sourceforge.net/
26 *
27 *
28 * sudo apt-get install mencoder
29 *
30 * (S2) VirtualDub
31 */
32 class CaptureVideo: public Capture_A
33 {
34 /*--------------------------------------*\
35 |* Constructor *|
36 \*-------------------------------------*/
37
38 public:
39
40 CaptureVideo(const string& videoName, const string& title,uchar4* ptrHostMemory=NULL);
41 virtual ~CaptureVideo(void);
42
43 /*--------------------------------------*\
44 |* Methodes *|
45 \*-------------------------------------*/
46
47 public:
48
49 /**
50 * Temps a attendre entre 2 captures pour respecter fps original
51 */
52 int dtOriginalMS(void); // Override
53
54 string getVideoName(void);
55
56 void printInfo(void); // Override
57
58 int fpsOriginal(void);
59 bool isFpsOriginalKnown(void);
60
61 private:
62
63 void configure(void);
64 VideoCapture* createStream(const string& videoName);
65
66 protected:
67
68 virtual void readStream(VideoCapture* ptrCaptureStream, Mat* ptrMatCaptureSrc);
69
70 /*--------------------------------------*\
71 |* Attributs *|
72 \*-------------------------------------*/
73
74 private:
75
76 // Inputs
77 string videoName;
78
79 // Outputs
80 int dtSourceMS;
81 bool isFpsSourceConnu;
82 int fpsSource;
83
84 };
85
86 #endif
87
88 /*----------------------------------------------------------------------*\
89 |* End *|
90 \*---------------------------------------------------------------------*/