RDK Documentation (Open Sourced RDK Components)
Components_VideoDecoder.h
Go to the documentation of this file.
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 2016 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 Components_VideoDecoder.h
22  * @brief The header file provides capabilities video output information APIs.
23  */
24 
25 /**
26  * @defgroup TR69_HOSTIF_STBSERVICES_VIDEODECODER TR-069 Object (Device.STBServices.{i}.Components.VideoDecoder.{i})
27  * @par VideoDecoder objects
28  * - It describe the functional blocks in charge of video decoding.
29  * - A Video Decoder receives an elementary video stream, decodes the video, and outputs an
30  * uncompressed native video stream to a Video Output object.
31  * @ingroup TR69_HOSTIF_STBSERVICES
32  *
33  * @defgroup TR69_HOSTIF_STBSERVICES_VIDEODECODER_API TR-069 Object (Device.STBServices.{i}.Components.VideoDecoder.{i}) Public APIs
34  * Describe the details about TR-069 components video decoder APIs specifications.
35  * @ingroup TR69_HOSTIF_STBSERVICES_VIDEODECODER
36  *
37  * @defgroup TR69_HOSTIF_STBSERVICES_VIDEODECODER_CLASSES TR-069 Object (Device.STBServices.{i}.Components.VideoDecoder.{i}) Public Classes
38  * Describe the details about classes used in TR069 components video decoder.
39  * @ingroup TR69_HOSTIF_STBSERVICES_VIDEODECODER
40  */
41 
42 /**
43 * @defgroup tr69hostif
44 * @{
45 * @defgroup hostif
46 * @{
47 **/
48 
49 
50 #ifndef DEVSET_COMP_VIDEODECODER_HPP_
51 #define DEVSET_COMP_VIDEODECODER_HPP_
52 
53 #include "host.hpp"
54 #include "videoResolution.hpp"
55 #include "dsVideoResolutionSettings.h"
56 #include "dsTypes.h"
57 #include "videoOutputPortType.hpp"
58 #include "videoDevice.hpp"
59 #include "videoDFC.hpp"
60 #include "manager.hpp"
61 #include "dsUtl.h"
62 #include "dsError.h"
63 #include "list.hpp"
64 #include <exception>
65 #include <string.h>
66 #include "stdlib.h"
67 #include "hostIf_tr69ReqHandler.h"
68 #include "hostIf_updateHandler.h"
69 #include "hostIf_utils.h"
70 
71 #ifndef PARAM_LEN
72 #define PARAM_LEN TR69HOSTIFMGR_MAX_PARAM_LEN
73 #endif
74 
75 /**
76  * @brief This class provides the TR069 components video decoder information.
77  * @ingroup TR69_HOSTIF_STBSERVICES_VIDEODECODER_CLASSES
78  */
80 {
81  static GHashTable *ifHash;
84  static GMutex *m_mutex;
85  int dev_id;
86 
87  char backupContentAspectRatio[_BUF_LEN_16];
88  bool backupStandby;
89  char backupVideoDecoderStatus[_BUF_LEN_32];
90 
91  bool bCalledContentAspectRatio;
92  bool bCalledStandby;
93  bool bCalledVideoDecoderStatus;
94 
95 private:
96  int getContentAspectRatio(HOSTIF_MsgData_t *stMsgData,bool *pChanged = NULL);
97  int getX_COMCAST_COM_Standby(HOSTIF_MsgData_t *stMsgData,bool *pChanged = NULL);
98  int getStatus(HOSTIF_MsgData_t *stMsgData,bool *pChanged = NULL);
99  int setX_COMCAST_COM_Standby(const HOSTIF_MsgData_t *stMsgData);
100 
101 public:
102  static hostIf_STBServiceVideoDecoder *getInstance(int dev_id);
103  static void closeInstance(hostIf_STBServiceVideoDecoder *);
104 /**
105  * @brief This function checks for the host IF video decoder interface updates such as Status,
106  * ContentAspectRatio, X_COMCAST-COM_Standby, Name in a connected video decoder. Currently
107  * not implemented.
108  *
109  * @param[in] mUpdateCallback Callback function pointer to check for the host IF video decoder
110  * interface update.
111  * @ingroup TR69_HOSTIF_STBSERVICES_VIDEODECODER_API
112  */
113  void checkForUpdates(updateCallback mUpdateCallback);
114  static GList* getAllInstances();
115  static void closeAllInstances();
116  static void getLock();
117  static void releaseLock();
118  void doUpdates(updateCallback mUpdateCallback);
119  int handleSetMsg(const char *paramName, HOSTIF_MsgData_t *stMsgData);
120  int handleGetMsg(const char *paramName, HOSTIF_MsgData_t *stMsgData);
121 
122 };
123 
124 #endif /* DEVSET_COMP_VIDEODECODER_HPP_ */
125 
126 
127 /** @} */
128 /** @} */
hostIf_STBServiceVideoDecoder
This class provides the TR069 components video decoder information.
Definition: Components_VideoDecoder.h:79
dsTypes.h
Device Settings HAL types.
manager.hpp
It contains class referenced by manager.cpp file.
_HostIf_MsgData_t
Definition: hostIf_tr69ReqHandler.h:170
dsError.h
Device Settings HAL error codes.
dsUtl.h
Device Settings HAL utilities.
hostIf_STBServiceVideoDecoder::handleGetMsg
int handleGetMsg(const char *paramName, HOSTIF_MsgData_t *stMsgData)
This function get the video decoder interface updates such as Status, ContentAspectRatio,...
Definition: Components_VideoDecoder.cpp:182
videoOutputPortType.hpp
It contains structures and class referenced by the videoOutputportTypes.cpp file.
videoResolution.hpp
It contains class and structure refrenced by the videoResolution.cpp file.
videoDevice.hpp
It contains class referenced by videoDevice.cpp file.
hostIf_STBServiceVideoDecoder::checkForUpdates
void checkForUpdates(updateCallback mUpdateCallback)
This function checks for the host IF video decoder interface updates such as Status,...
hostIf_STBServiceVideoDecoder::doUpdates
void doUpdates(updateCallback mUpdateCallback)
This function updates the video decoder interface updates such as Status, ContentAspectRatio,...
Definition: Components_VideoDecoder.cpp:228
hostIf_STBServiceVideoDecoder::handleSetMsg
int handleSetMsg(const char *paramName, HOSTIF_MsgData_t *stMsgData)
This function sets the video decoder interface updates such as Status, ContentAspectRatio,...
Definition: Components_VideoDecoder.cpp:159
hostIf_STBServiceVideoDecoder::hostIf_STBServiceVideoDecoder
hostIf_STBServiceVideoDecoder(int devid)
Class Constructor of the class hostIf_STBServiceVideoDecoder.
Definition: Components_VideoDecoder.cpp:132
videoDFC.hpp
This file defines VideoDFC class for managing video decoder format conversion types.