mirror of
https://github.com/bluenviron/mediamtx
synced 2025-01-21 06:31:00 +00:00
remove redundant definition (#3824)
This commit is contained in:
parent
1e30dcb555
commit
8960cbae5f
@ -78,7 +78,7 @@ func (t *formatProcessorAC3) ProcessRTPPacket( //nolint:dupl
|
||||
ntp time.Time,
|
||||
pts time.Duration,
|
||||
hasNonRTSPReaders bool,
|
||||
) (Unit, error) {
|
||||
) (unit.Unit, error) {
|
||||
u := &unit.AC3{
|
||||
Base: unit.Base{
|
||||
RTPPackets: []*rtp.Packet{pkt},
|
||||
|
@ -86,7 +86,7 @@ func (t *formatProcessorAV1) ProcessRTPPacket( //nolint:dupl
|
||||
ntp time.Time,
|
||||
pts time.Duration,
|
||||
hasNonRTSPReaders bool,
|
||||
) (Unit, error) {
|
||||
) (unit.Unit, error) {
|
||||
u := &unit.AV1{
|
||||
Base: unit.Base{
|
||||
RTPPackets: []*rtp.Packet{pkt},
|
||||
|
@ -80,7 +80,7 @@ func (t *formatProcessorG711) ProcessRTPPacket( //nolint:dupl
|
||||
ntp time.Time,
|
||||
pts time.Duration,
|
||||
hasNonRTSPReaders bool,
|
||||
) (Unit, error) {
|
||||
) (unit.Unit, error) {
|
||||
u := &unit.G711{
|
||||
Base: unit.Base{
|
||||
RTPPackets: []*rtp.Packet{pkt},
|
||||
|
@ -37,7 +37,7 @@ func (t *formatProcessorGeneric) ProcessRTPPacket(
|
||||
ntp time.Time,
|
||||
pts time.Duration,
|
||||
_ bool,
|
||||
) (Unit, error) {
|
||||
) (unit.Unit, error) {
|
||||
u := &unit.Generic{
|
||||
Base: unit.Base{
|
||||
RTPPackets: []*rtp.Packet{pkt},
|
||||
|
@ -260,7 +260,7 @@ func (t *formatProcessorH264) ProcessRTPPacket( //nolint:dupl
|
||||
ntp time.Time,
|
||||
pts time.Duration,
|
||||
hasNonRTSPReaders bool,
|
||||
) (Unit, error) {
|
||||
) (unit.Unit, error) {
|
||||
u := &unit.H264{
|
||||
Base: unit.Base{
|
||||
RTPPackets: []*rtp.Packet{pkt},
|
||||
|
@ -292,7 +292,7 @@ func (t *formatProcessorH265) ProcessRTPPacket( //nolint:dupl
|
||||
ntp time.Time,
|
||||
pts time.Duration,
|
||||
hasNonRTSPReaders bool,
|
||||
) (Unit, error) {
|
||||
) (unit.Unit, error) {
|
||||
u := &unit.H265{
|
||||
Base: unit.Base{
|
||||
RTPPackets: []*rtp.Packet{pkt},
|
||||
|
@ -80,7 +80,7 @@ func (t *formatProcessorLPCM) ProcessRTPPacket( //nolint:dupl
|
||||
ntp time.Time,
|
||||
pts time.Duration,
|
||||
hasNonRTSPReaders bool,
|
||||
) (Unit, error) {
|
||||
) (unit.Unit, error) {
|
||||
u := &unit.LPCM{
|
||||
Base: unit.Base{
|
||||
RTPPackets: []*rtp.Packet{pkt},
|
||||
|
@ -79,7 +79,7 @@ func (t *formatProcessorMJPEG) ProcessRTPPacket( //nolint:dupl
|
||||
ntp time.Time,
|
||||
pts time.Duration,
|
||||
hasNonRTSPReaders bool,
|
||||
) (Unit, error) {
|
||||
) (unit.Unit, error) {
|
||||
u := &unit.MJPEG{
|
||||
Base: unit.Base{
|
||||
RTPPackets: []*rtp.Packet{pkt},
|
||||
|
@ -78,7 +78,7 @@ func (t *formatProcessorMPEG1Audio) ProcessRTPPacket( //nolint:dupl
|
||||
ntp time.Time,
|
||||
pts time.Duration,
|
||||
hasNonRTSPReaders bool,
|
||||
) (Unit, error) {
|
||||
) (unit.Unit, error) {
|
||||
u := &unit.MPEG1Audio{
|
||||
Base: unit.Base{
|
||||
RTPPackets: []*rtp.Packet{pkt},
|
||||
|
@ -88,7 +88,7 @@ func (t *formatProcessorMPEG1Video) ProcessRTPPacket( //nolint:dupl
|
||||
ntp time.Time,
|
||||
pts time.Duration,
|
||||
hasNonRTSPReaders bool,
|
||||
) (Unit, error) {
|
||||
) (unit.Unit, error) {
|
||||
u := &unit.MPEG1Video{
|
||||
Base: unit.Base{
|
||||
RTPPackets: []*rtp.Packet{pkt},
|
||||
|
@ -82,7 +82,7 @@ func (t *formatProcessorMPEG4Audio) ProcessRTPPacket( //nolint:dupl
|
||||
ntp time.Time,
|
||||
pts time.Duration,
|
||||
hasNonRTSPReaders bool,
|
||||
) (Unit, error) {
|
||||
) (unit.Unit, error) {
|
||||
u := &unit.MPEG4Audio{
|
||||
Base: unit.Base{
|
||||
RTPPackets: []*rtp.Packet{pkt},
|
||||
|
@ -131,7 +131,7 @@ func (t *formatProcessorMPEG4Video) ProcessRTPPacket( //nolint:dupl
|
||||
ntp time.Time,
|
||||
pts time.Duration,
|
||||
hasNonRTSPReaders bool,
|
||||
) (Unit, error) {
|
||||
) (unit.Unit, error) {
|
||||
u := &unit.MPEG4Video{
|
||||
Base: unit.Base{
|
||||
RTPPackets: []*rtp.Packet{pkt},
|
||||
|
@ -86,7 +86,7 @@ func (t *formatProcessorOpus) ProcessRTPPacket(
|
||||
ntp time.Time,
|
||||
pts time.Duration,
|
||||
hasNonRTSPReaders bool,
|
||||
) (Unit, error) {
|
||||
) (unit.Unit, error) {
|
||||
u := &unit.Opus{
|
||||
Base: unit.Base{
|
||||
RTPPackets: []*rtp.Packet{pkt},
|
||||
|
@ -21,7 +21,7 @@ type Processor interface {
|
||||
ntp time.Time,
|
||||
pts time.Duration,
|
||||
hasNonRTSPReaders bool,
|
||||
) (Unit, error)
|
||||
) (unit.Unit, error)
|
||||
}
|
||||
|
||||
// New allocates a Processor.
|
||||
|
@ -1,19 +0,0 @@
|
||||
package formatprocessor
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
|
||||
// Unit is the elementary data unit routed across the server.
|
||||
type Unit interface {
|
||||
// returns RTP packets contained into the unit.
|
||||
GetRTPPackets() []*rtp.Packet
|
||||
|
||||
// returns the NTP timestamp of the unit.
|
||||
GetNTP() time.Time
|
||||
|
||||
// returns the PTS of the unit.
|
||||
GetPTS() time.Duration
|
||||
}
|
@ -79,7 +79,7 @@ func (t *formatProcessorVP8) ProcessRTPPacket( //nolint:dupl
|
||||
ntp time.Time,
|
||||
pts time.Duration,
|
||||
hasNonRTSPReaders bool,
|
||||
) (Unit, error) {
|
||||
) (unit.Unit, error) {
|
||||
u := &unit.VP8{
|
||||
Base: unit.Base{
|
||||
RTPPackets: []*rtp.Packet{pkt},
|
||||
|
@ -79,7 +79,7 @@ func (t *formatProcessorVP9) ProcessRTPPacket( //nolint:dupl
|
||||
ntp time.Time,
|
||||
pts time.Duration,
|
||||
hasNonRTSPReaders bool,
|
||||
) (Unit, error) {
|
||||
) (unit.Unit, error) {
|
||||
u := &unit.VP9{
|
||||
Base: unit.Base{
|
||||
RTPPackets: []*rtp.Packet{pkt},
|
||||
|
Loading…
Reference in New Issue
Block a user