mirror of
https://github.com/sipeed/NanoKVM.git
synced 2026-09-11 00:22:56 -05:00
Route Direct and WebRTC consumers through one H264 capture source to avoid duplicate VENC reads. Overlap WebRTC capture with ordered RTP/SRTP writes and packetize each access unit once for all WebRTC clients. Add libopencv_video.so.409 into dl_lib.
16 lines
237 B
Go
16 lines
237 B
Go
package webrtc
|
|
|
|
import (
|
|
"github.com/pion/rtp"
|
|
)
|
|
|
|
func (t *Track) writeVideoPackets(packets []*rtp.Packet) error {
|
|
for _, packet := range packets {
|
|
if err := t.video.WriteRTP(packet); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
return nil
|
|
}
|