C# Класс SIPSorcery.SoftPhone.AudioChannel

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
SupportedAudioTypes List

Открытые методы

Метод Описание
AudioChannel ( ) : System
AudioSampleReceived ( byte sample, int offset ) : void

Event handler for receiving an RTP packet containing and audio payload from the remote end of the VoIP call.

Close ( ) : void

Called when the audo channel is no longer required, such as when the VoIP call using it has terminated, and all resources can be shutdown and closed.

GetMediaAnnouncement ( ) : SDPMediaAnnouncement

Gets the media announcement to include in the SDP payload for a call.

GetSDP ( bool usePublicIP ) : SDP

Gets an SDP packet that can be used by VoIP clients to negotiate an audio connection. The SDP will only offer PCMU since that's all I've gotten around to handling.

SetRemoteRTPEndPoint ( IPEndPoint remoteEndPoint ) : void

Allows an arbitrary block of bytes to be sent on the RTP channel. This is mainly used for the Gingle client which needs to send a STUN binding request to the Google Voice gateway.

Sets the remote end point for the RTP channel. This will be set from the SDP packet received from the remote end of the VoIP call.

StartRecording ( ) : void

Приватные методы

Метод Описание
AudioSampleAvailable ( object sender, NAudio.Wave.WaveInEventArgs e ) : void

Event handler for receiving an audio sample that is ready for encoding, packaging into RTP and sending to the remote end of the VoIP call.

RTPChannelSampleAvailable ( object sender, NAudio.Wave.WaveInEventArgs e ) : void

Event handler for receiving an audio sample that is ready for encoding, packaging into RTP and sending to the remote end of the VoIP call.

RTPChannelSampleReceived ( RTPFrame rtpFrame ) : void

Event handler for receiving an RTP frmae from the remote end of the VoIP call.

Описание методов

AudioChannel() публичный Метод

public AudioChannel ( ) : System
Результат System

AudioSampleReceived() публичный Метод

Event handler for receiving an RTP packet containing and audio payload from the remote end of the VoIP call.
public AudioSampleReceived ( byte sample, int offset ) : void
sample byte The audio sample.
offset int The offset in the sample that the audio starts.
Результат void

Close() публичный Метод

Called when the audo channel is no longer required, such as when the VoIP call using it has terminated, and all resources can be shutdown and closed.
public Close ( ) : void
Результат void

GetMediaAnnouncement() публичный Метод

Gets the media announcement to include in the SDP payload for a call.
public GetMediaAnnouncement ( ) : SDPMediaAnnouncement
Результат SIPSorcery.Net.SDPMediaAnnouncement

GetSDP() публичный Метод

Gets an SDP packet that can be used by VoIP clients to negotiate an audio connection. The SDP will only offer PCMU since that's all I've gotten around to handling.
public GetSDP ( bool usePublicIP ) : SDP
usePublicIP bool If true and the public IP address is available from the STUN client then /// the public IP address will be used in the SDP otherwise the hsot machine's default IPv4 address will /// be used.
Результат SIPSorcery.Net.SDP

SetRemoteRTPEndPoint() публичный Метод

Allows an arbitrary block of bytes to be sent on the RTP channel. This is mainly used for the Gingle client which needs to send a STUN binding request to the Google Voice gateway. Sets the remote end point for the RTP channel. This will be set from the SDP packet received from the remote end of the VoIP call.
public SetRemoteRTPEndPoint ( IPEndPoint remoteEndPoint ) : void
remoteEndPoint System.Net.IPEndPoint The remote end point to send RTP to.
Результат void

StartRecording() публичный Метод

public StartRecording ( ) : void
Результат void

Описание свойств

SupportedAudioTypes публичное свойство

public List SupportedAudioTypes
Результат List