raw muxer annexB h264 h265

This commit is contained in:
deepch
2021-09-30 02:10:08 +03:00
parent a77315fe6e
commit 161a0454da
6 changed files with 89 additions and 5 deletions

View File

@@ -170,6 +170,10 @@ func Dial(options RTSPClientOptions) (*RTSPClient, error) {
client.CodecData = append(client.CodecData, h265parser.CodecData{})
}
client.videoCodec = av.H265
//} else if i2.Type == av.JPEG {
// client.CodecData = append(client.CodecData, h264parser.CodecData{})
// client.WaitCodec = true
// client.videoCodec = av.H264
} else {
client.Println("SDP Video Codec Type Not Supported", i2.Type)
}
@@ -216,7 +220,7 @@ func Dial(options RTSPClientOptions) (*RTSPClient, error) {
}
ch += 2
}
//test := map[string]string{"Scale": "1.000000", "Speed": "1.000000", "Range": "clock=20210929T210000Z-20210929T211000Z"}
err = client.request(PLAY, nil, client.control, false, false)
if err != nil {
return nil, err
@@ -607,7 +611,7 @@ func (client *RTSPClient) RTPDemuxer(payloadRAW *[]byte) ([]*av.Packet, bool) {
client.BufferRtpPacket.Write(nal[3:])
}
default:
client.Println("Unsupported Nal", naluType)
//client.Println("Unsupported Nal", naluType)
}
} else if client.videoCodec == av.H264 {
@@ -671,7 +675,7 @@ func (client *RTSPClient) RTPDemuxer(payloadRAW *[]byte) ([]*av.Packet, bool) {
}
}
default:
client.Println("Unsupported NAL Type", naluType)
//client.Println("Unsupported NAL Type", naluType)
}
}
}