Mode
Top  Previous  Next

Description

Returns or sets the index of the currently selected video mode.


Syntax


[VB]
objActiveDcam.Mode [= Value]


[C/C++]
HRESULT get_Mode( long *pMode );
HRESULT put_Mode( long Mode );



Data Type
[VB]

Long

Parameters
[C/C++]

pMode [out,retval]  
Pointer to the mode's index  
Mode [in]  
The index of the mode to be selected  


Return Values


S_OK  
Success  
E_FAIL  
Failure.  
E_INVALIDARG  
The index is out of range  
 

Example


This VB example initializes a combo box with the descriptions of available video modes and uses it to select a specific mode:

Private Sub
 Form_Load()
ModeLst = ActiveDcam1.GetModeList
For
 i = 0 
To
 
UBound
(ModeLst)
Combo1.AddItem (ModeLst(i))
Next

Combo1.ListIndex = 0
ActiveDcam1.Acquire = 
True
End Sub

Private Sub
 Combo1_Click()
ActiveDcam1.Mode = Combo1.ListIndex
End Sub

 

Remarks


The value of the property is a zero-based index into the list of video modes supported by the currently selected Camera. The list of modes can be retrieved with GetModeList. If you use the property window of your development environment or ActiveDcam's property pages, the Mode property field will be presented as a list box containing all supported video modes. The mode list is built in the accending order by browsing through all formats and modes supported by the current camera. For example, the followings video modes are available for Sony DFW-X700 camera:

#0 320x240 YUV (4:2:2)  
#1 640x480 YUV (4:2:2)  
#2 800x600 YUV (4:2:2)  
#3 1024x768 YUV (4:2:2)  
#4 1024x768 YUV (4:2:2) Format_7 M0  

while PixeLink PL-A741 supports the following video modes:

#0 640x480 Mono (8)  
#1 640x480 Mono (16)  
#2 800x600 Mono (8)  
#3 1024x768 Mono (8)  
#4 800x600 Mono (16)  
#5 1024x768 Mono (16)  
#6 1280x960 Mono (8)  
#7 1280x960 Mono (16)  
#8 1280x960 Mono (8) Format_7 M0  
#9 1280x960 Mono (16) Format_7 M0  
 
Those modes referred as "Format_7" are partial scan modes that typically allow for selection of user-defined frame size (SizeX, SizeY) and PacketSize. Each partial scan mode retains the frame size and packet size which were previously selected for it. However, selecting the same partial scan mode twice will reset its parameters to maximum values, thus providing the highest resolution and frame rate available for the mode.

For more information refer to "IIDC 1394-based Digital Camera Specification, Version 1.31" published by the 1394 Trade Association.