Show / Hide Table of Contents

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
RTPSession
VoIPMediaSession
Implements
IMediaSession
System.IDisposable
Inherited Members
RTPSession.RTP_MAX_PAYLOAD
RTPSession.SRTP_MAX_PREFIX_LENGTH
RTPSession.DEFAULT_AUDIO_CLOCK_RATE
RTPSession.RTP_EVENT_DEFAULT_SAMPLE_PERIOD_MS
RTPSession.DEFAULT_MEDIA_TYPE
RTPSession.DEFAULT_DTMF_EVENT_PAYLOAD_ID
RTPSession.RTP_MEDIA_PROFILE
RTPSession.RTP_SECUREMEDIA_PROFILE
RTPSession.SDP_SESSIONID_LENGTH
RTPSession.DTMF_EVENT_DURATION
RTPSession.DTMF_EVENT_PAYLOAD_ID
RTPSession.RTCP_RR_NOSTREAM_SSRC
RTPSession.logger
RTPSession.rtpSessionConfig
RTPSession.m_primaryStream
RTPSession.MultiplexRtpChannel
RTPSession.audioRemoteSDPSsrcAttributes
RTPSession.videoRemoteSDPSsrcAttributes
RTPSession.RequireRenegotiation
RTPSession.PrimaryStream
RTPSession.AudioStream
RTPSession.VideoStream
RTPSession.AudioLocalTrack
RTPSession.AudioRemoteTrack
RTPSession.AudioRtcpSession
RTPSession.AudioDestinationEndPoint
RTPSession.AudioControlDestinationEndPoint
RTPSession.VideoLocalTrack
RTPSession.VideoRemoteTrack
RTPSession.VideoRtcpSession
RTPSession.VideoDestinationEndPoint
RTPSession.VideoControlDestinationEndPoint
RTPSession.AudioStreamList
RTPSession.VideoStreamList
RTPSession.RemoteDescription
RTPSession.IsSecureContextReady()
RTPSession.SrtpCryptoSuites
RTPSession.MaxReconstructedVideoFrameSize
RTPSession.IsClosed
RTPSession.IsStarted
RTPSession.HasAudio
RTPSession.HasVideo
RTPSession.AcceptRtpFromAny
RTPSession.RtpBindAddress
RTPSession.OnAudioFormatsNegotiated
RTPSession.OnAudioFormatsNegotiatedByIndex
RTPSession.OnVideoFormatsNegotiated
RTPSession.OnVideoFormatsNegotiatedByIndex
RTPSession.OnVideoFrameReceived
RTPSession.OnVideoFrameReceivedByIndex
RTPSession.OnRtpPacketReceived
RTPSession.OnRtpPacketReceivedByIndex
RTPSession.OnRtpHeaderReceived
RTPSession.OnRtpHeaderReceivedByIndex
RTPSession.OnRtpEvent
RTPSession.OnRtpEventByIndex
RTPSession.OnRtpClosed
RTPSession.OnRtcpBye
RTPSession.OnTimeout
RTPSession.OnTimeoutByIndex
RTPSession.OnReceiveReport
RTPSession.OnReceiveReportByIndex
RTPSession.OnSendReport
RTPSession.OnSendReportByIndex
RTPSession.OnStarted
RTPSession.OnClosed
RTPSession.ResetRemoteSDPSsrcAttributes()
RTPSession.AddRemoteSDPSsrcAttributes(SDPMediaTypesEnum, List<SDPSsrcAttribute>)
RTPSession.LogRemoteSDPSsrcAttributes()
RTPSession.CreateOffer(IPAddress)
RTPSession.CreateAnswer(IPAddress)
RTPSession.GetOrCreateAudioStream(Int32)
RTPSession.GetOrCreateVideoStream(Int32)
RTPSession.SetRemoteDescription(SdpType, SDP)
RTPSession.SetMediaStreamStatus(SDPMediaTypesEnum, MediaStreamStatusEnum)
RTPSession.addSingleTrack(Boolean)
RTPSession.addTrack(MediaStreamTrack)
RTPSession.removeTrack(MediaStreamTrack)
RTPSession.SetGlobalDestination(IPEndPoint, IPEndPoint)
RTPSession.SetGlobalSecurityContext(ProtectRtpPacket, ProtectRtpPacket, ProtectRtpPacket, ProtectRtpPacket)
RTPSession.GetNextAudioStreamByLocalTrack()
RTPSession.GetNextVideoStreamByLocalTrack()
RTPSession.CreateRtpChannel()
RTPSession.GetMediaStreams()
RTPSession.SendAudio(UInt32, Byte[])
RTPSession.SendVideo(UInt32, Byte[])
RTPSession.SendDtmf(Byte, CancellationToken)
RTPSession.SendDtmfEvent(RTPEvent, CancellationToken, Int32, Int32)
RTPSession.OnReceive(Int32, IPEndPoint, Byte[])
RTPSession.SendRtpRaw(SDPMediaTypesEnum, Byte[], UInt32, Int32, Int32, UInt16)
RTPSession.SendRtpRaw(SDPMediaTypesEnum, Byte[], UInt32, Int32, Int32)
RTPSession.SendRtcpRaw(SDPMediaTypesEnum, Byte[])
RTPSession.SetDestination(SDPMediaTypesEnum, IPEndPoint, IPEndPoint)
RTPSession.SendRtcpFeedback(SDPMediaTypesEnum, RTCPFeedback)
RTPSession.SendRtcpReport(SDPMediaTypesEnum, RTCPCompoundPacket)
RTPSession.Dispose(Boolean)
RTPSession.Dispose()
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()
Namespace: SIPSorcery.Media
Assembly: SIPSorcery.dll
Syntax
public class VoIPMediaSession : RTPSession, IMediaSession, IDisposable

