NAME

Rivl_MediaType, Rivl_GetMediaType, Rivl_NameOfMediaType - Signal media types

SYNOPSIS

#include <rivl.h>
Rivl_MediaType
Rivl_GetMediaType (interp, name, mediaTypePtr)
char
*Rivl_NameOfMediaType (mediaType)

ARGUMENTS

Tcl_Interp *interp (in)
The Tcl interpreter.
char *name (in)
String containing a media type name.
Rivl_MediaType *mediaTypePtr (out)
Pointer to location in which to store media type corresponding to name.
Rivl_MediaType mediaType (in)
Media type.

DESCRIPTION

The media type of a signal indicates whether the signal represents an image, sequence, audio stream, or just a plain mathematical signal. The types are listed below.

Name			Tag

signal (sig)		RIVL_SIG
image (im)		RIVL_IMAGE
sequence (seq)		RIVL_SEQ
audio (aud)		RIVL_AUDIO
The name (and shorthand) are strings used to refer to the media type in Tcl. The tag is a constant of type Rivl_MediaType.

The constant values may be OR'd together -- see Rivl_GetSignal and Rivl_CreateFileFormat. The value RIVL_ANY_MEDIA is equivalent to all four media types OR'd together.

The media type of a given signal is an external property that may be set and queried with Rivl_ConfigureSignal and Rivl_QuerySignal. Beyond the media type property, there are small differences between how each subtype is represented -- see the overview for an explanation.

The media type is currently used to choose signal names (e.g. rivl_im5, rivl_seq7) and to restrict access to certain commands such as seq_map. However, the distinction between media types may be reduced or eliminated in the future.

Rivl_GetMediaType places in *mediaTypePtr the media type corresponding to name. Under normal circumstances the return media is TCL_OK and interp is unused. If name doesn't contain one of the valid media type names, then an error message is stored in interp->result, TCL_ERROR is returned, and *mediaTypePtr is unmodified.

Rivl_NameOfMediaType is the logical inverse of Rivl_GetMediaType. Given a media type it returns the corresponding name in a static string.