protocol/rtcp/client.go: export log type

This commit is contained in:
Saxon 2019-05-09 11:41:51 +09:30
parent 841dccaec8
commit 51160c8849
1 changed files with 3 additions and 3 deletions

View File

@ -49,7 +49,7 @@ const (
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
// and sending out ReceiverReports.
@ -67,13 +67,13 @@ type Client struct {
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.
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().
}
// 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 == "" {
name = defaultClientName
}