RDK Documentation (Open Sourced RDK Components)
closedcaptions.h
1 /*
2  * If not stated otherwise in this file or this component's Licenses.txt 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 #ifndef CLOSEDCAPTIONS_H
20 #define CLOSEDCAPTIONS_H
21 
22 #include "vlCCConstants.h"
23 #include <map>
24 #include <vector>
25 
27 {
28 public:
30  ~ClosedCaptions();
31  bool start(void* pVidDecoderHandle);
32  bool stop();
33  void setVisible(bool is_visible);
34  bool setEnabled(bool bNewState);
35  bool isEnabled() { return m_isCCEnabled; }
36  std::string getAvailableTracks();
37 #if 0
38  void setAttribute(std::map<std::string, std::string> options);
39  bool ccEASStarted ();
40  bool ccEASStopped ();
41  bool ccParentalLockStart();
42  bool ccParentalLockStop();
43  void ccGfxPreResolution(unsigned id);
44  void ccGfxSetResolution(unsigned id, int width, int height);
45  void ccGfxPostResolution(int id, int width, int height);
46  bool stopCCatEAS () { return ccStop(); }
47  bool stopCCatTrickMode ();
48  bool startCCatNormalMode ();
49  std::map<std::string, std::string> getSupportedOptions();
50  bool setTrack(const std::string& track);
51 #endif
52 private:
53  void ccInit (void);
54  bool ccStart (void);
55  bool ccStop (void);
56 /*
57  int getColor (gsw_CcAttribType attributeIndex, gsw_CcType ccType, QString inputStr, gsw_CcColor *pGetColor);
58  int getOpacity (QString inputStr, gsw_CcOpacity *pGetOpacity);
59  int getFontSize (QString inputStr, gsw_CcFontSize *pGetFontSize);
60  int getFontStyle (QString inputStr, gsw_CcFontStyle *pGetFontStyle);
61  int getEdgeType (QString inputStr, gsw_CcEdgeType *pGetEdgeType);
62  int getTextStyle (QString inputStr, gsw_CcTextStyle *pGetTextStyle);
63 */
64  std::map<std::string, std::string> m_ccOptions;
65  void* m_viddecHandle;
66  bool m_isCCEnabled;
67  bool m_isCCRendering;
68  bool m_isCCReaderStarted;
69  bool m_isParentalBlocked;
70  bool m_isCCStopedAtTrickMode;
71  int m_CCVisibilityStatus;
72  static bool m_wasLoadedOnce;
73 
74 };
75 
76 #endif
ClosedCaptions
Definition: closedcaptions.h:26