Show / Hide Table of Contents

Class VideoStream

Inheritance
System.Object
MediaStream
VideoStream
Inherited Members
MediaStream._pendingPackagesLock
MediaStream._pendingPackagesBuffer
MediaStream.SecureContext
MediaStream.SrtpHandler
MediaStream.rtpChannel
MediaStream._isClosed
MediaStream.Index
MediaStream.OnTimeoutByIndex
MediaStream.OnSendReportByIndex
MediaStream.OnRtpPacketReceivedByIndex
MediaStream.OnRtpHeaderReceivedByIndex
MediaStream.OnRtpEventByIndex
MediaStream.OnReceiveReportByIndex
MediaStream.OnIsClosedStateChanged
MediaStream.AcceptRtpFromAny
MediaStream.IsClosed
MediaStream.RemoteRtpEventPayloadID
MediaStream.MediaType
MediaStream.LocalTrack
MediaStream.RemoteTrack
MediaStream.RtcpSession
MediaStream.DestinationEndPoint
MediaStream.ControlDestinationEndPoint
MediaStream.DefaultRTPEventFormat
MediaStream.AddBuffer(TimeSpan)
MediaStream.RemoveBuffer(TimeSpan)
MediaStream.UseBuffer()
MediaStream.GetBuffer()
MediaStream.SetSecurityContext(ProtectRtpPacket, ProtectRtpPacket, ProtectRtpPacket, ProtectRtpPacket)
MediaStream.GetSecurityContext()
MediaStream.IsSecurityContextReady()
MediaStream.EnsureBufferUnprotected(Byte[], RTPHeader, RTPPacket)
MediaStream.GetOrCreateSrtpHandler()
MediaStream.AddRtpChannel(RTPChannel)
MediaStream.HasRtpChannel()
MediaStream.GetRTPChannel()
MediaStream.CheckIfCanSendRtpRaw()
MediaStream.SendRtpRaw(Byte[], UInt32, Int32, Int32, Boolean, Nullable<UInt16>)
MediaStream.SetRtpHeaderExtensionValue(String, Object)
MediaStream.SendRtpRaw(Byte[], UInt32, Int32, Int32, UInt16)
MediaStream.SendRtpRaw(Byte[], UInt32, Int32, Int32)
MediaStream.SendRtcpRaw(Byte[])
MediaStream.SendRtcpReport(RTCPCompoundPacket)
MediaStream.SendRtcpFeedback(RTCPFeedback)
MediaStream.OnReceiveRTPPacket(RTPHeader, Int32, IPEndPoint, Byte[], VideoStream)
MediaStream.RaiseOnReceiveReportByIndex(IPEndPoint, RTCPCompoundPacket)
MediaStream.RaiseOnRtpEventByIndex(IPEndPoint, RTPEvent, RTPHeader)
MediaStream.RaiseOnRtpPacketReceivedByIndex(IPEndPoint, RTPPacket)
MediaStream.DispatchPendingPackages()
MediaStream.ClearPendingPackages()
MediaStream.AddPendingPackage(RTPHeader, Int32, IPEndPoint, Byte[], VideoStream)
MediaStream.LogIfWrongSeqNumber(String, RTPHeader, MediaStreamTrack)
MediaStream.AdjustRemoteEndPoint(UInt32, IPEndPoint)
MediaStream.CreateRtcpSession()
MediaStream.SetDestination(IPEndPoint, IPEndPoint)
MediaStream.GetSendingFormat()
MediaStream.ProcessHeaderExtensions(RTPHeader, IPEndPoint)
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.net.RTP
Assembly: SIPSorcery.dll
Syntax
public class VideoStream : MediaStream

Constructors

| Improve this Doc View Source

VideoStream(RtpSessionConfig, Int32)

Declaration
public VideoStream(RtpSessionConfig config, int index)
Parameters
Type Name Description
RtpSessionConfig config
System.Int32 index

Fields

| Improve this Doc View Source

logger

Declaration
protected static ILogger logger
Field Value
Type Description
Microsoft.Extensions.Logging.ILogger
| Improve this Doc View Source

RtpVideoFramer

Declaration
protected RtpVideoFramer RtpVideoFramer
Field Value
Type Description
RtpVideoFramer

Properties

| Improve this Doc View Source

HasVideo

Indicates whether this session is using video.

