Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

L1394::AvcCamera Class Reference
[L1394_Device]

This class implements the interface of a camera, defined in AV/C camera subunit Specification (Version 2.1). More...

#include <l1394_avccamera.h>

Inheritance diagram for L1394::AvcCamera:

L1394::Camera L1394::Device List of all members.

Public Member Functions

virtual int setParameter (const int buffercount=4, const int channel=63, const Isomode isomode=DEVICE_ISO_RUN, const Videomode videomode=DEVICE_DV, const Framerate framerate=DEVICE_FRAMES_DV)
 This method set the parameter of a camera.
AvcCamera constructor
These functions create/delete an AvcCamera.

 AvcCamera (FcpNode *parent_node, const int subunit_value)
 This method creates an AvcCamera.
virtual ~AvcCamera ()
 destructor
Camera information
These functions return some camera specific information.

virtual bool hasVideoFormat (const Videomode videomode)
 This method tests, if a videomode is supported by a Camera.
virtual bool hasFramerate (const Videomode videomode, const Framerate framerate)
 This method tests, if a framerate, with a videomode is supported by the camera.
Basic functions
These functions implement the basic functions, defined in abstract class Device.

virtual int start ()
 This method starts a FireWire device and iso-receive.
virtual int stop ()
 This method stops a sending device and the Iso-receive.
AV/C Camera Interface
These functions describe the interface of an AV/C camera

virtual const CameraRegisterbrightness ()
 Access 'Brightness' feature register.
virtual const CameraRegisterautoExposure ()
 Access 'Auto-Exposure' feature register.
virtual const CameraRegistersharpness ()
 Access 'Sharpness' feature register.
virtual const CameraRegisterwhiteBalance ()
 Access 'White-Balance' feature register.
virtual const CameraRegisterwhiteBalance (const int)
 Access 'White-Balance' feature register.
virtual const CameraRegisterhue ()
 Access 'Hue' feature register.
virtual const CameraRegistersaturation ()
 Access 'Saturation' feature register.
virtual const CameraRegistergamma ()
 Access 'Gamma' feature register.
virtual const CameraRegistershutter ()
 Access 'Shutter' feature register.
virtual const CameraRegistergain ()
 Access 'Gain' feature register.
virtual const CameraRegisteriris ()
 Access 'Iris' feature register.
virtual const CameraRegisterfocus ()
 Access 'Focus' feature register.
virtual const CameraRegistertemperature ()
 Access 'Temperature' feature register.
virtual const CameraRegistertrigger ()
 Access 'Trigger' feature register.
virtual const CameraRegisterzoom ()
 Access 'Zoom' feature register.
virtual const CameraRegisterpan ()
 Access 'Pan' feature register.
virtual const CameraRegistertilt ()
 Access 'Tilt' feature register.
virtual const CameraRegisterfilter ()
 Access 'Filter' feature register.

Detailed Description

This class implements the interface of a camera, defined in AV/C camera subunit Specification (Version 2.1).

The mechanism to create commands is the same, as described in class Camera .

The Session class provides also functions to get explicit AvcCameras. So the example in the Camera class documentation can be changed, if you need an AvcCamera.

 Session* session = GetSession();
 AvcCamera* camera = session->findAvcCamera(); //get explicit a AvcCamera
 if (camera == NULL)
 {
   cout << "No AvcCamera found" << endl;
   exit(0);
 }
 if (camera->zoom()->hasFeature())  //if the camera support zoom
   camera->zoom()->setValue(camera->zoom()->getMinValue()); //set zoom value to the minimum value.
 else
   cout << " Feature not supported " << endl;
For more information about controling a device see the tutorial.

To start the isochronous transaction, the method init() must be called, to allocate resources. The camera is set to default parameters, that can be changed with method setParameter(). For AV/C Cameras you only can change the iso-channel and buffer count.

The AvcCamera class is still under develop. The control functions are not tested (I try it with two AV/C cameras and get NOT_IMPLEMENTED response for all features.)

Author:
Michael Repplinger

Definition at line 66 of file l1394_avccamera.h.


Constructor & Destructor Documentation

L1394::AvcCamera::AvcCamera FcpNode parent_node,
const int  subunit_value
 

This method creates an AvcCamera.

Parameters:
FcpNode* : pointer to the parent node.
subunit_value : The subunit value defines the subunit-type and the subunit-id of the device.

Definition at line 23 of file l1394_avccamera.cpp.

