FMLiveSwitchVideoBuffer Class Reference

A video buffer. More...

Instance Methods

(FMLiveSwitchVideoBuffer *) - clone
 Clones this instance. More...
 
(FMLiveSwitchVideoBuffer *) - convertWithFormat:
 Creates a new video buffer using the specified format. More...
 
(FMLiveSwitchVideoBuffer *) - convertWithFormat:dataBuffer:
 Creates a new video buffer using the specified format. More...
 
(FMLiveSwitchVideoBuffer *) - convertWithFormat:usePool:
 Creates a new video buffer using the specified format. More...
 
(void) - copyTransformationAttributesWithSourceBuffer:
 Copy the transformation attributes from another video buffer. More...
 
(FMLiveSwitchVideoBuffer *) - createInstance
 Creates a new instance. More...
 
(int) - getAValueWithIndex:
 Gets the A value at a given index. More...
 
(int) - getBValueWithIndex:
 Gets the B value at a given index. More...
 
(int) - getGValueWithIndex:
 Gets the G value at a given index. More...
 
(int) - getRValueWithIndex:
 Gets the R value at a given index. More...
 
(int) - getUValueWithIndex:
 Gets the U value at a given index. More...
 
(int) - getVValueWithIndex:
 Gets the V value at a given index. More...
 
(int) - getYValueWithIndex:
 Gets the Y value at a given index. More...
 
(int) - height
 Gets the height. More...
 
(bool) - horizontallyMirrored
 Gets whether this buffer should be mirrored over the X axis. More...
 
(instancetype) - init
 Initializes a new instance of the FMLiveSwitchVideoBuffer class. More...
 
(instancetype) - initWithWidth:height:dataBuffer:format:
 Initializes a new instance of the FMLiveSwitchVideoBuffer class. More...
 
(instancetype) - initWithWidth:height:dataBuffers:format:
 Initializes a new instance of the FMLiveSwitchVideoBuffer class. More...
 
(instancetype) - initWithWidth:height:stride:dataBuffer:format:
 Initializes a new instance of the FMLiveSwitchVideoBuffer class. More...
 
(instancetype) - initWithWidth:height:strides:dataBuffers:format:
 Initializes a new instance of the FMLiveSwitchVideoBuffer class. More...
 
(bool) - inversionRequired
 Gets whether inversion is required to reset the mirroring of this buffer. More...
 
(bool) - isAbgr
 Gets a value indicating whether this buffer has ABGR video. More...
 
(bool) - isArgb
 Gets a value indicating whether this buffer has ARGB video. More...
 
(bool) - isBgr
 Gets a value indicating whether this buffer has BGR video. More...
 
(bool) - isBgra
 Gets a value indicating whether this buffer has BGRA video. More...
 
(bool) - isH264
 Gets a value indicating whether this buffer has H.264 video. More...
 
(bool) - isH265
 Gets a value indicating whether this buffer has H.265 video. More...
 
(bool) - isI420
 Gets a value indicating whether this buffer has I420 video. More...
 
(bool) - isKeyFrame
 Gets a value indicating whether this buffer contains a keyframe. More...
 
(bool) - isMuted
 Gets a value indicating whether this instance has been muted. More...
 
(bool) - isNv12
 Gets a value indicating whether this buffer has NV12 video. More...
 
(bool) - isNv21
 Gets a value indicating whether this buffer has NV21 video. More...
 
(bool) - isPacked
 Gets a value indicating whether the data is packed into a single data buffer. More...
 
(bool) - isPlanar
 Gets a value indicating whether the data is spread across multiple data buffers (planes). More...
 
(bool) - isRaw
 Gets a value indicating whether this buffer has raw video. More...
 
(bool) - isRgb
 Gets a value indicating whether this buffer has RGB video. More...
 
(bool) - isRgba
 Gets a value indicating whether this buffer has RGBA video. More...
 
(bool) - isRgbaType
 Gets a value indicating whether this buffer has raw RGBA, BGRA, ARGB, or ABGR video. More...
 
(bool) - isRgbType
 Gets a value indicating whether this buffer has raw RGB or BGR video. More...
 
(bool) - isVp8
 Gets a value indicating whether this buffer has VP8 video. More...
 
(bool) - isVp9
 Gets a value indicating whether this buffer has VP9 video. More...
 
(bool) - isYuvType
 Gets a value indicating whether this buffer has raw I420, YV12, NV12, or NV21 video. More...
 
(bool) - isYv12
 Gets a value indicating whether this buffer has YV12 video. More...
 
(bool) - mute
 Mutes this instance. More...
 
