CodePudding user response:
Oneself the top, there is a great god come and answer it for meCodePudding user response:
Not done so directly, but a few years ago have tried to use a PC (. Windows XP) to interface hai kang NVR, the principle aboutFirst of all, since it is a network (pure local area network) and it is a single link, there is no need to consider multipath packet order problem, my way is:
1. Using UDP (can be multicast), the sender logically default will not lost package, each UDP packet 1 k (1024 bytes) effectively, with a source ID (16), a frame number (16), a valid bytes (16 bits), interception of data flow is taken from the NVR directly after contract awarding,
Open up 128 k 2. The receiving end ring buffer, records receives the frame number, and immediately to the decoding, found the serial number break (on a receiving bag is N and the next is not N + 1) with UDP packet to the sender sends a directive resend the N + 1, when receiving an I frame buffer start immediately in front of the discarded,
This through debugging and won the best real-time degree, but apparently will only apply to pure LAN single link environment, hope to help you,
CodePudding user response:
If send nalu directly, receive udp packets may order will be upset, but the network condition good cases, this way is ok, I have done the similar, but the network conditions almost, this way is estimated washed-up, feel not slow RTP protocol, how much, also provides package order, the information such as timestamp,CodePudding user response: