#pragma once

#include "kpi_decoder.h"
#include "kpi_impl.h"

extern const wchar_t SEC_GENERAL[];// = L"General";
extern const wchar_t KEY_RHYTHM[];// = L"Rhythm";

class gymFile;
class KbGymDecoder : public KbKpiUnknownImpl<IKpiDecoder>
{
private:
    gymFile       *m_gymFile;
    KPI_MEDIAINFO  m_MediaInfo;
public:
    static KbGymDecoder *s_pActive;
    DWORD  __fastcall Open(const KPI_MEDIAINFO *cpRequest, 
                           IKpiFile   *pFile, 
                           IKpiFolder *pFolder);
    DWORD  WINAPI Select(DWORD dwNumber,
                         const KPI_MEDIAINFO **ppMediaInfo,
                         IKpiTagInfo *pTagInfo,
                         DWORD dwTagGetFlags);
    DWORD  WINAPI Render(BYTE *pBuffer, DWORD dwSizeSample);
    UINT64 WINAPI Seek(UINT64 qwPosSample, DWORD dwFlag);
    DWORD  WINAPI UpdateConfig(void *pvReserved){return 0;}
    KbGymDecoder(void);
    ~KbGymDecoder(void);
};
