Implement an extraction of SRT DATA packets payload, e.g., for extracting MPEG-2 TS from SRT packets and writing it in a file. An approach can be the following:
- Extract SRT DATA packets, sort them by sequence number and delete duplicates. Important to remember that SRT sequence number is updated in cycles. The seq.no of the very first packet is transmitted within the handshake. The maximum value correspond to 31bits.
- Extract payload of the DATA packets remaining after step 1 and write it consequently in a file. Important to remember that the payload maybe encrypted. In this case, it should be preliminary decrypted and then written in a file. The key can be extracted from the handshakes.
Implement an extraction of SRT DATA packets payload, e.g., for extracting MPEG-2 TS from SRT packets and writing it in a file. An approach can be the following: