Class PeerEntity
Client/Remote peer
Implements:
OdinNative.Wrapper.IPeer, System.IDisposable
Properties
Id
Peer id
UserId
Peers user id
UserData
Peer userdata
Medias
Peer output medias
Parent
Default value null indicates root or not set
Tags
Peer tags
AudioParameters
VideoParameters
Encoder
Decoder
Methods
GetBasePeer()
Get the underlying OdinNative.Wrapper.PeerEntity
Returns
OdinNative.Wrapper.PeerEntity: native wrapper peer
GetRoomApi()
Get the base Room object
Returns
OdinNative.Wrapper.Room.Room: Room if this.Parent is set
GetDecoder(ulong, out MediaDecoder)
Get a output media by id.
Returns
System.Boolean: true on found or false
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt64 | mediaId | decoder id |
| OdinNative.Wrapper.MediaDecoder | decoder | output media |
GetOrCreateDecoder(ulong, uint, bool, out MediaDecoder)
Get a output media by id. If the decoder is not found create a new one that will be added OdinNative.Wrapper.PeerEntity.Medias
Returns
System.Boolean: true on success or false
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt64 | mediaId | decoder id |
System.UInt32 | samplerate | samplerate |
System.Boolean | stereo | stereo flag |
| OdinNative.Wrapper.MediaDecoder | decoder | output media |
CreateDecoder(uint, bool)
Create a new output media that will be added to OdinNative.Wrapper.PeerEntity.Medias
Returns
OdinNative.Wrapper.MediaDecoder: output media
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt32 | samplerate | samplerate |
System.Boolean | stereo | stereo flag |
RemoveDecoder(ulong, out MediaDecoder)
Remove the output media from OdinNative.Wrapper.PeerEntity.Medias
Returns
System.Boolean: true if removed or false
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt64 | mediaId | decoder id |
| OdinNative.Wrapper.MediaDecoder | decoder | output media that was removed |
ToString()
Debug
Returns
System.String: info
Dispose(bool)
Free peer with all associated medias
Parameters
| Type | Name |
|---|---|
System.Boolean | disposing |
~PeerEntity()
Finalizer
Dispose()
Free peer with all associated medias
Implements
- OdinNative.Wrapper.IPeer
System.IDisposable