File: _video_device_linux_8h-source.html

package info (click to toggle)
camstream 0.27%2Bdfsg-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 12,320 kB
  • ctags: 5,393
  • sloc: cpp: 17,031; sh: 8,154; asm: 455; ansic: 440; makefile: 343
file content (134 lines) | stat: -rw-r--r-- 12,701 bytes parent folder | download | duplicates (2)
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.3.7 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>VideoDeviceLinux.h</h1><a href="_video_device_linux_8h.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 <span class="preprocessor">#ifndef VIDEO_DEVICE_LINUX_HPP</span>
00002 <span class="preprocessor"></span><span class="preprocessor">#define VIDEO_DEVICE_LINUX_HPP</span>
00003 <span class="preprocessor"></span>
00004 <span class="preprocessor">#include &lt;qglobal.h&gt;</span>
00005 
00006 <span class="preprocessor">#include &lt;qsocketnotifier.h&gt;</span>
00007 <span class="preprocessor">#include &lt;qtimer.h&gt;</span>
00008 
00009 <span class="preprocessor">#include "<a class="code" href="videodev_8h.html">videodev.h</a>"</span>
00010 <span class="preprocessor">#include &lt;sys/ioctl.h&gt;</span>
00011 
00012 <span class="preprocessor">#include "<a class="code" href="_video_device_8h.html">VideoDevice.h</a>"</span>
00013 <span class="preprocessor">#include "<a class="code" href="_video_device_options_8h.html">VideoDeviceOptions.h</a>"</span>
00014 <span class="preprocessor">#include "<a class="code" href="_video_settings_dlg_8h.html">VideoSettingsDlg.h</a>"</span>
00015 
00016 <span class="keyword">class </span><a class="code" href="class_c_video_device_input.html">CVideoDeviceInput</a>;
00017 <span class="keyword">class </span><a class="code" href="class_c_video_audio_input.html">CVideoAudioInput</a>;
00018 
<a name="l00019"></a><a class="code" href="class_c_video_device_linux.html">00019</a> <span class="keyword">class </span><a class="code" href="class_c_video_device_linux.html">CVideoDeviceLinux</a>: <span class="keyword">public</span> <a class="code" href="class_c_video_device.html">CVideoDevice</a>
00020 {
00021 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_c_video_device_input.html">CVideoDeviceInput</a>;
00022 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_c_video_audio_input.html">CVideoAudioInput</a>;
00023    Q_OBJECT
00024 <span class="keyword">private</span>:
00025    <span class="keywordtype">int</span> m_CamFD;
00026    <span class="keywordtype">bool</span> m_HasFramerate;
00027    <span class="keywordtype">int</span> m_Framerate;
00028    <span class="keywordtype">bool</span> m_StopCapture;
00029    QWaitCondition m_CaptureFinished;
00030 
00031    QSize m_MaxSize, m_MinSize;
00032    QSize m_RequestedSize;
00033 
00034    uchar *vid_io_buffer;                <span class="comment">// The buffer used for I/O; this can be mmap()ed or malloc()ed</span>
00035    QArray&lt;int&gt; vid_io_offsets;          <span class="comment">//, rgb_vid_offsets, yuv_vid_offsets;</span>
00036    <span class="keywordtype">int</span> vid_io_buffer_size, vid_io_image_size;
00037    <span class="keywordtype">int</span> m_Palette;
00038 
00039    QVector&lt;CVideoDeviceInput&gt; m_VideoInputs;
00040    <span class="keywordtype">int</span> m_CurrentVideoInput;
00041    QVector&lt;CVideoDeviceTuner&gt; m_Tuners;
00042    <span class="keywordtype">int</span> m_CurrentTuner;
00043    QVector&lt;CVideoAudioInput&gt; m_AudioInputs;
00044    <span class="keywordtype">int</span> m_CurrentAudioInput;
00045 
00046    <a class="code" href="class_c_video_device_options.html">CVideoDeviceOptions</a> *m_pSettings;
00047    <a class="code" href="class_c_video_settings_dlg.html">CVideoSettingsDlg</a> *pSettingsDlg;
00048 
00049    <span class="keyword">struct </span><a class="code" href="structvideo__picture.html">video_picture</a> m_VPic;
00050    <span class="keyword">struct </span><a class="code" href="structvideo__mbuf.html">video_mbuf</a> m_VMBuf;
00051    <span class="keyword">struct </span><a class="code" href="structvideo__mmap.html">video_mmap</a> m_VMMap;
00052 
00053    <span class="keywordtype">bool</span> TryPalette(<span class="keywordtype">int</span> palette, <span class="keywordtype">int</span> depth);
00054    <span class="keywordtype">void</span> SetPalette();
00055 
00056    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_c_video_device.html#b3">CreateImagesRGB</a>();
00057    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_c_video_device.html#b4">DeleteImagesRGB</a>();
00058    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_c_video_device.html#b5">CreateImagesYUV</a>();
00059    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_c_video_device.html#b6">DeleteImagesYUV</a>();
00060 
00061 <span class="keyword">private</span> slots:
00062    <span class="keywordtype">void</span> VideoInputSwitched(<span class="keywordtype">int</span>);
00063    <span class="keywordtype">void</span> NewFrequency(<span class="keywordtype">float</span>);
00064 
00065 <span class="keyword">protected</span>:
00066    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="class_c_video_device_linux.html#b0">Init</a>();
00067    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_c_video_device_linux.html#b1">Exit</a>();
00068 
00069    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="class_c_video_device_linux.html#b2">StartCapture</a>();
00070    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_c_video_device_linux.html#b3">StopCapture</a>();
00071 
00072    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_c_video_device_linux.html#b4">run</a>();
00073 
00074 <span class="keyword">public</span>:
00075    <a class="code" href="class_c_video_device_linux.html">CVideoDeviceLinux</a>(<span class="keyword">const</span> QString &amp;node_name);
00076    <a class="code" href="class_c_video_device_linux.html#a1">~CVideoDeviceLinux</a>();
00077 
00078    <span class="keywordtype">void</span> <a class="code" href="class_c_video_device_linux.html#a2">SetConfiguration</a>(<span class="keyword">const</span> QDomNode &amp;);
00079    <span class="keywordtype">void</span> <a class="code" href="class_c_video_device_linux.html#a3">GetConfiguration</a>(QDomNode &amp;) <span class="keyword">const</span>;
00080 
00081    <span class="keyword">virtual</span> <span class="keywordtype">long</span> <a class="code" href="class_c_video_device_linux.html#a4">GetDescriptor</a>() <span class="keyword">const</span>;
00082 
00083    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_c_video_device_linux.html#a5">Mute</a>(<span class="keywordtype">bool</span> on) <span class="keyword">const</span>;
00084 
00085    <span class="comment">/* These are for Linux only */</span>
00086    QSize <a class="code" href="class_c_video_device_linux.html#a6">GetMinSize</a>() <span class="keyword">const</span>;
00087    QSize <a class="code" href="class_c_video_device_linux.html#a7">GetMaxSize</a>() <span class="keyword">const</span>;
00088    <span class="keywordtype">void</span> <a class="code" href="class_c_video_device_linux.html#a8">SetSize</a>(<span class="keyword">const</span> QSize &amp;new_size);
00089    <span class="keywordtype">bool</span> <a class="code" href="class_c_video_device_linux.html#a9">HasFramerate</a>() <span class="keyword">const</span>;
00090    <span class="keywordtype">int</span> <a class="code" href="class_c_video_device_linux.html#a10">GetFramerate</a>() <span class="keyword">const</span>;
00091    <span class="keywordtype">void</span> <a class="code" href="class_c_video_device_linux.html#a11">SetFramerate</a>(<span class="keywordtype">int</span> fps);
00092 
00093    <span class="keywordtype">int</span> <a class="code" href="class_c_video_device_linux.html#a12">GetBrightness</a>() <span class="keyword">const</span>;
00094    <span class="keywordtype">bool</span> <a class="code" href="class_c_video_device_linux.html#a13">SetBrightness</a>(<span class="keywordtype">int</span> val);
00095    <span class="keywordtype">int</span> <a class="code" href="class_c_video_device_linux.html#a14">GetContrast</a>() <span class="keyword">const</span>;
00096    <span class="keywordtype">bool</span> <a class="code" href="class_c_video_device_linux.html#a15">SetContrast</a>(<span class="keywordtype">int</span> val);
00097    <span class="keywordtype">int</span> <a class="code" href="class_c_video_device_linux.html#a16">GetHue</a>() <span class="keyword">const</span>;
00098    <span class="keywordtype">bool</span> <a class="code" href="class_c_video_device_linux.html#a17">SetHue</a>(<span class="keywordtype">int</span> val);
00099    <span class="keywordtype">int</span> <a class="code" href="class_c_video_device_linux.html#a18">GetColour</a>() <span class="keyword">const</span>;
00100    <span class="keywordtype">bool</span> <a class="code" href="class_c_video_device_linux.html#a19">SetColour</a>(<span class="keywordtype">int</span> val);
00101    <span class="keywordtype">int</span> <a class="code" href="class_c_video_device_linux.html#a20">GetWhiteness</a>() <span class="keyword">const</span>;
00102    <span class="keywordtype">bool</span> <a class="code" href="class_c_video_device_linux.html#a21">SetWhiteness</a>(<span class="keywordtype">int</span> val);
00103 
00104    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="class_c_video_device_linux.html#a22">GetNumberOfInputs</a>() <span class="keyword">const</span>;
00105    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_c_video_device_linux.html#a23">SetInput</a>(<span class="keywordtype">int</span>);
00106    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="class_c_video_device_linux.html#a24">GetInput</a>() <span class="keyword">const</span>;
00107    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="class_c_video_device_linux.html#a25">GetNumberOfTuners</a>() <span class="keyword">const</span>;
00108    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_c_video_device_linux.html#a26">SetTuner</a>(<span class="keywordtype">int</span>);
00109    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="class_c_video_device_linux.html#a27">GetTuner</a>() <span class="keyword">const</span>;
00110 
00111    <a class="code" href="class_c_video_device_input.html">CVideoDeviceInput</a> *<a class="code" href="class_c_video_device_linux.html#a28">GetVideoInput</a>(<span class="keywordtype">int</span> number = -1) <span class="keyword">const</span>;
00112    <a class="code" href="class_c_video_device_tuner.html">CVideoDeviceTuner</a> *<a class="code" href="class_c_video_device_linux.html#a29">GetVideoTuner</a>(<span class="keywordtype">int</span> number = -1) <span class="keyword">const</span>;
00113 
00114 <span class="keyword">public</span>: <span class="comment">/* overloaded slots */</span>
00115    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_c_video_device_linux.html#a30">ShowDisplayDialog</a>();
00116    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_c_video_device_linux.html#a31">ShowFormatDialog</a>();
00117    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_c_video_device_linux.html#a32">ShowSourceDialog</a>();
00118 };
00119 
00120 <span class="preprocessor">#endif</span>
</div></pre><hr size="1"><address style="align: right;"><small>Generated on Wed Dec 13 23:38:46 2006 for CamStream by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.7 </small></address>
</body>
</html>