(int) - orientation
 Gets the desired orientation of the buffer. More...
 
(void) - resetTransformationAttributes
 Resets the transformation attributes back to default values. More...
 
(int) - rotationRequired
 Gets whether rotation is required to reset the mirroring and orientation of this buffer. More...
 
(bool) - setAValue:index:
 Gets the A value at a given index. More...
 
(bool) - setBValue:index:
 Gets the B value at a given index. More...
 
(bool) - setGValue:index:
 Sets the G value at a given index. More...
 
(void) - setHeight:
 Sets the height. More...
 
(void) - setHorizontallyMirrored:
 Sets whether this buffer should be mirrored over the X axis. More...
 
(void) - setOrientation:
 Sets the desired orientation of the buffer. More...
 
(bool) - setRValue:index:
 Sets the R value at a given index. More...
 
(void) - setStride:
 Sets the stride. More...
 
(void) - setStrides:
 Sets the strides. More...
 
(bool) - setUValue:index:
 Sets the U value at a given index. More...
 
(void) - setVerticallyMirrored:
 Sets whether this buffer should be mirrored over the Y axis. More...
 
(bool) - setVValue:index:
 Sets the V value at a given index. More...
 
(void) - setWidth:
 Sets the width. More...
 
(bool) - setYValue:index:
 Sets the Y value at a given index. More...
 
(int) - stride
 Gets the stride. More...
 
(NSMutableArray *) - strides
 Gets the strides. More...
 
(NSString *) - toJson
 Serializes this instance to JSON. More...
 
(FMLiveSwitchVideoBuffer *) - toPacked
 Creates a packed representation of this planar buffer, if in YUV-planar format. More...
 
(FMLiveSwitchVideoBuffer *) - toPackedWithUsePool:
 Creates a packed representation of this planar buffer, if in YUV-planar format. More...
 
(FMLiveSwitchVideoBuffer *) - toPlanar
 Creates a planar representation of this packed buffer, if in YUV-packed format. More...
 
(bool) - transformRequired
 Gets a boolean value on whether the buffer needs to be transformed. More...
 
(bool) - verticallyMirrored
 Gets whether this buffer should be mirrored over the Y axis. More...
 
(int) - width
 Gets the width. More...
 
- Instance Methods inherited from FMLiveSwitchMediaBuffer
(FMLiveSwitchDataBuffer *) - dataBuffer
 Gets the data buffer. More...
 
(NSMutableArray *) - dataBuffers
 Gets the data buffers. More...
 
(NSString *) - description
 Returns a string that represents this instance. More...
 
(int) - footprint
 Gets the approximate footprint of this media buffer by returning the sum of its data buffer lengths. More...
 
(TFormat) - format
 Gets the format. More...
 
(TBuffer) - free
 Frees the data buffers referenced by this instance. More...
 
(instancetype) - initWithDataBuffer:format:
 Initializes a new instance of the FMLiveSwitchMediaBuffer`2 class. More...
 
(instancetype) - initWithDataBuffers:format:
 Initializes a new instance of the FMLiveSwitchMediaBuffer`2 class. More...
 
(TBuffer) - keep
 Keeps the data buffers referenced by this instance. More...
 
(long long) - lastSequenceNumber
 Gets the last sequence number. More...
 
(bool) - recoveredByFec
 Gets a value indicating whether this buffer contains data recovered by forward error correction (FEC). More...
 
(FMLiveSwitchRtpPacketHeader *) - rtpHeader
 Gets the Rtp Packet Header for this media buffer. More...
 
(NSMutableArray *) - rtpHeaders
 Gets the RTP Packet Headers for this media buffer. More...
 
(int) - rtpSequenceNumber
 Gets the RTP sequence number. More...
 
(NSMutableArray *) - rtpSequenceNumbers
 Gets the RTP sequence numbers. More...
 
(long long) - sequenceNumber
 Gets the sequence number. More...
 
(NSMutableArray *) - sequenceNumbers
 Gets the sequence numbers. More...
 
(void) - setDataBuffer:
 Sets the data buffer. More...
 
(void) - setDataBuffers:
 Sets the data buffers. More...
 
(void) - setFormat:
 Sets the format. More...
 
(void) - setRecoveredByFec:
 Sets a value indicating whether this buffer contains data recovered by forward error correction (FEC). More...
 
(void) - setRtpHeader:
 Sets the Rtp Packet Header for this media buffer. More...
 
(void) - setRtpHeaders:
 Sets the RTP Packet Headers for this media buffer. More...
 
(void) - setSequenceNumber:
 Sets the sequence number. More...
 
