Wiretap API  <small>Wiretap 2018.1</small>
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
WireTapClipFormat Class Reference

This class defines the parameters needed to interpret the frame data associated with a clip node. More...

Inherited by WireTapAudioFormat.

Public Types

enum  ScanFormat {
  SCAN_FORMAT_UNKNOWN = -1, SCAN_FORMAT_FIELD_1_ODD = 0, SCAN_FORMAT_FIELD_1_EVEN, SCAN_FORMAT_FIELD_2_ODD,
  SCAN_FORMAT_FIELD_2_EVEN, SCAN_FORMAT_PROGRESSIVE, NUM_SCAN_FORMATS
}
 Specifies the field dominance and video standard of the clip. ODD indicates NTSC is the video standard of the clip. EVEN indicates PAL is the video standard of the clip. More...
 

Public Member Functions

int bitsPerChannel () const
 Gets the number of bits assigned to each channel in a frame; applies to image formats only. More...
 
int bitsPerPixel () const
 Gets the number of bits used to represent a single pixel in a frame; applies to image formats only. More...
 
const char * colourSpace () const
 Gets the colour space; applies to image formats only. More...
 
const char * formatTag () const
 Gets the tag that describes the format of the frames in the clip, such as "rgb", "jpg" or "aiff". More...
 
int frameBufferSize () const
 Gets the size (in bytes) of the buffer needed to store a frame in the format. More...
 
float frameRate () const
 Gets the number of frames displayed per second; applies to image formats only. More...
 
int height () const
 Gets the height of the frame buffer; applies to image formats only. More...
 
const char * metaData () const
 Gets the ASCII metadata stream for the current clip format, if one has been defined. More...
 
const char * metaDataTag () const
 Gets a tag that describes the format of a metadata stream if metadata is associated with the current clip format. More...
 
int numChannels () const
 Gets the number of channels in a pixel of a frame; applies to image formats only. More...
 
WireTapClipFormatoperator= (const WireTapClipFormat &src)
 Default assignment operator. More...
 
float pixelRatio () const
 Gets the aspect ratio of pixels in a frame; applies to image formats only. More...
 
ScanFormat scanFormat () const
 Gets the scan format for the current clip format; applies to video formats only. More...
 
void setBitsPerPixel (int bits)
 Sets the number of bits used to represent a single pixel in a frame; applies to image formats only. More...
 
void setColourSpace (const char *colourSpace)
 Sets the colour space; applies to image formats only. More...
 
void setFormatTag (const char *formatTag)
 Sets the tag that describes the format of the frames in the clip, such as "rgb", "jpg" or "aiff". More...
 
void setFrameBufferSize (int size)
 Sets the size of the buffer (in bytes) needed to store a frame in the format being described. More...
 
void setFrameRate (float rate)
 Sets the number of frames displayed per second; applies to image formats only. More...
 
void setHeight (int height)
 Sets the height of the frame buffer; applies to image formats only. More...
 
void setMetaData (const char *metadataStream)
 Sets an ASCII metadata stream for the current clip format. More...
 
void setMetaDataTag (const char *metadataTag)
 Sets a tag that describes the format of the metadata stream, if metadata is associated with the current clip format. More...
 
void setNumChannels (int numChannels)
 Sets the number of channels in a pixel of a frame; applies to image formats only. More...
 
void setPixelRatio (float ratio)
 Sets the aspect ratio of pixels in a frame; applies to image formats only. More...
 
void setScanFormat (ScanFormat scanFormat)
 Sets the scan format for the current clip format; applies to image formats only. More...
 
void setWidth (int width)
 Sets the width of the frame buffer; applies to image formats only. More...
 
int width () const
 Gets the width of the frame buffer; applies to image format only. More...
 
 WireTapClipFormat ()
 Constructs a WireTapClipFormat object. More...
 
 WireTapClipFormat (int frameWidth, int frameHeight, int bitsPerPixel, int numChannels, int frameBufferSize, float frameRate, float pixelRatio, ScanFormat scanFormat, const char *formatTag, const char *metadataTag=0, const char *metadata=0)
 Constructs a WireTapClipFormat object from key parameters (including the size of the frame buffer). More...
 
 WireTapClipFormat (int frameWidth, int frameHeight, int bitsPerPixel, int numChannels, float frameRate, float pixelRatio, ScanFormat scanFormat, const char *formatTag, const char *metadataTag=0, const char *metadata=0)
 Constructs a WireTapClipFormat object from key parameters (excluding the size of the frame buffer). More...
 
 WireTapClipFormat (int frameWidth, int frameHeight, int bitsPerPixel, int numChannels, const char *colourSpace, float frameRate, float pixelRatio, ScanFormat scanFormat, const char *formatTag, const char *metadataTag=0, const char *metadata=0)
 Constructs a WireTapClipFormat object from key parameters (excluding the size of the frame buffer). More...
 
 WireTapClipFormat (const WireTapClipFormat &format)
 Copy constructor. Constructs a new WireTapClipFormat object duplicating the content of the original. More...
 
