1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
|
<html>
<head>
<title>Camstream: CamStream API documentation</title>
<link rel="stylesheet" href="../../tech.css" type="text/css">
</head>
<body>
<!-- Generated by Doxygen 1.2.6 -->
<center>
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center>
<hr><h1>VideoDevice.h</h1><a href="videodevice_h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="preprocessor">#ifndef VIDEO_DEVICE_HPP</font>
00002 <font class="preprocessor"></font><font class="preprocessor">#define VIDEO_DEVICE_HPP</font>
00003 <font class="preprocessor"></font>
00004 <font class="preprocessor">#include <sys/ioctl.h></font>
00005 <font class="preprocessor">#include <sys/types.h></font>
00006 <font class="preprocessor">#include <linux/videodev.h></font>
00007
00008 <font class="preprocessor">#include <qimage.h></font>
00009 <font class="preprocessor">#include <qobject.h></font>
00010 <font class="preprocessor">#include <qsocketnotifier.h></font>
00011 <font class="preprocessor">#include <qtimer.h></font>
00012 <font class="preprocessor">#include <qvector.h></font>
00013
00014 <font class="preprocessor">#include "<a class="code" href="videodeviceinput_h.html">VideoDeviceInput.h</a>"</font>
00015
00016 <font class="keyword">class </font><a class="code" href="class_cvideodevice.html">CVideoDevice</a>: <font class="keyword">public</font> <a class="code" href="class_qobject.html">QObject</a>
00017 {
<a name="l00018"></a><a class="code" href="class_cvideodevice.html#l0">00018</a> <font class="keyword">friend</font> <font class="keyword">class </font><a class="code" href="class_cvideodeviceinput.html">CVideoDeviceInput</a>;
<a name="l00019"></a><a class="code" href="class_cvideodevice.html#l1">00019</a> <font class="keyword">friend</font> <font class="keyword">class </font><a class="code" href="class_cvideodevicetuner.html">CVideoDeviceTuner</a>;
00020 Q_OBJECT
00021 <font class="keyword">private</font>:
00022 <font class="keywordtype">bool</font> validated;
00023 QString NodeName, IntfName;
00024 <font class="keywordtype">int</font> CamFD, Opened;
00025 <font class="keywordtype">bool</font> UseSelect, HasFramerate;
00026 <font class="keywordtype">int</font> Palette, FrameRate;
00027 <font class="keywordtype">int</font> PalRGB, PalYUV;
00028 <font class="keyword">struct </font>video_picture VPic;
00029 <font class="keyword">struct </font>video_mbuf VMBuf;
00030 <font class="keywordtype">int</font> Buffers, CurBuffer;
00031
00032 QVector <CVideoDeviceInput>Inputs;
00033 <font class="keywordtype">int</font> CurrentInput;
00034
00035 QImage *RGB, *Y, *U, *V;
00036 <font class="keywordtype">int</font> image_w, image_h;
00037 <font class="keywordtype">int</font> max_w, max_h;
00038 <font class="keywordtype">int</font> min_w, min_h;
00039 uchar *vid_buffer;
00040 <font class="keywordtype">int</font> vid_buffer_size, image_buffer_size;
00041
00042 QSocketNotifier *pImageSocket;
00043 QTimer *pImageTimer;
00044
00045 <font class="keywordtype">void</font> Init(<font class="keywordtype">bool</font> First = FALSE);
00046 <font class="keywordtype">void</font> CleanUp();
00047 <font class="keywordtype">bool</font> TryPalette(<font class="keywordtype">int</font> pal, <font class="keywordtype">int</font> depth);
00048 <font class="keywordtype">void</font> SetPalette();
00049
00050 <font class="keywordtype">int</font> MCapture(<font class="keywordtype">int</font> buf);
00051 <font class="keywordtype">int</font> MSync();
00052
00053 <font class="keywordtype">void</font> CreateImagesRGB();
00054 <font class="keywordtype">void</font> ResetImagesRGB();
00055 <font class="keywordtype">void</font> CreateImagesYUV();
00056 <font class="keywordtype">void</font> ResetImagesYUV();
00057
00058 <font class="keyword">private</font> slots:
00059 <font class="keywordtype">void</font> LoadImage();
00060
00061 <font class="keyword">public</font>:
00062 <a class="code" href="class_cvideodevice.html#a0">CVideoDevice</a>(<font class="keyword">const</font> QString &node_name);
00063 <a class="code" href="class_cvideodevice.html#a1">~CVideoDevice</a>();
00064
00065 <font class="keywordtype">bool</font> <a class="code" href="class_cvideodevice.html#a2">IsValid</a>();
00066
00067 <font class="keywordtype">int</font> <a class="code" href="class_cvideodevice.html#a3">Open</a>(<font class="keywordtype">int</font> buffers = 1);
00068 <font class="keywordtype">void</font> <a class="code" href="class_cvideodevice.html#a4">Close</a>();
00069 <font class="keywordtype">int</font> <a class="code" href="class_cvideodevice.html#a5">GetDescriptor</a>() <font class="keyword">const</font>;
00070
00071 <font class="keywordtype">void</font> <a class="code" href="class_cvideodevice.html#a6">EnableRGB</a>(<font class="keywordtype">bool</font> isOn);
00072 <font class="keywordtype">void</font> <a class="code" href="class_cvideodevice.html#a7">EnableYUV</a>(<font class="keywordtype">bool</font> isOn);
00073
00074 QString <a class="code" href="class_cvideodevice.html#a8">GetNodeName</a>() <font class="keyword">const</font>;
00075 QString <a class="code" href="class_cvideodevice.html#a9">GetIntfName</a>() <font class="keyword">const</font>;
00076
00077 QSize <a class="code" href="class_cvideodevice.html#a10">GetMinSize</a>() <font class="keyword">const</font>;
00078 QSize <a class="code" href="class_cvideodevice.html#a11">GetSize</a>();
00079 QSize <a class="code" href="class_cvideodevice.html#a12">GetMaxSize</a>() <font class="keyword">const</font>;
00080 <font class="keywordtype">bool</font> <a class="code" href="class_cvideodevice.html#a13">SetSize</a>(<font class="keywordtype">int</font> width, <font class="keywordtype">int</font> height);
00081 <font class="keywordtype">bool</font> <a class="code" href="class_cvideodevice.html#a13">SetSize</a>(<font class="keyword">const</font> QSize &new_size);
00082 <font class="keywordtype">int</font> <a class="code" href="class_cvideodevice.html#a15">GetFramerate</a>() <font class="keyword">const</font>;
00083 <font class="keywordtype">bool</font> <a class="code" href="class_cvideodevice.html#a16">SetFramerate</a>(<font class="keywordtype">int</font> fps, <font class="keywordtype">bool</font> snap = FALSE);
00084 <font class="keywordtype">int</font> <a class="code" href="class_cvideodevice.html#a17">GetMBuffers</a>() <font class="keyword">const</font>;
00085
00086 <font class="keywordtype">int</font> <a class="code" href="class_cvideodevice.html#a18">GetInputs</a>() <font class="keyword">const</font>;
00087 <font class="keywordtype">int</font> <a class="code" href="class_cvideodevice.html#a19">GetCurrentInput</a>() <font class="keyword">const</font>;
00088 <a class="code" href="class_cvideodeviceinput.html">CVideoDeviceInput</a> *<a class="code" href="class_cvideodevice.html#a20">GetInput</a>(<font class="keywordtype">int</font> number) <font class="keyword">const</font>;
00089 <font class="keywordtype">bool</font> <a class="code" href="class_cvideodevice.html#a21">SelectInput</a>(<font class="keywordtype">int</font> number);
00090
00091 <font class="keywordtype">int</font> <a class="code" href="class_cvideodevice.html#a22">GetBrightness</a>() <font class="keyword">const</font>;
00092 <font class="keywordtype">bool</font> <a class="code" href="class_cvideodevice.html#a23">SetBrightness</a>(<font class="keywordtype">int</font> val);
00093 <font class="keywordtype">int</font> <a class="code" href="class_cvideodevice.html#a24">GetContrast</a>() <font class="keyword">const</font>;
00094 <font class="keywordtype">bool</font> <a class="code" href="class_cvideodevice.html#a25">SetContrast</a>(<font class="keywordtype">int</font> val);
00095 <font class="keywordtype">int</font> <a class="code" href="class_cvideodevice.html#a26">GetHue</a>() <font class="keyword">const</font>;
00096 <font class="keywordtype">bool</font> <a class="code" href="class_cvideodevice.html#a27">SetHue</a>(<font class="keywordtype">int</font> val);
00097 <font class="keywordtype">int</font> <a class="code" href="class_cvideodevice.html#a28">GetColour</a>() <font class="keyword">const</font>;
00098 <font class="keywordtype">bool</font> <a class="code" href="class_cvideodevice.html#a29">SetColour</a>(<font class="keywordtype">int</font> val);
00099 <font class="keywordtype">int</font> <a class="code" href="class_cvideodevice.html#a30">GetWhiteness</a>() <font class="keyword">const</font>;
00100 <font class="keywordtype">bool</font> <a class="code" href="class_cvideodevice.html#a31">SetWhiteness</a>(<font class="keywordtype">int</font> val);
00101
00102 <font class="keywordtype">int</font> <a class="code" href="class_cvideodevice.html#a32">ReadImage</a>();
00103
00104 QImage *<a class="code" href="class_cvideodevice.html#a33">GetRGB</a>(<font class="keywordtype">int</font> offset = 0) <font class="keyword">const</font>;
00105 QImage *<a class="code" href="class_cvideodevice.html#a34">GetY</a>(<font class="keywordtype">int</font> offset = 0) <font class="keyword">const</font>;
00106 QImage *<a class="code" href="class_cvideodevice.html#a35">GetU</a>(<font class="keywordtype">int</font> offset = 0) <font class="keyword">const</font>;
00107 QImage *<a class="code" href="class_cvideodevice.html#a36">GetV</a>(<font class="keywordtype">int</font> offset = 0) <font class="keyword">const</font>;
00108
00109 signals:
00111 <font class="keywordtype">void</font> <a class="code" href="class_cvideodevice.html#j0">Notify</a>();
00113 <font class="keywordtype">void</font> <a class="code" href="class_cvideodevice.html#j1">Resized</a>(<font class="keyword">const</font> QSize &new_size);
00115 <font class="keywordtype">void</font> <a class="code" href="class_cvideodevice.html#j2">ChangedInput</a>(<font class="keywordtype">int</font> input);
00117 <font class="keywordtype">void</font> <a class="code" href="class_cvideodevice.html#j3">ChangedTunerNorm</a>(<font class="keywordtype">int</font> tuner, <font class="keywordtype">int</font> norm);
00119 <font class="keywordtype">void</font> <a class="code" href="class_cvideodevice.html#j4">Error</a>(<font class="keywordtype">int</font> err_num);
00120 };
00121
00122 <font class="preprocessor">#endif</font>
</font></pre></div><hr><address><small>Generated at Wed Jun 20 02:51:23 2001 for Camstream by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.gif" alt="doxygen" align="middle" border=0
width=110 height=53></a>1.2.6 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
© 1997-2001</small></address>
</body>
</html>
|