Compaq Multimedia Services
for OpenVMS Alpha
Programmer's Guide


Previous Contents Index


videoGetErrorText

Name videoGetErrorText --- Retrieve a text description of the error identified by the error code Syntax


#include <mme/mme_api.h> 
 
MMRESULT videoGetErrorText(HVIDEO hVideo, 
                           UINT wError, 
                           LPSTR lpText, 
                           UINT uSize); 
Arguments HVIDEO hVideo
Specifies a handle to a video device channel.

UINT wError
Specifies the error code.

LPSTR lpText
Specifies a pointer to a buffer that is filled with a null-terminated string corresponding to the error code. Memory for the lpText argument must be allocated with the mmeAllocMem function.

UINT uSize
Specifies the length in bytes of the buffer pointed to by the lpText argument.


Description

The videoGetErrorText function retrieves a description of the error identified by the error code. All error descriptions are fewer than MAXERRORLENGTH characters long. If the error description is longer than the buffer, the description is truncated. The returned error string is always null terminated. If uSize is zero, nothing is copied and the function returns DV_ERR_OK.
Extensions None.

Return Values

1
Returns DV_ERR_OK if the function is successful; otherwise, it returns one of the following error codes:
Error Code Description
DV_ERR_INVALHANDLE The specified device handle is invalid.
DV_ERR_BADERRNUM The specified error number is out of range.
See Also None.


videoGetFieldMode

Name videoGetFieldMode --- Obtain the current video field mode value Syntax


#include <mme/mme_api.h> 
 
MMRESULT videoGetFieldMode(HVIDEO hVideo, 
                           DWORD *lpdwModeReturn); 
Arguments HVIDEO hVideo
Specifies a handle to a video device channel.

DWORD *lpdwModeReturn
Specifies a pointer to return the field mode in. The memory must be allocated with the function mmeAllocMem . The return values will be one of the following if no error occurs:

VIDEO_MODE_FRAME
VIDEO_MODE_FRAME_EVEN_DOM
VIDEO_MODE_FRAME_ODD_DOM
VIDEO_MODE_FIELD_BOTH
VIDEO_MODE_FIELD_ODD_ONLY
VIDEO_MODE_FIELD_EVEN_ONLY

Description

The videoGetFieldMode function obtains the current video field mode value. The value returned is valid only if the configuration information of the device is valid. Before setting the standard or configuring the format, the field mode may be set to the default field mode. If not all standards and formats are supported for the default field mode, the field mode may change. Check the field mode after setting the standard and configuring the format to find out the final mode being used by the device.

Field Mode Dominance

The videoGetFieldMode function includes field mode dominance support. Capturing full-frame video requires combining two consecutive video fields in one frame. The first field in the pair is referred to as the dominant field. Source and destination video devices should agree on field dominance. If they do not, then reversed dominance, such as framing artifacts in full-frame mode, can occur. This can be seen by magnifying an area of motion in a captured frame to see temporal artifacts or jagged edges in the images.

The VIDEO_MODE_FRAME flag indicates the default dominance of a hardware device. Two flags, VIDEO_MODE_FRAME_EVEN_DOM and VIDEO_MODE_FRAME_ODD_DOM, specify even and odd dominance, respectively. If the field mode is set to VIDEO_MODE_FRAME and a query of the field mode using the videoGetFieldMode function is made, the device will return the field mode dominance it is using (video capture only at this time).

Not all devices can be adjusted. Setting the field mode to VIDEO_MODE_FRAME_EVEN_DOM or VIDEO_MODE_FRAME_ODD_DOM may result in an error if that particular dominance is not currently supported. Use VIDEO_MODE_FRAME if the dominance is not important to an application. Be aware of this error if your application deinterlaces images on its own. Be careful about placing even and odd fields in the frames your application composes (video capture) or decomposes (video playback).

Extensions The videoGetFieldMode function is a Compaq extension to the Microsoft multimedia API specification.


Return Values

1
Returns DV_ERR_OK if the function is successful; otherwise, it returns one of the following error codes:
Error Code Description
DV_ERR_UNSUPPORTED The function is not supported for the device.
DV_ERR_PARAM1 The pointer to the mode is invalid.
DV_ERR_INVALHANDLE The specified device handle is invalid.
See Also videoSetFieldMode

videoGetMirror

Name videoGetMirror --- Obtain current mirroring value Syntax


#include <mme/mme_api.h> 
 
BOOL videoGetMirror(HVIDEO hVideo) 
Arguments HVIDEO hVideo
Specifies a handle to a video device channel.


Description

The videoGetMirror function obtains the current mirroring value. This mirroring value is applied to the 8-bit X image data returned to the application. This request is not supported for video playback using a single buffer.
Extensions The videoGetMirror function is a Compaq extension to the Microsoft multimedia API specification.


Return Values

1
Returns the current mirroring value (TRUE or FALSE) if the function is successful; otherwise, it returns one of the following error codes:
Error Code Description
DV_ERR_INVALHANDLE The specified device handle is invalid.
DV_ERR_NOTSUPPORTED The function is not supported.
See Also videoSetMirror

videoGetNumDevs

