C# 클래스 SIPSorcery.Net.RTPChannel

파일 보기 프로젝트 열기: sipsorcery/sipsorcery 1 사용 예제들

공개 메소드들

메소드 설명
Close ( ) : void

Closes the session's RTP and control ports.

DateTimeToNptTimestamp32 ( System.DateTime value ) : uint
RTPChannel ( ) : System
RTPChannel ( IPEndPoint remoteEndPoint ) : System
ReservePorts ( ) : void
ReservePorts ( int startPort, int endPort ) : void

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

SendAudioFrame ( byte payload, uint frameSpacing, int payloadType ) : void

Sends an audio frame where the payload size is less than the maximum RTP packet payload size.

SendH264Frame ( byte frame, uint frameSpacing, int payloadType ) : void

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

SendJpegFrame ( byte jpegBytes, int jpegQuality, int jpegWidth, int jpegHeight, int framesPerSecond ) : 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, uint frameSpacing, int payloadType ) : void

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

SetFrameType ( FrameTypesEnum frameType ) : void

Video frames use a header at the start of the RTP payload in order to break up a single video frame into multiple RTP packets. The RTP channel will need to know the type of header being used in order to determine when a full frame has been received.

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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

DateTimeToNptTimestamp ( System.DateTime value ) : ulong

Converts specified DateTime value to long NPT time.

ProcessRTPPackets ( ) : void
RTPReceive ( ) : void

메소드 상세

Close() 공개 메소드

Closes the session's RTP and control ports.
public Close ( ) : void
리턴 void

DateTimeToNptTimestamp32() 공개 정적인 메소드

public static DateTimeToNptTimestamp32 ( System.DateTime value ) : uint
value System.DateTime
리턴 uint

RTPChannel() 공개 메소드

public RTPChannel ( ) : System
리턴 System

RTPChannel() 공개 메소드

public RTPChannel ( IPEndPoint remoteEndPoint ) : System
remoteEndPoint System.Net.IPEndPoint
리턴 System

ReservePorts() 공개 메소드

public ReservePorts ( ) : void
리턴 void

ReservePorts() 공개 메소드

Attempts to reserve the RTP and control ports for the RTP session.
public ReservePorts ( int startPort, int endPort ) : void
startPort int
endPort int
리턴 void

SendAudioFrame() 공개 메소드

Sends an audio frame where the payload size is less than the maximum RTP packet payload size.
public SendAudioFrame ( byte payload, uint frameSpacing, int payloadType ) : void
payload byte The audio payload to transmit.
frameSpacing uint The increment to add to the RTP timestamp for each new frame.
payloadType int The payload type to set on the RTP packet.
리턴 void

SendH264Frame() 공개 메소드

H264 frames need a two byte header when transmitted over RTP.
public SendH264Frame ( byte frame, uint frameSpacing, int payloadType ) : void
frame byte The H264 encoded frame to transmit.
frameSpacing uint The increment to add to the RTP timestamp for each new frame.
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, int framesPerSecond ) : void
jpegBytes byte The raw encoded bytes of teh 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.
framesPerSecond int The rate at which the JPEG frames are being transmitted at. used to calculate the timestamp.
리턴 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, uint frameSpacing, int payloadType ) : void
frame byte The frame to transmit.
frameSpacing uint The increment to add to the RTP timestamp for each new frame.
payloadType int The payload type to set on the RTP packet.
리턴 void

SetFrameType() 공개 메소드

Video frames use a header at the start of the RTP payload in order to break up a single video frame into multiple RTP packets. The RTP channel will need to know the type of header being used in order to determine when a full frame has been received.
public SetFrameType ( FrameTypesEnum frameType ) : void
frameType FrameTypesEnum
리턴 void

Start() 공개 메소드

Starts listenting on the RTP and control ports.
public Start ( ) : void
리턴 void