(void) - setSequenceNumbers:
 Sets the sequence numbers. More...
 
(void) - setSourceId:
 Sets the source identifier. More...
 
(NSString *) - sourceId
 Gets the source identifier. More...
 
(bool) - tryKeep
 Attempts to keep the data buffers referenced by this instance. More...
 

Class Methods

(FMLiveSwitchVideoBuffer *) + createBlackWithWidth:height:formatName:
 Creates a black (0, 0, 0) video buffer with the specified width/height. More...
 
(FMLiveSwitchVideoBuffer *) + createBlueWithWidth:height:formatName:
 Creates a blue (0, 0, 255) video buffer with the specified width/height. More...
 
(FMLiveSwitchVideoBuffer *) + createCustomWithWidth:height:red:green:blue:formatName:
 Creates a custom video buffer with the specified width/height and red/green/blue values for the specified format name. More...
 
(FMLiveSwitchVideoBuffer *) + createCustomWithWidth:height:red:green:blue:formatName:buffer:
 Creates a custom video buffer with the specified width/height and red/green/blue values for the specified format name. More...
 
(FMLiveSwitchVideoBuffer *) + createCyanWithWidth:height:formatName:
 Creates a cyan (0, 255, 255) video buffer with the specified width/height. More...
 
(FMLiveSwitchVideoBuffer *) + createDarkBlueWithWidth:height:formatName:
 Creates a dark blue (0, 0, 128) video buffer with the specified width/height. More...
 
(FMLiveSwitchVideoBuffer *) + createDarkGreenWithWidth:height:formatName:
 Creates a dark green (0, 128, 0) video buffer with the specified width/height. More...
 
(FMLiveSwitchVideoBuffer *) + createDarkRedWithWidth:height:formatName:
 Creates a dark red (128, 0, 0) video buffer with the specified width/height. More...
 
(FMLiveSwitchVideoBuffer *) + createGrayWithWidth:height:formatName:
 Creates a gray (255, 255, 255) video buffer with the specified width/height. More...
 
(FMLiveSwitchVideoBuffer *) + createGreenWithWidth:height:formatName:
 Creates a green (0, 255, 0) video buffer with the specified width/height. More...
 
(FMLiveSwitchVideoBuffer *) + createMagentaWithWidth:height:formatName:
 Creates a magenta (255, 0, 255) video buffer with the specified width/height. More...
 
(FMLiveSwitchVideoBuffer *) + createOliveWithWidth:height:formatName:
 Creates an olive (128, 128, 0) video buffer with the specified width/height. More...
 
(FMLiveSwitchVideoBuffer *) + createPurpleWithWidth:height:formatName:
 Creates a purple (128, 0, 128) video buffer with the specified width/height. More...
 
(FMLiveSwitchVideoBuffer *) + createRedWithWidth:height:formatName:
 Creates a red (255, 0, 0) video buffer with the specified width/height. More...
 
(FMLiveSwitchVideoBuffer *) + createTealWithWidth:height:formatName:
 Creates a teal (0, 128, 128) video buffer with the specified width/height. More...
 
(FMLiveSwitchVideoBuffer *) + createWhiteWithWidth:height:formatName:
 Creates a white (255, 255, 255) video buffer with the specified width/height. More...
 
(FMLiveSwitchVideoBuffer *) + createYellowWithWidth:height:formatName:
 Creates a yellow (255, 255, 0) video buffer with the specified width/height. More...
 
(NSMutableArray *) + fromJsonArrayWithVideoBuffersJson:
 Deserializes an array of instances from JSON. More...
 
(FMLiveSwitchVideoBuffer *) + fromJsonWithVideoBufferJson:
 Deserializes an instance from JSON. More...
 
(int) + getMinimumBufferLengthWithWidth:height:formatName:
 Gets the minimum data buffer length for a given width, height, and format. More...
 
(NSString *) + toJsonArrayWithVideoBuffers:
 Serializes an array of instances to JSON. More...
 
(NSString *) + toJsonWithVideoBuffer:
 Serializes an instance to JSON. More...
 
(FMLiveSwitchVideoBuffer *) + videoBuffer
 Initializes a new instance of the FMLiveSwitchVideoBuffer class. More...
 
(FMLiveSwitchVideoBuffer *) + videoBufferWithWidth:height:dataBuffer:format:
 Initializes a new instance of the FMLiveSwitchVideoBuffer class. More...
 
(FMLiveSwitchVideoBuffer *) + videoBufferWithWidth:height:dataBuffers:format:
 Initializes a new instance of the FMLiveSwitchVideoBuffer class. More...
 
