Options
All
  • Public
  • Public/Protected
  • All
Menu

Class VideoFormat

A video format.

Hierarchy

  • MediaFormat<VideoFormat>
    • VideoFormat

Index

Constructors

constructor

  • Initializes a new instance of the fm.icelink.videoFormat class.

    Parameters

    • name: string

      The name.

    • clockRate: number

      The clock rate.

    Returns VideoFormat

  • Initializes a new instance of the fm.icelink.videoFormat class.

    Parameters

    • name: string

      The name.

    Returns VideoFormat

  • Initializes a new instance of the fm.icelink.videoFormat class.

    Returns VideoFormat

Properties

Static Private __fmicelinkVideoFormatInitialized

__fmicelinkVideoFormatInitialized: boolean = false
internal

Static Private fm_icelink_VideoFormat__fourCCLookup

fm_icelink_VideoFormat__fourCCLookup: Hash<string, number>
internal

Static Private fm_icelink_VideoFormat__reverseFourCCLookup

fm_icelink_VideoFormat__reverseFourCCLookup: Hash<number, string>
internal

Methods

clone

  • clone(): VideoFormat
  • Clones this instance.

    Returns VideoFormat

Protected createInstance

  • createInstance(): VideoFormat

fourCCToFormatName

  • fourCCToFormatName(fourcc: number): string
  • Converts a FourCC value to its format name.

    Parameters

    • fourcc: number

      The FourCC value.

    Returns string

    The format name, or an empty string if the FourCC value is not recognized.

getClockRate

  • getClockRate(): number
  • Gets the clock rate.

    Returns number

getFourCC

  • getFourCC(): number
  • Gets the FourCC value for this format.

    Returns number

getFullName

  • getFullName(): string
  • Gets the full name, including clock rate and encoding parameters.

    Returns string

getIsAbgr

  • getIsAbgr(): boolean
  • Gets a value indicating whether this format is ABGR.

    Returns boolean

getIsArgb

  • getIsArgb(): boolean
  • Gets a value indicating whether this format is ARGB.

    Returns boolean

getIsBgr

  • getIsBgr(): boolean
  • Gets a value indicating whether this format is BGR.

    Returns boolean

getIsBgra

  • getIsBgra(): boolean
  • Gets a value indicating whether this format is BGRA.

    Returns boolean

getIsEncrypted

  • getIsEncrypted(): boolean
  • Gets a value indicating that the data is encrypted.

    Returns boolean

getIsH264

  • getIsH264(): boolean
  • Gets a value indicating whether this format is H.264.

    Returns boolean

getIsI420

  • getIsI420(): boolean
  • Gets a value indicating whether this format is I420.

    Returns boolean

getIsInjected

  • getIsInjected(): boolean
  • Gets a value indicating that the data is injected into the primary media stream (e.g. DTMF).

    Returns boolean

getIsNv12

  • getIsNv12(): boolean
  • Gets a value indicating whether this format is NV12.

    Returns boolean

getIsNv21

  • getIsNv21(): boolean
  • Gets a value indicating whether this format is NV21.

    Returns boolean

getIsPacketized

  • getIsPacketized(): boolean
  • Gets a value indicating that the data is packetized for network transmission.

    Returns boolean

getIsRaw

  • getIsRaw(): boolean
  • Gets a value indicating whether this format is RGB, BGR, I420, YV12, NV12, NV21, RGBA, BGRA, ARGB, or ABGR.

    Returns boolean

getIsRgb

  • getIsRgb(): boolean
  • Gets a value indicating whether this format is RGB.

    Returns boolean

getIsRgbType

  • getIsRgbType(): boolean
  • Gets a value indicating whether this format is RGB or BGR.

    Returns boolean

getIsRgba

  • getIsRgba(): boolean
  • Gets a value indicating whether this format is RGBA.

    Returns boolean

getIsRgbaType

  • getIsRgbaType(): boolean
  • Gets a value indicating whether this format is RGBA, BGRA, ARGB, or ABGR.

    Returns boolean

getIsVp8

  • getIsVp8(): boolean
  • Gets a value indicating whether this format is VP8.

    Returns boolean

