/*
 * cal-setup.c: A plugin for the Video Disk Recorder
 *
 * See the README file for copyright information and how to reach the author.
 *
 * $Id$
 */

#include "cal-setup.h"
#include "cal-config.h"

cCalSetup::cCalSetup(void) {
  useCuttingPrefix   = calConfig.useCuttingPrefix;
  adjustStartingTime = calConfig.adjustStartingTime;
  adjustPTS          = calConfig.adjustPTS;

  PTSAdjustmentTypes[0] = tr("no");
  PTSAdjustmentTypes[1] = tr("to first I-frame");
  PTSAdjustmentTypes[2] = tr("to zero");

  Add(new cMenuEditBoolItem(tr("Use cut-sign (%)"),     &useCuttingPrefix));
  Add(new cMenuEditBoolItem(tr("Adjust starting time"), &adjustStartingTime));
  Add(new cMenuEditStraItem(tr("Adjust PTS"), &adjustPTS, 3, PTSAdjustmentTypes));
}

void cCalSetup::Store(void) {
  SetupStore("useCuttingPrefix",   calConfig.useCuttingPrefix   = useCuttingPrefix);
  SetupStore("adjustStartingTime", calConfig.adjustStartingTime = adjustStartingTime);
  SetupStore("adjustPTS",          calConfig.adjustPTS          = adjustPTS);
}
