- At this time, the network packet is read,
- Network packages may have audio, video, subtitles, etc.
- MAX_QUEUE_SIZE is the upper limit of the total number of packets, ensuring that mPacketQueue cannot be too large or too small.
- Less than this value, the reading thread will wait.
- The usage of std::condition_variable.wait() and the pitfalls caused by design flaws have been deeply analyzed by the master.
int avFormatDemuxer::readLoop() loops to read network packets
std::unique_ptr<IAFPacket> pkt{
};
int ret = ReadPacketInternal(pkt)