1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Refine docs, add TURN/STUN rfc.

This commit is contained in:
winlin 2017-03-06 10:19:19 +08:00
parent 3ec9df6578
commit ce034c3556
15 changed files with 20 additions and 16 deletions

View file

@ -80,4 +80,8 @@ kafka协议:
kafka-160915-0553-82964.pdf kafka-160915-0553-82964.pdf
https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol
STUN: https://tools.ietf.org/html/rfc5389
TURN: https://tools.ietf.org/html/rfc5766
Winlin Winlin

Binary file not shown.

Binary file not shown.

View file

@ -1317,7 +1317,7 @@ int SrsFormat::audio_aac_demux(SrsBuffer* stream, int64_t timestamp)
} }
// Raw AAC frame data in UI8 [] // Raw AAC frame data in UI8 []
// 6.3 Raw Data, aac-iso-13818-7.pdf, page 28 // 6.3 Raw Data, ISO_IEC_13818-7-AAC-2004.pdf, page 28
if ((ret = audio->add_sample(stream->data() + stream->pos(), stream->size() - stream->pos())) != ERROR_SUCCESS) { if ((ret = audio->add_sample(stream->data() + stream->pos(), stream->size() - stream->pos())) != ERROR_SUCCESS) {
srs_error("aac add sample failed. ret=%d", ret); srs_error("aac add sample failed. ret=%d", ret);
return ret; return ret;

View file

@ -395,7 +395,7 @@ enum SrsAacProfile
{ {
SrsAacProfileReserved = 3, SrsAacProfileReserved = 3,
// @see 7.1 Profiles, aac-iso-13818-7.pdf, page 40 // @see 7.1 Profiles, ISO_IEC_13818-7-AAC-2004.pdf, page 40
SrsAacProfileMain = 0, SrsAacProfileMain = 0,
SrsAacProfileLC = 1, SrsAacProfileLC = 1,
SrsAacProfileSSR = 2, SrsAacProfileSSR = 2,

View file

@ -2887,7 +2887,7 @@ int SrsTsMessageCache::do_cache_aac(SrsAudioFrame* frame)
// AAC-ADTS // AAC-ADTS
// 6.2 Audio Data Transport Stream, ADTS // 6.2 Audio Data Transport Stream, ADTS
// in aac-iso-13818-7.pdf, page 26. // in ISO_IEC_13818-7-AAC-2004.pdf, page 26.
// fixed 7bytes header // fixed 7bytes header
uint8_t adts_header[7] = {0xff, 0xf9, 0x00, 0x00, 0x00, 0x0f, 0xfc}; uint8_t adts_header[7] = {0xff, 0xf9, 0x00, 0x00, 0x00, 0x0f, 0xfc};
/* /*

View file

@ -318,7 +318,7 @@ int SrsRawAacStream::adts_demux(SrsBuffer* stream, char** pframe, int* pnb_frame
int adts_header_start = stream->pos(); int adts_header_start = stream->pos();
// decode the ADTS. // decode the ADTS.
// @see aac-iso-13818-7.pdf, page 26 // @see ISO_IEC_13818-7-AAC-2004.pdf, page 26
// 6.2 Audio Data Transport Stream, ADTS // 6.2 Audio Data Transport Stream, ADTS
// @see https://github.com/ossrs/srs/issues/212#issuecomment-64145885 // @see https://github.com/ossrs/srs/issues/212#issuecomment-64145885
// byte_alignment() // byte_alignment()

View file

@ -52,7 +52,7 @@ class ISrsProtocolReaderWriter;
// SP = <US-ASCII SP, space (32)> // SP = <US-ASCII SP, space (32)>
#define SRS_RTSP_SP ' ' // 0x20 #define SRS_RTSP_SP ' ' // 0x20
// 4 RTSP Message, @see rtsp-rfc2326-1998.pdf, page 37 // 4 RTSP Message, @see rfc2326-1998-rtsp.pdf, page 37
// Lines are terminated by CRLF, but // Lines are terminated by CRLF, but
// receivers should be prepared to also interpret CR and LF by // receivers should be prepared to also interpret CR and LF by
// themselves as line terminators. // themselves as line terminators.
@ -104,7 +104,7 @@ enum SrsRtspSdpState
}; };
/** /**
* 10 Method Definitions, @see rtsp-rfc2326-1998.pdf, page 57 * 10 Method Definitions, @see rfc2326-1998-rtsp.pdf, page 57
* The method token indicates the method to be performed on the resource * The method token indicates the method to be performed on the resource
* identified by the Request-URI. The method is case-sensitive. New * identified by the Request-URI. The method is case-sensitive. New
* methods may be defined in the future. Method names may not start with * methods may be defined in the future. Method names may not start with
@ -152,7 +152,7 @@ enum SrsRtspTokenState
/** /**
* the rtp packet. * the rtp packet.
* 5. RTP Data Transfer Protocol, @see rtp-rfc3550-2003.pdf, page 12 * 5. RTP Data Transfer Protocol, @see rfc3550-2003-rtp.pdf, page 12
*/ */
class SrsRtpPacket class SrsRtpPacket
{ {
@ -322,7 +322,7 @@ private:
}; };
/** /**
* the sdp in announce, @see rtsp-rfc2326-1998.pdf, page 159 * the sdp in announce, @see rfc2326-1998-rtsp.pdf, page 159
* Appendix C: Use of SDP for RTSP Session Descriptions * Appendix C: Use of SDP for RTSP Session Descriptions
* The Session Description Protocol (SDP, RFC 2327 [6]) may be used to * The Session Description Protocol (SDP, RFC 2327 [6]) may be used to
* describe streams or presentations in RTSP. * describe streams or presentations in RTSP.
@ -416,7 +416,7 @@ private:
/** /**
* the rtsp transport. * the rtsp transport.
* 12.39 Transport, @see rtsp-rfc2326-1998.pdf, page 115 * 12.39 Transport, @see rfc2326-1998-rtsp.pdf, page 115
* This request header indicates which transport protocol is to be used * This request header indicates which transport protocol is to be used
* and configures its parameters such as destination address, * and configures its parameters such as destination address,
* compression, multicast time-to-live and destination port for a single * compression, multicast time-to-live and destination port for a single
@ -463,7 +463,7 @@ public:
/** /**
* the rtsp request message. * the rtsp request message.
* 6 Request, @see rtsp-rfc2326-1998.pdf, page 39 * 6 Request, @see rfc2326-1998-rtsp.pdf, page 39
* A request message from a client to a server or vice versa includes, * A request message from a client to a server or vice versa includes,
* within the first line of that message, the method to be applied to * within the first line of that message, the method to be applied to
* the resource, the identifier of the resource, and the protocol * the resource, the identifier of the resource, and the protocol
@ -497,14 +497,14 @@ public:
*/ */
long seq; long seq;
/** /**
* 12.16 Content-Type, @see rtsp-rfc2326-1998.pdf, page 99 * 12.16 Content-Type, @see rfc2326-1998-rtsp.pdf, page 99
* See [H14.18]. Note that the content types suitable for RTSP are * See [H14.18]. Note that the content types suitable for RTSP are
* likely to be restricted in practice to presentation descriptions and * likely to be restricted in practice to presentation descriptions and
* parameter-value types. * parameter-value types.
*/ */
std::string content_type; std::string content_type;
/** /**
* 12.14 Content-Length, @see rtsp-rfc2326-1998.pdf, page 99 * 12.14 Content-Length, @see rfc2326-1998-rtsp.pdf, page 99
* This field contains the length of the content of the method (i.e. * This field contains the length of the content of the method (i.e.
* after the double CRLF following the last header). Unlike HTTP, it * after the double CRLF following the last header). Unlike HTTP, it
* MUST be included in all messages that carry content beyond the header * MUST be included in all messages that carry content beyond the header
@ -541,7 +541,7 @@ public:
/** /**
* the rtsp response message. * the rtsp response message.
* 7 Response, @see rtsp-rfc2326-1998.pdf, page 43 * 7 Response, @see rfc2326-1998-rtsp.pdf, page 43
* [H6] applies except that HTTP-Version is replaced by RTSP-Version. * [H6] applies except that HTTP-Version is replaced by RTSP-Version.
* Also, RTSP defines additional status codes and does not define some * Also, RTSP defines additional status codes and does not define some
* HTTP codes. The valid response codes and the methods they can be used * HTTP codes. The valid response codes and the methods they can be used
@ -571,7 +571,7 @@ public:
// @see about the status of rtsp, see SRS_CONSTS_RTSP_OK // @see about the status of rtsp, see SRS_CONSTS_RTSP_OK
int status; int status;
/** /**
* 12.17 CSeq, @see rtsp-rfc2326-1998.pdf, page 99 * 12.17 CSeq, @see rfc2326-1998-rtsp.pdf, page 99
* The CSeq field specifies the sequence number for an RTSP requestresponse * The CSeq field specifies the sequence number for an RTSP requestresponse
* pair. This field MUST be present in all requests and * pair. This field MUST be present in all requests and
* responses. For every RTSP request containing the given sequence * responses. For every RTSP request containing the given sequence
@ -601,7 +601,7 @@ protected:
}; };
/** /**
* 10.1 OPTIONS, @see rtsp-rfc2326-1998.pdf, page 59 * 10.1 OPTIONS, @see rfc2326-1998-rtsp.pdf, page 59
* The behavior is equivalent to that described in [H9.2]. An OPTIONS * The behavior is equivalent to that described in [H9.2]. An OPTIONS
* request may be issued at any time, e.g., if the client is about to * request may be issued at any time, e.g., if the client is about to
* try a nonstandard request. It does not influence server state. * try a nonstandard request. It does not influence server state.
@ -621,7 +621,7 @@ protected:
}; };
/** /**
* 10.4 SETUP, @see rtsp-rfc2326-1998.pdf, page 65 * 10.4 SETUP, @see rfc2326-1998-rtsp.pdf, page 65
* The SETUP request for a URI specifies the transport mechanism to be * The SETUP request for a URI specifies the transport mechanism to be
* used for the streamed media. A client can issue a SETUP request for a * used for the streamed media. A client can issue a SETUP request for a
* stream that is already playing to change transport parameters, which * stream that is already playing to change transport parameters, which