mirror of
https://github.com/aler9/gortsplib
synced 2025-09-27 03:25:52 +08:00
switch to mediacommon/v2 (#695)
This commit is contained in:
@@ -21,7 +21,7 @@ import (
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/description"
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/headers"
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/mpeg4audio"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/mpeg4audio"
|
||||
)
|
||||
|
||||
func ipPtr(v net.IP) *net.IP {
|
||||
|
@@ -14,7 +14,7 @@ import (
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/base"
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/format/rtph264"
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/h264"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/h264"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
|
||||
@@ -117,7 +117,7 @@ func main() {
|
||||
|
||||
// wait for an I-frame
|
||||
if !iframeReceived {
|
||||
if !h264.IDRPresent(au) {
|
||||
if !h264.IsRandomAccess(au) {
|
||||
log.Printf("waiting for an I-frame")
|
||||
return
|
||||
}
|
||||
|
@@ -6,8 +6,8 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/format"
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/h264"
|
||||
"github.com/bluenviron/mediacommon/pkg/formats/mpegts"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/h264"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/formats/mpegts"
|
||||
)
|
||||
|
||||
func multiplyAndDivide(v, m, d int64) int64 {
|
||||
@@ -27,7 +27,7 @@ type mpegtsMuxer struct {
|
||||
w *mpegts.Writer
|
||||
h264Track *mpegts.Track
|
||||
mpeg4AudioTrack *mpegts.Track
|
||||
dtsExtractor *h264.DTSExtractor2
|
||||
dtsExtractor *h264.DTSExtractor
|
||||
mutex sync.Mutex
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ func (e *mpegtsMuxer) writeH264(au [][]byte, pts int64) error {
|
||||
if !idrPresent {
|
||||
return nil
|
||||
}
|
||||
e.dtsExtractor = h264.NewDTSExtractor2()
|
||||
e.dtsExtractor = h264.NewDTSExtractor()
|
||||
}
|
||||
|
||||
dts, err := e.dtsExtractor.Extract(au, pts)
|
||||
@@ -120,7 +120,7 @@ func (e *mpegtsMuxer) writeH264(au [][]byte, pts int64) error {
|
||||
}
|
||||
|
||||
// encode into MPEG-TS
|
||||
return e.w.WriteH264(e.h264Track, pts, dts, idrPresent, au)
|
||||
return e.w.WriteH264(e.h264Track, pts, dts, au)
|
||||
}
|
||||
|
||||
// writeMPEG4Audio writes MPEG-4 audio access units into MPEG-TS.
|
||||
|
@@ -4,8 +4,8 @@ import (
|
||||
"bufio"
|
||||
"os"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/h264"
|
||||
"github.com/bluenviron/mediacommon/pkg/formats/mpegts"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/h264"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/formats/mpegts"
|
||||
)
|
||||
|
||||
// mpegtsMuxer allows to save a H264 stream into a MPEG-TS file.
|
||||
@@ -18,7 +18,7 @@ type mpegtsMuxer struct {
|
||||
b *bufio.Writer
|
||||
w *mpegts.Writer
|
||||
track *mpegts.Track
|
||||
dtsExtractor *h264.DTSExtractor2
|
||||
dtsExtractor *h264.DTSExtractor
|
||||
}
|
||||
|
||||
// initialize initializes a mpegtsMuxer.
|
||||
@@ -92,7 +92,7 @@ func (e *mpegtsMuxer) writeH264(au [][]byte, pts int64) error {
|
||||
if !idrPresent {
|
||||
return nil
|
||||
}
|
||||
e.dtsExtractor = h264.NewDTSExtractor2()
|
||||
e.dtsExtractor = h264.NewDTSExtractor()
|
||||
}
|
||||
|
||||
dts, err := e.dtsExtractor.Extract(au, pts)
|
||||
@@ -101,5 +101,5 @@ func (e *mpegtsMuxer) writeH264(au [][]byte, pts int64) error {
|
||||
}
|
||||
|
||||
// encode into MPEG-TS
|
||||
return e.w.WriteH264(e.track, pts, dts, idrPresent, au)
|
||||
return e.w.WriteH264(e.track, pts, dts, au)
|
||||
}
|
||||
|
@@ -14,7 +14,7 @@ import (
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/base"
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/format/rtph265"
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/h265"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/h265"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
|
||||
|
@@ -4,8 +4,8 @@ import (
|
||||
"bufio"
|
||||
"os"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/h265"
|
||||
"github.com/bluenviron/mediacommon/pkg/formats/mpegts"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/h265"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/formats/mpegts"
|
||||
)
|
||||
|
||||
// mpegtsMuxer allows to save a H265 stream into a MPEG-TS file.
|
||||
@@ -19,7 +19,7 @@ type mpegtsMuxer struct {
|
||||
b *bufio.Writer
|
||||
w *mpegts.Writer
|
||||
track *mpegts.Track
|
||||
dtsExtractor *h265.DTSExtractor2
|
||||
dtsExtractor *h265.DTSExtractor
|
||||
}
|
||||
|
||||
// initialize initializes a mpegtsMuxer.
|
||||
@@ -93,7 +93,7 @@ func (e *mpegtsMuxer) writeH265(au [][]byte, pts int64) error {
|
||||
if !isRandomAccess {
|
||||
return nil
|
||||
}
|
||||
e.dtsExtractor = h265.NewDTSExtractor2()
|
||||
e.dtsExtractor = h265.NewDTSExtractor()
|
||||
}
|
||||
|
||||
dts, err := e.dtsExtractor.Extract(au, pts)
|
||||
@@ -102,5 +102,5 @@ func (e *mpegtsMuxer) writeH265(au [][]byte, pts int64) error {
|
||||
}
|
||||
|
||||
// encode into MPEG-TS
|
||||
return e.w.WriteH265(e.track, pts, dts, isRandomAccess, au)
|
||||
return e.w.WriteH265(e.track, pts, dts, au)
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@ import (
|
||||
"github.com/bluenviron/gortsplib/v4"
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/base"
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/format"
|
||||
"github.com/bluenviron/mediacommon/pkg/formats/mpegts"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/formats/mpegts"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
|
||||
|
@@ -5,7 +5,7 @@ import (
|
||||
"os"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/format"
|
||||
"github.com/bluenviron/mediacommon/pkg/formats/mpegts"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/formats/mpegts"
|
||||
)
|
||||
|
||||
func multiplyAndDivide(v, m, d int64) int64 {
|
||||
|
@@ -6,7 +6,7 @@ import (
|
||||
"github.com/bluenviron/gortsplib/v4"
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/base"
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/format"
|
||||
"github.com/bluenviron/mediacommon/pkg/formats/mpegts"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/formats/mpegts"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
|
||||
|
@@ -5,7 +5,7 @@ import (
|
||||
"os"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/format"
|
||||
"github.com/bluenviron/mediacommon/pkg/formats/mpegts"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/formats/mpegts"
|
||||
)
|
||||
|
||||
func multiplyAndDivide(v, m, d int64) int64 {
|
||||
|
@@ -10,7 +10,7 @@ import (
|
||||
"github.com/bluenviron/gortsplib/v4"
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/description"
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/format"
|
||||
"github.com/bluenviron/mediacommon/pkg/formats/mpegts"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/formats/mpegts"
|
||||
)
|
||||
|
||||
// This example shows how to
|
||||
@@ -88,7 +88,7 @@ func main() {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
timeDecoder := mpegts.NewTimeDecoder2()
|
||||
timeDecoder := mpegts.NewTimeDecoder()
|
||||
var firstDTS *int64
|
||||
var startTime time.Time
|
||||
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
"github.com/bluenviron/gortsplib/v4"
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/description"
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/format"
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/mpeg4audio"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/mpeg4audio"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
|
||||
|
@@ -4,8 +4,8 @@ import (
|
||||
"bufio"
|
||||
"os"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/h264"
|
||||
"github.com/bluenviron/mediacommon/pkg/formats/mpegts"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/h264"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/formats/mpegts"
|
||||
)
|
||||
|
||||
// mpegtsMuxer allows to save a H264 stream into a MPEG-TS file.
|
||||
@@ -18,7 +18,7 @@ type mpegtsMuxer struct {
|
||||
b *bufio.Writer
|
||||
w *mpegts.Writer
|
||||
track *mpegts.Track
|
||||
dtsExtractor *h264.DTSExtractor2
|
||||
dtsExtractor *h264.DTSExtractor
|
||||
}
|
||||
|
||||
// initialize initializes a mpegtsMuxer.
|
||||
@@ -92,7 +92,7 @@ func (e *mpegtsMuxer) writeH264(au [][]byte, pts int64) error {
|
||||
if !idrPresent {
|
||||
return nil
|
||||
}
|
||||
e.dtsExtractor = h264.NewDTSExtractor2()
|
||||
e.dtsExtractor = h264.NewDTSExtractor()
|
||||
}
|
||||
|
||||
dts, err := e.dtsExtractor.Extract(au, pts)
|
||||
@@ -101,5 +101,5 @@ func (e *mpegtsMuxer) writeH264(au [][]byte, pts int64) error {
|
||||
}
|
||||
|
||||
// encode into MPEG-TS
|
||||
return e.w.WriteH265(e.track, pts, dts, idrPresent, au)
|
||||
return e.w.WriteH265(e.track, pts, dts, au)
|
||||
}
|
||||
|
2
go.mod
2
go.mod
@@ -3,7 +3,7 @@ module github.com/bluenviron/gortsplib/v4
|
||||
go 1.21.0
|
||||
|
||||
require (
|
||||
github.com/bluenviron/mediacommon v1.14.0
|
||||
github.com/bluenviron/mediacommon/v2 v2.0.0
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/pion/rtcp v1.2.15
|
||||
github.com/pion/rtp v1.8.11
|
||||
|
4
go.sum
4
go.sum
@@ -2,8 +2,8 @@ github.com/asticode/go-astikit v0.30.0 h1:DkBkRQRIxYcknlaU7W7ksNfn4gMFsB0tqMJflx
|
||||
github.com/asticode/go-astikit v0.30.0/go.mod h1:h4ly7idim1tNhaVkdVBeXQZEE3L0xblP7fCWbgwipF0=
|
||||
github.com/asticode/go-astits v1.13.0 h1:XOgkaadfZODnyZRR5Y0/DWkA9vrkLLPLeeOvDwfKZ1c=
|
||||
github.com/asticode/go-astits v1.13.0/go.mod h1:QSHmknZ51pf6KJdHKZHJTLlMegIrhega3LPWz3ND/iI=
|
||||
github.com/bluenviron/mediacommon v1.14.0 h1:lWCwOBKNKgqmspRpwpvvg3CidYm+XOc2+z/Jw7LM5dQ=
|
||||
github.com/bluenviron/mediacommon v1.14.0/go.mod h1:z5LP9Tm1ZNfQV5Co54PyOzaIhGMusDfRKmh42nQSnyo=
|
||||
github.com/bluenviron/mediacommon/v2 v2.0.0 h1:JinZ9v2x6QeAOzA0cDA6aFe8vQuCrU8OyWEhG2iNzwY=
|
||||
github.com/bluenviron/mediacommon/v2 v2.0.0/go.mod h1:iHEz1SFIet6zBwAQoh1a92vTQ3dV3LpVFbom6/SLz3k=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
|
@@ -4,7 +4,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/sdp"
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/mpeg4audio"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/mpeg4audio"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
|
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/format/rtph264"
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/h264"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/h264"
|
||||
)
|
||||
|
||||
// H264 is the RTP format for the H264 codec.
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
"strconv"
|
||||
"sync"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/h265"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/h265"
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/format/rtph265"
|
||||
|
@@ -3,7 +3,7 @@ package format
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/h265"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/h265"
|
||||
"github.com/pion/rtp"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
@@ -6,7 +6,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/mpeg4audio"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/mpeg4audio"
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/format/rtpmpeg4audio"
|
||||
|
@@ -6,7 +6,7 @@ import (
|
||||
"github.com/pion/rtp"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/mpeg4audio"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/mpeg4audio"
|
||||
)
|
||||
|
||||
func TestMPEG4AudioAttributes(t *testing.T) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/mpeg4video"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/mpeg4video"
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/format/rtpmpeg4video"
|
||||
|
@@ -6,7 +6,7 @@ import (
|
||||
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/ac3"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/ac3"
|
||||
)
|
||||
|
||||
// ErrMorePacketsNeeded is returned when more packets are needed.
|
||||
|
@@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/ac3"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/ac3"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@@ -4,7 +4,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/av1"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/av1"
|
||||
"github.com/pion/rtp"
|
||||
"github.com/pion/rtp/codecs"
|
||||
)
|
||||
|
@@ -4,7 +4,7 @@ import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/av1"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/av1"
|
||||
"github.com/pion/rtp"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
@@ -3,7 +3,7 @@ package rtpav1
|
||||
import (
|
||||
"crypto/rand"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/av1"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/av1"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
|
||||
@@ -69,7 +69,7 @@ func (e *Encoder) Init() error {
|
||||
|
||||
// Encode encodes OBUs into RTP packets.
|
||||
func (e *Encoder) Encode(obus [][]byte) ([]*rtp.Packet, error) {
|
||||
isKeyFrame, err := av1.ContainsKeyFrame(obus)
|
||||
isKeyFrame, err := av1.IsRandomAccess(obus)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/h264"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/h264"
|
||||
)
|
||||
|
||||
// ErrMorePacketsNeeded is returned when more packets are needed.
|
||||
|
@@ -5,7 +5,7 @@ import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/h264"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/h264"
|
||||
"github.com/pion/rtp"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
@@ -6,7 +6,7 @@ import (
|
||||
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/h264"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/h264"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@@ -6,7 +6,7 @@ import (
|
||||
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/h265"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/h265"
|
||||
)
|
||||
|
||||
// ErrMorePacketsNeeded is returned when more packets are needed.
|
||||
|
@@ -4,7 +4,7 @@ import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/h265"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/h265"
|
||||
"github.com/pion/rtp"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
@@ -6,7 +6,7 @@ import (
|
||||
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/jpeg"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/jpeg"
|
||||
)
|
||||
|
||||
// ErrMorePacketsNeeded is returned when more packets are needed.
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/jpeg"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/jpeg"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@@ -4,7 +4,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/mpeg1audio"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/mpeg1audio"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
|
||||
|
@@ -3,7 +3,7 @@ package rtpmpeg1audio
|
||||
import (
|
||||
"crypto/rand"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/mpeg1audio"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/mpeg1audio"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
|
||||
|
@@ -3,8 +3,8 @@ package rtpmpeg4audio
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/bits"
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/mpeg4audio"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/bits"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/mpeg4audio"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
|
||||
|
@@ -3,7 +3,7 @@ package rtpmpeg4audio
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/mpeg4audio"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/mpeg4audio"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
|
||||
|
@@ -3,8 +3,8 @@ package rtpmpeg4audio
|
||||
import (
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/bits"
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/mpeg4audio"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/bits"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/mpeg4audio"
|
||||
)
|
||||
|
||||
func packetCountGeneric(avail, le int) int {
|
||||
|
@@ -3,7 +3,7 @@ package rtpmpeg4audio
|
||||
import (
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/mpeg4audio"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/mpeg4audio"
|
||||
)
|
||||
|
||||
func (e *Encoder) packetCountLATM(auLen int, plil int) int {
|
||||
|
@@ -6,7 +6,7 @@ import (
|
||||
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/mpeg4video"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/mpeg4video"
|
||||
)
|
||||
|
||||
// ErrMorePacketsNeeded is returned when more packets are needed.
|
||||
|
@@ -4,7 +4,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/vp8"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/vp8"
|
||||
"github.com/pion/rtp"
|
||||
"github.com/pion/rtp/codecs"
|
||||
)
|
||||
|
@@ -4,7 +4,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/bluenviron/mediacommon/pkg/codecs/vp9"
|
||||
"github.com/bluenviron/mediacommon/v2/pkg/codecs/vp9"
|
||||
"github.com/pion/rtp"
|
||||
"github.com/pion/rtp/codecs"
|
||||
)
|
||||
|
Reference in New Issue
Block a user