Exemplo n.º 1
0
PVR_ERROR PVRClientMythTV::SignalStatus(PVR_SIGNAL_STATUS &signalStatus)
{
  if (g_bExtraDebug)
    XBMC->Log(LOG_DEBUG, "%s", __FUNCTION__);

  MythSignal signal;
  if (m_pEventHandler)
  {
    signal = m_pEventHandler->GetSignal();
  }

  signalStatus.dAudioBitrate = 0;
  signalStatus.dDolbyBitrate = 0;
  signalStatus.dVideoBitrate = 0;
  signalStatus.iBER = signal.BER();
  signalStatus.iSignal = signal.Signal();
  signalStatus.iSNR = signal.SNR();
  signalStatus.iUNC = signal.UNC();

  CStdString ID;
  ID.Format("Myth Recorder %i", signal.ID());

  CStdString strAdapterStatus = signal.AdapterStatus();
  strcpy(signalStatus.strAdapterName, ID.Buffer());
  strcpy(signalStatus.strAdapterStatus, strAdapterStatus.Buffer());

  if (g_bExtraDebug)
    XBMC->Log(LOG_DEBUG, "%s - Done", __FUNCTION__);

  return PVR_ERROR_NO_ERROR;
}
Exemplo n.º 2
0
int MythDatabase::AddTimer(int chanid,CStdString channame,CStdString description, time_t starttime, time_t endtime,CStdString title,CStdString category,TimerType type)
{
  m_database_t->Lock();
  int retval=CMYTH->MysqlAddTimer(*m_database_t,chanid,channame.Buffer(),description.Buffer(),starttime, endtime,title.Buffer(),category.Buffer(),type);
  m_database_t->Unlock();
  return retval;
}
Exemplo n.º 3
0
 bool MythDatabase::FindProgram(const time_t starttime,const int channelid,CStdString &title,MythProgram* pprogram)
 {
   m_database_t->Lock();
   bool retval=CMYTH->MysqlGetProgFinderTimeTitleChan(*m_database_t,pprogram,title.Buffer(),starttime,channelid)>0;
   m_database_t->Unlock();
   return retval;
  }
Exemplo n.º 4
0
bool MythConnection::UpdateSchedules(int id)
{
  CStdString cmd;
  cmd.Format("RESCHEDULE_RECORDINGS %i",id);
  return CMYTH->ScheduleRecording(*m_conn_t,cmd.Buffer())>=0;
  
}
Exemplo n.º 5
0
 bool MythDatabase::UpdateTimer(int recordid,int chanid,CStdString channame,CStdString description, time_t starttime, time_t endtime,CStdString title,CStdString category,TimerType type)
 {
 m_database_t->Lock();
 bool retval = CMYTH->MysqlUpdateTimer(*m_database_t,recordid,chanid,channame.Buffer(),description.Buffer(),starttime, endtime,title.Buffer(),category.Buffer(),type)==0;
 m_database_t->Unlock();
 return retval;
 }
Exemplo n.º 6
0
bool MythConnection::UpdateSchedules(int id)
{
  CStdString cmd;
  cmd.Format("RESCHEDULE_RECORDINGS %i", id);
  int retval = 0;
  CMYTH_CONN_CALL(retval, retval < 0, cmyth_schedule_recording(*m_conn_t, cmd.Buffer()));
  return retval >= 0;
}
Exemplo n.º 7
0
  MythTimestamp::MythTimestamp(CStdString time,bool datetime)
 :m_timestamp_t(new MythPointer<cmyth_timestamp_t>())
{
  *m_timestamp_t=(/*datetime?CMYTH->DatetimeFromString(time.Buffer()):*/CMYTH->TimestampFromString(time.Buffer()));
}