Skip to content

Commit

Permalink
libXBMC_codec.h removed and changed to libXBMC_pvr.h
Browse files Browse the repository at this point in the history
  • Loading branch information
AlwinEsch committed Apr 29, 2017
1 parent 0e0cd45 commit f3b7f77
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 15 deletions.
3 changes: 1 addition & 2 deletions pvr.hts/addon.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
provider-name="Adam Sutton, Sam Stenvall, Lars Op den Kamp, Kai Sommerfeld">
<requires>
<c-pluff version="0.1"/>
<import addon="xbmc.pvr" version="5.2.1"/>
<import addon="xbmc.codec" version="1.0.1"/>
<import addon="xbmc.pvr" version="5.2.2"/>
</requires>
<extension
point="xbmc.pvrclient"
Expand Down
1 change: 0 additions & 1 deletion src/Tvheadend.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "p8-platform/threads/threads.h"
#include "p8-platform/threads/mutex.h"
#include "p8-platform/util/buffer.h"
#include "xbmc_codec_types.h"
#include "libXBMC_addon.h"
#include "tvheadend/Settings.h"
#include "HTSPTypes.h"
Expand Down
6 changes: 1 addition & 5 deletions src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ ADDON_STATUS m_CurStatus = ADDON_STATUS_UNKNOWN;
CMutex g_mutex;
CHelper_libXBMC_addon *XBMC = NULL;
CHelper_libXBMC_pvr *PVR = NULL;
CHelper_libXBMC_codec *CODEC = NULL;
PVR_MENUHOOK *menuHook = NULL;
CTvheadend *tvh = NULL;

Expand All @@ -70,14 +69,12 @@ ADDON_STATUS ADDON_Create(void* hdl, void* props)

/* Instantiate helpers */
XBMC = new CHelper_libXBMC_addon;
CODEC = new CHelper_libXBMC_codec;
PVR = new CHelper_libXBMC_pvr;

if (!XBMC->RegisterMe(hdl) ||
!CODEC->RegisterMe(hdl) || !PVR->RegisterMe(hdl))
!PVR->RegisterMe(hdl))
{
SAFE_DELETE(PVR);
SAFE_DELETE(CODEC);
SAFE_DELETE(XBMC);
m_CurStatus = ADDON_STATUS_PERMANENT_FAILURE;
return m_CurStatus;
Expand Down Expand Up @@ -132,7 +129,6 @@ void ADDON_Destroy()
CLockObject lock(g_mutex);
SAFE_DELETE(tvh);
SAFE_DELETE(PVR);
SAFE_DELETE(CODEC);
SAFE_DELETE(XBMC);
SAFE_DELETE(menuHook);
m_CurStatus = ADDON_STATUS_UNKNOWN;
Expand Down
2 changes: 0 additions & 2 deletions src/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@
#include "p8-platform/threads/mutex.h"
#include "libXBMC_addon.h"
#include "libXBMC_pvr.h"
#include "libXBMC_codec.h"

extern ADDON::CHelper_libXBMC_addon* XBMC;
extern CHelper_libXBMC_pvr* PVR;
extern CHelper_libXBMC_codec* CODEC;

/* timer type ids */
#define TIMER_ONCE_MANUAL (PVR_TIMER_TYPE_NONE + 1)
Expand Down
10 changes: 5 additions & 5 deletions src/xbmc_codec_descriptor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#ifndef XBMC_CODEC_DESCRIPTOR_HPP
#define XBMC_CODEC_DESCRIPTOR_HPP

#include "kodi/libXBMC_codec.h"
#include "kodi/libXBMC_pvr.h"

/**
* Adapter which converts codec names used by tvheadend and VDR into their
Expand All @@ -47,13 +47,13 @@ class CodecDescriptor
CodecDescriptor retVal;
// some of Tvheadend's and VDR's codec names don't match ffmpeg's, so translate them to something ffmpeg understands
if (!strcmp(strCodecName, "MPEG2AUDIO"))
retVal = CodecDescriptor(CODEC->GetCodecByName("MP2"), strCodecName);
retVal = CodecDescriptor(PVR->GetCodecByName("MP2"), strCodecName);
else if (!strcmp(strCodecName, "MPEGTS"))
retVal = CodecDescriptor(CODEC->GetCodecByName("MPEG2VIDEO"), strCodecName);
retVal = CodecDescriptor(PVR->GetCodecByName("MPEG2VIDEO"), strCodecName);
else if (!strcmp(strCodecName, "TEXTSUB"))
retVal = CodecDescriptor(CODEC->GetCodecByName("TEXT"), strCodecName);
retVal = CodecDescriptor(PVR->GetCodecByName("TEXT"), strCodecName);
else
retVal = CodecDescriptor(CODEC->GetCodecByName(strCodecName), strCodecName);
retVal = CodecDescriptor(PVR->GetCodecByName(strCodecName), strCodecName);

return retVal;
}
Expand Down

0 comments on commit f3b7f77

Please sign in to comment.