C# Класс SIPSorcery.Net.RTSPSession

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

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

Свойство Тип Описание
OnDtlsReceive Action>
RtpProtect byte[]>.Func

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

Метод Описание
Close ( ) : void

Closes the session's RTP and control ports.

DateTimeToNptTimestamp ( System.DateTime value ) : ulong

Converts specified DateTime value to long NPT time.

DateTimeToNptTimestamp32 ( System.DateTime value ) : uint

Recalculates the step that should be applied to the RTP timestamp based on the frame rate of the incoming samples.

DateTimeToNptTimestamp90K ( System.DateTime value ) : uint
GetNextRTPPacket ( ) : RTPPacket
HasRTPPacket ( ) : bool
RTSPSession ( ) : System
RTSPSession ( string sessionID, IPEndPoint remoteEndPoint, IPEndPoint rtcpRemoteEndPoint ) : System
ReservePorts ( ) : void

Attempts to reserve the RTP and control ports for the RTP session.

SendH264Frame ( byte frame, int payloadType ) : void

H264 frames need a two byte header when transmitted over RTP.

SendJpegFrame ( byte jpegBytes, int jpegQuality, int jpegWidth, int jpegHeight ) : void

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.

SendRTPRaw ( byte payload ) : void

Sends a packet to the RTSP server on the RTP socket.

SendVP8Frame ( byte frame, int payloadType ) : void

Sends a dynamically sized frame. The RTP marker bit will be set for the last transmitted packet in the frame.

Start ( ) : void

Starts listenting on the RTP and control ports.

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

Метод Описание
ControlSocketReceive ( IAsyncResult ar ) : void
CreateLowQualityRtpJpegHeader ( uint fragmentOffset, int quality, int width, int height ) : byte[]

Utility function to create RtpJpegHeader either for initial packet or template for further packets 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type-specific | Fragment Offset | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Q | Width | Height | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

RTPReceive ( ) : void
SendRtcpCallback ( IAsyncResult ar ) : void
SendRtcpSenderReport ( ulong ntpTimestamp, uint rtpTimestamp ) : void
SendRtpCallback ( IAsyncResult ar ) : void

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

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

Closes the session's RTP and control ports.
public Close ( ) : void
Результат void

DateTimeToNptTimestamp() публичный статический Метод

Converts specified DateTime value to long NPT time.
public static DateTimeToNptTimestamp ( System.DateTime value ) : ulong
value System.DateTime DateTime value to convert. This value must be in local time.
Результат ulong

DateTimeToNptTimestamp32() публичный статический Метод

Recalculates the step that should be applied to the RTP timestamp based on the frame rate of the incoming samples.
public static DateTimeToNptTimestamp32 ( System.DateTime value ) : uint
value System.DateTime
Результат uint

DateTimeToNptTimestamp90K() публичный статический Метод

public static DateTimeToNptTimestamp90K ( System.DateTime value ) : uint
value System.DateTime
Результат uint

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

public GetNextRTPPacket ( ) : RTPPacket
Результат RTPPacket

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

public HasRTPPacket ( ) : bool
Результат bool

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

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

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

public RTSPSession ( string sessionID, IPEndPoint remoteEndPoint, IPEndPoint rtcpRemoteEndPoint ) : System
sessionID string
remoteEndPoint System.Net.IPEndPoint
rtcpRemoteEndPoint System.Net.IPEndPoint
Результат System

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

Attempts to reserve the RTP and control ports for the RTP session.
public ReservePorts ( ) : void
Результат void

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

H264 frames need a two byte header when transmitted over RTP.
public SendH264Frame ( byte frame, int payloadType ) : void
frame byte The H264 encoded frame to transmit.
payloadType int The payload type to set on the RTP packet.
Результат void

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

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.
public SendJpegFrame ( byte jpegBytes, int jpegQuality, int jpegWidth, int jpegHeight ) : void
jpegBytes byte The raw encoded bytes of the JPEG image to transmit.
jpegQuality int The encoder quality of the JPEG image.
jpegWidth int The width of the JPEG image.
jpegHeight int The height of the JPEG image.
Результат void

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

Sends a packet to the RTSP server on the RTP socket.
public SendRTPRaw ( byte payload ) : void
payload byte
Результат void

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

Sends a dynamically sized frame. The RTP marker bit will be set for the last transmitted packet in the frame.
public SendVP8Frame ( byte frame, int payloadType ) : void
frame byte The frame to transmit.
payloadType int The payload type to set on the RTP packet.
Результат void

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

Starts listenting on the RTP and control ports.
public Start ( ) : void
Результат void

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

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

public Action> OnDtlsReceive
Результат Action>

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

public Func RtpProtect
Результат byte[]>.Func