update docs

This commit is contained in:
aler9
2022-03-18 16:55:19 +01:00
parent df2a0742ad
commit ba99421e74
6 changed files with 12 additions and 12 deletions

View File

@@ -52,13 +52,13 @@ func main() {
buf = make([]byte, 2048) buf = make([]byte, 2048)
var pkt rtp.Packet var pkt rtp.Packet
for { for {
// read packets from the source // read RTP packets from the source
n, _, err := pc.ReadFrom(buf) n, _, err := pc.ReadFrom(buf)
if err != nil { if err != nil {
panic(err) panic(err)
} }
// marshal RTP packets // parse RTP packets
err = pkt.Unmarshal(buf[:n]) err = pkt.Unmarshal(buf[:n])
if err != nil { if err != nil {
panic(err) panic(err)

View File

@@ -54,13 +54,13 @@ func main() {
buf := make([]byte, 2048) buf := make([]byte, 2048)
var pkt rtp.Packet var pkt rtp.Packet
for { for {
// read packets from the source // read RTP packets from the source
n, _, err := pc.ReadFrom(buf) n, _, err := pc.ReadFrom(buf)
if err != nil { if err != nil {
panic(err) panic(err)
} }
// marshal RTP packets // parse RTP packets
err = pkt.Unmarshal(buf[:n]) err = pkt.Unmarshal(buf[:n])
if err != nil { if err != nil {
panic(err) panic(err)

View File

@@ -63,13 +63,13 @@ func main() {
buf := make([]byte, 2048) buf := make([]byte, 2048)
var pkt rtp.Packet var pkt rtp.Packet
for { for {
// read packets from the source // read RTP packets from the source
n, _, err := pc.ReadFrom(buf) n, _, err := pc.ReadFrom(buf)
if err != nil { if err != nil {
panic(err) panic(err)
} }
// marshal RTP packets // parse RTP packets
err = pkt.Unmarshal(buf[:n]) err = pkt.Unmarshal(buf[:n])
if err != nil { if err != nil {
panic(err) panic(err)

View File

@@ -52,13 +52,13 @@ func main() {
buf = make([]byte, 2048) buf = make([]byte, 2048)
var pkt rtp.Packet var pkt rtp.Packet
for { for {
// read packets from the source // read RTP packets from the source
n, _, err := pc.ReadFrom(buf) n, _, err := pc.ReadFrom(buf)
if err != nil { if err != nil {
panic(err) panic(err)
} }
// marshal RTP packets // parse RTP packets
err = pkt.Unmarshal(buf[:n]) err = pkt.Unmarshal(buf[:n])
if err != nil { if err != nil {
panic(err) panic(err)

View File

@@ -58,13 +58,13 @@ func main() {
buf := make([]byte, 2048) buf := make([]byte, 2048)
var pkt rtp.Packet var pkt rtp.Packet
for { for {
// read packets from the source // read RTP packets from the source
n, _, err := pc.ReadFrom(buf) n, _, err := pc.ReadFrom(buf)
if err != nil { if err != nil {
break break
} }
// marshal RTP packets // parse RTP packets
err = pkt.Unmarshal(buf[:n]) err = pkt.Unmarshal(buf[:n])
if err != nil { if err != nil {
panic(err) panic(err)

View File

@@ -49,13 +49,13 @@ func main() {
buf = make([]byte, 2048) buf = make([]byte, 2048)
var pkt rtp.Packet var pkt rtp.Packet
for { for {
// read packets from the source // read RTP packets from the source
n, _, err := pc.ReadFrom(buf) n, _, err := pc.ReadFrom(buf)
if err != nil { if err != nil {
panic(err) panic(err)
} }
// marshal RTP packets // parse RTP packets
err = pkt.Unmarshal(buf[:n]) err = pkt.Unmarshal(buf[:n])
if err != nil { if err != nil {
panic(err) panic(err)