virtual ~WireTapClipFormat ()
 Destructor. More...
 

Static Public Member Functions

static const char * FORMAT_AIFC ()
 
static const char * FORMAT_AIFF ()
 
static const char * FORMAT_ALIAS ()
 
static const char * FORMAT_CINEON ()
 
static const char * FORMAT_DL_AUDIO ()
 
static const char * FORMAT_DL_AUDIO_FLOAT ()
 
static const char * FORMAT_DL_AUDIO_FLOAT_LE ()
 
static const char * FORMAT_DL_AUDIO_INT16 ()
 
static const char * FORMAT_DL_AUDIO_INT16_LE ()
 
static const char * FORMAT_DL_AUDIO_INT24 ()
 
static const char * FORMAT_DL_AUDIO_INT24_LE ()
 
static const char * FORMAT_DL_AUDIO_INT24_MSB32_LE ()
 
static const char * FORMAT_DL_AUDIO_INT8 ()
 
static const char * FORMAT_DL_AUDIO_INT8_UNSIGNED ()
 
static const char * FORMAT_DL_AUDIO_MIXED ()
 
static const char * FORMAT_DPX ()
 
static const char * FORMAT_HLS ()
 
static const char * FORMAT_HLS_LE ()
 
static const char * FORMAT_HLSA ()
 
static const char * FORMAT_HLSA_LE ()
 
static const char * FORMAT_JPEG ()
 
static const char * FORMAT_MAYA ()
 
static const char * FORMAT_MIXED ()
 
static const char * FORMAT_MONO ()
 
static const char * FORMAT_MONO_FLOAT ()
 
static const char * FORMAT_MONO_FLOAT_LE ()
 
static const char * FORMAT_MONO_LE ()
 
static const char * FORMAT_OPENEXR ()
 
static const char * FORMAT_PHOTOSHOP ()
 
static const char * FORMAT_PICT ()
 
static const char * FORMAT_PIXAR ()
 
static const char * FORMAT_RGB ()
 
static const char * FORMAT_RGB_FLOAT ()
 
static const char * FORMAT_RGB_FLOAT_LE ()
 
static const char * FORMAT_RGB_LE ()
 
static const char * FORMAT_RGBA ()
 
static const char * FORMAT_RGBA_FLOAT ()
 
static const char * FORMAT_RGBA_FLOAT_LE ()
 
static const char * FORMAT_RGBA_LE ()
 
static const char * FORMAT_SGI ()
 
static const char * FORMAT_SOFTIMAGE ()
 
static const char * FORMAT_TARGA ()
 
static const char * FORMAT_TDI ()
 
static const char * FORMAT_TIFF ()
 
static const char * FORMAT_UYVY ()
 
static const char * FORMAT_UYVY_LE ()
 
static const char * FORMAT_WAV ()
 
static const char * FORMAT_WAVEFRONT ()
 
static const char * FORMAT_YUV ()
 
static const char * FORMAT_YUV_LE ()
 
static const char * FORMAT_YUVA ()
 
static const char * FORMAT_YUVA_LE ()
 
static const char * SCAN_FORMAT_FIELD_1_EVEN_STR ()
 Class method that gets a string that describes a PAL interlaced scan format. More...
 
static const char * SCAN_FORMAT_FIELD_1_ODD_STR ()
 Class method that gets a string that describes an NTSC interlaced scan format. More...
 
static const char * SCAN_FORMAT_FIELD_2_EVEN_STR ()
 Class method that gets a string that describes a PAL interlaced scan format. More...
 
static const char * SCAN_FORMAT_FIELD_2_ODD_STR ()
 Class method that gets a string that describes an NTSC interlaced scan format. More...
 
static const char * SCAN_FORMAT_PROGRESSIVE_STR ()
 Class method that gets a string that describes the progressive scan format. More...
 
