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

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

Inherits WireTapClipFormat.

Public Member Functions

int bitsPerSample () const
 Gets the number of bits used to represent a single sample in an audio frame. More...
 
int numSamples () const
 Gets the number of samples in an audio frame. More...
 
float sampleRate () const
 Gets the number of samples per second in an audio frame. More...
 
void setBitsPerSample (int bitsPerSample)
 Sets the number of bits used to represent a single sample in an audio frame. More...
 
void setNumSamples (int numSamples)
 Sets the number of samples in an audio frame. More...
 
void setSampleRate (float sampleRate)
 Sets the number of samples per second in an audio frame. More...
 
 WireTapAudioFormat ()
 Constructs a WireTapAudioClipFormat object. More...
 
 WireTapAudioFormat (int numSamples, int bitsPerSample, int numChannels, float sampleRate, const char *formatTag, const char *metadataTag=0, const char *metadata=0)
 Constructs a WireTapAudioClipFormat object from key parameters needed to interpret audio frames. More...
 
virtual ~WireTapAudioFormat ()
 Destructor. More...
 
- Public Member Functions inherited from WireTapClipFormat
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...
 
size_t 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 (size_t 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, size_t 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...
 

Additional Inherited Members

- Public Types inherited from WireTapClipFormat
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...
 
- Static Public Member Functions inherited from WireTapClipFormat
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 an audio clip node.

This class extends the video clip format class (WireTapClipFormat) to provide the means for interpreting the frames of an audio clip.

Constructor & Destructor Documentation

WireTapAudioFormat::WireTapAudioFormat ( )

Constructs a WireTapAudioClipFormat object.

WireTapAudioFormat::WireTapAudioFormat ( int  numSamples,
int  bitsPerSample,
int  numChannels,
float  sampleRate,
const char *  formatTag,
const char *  metadataTag = 0,
const char *  metadata = 0 
)

Constructs a WireTapAudioClipFormat object from key parameters needed to interpret audio frames.

Parameters
numSamplesAn input parameter. An integer that is the number of samples in an audio frame.
bitsPerSampleAn input parameter. An integer that is the number of bits used to represent a single sample in an audio frame.
numChannelsAn input parameter. An integer that is the number of channels in an audio frame.
sampleRateAn input parameter. A float that is the number of samples per second in an audio frame.
formatTagAn input parameter. A string that describes the format of frames in the audio clip. For example: aiff. 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 WireTapAudioFormat::~WireTapAudioFormat ( )
virtual

Destructor.

Member Function Documentation

int WireTapAudioFormat::bitsPerSample ( ) const

Gets the number of bits used to represent a single sample in an audio frame.

Returns
An integer that is the number of bits used to represent a single sample in an audio frame.
int WireTapAudioFormat::numSamples ( ) const

Gets the number of samples in an audio frame.

Returns
An integer that is the number of samples in an audio frame.
float WireTapAudioFormat::sampleRate ( ) const

Gets the number of samples per second in an audio frame.

Returns
A float that is the number of samples per second in an audio frame.
void WireTapAudioFormat::setBitsPerSample ( int  bitsPerSample)

Sets the number of bits used to represent a single sample in an audio frame.

Parameters
bitsPerSampleAn input parameter. An integer that is the number of bits used to represent a single sample in an audio frame.
void WireTapAudioFormat::setNumSamples ( int  numSamples)

Sets the number of samples in an audio frame.

Parameters
numSamplesAn input parameter. An integer that is the number of samples in an audio frame.
void WireTapAudioFormat::setSampleRate ( float  sampleRate)

Sets the number of samples per second in an audio frame.

Parameters
sampleRateAn input parameter. A float that is the number of samples per second in an audio frame.

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