Declaration
public bool HasVideo { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

MaxReconstructedVideoFrameSize

Indicates the maximum frame size that can be reconstructed from RTP packets during the depacketisation process.

Declaration
public int MaxReconstructedVideoFrameSize { get; set; }
Property Value
Type Description
System.Int32

Methods

| Improve this Doc View Source

CheckVideoFormatsNegotiation()

Declaration
public void CheckVideoFormatsNegotiation()
| Improve this Doc View Source

ProcessVideoRtpFrame(IPEndPoint, RTPPacket, SDPAudioVideoMediaFormat)

Declaration
public void ProcessVideoRtpFrame(IPEndPoint endpoint, RTPPacket packet, SDPAudioVideoMediaFormat format)
Parameters
Type Name Description
System.Net.IPEndPoint endpoint
RTPPacket packet
SDPAudioVideoMediaFormat format
| Improve this Doc View Source

SendH264Frame(UInt32, Int32, Byte[])

Sends a H264 frame, represented by an Access Unit, to the remote party.

Declaration
public void SendH264Frame(uint duration, int payloadTypeID, byte[] accessUnit)
Parameters
Type Name Description
System.UInt32 duration

The duration in timestamp units of the payload (e.g. 3000 for 30fps).

System.Int32 payloadTypeID

The payload type ID being used for H264 and that will be set on the RTP header.

System.Byte[] accessUnit

The encoded H264 access unit to transmit. An access unit can contain one or more NAL's.

Remarks

An Access Unit can contain one or more NAL's. The NAL's have to be parsed in order to be able to package in RTP packets.

See https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-H.264-201602-S!!PDF-E&type=items Annex B for byte stream specification.

| Improve this Doc View Source

SendJpegFrame(UInt32, Int32, Byte[], Int32, Int32, Int32)

Helper method to send a low quality JPEG image over RTP. This method supports a very abbreviated version of RFC 2435 "RTP Payload Format for JPEG-compressed Video". It's intended as a quick convenient way to send something like a test pattern image over an RTSP connection. More than likely it won't be suitable when a high quality image is required since the header used in this method does not support quantization tables.

Declaration
public void SendJpegFrame(uint duration, int payloadTypeID, byte[] jpegBytes, int jpegQuality, int jpegWidth, int jpegHeight)
Parameters
Type Name Description
System.UInt32 duration

The duration in timestamp units of the payload (e.g. 3000 for 30fps).

System.Int32 payloadTypeID
System.Byte[] jpegBytes

The raw encoded bytes of the JPEG image to transmit.

System.Int32 jpegQuality

The encoder quality of the JPEG image.

System.Int32 jpegWidth

The width of the JPEG image.

System.Int32 jpegHeight

The height of the JPEG image.

| Improve this Doc View Source

SendVideo(UInt32, Byte[])

Sends a video sample to the remote peer.

Declaration
public void SendVideo(uint durationRtpUnits, byte[] sample)
Parameters
Type Name Description
System.UInt32 durationRtpUnits

The duration in RTP timestamp units of the video sample. This value is added to the previous RTP timestamp when building the RTP header.

System.Byte[] sample

The video sample to set as the RTP packet payload.

| Improve this Doc View Source

SendVp8Frame(UInt32, Int32, Byte[])

Sends a VP8 frame as one or more RTP packets.

Declaration
public void SendVp8Frame(uint duration, int payloadTypeID, byte[] buffer)
Parameters
Type Name Description
System.UInt32 duration

The duration in timestamp units of the payload. Needs to be based on a 90Khz clock.

System.Int32 payloadTypeID

The payload ID to place in the RTP header.

System.Byte[] buffer

The VP8 encoded payload.

Events

| Improve this Doc View Source

OnVideoFormatsNegotiatedByIndex

Gets fired when the remote SDP is received and the set of common video formats is set.

Declaration
public event Action<int, List<VideoFormat>> OnVideoFormatsNegotiatedByIndex
Event Type
Type Description
System.Action<System.Int32, System.Collections.Generic.List<SIPSorceryMedia.Abstractions.VideoFormat>>
| Improve this Doc View Source

OnVideoFrameReceivedByIndex

Gets fired when a full video frame is reconstructed from one or more RTP packets received from the remote party.

Declaration
public event Action<int, IPEndPoint, uint, byte[], VideoFormat> OnVideoFrameReceivedByIndex
Event Type
Type Description
System.Action<System.Int32, System.Net.IPEndPoint, System.UInt32, System.Byte[], SIPSorceryMedia.Abstractions.VideoFormat>
Remarks
  • Received from end point,
  • The frame timestamp,
  • The encoded video frame payload.
  • The video format of the encoded frame.

Extension Methods

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