ns-allinone-2.35/rap/media-app.cc
int MediaSegmentList::evict_head(int size)
{
	int sz = size, tz;
	MediaSegment *tmp = (MediaSegment *)head_;
	while ((tmp != NULL) && (sz > 0)) {
		// Reduce the last segment's size and adjust its playout time
		tz = tmp->evict_head(sz);
		sz -= tz; 
		length_ -= tz;
		if (tmp->datasize() == 0) {
			// This segment is empty now
			detach(tmp);
			delete tmp;
			tmp = (MediaSegment *)head_;
		}
	}
	return size - sz;
}
// Evicting <size> from the head of the list
Evicting  from the head of the list
Evicting from the head of the list
int MediaSegmentList::evict_head(int size)
{
	int sz = size, tz;
	MediaSegment *tmp = (MediaSegment *)head_;
	while ((tmp != NULL) && (sz > 0)) {
		tz = tmp->evict_head(sz);
		sz -= tz; 
		length_ -= tz;
		if (tmp->datasize() == 0) {
			detach(tmp);
			delete tmp;
			tmp = (MediaSegment *)head_;
		}
	}
	return size - sz;
}
int MediaSegmentList :: evict_head ( int size ) { int sz = size , tz ; MediaSegment * tmp = ( MediaSegment * ) head_ ; while ( ( tmp != NULL ) && ( sz > 0 ) ) { tz = tmp -> evict_head ( sz ) ; sz -= tz ; length_ -= tz ; if ( tmp -> datasize ( ) == 0 ) { detach ( tmp ) ; delete tmp ; tmp = ( MediaSegment * ) head_ ; } } return size - sz ; }
Evicting <size> from the head of the list
Evicting <size > from the head of the list
// Reduce the last segment's size and adjust its playout time // This segment is empty now