mirror of https://bitbucket.org/ausocean/av.git
protocol/rtcp/client.go: export log type
This commit is contained in:
parent
841dccaec8
commit
51160c8849
|
@ -49,7 +49,7 @@ const (
|
||||||
receiverBufSize = 200
|
receiverBufSize = 200
|
||||||
)
|
)
|
||||||
|
|
||||||
type log func(lvl int8, msg string, args ...interface{})
|
type Log func(lvl int8, msg string, args ...interface{})
|
||||||
|
|
||||||
// Client is an RTCP Client that will handle receiving SenderReports from a server
|
// Client is an RTCP Client that will handle receiving SenderReports from a server
|
||||||
// and sending out ReceiverReports.
|
// and sending out ReceiverReports.
|
||||||
|
@ -67,13 +67,13 @@ type Client struct {
|
||||||
conn *net.UDPConn // The UDP connection used for receiving and sending RTSP packets.
|
conn *net.UDPConn // The UDP connection used for receiving and sending RTSP packets.
|
||||||
wg sync.WaitGroup // This is used to wait for send and recv routines to stop when Client is stopped.
|
wg sync.WaitGroup // This is used to wait for send and recv routines to stop when Client is stopped.
|
||||||
quit chan struct{} // Channel used to communicate quit signal to send and recv routines.
|
quit chan struct{} // Channel used to communicate quit signal to send and recv routines.
|
||||||
log log // Used to log any messages.
|
log Log // Used to log any messages.
|
||||||
|
|
||||||
err chan error // Client will send any errors through this chan. Can be accessed by Err().
|
err chan error // Client will send any errors through this chan. Can be accessed by Err().
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewClient returns a pointer to a new Client.
|
// NewClient returns a pointer to a new Client.
|
||||||
func NewClient(clientAddress, serverAddress, name string, sendInterval time.Duration, rtpSSRC uint32, l log) (*Client, error) {
|
func NewClient(clientAddress, serverAddress, name string, sendInterval time.Duration, rtpSSRC uint32, l Log) (*Client, error) {
|
||||||
if name == "" {
|
if name == "" {
|
||||||
name = defaultClientName
|
name = defaultClientName
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue