mirror of
https://github.com/aler9/gortsplib
synced 2025-10-04 23:02:45 +08:00
rtph264: fully rewrite, decode NALU timestamp, add Process(), add tests
This commit is contained in:
@@ -28,9 +28,9 @@ func main() {
|
||||
"gst-launch-1.0 filesrc location=video.mp4 ! qtdemux ! video/x-h264" +
|
||||
" ! h264parse config-interval=1 ! rtph264pay ! udpsink host=127.0.0.1 port=9000")
|
||||
|
||||
// wait for RTP/H264 frames
|
||||
decoder := rtph264.NewDecoderFromPacketConn(pc)
|
||||
sps, pps, err := decoder.ReadSPSPPS()
|
||||
// get SPS and PPS
|
||||
decoder := rtph264.NewDecoder()
|
||||
sps, pps, err := decoder.ReadSPSPPS(rtph264.PacketConnReader{pc})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user