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

    • csrc_count: 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

  • rtcp_buffer_new_copy_data(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

  • rtcp_buffer_new_take_data(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

  • rtcp_buffer_validate(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

  • rtcp_buffer_validate_data(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

  • rtcp_buffer_validate_data_reduced(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

  • rtcp_buffer_validate_reduced(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

  • rtcp_ntp_to_unix(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

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

    Parameters

    Returns string

  • rtcp_unix_to_ntp(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

  • rtp_buffer_allocate_data(buffer: Gst.Buffer, payload_len: number, pad_len: number, csrc_count: 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

    • payload_len: number

      the length of the payload

    • pad_len: number

      the amount of padding

    • csrc_count: number

      the number of CSRC entries

    Returns void

  • rtp_buffer_calc_header_len(csrc_count: 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

    • csrc_count: number

      the number of CSRC entries

    Returns number

  • rtp_buffer_calc_packet_len(payload_len: number, pad_len: number, csrc_count: 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

    • payload_len: number

      the length of the payload

    • pad_len: number

      the amount of padding

    • csrc_count: number

      the number of CSRC entries

    Returns number

  • rtp_buffer_calc_payload_len(packet_len: number, pad_len: number, csrc_count: 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

    • packet_len: number

      the length of the total RTP packet

    • pad_len: number

      the amount of padding

    • csrc_count: number

      the number of CSRC entries

    Returns number

  • rtp_buffer_compare_seqnum(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

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

    Parameters

    • payload_type: number

      the static payload type

    Returns number

  • rtp_buffer_ext_timestamp(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]

  • rtp_buffer_get_extension_onebyte_header_from_bytes(bytes: Bytes, bit_pattern: 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: Bytes

      #GBytes

    • bit_pattern: 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]

  • rtp_buffer_new_allocate(payload_len: number, pad_len: number, csrc_count: 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

    • payload_len: number

      the length of the payload

    • pad_len: number

      the amount of padding

    • csrc_count: number

      the number of CSRC entries

    Returns Gst.Buffer

  • rtp_buffer_new_allocate_len(packet_len: number, pad_len: number, csrc_count: 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

    • packet_len: number

      the total length of the packet

    • pad_len: number

      the amount of padding

    • csrc_count: number

      the number of CSRC entries

    Returns Gst.Buffer

  • rtp_buffer_new_copy_data(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

  • rtp_buffer_new_take_data(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[]

  • rtp_hdrext_get_ntp_56(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]

  • rtp_hdrext_get_ntp_64(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]

  • rtp_hdrext_set_ntp_56(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

  • rtp_hdrext_set_ntp_64(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

  • rtp_payload_info_for_name(media: string, encoding_name: 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

    • encoding_name: 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

    • payload_type: number

      the payload_type to find

    Returns RTPPayloadInfo

  • rtp_source_meta_api_get_type(): 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