/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
*
* This file is part of mplayerc.
*
* Mplayerc is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Mplayerc is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*
*/
#include "stdafx.h"
#include "DVBChannel.h"
CDVBChannel::CDVBChannel(void)
{
m_ulFrequency = 0;
m_nPrefNumber = 0;
m_nOriginNumber = 0;
m_bEncrypted = false;
m_ulONID = 0;
m_ulTSID = 0;
m_ulSID = 0;
m_ulPMT = 0;
m_ulPCR = 0;
m_ulVideoPID = 0;
m_nVideoType = DVB_MPV;
m_nAudioCount = 0;
m_nSubtitleCount = 0;
}
CDVBChannel::~CDVBChannel(void)
{
}
void CDVBChannel::FromString(CString strValue)
{
int i = 0;
int nVersion;
nVersion = _tstol(strValue.Tokenize(_T("|"), i));
m_strName = strValue.Tokenize(_T("|"), i);
m_ulFrequency = _tstol(strValue.Tokenize(_T("|"), i));
m_nPrefNumber = _tstol(strValue.Tokenize(_T("|"), i));
m_nOriginNumber = _tstol(strValue.Tokenize(_T("|"), i));
if (nVersion > FORMAT_VERSION_0)
m_bEncrypted = _tstol(strValue.Tokenize(_T("|"), i));
m_ulONID = _tstol(strValue.Tokenize(_T("|"), i));
m_ulTSID = _tstol(strValue.Tokenize(_T("|"), i));
m_ulSID = _tstol(strValue.Tokenize(_T("|"), i));
m_ulPMT = _tstol(strValue.Tokenize(_T("|"), i));
m_ulPCR = _tstol(strValue.Tokenize(_T("|"), i));
m_ulVideoPID = _tstol(strValue.Tokenize(_T("|"), i));
m_nVideoType = (DVB_STREAM_TYPE)_tstol(strValue.Tokenize(_T("|"), i));
m_nAudioCount = _tstol(strValue.Tokenize(_T("|"), i));
m_nSubtitleCount = _tstol(strValue.Tokenize(_T("|"), i));
for(int j=0; j