C# Class SharpTox.Av.ToxAv

Represents an instance of toxav.
Inheritance: IDisposable
Datei anzeigen Open project: hexafluoride/Detox Class Usage Examples

Public Properties

Property Type Description
DefaultCodecSettings SharpTox.Av.ToxAvCodecSettings

Public Methods

Method Description
AddAvGroupchat ( ) : int

Creates a new audio groupchat.

Answer ( int callIndex, SharpTox.Av.ToxAvCodecSettings settings ) : ToxAvError

Answers a call.

Call ( int friendNumber, SharpTox.Av.ToxAvCodecSettings settings, int ringingSeconds, int &callIndex ) : ToxAvError

Creates a new call.

Cancel ( int callIndex, int friendNumber, string reason ) : ToxAvError

Cancels a call.

CapabilitySupported ( int callIndex, ToxAvCapabilities capability ) : bool

Checks whether a certain capability is supported.

ChangeSettings ( int callIndex, SharpTox.Av.ToxAvCodecSettings settings ) : ToxAvError

Changes the type of an in-progress call

Dispose ( ) : void

Releases all resources used by this instance of tox.

GetCallState ( int callIndex ) : ToxAvCallState

Retrieves the state of a call.

GetPeerCodecSettings ( int callIndex, int peer ) : SharpTox.Av.ToxAvCodecSettings

Retrieves a peer's codec settings.

GetPeerID ( int callIndex, int peer ) : int

Get the friend_number of peer participating in conversation

GroupSendAudio ( int groupNumber, short pcm, int perframe, int channels, int sampleRate ) : bool

Sends an audio frame to a group.

Hangup ( int callIndex ) : ToxAvError

Hangs up an in-progress call.

Iterate ( ) : int

Runs the loop once in the current thread and returns the next timeout.

JoinAvGroupchat ( int friendNumber, byte data ) : int

Joins an audio groupchat.

KillTransmission ( int callIndex ) : ToxAvError

Kills the transmission of a call. Should be called at the end of the transmission.

PrepareAudioFrame ( int callIndex, byte dest, int destMax, short frames, int perframe ) : int

Encodes an audio frame.

PrepareTransmission ( int callIndex, bool supportVideo ) : ToxAvError

Prepares transmission. Must be called before any transmission occurs.

PrepareVideoFrame ( int callIndex, byte dest, IntPtr img ) : int
Reject ( int callIndex, string reason ) : ToxAvError

Rejects an incoming call.

SendAudio ( int callIndex, byte frame, int frameSize ) : ToxAvError

Sends an encoded audio frame.

SendVideo ( int callIndex, byte frame ) : ToxAvError
Start ( ) : void

Starts the main toxav_do loop.

Stop ( ) : void

Stops the main toxav_do loop if it's running.

StopCall ( int callIndex ) : ToxAvError

Stops a call and terminates the transmission without notifying the remote peer.

ToxAv ( Tox tox, int maxCalls ) : System

Initialises a new instance of toxav.

ToxAv ( ToxHandle tox, int maxCalls ) : System

Initialises a new instance of toxav.

Private Methods

Method Description
ClearEventSubscriptions ( ) : void
Dispose ( bool disposing ) : void
DoIterate ( ) : int
Kill ( ) : void
Loop ( ) : void
ThrowIfDisposed ( ) : void

Method Details

AddAvGroupchat() public method

Creates a new audio groupchat.
public AddAvGroupchat ( ) : int
return int

Answer() public method

Answers a call.
public Answer ( int callIndex, SharpTox.Av.ToxAvCodecSettings settings ) : ToxAvError
callIndex int
settings SharpTox.Av.ToxAvCodecSettings
return ToxAvError

Call() public method

Creates a new call.
public Call ( int friendNumber, SharpTox.Av.ToxAvCodecSettings settings, int ringingSeconds, int &callIndex ) : ToxAvError
friendNumber int
settings SharpTox.Av.ToxAvCodecSettings
ringingSeconds int
callIndex int
return ToxAvError

Cancel() public method

Cancels a call.
public Cancel ( int callIndex, int friendNumber, string reason ) : ToxAvError
callIndex int
friendNumber int
reason string
return ToxAvError