static const char * SCAN_FORMAT_UNKNOWN_STR ()
 Class method that gets a string that indicates the scan format is not known. More...
 
static const char * scanFormatStr (ScanFormat format)
 Class method that converts a video scan format to a string. More...
 
static
WireTapClipFormat::ScanFormat 
strToScanFormat (const char *formatString)
 Class method that converts a string to a video scan format. More...
 

Detailed Description

This class defines the parameters needed to interpret the frame data associated with a clip node.

WireTapClipFormat is designed to provide sufficient information to interpret any data stream, with a focus on video frames. Its subclass WireTapAudioFormat serves the same purpose, but with a focus on audio frames.

Format Tags
WireTapClipFormat includes a format tag that describes the format of frames in the clip. The tag is an ASCII string (for example, "rgb", "jpg", "aiff", and so on). Wiretap clients must check this tag to determine how to interpret frame data, and they must supply a format tag when instantiating WireTapClipFormat.

This class provides methods for getting and setting the format tag (WireTapClipFormat.formatTag and WireTapClipFormat.setFormatTag).
Predefined Format Tags
This class also provides a large number of static methods that return pre-defined format tags. There are predefined format tags for many existing audio and image formats. See Static Methods for Setting the Format Tag .

The predefined tags facilitate sharing of common formats. Wiretap client and server implementations should use these predefined tags as much as possible, instead of defining their own strings. Wiretap clients can add new tags, but clients must be equipped to handle the predefined tags in order to interpret frames properly.

Note: Wiretap has no knowledge of the formats in the predefined tags, and cannot interpret the frames in any way.
Scan Formats
WireTapClipFormat includes an enumeration, WireTapClipFormat::ScanFormat, that defines integer constants for standard video scanning formats. Wiretap clients must supply a scan format when instantiating WireTapClipFormat for video clips.

This class provides methods for getting and setting the scan format (WireTapClipFormat.scanFormat and WireTapClipFormat.setScanFormat).

This class also provides methods for converting between scan formats and their string equivalents (WireTapClipFormat.scanFormatStr and WireTapClipFormat.strToScanFormat).
Metadata
An instance of WireTapClipFormat can have metadata associated with it. Metadata is optional. The metadata can be an ASCII stream or a binary stream.

Metadata can be in various formats, for example: XML. WireTapClipFormat includes a metadata tag, that is, a string that describes the format of the metadata. The class provides methods for getting and setting the metadata tag (WireTapClipFormat.metaDataTag and WireTapClipFormat.setMetaDataTag).

WireTapClipFormat also provides methods for getting and setting the metadata stream itself (WireTapClipFormat.metaData and WireTapClipFormat.setMetaData).
See Also
WireTapAudioFormat and WireTapNodeHandle.createClipNode.

Member Enumeration Documentation

Specifies the field dominance and video standard of the clip. ODD indicates NTSC is the video standard of the clip. EVEN indicates PAL is the video standard of the clip.

Enumerator
SCAN_FORMAT_UNKNOWN 

The video scan format is not known.

SCAN_FORMAT_FIELD_1_ODD 

An NTSC interlaced scan format (odd lines drawn in Field 1, even lines drawn in Field 2) in which Field 1 is dominant.

SCAN_FORMAT_FIELD_1_EVEN 

A PAL interlaced scan format (even lines drawn in Field 1, odd lines drawn in Field 2) in which Field 1 is dominant.

SCAN_FORMAT_FIELD_2_ODD 

An NTSC interlaced scan format (odd lines drawn in Field 1, even lines drawn in Field 2) in which Field 2 is dominant.

SCAN_FORMAT_FIELD_2_EVEN 

A PAL interlaced scan format (even lines drawn in Field 1, odd lines drawn in Field 2) in which Field 2 is dominant.

SCAN_FORMAT_PROGRESSIVE 

Non-interlaced scan format in which the lines of each frame are drawn in sequence.

NUM_SCAN_FORMATS 

The number of video scan formats that are available.

Constructor & Destructor Documentation

WireTapClipFormat::WireTapClipFormat ( )

Constructs a WireTapClipFormat object.

WireTapClipFormat::WireTapClipFormat ( int  frameWidth,
int  frameHeight,
int  bitsPerPixel,
int  numChannels,
int  frameBufferSize,
float  frameRate,
float  pixelRatio,
ScanFormat  scanFormat,
const char *  formatTag,
const char *  metadataTag = 0,
const char *  metadata = 0 
)

