Пример #1
0
QString EventInformationTable::toString(void) const
{
    QString str;
    str.append(QString("Event Information Table\n"));
    str.append(((PSIPTable*)(this))->toString());
    str.append(QString("      pid(0x%1) sourceID(%2) eventCount(%3)\n")
               .arg(tsheader()->PID()).arg(SourceID()).arg(EventCount()));
    for (uint i = 0; i < EventCount(); i++)
    {
        str.append(QString(" Event #%1 ID(%2) start_time(%3) length(%4 sec)\n")
                   .arg(i,2,10).arg(EventID(i))
                   .arg(StartTimeGPS(i).toString(Qt::LocalDate))
                   .arg(LengthInSeconds(i)));
        str.append(QString("           ETM_loc(%1) Title(%2)\n").
                   arg(ETMLocation(i)).arg(title(i).toString()));
        if (0 != DescriptorsLength(i))
        {
            vector<const unsigned char*> desc =
                MPEGDescriptor::Parse(Descriptors(i), DescriptorsLength(i));
            for (uint j=0; j<desc.size(); j++)
                str.append(QString("%1\n")
                           .arg(MPEGDescriptor(desc[j]).toString()));
        }
    }
    return str;
}
Пример #2
0
QString ExtendedTextTable::toString(void) const
{
    QString str =
        QString("Extended Text Table -- sourceID(%1) eventID(%2) "
                "ettID(%3) isChannelETM(%4) isEventETM(%5)\n%6")
        .arg(SourceID()).arg(EventID()).arg(ExtendedTextTableID())
        .arg(IsChannelETM()).arg(IsEventETM())
        .arg(ExtendedTextMessage().toString());
    return str;
}
Пример #3
0
GraphicsResourceManager::GraphicsResourceManager(Sirikata::Task::WorkQueue *dependencyQueue)
: mEpoch(0), mEnabled(true)
{
  this->mTickListener = EventSource::getSingleton().subscribeId(
    EventID(EventTypes::Tick),
      EVENT_CALLBACK(GraphicsResourceManager, tick, this)
  );

  mDependencyManager = new DependencyManager(dependencyQueue);
  mBudget = OPTION_VIDEO_MEMORY_RESOURCE_CACHE_SIZE->as<int>() * 1024 * 1024;
}
Пример #4
0
//================================================================
EventList::EventList(const std::string& infile) {
  if(!infile.empty()) {
    std::ifstream file(infile.c_str());
    if(!file) {
      throw std::runtime_error("EventList(): ERROR opening input file "+infile);
    }

    // Expected line format:
    //    run event [anything else]
    std::string line;
    while(std::getline(file, line)) {
      std::istringstream is(line);
      int run(0), event(0);
      if(is>>run>>event) {
        list_.push_back(EventID(run, event));
      }
      else {
        throw std::runtime_error("EventList: ERROR: bad input line: "+line);
      }
    }