/*
 * Analogue TV Player plugin for VDR
 *
 * Copyright (C) 2003 .. 2006 Andreas Kool <akool@gmx.de>
 *
 * This code is distributed under the terms and conditions of the
 * GNU GENERAL PUBLIC LICENSE. See the file COPYING for details.
 *
 * Version: $Id: status.c,v 1.8 2006/04/25 17:19:34 akool Exp $
 * Release: $Name:  $
 *
 */

#include <stdint.h>
#include "player-analogtv.h"
#include "status.h"

// --- AnalogtvStatus ------------------------------------------------------

void cAnalogtvStatus::AnalogtvStatus()
{
  recordings = 0;
  replays = 0;
}

void cAnalogtvStatus::Recording(const cDevice *Device, const char *Name, const char *FileName, bool On)
{
  if (On) {
    recordings++; // recording started
    d(1, "Start recording #%d: %s on device %d -> %s", recordings, Name, Device->CardIndex(), FileName);
  }
  else {
    d(1, "Stop recording #%d", recordings);
    recordings--; // recording stopped
  }
}

void cAnalogtvStatus::Replaying(const cControl *Control, const char *Name, const char *FileName, bool On)
{
  if (On) {
    replays++; // replaying started
    d(1, "Start replay #%d: %s <- %s", replays, Name, FileName);
  }
  else {
    d(1, "Stop replay #%d", replays);
    replays--; // replaying stopped
  }
}

void cAnalogtvStatus::ChannelSwitch(const cDevice *Device, int ChannelNumber)
{
  d(1, "Switching to channel %d on device %d", ChannelNumber, Device->CardIndex());
}