Name videoGetNumDevs --- Return the number of video capture or playback devices installed Syntax


#include <mme/mme_api.h> 
 
DWORD videoGetNumDevs() 
Arguments None.


Description

The videoGetNumDevs function returns the number of video capture and playback devices installed.
Extensions None.

Return Values

1
Returns the number of video capture or playback devices present in the system.

See Also videoOpen

videoGetPortNum

Name videoGetPortNum --- Obtain current port number Syntax


#include <mme/mme_api.h> 
 
DWORD videoGetPortNum(HVIDEO hVideo) 
Arguments HVIDEO hVideo
Specifies a handle to a video device channel.


Description

The videoGetPortNum function obtains the current port number.
Extensions The videoGetPortNum function is a Compaq extension to the Microsoft multimedia API specification.

Return Values

1
Returns the current port number if the function is successful; otherwise, it returns one of the following error codes:
Error Code Description
DV_ERR_INVALHANDLE The specified device handle is invalid.
DV_ERR_NOTSUPPORTED The function is not supported.
See Also videoSetPortNum

videoGetQuality

Name videoGetQuality --- Obtain current quality value Syntax


#include <mme/mme_api.h> 
 
DWORD videoGetQuality(HVIDEO hVideo) 
Arguments HVIDEO hVideo
Specifies a handle to a video device channel.


Description

The videoGetQuality function obtains the current quality value. This function is not supported for video playback operations.
Extensions The videoGetQuality function is a Compaq extension to the Microsoft multimedia API specification.


Return Values

1
Returns the current quality value if the function is successful; otherwise, it returns one of the following error codes:
Error Code Description
DV_ERR_INVALHANDLE The specified device handle is invalid.
DV_ERR_NOTSUPPORTED The function is not supported.
See Also videoSetQuality

videoGetSaturation

Name videoGetSaturation --- Obtain current saturation value Syntax


#include <mme/mme_api.h> 
 
DWORD videoGetSaturation(HVIDEO hVideo) 
Arguments HVIDEO hVideo
Specifies a handle to a video device channel.


Description

The videoGetSaturation function obtains the current saturation value. This saturation value is applied to the 8-bit X image data returned to the application. This request is not supported for video playback using a single buffer.
Extensions The videoGetSaturation function is a Compaq extension to the Microsoft multimedia API specification.


Return Values

1
Returns the current saturation value if the function is successful; otherwise, it returns one of the following error codes:
Error Code Description
DV_ERR_INVALHANDLE The specified device handle is invalid.
DV_ERR_NOTSUPPORTED The function is not supported.
See Also videoSetSaturation

videoGetSharpening

Name videoGetSharpening --- Obtain current sharpening value Syntax


#include <mme/mme_api.h> 
 
DWORD videoGetSharpening(HVIDEO hVideo) 
Arguments HVIDEO hVideo
Specifies a handle to a video device channel.


Description

The videoGetSharpening function obtains the current sharpening value. This sharpening value is applied to the 8-bit X image data returned to the application. This request is not supported for video playback using a single buffer.
Extensions The videoGetSharpening function is a Compaq extension to the Microsoft multimedia API specification.


Return Values

1
Returns the current sharpening value if the function is successful; otherwise, it returns one of the following error codes:
Error Code Description
DV_ERR_INVALHANDLE The specified device handle is invalid.
DV_ERR_NOTSUPPORTED The function is not supported.
See Also videoSetSharpening

videoGetStandard

Name videoGetStandard --- Obtain current input standard type Syntax


#include <mme/mme_api.h> 
 
DWORD videoGetStandard(HVIDEO hVideo) 
Arguments HVIDEO hVideo
Specifies a handle to a video device channel.


Description

The videoGetStandard function obtains the current input standard type. This function can return one of the following input standard types:
VIDEO_STANDARD_NTSC
VIDEO_STANDARD_PAL
VIDEO_STANDARD_SECAM
VIDEO_STANDARD_SVIDEO525
VIDEO_STANDARD_SVIDEO625

The VIDEO_STANDARD_SECAM type is not supported for playback operations.

Extensions The videoGetStandard function is a Compaq extension to the Microsoft multimedia API specification.

Return Values

1
Returns the current input standard type if the function is successful; otherwise, it returns one of the following error codes:
Error Code Description
DV_ERR_INVALHANDLE The specified device handle is invalid.
DV_ERR_NOTSUPPORTED The function is not supported.
See Also videoSetStandard

videoj300SetVideoOutYUVLut

Name videoj300SetVideoOutYUVLut --- Set the current LUT controls for YUV data to video output on the FullVideo Supreme and FullVideo Supreme JPEG option modules Syntax


#include <mme/mme_api.h> 
 
MMRESULT videoj300SetVideoOutYUVLut(HVIDEO hVideo, 
                                    DWORD dwBrightness, 
                                    DWORD dwContrast, 
                                    DWORD dwSaturation, 
                                    DWORD dwGamma, 
                                    unsigned char * Ylut, 
                                    unsigned char * Ulut, 
                                    unsigned char * Vlut); 
 
Arguments HVIDEO hVideo
Specifies a handle to a video device channel.

