RDK Documentation (Open Sourced RDK Components)
CCDataController.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 CCDataController.h
22  *
23  * @brief Impl of subtec communication layer
24  *
25  */
26 
27 #ifndef __CC_DATA_CONTROLLER_H__
28 #define __CC_DATA_CONTROLLER_H__
29 
30 #include <ClosedCaptionsPacket.hpp>
31 
32 #include "ccDataReader.h"
33 
35 
36 /**
37  * @brief Print logs to console / log file
38  * @param[in] format - printf style string
39  * @retuen void
40  */
41 extern void logprintf(const char *format, ...);
42 extern void logprintf_new(int playerId,const char* levelstr,const char* file, int line,const char *format, ...);
43 
44 namespace subtecConnector
45 {
46 
47 /**
48  * @brief Controller for CCdata
49  */
51 {
52 public:
53  static CCDataController* Instance();
54 
55  void closedCaptionDataCb (int decoderIndex, VL_CC_DATA_TYPE eType, unsigned char* ccData,
56  unsigned dataLength, int sequenceNumber, long long localPts);
57 
58  void closedCaptionDecodeCb(int decoderIndex, int event);
59 
60  void sendMute();
61  void sendUnmute();
62 
63  void sendPause();
64  void sendResume();
65  void sendResetChannelPacket();
66  void sendCCSetAttribute(gsw_CcAttributes * attrib, short type, gsw_CcType ccType);
67 
68  void ccSetDigitalChannel(unsigned int channel);
69  void ccSetAnalogChannel(unsigned int channel);
70 
71  void ccGetAttributes(gsw_CcAttributes * attrib, gsw_CcType ccType);
72 
73 private:
75  CCDataController(const CCDataController&) = delete;
77  ClosedCaptionsChannel channel;
78 
79  gsw_CcAttributes currentAttributes;
80 };
81 
82 void closedCaptionDecodeCb(void *context, int decoderIndex, int event);
83 
84 void closedCaptionDataCb (void *context, int decoderIndex, VL_CC_DATA_TYPE eType, unsigned char* ccData,
85  unsigned dataLength, int sequenceNumber, long long localPts);
86 
87 
88 } // subtecConnector
89 
90 #endif //__CC_DATA_CONTROLLER_H__
logprintf
void logprintf(const char *format,...)
Print logs to console / log file.
Definition: aamplogging.cpp:432
subtecConnector::CCDataController
Controller for CCdata.
Definition: CCDataController.h:50
gsw_CcAttributes
Definition: SubtecConnector.h:176
logprintf_new
void logprintf_new(int playerId, const char *levelstr, const char *file, int line, const char *format,...)
Print logs to console / log file.
Definition: aamplogging.cpp:482
SubtecConnector.h
Interface header for libsubtec_connector.
ClosedCaptionsChannel
Definition: ClosedCaptionsPacket.hpp:95
gsw_CcType
gsw_CcType
Closed Captioning type.
Definition: SubtecConnector.h:55