Constructors

| Improve this Doc View Source

VoIPMediaSession(VoIPMediaSessionConfig)

Declaration
public VoIPMediaSession(VoIPMediaSessionConfig config)
Parameters
Type Name Description
VoIPMediaSessionConfig config
| Improve this Doc View Source

VoIPMediaSession(MediaEndPoints, VideoTestPatternSource)

Declaration
public VoIPMediaSession(MediaEndPoints mediaEndPoint, VideoTestPatternSource testPatternSource)
Parameters
Type Name Description
SIPSorceryMedia.Abstractions.MediaEndPoints mediaEndPoint
VideoTestPatternSource testPatternSource
| Improve this Doc View Source

VoIPMediaSession(MediaEndPoints, IPAddress, Int32, VideoTestPatternSource)

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

VoIPMediaSession(Func<AudioFormat, Boolean>)

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

AudioExtrasSource

Declaration
public AudioExtrasSource AudioExtrasSource { get; }
Property Value
Type Description
AudioExtrasSource
| Improve this Doc View Source

Media

Declaration
public MediaEndPoints Media { get; }
Property Value
Type Description
SIPSorceryMedia.Abstractions.MediaEndPoints
| Improve this Doc View Source

TestPatternSource

Declaration
public VideoTestPatternSource TestPatternSource { get; }
Property Value
Type Description
VideoTestPatternSource

Methods

| Improve this Doc View Source

Close(String)

Declaration
public override async void Close(string reason)
Parameters
Type Name Description
System.String reason
Overrides
RTPSession.Close(String)
| Improve this Doc View Source

PutOnHold()

Declaration
public async Task PutOnHold()
Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

RtpMediaPacketReceived(IPEndPoint, SDPMediaTypesEnum, RTPPacket)

Declaration
protected void RtpMediaPacketReceived(IPEndPoint remoteEndPoint, SDPMediaTypesEnum mediaType, RTPPacket rtpPacket)
Parameters
Type Name Description
System.Net.IPEndPoint remoteEndPoint
SDPMediaTypesEnum mediaType
RTPPacket rtpPacket
| Improve this Doc View Source

Start()

Declaration
public override async Task Start()
Returns
Type Description
System.Threading.Tasks.Task
Overrides
RTPSession.Start()
| Improve this Doc View Source

TakeOffHold()

Declaration
public async void TakeOffHold()

Events

| Improve this Doc View Source

OnVideoSinkSample

Declaration
public event VideoSinkSampleDecodedDelegate OnVideoSinkSample
Event Type
Type Description
SIPSorceryMedia.Abstractions.VideoSinkSampleDecodedDelegate

Implements

IMediaSession
System.IDisposable

Extension Methods

JSONWriter.ToJson(Object)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX