Class VoIPMediaSession
This class serves as a bridge, or mapping, between the media end points, typically
provided by a separate package, and a media session. Its goal is to wire up the
sources and sinks from the media end point to the transport functions provided
by an RTP session.
For audio end points it will also attempt to encode and decode formats that the
inbuilt C# encoder class understands. The encoder can be turned off if an
application wishes to do its own audio encoding.
For video end points there are no C# encoders available so the application must
always co-ordinate the encoding and decoding of samples sent to and received from
the RTP transport.
Inheritance
System.Object
VoIPMediaSession
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: SIPSorcery.dll
public class VoIPMediaSession : RTPSession, IMediaSession, IDisposable
Constructors
|
Improve this Doc
View Source
Declaration
public VoIPMediaSession(VoIPMediaSessionConfig config)
Parameters
|
Improve this Doc
View Source
Declaration
public VoIPMediaSession(MediaEndPoints mediaEndPoint, VideoTestPatternSource testPatternSource)
Parameters
Type |
Name |
Description |
SIPSorceryMedia.Abstractions.MediaEndPoints |
mediaEndPoint |
|
VideoTestPatternSource |
testPatternSource |
|
|
Improve this Doc
View Source
Declaration
public VoIPMediaSession(MediaEndPoints mediaEndPoint, IPAddress bindAddress = null, int bindPort = 0, VideoTestPatternSource testPatternSource = null)
Parameters
Type |
Name |
Description |
SIPSorceryMedia.Abstractions.MediaEndPoints |
mediaEndPoint |
|
System.Net.IPAddress |
bindAddress |
|
System.Int32 |
bindPort |
|
VideoTestPatternSource |
testPatternSource |
|
|
Improve this Doc
View Source
Default constructor which creates the simplest possible send only audio session. It does not
wire up any devices or video processing.
Declaration
public VoIPMediaSession(Func<AudioFormat, bool> restrictFormats = null)
Parameters
Type |
Name |
Description |
System.Func<SIPSorceryMedia.Abstractions.AudioFormat, System.Boolean> |
restrictFormats |
|
Properties
|
Improve this Doc
View Source
Declaration
public AudioExtrasSource AudioExtrasSource { get; }
Property Value
|
Improve this Doc
View Source
Declaration
public MediaEndPoints Media { get; }
Property Value
Type |
Description |
SIPSorceryMedia.Abstractions.MediaEndPoints |
|
|
Improve this Doc
View Source
Declaration
public VideoTestPatternSource TestPatternSource { get; }
Property Value
Methods
|
Improve this Doc
View Source
Declaration
public override async void Close(string reason)
Parameters
Type |
Name |
Description |
System.String |
reason |
|
Overrides
|
Improve this Doc
View Source
Declaration
public async Task PutOnHold()
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
|
Improve this Doc
View Source
Declaration
protected void RtpMediaPacketReceived(IPEndPoint remoteEndPoint, SDPMediaTypesEnum mediaType, RTPPacket rtpPacket)
Parameters
|
Improve this Doc
View Source
Declaration
public override async Task Start()
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Overrides
|
Improve this Doc
View Source
Declaration
public async void TakeOffHold()
Events
|
Improve this Doc
View Source
Declaration
public event VideoSinkSampleDecodedDelegate OnVideoSinkSample
Event Type
Type |
Description |
SIPSorceryMedia.Abstractions.VideoSinkSampleDecodedDelegate |
|
Implements
System.IDisposable
Extension Methods