Constructs a WireTapClipFormat object from key parameters (including the size of the frame buffer).

Parameters
frameWidthAn input parameter. The width of the frame buffer. The width of a video frame buffer (for example: YUV, RGB, and RGBA) is measured in pixels.
frameHeightAn input parameter. The height of the frame buffer. The height of a video frame buffer is measured in pixels.
bitsPerPixelAn input parameter. An integer that is the number of bits used to represent a single pixel in a video frame. For example, an 8-bit RGB frame has 24 bits per pixel (3 channels * 8 bits/channel).
numChannelsAn input parameter. An integer that is the number of channels in a pixel of a video frame. For example: RGB has 3 channels; RGBA has 4 channels.
frameBufferSizeAn input parameter. An integer that is the size (in bytes) of the buffer needed to store frames in the format being defined.
frameRateAn input parameter. A float that is the number of frames displayed per second in a video clip.
pixelRatioAn input parameter. A float that is the aspect ratio of pixels in the video format. This is not to be confused with the aspect ratio of the frame.
scanFormatAn input parameter. One of the scan format constants defined in this class. For example: progressive. See WireTapClipFormat.ScanFormat.
formatTagAn input parameter. A string that describes the format of frames in the video clip. For example: rgb. See Static Methods for Setting the Format Tag
metadataTagAn input parameter. A string that describes the format of the metadata stream, if one is to be defined for the clip format. For example: xml. If metadata is not required, this parameter can be omitted, and it will default to 0.
metadataAn input parameter. A string that contains the metadata for the clip format. If metadata is not required, this parameter can be omitted and it will default to 0.
WireTapClipFormat::WireTapClipFormat ( int  frameWidth,
int  frameHeight,
int  bitsPerPixel,
int  numChannels,
float  frameRate,
float  pixelRatio,
ScanFormat  scanFormat,
const char *  formatTag,
const char *  metadataTag = 0,
const char *  metadata = 0 
)

Constructs a WireTapClipFormat object from key parameters (excluding the size of the frame buffer).

Parameters
frameWidthAn input parameter. The width of the frame buffer. The width of a video frame buffer (for example: YUV, RGB, and RGBA) is measured in pixels.
frameHeightAn input parameter. The height of the frame buffer. The height of a video frame buffer is measured in pixels.
bitsPerPixelAn input parameter. An integer that is the number of bits used to represent a single pixel in a video frame. For example, an 8-bit RGB frame has 24 bits per pixel (3 channels * 8 bits/channel).
numChannelsAn input parameter. An integer that is the number of channels in a pixel of a video frame. For example: RGB has 3 channels; RGBA has 4 channels.
frameRateAn input parameter. A float that is the number of frames displayed per second in a video clip.
pixelRatioAn input parameter. A float that is the aspect ratio of pixels in the video format. This is not to be confused with the aspect ratio of the frame.
scanFormatAn input parameter. One of the scan format constants defined in this class. For example: progressive. See WireTapClipFormat.ScanFormat.
formatTagAn input parameter. A string that describes the format of frames in the video clip. For example: rgb. See Static Methods for Setting the Format Tag
metadataTagAn input parameter. A string that describes the format of the metadata stream, if one is to be defined for the clip format. For example: xml. If metadata is not required, this parameter can be omitted, and it will default to 0.
metadataAn input parameter. A string that contains the metadata for the clip format. If metadata is not required, this parameter can be omitted and it will default to 0.
WireTapClipFormat::WireTapClipFormat ( int  frameWidth,
int  frameHeight,
int  bitsPerPixel,
int  numChannels,
const char *  colourSpace,
float  frameRate,
float  pixelRatio,
ScanFormat  scanFormat,
const char *  formatTag,
const char *  metadataTag = 0,
const char *  metadata = 0 
)

Constructs a WireTapClipFormat object from key parameters (excluding the size of the frame buffer).

