mirror of
https://github.com/aler9/gortsplib
synced 2025-10-24 15:43:18 +08:00
update docs
This commit is contained in:
@@ -451,7 +451,7 @@ func (c *ConnClient) setup(u *url.URL, track *Track, ht *HeaderTransport) (*Resp
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SetupUDP writes a SETUP request and reads a Response.
|
// SetupUDP writes a SETUP request and reads a Response.
|
||||||
// If rtpPort and rtcpPort are zero, they will be chosen automatically.
|
// If rtpPort and rtcpPort are zero, they are be chosen automatically.
|
||||||
func (c *ConnClient) SetupUDP(u *url.URL, mode SetupMode, track *Track, rtpPort int,
|
func (c *ConnClient) SetupUDP(u *url.URL, mode SetupMode, track *Track, rtpPort int,
|
||||||
rtcpPort int) (*Response, error) {
|
rtcpPort int) (*Response, error) {
|
||||||
if c.state != connClientStateInitial {
|
if c.state != connClientStateInitial {
|
||||||
@@ -745,7 +745,7 @@ func (c *ConnClient) Play(u *url.URL) (*Response, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// LoopUDP must be called after SetupUDP() and Play(); it keeps
|
// LoopUDP must be called after SetupUDP() and Play(); it keeps
|
||||||
// the TCP connection open through keepalives, and returns when the TCP
|
// the TCP connection open with keepalives, and returns when the TCP
|
||||||
// connection closes.
|
// connection closes.
|
||||||
func (c *ConnClient) LoopUDP(u *url.URL) error {
|
func (c *ConnClient) LoopUDP(u *url.URL) error {
|
||||||
readDone := make(chan error)
|
readDone := make(chan error)
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ const (
|
|||||||
|
|
||||||
// ConnServerConf allows to configure a ConnServer.
|
// ConnServerConf allows to configure a ConnServer.
|
||||||
type ConnServerConf struct {
|
type ConnServerConf struct {
|
||||||
// pre-existing TCP connection that will be wrapped
|
// pre-existing TCP connection to wrap
|
||||||
Conn net.Conn
|
Conn net.Conn
|
||||||
|
|
||||||
// (optional) timeout of read operations.
|
// (optional) timeout of read operations.
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ const (
|
|||||||
interleavedFrameMagicByte = 0x24
|
interleavedFrameMagicByte = 0x24
|
||||||
)
|
)
|
||||||
|
|
||||||
// InterleavedFrame is a structure that allows to transfer binary frames
|
// InterleavedFrame is a structure that allows to transfer binary data
|
||||||
// through RTSP/TCP connections. It is used to send RTP and RTCP packets with TCP.
|
// within RTSP/TCP connections. It is used to send and receive RTP and RTCP packets with TCP.
|
||||||
type InterleavedFrame struct {
|
type InterleavedFrame struct {
|
||||||
// track id
|
// track id
|
||||||
TrackId int
|
TrackId int
|
||||||
|
|||||||
4
utils.go
4
utils.go
@@ -38,10 +38,10 @@ func (sp StreamProtocol) String() string {
|
|||||||
type StreamCast int
|
type StreamCast int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// StreamUnicast means that the stream will be unicasted
|
// StreamUnicast means that the stream is unicasted
|
||||||
StreamUnicast StreamCast = iota
|
StreamUnicast StreamCast = iota
|
||||||
|
|
||||||
// StreamMulticast means that the stream will be multicasted
|
// StreamMulticast means that the stream is multicasted
|
||||||
StreamMulticast
|
StreamMulticast
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user