Room.GetOrCreateDecoder
public bool GetOrCreateDecoder(ulong peerId, ushort mediaId, out MediaDecoder decoder)
public bool GetOrCreateDecoder(ulong peerId, ushort mediaId, uint samplerate, bool stereo, out MediaDecoder decoder)
Get a decoder from RemotePeers by id. If the decoder is not found create a new one that will be added to the Peer
Info
Will use the default samplerate and stereo flag set by the current room
Parameters
Name | Type | Description |
---|---|---|
peerId | UInt64 | id of peer |
mediaId | UInt16 | id of output media |
decoder | MediaDecoder | output object or null |
samplerate | UInt32 | custom samplerate |
stereo | Boolean | custom stereo flag |
Returns
Type | Description |
---|---|
Boolean | true on decoder found or false |
Variants
GetOrCreateDecoder(peerId, mediaId, decoder)
public bool GetOrCreateDecoder(ulong peerId, ushort mediaId, out MediaDecoder decoder)
Get a decoder from RemotePeers by id. If the decoder is not found create a new one that will be added to the Peer
Warning
Will use the default samplerate and stereo flag set by the current room
Parameters
Name | Type | Description |
---|---|---|
peerId | UInt64 | id of peer |
mediaId | UInt16 | id of output media |
decoder | MediaDecoder | output object or null |
Returns
Type | Description |
---|---|
Boolean | true on decoder found or false |
GetOrCreateDecoder(peerId, mediaId, samplerate, stereo, decoder)
public bool GetOrCreateDecoder(ulong peerId, ushort mediaId, uint samplerate, bool stereo, out MediaDecoder decoder)
Get a decoder from RemotePeers by id. If the decoder is not found create a new one that will be added to the Peer
Parameters
Name | Type | Description |
---|---|---|
peerId | UInt64 | id of peer |
mediaId | UInt16 | id of output media |
samplerate | UInt32 | custom samplerate |
stereo | Boolean | custom stereo flag |
decoder | MediaDecoder | output object or null |
Returns
Type | Description |
---|---|
Boolean | true on decoder found or false |