fm.liveswitch.PacketizedVideoBuffer Class Reference

A VideoBuffer containing an RtpHeader. More...

Public Member Functions

 PacketizedVideoBuffer (int width, int height, fm.liveswitch.DataBuffer dataBuffer, fm.liveswitch.VideoFormat format, fm.liveswitch.RtpPacketHeader rtpHeader)
 Initializes a new instance of the fm.liveswitch.PacketizedVideoBuffer class. More...
 
 PacketizedVideoBuffer (int width, int height, fm.liveswitch.DataBuffer[] dataBuffers, fm.liveswitch.VideoFormat format, fm.liveswitch.RtpPacketHeader[] rtpHeaders)
 Initializes a new instance of the fm.liveswitch.PacketizedVideoBuffer class. More...
 
- Public Member Functions inherited from fm.liveswitch.VideoBuffer
fm.liveswitch.VideoBuffer clone ()
 Clones this instance. More...
 
fm.liveswitch.VideoBuffer convert (fm.liveswitch.VideoFormat format)
 Creates a new video buffer using the specified format. More...
 
fm.liveswitch.VideoBuffer convert (fm.liveswitch.VideoFormat format, fm.liveswitch.DataBuffer dataBuffer)
 Creates a new video buffer using the specified format. More...
 
fm.liveswitch.VideoBuffer convert (fm.liveswitch.VideoFormat format, boolean usePool)
 Creates a new video buffer using the specified format. More...
 
void copyTransformationAttributes (fm.liveswitch.VideoBuffer sourceBuffer)
 Copy the transformation attributes from another video buffer. More...
 
int getAValue (int index)
 Gets the A value at a given index. More...
 
int getBValue (int index)
 Gets the B value at a given index. More...
 
int getGValue (int index)
 Gets the G value at a given index. More...
 
int getHeight ()
 Gets the height. More...
 
boolean getHorizontallyMirrored ()
 Gets whether this buffer should be mirrored over the X axis. More...
 
boolean getInversionRequired ()
 Gets whether inversion is required to reset the mirroring of this buffer. More...
 
boolean getIsAbgr ()
 Gets a value indicating whether this buffer has ABGR video. More...
 
boolean getIsArgb ()
 Gets a value indicating whether this buffer has ARGB video. More...
 
boolean getIsBgr ()
 Gets a value indicating whether this buffer has BGR video. More...
 
boolean getIsBgra ()
 Gets a value indicating whether this buffer has BGRA video. More...
 
boolean getIsH264 ()
 Gets a value indicating whether this buffer has H.264 video. More...
 
boolean getIsH265 ()
 Gets a value indicating whether this buffer has H.265 video. More...
 
boolean getIsI420 ()
 Gets a value indicating whether this buffer has I420 video. More...
 
boolean getIsKeyFrame ()
 Gets a value indicating whether this buffer contains a keyframe. More...
 
boolean getIsMuted ()
 Gets a value indicating whether this instance has been muted. More...
 
boolean getIsNv12 ()
 Gets a value indicating whether this buffer has NV12 video. More...
 
boolean getIsNv21 ()
 Gets a value indicating whether this buffer has NV21 video. More...
 
boolean getIsPacked ()
 Gets a value indicating whether the data is packed into a single data buffer. More...
 
boolean getIsPlanar ()
 Gets a value indicating whether the data is spread across multiple data buffers (planes). More...
 
boolean getIsRaw ()
 Gets a value indicating whether this buffer has raw video. More...
 
boolean getIsRgb ()
 Gets a value indicating whether this buffer has RGB video. More...
 
boolean getIsRgba ()
 Gets a value indicating whether this buffer has RGBA video. More...
 
boolean getIsRgbaType ()
 Gets a value indicating whether this buffer has raw RGBA, BGRA, ARGB, or ABGR video. More...
 
boolean getIsRgbType ()
 Gets a value indicating whether this buffer has raw RGB or BGR video. More...
 
boolean getIsVp8 ()
 Gets a value indicating whether this buffer has VP8 video. More...
 
boolean getIsVp9 ()
 Gets a value indicating whether this buffer has VP9 video. More...
 
boolean getIsYuvType ()
 Gets a value indicating whether this buffer has raw I420, YV12, NV12, or NV21 video. More...
 
boolean getIsYv12 ()
 Gets a value indicating whether this buffer has YV12 video. More...
 
int getOrientation ()
 Gets the desired orientation of the buffer. More...
 
int getRotationRequired ()
 Gets whether rotation is required to reset the mirroring and orientation of this buffer. More...
 
int getRValue (int index)
 Gets the R value at a given index. More...
 
int getStride ()
 Gets the stride. More...
 
int[] getStrides ()
 Gets the strides. More...
 
boolean getTransformRequired ()
 Gets a boolean value on whether the buffer needs to be transformed. More...
 
