Michael Heilmann's Arcadia Media
This is the documentation for Michael Heilmann's Arcadia Media provides procedural creation and manipulation of audial entities, like sample buffers, and visual entities, like pixel buffers.
Documentation
Arcadia_Media_PixelBuffer
Arcadia_Media_PixelBuffer extends Arcadia_Object.
Arcadia_Media_PixelBuffer is a two-dimensional array of pixels.
The following terms and definitions are used througout its documentation:
- pixel: A pixel is uniquely adressed by the index of its column and its row.
- number of columns: The number of columns of the pixel rectangle. A column is adressed by zero-based consecutive integral ascending indices (0,1,2,...). The number of columns is also called the width of the pixel rectangle.
- number of rows: The number of rows of the pixel rectangle. A row is adressed by zero-based consecutive integral ascending indices (0,1,2,...). The number of rows is also called the height of the pixel rectangle.
- pixel format: The pixel format of the pixels of the pixel buffer as defined by Arcadia_Media_PixelFormat.
- line padding: The number of Bytes after a line.
-
line stride: The number of Bytes of a line which comprises the Bytes of the actual pixels plus the line padding.
<number of columns> * <bytes per pixel> + <line padding>
Arcadia_Media_PixelBuffer_create
Arcadia_Media_PixelBuffer*
Arcadia_Media_PixelBuffer_create
(
Arcadia_Thread* thread,
Arcadia_Integer32Value linePadding,
Arcadia_Integer32Value numberOfColumns,
Arcadia_Integer32Value numberOfRows,
Arcadia_Media_PixelFormat pixelFormat,
)
Parameters
Arcadia_Thread object.Errors
linePadding, numberOfColumns, numberOfRows is negative.Return value
A pointer to the Arcadia_Media_PixelBuffer object.
Arcadia_Media_PixelBuffer_getHeight
Arcadia_Integer32Value
Arcadia_Media_PixelBuffer_getHeight
(
Arcadia_Thread* thread
Arcadia_Media_PixelBuffer* self
)
Parameters
Arcadia_Thread object.Return value
The height of this pixel buffer.
Arcadia_Media_PixelBuffer_getLinePadding
Arcadia_Integer32Value
Arcadia_Media_PixelBuffer_getLinePadding
(
Arcadia_Thread* thread
Arcadia_Media_PixelBuffer* self
)
Parameters
Arcadia_Thread object.Return value
The line padding of this pixel buffer.
Arcadia_Media_PixelBuffer_getLineStride
Arcadia_Integer32Value
Arcadia_Media_PixelBuffer_getLineStride
(
Arcadia_Thread* thread
Arcadia_Media_PixelBuffer* self
)
Parameters
Arcadia_Thread object.Return value
The line stride of this pixel buffer.
Arcadia_Media_PixelBuffer_getNumberOfColumns
Arcadia_Integer32Value
Arcadia_Media_PixelBuffer_getNumberOfColumns
(
Arcadia_Thread* thread
Arcadia_Media_PixelBuffer* self
)
Parameters
Arcadia_Thread object.Return value
The number of columns of this pixel buffer.
Arcadia_Media_PixelBuffer_getNumberOfRows
Arcadia_Integer32Value
Arcadia_Media_PixelBuffer_getNumberOfRows
(
Arcadia_Thread* thread
Arcadia_Media_PixelBuffer* self
)
Parameters
Arcadia_Thread object.Return value
The number of rows of this pixel buffer.
Arcadia_Media_PixelBuffer_getPixelFormat
Arcadia_Media_PixelFormat
Arcadia_Media_PixelBuffer_getPixelFormat
(
Arcadia_Thread* thread
Arcadia_Media_PixelBuffer* self
)
Parameters
Arcadia_Thread object.Return value
The pixel format of this pixel buffer.
Arcadia_Media_PixelBuffer_getWidth
Arcadia_Integer32Value
Arcadia_Media_PixelBuffer_getWidth
(
Arcadia_Thread* thread
Arcadia_Media_PixelBuffer* self
)
Parameters
Arcadia_Thread object.Return value
The width of this pixel buffer.
Arcadia_Media_PixelFormat
typedef enum Arcadia_Media_PixelFormat Arcadia_Media_PixelFormat;
Elements
Arcadia_Media_PixelFormat_AlphaBlueGreenRedNatural8
Arcadia_Media_PixelFormat_AlphaGrayNatural8
Arcadia_Media_PixelFormat_AlphaRedGreenBlueNatural8
Arcadia_Media_PixelFormat_BlueGreenRedNatural8
Arcadia_Media_PixelFormat_BlueGreenRedAlphaNatural8
Arcadia_Media_PixelFormat_GrayNatural8
Arcadia_Media_PixelFormat_GrayAlphaNatural8
Arcadia_Media_PixelFormat_RedGreenBlueNatural8
Arcadia_Media_PixelFormat_RedGreenBlueAlphaNatural8
Arcadia_Media_PixelFormat_getNumberOfComponents
Arcadia_SizeValue
Arcadia_Media_PixelFormat_getNumberOfComponents
(
Arcadia_Thread* thread,
Arcadia_Media_PixelFormat self
)
Parameters
Arcadia_Thread object.Return value
The number of components of a pixel of this pixel format.
Arcadia_Media_PixelFormat_getNumberOfBytes
Arcadia_SizeValue
Arcadia_Media_PixelFormat_getNumberOfBytes
(
Arcadia_Thread* thread,
Arcadia_Media_PixelFormat self
)
Parameters
Arcadia_Thread object.Return value
The number of Bytes of a pixel of this pixel format.
Arcadia_Media_SampleBuffer
Arcadia_Media_SampleBuffer extends Arcadia_Object.
Arcadia_Media_SampleBuffer is a one-dimensional array of samples.
The following terms and definitions are used througout its documentation:
- sample: An integral value representing an amplitude value. A sample is uniquely identified by a zero-based integral index.
- length: The length, in seconds, of the sample buffer.
- sample rate: The sample rate of the sample buffer.
- sample format: The sample format of the samples of the sample buffer as defined by Arcadia_Media_SampleFormat.
Arcadia_Media_SampleBuffer_create
Arcadia_Media_SampleBuffer*
Arcadia_Media_SampleBuffer_create
(
Arcadia_Thread* thread,
Arcadia_Integer32Value length,
Arcadia_Integer32Value sampleRate,
Arcadia_Media_SampleFormat sampleFormat,
)
Parameters
Arcadia_Thread object.Errors
length, sampleRate is negative.Return value
A pointer to the Arcadia_Media_SampleBuffer object.
Arcadia_Media_SampleBuffer_getLength
Arcadia_Integer32Value
Arcadia_Media_SampleBuffer_getLength
(
Arcadia_Thread* thread
Arcadia_Media_SampleBuffer* self
)
Parameters
Arcadia_Thread object.Return value
The length of this sample buffer.
Arcadia_Media_SampleBuffer_getSampleFormat
Arcadia_Media_SampleFormat
Arcadia_Media_SampleBuffer_getSampleFormat
(
Arcadia_Thread* thread
Arcadia_Media_SampleBuffer* self
)
Parameters
Arcadia_Thread object.Return value
The sample format of this sample buffer.
Arcadia_Media_SampleBuffer_getSampleRate
Arcadia_Integer32Value
Arcadia_Media_SampleBuffer_getSampleRate
(
Arcadia_Thread* thread
Arcadia_Media_SampleBuffer* self
)
Parameters
Arcadia_Thread object.Return value
The sample rate of this sample buffer.
Arcadia_Media_SampleFormat
typedef enum Arcadia_Media_SampleFormat Arcadia_Media_SampleFormat;
Elements
Arcadia_Media_SampleFormat_Integer16
Arcadia_Media_SampleFormat_Integer8
Arcadia_Media_SampleFormat_Natural16
Arcadia_Media_SampleFormat_Natural8
Arcadia_Media_SampleFormat_getNumberOfBytes
Arcadia_SizeValue
Arcadia_Media_SampleFormat_getNumberOfBytes
(
Arcadia_Thread* thread,
Arcadia_Medial_SampleFormat self
)
Parameters
Arcadia_Thread object.Return value
The number of Bytes of a sample of this sample format.