getIsVp9

  • getIsVp9(): boolean
  • Gets a value indicating whether this format is VP9.

    Returns boolean

getIsYuvType

  • getIsYuvType(): boolean
  • Gets a value indicating whether this format is I420, YV12, NV12, or NV21.

    Returns boolean

getIsYv12

  • getIsYv12(): boolean
  • Gets a value indicating whether this format is YV12.

    Returns boolean

getName

  • getName(): string
  • Gets the name.

    Returns string

getParameters

  • getParameters(): string

getRegisteredPayloadType

  • getRegisteredPayloadType(): number

getStaticPayloadType

  • getStaticPayloadType(): number
  • Gets the static payload type, if this format has a static payload type registered with IANA.

    Returns number

getTypeString

  • getTypeString(): string

isEquivalent

  • isEquivalent(format: VideoFormat, ignoreIsPacketized: boolean): boolean
  • Determines whether the specified format is equivalent.

    Parameters

    • format: VideoFormat

      The format.

    • ignoreIsPacketized: boolean

      Whether to ignore if the two formats differ in whether they are packetized.

    Returns boolean

setClockRate

  • setClockRate(value: number): void
  • Sets the clock rate.

    Parameters

    • value: number

    Returns void

setFourCC

  • setFourCC(value: number): void
  • Sets the FourCC value for this format.

    Parameters

    • value: number

    Returns void

setIsEncrypted

  • setIsEncrypted(value: boolean): void
  • Sets a value indicating that the data is encrypted.

    Parameters

    • value: boolean

    Returns void

setIsInjected

  • setIsInjected(value: boolean): void
  • Sets a value indicating that the data is injected into the primary media stream (e.g. DTMF).

    Parameters

    • value: boolean

    Returns void

setIsPacketized

  • setIsPacketized(value: boolean): void
  • Sets a value indicating that the data is packetized for network transmission.

    Parameters

    • value: boolean

    Returns void

setName

  • setName(value: string): void
  • Sets the name.

    Parameters

    • value: string

    Returns void

setRegisteredPayloadType

  • setRegisteredPayloadType(value: number): void

Protected setStaticPayloadType

  • setStaticPayloadType(value: number): void
  • Sets the static payload type, if this format has a static payload type registered with IANA.

    Parameters

    • value: number

    Returns void

toJson

  • toJson(): string
  • Serializes this instance to JSON.

    Returns string

toString

  • toString(): string
  • Returns a string that represents this instance.

    Returns string

Static fmicelinkVideoFormatInitialize

  • fmicelinkVideoFormatInitialize(): void
  • internal

    Returns void

Static formatNameToFourCC

  • formatNameToFourCC(formatName: string): number
  • Converts a format name to its FourCC value.

    Parameters

    • formatName: string

      The format name.

    Returns number

    The FourCC value, or 0 if the format name is not recognized.

Static fromJson

  • fromJson(videoFormatJson: string): VideoFormat
  • Deserializes an instance from JSON.

    Parameters

    • videoFormatJson: string

      The video format JSON.

    Returns VideoFormat

Static getAbgr

  • getAbgr(): VideoFormat
  • Gets an ABGR video format.

    Returns VideoFormat

Static getAbgrName

  • getAbgrName(): string
  • Gets the name of the ABGR video format ("ABGR"). Indicates that each pixel occupies 32 bits (8 bits for alpha, then 8 bits for blue, then8 bits for green, then 8 bits for red).

    Returns string

Static getArgb

  • getArgb(): VideoFormat
  • Gets an ARGB video format.

    Returns VideoFormat

Static getArgbName

  • getArgbName(): string
  • Gets the name of the ARGB video format ("ARGB"). Indicates that each pixel occupies 32 bits (8 bits for alpha, then 8 bits for red, then 8 bits for green, then 8 bits for blue).

    Returns string

Static getBgr

  • getBgr(): VideoFormat
  • Gets a BGR video format.

    Returns VideoFormat

Static getBgrName

  • getBgrName(): string
  • Gets the name of the BGR video format ("BGR"). Indicates that each pixel occupies 24 bits (8 bits for blue, then8 bits for green, then 8 bits for red).

    Returns string

