mirror of https://bitbucket.org/ausocean/av.git
revid: removed loadSender interface as no longer required
Removed the loadSender interface as no longer required. As a result close implementations that do nothing have also been removed.
This commit is contained in:
parent
6b91746cf6
commit
681e07540a
|
@ -122,26 +122,6 @@ func extractMeta(r string, log func(lvl int8, msg string, args ...interface{}))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// loadSender is a destination to send a *ring.Chunk to.
|
|
||||||
// When a loadSender has finished using the *ring.Chunk
|
|
||||||
// it must be Closed.
|
|
||||||
type loadSender interface {
|
|
||||||
// load assigns the *ring.Chunk to the loadSender.
|
|
||||||
// The load call may fail, but must not mutate the
|
|
||||||
// the chunk.
|
|
||||||
load(d []byte) error
|
|
||||||
|
|
||||||
// send performs a destination-specific send
|
|
||||||
// operation. It must not mutate the chunk.
|
|
||||||
send() error
|
|
||||||
|
|
||||||
// release releases the *ring.Chunk.
|
|
||||||
release()
|
|
||||||
|
|
||||||
// close cleans up after use of the loadSender.
|
|
||||||
close() error
|
|
||||||
}
|
|
||||||
|
|
||||||
// restart is an optional interface for loadSenders that
|
// restart is an optional interface for loadSenders that
|
||||||
// can restart their connection.
|
// can restart their connection.
|
||||||
type restarter interface {
|
type restarter interface {
|
||||||
|
@ -215,8 +195,6 @@ func (s *mtsSender) Write(d []byte) (int, error) {
|
||||||
return len(d), nil
|
return len(d), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *mtsSender) close() error { return nil }
|
|
||||||
|
|
||||||
// rtmpSender implements loadSender for a native RTMP destination.
|
// rtmpSender implements loadSender for a native RTMP destination.
|
||||||
type rtmpSender struct {
|
type rtmpSender struct {
|
||||||
conn *rtmp.Conn
|
conn *rtmp.Conn
|
||||||
|
@ -313,5 +291,3 @@ func newRtpSender(addr string, log func(lvl int8, msg string, args ...interface{
|
||||||
func (s *rtpSender) Write(d []byte) (int, error) {
|
func (s *rtpSender) Write(d []byte) (int, error) {
|
||||||
return s.encoder.Write(s.data)
|
return s.encoder.Write(s.data)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *rtpSender) close() error { return nil }
|
|
||||||
|
|
Loading…
Reference in New Issue