#include "page.h"
#include "region.h"
#include <stdio.h>
#include "subtitle.h"

uint64_t cSubtitlesPage::debug = 0;

cSubtitlesPage::cSubtitlesPage( RegionList regions, int64_t pts, int timeout )
  :iPts( pts ), object_id(++debug),iTimeout(timeout)
{

  for (RegionList::iterator i = regions.begin(); 
       i != regions.end(); 
       i++ )
    {
	iSubtitles.push_back( new cSubtitle(*i) );
    }
}
cSubtitlesPage::~cSubtitlesPage()
{
  while(!iSubtitles.empty())
    {
	cSubtitle* sub = iSubtitles.front();
	iSubtitles.pop_front();
	delete sub;
    }
}

