File: class_cvideodeviceinput.html

package info (click to toggle)
camstream 0.25-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,996 kB
  • ctags: 1,478
  • sloc: cpp: 6,074; asm: 1,033; makefile: 272
file content (577 lines) | stat: -rw-r--r-- 16,187 bytes parent folder | download
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
<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> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
<hr><h1>CVideoDeviceInput  Class Reference</h1><code>#include &lt;<a class="el" href="videodeviceinput_h-source.html">VideoDeviceInput.h</a>&gt;</code>
<p>
<p>Inheritance diagram for CVideoDeviceInput::
<p><center><img src="class_cvideodeviceinput.gif" usemap="#CVideoDeviceInput_map" border="0"></center>
<map name="CVideoDeviceInput_map">
<area href="class_qobject.html" alt="QObject" shape="rect" coords="0,0,121,24">
</map>
<a href="class_cvideodeviceinput-members.html">List of all members.</a><h2>Public Types</h2>
<ul>
<li>enum { <a class="el" href="class_cvideodeviceinput.html#s11s0">Unknown</a>, 
<a class="el" href="class_cvideodeviceinput.html#s11s1">TV</a>, 
<a class="el" href="class_cvideodeviceinput.html#s11s2">Camera</a>
 }
<li>enum { <br>
&nbsp;&nbsp;<a class="el" href="class_cvideodeviceinput.html#s12s3">PAL</a>, 
<a class="el" href="class_cvideodeviceinput.html#s12s4">NTSC</a>, 
<a class="el" href="class_cvideodeviceinput.html#s12s5">SECAM</a>, 
<a class="el" href="class_cvideodeviceinput.html#s12s6">PAL_NC</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="class_cvideodeviceinput.html#s12s7">PAL_M</a>, 
<a class="el" href="class_cvideodeviceinput.html#s12s8">PAL_N</a>, 
<a class="el" href="class_cvideodeviceinput.html#s12s9">NTSC_JAPAN</a>, 
<a class="el" href="class_cvideodeviceinput.html#s12s10">MAX</a>
<br>
 }
