Gjsify LogoGjsify Logo

Index

Enumerations

Classes

Interfaces

Variables

Functions

Variables

RTCP_MAX_BYE_SSRC_COUNT: number

The maximum amount of SSRCs in a BYE packet.

RTCP_MAX_RB_COUNT: number

The maximum amount of Receiver report blocks in RR and SR messages.

RTCP_MAX_SDES: number

The maximum text length for an SDES item.

RTCP_MAX_SDES_ITEM_COUNT: number

The maximum amount of SDES items.

RTCP_REDUCED_SIZE_VALID_MASK: number

Mask for version, padding bit and packet type pair allowing reduced size packets, basically it accepts other types than RR and SR

RTCP_VALID_MASK: number

Mask for version, padding bit and packet type pair

RTCP_VALID_VALUE: number

Valid value for the first two bytes of an RTCP packet after applying #GST_RTCP_VALID_MASK to them.

RTCP_VERSION: number

The supported RTCP version 2.

RTP_HDREXT_BASE: string
RTP_HDREXT_ELEMENT_CLASS: string

Constant string used in element classification to signal that this element is a RTP header extension.

RTP_HDREXT_NTP_56: string
RTP_HDREXT_NTP_56_SIZE: number
RTP_HDREXT_NTP_64: string
RTP_HDREXT_NTP_64_SIZE: number
RTP_HEADER_EXTENSION_URI_METADATA_KEY: string
RTP_PAYLOAD_1016_STRING: string
RTP_PAYLOAD_CELLB_STRING: string
RTP_PAYLOAD_CN_STRING: string
RTP_PAYLOAD_DVI4_11025_STRING: string
RTP_PAYLOAD_DVI4_16000_STRING: string
RTP_PAYLOAD_DVI4_22050_STRING: string
RTP_PAYLOAD_DVI4_8000_STRING: string
RTP_PAYLOAD_DYNAMIC_STRING: string
RTP_PAYLOAD_G721_STRING: string
RTP_PAYLOAD_G722_STRING: string
RTP_PAYLOAD_G723_53: number
RTP_PAYLOAD_G723_53_STRING: string
RTP_PAYLOAD_G723_63: number
RTP_PAYLOAD_G723_63_STRING: string
RTP_PAYLOAD_G723_STRING: string
RTP_PAYLOAD_G728_STRING: string
RTP_PAYLOAD_G729_STRING: string
RTP_PAYLOAD_GSM_STRING: string
RTP_PAYLOAD_H261_STRING: string
RTP_PAYLOAD_H263_STRING: string
RTP_PAYLOAD_JPEG_STRING: string
RTP_PAYLOAD_L16_MONO_STRING: string
RTP_PAYLOAD_L16_STEREO_STRING: string
RTP_PAYLOAD_LPC_STRING: string
RTP_PAYLOAD_MP2T_STRING: string
RTP_PAYLOAD_MPA_STRING: string
RTP_PAYLOAD_MPV_STRING: string
RTP_PAYLOAD_NV_STRING: string
RTP_PAYLOAD_PCMA_STRING: string
RTP_PAYLOAD_PCMU_STRING: string
RTP_PAYLOAD_QCELP_STRING: string
RTP_PAYLOAD_TS41: number
RTP_PAYLOAD_TS41_STRING: string
RTP_PAYLOAD_TS48: number
RTP_PAYLOAD_TS48_STRING: string
RTP_SOURCE_META_MAX_CSRC_COUNT: number
RTP_VERSION: number

The supported RTP version 2.