References L1394::DEVICE_DV, L1394::DEVICE_FRAMES_DV, L1394::DEVICE_ISO_RUN, L1394::Device::setFrameHeight(), L1394::Device::setFrameWidth(), and L1394::Device::setName().

L1394::AvcCamera::~AvcCamera  )  [virtual]
 

destructor

Definition at line 41 of file l1394_avccamera.cpp.


Member Function Documentation

virtual const CameraRegister* L1394::AvcCamera::autoExposure  )  [inline, virtual]
 

Access 'Auto-Exposure' feature register.

Implements L1394::Camera.

Definition at line 153 of file l1394_avccamera.h.

References L1394::AvcRegister::defaultSet().

virtual const CameraRegister* L1394::AvcCamera::brightness  )  [inline, virtual]
 

Access 'Brightness' feature register.

Implements L1394::Camera.

Definition at line 150 of file l1394_avccamera.h.

References L1394::AvcRegister::defaultSet().

virtual const CameraRegister* L1394::AvcCamera::filter  )  [inline, virtual]
 

Access 'Filter' feature register.

Implements L1394::Camera.

Definition at line 201 of file l1394_avccamera.h.

References L1394::AvcCameraRegister::setOffset().

virtual const CameraRegister* L1394::AvcCamera::focus  )  [inline, virtual]
 

Access 'Focus' feature register.

Implements L1394::Camera.

Definition at line 183 of file l1394_avccamera.h.

References L1394::AvcRegister::defaultSet().

virtual const CameraRegister* L1394::AvcCamera::gain  )  [inline, virtual]
 

Access 'Gain' feature register.

Implements L1394::Camera.

Definition at line 177 of file l1394_avccamera.h.

References L1394::AvcRegister::defaultSet().

virtual const CameraRegister* L1394::AvcCamera::gamma  )  [inline, virtual]
 

Access 'Gamma' feature register.

Implements L1394::Camera.

Definition at line 171 of file l1394_avccamera.h.

References L1394::AvcRegister::defaultSet().

L1394::AvcCamera::hasFramerate const Videomode  videomode,
const Framerate  framerate
[virtual]
 

This method tests, if a framerate, with a videomode is supported by the camera.

Parameters:
videomode : the videomode for the framerate.
framerate : the framerate that should be tested.
Returns:
bool : true, if a framerate is supported, false if not

Implements L1394::Device.

Definition at line 79 of file l1394_avccamera.cpp.

References L1394::DEVICE_DV, and L1394::DEVICE_FRAMES_DV.

L1394::AvcCamera::hasVideoFormat const Videomode  videomode  )  [inline, virtual]
 

This method tests, if a videomode is supported by a Camera.

Returns:
bool : true if the videomode is supported, false if not

Implements L1394::Device.

Definition at line 95 of file l1394_avccamera.h.

References L1394::DEVICE_DV.

virtual const CameraRegister* L1394::AvcCamera::hue  )  [inline, virtual]
 

Access 'Hue' feature register.

Implements L1394::Camera.

Definition at line 165 of file l1394_avccamera.h.

References L1394::AvcRegister::defaultSet().

virtual const CameraRegister* L1394::AvcCamera::iris  )  [inline, virtual]
 

Access 'Iris' feature register.

Implements L1394::Camera.

Definition at line 180 of file l1394_avccamera.h.

References L1394::AvcRegister::defaultSet().

virtual const CameraRegister* L1394::AvcCamera::pan  )  [inline, virtual]
 

Access 'Pan' feature register.

Implements L1394::Camera.

Definition at line 195 of file l1394_avccamera.h.

References L1394::AvcCameraRegister::setOffset().

virtual const CameraRegister* L1394::AvcCamera::saturation  )  [inline, virtual]
 

Access 'Saturation' feature register.

Implements L1394::Camera.

Definition at line 168 of file l1394_avccamera.h.

References L1394::AvcRegister::defaultSet().

L1394::AvcCamera::setParameter const int  buffercount = 4,
const int  channel = 63,
const Isomode  isomode = DEVICE_ISO_RUN,
const Videomode  videomode = DEVICE_DV,
const Framerate  framerate = DEVICE_FRAMES_DV
[virtual]
 

This method set the parameter of a camera.

At this time only the channel parameter has effect. An AV/C camera normally broadcasts the video data on channel 63. They has a fixed framerate and video format. So the parameters isomode, video_mode and framerate are ignored.

