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

L1394::AvcVcr Class Reference
[L1394_Device]

This class implements the interface of a vcr defined in 'AV/C Tape Recorder/Player Subunit specification'(Version 2.1). More...

#include <l1394_avcvcr.h>

Inheritance diagram for L1394::AvcVcr:

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

Public Member Functions

int start ()
 This method starts the Vcr and the Iso-Receive.
virtual int stop ()
 This method stops a Vcr.
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.
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.
AvcVcr constructor
These functions creates an AvcVcr.

 AvcVcr (FcpNode *parent_node, const int subunit_value)
 This method creates a AvcVcr.
virtual ~AvcVcr ()
 destructor
The standard functions of the vcr interface
This functions implements the interface of class Vcr

virtual int play ()
 With this method you can access the play feature.
virtual int pause ()
 With this method you can access the pause feature.
virtual Timecode getTimeCode ()
 With this method you can get the actual timecode.
virtual const DeviceRegistertransportState ()
 With this method you can get the actual status of a vcr.
virtual const DeviceRegistersearch (const Timecode)
 This method stop the tape at a specific position.
virtual const DeviceRegisterrecordingDate (const Timecode)
 With this method you can access the recording date feature.
virtual const DeviceRegisterforward ()
 With this method you can access the forward feature.
virtual const DeviceRegisterreverse ()
 With this method you can access the reverse feature.
virtual const DeviceRegisterfastForward ()
 With this method you can access the fastForward feature.
virtual const DeviceRegisterrewind ()
 With this method you can access the rewind feature.
virtual const DeviceRegisterrecord ()
 With this method you can access the record feature.
virtual const DeviceRegisterrecordingSpeed (const int speed)
 With this method you can access the recordingSpeed feature.
virtual const DeviceRegisternextFrame ()
 With this method you can access the nextFrame feature.
virtual const DeviceRegisterpreviousFrame ()
 With this method you can access the nextFrame feature.
virtual const DeviceRegisterslowForward ()
 With this method you can access the slowForward feature.
virtual const DeviceRegisterslowReverse ()
 With this method you can access the slowReverse feature.
The extended functions for an AV/C vcr
This functions describe the interface of a vcr defined in AV/C Tape Recorder/ Player Subunit Specification.

const AvcRegisteranalogAudioOutputMode (const int)
 With this method you can access the analog audio output mode.
const AvcRegisterbackward (const int measurement_unit, const int count)
 access backward feature and return a pointer to the AvcRegister
const AvcRegisterforward (const int measurement_unit, const int count)
 access backward feature and return a pointer to the AvcRegister
const AvcRegistereditMode (const int command)
 With this method you can access the analog audio output mode.
const AvcRegisterinputSignalMode (const int command)
 With this method you can access the input signal mode.
const AvcRegisterloadMedium (const int command)
 With this method you can access the load medium feature.
const AvcRegistermarker (const int set)
 With this method you can access the marker mode.
Quadlet mediumInfo ()
 With this method you can access the analog audio output mode.
const AvcRegisteropenMic (const int command)
 With this method you can access the open Mic feature.
const AvcRegisteroutputSignalMode (const int command)
 With this method you can access the output signal mode.
const AvcRegisterrecord (const int command)
 With this method you can access the record feature.
const AvcRegistertimecode (const int command, const Timecode timecode)
 With this method you can access the timecode feature.
const AvcRegisterwriteMic ()
 With this method you can access the write mic feature.
const AvcRegisterwind (const int command)
 With this method you can access the wind feature.
const AvcRegisterplay (const int value)
 With this method you can access the play feature.
const AvcRegistersearch (const int, const Timecode)
 With this method you can access the analog audio output mode.
const AvcRegisterpreset (const int reset, const int id, const u_int32_t parameter_value)
 With this method you can access the analog audio output mode for valid values see AV/C Tape Recorder Player Subunit Specification.

Detailed Description

This class implements the interface of a vcr defined in 'AV/C Tape Recorder/Player Subunit specification'(Version 2.1).

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

This class implements two Vcr interfaces. The first interface is described in class Vcr. The second one is an implementation of the controlling mechanism defined in 'AV/C Tape Recorder Player Subunit Specification'. The difference between the two interfaces is the meaning of functions. For example the play() function of the first interface start a vcr. In the second one the play(int value) method means the Play group, where the value specify how to play, like forward, backward, nextFrame and so on. The functions from the first interface are mapped to the functions of the second one.

The example from class Vcr can be changed:

 AvcVcr* my_vcr = session->findAvcVcr();
 if( my_vcr->fastForward()->hasFeature() ) //should normally be true.
 {
   int vcr_response = my_vcr->fastForward()->send(); //normal vcr interface command
   int avc_vcr_respone = my_vcr->play(0x75)->send(); //avc_vcr interface to start a vcr.
   switch(response) //for all response codes see method send() in class AvcRegister.
   {
     case ACCEPTED : cout << "Starting the Vcr" << endl; break;
     case REJECTED : cout << "Couldn't start the Vcr" << endl; break;
     default : cout << "Unhandled case" << endl; break;
   }
 }