Functions

  • Attaches RTP source information to buffer.

    Parameters

    • buffer: Gst.Buffer

      a #GstBuffer

    • ssrc: number

      pointer to the SSRC

    • csrc: number

      pointer to the CSRCs

    • csrcCount: number

      number of elements in csrc

    Returns RTPSourceMeta

  • Open buffer for reading or writing, depending on flags. The resulting RTCP buffer state is stored in rtcp.

    Parameters

    Returns boolean

  • Create a new buffer for constructing RTCP packets. The packet will have a maximum size of mtu.

    Parameters

    • mtu: number

      the maximum mtu size.

    Returns Gst.Buffer

  • rtcpBufferNewCopyData(data: Uint8Array): Gst.Buffer
  • Create a new buffer and set the data to a copy of len bytes of data and the size to len. The data will be freed when the buffer is freed.

    Parameters

    • data: Uint8Array

      data for the new buffer

    Returns Gst.Buffer

  • rtcpBufferNewTakeData(data: Uint8Array): Gst.Buffer
  • Create a new buffer and set the data and size of the buffer to data and len respectively. data will be freed when the buffer is unreffed, so this function transfers ownership of data to the new buffer.

    Parameters

    • data: Uint8Array

      data for the new buffer

    Returns Gst.Buffer

  • rtcpBufferValidate(buffer: Gst.Buffer): boolean
  • Check if the data pointed to by buffer is a valid RTCP packet using gst_rtcp_buffer_validate_data().

    Parameters

    Returns boolean

  • rtcpBufferValidateData(data: Uint8Array): boolean
  • Check if the data and size point to the data of a valid compound, non-reduced size RTCP packet. Use this function to validate a packet before using the other functions in this module.

    Parameters

    • data: Uint8Array

      the data to validate

    Returns boolean

  • rtcpBufferValidateDataReduced(data: Uint8Array): boolean
  • Check if the data and size point to the data of a valid RTCP packet. Use this function to validate a packet before using the other functions in this module.

    This function is updated to support reduced size rtcp packets according to RFC 5506 and will validate full compound RTCP packets as well as reduced size RTCP packets.

    Parameters

    • data: Uint8Array

      the data to validate

    Returns boolean

  • rtcpBufferValidateReduced(buffer: Gst.Buffer): boolean
  • Check if the data pointed to by buffer is a valid RTCP packet using gst_rtcp_buffer_validate_reduced().

    Parameters

    Returns boolean

  • rtcpNtpToUnix(ntptime: number): number
  • Converts an NTP time to UNIX nanoseconds. ntptime can typically be the NTP time of an SR RTCP message and contains, in the upper 32 bits, the number of seconds since 1900 and, in the lower 32 bits, the fractional seconds. The resulting value will be the number of nanoseconds since 1970.

    Parameters

    • ntptime: number

      an NTP timestamp

    Returns number

  • Convert name into a GstRTCPSDESType. name is typically a key in a #GstStructure containing SDES items.

    Parameters

    • name: string

      a SDES name

    Returns RTCPSDESType

  • Converts type to the string equivalent. The string is typically used as a key in a #GstStructure containing SDES items.

    Parameters

    Returns string

  • rtcpUnixToNtp(unixtime: number): number
  • Converts a UNIX timestamp in nanoseconds to an NTP time. The caller should pass a value with nanoseconds since 1970. The NTP time will, in the upper 32 bits, contain the number of seconds since 1900 and, in the lower 32 bits, the fractional seconds. The resulting value can be used as an ntptime for constructing SR RTCP packets.

    Parameters

    • unixtime: number

      an UNIX timestamp in nanoseconds

    Returns number

  • rtpBufferAllocateData(buffer: Gst.Buffer, payloadLen: number, padLen: number, csrcCount: number): void
  • Allocate enough data in buffer to hold an RTP packet with csrc_count CSRCs, a payload length of payload_len and padding of pad_len. buffer must be writable and all previous memory in buffer will be freed. If pad_len is >0, the padding bit will be set. All other RTP header fields will be set to 0/FALSE.

    Parameters

    • buffer: Gst.Buffer

      a #GstBuffer

    • payloadLen: number

      the length of the payload

    • padLen: number

      the amount of padding

    • csrcCount: number

      the number of CSRC entries

    Returns void

  • rtpBufferCalcHeaderLen(csrcCount: number): number
  • Calculate the header length of an RTP packet with csrc_count CSRC entries. An RTP packet can have at most 15 CSRC entries.

    Parameters

    • csrcCount: number

      the number of CSRC entries

    Returns number

  • rtpBufferCalcPacketLen(payloadLen: number, padLen: number, csrcCount: number): number
  • Calculate the total length of an RTP packet with a payload size of payload_len, a padding of pad_len and a csrc_count CSRC entries.

    Parameters

    • payloadLen: number

      the length of the payload

    • padLen: number

      the amount of padding

    • csrcCount: number

      the number of CSRC entries

    Returns number

  • rtpBufferCalcPayloadLen(packetLen: number, padLen: number, csrcCount: number): number
  • Calculate the length of the payload of an RTP packet with size packet_len, a padding of pad_len and a csrc_count CSRC entries.

    Parameters

    • packetLen: number

      the length of the total RTP packet

    • padLen: number

      the amount of padding

    • csrcCount: number

      the number of CSRC entries

    Returns number

  • rtpBufferCompareSeqnum(seqnum1: number, seqnum2: number): number
  • Compare two sequence numbers, taking care of wraparounds. This function returns the difference between seqnum1 and seqnum2.

    Parameters

    • seqnum1: number

      a sequence number

    • seqnum2: number

      a sequence number

    Returns number

  • rtpBufferDefaultClockRate(payloadType: number): number
  • Get the default clock-rate for the static payload type payload_type.

    Parameters

    • payloadType: number

      the static payload type

    Returns number

  • rtpBufferExtTimestamp(exttimestamp: number, timestamp: number): [number, number]
  • Update the exttimestamp field with the extended timestamp of timestamp For the first call of the method, exttimestamp should point to a location with a value of -1.

    This function is able to handle both forward and backward timestamps taking into account:

    • timestamp wraparound making sure that the returned value is properly increased.
    • timestamp unwraparound making sure that the returned value is properly decreased.

    Parameters

    • exttimestamp: number

      a previous extended timestamp

    • timestamp: number

      a new timestamp

    Returns [number, number]

  • rtpBufferGetExtensionOnebyteHeaderFromBytes(bytes: any, bitPattern: number, id: number, nth: number): [boolean, Uint8Array]
  • Similar to gst_rtp_buffer_get_extension_onebyte_header, but working on the #GBytes you get from gst_rtp_buffer_get_extension_bytes. Parses RFC 5285 style header extensions with a one byte header. It will return the nth extension with the requested id.

    Parameters

    • bytes: any

      #GBytes

    • bitPattern: number

      The bit-pattern. Anything but 0xBEDE is rejected.

    • id: number

      The ID of the header extension to be read (between 1 and 14).

    • nth: number

      Read the nth extension packet with the requested ID

    Returns [boolean, Uint8Array]

  • rtpBufferNewAllocate(payloadLen: number, padLen: number, csrcCount: number): Gst.Buffer
  • Allocate a new #GstBuffer with enough data to hold an RTP packet with csrc_count CSRCs, a payload length of payload_len and padding of pad_len. All other RTP header fields will be set to 0/FALSE.

    Parameters

    • payloadLen: number

      the length of the payload

    • padLen: number

      the amount of padding

    • csrcCount: number

      the number of CSRC entries

    Returns Gst.Buffer

  • rtpBufferNewAllocateLen(packetLen: number, padLen: number, csrcCount: number): Gst.Buffer
  • Create a new #GstBuffer that can hold an RTP packet that is exactly packet_len long. The length of the payload depends on pad_len and csrc_count and can be calculated with gst_rtp_buffer_calc_payload_len(). All RTP header fields will be set to 0/FALSE.

    Parameters

    • packetLen: number

      the total length of the packet

    • padLen: number

      the amount of padding

    • csrcCount: number

      the number of CSRC entries

    Returns Gst.Buffer

  • rtpBufferNewCopyData(data: Uint8Array): Gst.Buffer
  • Create a new buffer and set the data to a copy of len bytes of data and the size to len. The data will be freed when the buffer is freed.

    Parameters

    • data: Uint8Array

      data for the new buffer

    Returns Gst.Buffer

  • rtpBufferNewTakeData(data: Uint8Array): Gst.Buffer
  • Create a new buffer and set the data and size of the buffer to data and len respectively. data will be freed when the buffer is unreffed, so this function transfers ownership of data to the new buffer.

    Parameters

    • data: Uint8Array

      data for the new buffer

    Returns Gst.Buffer

  • Retrieve all the factories of the currently registered RTP header extensions. Call gst_element_factory_create() with each factory to create the associated #GstRTPHeaderExtension.

    Returns Gst.ElementFactory[]

  • rtpHdrextGetNtp56(data: Uint8Array): [boolean, number]
  • Reads the NTP time from the size NTP-56 extension bytes in data and store the result in ntptime.

    Parameters

    • data: Uint8Array

      the data to read from

    Returns [boolean, number]

  • rtpHdrextGetNtp64(data: Uint8Array): [boolean, number]
  • Reads the NTP time from the size NTP-64 extension bytes in data and store the result in ntptime.

    Parameters

    • data: Uint8Array

      the data to read from

    Returns [boolean, number]

  • rtpHdrextSetNtp56(data: object, size: number, ntptime: number): boolean
  • Writes the NTP time in ntptime to the format required for the NTP-56 header extension. data must hold at least #GST_RTP_HDREXT_NTP_56_SIZE bytes.

    Parameters

    • data: object

      the data to write to

    • size: number

      the size of data

    • ntptime: number

      the NTP time

    Returns boolean

  • rtpHdrextSetNtp64(data: object, size: number, ntptime: number): boolean
  • Writes the NTP time in ntptime to the format required for the NTP-64 header extension. data must hold at least #GST_RTP_HDREXT_NTP_64_SIZE bytes.

    Parameters

    • data: object

      the data to write to

    • size: number

      the size of data

    • ntptime: number

      the NTP time

    Returns boolean

  • rtpPayloadInfoForName(media: string, encodingName: string): RTPPayloadInfo
  • Get the #GstRTPPayloadInfo for media and encoding_name. This function is mostly used to get the default clock-rate and bandwidth for dynamic payload types specified with media and encoding name.

    The search for encoding_name will be performed in a case insensitive way.

    Parameters

    • media: string

      the media to find

    • encodingName: string

      the encoding name to find

    Returns RTPPayloadInfo

  • Get the #GstRTPPayloadInfo for payload_type. This function is mostly used to get the default clock-rate and bandwidth for static payload types specified with payload_type.

    Parameters

    • payloadType: number

      the payload_type to find

    Returns RTPPayloadInfo

  • rtpSourceMetaApiGetType(): GType

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method