use log.Print instead of fmt.Print in examples

This commit is contained in:
aler9
2022-01-31 18:39:36 +01:00
parent 8251fe3556
commit 79fdb2b7b4
15 changed files with 40 additions and 39 deletions

View File

@@ -1,7 +1,7 @@
package main
import (
"fmt"
"log"
"net"
"github.com/aler9/gortsplib"
@@ -20,7 +20,7 @@ func main() {
}
defer pc.Close()
fmt.Println("Waiting for a RTP/AAC stream on UDP port 9000 - you can send one with Gstreamer:\n" +
log.Println("Waiting for a RTP/AAC stream on UDP port 9000 - you can send one with Gstreamer:\n" +
"gst-launch-1.0 audiotestsrc freq=300 ! audioconvert ! audioresample ! audio/x-raw,rate=48000" +
" ! avenc_aac bitrate=128000" +
" ! rtpmp4gpay ! udpsink host=127.0.0.1 port=9000")
@@ -31,7 +31,7 @@ func main() {
if err != nil {
panic(err)
}
fmt.Println("stream connected")
log.Println("stream connected")
// create an AAC track
track, err := gortsplib.NewTrackAAC(96, 2, 48000, 2, nil)