If you like to use the AV/C vcr interface, you can cast the vcr, or get explicit an AvcVcr from the Session class.

See AV/C tape recorder/player subunit specification and tutorial for more information

Author:
Michael Repplinger

Definition at line 66 of file l1394_avcvcr.h.


Constructor & Destructor Documentation

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

This method creates a AvcVcr.

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_avcvcr.cpp.

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

L1394::AvcVcr::~AvcVcr  )  [virtual]
 

destructor

Definition at line 33 of file l1394_avcvcr.cpp.


Member Function Documentation

L1394::AvcVcr::analogAudioOutputMode const   int  ) 
 

With this method you can access the analog audio output mode.

Parameters:
mode : int value that describe the mode (for valid values see AV/C Tape Recorder Player Subunit Specification.
Returns:
AvcRegister* : pointer to the AvcRegister.

Definition at line 70 of file l1394_avcvcr.cpp.

References L1394::AvcRegister::defaultSet().

L1394::AvcVcr::backward const int  measurement_unit,
const int  count
 

access backward feature and return a pointer to the AvcRegister

Parameters:
measurement_unit : define which unit should be used (for valid values see AV/C Tape Recorder Player Subunit Specification.
count : int value for the count of backward steps (valid value between 0x0..0xff)
Returns:
AvcRegister* : pointer to the AvcRegister.

Definition at line 152 of file l1394_avcvcr.cpp.

References L1394::AvcRegister::defaultSet().

L1394::AvcVcr::editMode const int  mode  )  [inline]
 

With this method you can access the analog audio output mode.

Parameters:
mode : int value that describe the mode (for valid values see AV/C Tape Recorder Player Subunit Specification.
Returns:
AvcRegister* : pointer to the AvcRegister.

Definition at line 302 of file l1394_avcvcr.h.

References L1394::AvcRegister::defaultSet().

L1394::AvcVcr::fastForward  )  [inline, virtual]
 

With this method you can access the fastForward feature.

Returns:
DeviceRegister* : pointer to the DeviceRegister.

Implements L1394::Vcr.

Definition at line 205 of file l1394_avcvcr.h.

References wind().

L1394::AvcVcr::forward const int  measurement_unit,
const int  count
 

access backward feature and return a pointer to the AvcRegister

Parameters:
measurement_unit : define which unit should be used (for valid values see AV/C Tape Recorder Player Subunit Specification.
count : int value for the count of forward steps (valid value between 0x0..0xff)
Returns:
AvcRegister* : pointer to the AvcRegister.

Definition at line 158 of file l1394_avcvcr.cpp.

References L1394::AvcRegister::defaultSet().

L1394::AvcVcr::forward  )  [inline, virtual]
 

With this method you can access the forward feature.

Returns:
DeviceRegister* : pointer to the DeviceRegister.

Implements L1394::Vcr.

Definition at line 193 of file l1394_avcvcr.h.

References play().

timeCode L1394::AvcVcr::getTimeCode  )  [virtual]
 

With this method you can get the actual timecode.

Returns:
Timecode : the actual timecode.

Implements L1394::Vcr.

Definition at line 136 of file l1394_avcvcr.cpp.

References L1394::AvcRegister::defaultSet(), L1394::Quadlet::getByte(), L1394::AvcRegister::getData(), L1394::FcpNode::send(), L1394::Timecode::setFrame(), L1394::Timecode::setHour(), L1394::Timecode::setMinute(), L1394::Timecode::setSecond(), and STATUS.

L1394::AvcVcr::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 197 of file l1394_avcvcr.cpp.

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

L1394::AvcVcr::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 134 of file l1394_avcvcr.h.

References L1394::DEVICE_DV.

L1394::AvcVcr::inputSignalMode const int  mode  )  [inline]
 

With this method you can access the input signal mode.

Parameters:
mode : int value that describe the mode (for valid values see AV/C Tape Recorder Player Subunit Specification.
Returns:
AvcRegister* : pointer to the AvcRegister.

Definition at line 312 of file l1394_avcvcr.h.

References L1394::AvcRegister::defaultSet().

L1394::AvcVcr::loadMedium const int  command  )  [inline]
 

With this method you can access the load medium feature.

Parameters:
command : int value that describe the command (for valid values see AV/C Tape Recorder Player Subunit Specification.
For calling hasFeature command = 0xFF
Returns:
AvcRegister* : pointer to the AvcRegister.

Definition at line 324 of file l1394_avcvcr.h.

References L1394::AvcRegister::defaultSet().

L1394::AvcVcr::marker const int  set  )  [inline]
 

