void CutupProtocol::FreePackets( PacketList& packetList ) const { PacketList::iterator iter = packetList.begin(); for (; iter != packetList.end(); iter++) { FreePacket(*iter); } packetList.clear(); }
void CutupProtocol::MergePackets( const PacketList& packetList, ByteBuffer& byteData ) const { DWORD dwDataSize = 0; PacketList::const_iterator iter = packetList.begin(); for (; iter != packetList.end(); iter++) { dwDataSize += (*iter)->header.size; } byteData.Alloc(dwDataSize); LPBYTE pData = byteData; iter = packetList.begin(); for (; iter != packetList.end(); iter++) { if ((*iter)->header.size > 0) { memcpy(pData, (*iter)->data, (*iter)->header.size); pData += (*iter)->header.size; } } }
void Demux::clearPacketCache() { map<int, PacketList>::iterator it; for (it=_myPacketLists.begin(); it != _myPacketLists.end(); ++it) { PacketList::iterator it2; PacketList* thePacketList = &(it->second); for (it2=thePacketList->begin(); it2 != thePacketList->end(); ++it2) { av_free_packet(*it2); delete *it2; } thePacketList->clear(); } }
void FFMpegDemuxer::clearPacketCache() { map<int, PacketList>::iterator it; for (it = m_PacketLists.begin(); it != m_PacketLists.end(); ++it) { PacketList::iterator it2; PacketList* pPacketList = &(it->second); for (it2 = pPacketList->begin(); it2 != pPacketList->end(); ++it2) { av_free_packet(*it2); delete *it2; } pPacketList->clear(); } }
void Demux::clearPacketCache(const int theStreamIndex) { if (_myPacketLists.find(theStreamIndex) == _myPacketLists.end()) { AC_ERROR << "Demux::clearPacketCache called with nonexistent stream index " << theStreamIndex << "."; } PacketList * myCurPacketList = &(_myPacketLists.find(theStreamIndex)->second); PacketList::iterator it; for (it=myCurPacketList->begin(); it != myCurPacketList->end(); ++it) { av_free_packet(*it); delete *it; } myCurPacketList->clear(); }