Parameters
frameWidthAn input parameter. The width of the frame buffer. The width of a video frame buffer (for example: YUV, RGB, and RGBA) is measured in pixels.
frameHeightAn input parameter. The height of the frame buffer. The height of a video frame buffer is measured in pixels.
bitsPerPixelAn input parameter. An integer that is the number of bits used to represent a single pixel in a video frame. For example, an 8-bit RGB frame has 24 bits per pixel (3 channels * 8 bits/channel).
numChannelsAn input parameter. An integer that is the number of channels in a pixel of a video frame. For example: RGB has 3 channels; RGBA has 4 channels.
colourSpaceAn input parameter. A string representing the colour space to be applied to the allocated frames.
frameRateAn input parameter. A float that is the number of frames displayed per second in a video clip.
pixelRatioAn input parameter. A float that is the aspect ratio of pixels in the video format. This is not to be confused with the aspect ratio of the frame.
scanFormatAn input parameter. One of the scan format constants defined in this class. For example: progressive. See WireTapClipFormat.ScanFormat.
formatTagAn input parameter. A string that describes the format of frames in the video clip. For example: rgb. See Static Methods for Setting the Format Tag
metadataTagAn input parameter. A string that describes the format of the metadata stream, if one is to be defined for the clip format. For example: xml. If metadata is not required, this parameter can be omitted, and it will default to 0.
metadataAn input parameter. A string that contains the metadata for the clip format. If metadata is not required, this parameter can be omitted and it will default to 0.
virtual WireTapClipFormat::~WireTapClipFormat ( )
virtual

Destructor.

WireTapClipFormat::WireTapClipFormat ( const WireTapClipFormat format)

Copy constructor. Constructs a new WireTapClipFormat object duplicating the content of the original.

Parameters
formatAn input parameter. The WiretapServerInfo object that is to be copied.

Member Function Documentation

int WireTapClipFormat::bitsPerChannel ( ) const

Gets the number of bits assigned to each channel in a frame; applies to image formats only.

This value is derived from member variables as follows: bitsPerPixel / numChannels. The value is rounded down to the nearest bit.

See Also
Returns
An integer that is the number of bits assigned to each channel in a video frame.
int WireTapClipFormat::bitsPerPixel ( ) const

Gets the number of bits used to represent a single pixel in a frame; applies to image formats only.

For example, an 8-bit RGB frame has 24 bits per pixel (3 channels * 8 bits/channel).

For a non-video format, this method may get the number of bits in a unit that is relevant for the format (rather than in pixels).

See Also
Returns
An integer that is the number of bits used to represent a single pixel in a video frame.
const char* WireTapClipFormat::colourSpace ( ) const

Gets the colour space; applies to image formats only.