With this method you can access the marker mode.

Parameters:
set : int value 1 for set marker, 0 for unset marker.
Returns:
AvcRegister* : pointer to the AvcRegister.

Definition at line 333 of file l1394_avcvcr.h.

References L1394::AvcRegister::defaultSet(), and L1394::AvcRegister::getData().

L1394::AvcVcr::mediumInfo  ) 
 

With this method you can access the analog audio output mode.

Returns:
Quadlet : Quadlet with the medium info.

Definition at line 169 of file l1394_avcvcr.cpp.

References L1394::AvcRegister::defaultSet(), L1394::AvcRegister::getData(), and L1394::FcpNode::send().

L1394::AvcVcr::nextFrame  )  [inline, virtual]
 

With this method you can access the nextFrame feature.

If you execute the command, the vcr increase one frame, from actual position.

Returns:
DeviceRegister* : pointer to the DeviceRegister.

Implements L1394::Vcr.

Definition at line 233 of file l1394_avcvcr.h.

References play().

L1394::AvcVcr::openMic const int  mode  )  [inline]
 

With this method you can access the open Mic feature.

Parameters:
mode : int value that describe the mode (for valid values see AV/C Tape Recorder Player Subunit Specification.
Returns:
AvcRegister* : pointer to the AvcRegister.

Definition at line 351 of file l1394_avcvcr.h.

References L1394::AvcRegister::defaultSet().

L1394::AvcVcr::outputSignalMode const int  command  )  [inline]
 

With this method you can access the output signal mode.

Parameters:
command : int value that describe the command (for valid values see AV/C Tape Recorder Player Subunit Specification.
Returns:
AvcRegister* : pointer to the AvcRegister.

Definition at line 361 of file l1394_avcvcr.h.

References L1394::AvcRegister::defaultSet().

L1394::AvcVcr::pause  )  [inline, virtual]
 

With this method you can access the pause feature.

Returns:
DeviceRegister* : pointer to the DeviceRegister.

Implements L1394::Vcr.

Definition at line 162 of file l1394_avcvcr.h.

References play().

L1394::AvcVcr::play const int  command  )  [inline]
 

With this method you can access the play feature.

Parameters:
command : int value that describe the subfunction(for valid values see AV/C Tape Recorder Player Subunit Specification.
Returns:
AvcRegister* : pointer to the AvcRegister.

Definition at line 410 of file l1394_avcvcr.h.

References L1394::AvcRegister::defaultSet().

L1394::AvcVcr::play  )  [inline, virtual]
 

With this method you can access the play feature.

Returns:
DeviceRegister* : pointer to the DeviceRegister.

Implements L1394::Vcr.

Definition at line 155 of file l1394_avcvcr.h.

Referenced by forward(), nextFrame(), pause(), previousFrame(), reverse(), slowForward(), slowReverse(), and start().

L1394::AvcVcr::preset const int  reset,
const int  id,
const u_int32_t  value
 

With this method you can access the analog audio output mode for valid values see AV/C Tape Recorder Player Subunit Specification.

Returns:
AvcRegister* : pointer to the AvcRegister.

Definition at line 163 of file l1394_avcvcr.cpp.

References L1394::AvcRegister::defaultSet().

L1394::AvcVcr::previousFrame  )  [inline, virtual]
 

With this method you can access the nextFrame feature.

If you execute the command, the vcr decrease one frame, from actual position.

Returns:
DeviceRegister* : pointer to the DeviceRegister.

Implements L1394::Vcr.

Definition at line 242 of file l1394_avcvcr.h.

References play().

L1394::AvcVcr::record const int  command  )  [inline]
 

With this method you can access the record feature.

Parameters:
mode : int value that describe the mode (for valid values see AV/C Tape Recorder Player Subunit Specification.
Returns:
AvcRegister* : pointer to the AvcRegister.

Definition at line 371 of file l1394_avcvcr.h.

References L1394::AvcRegister::defaultSet().

L1394::AvcVcr::record  )  [inline, virtual]
 

With this method you can access the record feature.

Returns:
DeviceRegister* : pointer to the DeviceRegister.

Implements L1394::Vcr.

Definition at line 217 of file l1394_avcvcr.h.

L1394::AvcVcr::recordingDate const   Timecode  )  [virtual]
 

With this method you can access the recording date feature.

Returns:
DeviceRegister* : pointer to the DeviceRegister.

Definition at line 76 of file l1394_avcvcr.cpp.

References L1394::AvcRegister::defaultSet(), and L1394::AvcRegister::getData().

L1394::AvcVcr::recordingSpeed const int  speed  )  [virtual]
 

With this method you can access the recordingSpeed feature.

