20 #ifndef _CAS_SERVICE_H_
21 #define _CAS_SERVICE_H_
24 #include "mediaplayer.h"
25 #include "rdkmediaplayerimpl.h"
26 #include "CASDataListener.h"
27 #include "CASManager.h"
28 #include "CASHelper.h"
30 #include "ICasSectionFilter.h"
32 using namespace anycas;
33 class MediaPlayerSink;
39 std::vector<uint8_t> pat;
40 std::vector<uint8_t> pmt;
41 std::vector<uint8_t> cat;
44 class CASService :
public CASDataListener, CASStatusInform
47 CASService(
const EventEmitter& emit,
const CASEnvironment& env, ICasSectionFilter* casSFInterface, ICasPipeline *casPipelineInterface)
50 casSFInterface_(casSFInterface),
51 casPipelineInterface_(casPipelineInterface),
52 bManagementSession_(
false) { }
65 bool initialize(
bool management,
const std::string& casOcdmId,
PSIInfo *psiInfo);
76 bool startStopDecrypt(
const std::vector<uint16_t>& startPids,
const std::vector<uint16_t>& stopPids);
85 void updatePSI(
const std::vector<uint8_t>& pat,
const std::vector<uint8_t>& pmt,
const std::vector<uint8_t>& cat);
92 virtual void informStatus(
const CASStatus& status)
override;
99 void casPublicData(
const std::vector<uint8_t>& data);
107 void processSectionData(
const uint32_t& filterId,
const std::vector<uint8_t>& data);
122 bool isManagementSession()
const;
125 std::shared_ptr<CASManager> casManager_;
126 std::shared_ptr<CASHelper> casHelper_;
129 bool bManagementSession_;
130 std::string casOcdmId_;
133 ICasSectionFilter* casSFInterface_;
134 ICasPipeline* casPipelineInterface_;
138 #endif // _CAS_SERVICE_H_