Returns
A string representing the colour space being applied to the frames
static const char* WireTapClipFormat::FORMAT_AIFC ( )
static
static const char* WireTapClipFormat::FORMAT_AIFF ( )
static
static const char* WireTapClipFormat::FORMAT_ALIAS ( )
static
static const char* WireTapClipFormat::FORMAT_CINEON ( )
static
static const char* WireTapClipFormat::FORMAT_DL_AUDIO ( )
static
static const char* WireTapClipFormat::FORMAT_DL_AUDIO_FLOAT ( )
static
static const char* WireTapClipFormat::FORMAT_DL_AUDIO_FLOAT_LE ( )
static
static const char* WireTapClipFormat::FORMAT_DL_AUDIO_INT16 ( )
static
static const char* WireTapClipFormat::FORMAT_DL_AUDIO_INT16_LE ( )
static
static const char* WireTapClipFormat::FORMAT_DL_AUDIO_INT24 ( )
static
static const char* WireTapClipFormat::FORMAT_DL_AUDIO_INT24_LE ( )
static
static const char* WireTapClipFormat::FORMAT_DL_AUDIO_INT24_MSB32_LE ( )
static
static const char* WireTapClipFormat::FORMAT_DL_AUDIO_INT8 ( )
static
static const char* WireTapClipFormat::FORMAT_DL_AUDIO_INT8_UNSIGNED ( )
static
static const char* WireTapClipFormat::FORMAT_DL_AUDIO_MIXED ( )
static
static const char* WireTapClipFormat::FORMAT_DPX ( )
static
static const char* WireTapClipFormat::FORMAT_HLS ( )
static
static const char* WireTapClipFormat::FORMAT_HLS_LE ( )
static
static const char* WireTapClipFormat::FORMAT_HLSA ( )
static
static const char* WireTapClipFormat::FORMAT_HLSA_LE ( )
static
static const char* WireTapClipFormat::FORMAT_JPEG ( )
static
static const char* WireTapClipFormat::FORMAT_MAYA ( )
static
static const char* WireTapClipFormat::FORMAT_MIXED ( )
static
static const char* WireTapClipFormat::FORMAT_MONO ( )
static
static const char* WireTapClipFormat::FORMAT_MONO_FLOAT ( )
static
static const char* WireTapClipFormat::FORMAT_MONO_FLOAT_LE ( )
static
static const char* WireTapClipFormat::FORMAT_MONO_LE ( )
static
static const char* WireTapClipFormat::FORMAT_OPENEXR ( )
static
static const char* WireTapClipFormat::FORMAT_PHOTOSHOP ( )
static
static const char* WireTapClipFormat::FORMAT_PICT ( )
static
static const char* WireTapClipFormat::FORMAT_PIXAR ( )
static
static const char* WireTapClipFormat::FORMAT_RGB ( )
static
static const char* WireTapClipFormat::FORMAT_RGB_FLOAT ( )
static
static const char* WireTapClipFormat::FORMAT_RGB_FLOAT_LE ( )
static
static const char* WireTapClipFormat::FORMAT_RGB_LE ( )
static
static const char* WireTapClipFormat::FORMAT_RGBA ( )
static
static const char* WireTapClipFormat::FORMAT_RGBA_FLOAT ( )
static
static const char* WireTapClipFormat::FORMAT_RGBA_FLOAT_LE ( )
static
static const char* WireTapClipFormat::FORMAT_RGBA_LE ( )
static
static const char* WireTapClipFormat::FORMAT_SGI ( )
static
static const char* WireTapClipFormat::FORMAT_SOFTIMAGE ( )
static
static const char* WireTapClipFormat::FORMAT_TARGA ( )
static
static const char* WireTapClipFormat::FORMAT_TDI ( )
static
static const char* WireTapClipFormat::FORMAT_TIFF ( )
static
static const char* WireTapClipFormat::FORMAT_UYVY ( )
static
static const char* WireTapClipFormat::FORMAT_UYVY_LE ( )
static
static const char* WireTapClipFormat::FORMAT_WAV ( )
static
static const char* WireTapClipFormat::FORMAT_WAVEFRONT ( )
static
static const char* WireTapClipFormat::FORMAT_YUV ( )
static
static const char* WireTapClipFormat::FORMAT_YUV_LE ( )
static
static const char* WireTapClipFormat::FORMAT_YUVA ( )
static
static const char* WireTapClipFormat::FORMAT_YUVA_LE ( )
static
const char* WireTapClipFormat::formatTag ( ) const

Gets the tag that describes the format of the frames in the clip, such as "rgb", "jpg" or "aiff".

A Wiretap client must check this tag to determine how to interpret frame data.

See Also
WireTapClipFormat.setFormatTag
Returns
A string that describes a video or audio format.
int WireTapClipFormat::frameBufferSize ( ) const

Gets the size (in bytes) of the buffer needed to store a frame in the format.

For example, an 8-bit NTSC RGB image would require: 486 * 720 * 3 * 1 bytes.

Wiretap clients need this value when allocating a buffer for reading and writing frames. The sample program createClip.cpp shows how to use this method.

See WireTapNodeHandle.readFrame and WireTapNodeHandle.writeFrame.

Returns
An integer that is the size (in bytes) of the buffer needed to store the frame in the format.
float WireTapClipFormat::frameRate ( ) const

Gets the number of frames displayed per second; applies to image formats only.

Typical values are 24, 29.97, and so on.

Returns
A float that is the number of frames displayed per second.
int WireTapClipFormat::height ( ) const

Gets the height of the frame buffer; applies to image formats only.

Returns
An integer that is the height of the frame buffer. The height of a video frame buffer for example: YUV, RGB, and RGBA) is measured in pixels.
const char* WireTapClipFormat::metaData ( ) const

Gets the ASCII metadata stream for the current clip format, if one has been defined.

A clip format can optionally have free-form metadata to communicate extra formatting information. Wiretap clients obtain the metadata stream with this method. The stream is set with WireTapClipFormat.setMetaData.

If metadata has been defined, Wiretap clients can obtain its format using WireTapClipFormat.metaDataTag. The format is set with the method WireTapClipFormat.setMetaDataTag.

Returns
A string that is the metadata stream for the clip format.
const char* WireTapClipFormat::metaDataTag ( ) const

Gets a tag that describes the format of a metadata stream if metadata is associated with the current clip format.

A clip format can optionally have free-form metadata to communicate extra formatting information. The metadata tag determines the type or format of the metadata stream.