CapabilitySupported() public method

Checks whether a certain capability is supported.
public CapabilitySupported ( int callIndex, ToxAvCapabilities capability ) : bool
callIndex int
capability ToxAvCapabilities
return bool

ChangeSettings() public method

Changes the type of an in-progress call
public ChangeSettings ( int callIndex, SharpTox.Av.ToxAvCodecSettings settings ) : ToxAvError
callIndex int
settings SharpTox.Av.ToxAvCodecSettings
return ToxAvError

Dispose() public method

Releases all resources used by this instance of tox.
public Dispose ( ) : void
return void

GetCallState() public method

Retrieves the state of a call.
public GetCallState ( int callIndex ) : ToxAvCallState
callIndex int
return ToxAvCallState

GetPeerCodecSettings() public method

Retrieves a peer's codec settings.
public GetPeerCodecSettings ( int callIndex, int peer ) : SharpTox.Av.ToxAvCodecSettings
callIndex int
peer int
return SharpTox.Av.ToxAvCodecSettings

GetPeerID() public method

Get the friend_number of peer participating in conversation
public GetPeerID ( int callIndex, int peer ) : int
callIndex int
peer int
return int

GroupSendAudio() public method

Sends an audio frame to a group.
public GroupSendAudio ( int groupNumber, short pcm, int perframe, int channels, int sampleRate ) : bool
groupNumber int
pcm short
perframe int
channels int
sampleRate int
return bool

Hangup() public method

Hangs up an in-progress call.
public Hangup ( int callIndex ) : ToxAvError
callIndex int
return ToxAvError

Iterate() public method

Runs the loop once in the current thread and returns the next timeout.
public Iterate ( ) : int
return int

JoinAvGroupchat() public method

Joins an audio groupchat.
public JoinAvGroupchat ( int friendNumber, byte data ) : int
friendNumber int
data byte
return int

KillTransmission() public method

Kills the transmission of a call. Should be called at the end of the transmission.
public KillTransmission ( int callIndex ) : ToxAvError
callIndex int
return ToxAvError

PrepareAudioFrame() public method

Encodes an audio frame.
public PrepareAudioFrame ( int callIndex, byte dest, int destMax, short frames, int perframe ) : int
callIndex int
dest byte
destMax int
frames short
perframe int
return int

PrepareTransmission() public method

Prepares transmission. Must be called before any transmission occurs.
public PrepareTransmission ( int callIndex, bool supportVideo ) : ToxAvError
callIndex int
supportVideo bool
return ToxAvError

PrepareVideoFrame() public method

public PrepareVideoFrame ( int callIndex, byte dest, IntPtr img ) : int
callIndex int
dest byte
img System.IntPtr
return int

Reject() public method

Rejects an incoming call.
public Reject ( int callIndex, string reason ) : ToxAvError
callIndex int
reason string
return ToxAvError

SendAudio() public method

Sends an encoded audio frame.
public SendAudio ( int callIndex, byte frame, int frameSize ) : ToxAvError
callIndex int
frame byte
frameSize int
return ToxAvError

SendVideo() public method

public SendVideo ( int callIndex, byte frame ) : ToxAvError
callIndex int
frame byte
return ToxAvError

Start() public method

Starts the main toxav_do loop.
public Start ( ) : void
return void

Stop() public method

Stops the main toxav_do loop if it's running.
public Stop ( ) : void
return void

StopCall() public method

Stops a call and terminates the transmission without notifying the remote peer.
public StopCall ( int callIndex ) : ToxAvError
callIndex int
return ToxAvError

ToxAv() public method

Initialises a new instance of toxav.
public ToxAv ( Tox tox, int maxCalls ) : System
tox SharpTox.Core.Tox
maxCalls int
return System

ToxAv() public method

Initialises a new instance of toxav.
public ToxAv ( ToxHandle tox, int maxCalls ) : System
tox SharpTox.Core.ToxHandle
maxCalls int
return System

Property Details

DefaultCodecSettings public_oe static_oe property

The default codec settings.
public static ToxAvCodecSettings,SharpTox.Av DefaultCodecSettings
return SharpTox.Av.ToxAvCodecSettings