DWORD dwBrightness
Specifies the brightness. Values range from 0 to 10000. A value of 5000 is nominal. This represents the y offset of Y.

DWORD dwContrast
Specifies the contrast. Values range from 0 to 10000. A value of 5000 is nominal. This represents the slope of Y.

DWORD dwSaturation
Specifies the saturation. Values range from 0 to 10000. A value of 5000 is nominal. This represents the slope of U and V.

DWORD dwGamma
Specifies the gamma. Values range from 1000 to 10000. A value of 1000 implies no gamma correction.

unsigned char * Ylut
Specifies a pointer to a 256-entry array of Y values for the lookup table.

unsigned char * Ulut
Specifies a pointer to a 256-entry array of U values for the lookup table.

unsigned char * Vlut
Specifies a pointer to a 256-entry array of V values for the lookup table.


Description

The videoj300SetVideoOutYUVLut function sets the current LUT controls for YUV data to video playback on the FullVideo Supreme and FullVideo Supreme JPEG option modules. These controls are applied to the YUV data in software before sending the YUV data to the FullVideo Supreme and FullVideo Supreme JPEG option modules for video playback. This function also operates on JPEG input data. JPEG data is first decompressed into YUV data on the board and then sent to video playback on the FullVideo Supreme and FullVideo Supreme JPEG option modules.

If any of the Ylut, Vlut, or Ulut parameters are NULL, then the dwBrightness, dwContrast, and dwSaturation values are applied to the data. If the LUTs are supplied, the data is passed through the LUTs with no changes to brightness, contrast, and saturation. Users of this interface should understand how to apply brightness, contrast, saturation, and gamma when building their own LUTs. Note that the parameter dwGamma is always applied.

Memory for the LUTs does not need to be allocated with the function mmeAllocMem .

Note

The FullVideo Supreme and FullVideo Supreme JPEG option modules use YCbCr format YUV (unsigned YUV values), not signed values.
Extensions The videoj300SetVideoOutYUVLut function is a Compaq extension to the Microsoft multimedia API specification.


Return Values

1
Returns DV_ERR_OK if the function is successful; otherwise, it returns one of the following error codes:
Error Code Description
DV_ERR_UNSUPPORTED The function is not supported for the device.
DV_ERR_PARAM1 The brightness, contrast, saturation, or gamma values are out of range, or the pointers to one or more of the LUTs are non-null and invalid.
DV_ERR_INVALHANDLE The specified device handle is invalid, or the device was not opened for output.
See Also None.

videoOpen

Name videoOpen --- Open a channel on the specified video device Syntax


#include <mme/mme_api.h> 
 
MMRESULT videoOpen(LPHVIDEO lphvideo, 
                   DWORD dwDeviceID, 
                   DWORD dwFlags); 
Arguments LPHVIDEO lphvideo
Specifies a pointer to an HVIDEO handle. The video capture and playback interface uses this location to return a handle that uniquely identifies the opened video device channel. Use this handle to identify the device channel when calling other video functions.

DWORD dwDeviceID
Identifies the video device to open. The value of dwDeviceID varies from zero to one less than the number of video capture devices installed in the system.

DWORD dwFlags
Flags for opening the video device. The following flags are defined:

VIDEO_EXTERNALIN
Specifies that the channel is opened for external input. Typically, external input channels capture images into a capture hardware frame buffer.

VIDEO_EXTERNALOUT
Specifies that the channel is opened for external output. Typically, external output channels display images stored in a playback hardware frame buffer on an auxiliary monitor or overlay.

VIDEO_IN
Specifies that the channel is opened for video input. Video input channels transfer images from a capture hardware frame buffer to system memory buffers.

VIDEO_OUT
Specifies that the channel is opened for video output. Video output channels transfer images from system memory buffers to a playback hardware frame buffer.

Description

The videoOpen function opens a channel on the specified video device. At a minimum, all video capture devices support a VIDEO_EXTERNALIN and a VIDEO_IN channel. The FullVideo Supreme and FullVideo Supreme JPEG option modules also support VIDEO_EXTERNALOUT and VIDEO_OUT, but they do not support simultaneous video capture and playback. The FullVideo Supreme and FullVideo Supreme JPEG option modules can be opened as either a capture channel or a playback channel at any given time. Only one capture or playback channel can be opened per currently supported video option modules.

The DV_ERR_ALLOCATED error code is returned if an attempt is made to open a device as one type (capture or playback) when it is already open as the other type.

Use the videoGetNumDevs function to determine the number of video devices present in the system.

Note

Use the videoOpen function before calling the videoGetChannelCaps function. You must open a channel before calling the videoGetChannelCaps function.
Extensions Compaq has supplied software control of the external-out and video-out channels.


Return Values

1
Returns DV_ERR_OK if the function is successful; otherwise, it returns one of the following error codes:
Error Code Description
DV_ERR_ALLOCATED The specified resource is already allocated.
DV_ERR_BADDEVICEID The specified device ID is out of range.
DV_ERR_NOMEM Unable to allocate or lock memory.
See Also videoClose , videoGetNumDevs , videoStreamGetError , videoStreamInit


Previous Next Contents Index