Parameters:
speed : the speed value.
Returns:
DeviceRegister* : pointer to the DeviceRegister.

Implements L1394::Vcr.

Definition at line 130 of file l1394_avcvcr.cpp.

References L1394::AvcRegister::defaultSet().

L1394::AvcVcr::reverse  )  [inline, virtual]
 

With this method you can access the reverse feature.

Returns:
DeviceRegister* : pointer to the DeviceRegister.

Implements L1394::Vcr.

Definition at line 199 of file l1394_avcvcr.h.

References play().

virtual const DeviceRegister* L1394::AvcVcr::rewind  )  [inline, virtual]
 

With this method you can access the rewind feature.

Returns:
DeviceRegister* : pointer to the DeviceRegister.

Implements L1394::Vcr.

Definition at line 211 of file l1394_avcvcr.h.

References wind().

L1394::AvcVcr::search const   int,
const   Timecode
 

With this method you can access the analog audio output mode.

Parameters:
command : int value that describe the submethod (for valid values see AV/C Tape Recorder Player Subunit Specification.
timecode : the new timecode. In case of ctype STATUS, all variable of timecode has value 0xff
Returns:
AvcRegister* : pointer to the AvcRegister.

Definition at line 115 of file l1394_avcvcr.cpp.

References L1394::AvcRegister::defaultSet(), L1394::Timecode::frame(), L1394::AvcRegister::getData(), L1394::Timecode::hour(), L1394::Timecode::minute(), and L1394::Timecode::second().

L1394::AvcVcr::search const   Timecode  )  [inline, virtual]
 

This method stop the tape at a specific position.

Returns:
DeviceRegister* : pointer to the DeviceRegister.

Implements L1394::Vcr.

Definition at line 180 of file l1394_avcvcr.h.

L1394::AvcVcr::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.

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 = Session::getSession();
  AvcVcr *vcr = session->findAvcCVcr();
  vcr->setParameter() //set the default parameter (channel = 63, buffers = 4)
  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 176 of file l1394_avcvcr.cpp.

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

L1394::AvcVcr::slowForward  )  [inline, virtual]
 

With this method you can access the slowForward feature.

Returns:
DeviceRegister* : pointer to the DeviceRegister.

Implements L1394::Vcr.

Definition at line 248 of file l1394_avcvcr.h.

References play().

L1394::AvcVcr::slowReverse  )  [inline, virtual]
 

With this method you can access the slowReverse feature.

Returns:
DeviceRegister* : pointer to the DeviceRegister.

Implements L1394::Vcr.

Definition at line 254 of file l1394_avcvcr.h.

References play().

L1394::AvcVcr::start  )  [virtual]
 

This method starts the Vcr and the Iso-Receive.

Returns:
int : returns L1394_SUCCESS, if the device start.

Implements L1394::Device.

Definition at line 38 of file l1394_avcvcr.cpp.

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

L1394::AvcVcr::stop  )  [virtual]
 

This method stops a Vcr.

Returns:
int : returns L1394_SUCCESS if the vcr is stopped

Implements L1394::Device.

Definition at line 52 of file l1394_avcvcr.cpp.

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

L1394::AvcVcr::timecode const int  command,
const Timecode  timecode
 

With this method you can access the timecode feature.

Parameters:
command : int value that describe the mode (for valid values see AV/C Tape Recorder Player Subunit Specification.
timecode : the new timecode. In case of ctype STATUS, all variable of timecode has value 0xff
Returns:
AvcRegister* : pointer to the AvcRegister.

Definition at line 86 of file l1394_avcvcr.cpp.

References L1394::AvcRegister::defaultSet(), L1394::Timecode::frame(), L1394::AvcRegister::getData(), L1394::Timecode::hour(), L1394::Timecode::minute(), and L1394::Timecode::second().

L1394::AvcVcr::transportState  )  [virtual]
 

With this method you can get the actual status of a vcr.

Returns:
DeviceRegister* : pointer to the DeviceRegister.

Implements L1394::Vcr.

Definition at line 125 of file l1394_avcvcr.cpp.

L1394::AvcVcr::wind const int  command  ) 
 

With this method you can access the wind feature.

Parameters:
command : int value that describe the subfunction(for valid values see AV/C Tape Recorder Player Subunit Specification.
Returns:
AvcRegister* : pointer to the AvcRegister.

Definition at line 109 of file l1394_avcvcr.cpp.

References L1394::AvcRegister::defaultSet().

Referenced by fastForward(), rewind(), and stop().

L1394::AvcVcr::writeMic  ) 
 

With this method you can access the write mic feature.

Returns:
AvcRegister* : pointer to the AvcRegister.

Definition at line 104 of file l1394_avcvcr.cpp.

References L1394::AvcRegister::defaultSet().


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