Documentation
¶
Index ¶
- Variables
- func GetMD5Hash(text string) string
- func ParseDirective(header, name string) string
- func ParseMedia(header string) []string
- func ParseSession(header string) string
- type RTSP
- type RTSPInfo
- type RtspClient
- func (this *RtspClient) AuthBasic(phase string, message string) bool
- func (this *RtspClient) AuthDigest(phase string, message string) bool
- func (this *RtspClient) AuthDigest_Only(phase string, message string) string
- func (this *RtspClient) Client(rtsp_url string) (bool, string)
- func (this *RtspClient) Close()
- func (this *RtspClient) Connect() bool
- func (this *RtspClient) ParseMedia(header string) []string
- func (this *RtspClient) ParseUrl(rtsp_url string) bool
- func (this *RtspClient) Read() (bool, string)
- func (this *RtspClient) RtspRtpLoop()
- func (this *RtspClient) SendBufer(bufer []byte)
- func (this *RtspClient) Write(message string) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ( VideoWidth int VideoHeight int )
Functions ¶
func GetMD5Hash ¶
func ParseDirective ¶
func ParseMedia ¶
func ParseSession ¶
Types ¶
type RTSP ¶
type RTSP struct {
engine.InputStream
*RtspClient
RTSPInfo
}
type RtspClient ¶
type RtspClient struct {
OutGoing chan []byte //out chanel
Signals chan bool //Signals quit
SPS []byte
PPS []byte
Header string
AudioSpecificConfig []byte
// contains filtered or unexported fields
}
func (*RtspClient) AuthDigest ¶
func (this *RtspClient) AuthDigest(phase string, message string) bool
func (*RtspClient) AuthDigest_Only ¶
func (this *RtspClient) AuthDigest_Only(phase string, message string) string
func (*RtspClient) Close ¶
func (this *RtspClient) Close()
func (*RtspClient) Connect ¶
func (this *RtspClient) Connect() bool
func (*RtspClient) ParseMedia ¶
func (this *RtspClient) ParseMedia(header string) []string
func (*RtspClient) ParseUrl ¶
func (this *RtspClient) ParseUrl(rtsp_url string) bool
func (*RtspClient) Read ¶
func (this *RtspClient) Read() (bool, string)
func (*RtspClient) RtspRtpLoop ¶
func (this *RtspClient) RtspRtpLoop()
The RTP header has the following format:
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|V=2|P|X| CC |M| PT | sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| timestamp |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| synchronization source (SSRC) identifier |
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
| contributing source (CSRC) identifiers |
| .... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
version (V): 2 bits
This field identifies the version of RTP. The version defined by
this specification is two (2). (The value 1 is used by the first
draft version of RTP and the value 0 is used by the protocol
initially implemented in the "vat" audio tool.)
padding (P): 1 bit
If the padding bit is set, the packet contains one or more
additional padding octets at the end which are not part of the
payload. The last octet of the padding contains a count of how
many padding octets should be ignored, including itself. Padding
may be needed by some encryption algorithms with fixed block sizes
or for carrying several RTP packets in a lower-layer protocol data
unit.
extension (X): 1 bit
If the extension bit is set, the fixed header MUST be followed by
exactly one header extension, with a format defined in Section
5.3.1.
func (*RtspClient) Write ¶
func (this *RtspClient) Write(message string) bool
Click to show internal directories.
Click to hide internal directories.