Photon Voice
v2.7
|
Typed re-framing LocalVoice More...
Inherits LocalVoiceFramedBase.
Inherited by LocalVoiceAudio< T >.
Public Member Functions | |
void | AddPostProcessor (params IProcessor< T >[] processors) |
Adds processors after any built-in processors and everything added with AddPreProcessor. More... | |
void | AddPreProcessor (params IProcessor< T >[] processors) |
Adds processors before built-in processors and everything added with AddPostProcessor. More... | |
void | ClearProcessors () |
Clears all processors in pipeline including built-in resampling. User should add at least resampler processor after call. More... | |
void | PushDataAsync (T[] buf) |
Asynchronously push data into this stream. More... | |
void | PushData (T[] buf) |
Synchronously push data into this stream. More... | |
override void | Dispose () |
Releases resources used by the VoiceFramed instance. Buffers used for asynchronous push will be disposed in encoder thread's 'finally'. More... | |
Public Member Functions inherited from LocalVoice | |
virtual IEncoder | CreateDefaultEncoder (VoiceInfo info) |
void | RemoveSelf () |
Remove this voice from it's VoiceClient (using VoiceClient.RemoveLocalVoice More... | |
Properties | |
FactoryPrimitiveArrayPool< T > | BufferFactory [get] |
bool | PushDataAsyncReady [get] |
Wether this LocalVoiceFramed has capacity for more data buffers to be pushed asynchronously. More... | |
Properties inherited from LocalVoiceFramedBase | |
int | FrameSize [get] |
Data flow will be repacked to frames of this size. May differ from input voiceInfo.FrameSize. Processors should resample in this case. More... | |
Properties inherited from LocalVoice | |
byte | Group [get, set] |
byte | InterestGroup [get, set] |
If InterestGroup != 0, voice's data is sent only to clients listening to this group (if supported by transport). More... | |
VoiceInfo | Info [get] |
Returns Info structure assigned on local voice cration. More... | |
bool | TransmitEnabled [get, set] |
If true, stream data broadcasted. More... | |
bool | IsCurrentlyTransmitting [get, protected set] |
Returns true if stream broadcasts. More... | |
int | FramesSent [get] |
Sent frames counter. More... | |
int | FramesSentBytes [get] |
Sent frames bytes counter. More... | |
bool | Reliable [get, set] |
Send data reliable. More... | |
bool | Encrypt [get, set] |
Send data encrypted. More... | |
IServiceable | LocalUserServiceable [get, set] |
Optional user object attached to LocalVoice. its Service() will be called at each VoiceClient.Service() call. More... | |
bool | DebugEchoMode [get, set] |
If true, outgoing stream routed back to client via server same way as for remote client's streams. Can be swithed any time. OnRemoteVoiceInfoAction and OnRemoteVoiceRemoveAction are triggered if required. This functionality availability depends on transport. More... | |
Additional Inherited Members | |
Public Attributes inherited from LocalVoice | |
const int | DATA_POOL_CAPACITY = 50 |
Protected Member Functions inherited from LocalVoice | |
void | resetNoTransmitCnt () |
Protected Attributes inherited from LocalVoice | |
IEncoder | encoder |
VoiceClient | voiceClient |
volatile bool | disposed |
object | disposeLock = new object() |
Detailed Description
Typed re-framing LocalVoice
Consumes data in array buffers of arbitrary length. Repacks them in frames of constant length for further processing and encoding.
- Parameters
-
voiceInfo Outgoing stream parameters. Set applicable fields to read them by encoder and by receiving client when voice created. channelId Transport channel specific to transport. encoder Encoder producing the stream.
- Returns
- Outgoing stream handler.
Member Function Documentation
void AddPostProcessor | ( | params IProcessor< T >[] | processors | ) |
Adds processors after any built-in processors and everything added with AddPreProcessor.
- Parameters
-
processors
void AddPreProcessor | ( | params IProcessor< T >[] | processors | ) |
Adds processors before built-in processors and everything added with AddPostProcessor.
- Parameters
-
processors
void ClearProcessors | ( | ) |
Clears all processors in pipeline including built-in resampling. User should add at least resampler processor after call.
|
virtual |
Releases resources used by the VoiceFramed instance. Buffers used for asynchronous push will be disposed in encoder thread's 'finally'.
Reimplemented from LocalVoice.
void PushData | ( | T[] | buf | ) |
Synchronously push data into this stream.
void PushDataAsync | ( | T[] | buf | ) |
Asynchronously push data into this stream.
Property Documentation
|
get |
Wether this LocalVoiceFramed has capacity for more data buffers to be pushed asynchronously.