update docs

This commit is contained in:
aler9
2022-04-01 12:08:17 +02:00
parent cec5326ccf
commit 6c6c6c68c9
3 changed files with 7 additions and 7 deletions

View File

@@ -17,7 +17,7 @@ import (
// This example shows how to // This example shows how to
// 1. connect to a RTSP server and read all tracks on a path // 1. connect to a RTSP server and read all tracks on a path
// 2. check if there's a H264 track // 2. check if there's a H264 track
// 3. decode H264 into raw frames // 3. decode H264 into RGBA frames
// 4. encode the frames into JPEG images and save them on disk // 4. encode the frames into JPEG images and save them on disk
// This example requires the ffmpeg libraries, that can be installed in this way: // This example requires the ffmpeg libraries, that can be installed in this way:
@@ -101,14 +101,14 @@ func main() {
return return
} }
// decode H264 NALUs from the RTP packet // convert RTP packet to H264 NALUs
nalus, _, err := rtpDec.Decode(pkt) nalus, _, err := rtpDec.Decode(pkt)
if err != nil { if err != nil {
return return
} }
for _, nalu := range nalus { for _, nalu := range nalus {
// decode raw frames from H264 NALUs // convert H264 NALUs to RGBA frames
img, err := h264dec.decode(nalu) img, err := h264dec.decode(nalu)
if err != nil { if err != nil {
panic(err) panic(err)

View File

@@ -63,7 +63,7 @@ func main() {
return return
} }
// decode H264 NALUs from the RTP packet // convert RTP packet to H264 NALUs
nalus, pts, err := rtpDec.DecodeUntilMarker(pkt) nalus, pts, err := rtpDec.DecodeUntilMarker(pkt)
if err != nil { if err != nil {
return return

View File

@@ -12,7 +12,7 @@ import (
// This example shows how to // This example shows how to
// 1. connect to a RTSP server and read all tracks on a path // 1. connect to a RTSP server and read all tracks on a path
// 2. check if there's an H264 track // 2. check if there's an H264 track
// 3. decode H264 into raw frames // 3. decode H264 into RGBA frames
// This example requires the ffmpeg libraries, that can be installed in this way: // This example requires the ffmpeg libraries, that can be installed in this way:
// apt install -y libavformat-dev libswscale-dev gcc pkg-config // apt install -y libavformat-dev libswscale-dev gcc pkg-config
@@ -77,14 +77,14 @@ func main() {
return return
} }
// decode H264 NALUs from the RTP packet // convert RTP packet to H264 NALUs
nalus, _, err := rtpDec.Decode(pkt) nalus, _, err := rtpDec.Decode(pkt)
if err != nil { if err != nil {
return return
} }
for _, nalu := range nalus { for _, nalu := range nalus {
// decode raw frames from H264 NALUs // convert H264 NALUs to RGBA frames
img, err := h264dec.decode(nalu) img, err := h264dec.decode(nalu)
if err != nil { if err != nil {
panic(err) panic(err)