/ fm / liveswitch / VideoBuffer
Class: VideoBuffer
fm.liveswitch.VideoBuffer
A video buffer.
Hierarchy
MediaBuffer<VideoFormat, VideoBuffer>
↳ VideoBuffer
Table of contents
Constructors
Methods
- clone
- convert
- copyTransformationAttributes
- createInstance
- fmliveswitchVideoBufferInit
- free
- getAValue
- getBValue
- getDataBuffer
- getDataBuffers
- getDynamicProperties
- getDynamicValue
- getFootprint
- getFormat
- getGValue
- getHeight
- getHorizontallyMirrored
- getInversionRequired
- getIsAbgr
- getIsArgb
- getIsBgr
- getIsBgra
- getIsH264
- getIsH265
- getIsI420
- getIsMuted
- getIsNv12
- getIsNv21
- getIsPacked
- getIsPlanar
- getIsRaw
- getIsRgb
- getIsRgbType
- getIsRgba
- getIsRgbaType
- getIsVp8
- getIsVp9
- getIsYuvType
- getIsYv12
- getLastSequenceNumber
- getOrientation
- getRValue
- getRecoveredByFec
- getRotationRequired
- getRtpHeader
- getRtpHeaders
- getRtpSequenceNumber
- getRtpSequenceNumbers
- getSequenceNumber
- getSequenceNumbers
- getSourceId
- getStride
- getStrides
- getTransformRequired
- getTypeString
- getUValue
- getVValue
- getVerticallyMirrored
- getWidth
- getYValue
- keep
- mute
- resetTransformationAttributes
- setAValue
- setBValue
- setDataBuffer
- setDataBuffers
- setDynamicValue
- setFormat
- setGValue
- setHeight
- setHorizontallyMirrored
- setOrientation
- setRValue
- setRecoveredByFec
- setRtpHeader
- setRtpHeaders
- setSequenceNumber
- setSequenceNumbers
- setSourceId
- setStride
- setStrides
- setUValue
- setVValue
- setVerticallyMirrored
- setWidth
- setYValue
- toJson
- toPacked
- toPlanar
- toString
- tryKeep
- unsetDynamicValue
- createBlack
- createBlue
- createCustom
- createCyan
- createDarkBlue
- createDarkGreen
- createDarkRed
- createGray
- createGreen
- createMagenta
- createOlive
- createPurple
- createRed
- createTeal
- createWhite
- createYellow
- fromJson
- fromJsonArray
- getMinimumBufferLength
- toJson
- toJsonArray
Constructors
constructor
+ new VideoBuffer(): VideoBuffer
Initializes a new instance of the [[fm.liveswitch.videoBuffer]] class.
Returns: VideoBuffer
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:38
+ new VideoBuffer(width
: number, height
: number, dataBuffer
: DataBuffer, format
: VideoFormat): VideoBuffer
Initializes a new instance of the [[fm.liveswitch.videoBuffer]] class.
Parameters:
Name | Type | Description |
---|---|---|
width |
number | The width. |
height |
number | The height. |
dataBuffer |
DataBuffer | The data buffer. |
format |
VideoFormat | The format. |
Returns: VideoBuffer
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:44
+ new VideoBuffer(width
: number, height
: number, dataBuffers
: DataBuffer[], format
: VideoFormat): VideoBuffer
Initializes a new instance of the [[fm.liveswitch.videoBuffer]] class.
Parameters:
Name | Type | Description |
---|---|---|
width |
number | The width. |
height |
number | The height. |
dataBuffers |
DataBuffer[] | The data buffers. |
format |
VideoFormat | The format. |
Returns: VideoBuffer
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:54
+ new VideoBuffer(width
: number, height
: number, stride
: number, dataBuffer
: DataBuffer, format
: VideoFormat): VideoBuffer
Initializes a new instance of the [[fm.liveswitch.videoBuffer]] class.
Parameters:
Name | Type | Description |
---|---|---|
width |
number | The width. |
height |
number | The height. |
stride |
number | The stride. |
dataBuffer |
DataBuffer | The data buffer. |
format |
VideoFormat | The format. |
Returns: VideoBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:64
+ new VideoBuffer(width
: number, height
: number, strides
: number[], dataBuffers
: DataBuffer[], format
: VideoFormat): VideoBuffer
Initializes a new instance of the [[fm.liveswitch.videoBuffer]] class.
Parameters:
Name | Type | Description |
---|---|---|
width |
number | The width. |
height |
number | The height. |
strides |
number[] | The strides. |
dataBuffers |
DataBuffer[] | The data buffers. |
format |
VideoFormat | The format. |
Returns: VideoBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:75
Methods
clone
▸ clone(): VideoBuffer
Clones this instance.
Returns: VideoBuffer
Overrides: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:779
convert
▸ convert(format
: VideoFormat): VideoBuffer
Creates a new video buffer using the specified format.
Parameters:
Name | Type | Description |
---|---|---|
format |
VideoFormat | The format. |
Returns: VideoBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:800
▸ convert(format
: VideoFormat, dataBuffer
: DataBuffer): VideoBuffer
Creates a new video buffer using the specified format.
Parameters:
Name | Type | Description |
---|---|---|
format |
VideoFormat | The format. |
dataBuffer |
DataBuffer | The data buffer. |
Returns: VideoBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:808
▸ convert(format
: VideoFormat, usePool
: boolean): VideoBuffer
Creates a new video buffer using the specified format.
Parameters:
Name | Type | Description |
---|---|---|
format |
VideoFormat | The format. |
usePool |
boolean | Whether to use the DataBufferPool. |
Returns: VideoBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:816
copyTransformationAttributes
▸ copyTransformationAttributes(sourceBuffer
: VideoBuffer): void
Copy the transformation attributes from another video buffer.
Parameters:
Name | Type |
---|---|
sourceBuffer |
VideoBuffer |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:992
createInstance
▸ Protected
createInstance(): VideoBuffer
Creates a new instance.
Returns: VideoBuffer
Overrides: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1006
fmliveswitchVideoBufferInit
▸ Private
fmliveswitchVideoBufferInit(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:30
free
▸ free(): VideoBuffer
Frees the data buffers referenced by this instance.
Returns: VideoBuffer
This instance.
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/MediaBuffer.ts:114
getAValue
▸ getAValue(index
: number): number
Gets the A value at a given index. If the video buffer is not RGBA-type, then this will return 255.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | The index. |
Returns: number
The A value.
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1021
getBValue
▸ getBValue(index
: number): number
Gets the B value at a given index.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | The index. |
Returns: number
The B value, or -1 if the video buffer is not RGB/RGBA-type.
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1054
getDataBuffer
▸ getDataBuffer(): DataBuffer
Gets the data buffer.
Returns: DataBuffer
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/MediaBuffer.ts:129
getDataBuffers
▸ getDataBuffers(): DataBuffer[]
Gets the data buffers.
Returns: DataBuffer[]
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/MediaBuffer.ts:141
getDynamicProperties
▸ getDynamicProperties(): Hash<string, Object>
Gets all dynamic properties on this instance.
Returns: Hash<string, Object>
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/Dynamic.ts:37
getDynamicValue
▸ getDynamicValue(key
: string): Object
Gets a property value from the local cache.
Parameters:
Name | Type | Description |
---|---|---|
key |
string | The property key. This key is used internally only, but should be namespaced to avoid conflict with third-party extensions. |
Returns: Object
The stored value, if found; otherwise null.
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/Dynamic.ts:58
getFootprint
▸ getFootprint(): number
Gets the approximate footprint of this media buffer by returning the sum of its data buffer lengths.
Returns: number
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/MediaBuffer.ts:154
getFormat
▸ getFormat(): VideoFormat
Gets the format.
Returns: VideoFormat
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/MediaBuffer.ts:170
getGValue
▸ getGValue(index
: number): number
Gets the G value at a given index.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | The index. |
Returns: number
The G value, or -1 if the video buffer is not RGB/RGBA-type.
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1129
getHeight
▸ getHeight(): number
Gets the height.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1163
getHorizontallyMirrored
▸ getHorizontallyMirrored(): boolean
Gets whether this buffer should be mirrored over the X axis.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1175
getInversionRequired
▸ getInversionRequired(): boolean
Gets whether inversion is required to reset the mirroring of this buffer.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1187
getIsAbgr
▸ getIsAbgr(): boolean
Gets a value indicating whether this buffer has ABGR video.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1199
getIsArgb
▸ getIsArgb(): boolean
Gets a value indicating whether this buffer has ARGB video.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1212
getIsBgr
▸ getIsBgr(): boolean
Gets a value indicating whether this buffer has BGR video.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1225
getIsBgra
▸ getIsBgra(): boolean
Gets a value indicating whether this buffer has BGRA video.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1238
getIsH264
▸ getIsH264(): boolean
Gets a value indicating whether this buffer has H.264 video.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1251
getIsH265
▸ getIsH265(): boolean
Gets a value indicating whether this buffer has H.265 video.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1264
getIsI420
▸ getIsI420(): boolean
Gets a value indicating whether this buffer has I420 video.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1277
getIsMuted
▸ getIsMuted(): boolean
Gets a value indicating whether this instance has been muted.
Returns: boolean
Overrides: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1290
getIsNv12
▸ getIsNv12(): boolean
Gets a value indicating whether this buffer has NV12 video.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1302
getIsNv21
▸ getIsNv21(): boolean
Gets a value indicating whether this buffer has NV21 video.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1315
getIsPacked
▸ getIsPacked(): boolean
Gets a value indicating whether the data is packed into a single data buffer.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1328
getIsPlanar
▸ getIsPlanar(): boolean
Gets a value indicating whether the data is spread across multiple data buffers (planes).
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1340
getIsRaw
▸ getIsRaw(): boolean
Gets a value indicating whether this buffer has raw video.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1352
getIsRgb
▸ getIsRgb(): boolean
Gets a value indicating whether this buffer has RGB video.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1365
getIsRgbType
▸ getIsRgbType(): boolean
Gets a value indicating whether this buffer has raw RGB or BGR video.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1404
getIsRgba
▸ getIsRgba(): boolean
Gets a value indicating whether this buffer has RGBA video.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1378
getIsRgbaType
▸ getIsRgbaType(): boolean
Gets a value indicating whether this buffer has raw RGBA, BGRA, ARGB, or ABGR video.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1391
getIsVp8
▸ getIsVp8(): boolean
Gets a value indicating whether this buffer has VP8 video.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1417
getIsVp9
▸ getIsVp9(): boolean
Gets a value indicating whether this buffer has VP9 video.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1430
getIsYuvType
▸ getIsYuvType(): boolean
Gets a value indicating whether this buffer has raw I420, YV12, NV12, or NV21 video.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1443
getIsYv12
▸ getIsYv12(): boolean
Gets a value indicating whether this buffer has YV12 video.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1456
getLastSequenceNumber
▸ getLastSequenceNumber(): number
Gets the last sequence number.
Returns: number
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/MediaBuffer.ts:196
getOrientation
▸ getOrientation(): number
Gets the desired orientation of the buffer.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1469
getRValue
▸ getRValue(index
: number): number
Gets the R value at a given index.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | The index. |
Returns: number
The R value, or -1 if the video buffer is not RGB/RGBA-type.
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1507
getRecoveredByFec
▸ getRecoveredByFec(): boolean
Gets a value indicating whether this buffer contains data recovered by forward error correction (FEC).
Returns: boolean
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/MediaBuffer.ts:213
getRotationRequired
▸ getRotationRequired(): number
Gets whether rotation is required to reset the mirroring and orientation of this buffer.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1481
getRtpHeader
▸ getRtpHeader(): RtpPacketHeader
Gets the Rtp Packet Header for this media buffer.
Returns: RtpPacketHeader
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/MediaBuffer.ts:225
getRtpHeaders
▸ getRtpHeaders(): RtpPacketHeader[]
Gets the RTP Packet Headers for this media buffer.
Returns: RtpPacketHeader[]
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/MediaBuffer.ts:237
getRtpSequenceNumber
▸ getRtpSequenceNumber(): number
Gets the RTP sequence number.
Returns: number
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/MediaBuffer.ts:249
getRtpSequenceNumbers
▸ getRtpSequenceNumbers(): number[]
Gets the RTP sequence numbers.
Returns: number[]
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/MediaBuffer.ts:265
getSequenceNumber
▸ getSequenceNumber(): number
Gets the sequence number.
Returns: number
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/MediaBuffer.ts:290
getSequenceNumbers
▸ getSequenceNumbers(): number[]
Gets the sequence numbers.
Returns: number[]
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/MediaBuffer.ts:306
getSourceId
▸ getSourceId(): string
Gets the source identifier.
Returns: string
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/MediaBuffer.ts:318
getStride
▸ getStride(): number
Gets the stride.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1550
getStrides
▸ getStrides(): number[]
Gets the strides.
Returns: number[]
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1566
getTransformRequired
▸ getTransformRequired(): boolean
Gets a boolean value on whether the buffer needs to be transformed.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1578
getTypeString
▸ getTypeString(): string
Returns: string
Overrides: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:10
getUValue
▸ getUValue(index
: number): number
Gets the U value at a given index.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | The index. |
Returns: number
The U value, or -1 if the video buffer is not YUV-type.
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1592
getVValue
▸ getVValue(index
: number): number
Gets the V value at a given index.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | The index. |
Returns: number
The V value, or -1 if the video buffer is not YUV-type.
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1669
getVerticallyMirrored
▸ getVerticallyMirrored(): boolean
Gets whether this buffer should be mirrored over the Y axis.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1655
getWidth
▸ getWidth(): number
Gets the width.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1732
getYValue
▸ getYValue(index
: number): number
Gets the Y value at a given index.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | The index. |
Returns: number
The Y value, or -1 if the video buffer is not YUV-type.
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1746
keep
▸ keep(): VideoBuffer
Keeps the data buffers referenced by this instance.
Returns: VideoBuffer
This instance.
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/MediaBuffer.ts:331
mute
▸ mute(): boolean
Mutes this instance. This is a one-way operation that clears the underlying data buffer.
Returns: boolean
Overrides: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1772
resetTransformationAttributes
▸ resetTransformationAttributes(): void
Resets the transformation attributes back to default values.
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1862
setAValue
▸ setAValue(aValue
: number, index
: number): boolean
Gets the A value at a given index. If the video buffer is not RGBA-type, then this will return false.
Parameters:
Name | Type | Description |
---|---|---|
aValue |
number | The A value. |
index |
number | The index. |
Returns: boolean
true
if the video buffer is RGBA-type.
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1880
setBValue
▸ setBValue(bValue
: number, index
: number): boolean
Gets the B value at a given index.
Parameters:
Name | Type | Description |
---|---|---|
bValue |
number | The B value. |
index |
number | The index. |
Returns: boolean
true
if the video buffer is RGB/RGBA-type.
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1897
setDataBuffer
▸ setDataBuffer(value
: DataBuffer): void
Sets the data buffer.
Parameters:
Name | Type |
---|---|
value |
DataBuffer |
Returns: void
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/MediaBuffer.ts:354
setDataBuffers
▸ setDataBuffers(value
: DataBuffer[]): void
Sets the data buffers.
Parameters:
Name | Type |
---|---|
value |
DataBuffer[] |
Returns: void
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/MediaBuffer.ts:369
setDynamicValue
▸ setDynamicValue(key
: string, value
: Object): void
Sets a property value in the local cache.
Parameters:
Name | Type | Description |
---|---|---|
key |
string | The property key. This key is used internally only, but should be namespaced to avoid conflict with third-party extensions. |
value |
Object | The property value. This can be any object that needs to be stored for future use. |
Returns: void
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/Dynamic.ts:95
setFormat
▸ setFormat(value
: VideoFormat): void
Sets the format.
Parameters:
Name | Type |
---|---|
value |
VideoFormat |
Returns: void
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/MediaBuffer.ts:384
setGValue
▸ setGValue(gValue
: number, index
: number): boolean
Sets the G value at a given index.
Parameters:
Name | Type | Description |
---|---|---|
gValue |
number | The G value. |
index |
number | The index. |
Returns: boolean
true
if the video buffer is RGB/RGBA-type.
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1914
setHeight
▸ setHeight(value
: number): void
Sets the height.
Parameters:
Name | Type |
---|---|
value |
number |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1928
setHorizontallyMirrored
▸ setHorizontallyMirrored(value
: boolean): void
Sets whether this buffer should be mirrored over the X axis.
Parameters:
Name | Type |
---|---|
value |
boolean |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1944
setOrientation
▸ setOrientation(value
: number): void
Sets the desired orientation of the buffer.
Parameters:
Name | Type |
---|---|
value |
number |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1964
setRValue
▸ setRValue(rValue
: number, index
: number): boolean
Sets the R value at a given index.
Parameters:
Name | Type | Description |
---|---|---|
rValue |
number | The R value. |
index |
number | The index. |
Returns: boolean
true
if the video buffer is RGB/RGBA-type.
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1983
setRecoveredByFec
▸ setRecoveredByFec(value
: boolean): void
Sets a value indicating whether this buffer contains data recovered by forward error correction (FEC).
Parameters:
Name | Type |
---|---|
value |
boolean |
Returns: void
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/MediaBuffer.ts:400
setRtpHeader
▸ setRtpHeader(value
: RtpPacketHeader): void
Sets the Rtp Packet Header for this media buffer.
Parameters:
Name | Type |
---|---|
value |
RtpPacketHeader |
Returns: void
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/MediaBuffer.ts:412
setRtpHeaders
▸ setRtpHeaders(value
: RtpPacketHeader[]): void
Sets the RTP Packet Headers for this media buffer.
Parameters:
Name | Type |
---|---|
value |
RtpPacketHeader[] |
Returns: void
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/MediaBuffer.ts:424
setSequenceNumber
▸ setSequenceNumber(value
: number): void
Sets the sequence number.
Parameters:
Name | Type |
---|---|
value |
number |
Returns: void
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/MediaBuffer.ts:436
setSequenceNumbers
▸ setSequenceNumbers(value
: number[]): void
Sets the sequence numbers.
Parameters:
Name | Type |
---|---|
value |
number[] |
Returns: void
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/MediaBuffer.ts:449
setSourceId
▸ setSourceId(value
: string): void
Sets the source identifier.
Parameters:
Name | Type |
---|---|
value |
string |
Returns: void
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/MediaBuffer.ts:461
setStride
▸ setStride(value
: number): void
Sets the stride.
Parameters:
Name | Type |
---|---|
value |
number |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:1997
setStrides
▸ setStrides(value
: number[]): void
Sets the strides.
Parameters:
Name | Type |
---|---|
value |
number[] |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:2010
setUValue
▸ setUValue(uValue
: number, index
: number): boolean
Sets the U value at a given index.
Parameters:
Name | Type | Description |
---|---|---|
uValue |
number | The U value. |
index |
number | The index. |
Returns: boolean
true
if the video buffer is YUV-type.
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:2025
setVValue
▸ setVValue(vValue
: number, index
: number): boolean
Sets the V value at a given index.
Parameters:
Name | Type | Description |
---|---|---|
vValue |
number | The V value. |
index |
number | The index. |
Returns: boolean
true
if the video buffer is YUV-type.
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:2063
setVerticallyMirrored
▸ setVerticallyMirrored(value
: boolean): void
Sets whether this buffer should be mirrored over the Y axis.
Parameters:
Name | Type |
---|---|
value |
boolean |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:2048
setWidth
▸ setWidth(value
: number): void
Sets the width.
Parameters:
Name | Type |
---|---|
value |
number |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:2086
setYValue
▸ setYValue(yValue
: number, index
: number): boolean
Sets the Y value at a given index.
Parameters:
Name | Type | Description |
---|---|---|
yValue |
number | The Y value. |
index |
number | The index. |
Returns: boolean
true
if the video buffer is YUV-type.
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:2105
toJson
▸ toJson(): string
Serializes this instance to JSON.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:2119
toPacked
▸ toPacked(): VideoBuffer
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.
Returns: VideoBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:2136
▸ toPacked(usePool
: boolean): VideoBuffer
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:
Name | Type | Description |
---|---|---|
usePool |
boolean | Whether to use the data buffer pool for any required memory allocations. |
Returns: VideoBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:2149
toPlanar
▸ toPlanar(): VideoBuffer
Creates a planar representation of this packed buffer, if in YUV-packed format. Otherwise, returns the current buffer.
Returns: VideoBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:2199
toString
▸ toString(): string
Returns a string that represents this instance.
Returns: string
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/MediaBuffer.ts:473
tryKeep
▸ tryKeep(): boolean
Attempts to keep the data buffers referenced by this instance.
Returns: boolean
True if succeeded.
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/MediaBuffer.ts:486
unsetDynamicValue
▸ unsetDynamicValue(key
: string): boolean
Removes a property value from the local cache. Returns true if the value was removed and returns false otherwise.
Parameters:
Name | Type | Description |
---|---|---|
key |
string | The property key. This key is used internally only, but should be namespaced to avoid conflict with third-party extensions. |
Returns: boolean
true
if the value was removed; otherwise, false
.
Inherited from: MediaBuffer
Defined in: Generated/TypeScript/fm.liveswitch/Dynamic.ts:122
createBlack
▸ Static
createBlack(width
: number, height
: number, formatName
: string): VideoBuffer
Creates a black (0, 0, 0) video buffer with the specified width/height.
Parameters:
Name | Type | Description |
---|---|---|
width |
number | The width. |
height |
number | The height. |
formatName |
string | Name of the format. |
Returns: VideoBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:207
createBlue
▸ Static
createBlue(width
: number, height
: number, formatName
: string): VideoBuffer
Creates a blue (0, 0, 255) video buffer with the specified width/height.
Parameters:
Name | Type | Description |
---|---|---|
width |
number | The width. |
height |
number | The height. |
formatName |
string | Name of the format. |
Returns: VideoBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:225
createCustom
▸ Static
createCustom(width
: number, height
: number, red
: number, green
: number, blue
: number, formatName
: string): VideoBuffer
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:
Name | Type | Description |
---|---|---|
width |
number | The width. |
height |
number | The height. |
red |
number | The red value. |
green |
number | The green value. |
blue |
number | The blue value. |
formatName |
string | Name of the format. |
Returns: VideoBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:247
▸ Static
createCustom(width
: number, height
: number, red
: number, green
: number, blue
: number, formatName
: string, buffer
: DataBuffer): VideoBuffer
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:
Name | Type | Description |
---|---|---|
width |
number | The width. |
height |
number | The height. |
red |
number | The red value. |
green |
number | The green value. |
blue |
number | The blue value. |
formatName |
string | Name of the format. |
buffer |
DataBuffer | The output data buffer. |
Returns: VideoBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:261
createCyan
▸ Static
createCyan(width
: number, height
: number, formatName
: string): VideoBuffer
Creates a cyan (0, 255, 255) video buffer with the specified width/height.
Parameters:
Name | Type | Description |
---|---|---|
width |
number | The width. |
height |
number | The height. |
formatName |
string | Name of the format. |
Returns: VideoBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:415
createDarkBlue
▸ Static
createDarkBlue(width
: number, height
: number, formatName
: string): VideoBuffer
Creates a dark blue (0, 0, 128) video buffer with the specified width/height.
Parameters:
Name | Type | Description |
---|---|---|
width |
number | The width. |
height |
number | The height. |
formatName |
string | Name of the format. |
Returns: VideoBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:433
createDarkGreen
▸ Static
createDarkGreen(width
: number, height
: number, formatName
: string): VideoBuffer
Creates a dark green (0, 128, 0) video buffer with the specified width/height.
Parameters:
Name | Type | Description |
---|---|---|
width |
number | The width. |
height |
number | The height. |
formatName |
string | Name of the format. |
Returns: VideoBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:451
createDarkRed
▸ Static
createDarkRed(width
: number, height
: number, formatName
: string): VideoBuffer
Creates a dark red (128, 0, 0) video buffer with the specified width/height.
Parameters:
Name | Type | Description |
---|---|---|
width |
number | The width. |
height |
number | The height. |
formatName |
string | Name of the format. |
Returns: VideoBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:469
createGray
▸ Static
createGray(width
: number, height
: number, formatName
: string): VideoBuffer
Creates a gray (255, 255, 255) video buffer with the specified width/height.
Parameters:
Name | Type | Description |
---|---|---|
width |
number | The width. |
height |
number | The height. |
formatName |
string | Name of the format. |
Returns: VideoBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:487
createGreen
▸ Static
createGreen(width
: number, height
: number, formatName
: string): VideoBuffer
Creates a green (0, 255, 0) video buffer with the specified width/height.
Parameters:
Name | Type | Description |
---|---|---|
width |
number | The width. |
height |
number | The height. |
formatName |
string | Name of the format. |
Returns: VideoBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:505
createMagenta
▸ Static
createMagenta(width
: number, height
: number, formatName
: string): VideoBuffer
Creates a magenta (255, 0, 255) video buffer with the specified width/height.
Parameters:
Name | Type | Description |
---|---|---|
width |
number | The width. |
height |
number | The height. |
formatName |
string | Name of the format. |
Returns: VideoBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:523
createOlive
▸ Static
createOlive(width
: number, height
: number, formatName
: string): VideoBuffer
Creates an olive (128, 128, 0) video buffer with the specified width/height.
Parameters:
Name | Type | Description |
---|---|---|
width |
number | The width. |
height |
number | The height. |
formatName |
string | Name of the format. |
Returns: VideoBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:541
createPurple
▸ Static
createPurple(width
: number, height
: number, formatName
: string): VideoBuffer
Creates a purple (128, 0, 128) video buffer with the specified width/height.
Parameters:
Name | Type | Description |
---|---|---|
width |
number | The width. |
height |
number | The height. |
formatName |
string | Name of the format. |
Returns: VideoBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:559
createRed
▸ Static
createRed(width
: number, height
: number, formatName
: string): VideoBuffer
Creates a red (255, 0, 0) video buffer with the specified width/height.
Parameters:
Name | Type | Description |
---|---|---|
width |
number | The width. |
height |
number | The height. |
formatName |
string | Name of the format. |
Returns: VideoBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:577
createTeal
▸ Static
createTeal(width
: number, height
: number, formatName
: string): VideoBuffer
Creates a teal (0, 128, 128) video buffer with the specified width/height.
Parameters:
Name | Type | Description |
---|---|---|
width |
number | The width. |
height |
number | The height. |
formatName |
string | Name of the format. |
Returns: VideoBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:595
createWhite
▸ Static
createWhite(width
: number, height
: number, formatName
: string): VideoBuffer
Creates a white (255, 255, 255) video buffer with the specified width/height.
Parameters:
Name | Type | Description |
---|---|---|
width |
number | The width. |
height |
number | The height. |
formatName |
string | Name of the format. |
Returns: VideoBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:613
createYellow
▸ Static
createYellow(width
: number, height
: number, formatName
: string): VideoBuffer
Creates a yellow (255, 255, 0) video buffer with the specified width/height.
Parameters:
Name | Type | Description |
---|---|---|
width |
number | The width. |
height |
number | The height. |
formatName |
string | Name of the format. |
Returns: VideoBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:631
fromJson
▸ Static
fromJson(videoBufferJson
: string): VideoBuffer
Deserializes an instance from JSON.
Parameters:
Name | Type | Description |
---|---|---|
videoBufferJson |
string | The video buffer JSON. |
Returns: VideoBuffer
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:647
fromJsonArray
▸ Static
fromJsonArray(videoBuffersJson
: string): VideoBuffer[]
Deserializes an array of instances from JSON.
Parameters:
Name | Type | Description |
---|---|---|
videoBuffersJson |
string | The video buffers JSON. |
Returns: VideoBuffer[]
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:695
getMinimumBufferLength
▸ Static
getMinimumBufferLength(width
: number, height
: number, formatName
: string): number
Gets the minimum data buffer length for a given width, height, and format.
Parameters:
Name | Type | Description |
---|---|---|
width |
number | The width. |
height |
number | The height. |
formatName |
string | Name of the format. |
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:715
toJson
▸ Static
toJson(videoBuffer
: VideoBuffer): string
Serializes an instance to JSON.
Parameters:
Name | Type | Description |
---|---|---|
videoBuffer |
VideoBuffer | The video buffer. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:742
toJsonArray
▸ Static
toJsonArray(videoBuffers
: VideoBuffer[]): string
Serializes an array of instances to JSON.
Parameters:
Name | Type | Description |
---|---|---|
videoBuffers |
VideoBuffer[] | The video buffers. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/VideoBuffer.ts:766