</ul>
<h2>Public Methods</h2>
<ul>
<li><a class="el" href="class_cvideodeviceinput.html#a0">CVideoDeviceInput</a> (<a class="el" href="class_cvideodevice.html">CVideoDevice</a> *video, int channel)
<li>int <a class="el" href="class_cvideodeviceinput.html#a1">GetNumber</a> () const
<li>QString <a class="el" href="class_cvideodeviceinput.html#a2">GetName</a> () const
<li>bool <a class="el" href="class_cvideodeviceinput.html#a3">HasAudio</a> () const
<li>int <a class="el" href="class_cvideodeviceinput.html#a4">GetType</a> () const
<li>int <a class="el" href="class_cvideodeviceinput.html#a5">GetTuners</a> () const
<li>int <a class="el" href="class_cvideodeviceinput.html#a6">GetCurrentTuner</a> () const
<li><a class="el" href="class_cvideodevicetuner.html">CVideoDeviceTuner</a>* <a class="el" href="class_cvideodeviceinput.html#a7">GetTuner</a> (int number) const
<li>bool <a class="el" href="class_cvideodeviceinput.html#a8">SelectTuner</a> (int number)
<li>void <a class="el" href="class_cvideodeviceinput.html#a9">SetNorm</a> (int norm)
<li>bool <a class="el" href="class_cvideodeviceinput.html#a10">Select</a> ()
</ul>
<h2>Public Attributes</h2>
<ul>
<li>enum CVideoDeviceInput:: { ... }   <a class="el" href="class_cvideodeviceinput.html#m0">InputTypes</a>
<li>enum CVideoDeviceInput:: { ... }   <a class="el" href="class_cvideodeviceinput.html#m1">TunerNorms</a>
</ul>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Every video device has one or more inputs (called channels in the Video4Linux API). Each input refers to one of the physical inputs on the card/chip, like Tuner, Composite, S-video, etc. This class represents such an input.
<p>
In addition, each input can have 0 or more tuners attached to it (to keep matters simple...). A tuner does the actual frequency setting, and is  represented by a <a class="el" href="class_cvideodevicetuner.html">CVideoDeviceTuner</a> class.
<p>
There are three basic TV systems on this planet: PAL, NTSC and SECAM. There are also small variations in these systems, called <em>norms</em>. There are norms like PAL-B, -D, -G, -H, -I, M, -N, -MC; NTSC has two versions, `plain' NTSC (as used in the USA) and NTSC-Japan. SECAM seems to have only one norm. In practice, these norms are all the same when viewing a broadcast; as far as I know the main difference lies in the assignment of the hidden line numbers to services like TeleText, Closed Captioning, etc.
<p>
The Video4Linux API unfortunately has two different places where you set norm and system. You set the norm with the channel, and the system within the tuner. Within the BTTV driver, these are mixed up: norm = system.  The VIDIOCSCHAN call allows you to set NTSC-JAPAN, for example, yet VIDIOCSTUNER limits it to PAL, NTSC and SECAM only. For this reason the norm selection has been incorporated into this class. 
<p>
<hr><h2>Member Enumeration Documentation</h2>
<a name="s11" doxytag="CVideoDeviceInput::@8"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
anonymous enum
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<dl compact><dt>
<b>Enumeration values:</b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><a name="s11s0" doxytag="Unknown"></a><em>Unknown</em>
&nbsp;</td><td>
</td></tr>
<tr><td valign=top><a name="s11s1" doxytag="TV"></a><em>TV</em>
&nbsp;</td><td>
</td></tr>
<tr><td valign=top><a name="s11s2" doxytag="Camera"></a><em>Camera</em>
&nbsp;</td><td>
</td></tr>
</table>
</dl>
    </td>
  </tr>
</table>
<a name="s12" doxytag="CVideoDeviceInput::@9"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
anonymous enum
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<dl compact><dt>
<b>Enumeration values:</b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><a name="s12s3" doxytag="PAL"></a><em>PAL</em>
&nbsp;</td><td>
</td></tr>
<tr><td valign=top><a name="s12s4" doxytag="NTSC"></a><em>NTSC</em>
&nbsp;</td><td>
</td></tr>
<tr><td valign=top><a name="s12s5" doxytag="SECAM"></a><em>SECAM</em>
&nbsp;</td><td>
</td></tr>
<tr><td valign=top><a name="s12s6" doxytag="PAL_NC"></a><em>PAL_NC</em>
&nbsp;</td><td>
</td></tr>
<tr><td valign=top><a name="s12s7" doxytag="PAL_M"></a><em>PAL_M</em>
&nbsp;</td><td>
</td></tr>
<tr><td valign=top><a name="s12s8" doxytag="PAL_N"></a><em>PAL_N</em>
&nbsp;</td><td>
</td></tr>
<tr><td valign=top><a name="s12s9" doxytag="NTSC_JAPAN"></a><em>NTSC_JAPAN</em>
&nbsp;</td><td>
</td></tr>
<tr><td valign=top><a name="s12s10" doxytag="MAX"></a><em>MAX</em>
&nbsp;</td><td>
</td></tr>
</table>
</dl>
    </td>
  </tr>
</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="a0" doxytag="CVideoDeviceInput::CVideoDeviceInput"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
CVideoDeviceInput::CVideoDeviceInput (
          </b></td>
          <td valign="bottom"><b>
<a class="el" href="class_cvideodevice.html">CVideoDevice</a> * <em>video</em>, 
          </b></td>
        </tr>
        <tr>
          <td></td>
          <td><b>
int <em>channel</em>&nbsp;)
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Constructor.
<p>

<p>
 In the constructor the channel information is queried and stored. It will also create any Tuner objects that may be needed.     </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="a6" doxytag="CVideoDeviceInput::GetCurrentTuner"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
int CVideoDeviceInput::GetCurrentTuner (
          </b></td>
          <td valign="bottom"><b>
) const
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return current tuner number.
<p>
<dl compact><dt>
<b>Returns: </b><dd>
Tuner number, or -1 if the current tuner is unknown
<p>
</dl>Since there is no way to query the current selected tuner from the device, this function returns -1 until a tuner has been selected.     </td>
  </tr>
</table>
<a name="a2" doxytag="CVideoDeviceInput::GetName"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
QString CVideoDeviceInput::GetName (
          </b></td>
          <td valign="bottom"><b>
) const
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return symbolic name for input.
<p>
    </td>
  </tr>
</table>
<a name="a1" doxytag="CVideoDeviceInput::GetNumber"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
int CVideoDeviceInput::GetNumber (
          </b></td>
          <td valign="bottom"><b>
) const
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return channel number.
<p>
    </td>
  </tr>
</table>
<a name="a7" doxytag="CVideoDeviceInput::GetTuner"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
<a class="el" href="class_cvideodevicetuner.html">CVideoDeviceTuner</a> * CVideoDeviceInput::GetTuner (
          </b></td>
          <td valign="bottom"><b>
int <em>number</em>&nbsp;) const
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="a5" doxytag="CVideoDeviceInput::GetTuners"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
int CVideoDeviceInput::GetTuners (
          </b></td>
          <td valign="bottom"><b>
) const
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return number of tuners.
<p>

<p>
 Most inputs don't have a tuner, or at most 1. Multiple tuners could be used for multi-norm cards (each norm having a separate tuner), but this hasn't happend sofar.     </td>
  </tr>
</table>
<a name="a4" doxytag="CVideoDeviceInput::GetType"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
int CVideoDeviceInput::GetType (
          </b></td>
          <td valign="bottom"><b>
) const
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return type for this input.
<p>

<p>
 Returns a value from the <a class="el" href="class_cvideodeviceinput.html#m0">InputTypes</a> enum, either TV or Camera     </td>
  </tr>
</table>
<a name="a3" doxytag="CVideoDeviceInput::HasAudio"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
bool CVideoDeviceInput::HasAudio (
          </b></td>
          <td valign="bottom"><b>
) const
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns whether this input has an audio channel associated with it.
<p>
    </td>
  </tr>
</table>
<a name="a10" doxytag="CVideoDeviceInput::Select"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
bool CVideoDeviceInput::Select (
          </b></td>
          <td valign="bottom"><b>
)
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Make this input the current one.
<p>

<p>
     </td>
  </tr>
</table>
<a name="a8" doxytag="CVideoDeviceInput::SelectTuner"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
bool CVideoDeviceInput::SelectTuner (
          </b></td>
          <td valign="bottom"><b>
int <em>number</em>&nbsp;)
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="a9" doxytag="CVideoDeviceInput::SetNorm"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
void CVideoDeviceInput::SetNorm (
          </b></td>
          <td valign="bottom"><b>
int <em>norm</em>&nbsp;)
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a name="m0" doxytag="CVideoDeviceInput::InputTypes"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
enum { ... }   CVideoDeviceInput::InputTypes
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="m1" doxytag="CVideoDeviceInput::TunerNorms"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
enum { ... }   CVideoDeviceInput::TunerNorms
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="videodeviceinput_cc.html">VideoDeviceInput.cc</a><li><a class="el" href="videodeviceinput_h-source.html">VideoDeviceInput.h</a></ul>
<hr><address><small>Generated at Wed Jun 20 02:51:26 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>,
 &copy;&nbsp;1997-2001</small></address>
</body>
</html>