/ fm / liveswitch / RtpPacketHeader
Class: RtpPacketHeader
fm.liveswitch.RtpPacketHeader
An RTP packet header.
Table of contents
Constructors
Methods
- calculateHeaderLength
- clone
- fmliveswitchRtpPacketHeaderInit
- getContributingSourceCount
- getContributingSources
- getExtension
- getHeaderExtension
- getId
- getMarker
- getPadding
- getPaddingLength
- getPayloadType
- getSequenceNumber
- getSynchronizationSource
- getTimestamp
- getTypeString
- getVersion
- setContributingSourceCount
- setContributingSources
- setHeaderExtension
- setMarker
- setPadding
- setPayloadType
- setSequenceNumber
- setSynchronizationSource
- setTimestamp
- setVersion
- writeTo
- getFixedHeaderLength
Constructors
constructor
+ new RtpPacketHeader(): RtpPacketHeader
Creates a new instance of the [[fm.liveswitch.rtpPacketHeader]] class.
Returns: RtpPacketHeader
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:51
Methods
calculateHeaderLength
▸ calculateHeaderLength(): number
Calculates the length of the header. At least 12 bytes.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:92
clone
▸ clone(): RtpPacketHeader
Clones this instance.
Returns: RtpPacketHeader
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:108
fmliveswitchRtpPacketHeaderInit
▸ Private
fmliveswitchRtpPacketHeaderInit(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:39
getContributingSourceCount
▸ getContributingSourceCount(): number
Gets the number of contributing sources.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:132
getContributingSources
▸ getContributingSources(): number[]
Gets the contributing sources.
Returns: number[]
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:144
getExtension
▸ getExtension(): boolean
Gets if there is an extension.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:156
getHeaderExtension
▸ getHeaderExtension(): IRtpHeaderExtension
Gets the header extension.
Returns: IRtpHeaderExtension
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:168
getId
▸ getId(): string
Gets the Id of the Rtp Packet Header
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:180
getMarker
▸ getMarker(): boolean
Gets if the marker bit is set.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:192
getPadding
▸ getPadding(): boolean
Gets if the packet has padding.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:204
getPaddingLength
▸ getPaddingLength(): number
Gets the number of bytes of padding.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:216
getPayloadType
▸ getPayloadType(): number
Gets the payload type.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:228
getSequenceNumber
▸ getSequenceNumber(): number
Gets the sequence number.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:240
getSynchronizationSource
▸ getSynchronizationSource(): number
Gets the synchronization source.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:252
getTimestamp
▸ getTimestamp(): number
Gets the timestamp.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:264
getTypeString
▸ getTypeString(): string
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:9
getVersion
▸ getVersion(): number
Gets the version of the packet. Should be 2.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:276
setContributingSourceCount
▸ setContributingSourceCount(value
: number): void
Sets the number of contributing sources.
Parameters:
Name | Type |
---|---|
value |
number |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:288
setContributingSources
▸ setContributingSources(value
: number[]): void
Sets the contributing sources.
Parameters:
Name | Type |
---|---|
value |
number[] |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:301
setHeaderExtension
▸ setHeaderExtension(value
: IRtpHeaderExtension): void
Sets the header extension.
Parameters:
Name | Type |
---|---|
value |
IRtpHeaderExtension |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:321
setMarker
▸ setMarker(value
: boolean): void
Sets if the marker bit is set.
Parameters:
Name | Type |
---|---|
value |
boolean |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:347
setPadding
▸ setPadding(value
: boolean): void
Sets if the packet has padding.
Parameters:
Name | Type |
---|---|
value |
boolean |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:359
setPayloadType
▸ setPayloadType(value
: number): void
Sets the payload type.
Parameters:
Name | Type |
---|---|
value |
number |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:380
setSequenceNumber
▸ setSequenceNumber(value
: number): void
Sets the sequence number.
Parameters:
Name | Type |
---|---|
value |
number |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:393
setSynchronizationSource
▸ setSynchronizationSource(value
: number): void
Sets the synchronization source.
Parameters:
Name | Type |
---|---|
value |
number |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:406
setTimestamp
▸ setTimestamp(value
: number): void
Sets the timestamp.
Parameters:
Name | Type |
---|---|
value |
number |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:419
setVersion
▸ setVersion(value
: number): void
Sets the version of the packet. Should be 2.
Parameters:
Name | Type |
---|---|
value |
number |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:432
writeTo
▸ writeTo(buffer
: DataBuffer, offset
: number): void
Writes this header to a buffer starting at the offset.
Parameters:
Name | Type | Description |
---|---|---|
buffer |
DataBuffer | The target buffer. |
offset |
number | The starting offset. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:447
getFixedHeaderLength
▸ Static
getFixedHeaderLength(): number
Gets the length of the fixed header.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/RtpPacketHeader.ts:80