mirror of
https://github.com/lkmio/lkm.git
synced 2025-11-03 11:31:00 +08:00
24 lines
422 B
Go
24 lines
422 B
Go
package gb28181
|
|
|
|
import (
|
|
"github.com/pion/rtp"
|
|
"github.com/yangjiechina/live-server/stream"
|
|
)
|
|
|
|
type PassiveSource struct {
|
|
GBSourceImpl
|
|
}
|
|
|
|
func NewPassiveSource() *PassiveSource {
|
|
return &PassiveSource{}
|
|
}
|
|
|
|
func (t PassiveSource) Transport() Transport {
|
|
return TransportTCPPassive
|
|
}
|
|
|
|
func (t PassiveSource) InputRtp(pkt *rtp.Packet) error {
|
|
t.SourceImpl.AddEvent(stream.SourceEventInput, pkt.Payload)
|
|
return nil
|
|
}
|