Static getBgra

  • getBgra(): VideoFormat
  • Gets an BGRA video format.

    Returns VideoFormat

Static getBgraName

  • getBgraName(): string
  • Gets the name of the BGRA video format ("BGRA"). Indicates that each pixel occupies 32 bits (8 bits for blue, then8 bits for green, then 8 bits for red, then 8 bits for alpha).

    Returns string

Static getH264

  • getH264(): VideoFormat
  • Gets an H.264 video format.

    Returns VideoFormat

Static getH264Name

  • getH264Name(): string
  • Gets the name of the H.264 video format ("H264").

    Returns string

Static getI420

  • getI420(): VideoFormat
  • Gets an I420 video format.

    Returns VideoFormat

Static getI420Name

  • getI420Name(): string
  • Gets the name of the I420 video format ("I420"). Indicates that each pixel occupies 12 bits (8 bits for Y, 2 bits for U, and 2 bits for V). Y plane is followed by U plane and then V plane.

    Returns string

Static getNv12

  • getNv12(): VideoFormat
  • Gets an NV12 video format.

    Returns VideoFormat

Static getNv12Name

  • getNv12Name(): string
  • Gets the name of the NV12 video format ("NV12"). Indicates that each pixel occupies 12 bits (8 bits for Y, 2 bits for U, and 2 bits for V). Y plane is followed by interleaved U/V plane.

    Returns string

Static getNv21

  • getNv21(): VideoFormat
  • Gets an NV21 video format.

    Returns VideoFormat

Static getNv21Name

  • getNv21Name(): string
  • Gets the name of the NV21 video format ("NV21"). Indicates that each pixel occupies 12 bits (8 bits for Y, 2 bits for U, and 2 bits for V). Y plane is followed by interleaved V/U plane.

    Returns string

Static getRedName

  • getRedName(): string
  • Gets the name of the RED media format.

    Returns string

Static getRgb

  • getRgb(): VideoFormat
  • Gets an RGB video format.

    Returns VideoFormat

Static getRgbName

  • getRgbName(): string
  • Gets the name of the RGB video format ("RGB"). Indicates that each pixel occupies 24 bits (8 bits for red, then 8 bits for green, then 8 bits for blue).

    Returns string

Static getRgba

  • getRgba(): VideoFormat
  • Gets an RGBA video format.

    Returns VideoFormat

Static getRgbaName

  • getRgbaName(): string
  • Gets the name of the RGBA video format ("RGBA"). Indicates that each pixel occupies 32 bits (8 bits for red, then 8 bits for green, then 8 bits for blue, then 8 bits for alpha).

    Returns string

Static getUlpFecName

  • getUlpFecName(): string
  • Gets the name of the ULPFEC media format.

    Returns string

Static getVp8

  • getVp8(): VideoFormat
  • Gets a VP8 video format.

    Returns VideoFormat

Static getVp8Name

  • getVp8Name(): string
  • Gets the name of the VP8 video format ("VP8").

    Returns string

Static getVp9

  • getVp9(): VideoFormat
  • Gets a VP9 video format.

    Returns VideoFormat

Static getVp9Name

  • getVp9Name(): string
  • Gets the name of the VP9 video format ("VP9").

    Returns string

Static getYv12

  • getYv12(): VideoFormat
  • Gets a YV12 video format.

    Returns VideoFormat

Static getYv12Name

  • getYv12Name(): string
  • Gets the name of the YV12 video format ("YV12"). Indicates that each pixel occupies 12 bits (8 bits for Y, 2 bits for U, and 2 bits for V). Y plane is followed by V plane and then U plane.

    Returns string

Static toFourCC

  • toFourCC(fourcc: string): number
  • toFourCC(a: number, b: number, c: number, d: number): number
  • Converts a FourCC string to a int.

    Parameters

    • fourcc: string

      The fourcc.

    Returns number

  • Converts 4 FourCC characters to an int.

    Parameters

    • a: number
    • b: number
    • c: number
    • d: number

    Returns number

Static toJson

  • toJson(videoFormat: VideoFormat): string
  • Serializes an instance to JSON.

    Parameters

    • videoFormat: VideoFormat

      The video format.

    Returns string