int getUValue (int index)
 Gets the U value at a given index. More...
 
boolean getVerticallyMirrored ()
 Gets whether this buffer should be mirrored over the Y axis. More...
 
int getVValue (int index)
 Gets the V value at a given index. More...
 
int getWidth ()
 Gets the width. More...
 
int getYValue (int index)
 Gets the Y value at a given index. More...
 
boolean mute ()
 Mutes this instance. More...
 
void resetTransformationAttributes ()
 Resets the transformation attributes back to default values. More...
 
boolean setAValue (int aValue, int index)
 Gets the A value at a given index. More...
 
boolean setBValue (int bValue, int index)
 Gets the B value at a given index. More...
 
boolean setGValue (int gValue, int index)
 Sets the G value at a given index. More...
 
void setHeight (int value)
 Sets the height. More...
 
void setHorizontallyMirrored (boolean value)
 Sets whether this buffer should be mirrored over the X axis. More...
 
void setOrientation (int value)
 Sets the desired orientation of the buffer. More...
 
boolean setRValue (int rValue, int index)
 Sets the R value at a given index. More...
 
void setStride (int value)
 Sets the stride. More...
 
void setStrides (int[] value)
 Sets the strides. More...
 
boolean setUValue (int uValue, int index)
 Sets the U value at a given index. More...
 
void setVerticallyMirrored (boolean value)
 Sets whether this buffer should be mirrored over the Y axis. More...
 
boolean setVValue (int vValue, int index)
 Sets the V value at a given index. More...
 
void setWidth (int value)
 Sets the width. More...
 
boolean setYValue (int yValue, int index)
 Sets the Y value at a given index. More...
 
String toJson ()
 Serializes this instance to JSON. More...
 
fm.liveswitch.VideoBuffer toPacked ()
 Creates a packed representation of this planar buffer, if in YUV-planar format. More...
 
fm.liveswitch.VideoBuffer toPacked (boolean usePool)
 Creates a packed representation of this planar buffer, if in YUV-planar format. More...
 
fm.liveswitch.VideoBuffer toPlanar ()
 Creates a planar representation of this packed buffer, if in YUV-packed format. More...
 
 VideoBuffer (int width, int height, fm.liveswitch.DataBuffer dataBuffer, fm.liveswitch.VideoFormat format)
 Initializes a new instance of the fm.liveswitch.VideoBuffer class. More...
 
 VideoBuffer (int width, int height, fm.liveswitch.DataBuffer[] dataBuffers, fm.liveswitch.VideoFormat format)
 Initializes a new instance of the fm.liveswitch.VideoBuffer class. More...
 
 VideoBuffer (int width, int height, int stride, fm.liveswitch.DataBuffer dataBuffer, fm.liveswitch.VideoFormat format)
 Initializes a new instance of the fm.liveswitch.VideoBuffer class. More...
 
 VideoBuffer (int width, int height, int[] strides, fm.liveswitch.DataBuffer[] dataBuffers, fm.liveswitch.VideoFormat format)
 Initializes a new instance of the fm.liveswitch.VideoBuffer class. More...
 
- Public Member Functions inherited from fm.liveswitch.Dynamic
java.util.HashMap< String, Object > getDynamicProperties ()
 Gets all dynamic properties on this instance. More...
 
Object getDynamicValue (String key)
 Gets a property value from the local cache. More...
 
void setDynamicValue (String key, Object value)
 Sets a property value in the local cache. More...
 
boolean unsetDynamicValue (String key)
 Removes a property value from the local cache. More...
 

Protected Member Functions

fm.liveswitch.VideoBuffer createInstance ()
 Creates a new instance. More...
 
- Protected Member Functions inherited from fm.liveswitch.VideoBuffer
 VideoBuffer ()
 Initializes a new instance of the fm.liveswitch.VideoBuffer class. More...
 
- Protected Member Functions inherited from fm.liveswitch.Dynamic
 Dynamic ()
 
- Protected Member Functions inherited from fm.liveswitch.Serializable
boolean getIsDirty ()
 Gets a value indicating whether this instance is dirty. More...
 
 Serializable ()
 Initializes a new instance of the fm.liveswitch.Serializable class. More...
 
void setIsDirty (boolean value)
 Sets a value indicating whether this instance is dirty. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from fm.liveswitch.VideoBuffer
static fm.liveswitch.VideoBuffer createBlack (int width, int height, String formatName)
 Creates a black (0, 0, 0) video buffer with the specified width/height. More...
 
static fm.liveswitch.VideoBuffer createBlue (int width, int height, String formatName)
 Creates a blue (0, 0, 255) video buffer with the specified width/height. More...
 
