#include <v4l.h>
Inheritance diagram for V4LChannel:


Public Member Functions | |
| V4LChannel (V4LDevice *device, int index) | |
| virtual | ~V4LChannel () |
| void * | getStruct () |
| char * | getName () |
| bool | setTuner (unsigned int index) |
| unsigned int | getNumberOfTuners () |
| V4LTuner * | getTuner (unsigned int index) |
| int | getSignal () |
| void | report () |
Private Attributes | |
| V4LDevice * | device |
| video_channel | channel |
| vector< V4LTuner * > | tuners |
| V4LTuner * | current |
|
||||||||||||
|
Definition at line 252 of file v4l.cc. References channel, getNumberOfTuners(), V4LDevice::request(), and tuners. 00253 {
00254 memset( &channel, 0, sizeof( struct video_channel ) );
00255 this->device = device;
00256 this->channel.channel = index;
00257 device->request( VIDIOCGCHAN, this );
00258 device->request( VIDIOCSCHAN, this );
00259 for ( unsigned int i = 0; i < getNumberOfTuners(); i ++ )
00260 {
00261 V4LTuner *tuner = new V4LTuner( this->device, i );
00262 tuners.insert( tuners.end(), tuner );
00263 }
00264 }
|
|
|
Definition at line 266 of file v4l.cc. 00267 {
00268 cout << "Channel destroyed" << endl;
00269 }
|
|
|
Definition at line 276 of file v4l.cc. References channel. Referenced by report(). 00277 {
00278 return channel.name;
00279 }
|
|
|
Definition at line 297 of file v4l.cc. References channel. Referenced by V4L::getNumberOfTuners(), report(), and V4LChannel(). 00298 {
00299 return channel.tuners;
00300 }
|
|
|
Definition at line 314 of file v4l.cc. References current, device, V4LTuner::getSignal(), and V4LDevice::request(). Referenced by V4L::getSignal().
|
|
|
Implements V4LStruct. Definition at line 271 of file v4l.cc. References channel. 00272 {
00273 return & channel;
00274 }
|
|
|
Definition at line 302 of file v4l.cc. References tuners. Referenced by V4L::getTuner(). 00303 {
00304 if ( index >= 0 && index < tuners.size() )
00305 {
00306 return tuners[ index ];
00307 }
00308 else
00309 {
00310 return NULL;
00311 }
00312 }
|
|
|
Definition at line 320 of file v4l.cc. References channel, getName(), and getNumberOfTuners(). 00321 {
00322 cout << ">>>> Channel # " << channel.channel << endl;
00323 cout << ">>>> Name : " << this->getName() << endl;
00324 cout << ">>>> Tuners : " << this->getNumberOfTuners() << endl;
00325 cout << ">>>> Flags : " << endl;
00326 if ( channel.flags & VIDEO_VC_TUNER )
00327 cout << " Channel has tuners" << endl;
00328 if ( channel.flags & VIDEO_VC_AUDIO )
00329 cout << " Channel has audio" << endl;
00330 cout << ">>>> Type : " << endl;
00331 if ( channel.type & VIDEO_TYPE_TV )
00332 cout << " TV" << endl;
00333 if ( channel.type & VIDEO_TYPE_CAMERA )
00334 cout << " Camera" << endl;
00335 }
|
|
|
Definition at line 281 of file v4l.cc. References current, device, V4LDevice::request(), V4LTuner::setRangeHigh(), V4LTuner::setRangeLow(), and tuners. Referenced by V4L::setTuner(). 00282 {
00283 if ( index >= 0 && index < tuners.size() )
00284 {
00285 current = tuners[ index ];
00286 // FIXME: Hardcoded tuner settings
00287 current->setRangeLow( 0 );
00288 current->setRangeHigh( 0xffff );
00289 return device->request( VIDIOCSTUNER, current );
00290 }
00291 else
00292 {
00293 return false;
00294 }
00295 }
|
|
|
Definition at line 124 of file v4l.h. Referenced by getName(), getNumberOfTuners(), getStruct(), report(), and V4LChannel(). |
|
|
Definition at line 126 of file v4l.h. Referenced by getSignal(), and setTuner(). |
|
|
Definition at line 123 of file v4l.h. Referenced by getSignal(), and setTuner(). |
|
|
Definition at line 125 of file v4l.h. Referenced by getTuner(), setTuner(), and V4LChannel(). |
1.4.2