AttachVLayerTagList()
Synopsis
ULONG AttachVLayerTagList(
struct VLayerHandle * VLayerHandle,
struct Window * Window,
struct TagItem * TagItems );
ULONG AttachVLayerTags(
struct VLayerHandle * VLayerHandle,
struct Window * Window,
TAG tag, ... );
Function
Attaches a previously created videolayer handle to the specified window.
The video overlay should now be dynamically linked to the window.
If the window is moved or resized, the overlay is also moved or resized.
Result
result - 0 if videolayer could be attached to the window
Notes
Tags available are:
VOA_LeftIndent (ULONG) - additional offset from the left window border
VOA_RightIndent (ULONG) - additional offset from the right window border
VOA_TopIndent (ULONG) - additional offset from the top window border
VOA_BottomIndent (ULONG) - additional offset from the bottom window border
Bugs
Fails while the layer is locked or already attached. The indent
tags are ignored by the null backend.
CreateVLayerHandleTagList()
Synopsis
struct VLayerHandle * CreateVLayerHandleTagList(
struct Screen * Screen,
struct TagItem * TagItems );
struct VLayerHandle * CreateVLayerHandleTags(
struct Screen * Screen,
TAG tag, ... );
Function
Creates a video layer handle for the given screen
Result
VLayerHandle - pointer to the created videolayer handle or 0
Notes
Tags available are:
VOA_SrcType (ULONG) - specifies source type that is used for video
overlay data
Currently supported formats:
SRCFMT_YUV16 (not recommended, use YCbCr16 instead)
SRCFMT_YCbCr16
SRCFMT_RGB15PC
SRCFMT_RGB16PC
VOA_SrcWidth (ULONG) - source width in pixel units
VOA_SrcHeight (ULONG) - source height in pixel units
VOA_Error (ULONG *) - If you specify VOA_Error with ti_Data pointing
to an ULONG, you will get more detailed information
if the creation of the video layer handle fails
VOA_UseColorKey (BOOL) - If you specify VOA_UseColorKey as TRUE, color
keying is enabled for the video layer. A
certain color key is generated then and the
stream data is only visible where this color
could be found.
VOA_UseBackFill (BOOL) - If you specify VOA_UseBackFill as TRUE automatic
backfilling for the videolayer is enabled. This
option is only available if color keying is
enabled.
VOA_Modulo (ULONG) - bytes per source row (V43). Defaults to
VOA_SrcWidth * 2.
Error codes:
VOERR_INVSRCFMT - unknown VOA_SrcType, zero dimensions or a
modulo shorter than a source row
VOERR_INVSCRMODE - the screen has no video overlay
VOERR_NOMEMORY - out of memory
Bugs
No display driver provides an overlay yet. Setting the
CGXVideoNullBackend variable selects a backend that keeps the
source in system RAM and displays nothing. It does not accept
SRCFMT_YCbCr420.
DeleteVLayerHandle()
Synopsis
void DeleteVLayerHandle(
struct VLayerHandle * VLayerHandle );
Function
Deletes a created video layer handle
Notes
The handle may still be locked or attached.
DetachVLayer()
Synopsis
ULONG DetachVLayer(
struct VLayerHandle * VLayerHandle );
Function
Detaches a videolayer from a given window. As a result, the video
overlay should now be unlinked from the window and the original
contents of the window are visible now.
Result
result - 0 if videolayer could be detached from the window
Bugs
Fails while the layer is locked or not attached.
GetVLayerAttr()
Synopsis
IPTR GetVLayerAttr(
struct VLayerHandle * VLayerHandle,
ULONG AttrNum );
Function
Gets a certain attribute from a given video layer. You have to call
LockVLayer() to make sure that the result is valid !
Result
value - the value for the given attribute
Notes
Attributes available are:
VOA_BaseAddress - if this attribute is specified the base address for
the source data is returned
VOA_ColorKeyPen - returns the pen number used for color keying. If color
keying is not enabled, -1 is returned
VOA_ColorKey - returns the 24 bit color value used for color keying.
If color keying is not enabled, -1 is returned.
VOA_Width, VOA_Height - source dimensions in pixels
VOA_Modulo - bytes per source row
Bugs
VOA_BaseAddress returns NULL unless the layer is locked. Color
keying is not supported yet. Other attributes return 0.
LockVLayer()
Synopsis
ULONG LockVLayer(
struct VLayerHandle * VLayerHandle );
Function
Locks the specified video layer to allow access to source data. Make
sure that you don't keep that lock for too long. It is only allowed
to keep it for a short time.
Result
result - TRUE if video layer could be locked, FALSE otherwise
Bugs
The lock does not nest; a second LockVLayer() fails until
UnlockVLayer() is called.
QueryVLayerAttr()
Synopsis
ULONG QueryVLayerAttr(
struct Screen * Screen,
ULONG AttrID );
Function
Queries the video layer capabilities of a screen.
Result
value - the value of the attribute, 0 if unsupported
Notes
Available since V50.
Bugs
Only the null backend reports any capabilities.
SetVLayerAttrTagList()
Synopsis
void SetVLayerAttrTagList(
struct VLayerHandle * VLayerHandle,
struct TagItem * TagItems );
void SetVLayerAttrTags(
struct VLayerHandle * VLayerHandle,
TAG tag, ... );
Function
Sets certain attributes for a given video layer
Notes
Tags available are:
VOA_LeftIndent (ULONG) - additional offset from the left window
border
VOA_RightIndent (ULONG) - additional offset from the right window
border
VOA_TopIndent (ULONG) - additional offset from the top window border
VOA_BottomIndent (ULONG) - additional offset from the bottom window
border
Bugs
The null backend has no runtime attributes, so all tags are
ignored.
SwapVLayerBuffer()
Synopsis
void SwapVLayerBuffer(
struct VLayerHandle * VLayerHandle );
Function
Swaps the displayed and the rendering buffer of a double buffered
video layer at the next vertical blank. The next LockVLayer() may
wait for that vertical blank.
Notes
Available since V50.
Bugs
No backend supports double buffering yet, so this does nothing.
WriteSPLine()
Synopsis
ULONG WriteSPLine(
struct VLayerHandle * VLayerHandle,
UBYTE * Buffer,
LONG X,
LONG Y,
LONG Width );
Function
Writes one line of subpicture data to a video layer.
Notes
Available since V50.
Bugs
No backend supports subpictures yet, so this does nothing.