See Also
Returns
A string that describes the format of the metadata stream if one has been defined for the clip format. For example: xml.
int WireTapClipFormat::numChannels ( ) const

Gets the number of channels in a pixel of a frame; applies to image formats only.

For example: RGB has 3 channels; RGBA has 4 channels.

See Also
Returns
An integer that is the number of channels in a pixel of a video frame.
WireTapClipFormat& WireTapClipFormat::operator= ( const WireTapClipFormat src)

Default assignment operator.

Returns a reference to the source object.

Parameters
srcAn input parameter. The WireTapClipFormat object to which the reference should point.
float WireTapClipFormat::pixelRatio ( ) const

Gets the aspect ratio of pixels in a frame; applies to image formats only.

This is not to be confused with the aspect ratio of the image or frame.

Returns
A float that is the aspect ratio of each video frame pixel.
static const char* WireTapClipFormat::SCAN_FORMAT_FIELD_1_EVEN_STR ( )
static

Class method that gets a string that describes a PAL interlaced scan format.

See WireTapClipFormat::SCAN_FORMAT_FIELD_1_EVEN for a description of the format.

Returns
The following string: field1_even.
static const char* WireTapClipFormat::SCAN_FORMAT_FIELD_1_ODD_STR ( )
static

Class method that gets a string that describes an NTSC interlaced scan format.

See WireTapClipFormat::SCAN_FORMAT_FIELD_1_ODD for a description of the format.

Returns
The following string: field1_odd.
static const char* WireTapClipFormat::SCAN_FORMAT_FIELD_2_EVEN_STR ( )
static

Class method that gets a string that describes a PAL interlaced scan format.

See WireTapClipFormat::SCAN_FORMAT_FIELD_2_EVEN for a description of the format.

Returns
The following string: field2_even.
static const char* WireTapClipFormat::SCAN_FORMAT_FIELD_2_ODD_STR ( )
static

Class method that gets a string that describes an NTSC interlaced scan format.

See WireTapClipFormat::SCAN_FORMAT_FIELD_2_ODD for a description of the format.

Returns
The following string: field2_odd.
static const char* WireTapClipFormat::SCAN_FORMAT_PROGRESSIVE_STR ( )
static

Class method that gets a string that describes the progressive scan format.

A progressive scan means the lines of each frame are drawn in sequence.

Returns
The following string: progressive.
static const char* WireTapClipFormat::SCAN_FORMAT_UNKNOWN_STR ( )
static

Class method that gets a string that indicates the scan format is not known.

Returns
The following string: unknown.
ScanFormat WireTapClipFormat::scanFormat ( ) const

Gets the scan format for the current clip format; applies to video formats only.

Video scan formats control how video frames are drawn. A format is either progressive (the lines of a frame are drawn in sequence) or interlaced (divided into two fields which are interlaced). For interlaced formats, the format also indicates which field is dominant.

See Also
Returns
One of the scan format constants defined in this class. See WireTapClipFormat.ScanFormat.
static const char* WireTapClipFormat::scanFormatStr ( ScanFormat  format)
static

Class method that converts a video scan format to a string.

See Also
Parameters
formatAn input parameter. One of the scan format constants defined in this class. See WireTapClipFormat.ScanFormat.
Returns
. A string that describes the video scan format.
void WireTapClipFormat::setBitsPerPixel ( int  bits)

Sets the number of bits used to represent a single pixel in a frame; applies to image formats only.

For example, an 8-bit RGB frame has 24 bits per pixel (3 channels * 8 bits/channel).

For a non-video format, this method may be used to set the number of bits in a unit that is relevant for the format (rather than in pixels).

See Also
Parameters
bitsAn input parameter. An integer that is the number of bits used to represent a single pixel in a video frame.
void WireTapClipFormat::setColourSpace ( const char *  colourSpace)

Sets the colour space; applies to image formats only.

Parameters
colourSpaceAn input parameter. A string representing the colourSpace being appplied to the frames.
void WireTapClipFormat::setFormatTag ( const char *  formatTag)

Sets the tag that describes the format of the frames in the clip, such as "rgb", "jpg" or "aiff".

Wiretap clients must check this format tag to determine how to interpret frame data. The WireTapClipFormat.formatTag method returns the tag.

Parameters
formatTagAn input parameter. A string that describes the format of frames in the video clip. See below for lists of the static methods of this class that can be used to set the format tag to standard formats.

