mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 07:06:58 +08:00
merge format and formatdecenc into formats (#222)
This commit is contained in:
@@ -24,7 +24,7 @@ import (
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/base"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/bytecounter"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/conn"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/headers"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/liberrors"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
@@ -1642,7 +1642,7 @@ func (c *Client) Seek(ra *headers.Range) (*base.Response, error) {
|
||||
}
|
||||
|
||||
// OnPacketRTPAny sets the callback that is called when a RTP packet is read from any setupped media.
|
||||
func (c *Client) OnPacketRTPAny(cb func(*media.Media, format.Format, *rtp.Packet)) {
|
||||
func (c *Client) OnPacketRTPAny(cb func(*media.Media, formats.Format, *rtp.Packet)) {
|
||||
for _, cm := range c.medias {
|
||||
cmedia := cm.media
|
||||
for _, forma := range cm.media.Formats {
|
||||
@@ -1664,7 +1664,7 @@ func (c *Client) OnPacketRTCPAny(cb func(*media.Media, rtcp.Packet)) {
|
||||
}
|
||||
|
||||
// OnPacketRTP sets the callback that is called when a RTP packet is read.
|
||||
func (c *Client) OnPacketRTP(medi *media.Media, forma format.Format, cb func(*rtp.Packet)) {
|
||||
func (c *Client) OnPacketRTP(medi *media.Media, forma formats.Format, cb func(*rtp.Packet)) {
|
||||
cm := c.medias[medi]
|
||||
ct := cm.formats[forma.PayloadType()]
|
||||
ct.onPacketRTP = cb
|
||||
|
@@ -6,7 +6,7 @@ import (
|
||||
"github.com/pion/rtcp"
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/rtcpreceiver"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/rtcpsender"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/rtpreorderer"
|
||||
@@ -15,14 +15,14 @@ import (
|
||||
type clientFormat struct {
|
||||
c *Client
|
||||
cm *clientMedia
|
||||
format format.Format
|
||||
format formats.Format
|
||||
udpReorderer *rtpreorderer.Reorderer // play
|
||||
udpRTCPReceiver *rtcpreceiver.RTCPReceiver // play
|
||||
rtcpSender *rtcpsender.RTCPSender // record
|
||||
onPacketRTP func(*rtp.Packet)
|
||||
}
|
||||
|
||||
func newClientFormat(cm *clientMedia, forma format.Format) *clientFormat {
|
||||
func newClientFormat(cm *clientMedia, forma formats.Format) *clientFormat {
|
||||
return &clientFormat{
|
||||
c: cm.c,
|
||||
cm: cm,
|
||||
|
@@ -20,7 +20,7 @@ import (
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/base"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/codecs/mpeg4audio"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/conn"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/headers"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/url"
|
||||
@@ -35,7 +35,7 @@ func mustMarshalMedias(medias media.Medias) []byte {
|
||||
return byts
|
||||
}
|
||||
|
||||
func readAll(c *Client, ur string, cb func(*media.Media, format.Format, *rtp.Packet)) error {
|
||||
func readAll(c *Client, ur string, cb func(*media.Media, formats.Format, *rtp.Packet)) error {
|
||||
u, err := url.Parse(ur)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -76,7 +76,7 @@ func TestClientPlayFormats(t *testing.T) {
|
||||
|
||||
media2 := &media.Media{
|
||||
Type: media.TypeAudio,
|
||||
Formats: []format.Format{&format.MPEG4Audio{
|
||||
Formats: []formats.Format{&formats.MPEG4Audio{
|
||||
PayloadTyp: 96,
|
||||
Config: &mpeg4audio.Config{
|
||||
Type: mpeg4audio.ObjectTypeAACLC,
|
||||
@@ -91,7 +91,7 @@ func TestClientPlayFormats(t *testing.T) {
|
||||
|
||||
media3 := &media.Media{
|
||||
Type: media.TypeAudio,
|
||||
Formats: []format.Format{&format.MPEG4Audio{
|
||||
Formats: []formats.Format{&formats.MPEG4Audio{
|
||||
PayloadTyp: 96,
|
||||
Config: &mpeg4audio.Config{
|
||||
Type: mpeg4audio.ObjectTypeAACLC,
|
||||
@@ -268,7 +268,7 @@ func TestClientPlay(t *testing.T) {
|
||||
require.Equal(t, base.Describe, req.Method)
|
||||
require.Equal(t, mustParseURL(scheme+"://"+listenIP+":8554/test/stream?param=value"), req.URL)
|
||||
|
||||
forma := &format.Generic{
|
||||
forma := &formats.Generic{
|
||||
PayloadTyp: 96,
|
||||
RTPMap: "private/90000",
|
||||
}
|
||||
@@ -278,11 +278,11 @@ func TestClientPlay(t *testing.T) {
|
||||
medias := media.Medias{
|
||||
&media.Media{
|
||||
Type: "application",
|
||||
Formats: []format.Format{forma},
|
||||
Formats: []formats.Format{forma},
|
||||
},
|
||||
&media.Media{
|
||||
Type: "application",
|
||||
Formats: []format.Format{forma},
|
||||
Formats: []formats.Format{forma},
|
||||
},
|
||||
}
|
||||
medias.SetControls()
|
||||
@@ -491,7 +491,7 @@ func TestClientPlay(t *testing.T) {
|
||||
err = c.SetupAll(medias, baseURL)
|
||||
require.NoError(t, err)
|
||||
|
||||
c.OnPacketRTPAny(func(medi *media.Media, forma format.Format, pkt *rtp.Packet) {
|
||||
c.OnPacketRTPAny(func(medi *media.Media, forma formats.Format, pkt *rtp.Packet) {
|
||||
require.Equal(t, &testRTPPacket, pkt)
|
||||
err := c.WritePacketRTCP(medi, &testRTCPPacket)
|
||||
require.NoError(t, err)
|
||||
@@ -542,7 +542,7 @@ func TestClientPlayPartial(t *testing.T) {
|
||||
require.Equal(t, base.Describe, req.Method)
|
||||
require.Equal(t, mustParseURL("rtsp://"+listenIP+":8554/teststream"), req.URL)
|
||||
|
||||
forma := &format.Generic{
|
||||
forma := &formats.Generic{
|
||||
PayloadTyp: 96,
|
||||
RTPMap: "private/90000",
|
||||
}
|
||||
@@ -552,11 +552,11 @@ func TestClientPlayPartial(t *testing.T) {
|
||||
medias := media.Medias{
|
||||
&media.Media{
|
||||
Type: "application",
|
||||
Formats: []format.Format{forma},
|
||||
Formats: []formats.Format{forma},
|
||||
},
|
||||
&media.Media{
|
||||
Type: "application",
|
||||
Formats: []format.Format{forma},
|
||||
Formats: []formats.Format{forma},
|
||||
},
|
||||
}
|
||||
medias.SetControls()
|
||||
@@ -647,7 +647,7 @@ func TestClientPlayPartial(t *testing.T) {
|
||||
_, err = c.Setup(medias[1], baseURL, 0, 0)
|
||||
require.NoError(t, err)
|
||||
|
||||
c.OnPacketRTPAny(func(medi *media.Media, forma format.Format, pkt *rtp.Packet) {
|
||||
c.OnPacketRTPAny(func(medi *media.Media, forma formats.Format, pkt *rtp.Packet) {
|
||||
require.Equal(t, medias[1], medi)
|
||||
require.Equal(t, medias[1].Formats[0], forma)
|
||||
require.Equal(t, &testRTPPacket, pkt)
|
||||
@@ -931,7 +931,7 @@ func TestClientPlayAnyPort(t *testing.T) {
|
||||
|
||||
var med *media.Media
|
||||
err = readAll(&c, "rtsp://localhost:8554/teststream",
|
||||
func(medi *media.Media, forma format.Format, pkt *rtp.Packet) {
|
||||
func(medi *media.Media, forma formats.Format, pkt *rtp.Packet) {
|
||||
require.Equal(t, &testRTPPacket, pkt)
|
||||
med = medi
|
||||
close(packetRecv)
|
||||
@@ -1055,7 +1055,7 @@ func TestClientPlayAutomaticProtocol(t *testing.T) {
|
||||
},
|
||||
}
|
||||
err = readAll(&c, "rtsp://localhost:8554/teststream",
|
||||
func(medi *media.Media, forma format.Format, pkt *rtp.Packet) {
|
||||
func(medi *media.Media, forma formats.Format, pkt *rtp.Packet) {
|
||||
close(packetRecv)
|
||||
})
|
||||
require.NoError(t, err)
|
||||
@@ -1231,7 +1231,7 @@ func TestClientPlayAutomaticProtocol(t *testing.T) {
|
||||
},
|
||||
}
|
||||
err = readAll(&c, "rtsp://localhost:8554/teststream",
|
||||
func(medi *media.Media, forma format.Format, pkt *rtp.Packet) {
|
||||
func(medi *media.Media, forma formats.Format, pkt *rtp.Packet) {
|
||||
close(packetRecv)
|
||||
})
|
||||
require.NoError(t, err)
|
||||
@@ -1467,7 +1467,7 @@ func TestClientPlayAutomaticProtocol(t *testing.T) {
|
||||
}
|
||||
|
||||
err = readAll(&c, "rtsp://myuser:mypass@localhost:8554/teststream",
|
||||
func(medi *media.Media, forma format.Format, pkt *rtp.Packet) {
|
||||
func(medi *media.Media, forma formats.Format, pkt *rtp.Packet) {
|
||||
close(packetRecv)
|
||||
})
|
||||
require.NoError(t, err)
|
||||
@@ -1589,7 +1589,7 @@ func TestClientPlayDifferentInterleavedIDs(t *testing.T) {
|
||||
}
|
||||
|
||||
err = readAll(&c, "rtsp://localhost:8554/teststream",
|
||||
func(medi *media.Media, forma format.Format, pkt *rtp.Packet) {
|
||||
func(medi *media.Media, forma formats.Format, pkt *rtp.Packet) {
|
||||
close(packetRecv)
|
||||
})
|
||||
require.NoError(t, err)
|
||||
@@ -1776,7 +1776,7 @@ func TestClientPlayRedirect(t *testing.T) {
|
||||
ru = "rtsp://testusr:testpwd@localhost:8554/path1"
|
||||
}
|
||||
err = readAll(&c, ru,
|
||||
func(medi *media.Media, forma format.Format, pkt *rtp.Packet) {
|
||||
func(medi *media.Media, forma formats.Format, pkt *rtp.Packet) {
|
||||
close(packetRecv)
|
||||
})
|
||||
require.NoError(t, err)
|
||||
@@ -1976,7 +1976,7 @@ func TestClientPlayPause(t *testing.T) {
|
||||
}
|
||||
|
||||
err = readAll(&c, "rtsp://localhost:8554/teststream",
|
||||
func(medi *media.Media, forma format.Format, pkt *rtp.Packet) {
|
||||
func(medi *media.Media, forma formats.Format, pkt *rtp.Packet) {
|
||||
if atomic.SwapInt32(&firstFrame, 1) == 0 {
|
||||
close(packetRecv)
|
||||
}
|
||||
@@ -2440,7 +2440,7 @@ func TestClientPlayIgnoreTCPInvalidMedia(t *testing.T) {
|
||||
}
|
||||
|
||||
err = readAll(&c, "rtsp://localhost:8554/teststream",
|
||||
func(medi *media.Media, forma format.Format, pkt *rtp.Packet) {
|
||||
func(medi *media.Media, forma formats.Format, pkt *rtp.Packet) {
|
||||
close(recv)
|
||||
})
|
||||
require.NoError(t, err)
|
||||
@@ -2858,7 +2858,7 @@ func TestClientPlayDifferentSource(t *testing.T) {
|
||||
}
|
||||
|
||||
err = readAll(&c, "rtsp://localhost:8554/test/stream?param=value",
|
||||
func(medi *media.Media, forma format.Format, pkt *rtp.Packet) {
|
||||
func(medi *media.Media, forma formats.Format, pkt *rtp.Packet) {
|
||||
require.Equal(t, &testRTPPacket, pkt)
|
||||
close(packetRecv)
|
||||
})
|
||||
@@ -2920,7 +2920,7 @@ func TestClientPlayDecodeErrors(t *testing.T) {
|
||||
|
||||
medias := media.Medias{&media.Media{
|
||||
Type: media.TypeApplication,
|
||||
Formats: []format.Format{&format.Generic{
|
||||
Formats: []formats.Format{&formats.Generic{
|
||||
PayloadTyp: 97,
|
||||
RTPMap: "private/90000",
|
||||
}},
|
||||
|
@@ -15,7 +15,7 @@ import (
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/base"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/conn"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/headers"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/sdp"
|
||||
@@ -24,7 +24,7 @@ import (
|
||||
|
||||
var testH264Media = &media.Media{
|
||||
Type: media.TypeVideo,
|
||||
Formats: []format.Format{&format.H264{
|
||||
Formats: []formats.Format{&formats.H264{
|
||||
PayloadTyp: 96,
|
||||
SPS: []byte{0x01, 0x02, 0x03, 0x04},
|
||||
PPS: []byte{0x01, 0x02, 0x03, 0x04},
|
||||
|
@@ -5,7 +5,7 @@ import (
|
||||
"net"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
@@ -38,7 +38,7 @@ func main() {
|
||||
// create a media that contains a G711 format
|
||||
medi := &media.Media{
|
||||
Type: media.TypeAudio,
|
||||
Formats: []format.Format{&format.G711{}},
|
||||
Formats: []formats.Format{&formats.G711{}},
|
||||
}
|
||||
|
||||
c := gortsplib.Client{}
|
||||
|
@@ -5,7 +5,7 @@ import (
|
||||
"net"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
@@ -38,7 +38,7 @@ func main() {
|
||||
// create a media that contains a G722 format
|
||||
medi := &media.Media{
|
||||
Type: media.TypeAudio,
|
||||
Formats: []format.Format{&format.G722{}},
|
||||
Formats: []formats.Format{&formats.G722{}},
|
||||
}
|
||||
|
||||
c := gortsplib.Client{}
|
||||
|
@@ -5,7 +5,7 @@ import (
|
||||
"net"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
@@ -39,7 +39,7 @@ func main() {
|
||||
// create a media that contains a H264 format
|
||||
medi := &media.Media{
|
||||
Type: media.TypeVideo,
|
||||
Formats: []format.Format{&format.H264{
|
||||
Formats: []formats.Format{&formats.H264{
|
||||
PayloadTyp: 96,
|
||||
PacketizationMode: 1,
|
||||
}},
|
||||
|
@@ -5,7 +5,7 @@ import (
|
||||
"net"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
@@ -39,7 +39,7 @@ func main() {
|
||||
// create a media that contains a H265 format
|
||||
medi := &media.Media{
|
||||
Type: media.TypeVideo,
|
||||
Formats: []format.Format{&format.H265{
|
||||
Formats: []formats.Format{&formats.H265{
|
||||
PayloadTyp: 96,
|
||||
}},
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@ import (
|
||||
"net"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
@@ -38,7 +38,7 @@ func main() {
|
||||
// create a media that contains a LPCM format
|
||||
medi := &media.Media{
|
||||
Type: media.TypeAudio,
|
||||
Formats: []format.Format{&format.LPCM{
|
||||
Formats: []formats.Format{&formats.LPCM{
|
||||
PayloadTyp: 96,
|
||||
BitDepth: 16,
|
||||
SampleRate: 44100,
|
||||
|
@@ -5,7 +5,7 @@ import (
|
||||
"net"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
@@ -38,7 +38,7 @@ func main() {
|
||||
// create a media that contains a M-JPEG format
|
||||
medi := &media.Media{
|
||||
Type: media.TypeVideo,
|
||||
Formats: []format.Format{&format.MJPEG{}},
|
||||
Formats: []formats.Format{&formats.MJPEG{}},
|
||||
}
|
||||
|
||||
// connect to the server and start recording the media
|
||||
|
@@ -6,7 +6,7 @@ import (
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/codecs/mpeg4audio"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
@@ -39,7 +39,7 @@ func main() {
|
||||
// create a media that contains a MPEG4-audio format
|
||||
medi := &media.Media{
|
||||
Type: media.TypeAudio,
|
||||
Formats: []format.Format{&format.MPEG4Audio{
|
||||
Formats: []formats.Format{&formats.MPEG4Audio{
|
||||
PayloadTyp: 96,
|
||||
Config: &mpeg4audio.Config{
|
||||
Type: mpeg4audio.ObjectTypeAACLC,
|
||||
|
@@ -5,7 +5,7 @@ import (
|
||||
"net"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
@@ -38,7 +38,7 @@ func main() {
|
||||
// create a media that contains a Opus format
|
||||
medi := &media.Media{
|
||||
Type: media.TypeAudio,
|
||||
Formats: []format.Format{&format.Opus{
|
||||
Formats: []formats.Format{&formats.Opus{
|
||||
PayloadTyp: 96,
|
||||
IsStereo: false,
|
||||
}},
|
||||
|
@@ -5,7 +5,7 @@ import (
|
||||
"net"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
@@ -39,7 +39,7 @@ func main() {
|
||||
// create a media that contains a VP8 format
|
||||
medi := &media.Media{
|
||||
Type: media.TypeVideo,
|
||||
Formats: []format.Format{&format.VP8{
|
||||
Formats: []formats.Format{&formats.VP8{
|
||||
PayloadTyp: 96,
|
||||
}},
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@ import (
|
||||
"net"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
@@ -39,7 +39,7 @@ func main() {
|
||||
// create a media that contains a VP9 format
|
||||
medi := &media.Media{
|
||||
Type: media.TypeVideo,
|
||||
Formats: []format.Format{&format.VP9{
|
||||
Formats: []formats.Format{&formats.VP9{
|
||||
PayloadTyp: 96,
|
||||
}},
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
@@ -40,7 +40,7 @@ func main() {
|
||||
// create a media that contains a H264 media
|
||||
medi := &media.Media{
|
||||
Type: media.TypeVideo,
|
||||
Formats: []format.Format{&format.H264{
|
||||
Formats: []formats.Format{&formats.H264{
|
||||
PayloadTyp: 96,
|
||||
PacketizationMode: 1,
|
||||
}},
|
||||
|
@@ -6,7 +6,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
@@ -41,7 +41,7 @@ func main() {
|
||||
// create a media that contains a H264 format
|
||||
medi := &media.Media{
|
||||
Type: media.TypeVideo,
|
||||
Formats: []format.Format{&format.H264{
|
||||
Formats: []formats.Format{&formats.H264{
|
||||
PayloadTyp: 96,
|
||||
PacketizationMode: 1,
|
||||
}},
|
||||
|
@@ -4,7 +4,7 @@ import (
|
||||
"log"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/url"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
@@ -37,7 +37,7 @@ func main() {
|
||||
}
|
||||
|
||||
// find the G711 media and format
|
||||
var forma *format.G711
|
||||
var forma *formats.G711
|
||||
medi := medias.FindFormat(&forma)
|
||||
if medi == nil {
|
||||
panic("media not found")
|
||||
|
@@ -4,7 +4,7 @@ import (
|
||||
"log"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/url"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
@@ -37,7 +37,7 @@ func main() {
|
||||
}
|
||||
|
||||
// find the G722 media and format
|
||||
var forma *format.G722
|
||||
var forma *formats.G722
|
||||
medi := medias.FindFormat(&forma)
|
||||
if medi == nil {
|
||||
panic("media not found")
|
||||
|
@@ -9,8 +9,8 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formatdecenc/rtph264"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats/rtph264"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/url"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
@@ -64,7 +64,7 @@ func main() {
|
||||
}
|
||||
|
||||
// find the H264 media and format
|
||||
var forma *format.H264
|
||||
var forma *formats.H264
|
||||
medi := medias.FindFormat(&forma)
|
||||
if medi == nil {
|
||||
panic("media not found")
|
||||
|
@@ -4,8 +4,8 @@ import (
|
||||
"log"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formatdecenc/rtph264"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats/rtph264"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/url"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
@@ -38,7 +38,7 @@ func main() {
|
||||
}
|
||||
|
||||
// find the H264 media and format
|
||||
var forma *format.H264
|
||||
var forma *formats.H264
|
||||
medi := medias.FindFormat(&forma)
|
||||
if medi == nil {
|
||||
panic("media not found")
|
||||
|
@@ -4,8 +4,8 @@ import (
|
||||
"log"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formatdecenc/rtph264"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats/rtph264"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/url"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
@@ -41,7 +41,7 @@ func main() {
|
||||
}
|
||||
|
||||
// find the H264 media and format
|
||||
var forma *format.H264
|
||||
var forma *formats.H264
|
||||
medi := medias.FindFormat(&forma)
|
||||
if medi == nil {
|
||||
panic("media not found")
|
||||
|
@@ -4,8 +4,8 @@ import (
|
||||
"log"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formatdecenc/rtph265"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats/rtph265"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/url"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
@@ -38,7 +38,7 @@ func main() {
|
||||
}
|
||||
|
||||
// find the H265 media and format
|
||||
var forma *format.H265
|
||||
var forma *formats.H265
|
||||
medi := medias.FindFormat(&forma)
|
||||
if medi == nil {
|
||||
panic("media not found")
|
||||
|
@@ -4,7 +4,7 @@ import (
|
||||
"log"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/url"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
@@ -37,7 +37,7 @@ func main() {
|
||||
}
|
||||
|
||||
// find the LPCM media and format
|
||||
var forma *format.LPCM
|
||||
var forma *formats.LPCM
|
||||
medi := medias.FindFormat(&forma)
|
||||
if medi == nil {
|
||||
panic("media not found")
|
||||
|
@@ -6,8 +6,8 @@ import (
|
||||
"log"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formatdecenc/rtpmjpeg"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats/rtpmjpeg"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/url"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
@@ -41,7 +41,7 @@ func main() {
|
||||
}
|
||||
|
||||
// find the M-JPEG media and format
|
||||
var forma *format.MJPEG
|
||||
var forma *formats.MJPEG
|
||||
medi := medias.FindFormat(&forma)
|
||||
if medi == nil {
|
||||
panic("media not found")
|
||||
|
@@ -4,7 +4,7 @@ import (
|
||||
"log"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/url"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
@@ -37,7 +37,7 @@ func main() {
|
||||
}
|
||||
|
||||
// find the MPEG4-audio media and format
|
||||
var forma *format.MPEG4Audio
|
||||
var forma *formats.MPEG4Audio
|
||||
medi := medias.FindFormat(&forma)
|
||||
if medi == nil {
|
||||
panic("media not found")
|
||||
|
@@ -4,7 +4,7 @@ import (
|
||||
"log"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/url"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
@@ -37,7 +37,7 @@ func main() {
|
||||
}
|
||||
|
||||
// find the Opus media and format
|
||||
var forma *format.Opus
|
||||
var forma *formats.Opus
|
||||
medi := medias.FindFormat(&forma)
|
||||
if medi == nil {
|
||||
panic("media not found")
|
||||
|
@@ -4,8 +4,8 @@ import (
|
||||
"log"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formatdecenc/rtpvp8"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats/rtpvp8"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/url"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
@@ -38,7 +38,7 @@ func main() {
|
||||
}
|
||||
|
||||
// find the VP8 media and format
|
||||
var forma *format.VP8
|
||||
var forma *formats.VP8
|
||||
medi := medias.FindFormat(&forma)
|
||||
if medi == nil {
|
||||
panic("media not found")
|
||||
|
@@ -4,8 +4,8 @@ import (
|
||||
"log"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formatdecenc/rtpvp9"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats/rtpvp9"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/url"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
@@ -38,7 +38,7 @@ func main() {
|
||||
}
|
||||
|
||||
// find the VP9 media and format
|
||||
var forma *format.VP9
|
||||
var forma *formats.VP9
|
||||
medi := medias.FindFormat(&forma)
|
||||
if medi == nil {
|
||||
panic("media not found")
|
||||
|
@@ -5,7 +5,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/url"
|
||||
"github.com/pion/rtcp"
|
||||
@@ -53,7 +53,7 @@ func main() {
|
||||
}
|
||||
|
||||
// called when a RTP packet arrives
|
||||
c.OnPacketRTPAny(func(medi *media.Media, forma format.Format, pkt *rtp.Packet) {
|
||||
c.OnPacketRTPAny(func(medi *media.Media, forma formats.Format, pkt *rtp.Packet) {
|
||||
log.Printf("RTP packet from media %v\n", medi)
|
||||
})
|
||||
|
||||
|
@@ -5,7 +5,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/url"
|
||||
"github.com/pion/rtcp"
|
||||
@@ -47,7 +47,7 @@ func main() {
|
||||
}
|
||||
|
||||
// called when a RTP packet arrives
|
||||
c.OnPacketRTPAny(func(medi *media.Media, forma format.Format, pkt *rtp.Packet) {
|
||||
c.OnPacketRTPAny(func(medi *media.Media, forma formats.Format, pkt *rtp.Packet) {
|
||||
log.Printf("RTP packet from media %v\n", medi)
|
||||
})
|
||||
|
||||
|
@@ -4,7 +4,7 @@ import (
|
||||
"log"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/url"
|
||||
"github.com/pion/rtp"
|
||||
@@ -54,7 +54,7 @@ func main() {
|
||||
defer publisher.Close()
|
||||
|
||||
// read RTP packets from the reader and route them to the publisher
|
||||
reader.OnPacketRTPAny(func(medi *media.Media, forma format.Format, pkt *rtp.Packet) {
|
||||
reader.OnPacketRTPAny(func(medi *media.Media, forma formats.Format, pkt *rtp.Packet) {
|
||||
publisher.WritePacketRTP(medi, pkt)
|
||||
})
|
||||
|
||||
|
@@ -4,7 +4,7 @@ import (
|
||||
"log"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/url"
|
||||
"github.com/pion/rtcp"
|
||||
@@ -44,7 +44,7 @@ func main() {
|
||||
}
|
||||
|
||||
// called when a RTP packet arrives
|
||||
c.OnPacketRTPAny(func(medi *media.Media, forma format.Format, pkt *rtp.Packet) {
|
||||
c.OnPacketRTPAny(func(medi *media.Media, forma formats.Format, pkt *rtp.Packet) {
|
||||
log.Printf("RTP packet from media %v\n", medi)
|
||||
})
|
||||
|
||||
|
@@ -6,7 +6,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/url"
|
||||
"github.com/pion/rtp"
|
||||
@@ -93,7 +93,7 @@ func (c *client) read() error {
|
||||
}()
|
||||
|
||||
// called when a RTP packet arrives
|
||||
rc.OnPacketRTPAny(func(medi *media.Media, forma format.Format, pkt *rtp.Packet) {
|
||||
rc.OnPacketRTPAny(func(medi *media.Media, forma formats.Format, pkt *rtp.Packet) {
|
||||
// route incoming packets to the server stream
|
||||
stream.WritePacketRTP(medi, pkt)
|
||||
})
|
||||
|
@@ -9,8 +9,8 @@ import (
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/base"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formatdecenc/rtph264"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats/rtph264"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
)
|
||||
|
||||
@@ -23,7 +23,7 @@ type serverHandler struct {
|
||||
mutex sync.Mutex
|
||||
publisher *gortsplib.ServerSession
|
||||
media *media.Media
|
||||
format *format.H264
|
||||
format *formats.H264
|
||||
rtpDec *rtph264.Decoder
|
||||
mpegtsMuxer *mpegtsMuxer
|
||||
}
|
||||
@@ -67,7 +67,7 @@ func (sh *serverHandler) OnAnnounce(ctx *gortsplib.ServerHandlerOnAnnounceCtx) (
|
||||
}
|
||||
|
||||
// find the H264 media and format
|
||||
var forma *format.H264
|
||||
var forma *formats.H264
|
||||
medi := ctx.Medias.FindFormat(&forma)
|
||||
if medi == nil {
|
||||
return &base.Response{
|
||||
|
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/base"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
)
|
||||
|
||||
@@ -126,7 +126,7 @@ func (sh *serverHandler) OnRecord(ctx *gortsplib.ServerHandlerOnRecordCtx) (*bas
|
||||
log.Printf("record request")
|
||||
|
||||
// called when receiving a RTP packet
|
||||
ctx.Session.OnPacketRTPAny(func(medi *media.Media, forma format.Format, pkt *rtp.Packet) {
|
||||
ctx.Session.OnPacketRTPAny(func(medi *media.Media, forma formats.Format, pkt *rtp.Packet) {
|
||||
// route the RTP packet to all readers
|
||||
sh.stream.WritePacketRTP(medi, pkt)
|
||||
})
|
||||
|
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/base"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
)
|
||||
|
||||
@@ -125,7 +125,7 @@ func (sh *serverHandler) OnRecord(ctx *gortsplib.ServerHandlerOnRecordCtx) (*bas
|
||||
log.Printf("record request")
|
||||
|
||||
// called when receiving a RTP packet
|
||||
ctx.Session.OnPacketRTPAny(func(medi *media.Media, forma format.Format, pkt *rtp.Packet) {
|
||||
ctx.Session.OnPacketRTPAny(func(medi *media.Media, forma formats.Format, pkt *rtp.Packet) {
|
||||
// route the RTP packet to all readers
|
||||
sh.stream.WritePacketRTP(medi, pkt)
|
||||
})
|
||||
|
@@ -19,7 +19,7 @@ import (
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/base"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/format"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/media"
|
||||
)
|
||||
|
||||
@@ -385,7 +385,7 @@ func TestServerRecordRead(t *testing.T) {
|
||||
}, fmt.Errorf("invalid query (%s)", ctx.Query)
|
||||
}
|
||||
|
||||
ctx.Session.OnPacketRTPAny(func(medi *media.Media, forma format.Format, pkt *rtp.Packet) {
|
||||
ctx.Session.OnPacketRTPAny(func(medi *media.Media, forma formats.Format, pkt *rtp.Packet) {
|
||||
stream.WritePacketRTP(medi, pkt)
|
||||
})
|
||||
|
||||
|
@@ -1,2 +0,0 @@
|
||||
// Package formatdecenc contains decoders and encoders to decode and encode RTP packets.
|
||||
package formatdecenc
|
@@ -1,5 +1,5 @@
|
||||
// Package format contains format definitions.
|
||||
package format
|
||||
// Package formats contains RTP format definitions, decoders and encoders.
|
||||
package formats
|
||||
|
||||
import (
|
||||
"strconv"
|
@@ -1,4 +1,4 @@
|
||||
package format
|
||||
package formats
|
||||
|
||||
import (
|
||||
"testing"
|
@@ -1,9 +1,9 @@
|
||||
package format
|
||||
package formats
|
||||
|
||||
import (
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formatdecenc/rtpsimpleaudio"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats/rtpsimpleaudio"
|
||||
)
|
||||
|
||||
// G711 is a format that uses the G711 codec, encoded with mu-law or A-law.
|
@@ -1,4 +1,4 @@
|
||||
package format
|
||||
package formats
|
||||
|
||||
import (
|
||||
"testing"
|
@@ -1,9 +1,9 @@
|
||||
package format
|
||||
package formats
|
||||
|
||||
import (
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formatdecenc/rtpsimpleaudio"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats/rtpsimpleaudio"
|
||||
)
|
||||
|
||||
// G722 is a format that uses the G722 codec.
|
@@ -1,4 +1,4 @@
|
||||
package format
|
||||
package formats
|
||||
|
||||
import (
|
||||
"testing"
|
@@ -1,4 +1,4 @@
|
||||
package format
|
||||
package formats
|
||||
|
||||
import (
|
||||
"fmt"
|
@@ -1,4 +1,4 @@
|
||||
package format
|
||||
package formats
|
||||
|
||||
import (
|
||||
"testing"
|
@@ -1,4 +1,4 @@
|
||||
package format
|
||||
package formats
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/codecs/h264"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formatdecenc/rtph264"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats/rtph264"
|
||||
)
|
||||
|
||||
// check whether a RTP/H264 packet contains a IDR, without decoding the packet.
|
@@ -1,4 +1,4 @@
|
||||
package format
|
||||
package formats
|
||||
|
||||
import (
|
||||
"testing"
|
@@ -1,4 +1,4 @@
|
||||
package format
|
||||
package formats
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formatdecenc/rtph265"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats/rtph265"
|
||||
)
|
||||
|
||||
// H265 is a format that uses the H265 codec.
|
@@ -1,4 +1,4 @@
|
||||
package format
|
||||
package formats
|
||||
|
||||
import (
|
||||
"testing"
|
@@ -1,4 +1,4 @@
|
||||
package format
|
||||
package formats
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formatdecenc/rtplpcm"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats/rtplpcm"
|
||||
)
|
||||
|
||||
// LPCM is a format that uses the uncompressed, Linear PCM codec.
|
@@ -1,4 +1,4 @@
|
||||
package format
|
||||
package formats
|
||||
|
||||
import (
|
||||
"fmt"
|
@@ -1,9 +1,9 @@
|
||||
package format
|
||||
package formats
|
||||
|
||||
import (
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formatdecenc/rtpmjpeg"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats/rtpmjpeg"
|
||||
)
|
||||
|
||||
// MJPEG is a format that uses the Motion-JPEG codec.
|
@@ -1,4 +1,4 @@
|
||||
package format
|
||||
package formats
|
||||
|
||||
import (
|
||||
"testing"
|
@@ -1,4 +1,4 @@
|
||||
package format
|
||||
package formats
|
||||
|
||||
import (
|
||||
"github.com/pion/rtp"
|
@@ -1,4 +1,4 @@
|
||||
package format
|
||||
package formats
|
||||
|
||||
import (
|
||||
"testing"
|
@@ -1,4 +1,4 @@
|
||||
package format
|
||||
package formats
|
||||
|
||||
import (
|
||||
"github.com/pion/rtp"
|
@@ -1,4 +1,4 @@
|
||||
package format
|
||||
package formats
|
||||
|
||||
import (
|
||||
"testing"
|
@@ -1,4 +1,4 @@
|
||||
package format
|
||||
package formats
|
||||
|
||||
import (
|
||||
"encoding/hex"
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/codecs/mpeg4audio"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formatdecenc/rtpmpeg4audio"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats/rtpmpeg4audio"
|
||||
)
|
||||
|
||||
// MPEG4Audio is a format that uses a MPEG-4 audio codec.
|
@@ -1,4 +1,4 @@
|
||||
package format
|
||||
package formats
|
||||
|
||||
import (
|
||||
"testing"
|
@@ -1,4 +1,4 @@
|
||||
package format
|
||||
package formats
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formatdecenc/rtpsimpleaudio"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats/rtpsimpleaudio"
|
||||
)
|
||||
|
||||
// Opus is a format that uses the Opus codec.
|
@@ -1,4 +1,4 @@
|
||||
package format
|
||||
package formats
|
||||
|
||||
import (
|
||||
"testing"
|
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/codecs/jpeg"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formatdecenc/rtpmjpeg/headers"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats/rtpmjpeg/headers"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/rtptime"
|
||||
)
|
||||
|
@@ -9,7 +9,7 @@ import (
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/codecs/jpeg"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formatdecenc/rtpmjpeg/headers"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/formats/rtpmjpeg/headers"
|
||||
"github.com/bluenviron/gortsplib/v3/pkg/rtptime"
|
||||
)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user