diff --git a/examples/client-publish-options/main.go b/examples/client-publish-options/main.go index 59fc7e99..f2a20f48 100644 --- a/examples/client-publish-options/main.go +++ b/examples/client-publish-options/main.go @@ -12,7 +12,7 @@ import ( // This example shows how to // 1. set additional client options // 2. generate RTP/H264 frames from a file with Gstreamer -// 3. connect to a RTSP server, announce a H264 track +// 3. connect to a RTSP server, announce an H264 track // 4. write the frames to the server func main() { @@ -35,7 +35,7 @@ func main() { } fmt.Println("stream connected") - // create a H264 track + // create an H264 track track, err := gortsplib.NewTrackH264(96, &gortsplib.TrackConfigH264{sps, pps}) if err != nil { panic(err) diff --git a/examples/client-publish-pause/main.go b/examples/client-publish-pause/main.go index 39685374..c6d77b60 100644 --- a/examples/client-publish-pause/main.go +++ b/examples/client-publish-pause/main.go @@ -11,7 +11,7 @@ import ( // This example shows how to // 1. generate RTP/H264 frames from a file with Gstreamer -// 2. connect to a RTSP server, announce a H264 track +// 2. connect to a RTSP server, announce an H264 track // 3. write the frames to the server for 5 seconds // 4. pause for 5 seconds // 5. repeat @@ -36,7 +36,7 @@ func main() { } fmt.Println("stream connected") - // create a H264 track + // create an H264 track track, err := gortsplib.NewTrackH264(96, &gortsplib.TrackConfigH264{sps, pps}) if err != nil { panic(err) diff --git a/examples/client-publish/main.go b/examples/client-publish/main.go index 0620a23b..4b9366db 100644 --- a/examples/client-publish/main.go +++ b/examples/client-publish/main.go @@ -10,7 +10,7 @@ import ( // This example shows how to // 1. generate RTP/H264 frames from a file with Gstreamer -// 2. connect to a RTSP server, announce a H264 track +// 2. connect to a RTSP server, announce an H264 track // 3. write the frames to the server func main() { @@ -33,7 +33,7 @@ func main() { } fmt.Println("stream connected") - // create a H264 track + // create an H264 track track, err := gortsplib.NewTrackH264(96, &gortsplib.TrackConfigH264{sps, pps}) if err != nil { panic(err) diff --git a/examples/client-read-h264/main.go b/examples/client-read-h264/main.go index 16d598ea..020b4eb3 100644 --- a/examples/client-read-h264/main.go +++ b/examples/client-read-h264/main.go @@ -9,7 +9,7 @@ import ( // This example shows how to // 1. connect to a RTSP server and read all tracks on a path -// 2. check whether there's a H264 track +// 2. check whether there's an H264 track // 3. get H264 NALUs of that track func main() { diff --git a/track.go b/track.go index fcf81aff..80444f5b 100644 --- a/track.go +++ b/track.go @@ -140,7 +140,7 @@ func (t *Track) ClockRate() (int, error) { return 0, fmt.Errorf("attribute 'rtpmap' not found") } -// NewTrackH264 initializes an H264 track from a SPS and PPS. +// NewTrackH264 initializes an H264 track. func NewTrackH264(payloadType uint8, conf *TrackConfigH264) (*Track, error) { spropParameterSets := base64.StdEncoding.EncodeToString(conf.SPS) + "," + base64.StdEncoding.EncodeToString(conf.PPS) @@ -171,7 +171,7 @@ func NewTrackH264(payloadType uint8, conf *TrackConfigH264) (*Track, error) { }, nil } -// IsH264 checks whether the track is a H264 track. +// IsH264 checks whether the track is an H264 track. func (t *Track) IsH264() bool { if t.Media.MediaName.Media != "video" { return false @@ -190,7 +190,7 @@ func (t *Track) IsH264() bool { return vals[1] == "H264/90000" } -// ExtractConfigH264 extracts the configuration from an H264 track. +// ExtractConfigH264 extracts the configuration of an H264 track. func (t *Track) ExtractConfigH264() (*TrackConfigH264, error) { v, ok := t.Media.Attribute("fmtp") if !ok { @@ -302,7 +302,7 @@ func (t *Track) IsAAC() bool { return strings.HasPrefix(strings.ToLower(vals[1]), "mpeg4-generic/") } -// ExtractConfigAAC extracts the configuration from an AAC track. +// ExtractConfigAAC extracts the configuration of an AAC track. func (t *Track) ExtractConfigAAC() (*TrackConfigAAC, error) { v, ok := t.Media.Attribute("fmtp") if !ok {