remove redundant definition (#3824)

This commit is contained in:
Alessandro Ros 2024-10-03 12:18:13 +02:00 committed by GitHub
parent 1e30dcb555
commit 8960cbae5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
17 changed files with 16 additions and 35 deletions

View File

@ -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},

View File

@ -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},

View File

@ -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},

View File

@ -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},

View File

@ -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},

View File

@ -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},

View File

@ -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},

View File

@ -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},

View File

@ -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},

View File

@ -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},

View File

@ -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},

View File

@ -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},

View File

@ -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},

View File

@ -21,7 +21,7 @@ type Processor interface {
ntp time.Time,
pts time.Duration,
hasNonRTSPReaders bool,
) (Unit, error)
) (unit.Unit, error)
}
// New allocates a Processor.

View File

@ -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
}

View File

@ -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},

View File

@ -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},