The following static methods are available for setting the format tag for some standard image file formats:

Note
In the static methods for raw image and audio formats listed, below the "_LE" prefix indicates that a format is "Little-endian", which means that multi-byte storage is reversed (least significant bit is first). Most frame formats are big-endian. Linux and Windows systems are little-endian, whereas IRIX systems are big-endian.

The following static methods can be used to set the format tag for raw image files:

The following static methods are available for setting the format tag for audio clips:

void WireTapClipFormat::setFrameBufferSize ( int  size)

Sets the size of the buffer (in bytes) needed to store a frame in the format being described.

For example, an 8-bit NTSC RGB image would require: 486 * 720 * 3 * 1 bytes.

Wiretap clients need this value when allocating a buffer for reading and writing frames. See WireTapNodeHandle.readFrame and WireTapNodeHandle.writeFrame.

Parameters
sizeAn input parameter. An integer that is the size (in bytes) of the buffer needed to store frames in the format being defined.
void WireTapClipFormat::setFrameRate ( float  rate)

Sets the number of frames displayed per second; applies to image formats only.

Typical values are 24, 29.97, and so on.

Parameters
rateAn input parameter. A float that is the number of frames displayed per second.
void WireTapClipFormat::setHeight ( int  height)

Sets the height of the frame buffer; applies to image formats only.

Parameters
heightAn input parameter. The height of the frame buffer. The height of a video frame buffer (for example: YUV, RGB, and RGBA) is measured in pixels.
void WireTapClipFormat::setMetaData ( const char *  metadataStream)

Sets an ASCII metadata stream for the current clip format.

A clip format can optionally have free-form metadata to communicate extra formatting information. Wiretap clients obtain the stream with this method. And typically, Wiretap servers set the stream with WireTapClipFormat.setMetaData.

If metadata has been defined, Wiretap clients can obtain its format using WireTapClipFormat.metaDataTag. The format is set with the method WireTapClipFormat.setMetaDataTag.

Parameters
metadataStreamAn input parameter. A string that contains the metadata for the clip format.
void WireTapClipFormat::setMetaDataTag ( const char *  metadataTag)

Sets a tag that describes the format of the metadata stream, if metadata is associated with the current clip format.

A clip format can optionally have free-form metadata to communicate extra formatting information. The metadata tag determines the type or format of the metadata stream.

See Also
Parameters
metadataTagA string that describes the format of the metadata stream, if one has been defined for the clip format. For example: xml.
void WireTapClipFormat::setNumChannels ( int  numChannels)

Sets the number of channels in a pixel of a frame; applies to image formats only.

For example: RGB has 3 channels; RGBA has 4 channels.

See Also
Parameters
numChannelsAn input parameter. An integer that is the number of channels in a pixel of a video frame.
void WireTapClipFormat::setPixelRatio ( float  ratio)

Sets the aspect ratio of pixels in a frame; applies to image formats only.

This is not to be confused with the image or frame aspect ratio.

Parameters
ratioAn input parameter. A float that is the aspect ratio of pixels in the video format.
void WireTapClipFormat::setScanFormat ( ScanFormat  scanFormat)

Sets the scan format for the current clip format; applies to image formats only.

Video scan formats control how video frames are drawn. A format is either progressive (the lines of a frame are drawn in sequence) or interlaced (divided into two fields which are interlaced). For interlaced formats, the format also indicates which field is dominant.

See Also
Parameters
scanFormatAn input parameter. One of the scan format constants defined in this class. See WireTapClipFormat.ScanFormat.
void WireTapClipFormat::setWidth ( int  width)

Sets the width of the frame buffer; applies to image formats only.

Parameters
widthAn input parameter. The width of the frame buffer. The width of a video frame buffer (for example: YUV, RGB, and RGBA) is measured in pixels.
static WireTapClipFormat::ScanFormat WireTapClipFormat::strToScanFormat ( const char *  formatString)
static

Class method that converts a string to a video scan format.

See Also
Parameters
formatStringAn input parameter. A string that describes a video scan format.
Returns
One of the scan format constants defined in this class. See WireTapClipFormat.ScanFormat.
int WireTapClipFormat::width ( ) const

Gets the width of the frame buffer; applies to image format only.

Returns
An integer that is the width of the frame buffer. The width of a video frame buffer (for example: YUV, RGB, and RGBA) is measured in pixels.

The documentation for this class was generated from the following file: