diff --git a/revid/revid.go b/revid/revid.go index 2dad123c..33c3d0cc 100644 --- a/revid/revid.go +++ b/revid/revid.go @@ -232,12 +232,6 @@ func (r *Revid) reset(config Config) error { default: r.destination = append(r.destination, newHttpSender(r.ns, r.config.Logger.Log)) } - case Udp: - s, err := newUdpSender(r.config.RtpAddress, r.config.Logger.Log) - if err != nil { - return err - } - r.destination = append(r.destination, s) case Rtp: s, err := newRtpSender(r.config.RtpAddress, r.config.Logger.Log, r.config.FrameRate) if err != nil { diff --git a/revid/senders.go b/revid/senders.go index b73de1c1..ac76736e 100644 --- a/revid/senders.go +++ b/revid/senders.go @@ -388,41 +388,6 @@ func (s *rtmpSender) close() error { return nil } -// udpSender implements loadSender for a native udp destination. -type udpSender struct { - conn net.Conn - log func(lvl int8, msg string, args ...interface{}) - chunk *ring.Chunk -} - -func newUdpSender(addr string, log func(lvl int8, msg string, args ...interface{})) (*udpSender, error) { - conn, err := net.Dial("udp", addr) - if err != nil { - return nil, err - } - return &udpSender{ - conn: conn, - log: log, - }, nil -} - -func (s *udpSender) load(c *ring.Chunk) error { - s.chunk = c - return nil -} - -func (s *udpSender) send() error { - _, err := s.chunk.WriteTo(s.conn) - return err -} - -func (s *udpSender) release() { - s.chunk.Close() - s.chunk = nil -} - -func (s *udpSender) close() error { return nil } - // TODO: Write restart func for rtpSender // rtpSender implements loadSender for a native udp destination with rtp packetization. type rtpSender struct {