RDK Documentation (Open Sourced RDK Components)
AampSubtecCCManager.h
Go to the documentation of this file.
1 /*
2  * If not stated otherwise in this file or this component's license file the
3  * following copyright and licenses apply:
4  *
5  * Copyright 2018 RDK Management
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18 */
19 
20 /**
21  * @file AampSubtecCCManager.h
22  *
23  * @brief Integration layer of Subtec ClosedCaption in AAMP
24  *
25  */
26 
27 #ifndef __AAMP_SUBTEC_CC_MANAGER_H__
28 #define __AAMP_SUBTEC_CC_MANAGER_H__
29 
31 
32 #include <string>
33 #include <set>
34 #include <mutex>
36 
37 
38 /**
39  * @class AampSubtecCCManager
40  * @brief Handling Subtec CC operation
41  */
42 
44 {
45 public:
46 
47  /**
48  * @fn Release
49  * @param[in] id - returned from GetId function
50  */
51  void Release(int iID) override;
52 
53  /**
54  * @fn GetId
55  * @return int - unique ID
56  */
57  virtual int GetId();
58 
59  /**
60  * @fn AampSubtecCCManager
61  */
63 
64  /**
65  * @brief Destructor
66  */
67  ~AampSubtecCCManager() = default;
68 
70  AampSubtecCCManager& operator=(const AampSubtecCCManager&) = delete;
71 
72 private:
73  /**
74  * @fn StartRendering
75  *
76  * @return void
77  */
78  void StartRendering() override;
79 
80  /**
81  * @fn StopRendering
82  *
83  * @return void
84  */
85  void StopRendering() override;
86 
87  /**
88  * @fn EnsureInitialized
89  * @return void
90  */
91  void EnsureInitialized() override;
92 
93  /**
94  * @fn EnsureHALInitialized
95  * @return void
96  */
97  void EnsureHALInitialized() override;
98 
99  /**
100  * @fn EnsureRendererCommsInitialized
101  * @return void
102  */
103  void EnsureRendererCommsInitialized() override;
104 
105  /**
106  * @fn SetDigitalChannel
107  *
108  * @return CC_VL_OS_API_RESULT
109  */
110  int SetDigitalChannel(unsigned int id) override;
111  /**
112  * @fn SetAnalogChannel
113  *
114  * @return CC_VL_OS_API_RESULT
115  */
116  int SetAnalogChannel(unsigned int id) override;
117 
118  /**
119  * @fn EnsureRendererStateConsistency
120  *
121  * @return void
122  */
124 
125 
126 private:
127  bool mRendererInitialized{false};
128  bool mHALInitialized{false};
129  std::mutex mIdLock;
130  int mId{0};
131  std::set<int> mIdSet;
132 };
133 
134 #endif /* __AAMP_SUBTEC_CC_MANAGER_H__ */
AampSubtecCCManager::GetId
virtual int GetId()
Gets Handle or ID, Every client using subtec must call GetId in the begining , save id,...
Definition: AampSubtecCCManager.cpp:84
AampSubtecCCManager::EnsureInitialized
void EnsureInitialized() override
Impl specific initialization code called before each public interface call.
Definition: AampSubtecCCManager.cpp:37
AampSubtecCCManager::EnsureRendererStateConsistency
void EnsureRendererStateConsistency()
ensure mRendering is consistent with renderer state
Definition: AampSubtecCCManager.cpp:160
AampSubtecCCManager::EnsureHALInitialized
void EnsureHALInitialized() override
Impl specific initialization code for HAL.
Definition: AampSubtecCCManager.cpp:46
AampSubtecCCManager::SetDigitalChannel
int SetDigitalChannel(unsigned int id) override
set digital channel with specified id
Definition: AampSubtecCCManager.cpp:140
AampSubtecCCManager::StartRendering
void StartRendering() override
To start CC rendering.
Definition: AampSubtecCCManager.cpp:124
AampSubtecCCManager::EnsureRendererCommsInitialized
void EnsureRendererCommsInitialized() override
Impl specific initialization code for Communication with rendered.
Definition: AampSubtecCCManager.cpp:65
AampCCManagerBase
Handles closed caption operations.
Definition: AampCCManager.h:51
SubtecConnector.h
Interface header for libsubtec_connector.
AampSubtecCCManager::StopRendering
void StopRendering() override
To stop CC rendering.
Definition: AampSubtecCCManager.cpp:132
AampSubtecCCManager
Handling Subtec CC operation.
Definition: AampSubtecCCManager.h:43
AampSubtecCCManager::Release
void Release(int iID) override
Release CC resources.
Definition: AampSubtecCCManager.cpp:95
AampSubtecCCManager::~AampSubtecCCManager
~AampSubtecCCManager()=default
Destructor.
AampSubtecCCManager::SetAnalogChannel
int SetAnalogChannel(unsigned int id) override
set analog channel with specified id
Definition: AampSubtecCCManager.cpp:150
AampCCManager.h
Integration layer of ClosedCaption in AAMP.
AampSubtecCCManager::AampSubtecCCManager
AampSubtecCCManager()
Constructor.
Definition: AampSubtecCCManager.cpp:177