static fm.liveswitch.VideoBuffer createCustom (int width, int height, int red, int green, int blue, String formatName)
 Creates a custom video buffer with the specified width/height and red/green/blue values for the specified format name. More...
 
static fm.liveswitch.VideoBuffer createCustom (int width, int height, int red, int green, int blue, String formatName, fm.liveswitch.DataBuffer buffer)
 Creates a custom video buffer with the specified width/height and red/green/blue values for the specified format name. More...
 
static fm.liveswitch.VideoBuffer createCyan (int width, int height, String formatName)
 Creates a cyan (0, 255, 255) video buffer with the specified width/height. More...
 
static fm.liveswitch.VideoBuffer createDarkBlue (int width, int height, String formatName)
 Creates a dark blue (0, 0, 128) video buffer with the specified width/height. More...
 
static fm.liveswitch.VideoBuffer createDarkGreen (int width, int height, String formatName)
 Creates a dark green (0, 128, 0) video buffer with the specified width/height. More...
 
static fm.liveswitch.VideoBuffer createDarkRed (int width, int height, String formatName)
 Creates a dark red (128, 0, 0) video buffer with the specified width/height. More...
 
static fm.liveswitch.VideoBuffer createGray (int width, int height, String formatName)
 Creates a gray (255, 255, 255) video buffer with the specified width/height. More...
 
static fm.liveswitch.VideoBuffer createGreen (int width, int height, String formatName)
 Creates a green (0, 255, 0) video buffer with the specified width/height. More...
 
static fm.liveswitch.VideoBuffer createMagenta (int width, int height, String formatName)
 Creates a magenta (255, 0, 255) video buffer with the specified width/height. More...
 
static fm.liveswitch.VideoBuffer createOlive (int width, int height, String formatName)
 Creates an olive (128, 128, 0) video buffer with the specified width/height. More...
 
static fm.liveswitch.VideoBuffer createPurple (int width, int height, String formatName)
 Creates a purple (128, 0, 128) video buffer with the specified width/height. More...
 
static fm.liveswitch.VideoBuffer createRed (int width, int height, String formatName)
 Creates a red (255, 0, 0) video buffer with the specified width/height. More...
 
static fm.liveswitch.VideoBuffer createTeal (int width, int height, String formatName)
 Creates a teal (0, 128, 128) video buffer with the specified width/height. More...
 
static fm.liveswitch.VideoBuffer createWhite (int width, int height, String formatName)
 Creates a white (255, 255, 255) video buffer with the specified width/height. More...
 
static fm.liveswitch.VideoBuffer createYellow (int width, int height, String formatName)
 Creates a yellow (255, 255, 0) video buffer with the specified width/height. More...
 
static fm.liveswitch.VideoBuffer fromJson (String videoBufferJson)
 Deserializes an instance from JSON. More...
 
static fm.liveswitch.VideoBuffer[] fromJsonArray (String videoBuffersJson)
 Deserializes an array of instances from JSON. More...
 
static int getMinimumBufferLength (int width, int height, String formatName)
 Gets the minimum data buffer length for a given width, height, and format. More...
 
static String toJson (final fm.liveswitch.VideoBuffer videoBuffer)
 Serializes an instance to JSON. More...
 
static String toJsonArray (fm.liveswitch.VideoBuffer[] videoBuffers)
 Serializes an array of instances to JSON. More...
 

Detailed Description

A VideoBuffer containing an RtpHeader.

Constructor & Destructor Documentation

◆ PacketizedVideoBuffer() [1/2]

fm.liveswitch.PacketizedVideoBuffer.PacketizedVideoBuffer ( int  width,
int  height,
fm.liveswitch.DataBuffer  dataBuffer,
fm.liveswitch.VideoFormat  format,
fm.liveswitch.RtpPacketHeader  rtpHeader 
)

Initializes a new instance of the fm.liveswitch.PacketizedVideoBuffer class.

Parameters
widthThe width.
heightThe height.
dataBufferThe data buffer.
formatThe format.
rtpHeaderThe RTP header.

◆ PacketizedVideoBuffer() [2/2]

fm.liveswitch.PacketizedVideoBuffer.PacketizedVideoBuffer ( int  width,
int  height,
fm.liveswitch.DataBuffer[]  dataBuffers,
fm.liveswitch.VideoFormat  format,
fm.liveswitch.RtpPacketHeader[]  rtpHeaders 
)

Initializes a new instance of the fm.liveswitch.PacketizedVideoBuffer class.

Parameters
widthThe width.
heightThe height.
dataBuffersThe data buffers.
formatThe format.
rtpHeadersThe RTP headers.

Member Function Documentation

◆ createInstance()

fm.liveswitch.VideoBuffer fm.liveswitch.PacketizedVideoBuffer.createInstance ( )
protected

Creates a new instance.

Reimplemented from fm.liveswitch.VideoBuffer.