A short sample show an example to init an AvcCamera.

  Session *session = GetSession();
  int framerate = 0;
  AvcCamera *camera = session->findAvcCamera();
  camera->setParameter() //set the default parameter (channel = 63, buffers = 3)
  if (camera->init() == L1394_SUCCESS)
    camera->start();
  else
    cout << "Camera init failed" << endl;

Parameters:
isomode : only running mode
nbuffers : buffers for iso module (for later version. At this time the video module isn't used to get frames from a DV device.
videomode : DV format
framerate : CAMERA_FRAMES_3_75, CAMERA_FRAMES_7_5, CAMERA_FRAMES_15, CAMERA_FRAMES_30, CAMERA_FRAMES_60
channel : iso channel (a value between 1..64)
Returns:
int : returns a int value >= 0 if init success else < 0;

Implements L1394::Device.

Definition at line 46 of file l1394_avccamera.cpp.

References L1394::DEVICE_DV, L1394::DEVICE_FRAMES_DV, L1394::Singleton< T, CreationPolicy, LifetimePolicy, ThreadingModel >::getInstance(), L1394::Device::getParentNode(), and L1394_FAILED.

virtual const CameraRegister* L1394::AvcCamera::sharpness  )  [inline, virtual]
 

Access 'Sharpness' feature register.

Implements L1394::Camera.

Definition at line 156 of file l1394_avccamera.h.

References L1394::AvcRegister::defaultSet().

virtual const CameraRegister* L1394::AvcCamera::shutter  )  [inline, virtual]
 

Access 'Shutter' feature register.

Implements L1394::Camera.

Definition at line 174 of file l1394_avccamera.h.

References L1394::AvcCameraRegister::setOffset().

int L1394::AvcCamera::start  )  [virtual]
 

This method starts a FireWire device and iso-receive.

Returns:
int : returns L1394_FAILED if an error occur, else L1394_SUCCESS

Implements L1394::Device.

Definition at line 87 of file l1394_avccamera.cpp.

References L1394::Singleton< T, CreationPolicy, LifetimePolicy, ThreadingModel >::getInstance(), L1394::Device::getParentNode(), L1394::Device::isSending(), L1394_FAILED, L1394_SUCCESS, and L1394::Device::setSending().

int L1394::AvcCamera::stop  )  [virtual]
 

This method stops a sending device and the Iso-receive.

Returns:
int : returns L1394_FAILED if an error occur, else L1394_SUCCESS

Implements L1394::Device.

Definition at line 101 of file l1394_avccamera.cpp.

References L1394::Singleton< T, CreationPolicy, LifetimePolicy, ThreadingModel >::getInstance(), L1394::Device::getParentNode(), L1394_FAILED, L1394_SUCCESS, and L1394::Device::setSending().

virtual const CameraRegister* L1394::AvcCamera::temperature  )  [inline, virtual]
 

Access 'Temperature' feature register.

Implements L1394::Camera.

Definition at line 186 of file l1394_avccamera.h.

References L1394::AvcCameraRegister::setOffset().

virtual const CameraRegister* L1394::AvcCamera::tilt  )  [inline, virtual]
 

Access 'Tilt' feature register.

Implements L1394::Camera.

Definition at line 198 of file l1394_avccamera.h.

References L1394::AvcCameraRegister::setOffset().

virtual const CameraRegister* L1394::AvcCamera::trigger  )  [inline, virtual]
 

Access 'Trigger' feature register.

Implements L1394::Camera.

Definition at line 189 of file l1394_avccamera.h.

References L1394::AvcCameraRegister::setOffset().

virtual const CameraRegister* L1394::AvcCamera::whiteBalance const   int  )  [inline, virtual]
 

Access 'White-Balance' feature register.

Implements L1394::Camera.

Definition at line 162 of file l1394_avccamera.h.

References L1394::AvcRegister::defaultSet().

virtual const CameraRegister* L1394::AvcCamera::whiteBalance  )  [inline, virtual]
 

Access 'White-Balance' feature register.

Implements L1394::Camera.

Definition at line 159 of file l1394_avccamera.h.

References L1394::AvcRegister::defaultSet().

virtual const CameraRegister* L1394::AvcCamera::zoom  )  [inline, virtual]
 

Access 'Zoom' feature register.

Implements L1394::Camera.

Definition at line 192 of file l1394_avccamera.h.

References L1394::AvcRegister::defaultSet().


The documentation for this class was generated from the following files:
Generated on Wed Aug 24 00:36:42 2005 for L1394 by doxygen 1.4.2
L1394 library (NMM) grahics.cs.uni-sb.de/~repplix/l1394_home/