(FMLiveSwitchVideoBuffer *) + videoBufferWithWidth:height:stride:dataBuffer:format:
 Initializes a new instance of the FMLiveSwitchVideoBuffer class. More...
 
(FMLiveSwitchVideoBuffer *) + videoBufferWithWidth:height:strides:dataBuffers:format:
 Initializes a new instance of the FMLiveSwitchVideoBuffer class. More...
 
- Class Methods inherited from FMLiveSwitchMediaBuffer
(FMLiveSwitchMediaBuffer *) + mediaBuffer
 Initializes a new instance of the FMLiveSwitchMediaBuffer`2 class. More...
 
(FMLiveSwitchMediaBuffer *) + mediaBufferWithDataBuffer:format:
 Initializes a new instance of the FMLiveSwitchMediaBuffer`2 class. More...
 
(FMLiveSwitchMediaBuffer *) + mediaBufferWithDataBuffers:format:
 Initializes a new instance of the FMLiveSwitchMediaBuffer`2 class. More...
 

Additional Inherited Members

- Protected Attributes inherited from FMLiveSwitchMediaBuffer
 __pad0__: FMLiveSwitchDynamic- (TBuffer) clone
 

Detailed Description

A video buffer.

Method Documentation

◆ clone

Clones this instance.

◆ convertWithFormat:

- (FMLiveSwitchVideoBuffer*) convertWithFormat: (FMLiveSwitchVideoFormat *)  format

Creates a new video buffer using the specified format.

Parameters
formatThe format.

◆ convertWithFormat:dataBuffer:

Creates a new video buffer using the specified format.

Parameters
formatThe format.
dataBufferThe data buffer.

◆ convertWithFormat:usePool:

- (FMLiveSwitchVideoBuffer*) convertWithFormat: (FMLiveSwitchVideoFormat *)  format
usePool: (bool)  usePool 

Creates a new video buffer using the specified format.

Parameters
formatThe format.
usePoolWhether to use the DataBufferPool.

◆ copyTransformationAttributesWithSourceBuffer:

- (void) copyTransformationAttributesWithSourceBuffer: (FMLiveSwitchVideoBuffer *)  sourceBuffer

Copy the transformation attributes from another video buffer.

◆ createBlackWithWidth:height:formatName:

+ (FMLiveSwitchVideoBuffer*) createBlackWithWidth: (int)  width
height: (int)  height
formatName: (NSString *)  formatName 

Creates a black (0, 0, 0) video buffer with the specified width/height.

Parameters
widthThe width.
heightThe height.
formatNameName of the format.

◆ createBlueWithWidth:height:formatName:

+ (FMLiveSwitchVideoBuffer*) createBlueWithWidth: (int)  width
height: (int)  height
formatName: (NSString *)  formatName 

Creates a blue (0, 0, 255) video buffer with the specified width/height.

Parameters
widthThe width.
heightThe height.
formatNameName of the format.

◆ createCustomWithWidth:height:red:green:blue:formatName:

+ (FMLiveSwitchVideoBuffer*) createCustomWithWidth: (int)  width
height: (int)  height
red: (int)  red
green: (int)  green
blue: (int)  blue
formatName: (NSString *)  formatName 

Creates a custom video buffer with the specified width/height and red/green/blue values for the specified format name.

If the format is not supported, returns null.

Parameters
widthThe width.
heightThe height.
redThe red value.
greenThe green value.
blueThe blue value.
formatNameName of the format.

◆ createCustomWithWidth:height:red:green:blue:formatName:buffer:

+ (FMLiveSwitchVideoBuffer*) createCustomWithWidth: (int)  width
height: (int)  height
red: (int)  red
green: (int)  green
blue: (int)  blue
formatName: (NSString *)  formatName
buffer: (FMLiveSwitchDataBuffer *)  buffer 

Creates a custom video buffer with the specified width/height and red/green/blue values for the specified format name.

If the format is not supported, returns null.

Parameters
widthThe width.
heightThe height.
redThe red value.
greenThe green value.
blueThe blue value.
formatNameName of the format.
bufferThe output data buffer.

◆ createCyanWithWidth:height:formatName:

+ (FMLiveSwitchVideoBuffer*) createCyanWithWidth: (int)  width
height: (int)  height
formatName: (NSString *)  formatName 

Creates a cyan (0, 255, 255) video buffer with the specified width/height.

Parameters
widthThe width.
heightThe height.
formatNameName of the format.

◆ createDarkBlueWithWidth:height:formatName:

+ (FMLiveSwitchVideoBuffer*) createDarkBlueWithWidth: (int)  width
height: (int)  height
formatName: (NSString *)  formatName 

Creates a dark blue (0, 0, 128) video buffer with the specified width/height.

Parameters
widthThe width.
heightThe height.
formatNameName of the format.

◆ createDarkGreenWithWidth:height:formatName:

+ (FMLiveSwitchVideoBuffer*) createDarkGreenWithWidth: (int)  width
height: (int)  height
formatName: (NSString *)  formatName 

Creates a dark green (0, 128, 0) video buffer with the specified width/height.

Parameters
widthThe width.
heightThe height.
formatNameName of the format.

◆ createDarkRedWithWidth:height:formatName:

+ (FMLiveSwitchVideoBuffer*) createDarkRedWithWidth: (int)  width
height: (int)  height
formatName: (NSString *)  formatName 

Creates a dark red (128, 0, 0) video buffer with the specified width/height.

Parameters
widthThe width.
heightThe height.
formatNameName of the format.

◆ createGrayWithWidth:height:formatName:

+ (FMLiveSwitchVideoBuffer*) createGrayWithWidth: (int)  width
height: (int)  height
formatName: (NSString *)  formatName 

Creates a gray (255, 255, 255) video buffer with the specified width/height.

Parameters
widthThe width.
heightThe height.
formatNameName of the format.

◆ createGreenWithWidth:height:formatName:

+ (FMLiveSwitchVideoBuffer*) createGreenWithWidth: (int)  width
height: (int)  height
formatName: (NSString *)  formatName 

Creates a green (0, 255, 0) video buffer with the specified width/height.

Parameters
widthThe width.
heightThe height.
formatNameName of the format.

◆ createInstance

- (FMLiveSwitchVideoBuffer*) createInstance

Creates a new instance.

Implements FMLiveSwitchMediaBuffer.

Implemented in FMLiveSwitchPacketizedVideoBuffer.

◆ createMagentaWithWidth:height:formatName:

+ (FMLiveSwitchVideoBuffer*) createMagentaWithWidth: (int)  width
height: (int)  height
formatName: (NSString *)  formatName 

Creates a magenta (255, 0, 255) video buffer with the specified width/height.

Parameters
widthThe width.
heightThe height.
formatNameName of the format.

◆ createOliveWithWidth:height:formatName:

+ (FMLiveSwitchVideoBuffer*) createOliveWithWidth: (int)  width
height: (int)  height
formatName: (NSString *)  formatName 

Creates an olive (128, 128, 0) video buffer with the specified width/height.

Parameters
widthThe width.
heightThe height.
formatNameName of the format.

◆ createPurpleWithWidth:height:formatName:

+ (FMLiveSwitchVideoBuffer*) createPurpleWithWidth: (int)  width
height: (int)  height
formatName: (NSString *)  formatName 

Creates a purple (128, 0, 128) video buffer with the specified width/height.

Parameters
widthThe width.
heightThe height.
formatNameName of the format.

◆ createRedWithWidth:height:formatName:

+ (FMLiveSwitchVideoBuffer*) createRedWithWidth: (int)  width
height: (int)  height
formatName: (NSString *)  formatName 

Creates a red (255, 0, 0) video buffer with the specified width/height.

Parameters
widthThe width.
heightThe height.
formatNameName of the format.

◆ createTealWithWidth:height:formatName:

+ (FMLiveSwitchVideoBuffer*) createTealWithWidth: (int)  width
height: (int)  height
formatName: (NSString *)  formatName 

Creates a teal (0, 128, 128) video buffer with the specified width/height.

Parameters
widthThe width.
heightThe height.
formatNameName of the format.

◆ createWhiteWithWidth:height:formatName:

+ (FMLiveSwitchVideoBuffer*) createWhiteWithWidth: (int)  width
height: (int)  height
formatName: (NSString *)  formatName 

Creates a white (255, 255, 255) video buffer with the specified width/height.

Parameters
widthThe width.
heightThe height.
formatNameName of the format.

◆ createYellowWithWidth:height:formatName:

+ (FMLiveSwitchVideoBuffer*) createYellowWithWidth: (int)  width
height: (int)  height
formatName: (NSString *)  formatName 

Creates a yellow (255, 255, 0) video buffer with the specified width/height.

Parameters
widthThe width.
heightThe height.
formatNameName of the format.

◆ fromJsonArrayWithVideoBuffersJson:

+ (NSMutableArray*) fromJsonArrayWithVideoBuffersJson: (NSString *)  videoBuffersJson

Deserializes an array of instances from JSON.

Parameters
videoBuffersJsonThe video buffers JSON.

◆ fromJsonWithVideoBufferJson:

+ (FMLiveSwitchVideoBuffer*) fromJsonWithVideoBufferJson: (NSString *)  videoBufferJson

Deserializes an instance from JSON.

Parameters
videoBufferJsonThe video buffer JSON.

◆ getAValueWithIndex:

- (int) getAValueWithIndex: (int)  index

Gets the A value at a given index.

If the video buffer is not RGBA-type, then this will return 255.

Parameters
indexThe index.
Returns
The A value.

◆ getBValueWithIndex:

- (int) getBValueWithIndex: (int)  index

Gets the B value at a given index.

Parameters
indexThe index.
Returns
The B value, or -1 if the video buffer is not RGB/RGBA-type.

◆ getGValueWithIndex:

- (int) getGValueWithIndex: (int)  index

Gets the G value at a given index.

Parameters
indexThe index.
Returns
The G value, or -1 if the video buffer is not RGB/RGBA-type.

◆ getMinimumBufferLengthWithWidth:height:formatName:

+ (int) getMinimumBufferLengthWithWidth: (int)  width
height: (int)  height
formatName: (NSString *)  formatName 

Gets the minimum data buffer length for a given width, height, and format.

Parameters
widthThe width.
heightThe height.
formatNameName of the format.

◆ getRValueWithIndex:

- (int) getRValueWithIndex: (int)  index

Gets the R value at a given index.

Parameters
indexThe index.
Returns
The R value, or -1 if the video buffer is not RGB/RGBA-type.

◆ getUValueWithIndex:

- (int) getUValueWithIndex: (int)  index

Gets the U value at a given index.

Parameters
indexThe index.
Returns
The U value, or -1 if the video buffer is not YUV-type.

◆ getVValueWithIndex:

- (int) getVValueWithIndex: (int)  index

Gets the V value at a given index.

Parameters
indexThe index.
Returns
The V value, or -1 if the video buffer is not YUV-type.

◆ getYValueWithIndex:

- (int) getYValueWithIndex: (int)  index

Gets the Y value at a given index.

Parameters
indexThe index.
Returns
The Y value, or -1 if the video buffer is not YUV-type.

◆ height

- (int) height

Gets the height.

◆ horizontallyMirrored

- (bool) horizontallyMirrored

Gets whether this buffer should be mirrored over the X axis.

◆ init

- (instancetype) init

Initializes a new instance of the FMLiveSwitchVideoBuffer class.

Implements FMLiveSwitchMediaBuffer.

◆ initWithWidth:height:dataBuffer:format:

- (instancetype) initWithWidth: (int)  width
height: (int)  height
dataBuffer: (FMLiveSwitchDataBuffer *)  dataBuffer
format: (FMLiveSwitchVideoFormat *)  format 

Initializes a new instance of the FMLiveSwitchVideoBuffer class.

Parameters
widthThe width.
heightThe height.
dataBufferThe data buffer.
formatThe format.

◆ initWithWidth:height:dataBuffers:format:

- (instancetype) initWithWidth: (int)  width
height: (int)  height
dataBuffers: (NSMutableArray *)  dataBuffers
format: (FMLiveSwitchVideoFormat *)  format 

Initializes a new instance of the FMLiveSwitchVideoBuffer class.

Parameters
widthThe width.
heightThe height.
dataBuffersThe data buffers.
formatThe format.

◆ initWithWidth:height:stride:dataBuffer:format:

- (instancetype) initWithWidth: (int)  width
height: (int)  height
stride: (int)  stride
dataBuffer: (FMLiveSwitchDataBuffer *)  dataBuffer
format: (FMLiveSwitchVideoFormat *)  format 

Initializes a new instance of the FMLiveSwitchVideoBuffer class.

Parameters
widthThe width.
heightThe height.
strideThe stride.
dataBufferThe data buffer.
formatThe format.

◆ initWithWidth:height:strides:dataBuffers:format:

- (instancetype) initWithWidth: (int)  width
height: (int)  height
strides: (NSMutableArray *)  strides
dataBuffers: (NSMutableArray *)  dataBuffers
format: (FMLiveSwitchVideoFormat *)  format 

Initializes a new instance of the FMLiveSwitchVideoBuffer class.

Parameters
widthThe width.
heightThe height.
stridesThe strides.
dataBuffersThe data buffers.
formatThe format.

◆ inversionRequired

- (bool) inversionRequired

Gets whether inversion is required to reset the mirroring of this buffer.

◆ isAbgr

- (bool) isAbgr

Gets a value indicating whether this buffer has ABGR video.

◆ isArgb

- (bool) isArgb

Gets a value indicating whether this buffer has ARGB video.

◆ isBgr

- (bool) isBgr

Gets a value indicating whether this buffer has BGR video.

◆ isBgra

- (bool) isBgra

Gets a value indicating whether this buffer has BGRA video.

◆ isH264

- (bool) isH264

Gets a value indicating whether this buffer has H.264 video.

◆ isH265

- (bool) isH265

Gets a value indicating whether this buffer has H.265 video.

◆ isI420

- (bool) isI420

Gets a value indicating whether this buffer has I420 video.

◆ isKeyFrame

- (bool) isKeyFrame

Gets a value indicating whether this buffer contains a keyframe.

◆ isMuted

- (bool) isMuted

Gets a value indicating whether this instance has been muted.

Implements FMLiveSwitchMediaBuffer.

◆ isNv12

- (bool) isNv12

Gets a value indicating whether this buffer has NV12 video.

◆ isNv21

- (bool) isNv21

Gets a value indicating whether this buffer has NV21 video.

◆ isPacked

- (bool) isPacked

Gets a value indicating whether the data is packed into a single data buffer.

◆ isPlanar

- (bool) isPlanar

Gets a value indicating whether the data is spread across multiple data buffers (planes).

◆ isRaw

- (bool) isRaw

Gets a value indicating whether this buffer has raw video.

◆ isRgb

- (bool) isRgb

Gets a value indicating whether this buffer has RGB video.

◆ isRgba

- (bool) isRgba

Gets a value indicating whether this buffer has RGBA video.

◆ isRgbaType

- (bool) isRgbaType

Gets a value indicating whether this buffer has raw RGBA, BGRA, ARGB, or ABGR video.

◆ isRgbType

- (bool) isRgbType

Gets a value indicating whether this buffer has raw RGB or BGR video.

◆ isVp8

- (bool) isVp8

Gets a value indicating whether this buffer has VP8 video.

◆ isVp9

- (bool) isVp9

Gets a value indicating whether this buffer has VP9 video.

◆ isYuvType

- (bool) isYuvType

Gets a value indicating whether this buffer has raw I420, YV12, NV12, or NV21 video.

◆ isYv12

- (bool) isYv12

Gets a value indicating whether this buffer has YV12 video.

◆ mute

- (bool) mute

Mutes this instance.

This is a one-way operation that clears the underlying data buffer.

Implements FMLiveSwitchMediaBuffer.

◆ orientation

- (int) orientation

Gets the desired orientation of the buffer.

◆ resetTransformationAttributes

- (void) resetTransformationAttributes

Resets the transformation attributes back to default values.

◆ rotationRequired

- (int) rotationRequired

Gets whether rotation is required to reset the mirroring and orientation of this buffer.

◆ setAValue:index:

- (bool) setAValue: (int)  aValue
index: (int)  index 

Gets the A value at a given index.

If the video buffer is not RGBA-type, then this will return false.

Parameters
aValueThe A value.
indexThe index.
Returns
true if the video buffer is RGBA-type.

◆ setBValue:index:

- (bool) setBValue: (int)  bValue
index: (int)  index 

Gets the B value at a given index.

Parameters
bValueThe B value.
indexThe index.
Returns
true if the video buffer is RGB/RGBA-type.

◆ setGValue:index:

- (bool) setGValue: (int)  gValue
index: (int)  index 

Sets the G value at a given index.

Parameters
gValueThe G value.
indexThe index.
Returns
true if the video buffer is RGB/RGBA-type.

◆ setHeight:

- (void) setHeight: (int)  value

Sets the height.

◆ setHorizontallyMirrored:

- (void) setHorizontallyMirrored: (bool)  value

Sets whether this buffer should be mirrored over the X axis.

◆ setOrientation:

- (void) setOrientation: (int)  value

Sets the desired orientation of the buffer.

◆ setRValue:index:

- (bool) setRValue: (int)  rValue
index: (int)  index 

Sets the R value at a given index.

Parameters
rValueThe R value.
indexThe index.
Returns
true if the video buffer is RGB/RGBA-type.

◆ setStride:

- (void) setStride: (int)  value

Sets the stride.

◆ setStrides:

- (void) setStrides: (NSMutableArray *)  value

Sets the strides.

◆ setUValue:index:

- (bool) setUValue: (int)  uValue
index: (int)  index 

Sets the U value at a given index.

Parameters
uValueThe U value.
indexThe index.
Returns
true if the video buffer is YUV-type.

◆ setVerticallyMirrored:

- (void) setVerticallyMirrored: (bool)  value

Sets whether this buffer should be mirrored over the Y axis.

◆ setVValue:index:

- (bool) setVValue: (int)  vValue
index: (int)  index 

Sets the V value at a given index.

Parameters
vValueThe V value.
indexThe index.
Returns
true if the video buffer is YUV-type.

◆ setWidth:

- (void) setWidth: (int)  value

Sets the width.

◆ setYValue:index:

- (bool) setYValue: (int)  yValue
index: (int)  index 

Sets the Y value at a given index.

Parameters
yValueThe Y value.
indexThe index.
Returns
true if the video buffer is YUV-type.

◆ stride

- (int) stride

Gets the stride.

◆ strides

- (NSMutableArray*) strides

Gets the strides.

◆ toJson

- (NSString*) toJson

Serializes this instance to JSON.

◆ toJsonArrayWithVideoBuffers:

+ (NSString*) toJsonArrayWithVideoBuffers: (NSMutableArray *)  videoBuffers

Serializes an array of instances to JSON.

Parameters
videoBuffersThe video buffers.

◆ toJsonWithVideoBuffer:

+ (NSString*) toJsonWithVideoBuffer: (FMLiveSwitchVideoBuffer *)  videoBuffer

Serializes an instance to JSON.

Parameters
videoBufferThe video buffer.

◆ toPacked

- (FMLiveSwitchVideoBuffer*) toPacked

Creates a packed representation of this planar buffer, if in YUV-planar format.

Otherwise, returns the current buffer. If the planar data is not contiguous in memory, new memory will be allocated for the packed representation.

◆ toPackedWithUsePool:

- (FMLiveSwitchVideoBuffer*) toPackedWithUsePool: (bool)  usePool

Creates a packed representation of this planar buffer, if in YUV-planar format.

Otherwise, returns the current buffer. If the planar data is not contiguous in memory, new memory will be allocated or taken from the data buffer pool for the packed representation.

Parameters
usePoolWhether to use the data buffer pool for any required memory allocations.

◆ toPlanar

- (FMLiveSwitchVideoBuffer*) toPlanar

Creates a planar representation of this packed buffer, if in YUV-packed format.

Otherwise, returns the current buffer.

◆ transformRequired

- (bool) transformRequired

Gets a boolean value on whether the buffer needs to be transformed.

◆ verticallyMirrored

- (bool) verticallyMirrored

Gets whether this buffer should be mirrored over the Y axis.

◆ videoBuffer

+ (FMLiveSwitchVideoBuffer*) videoBuffer

Initializes a new instance of the FMLiveSwitchVideoBuffer class.

◆ videoBufferWithWidth:height:dataBuffer:format:

+ (FMLiveSwitchVideoBuffer*) videoBufferWithWidth: (int)  width
height: (int)  height
dataBuffer: (FMLiveSwitchDataBuffer *)  dataBuffer
format: (FMLiveSwitchVideoFormat *)  format 

Initializes a new instance of the FMLiveSwitchVideoBuffer class.

Parameters
widthThe width.
heightThe height.
dataBufferThe data buffer.
formatThe format.

◆ videoBufferWithWidth:height:dataBuffers:format:

+ (FMLiveSwitchVideoBuffer*) videoBufferWithWidth: (int)  width
height: (int)  height
dataBuffers: (NSMutableArray *)  dataBuffers
format: (FMLiveSwitchVideoFormat *)  format 

Initializes a new instance of the FMLiveSwitchVideoBuffer class.

Parameters
widthThe width.
heightThe height.
dataBuffersThe data buffers.
formatThe format.

◆ videoBufferWithWidth:height:stride:dataBuffer:format:

+ (FMLiveSwitchVideoBuffer*) videoBufferWithWidth: (int)  width
height: (int)  height
stride: (int)  stride
dataBuffer: (FMLiveSwitchDataBuffer *)  dataBuffer
format: (FMLiveSwitchVideoFormat *)  format 

Initializes a new instance of the FMLiveSwitchVideoBuffer class.

Parameters
widthThe width.
heightThe height.
strideThe stride.
dataBufferThe data buffer.
formatThe format.

◆ videoBufferWithWidth:height:strides:dataBuffers:format:

+ (FMLiveSwitchVideoBuffer*) videoBufferWithWidth: (int)  width
height: (int)  height
strides: (NSMutableArray *)  strides
dataBuffers: (NSMutableArray *)  dataBuffers
format: (FMLiveSwitchVideoFormat *)  format 

Initializes a new instance of the FMLiveSwitchVideoBuffer class.

Parameters
widthThe width.
heightThe height.
stridesThe strides.
dataBuffersThe data buffers.
formatThe format.

◆ width

- (int) width

Gets the width.