RDK Documentation (Open Sourced RDK Components)
hdmiIn.cpp
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  * If not stated otherwise in this file or this component's Licenses.txt file the
21  * following copyright and licenses apply:
22  *
23  * Copyright ARRIS Enterprises, Inc. 2015.
24  *
25  * Licensed under the Apache License, Version 2.0 (the "License");
26  * you may not use this file except in compliance with the License.
27  * You may obtain a copy of the License at
28  *
29  * http://www.apache.org/licenses/LICENSE-2.0
30  *
31  * Unless required by applicable law or agreed to in writing, software
32  * distributed under the License is distributed on an "AS IS" BASIS,
33  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
34  * See the License for the specific language governing permissions and
35  * limitations under
36 */
37 
38 
39 /**
40  * @file hdmiIn.cpp
41  * @brief Configuration of HDMI Input
42  */
43 
44 
45 
46 /**
47 * @defgroup devicesettings
48 * @{
49 * @defgroup ds
50 * @{
51 **/
52 
53 
54 #include <iostream>
55 #include <sstream>
56 #include <string>
57 #include <string.h>
58 #include "hdmiIn.hpp"
59 #include "illegalArgumentException.hpp"
60 #include "host.hpp"
61 
62 #include "dslogger.h"
63 #include "dsError.h"
64 #include "dsTypes.h"
65 #include "dsHdmiIn.h"
66 #include "dsUtl.h"
67 #include "edid-parser.hpp"
68 
69 namespace device
70 {
71 
72 
73 /**
74  * @fn HdmiInput::HdmiInput()
75  * @brief default constructor
76  *
77  * @param None
78  *
79  * @return None
80  * @callergraph
81  */
83 {
84  dsHdmiInInit();
85 }
86 
87 /**
88  * @fn HdmiInput::~HdmiInput()
89  * @brief destructor
90  *
91  * @param None
92  *
93  * @return None
94  * @callergraph
95  */
97 {
98  dsHdmiInTerm();
99 }
100 
101 /**
102  * @fn HdmiInput::getInstance()
103  * @brief This API is used to get the instance of the HDMI Input
104  *
105  * @param None
106  *
107  * @return Reference to the instance of HDMI Input class instance
108  * @callergraph
109  */
111 {
112  static HdmiInput _singleton;
113  return _singleton;
114 }
115 
116 /**
117  * @fn HdmiInput::getNumberOfInputs()
118  * @brief This API is used to get the number of HDMI Input ports on the set-top
119  *
120  * @param[in] None
121  *
122  * @return number of HDMI Inputs
123  * @callergraph
124  */
126 {
127 
128  uint8_t numHdmiInputs;
129  dsError_t eError = dsHdmiInGetNumberOfInputs (&numHdmiInputs);
130 
131  // Throw an exception if there was an error
132  if (dsERR_NONE != eError)
133  {
134  throw Exception(eError);
135  }
136 
137  return (numHdmiInputs);
138 }
139 
140 /**
141  * @fn HdmiInput::isPresented()
142  * @brief This API is used to specify if HDMI Input is being
143  * presented via HDMI Out
144  *
145  * @param[in] None
146  *
147  * @return true if HDMI Input is being presetned.
148  * @callergraph
149  */
151 {
152  dsHdmiInStatus_t Status;
153  dsError_t eError = dsHdmiInGetStatus (&Status);
154 
155  // Throw an exception if there was an error
156  if (dsERR_NONE != eError)
157  {
158  throw Exception(eError);
159  }
160 
161  return (Status.isPresented);
162 }
163 
164 /**
165  * @fn HdmiInput::isActivePort()
166  * @brief This API is used to specify if the provided HDMI Input port is
167  * active (i.e. communicating with the set-top)
168  *
169  * @param[in] HDMI Input port
170  *
171  * @return true if the provided HDMI Input port is active.
172  * @callergraph
173  */
174 bool HdmiInput::isActivePort(int8_t Port) const
175 {
176  dsHdmiInStatus_t Status;
177  dsError_t eError = dsHdmiInGetStatus (&Status);
178 
179  // Throw an exception if there was an error
180  if (dsERR_NONE != eError)
181  {
182  throw Exception(eError);
183  }
184 
185  return (Status.activePort == Port);
186 }
187 
188 /**
189  * @fn HdmiInput::getActivePort()
190  * @brief This API is used to specify the active (i.e. communicating with
191  * the set-top) HDMI Input port
192  *
193  * @param[in] None
194  *
195  * @return the HDMI Input port which is currently active.
196  * @callergraph
197  */
199 {
200  dsHdmiInStatus_t Status;
201  dsError_t eError = dsHdmiInGetStatus (&Status);
202 
203  // Throw an exception if there was an error
204  if (dsERR_NONE != eError)
205  {
206  throw Exception(eError);
207  }
208 
209  return (Status.activePort);
210 }
211 
212 /**
213  * @fn HdmiInput::isPortConnected()
214  * @brief This API is used to specify if the prvided HDMI Input port is
215  * connected (i.e. HDMI Input devie is plugged into the set-top).
216  *
217  * @param[in] HDMI Input port
218  *
219  * @return true if the HDMI Input port is connected
220  * @callergraph
221  */
222 bool HdmiInput::isPortConnected(int8_t Port) const
223 {
224  dsHdmiInStatus_t Status;
225  dsError_t eError = dsHdmiInGetStatus (&Status);
226 
227  // Throw an exception if there was an error
228  if (dsERR_NONE != eError)
229  {
230  throw Exception(eError);
231  }
232 
233  return (Status.isPortConnected[Port]);
234 }
235 
236 /**
237  * @fn HdmiInput::selectPort()
238  * @brief This API is used to select the HDMI In port to be presented
239  *
240  * @param[in] int8_t Port : -1 for No HDMI Input port to be presented
241  * 0..n for HDMI Input port (n) to be presented
242  *
243  * @return None
244  * @callergraph
245  */
246 void HdmiInput::selectPort (int8_t Port) const
247 {
248  dsError_t eError = dsHdmiInSelectPort ((dsHdmiInPort_t)Port);
249 
250  // Throw an exception if there was an error
251  if (dsERR_NONE != eError)
252  {
253  throw Exception(eError);
254  }
255 
256 }
257 
258 /**
259  * @fn HdmiInput::scaleVideo()
260  * @brief This API is used to scale the HDMI In video
261  *
262  * @param[in] int32_t x : x coordinate for the video
263  * @param[in] int32_t y : y coordinate for the video
264  * @param[in] int32_t width : width of the video
265  * @param[in] int32_t height : height of the video
266  *
267  * @return None
268  * @callergraph
269  */
270 void HdmiInput::scaleVideo (int32_t x, int32_t y, int32_t width, int32_t height) const
271 {
272  dsError_t eError = dsHdmiInScaleVideo (x, y, width, height);
273 
274  // Throw an exception if there was an error
275  if (dsERR_NONE != eError)
276  {
277  throw Exception(eError);
278  }
279 }
280 
281 /**
282  * @fn HdmiInput::selectZoomMode()
283  * @brief This API is used to select the HDMI In video zoom mode
284  *
285  * @param[in] int8_t zoomMoode : 0 for NONE
286  * 1 for FULL
287  *
288  * @return None
289  * @callergraph
290  */
291 void HdmiInput::selectZoomMode (int8_t zoomMode) const
292 {
293  dsError_t eError = dsHdmiInSelectZoomMode ((dsVideoZoom_t)zoomMode);
294 
295  // Throw an exception if there was an error
296  if (dsERR_NONE != eError)
297  {
298  throw Exception(eError);
299  }
300 }
301 
302 /**
303  * @fn HdmiInput::pauseAudio()
304  * @brief This API is used to select the HDMI In video zoom mode
305  *
306  * @param[in] None
307  *
308  * @return None
309  * @callergraph
310  */
312 {
313  dsError_t eError = dsHdmiInPauseAudio ();
314 
315  // Throw an exception if there was an error
316  if (dsERR_NONE != eError)
317  {
318  throw Exception(eError);
319  }
320 }
321 
322 /**
323  * @fn HdmiInput::resumeAudio()
324  * @brief This API is used to select the HDMI In video zoom mode
325  *
326  * @param[in] None
327  *
328  * @return None
329  * @callergraph
330  */
332 {
333  dsError_t eError = dsHdmiInResumeAudio ();
334 
335  // Throw an exception if there was an error
336  if (dsERR_NONE != eError)
337  {
338  throw Exception(eError);
339  }
340 }
341 
342 
343 static std::string getResolutionStr (dsVideoResolution_t resolution)
344 {
345  std::string resolutionStr;
346 
347  switch (resolution)
348  {
350  resolutionStr = "480";
351  break;
352 
354  resolutionStr = "576";
355  break;
356 
358  resolutionStr = "720";
359  break;
360 
362  resolutionStr = "1080";
363  break;
364 
366  resolutionStr = "3840x2160";
367  break;
368 
370  resolutionStr = "4096x2160";
371  break;
372 
373  default:
374  resolutionStr = "unknown";
375  break;
376  }
377 
378  printf ("%s:%d - ResolutionStr: %s\n", __PRETTY_FUNCTION__,__LINE__, resolutionStr.c_str());
379  return resolutionStr;
380 }
381 
382 static std::string getFrameRateStr (dsVideoFrameRate_t frameRate)
383 {
384  std::string FrameRateStr;
385 
386  switch (frameRate)
387  {
389  FrameRateStr = "24";
390  break;
391 
393  FrameRateStr = "25";
394  break;
395 
397  FrameRateStr = "30";
398  break;
399 
401  FrameRateStr = "60";
402  break;
403 
405  FrameRateStr = "23.98";
406  break;
407 
409  FrameRateStr = "29.97";
410  break;
411 
413  FrameRateStr = "50";
414  break;
415 
417  FrameRateStr = "59.94";
418  break;
419 
420  default:
421  // Not all video formats have a specified framerate.
422  break;
423  }
424 
425  printf ("%s:%d - FrameRateStr: %s\n", __PRETTY_FUNCTION__,__LINE__, FrameRateStr.c_str());
426  return FrameRateStr;
427 }
428 
429 static std::string getInterlacedStr (bool interlaced)
430 {
431  std::string InterlacedStr = (interlaced) ? "i" : "p";
432  printf ("%s:%d - InterlacedStr: %s\n", __PRETTY_FUNCTION__,__LINE__, InterlacedStr.c_str());
433  return InterlacedStr;
434 }
435 
436 static std::string CreateResolutionStr (const dsVideoPortResolution_t &resolution)
437 {
438  printf("%s ---> \n", __PRETTY_FUNCTION__);
439 
440  std::string resolutionStr = getResolutionStr(resolution.pixelResolution);
441  if(resolutionStr.compare("unknown") != 0){
442  resolutionStr = getResolutionStr(resolution.pixelResolution) +
443  getInterlacedStr(resolution.interlaced) +
444  getFrameRateStr(resolution.frameRate);
445  }
446  printf ("%s <--- %s\n", __PRETTY_FUNCTION__, resolutionStr.c_str());
447  return resolutionStr;
448 }
449 
450 /**
451  * @fn HdmiInput::getCurrentVideoMode()
452  * @brief This API is used to get the current HDMI In video mode (resolution)
453  *
454  * @param[in] None
455  *
456  * @return HDMI Input video resolution string
457  * @callergraph
458  */
459 std::string HdmiInput::getCurrentVideoMode () const
460 {
461 
462  dsVideoPortResolution_t resolution;
463  memset(&resolution, 0, sizeof(resolution));
464 
465  dsError_t eError = dsHdmiInGetCurrentVideoMode (&resolution);
466 
467  // Throw an exception if there was an error
468  if (dsERR_NONE != eError)
469  {
470  throw Exception(eError);
471  }
472 
473  std::string resolutionStr = CreateResolutionStr (resolution);
474  printf("%s:%d - Resolution =%s\n", __PRETTY_FUNCTION__,__LINE__, resolutionStr.c_str());
475  return resolutionStr;
476 }
477 
478 void HdmiInput::getCurrentVideoModeObj (dsVideoPortResolution_t& resolution)
479 {
480 
481  memset(&resolution, 0, sizeof(resolution));
482 
483  dsError_t eError = dsHdmiInGetCurrentVideoMode (&resolution);
484 
485  // Throw an exception if there was an error
486  if (dsERR_NONE != eError)
487  {
488  throw Exception(eError);
489  }
490 
491  printf("%s:%d - pixelResolution =%d interlaced:%d frameRate:%d\n", __PRETTY_FUNCTION__, __LINE__, resolution.pixelResolution, resolution.interlaced, resolution.frameRate);
492 }
493 
494 void HdmiInput::getEDIDBytesInfo (int iHdmiPort, std::vector<uint8_t> &edidArg) const
495 {
496 
497  printf("HdmiInput::getEDIDBytesInfo \r\n");
498 
499  dsError_t ret = dsERR_NONE;
500  int length = 0;
501  unsigned char* edid = NULL;
502 
503  const char* exceptionstr = "";
504  ret = dsGetEDIDBytesInfo (iHdmiPort, (unsigned char**)(&edid), &length);
505  if (NULL == edid) {
506  printf("HdmiInput::getEDIDBytesInfo dsGetEDIDBytesInfo returned NULL \r\n");
507  exceptionstr = "EDID is NULL";
508  ret = dsERR_GENERAL;
509  }
510 
511  printf("HdmiInput::getEDIDBytesInfo has ret %d\r\n", ret);
512  if (ret == dsERR_NONE) {
513  if (length <= MAX_EDID_BYTES_LEN) {
514  printf("HdmiInput::getEDIDBytesInfo has %d bytes\r\n", length);
515  if (edid_parser::EDID_STATUS_OK == edid_parser::EDID_Verify(edid, length)) {
516  edidArg.clear();
517  edidArg.insert(edidArg.begin(), edid, edid + length);
518  } else {
519  ret = dsERR_GENERAL;
520  exceptionstr = "EDID verification failed";
521  }
522  } else {
524  exceptionstr = "EDID length > MAX_EDID_BYTES_LEN";
525  }
526  } else {
527  exceptionstr = "dsGetEDIDBytesInfo failed";
528  }
529 
530  if (ret != dsERR_NONE) {
531  throw Exception(ret, exceptionstr);
532  }
533 }
534 
535 void HdmiInput::getHDMISPDInfo (int iHdmiPort, std::vector<uint8_t> &data) {
536  printf("HdmiInput::getHDMISPDInfo \r\n");
537 
538  unsigned char* spdinfo = NULL;
539  const char* exceptionstr = "";
540  dsError_t ret = dsGetHDMISPDInfo (iHdmiPort, (unsigned char**)(&spdinfo));
541  if (NULL == spdinfo) {
542  printf("HdmiInput::dsGetHDMISPDInfo returned NULL \r\n");
543  exceptionstr = "SPDInfo is NULL";
544  ret = dsERR_GENERAL;
545  }
546 
547  printf("HdmiInput::getHDMISPDInfo has ret %d\r\n", ret);
548  data.clear();
549  if (ret == dsERR_NONE) {
550  if (sizeof(spdinfo) <= sizeof(struct dsSpd_infoframe_st)) {
551  printf("HdmiInput::getHDMISPDInfo has %d bytes\r\n", sizeof(spdinfo));
552  data.insert(data.begin(), spdinfo, spdinfo + sizeof(struct dsSpd_infoframe_st));
553  } else {
555  exceptionstr = "size is greater";
556  }
557  } else {
558  exceptionstr = "getHDMISPDInfo failed";
559  }
560  printf("HdmiInput::getHDMISPDInfo data: \r\n");
561  for (int itr = 0; itr < data.size(); itr++) {
562  printf("%02X ", data[itr]);
563  }
564  printf("\n");
565 
566  if (ret != dsERR_NONE) {
567  throw Exception(ret, exceptionstr);
568  }
569 
570 }
571 
572 void HdmiInput::setEdidVersion (int iHdmiPort, int iEdidVersion) {
573  printf ("HdmiInput::setEdidVersion \r\n");
574  dsError_t ret = dsSetEdidVersion (iHdmiPort, iEdidVersion);
575  if (ret != dsERR_NONE)
576  {
577  throw Exception(ret);
578  }
579  printf ("%s:%d - Set EDID Version = %d\n", __PRETTY_FUNCTION__, __LINE__, iEdidVersion);
580 }
581 
582 void HdmiInput::getEdidVersion (int iHdmiPort, int *iEdidVersion) {
583  printf ("HdmiInput::getEdidVersion \r\n");
584  dsError_t ret = dsGetEdidVersion (iHdmiPort, iEdidVersion);
585  if (ret != dsERR_NONE)
586  {
587  throw Exception(ret);
588  }
589  printf ("%s:%d - EDID Version = %d\n", __PRETTY_FUNCTION__, __LINE__, *iEdidVersion);
590 }
591 
592 void HdmiInput::getHdmiALLMStatus (int iHdmiPort, bool *allmStatus) {
593  printf ("HdmiInput::getHdmiALLMStatus \r\n");
594  dsError_t ret = dsGetAllmStatus (iHdmiPort, allmStatus);
595  if (ret != dsERR_NONE)
596  {
597  throw Exception(ret);
598  }
599  printf ("%s:%d - ALLM Status = %d\n", __FUNCTION__, __LINE__, *allmStatus);
600 }
601 
602 void HdmiInput::getSupportedGameFeatures (std::vector<std::string> &featureList) {
603  dsError_t ret = dsERR_NONE;
604 
606  ret = dsGetSupportedGameFeaturesList(&feList);
607  if ( ret != dsERR_NONE)
608  {
609  throw Exception(ret);
610  }
611 
612  char* token;
613 
614  token = strtok(feList.gameFeatureList, ",");
615  while(token != NULL) {
616  featureList.emplace_back(token);
617  token = strtok(NULL, ",");
618  }
619 
620  if(featureList.size() != feList.gameFeatureCount){
621  printf ("%s:%d - Number of Supported Game Features in list doesn't match with count from HAL", __FUNCTION__, __LINE__);
622  throw Exception(dsERR_GENERAL);
623  }
624 }
625 
626 }
627 
628 
629 /** @} */
630 /** @} */
dsVIDEO_FRAMERATE_25
@ dsVIDEO_FRAMERATE_25
Definition: dsTypes.h:505
_dsHdmiInStatus_t::isPortConnected
bool isPortConnected[dsHDMI_IN_PORT_MAX]
Definition: dsTypes.h:1032
device::HdmiInput::~HdmiInput
virtual ~HdmiInput()
destructor
Definition: hdmiIn.cpp:96
dsHdmiInGetNumberOfInputs
dsError_t dsHdmiInGetNumberOfInputs(uint8_t *pNumberOfInputs)
Get the number of HDMI Input ports on the set-top.
Definition: dsHdmiIn.c:99
device::HdmiInput::getInstance
static HdmiInput & getInstance()
This API is used to get the instance of the HDMI Input.
Definition: hdmiIn.cpp:110
dsVIDEO_FRAMERATE_60
@ dsVIDEO_FRAMERATE_60
Definition: dsTypes.h:507
device::HdmiInput::selectZoomMode
void selectZoomMode(int8_t zoomMode) const
This API is used to select the HDMI In video zoom mode.
Definition: hdmiIn.cpp:291
device::HdmiInput::isPortConnected
bool isPortConnected(int8_t Port) const
This API is used to specify if the prvided HDMI Input port is connected (i.e. HDMI Input devie is plu...
Definition: hdmiIn.cpp:222
dsVIDEO_FRAMERATE_23dot98
@ dsVIDEO_FRAMERATE_23dot98
Definition: dsTypes.h:508
hdmiIn.hpp
Structures and classes for HDMI Input are defined here.
dsSpd_infoframe_st
Definition: dsTypes.h:1117
dsVIDEO_FRAMERATE_30
@ dsVIDEO_FRAMERATE_30
Definition: dsTypes.h:506
device::HdmiInput::isActivePort
bool isActivePort(int8_t Port) const
This API is used to specify if the provided HDMI Input port is active (i.e. communicating with the se...
Definition: hdmiIn.cpp:174
dsVIDEO_PIXELRES_720x576
@ dsVIDEO_PIXELRES_720x576
Definition: dsTypes.h:460
device::HdmiInput::resumeAudio
void resumeAudio() const
This API is used to select the HDMI In video zoom mode.
Definition: hdmiIn.cpp:331
dsVIDEO_FRAMERATE_59dot94
@ dsVIDEO_FRAMERATE_59dot94
Definition: dsTypes.h:511
dsHdmiInSelectZoomMode
dsError_t dsHdmiInSelectZoomMode(dsVideoZoom_t requestedZoomMode)
Select the HDMI Input zoom mode.
Definition: dsHdmiIn.c:202
_dsSupportedGameFeatureList_t
Definition: dsTypes.h:1141
dsTypes.h
Device Settings HAL types.
_dsHdmiInStatus_t::activePort
dsHdmiInPort_t activePort
Definition: dsTypes.h:1033
dsVIDEO_PIXELRES_1280x720
@ dsVIDEO_PIXELRES_1280x720
Definition: dsTypes.h:461
dsVideoFrameRate_t
enum _dsVideoFrameRate_t dsVideoFrameRate_t
device::HdmiInput::HdmiInput
HdmiInput()
default constructor
Definition: hdmiIn.cpp:82
dsHdmiInTerm
dsError_t dsHdmiInTerm(void)
Terminate the underlying HDMI Input sub-system.
Definition: dsHdmiIn.c:78
_dsVideoPortResolution_t::pixelResolution
dsVideoResolution_t pixelResolution
Definition: dsTypes.h:644
dsVIDEO_FRAMERATE_29dot97
@ dsVIDEO_FRAMERATE_29dot97
Definition: dsTypes.h:509
dsError.h
Device Settings HAL error codes.
_dsHdmiInStatus_t::isPresented
bool isPresented
Definition: dsTypes.h:1031
dsUtl.h
Device Settings HAL utilities.
device::HdmiInput::pauseAudio
void pauseAudio() const
This API is used to select the HDMI In video zoom mode.
Definition: hdmiIn.cpp:311
dsERR_GENERAL
@ dsERR_GENERAL
Definition: dsError.h:86
dsHdmiInGetCurrentVideoMode
dsError_t dsHdmiInGetCurrentVideoMode(dsVideoPortResolution_t *resolution)
Get the current HDMI Input video mode.
Definition: dsHdmiIn.c:269
dsERR_NONE
@ dsERR_NONE
Definition: dsError.h:85
dsVideoResolution_t
enum _dsVideoResolution_t dsVideoResolution_t
device::HdmiInput::scaleVideo
void scaleVideo(int32_t x, int32_t y, int32_t width, int32_t height) const
This API is used to scale the HDMI In video.
Definition: hdmiIn.cpp:270
dsVIDEO_FRAMERATE_50
@ dsVIDEO_FRAMERATE_50
Definition: dsTypes.h:510
device::HdmiInput::selectPort
void selectPort(int8_t Port) const
This API is used to select the HDMI In port to be presented.
Definition: hdmiIn.cpp:246
dsHdmiInPauseAudio
dsError_t dsHdmiInPauseAudio(void)
Stop the output of HDMI Input audio.
Definition: dsHdmiIn.c:225
dsVideoZoom_t
enum _dsVideoZoom_t dsVideoZoom_t
dsHdmiInInit
dsError_t dsHdmiInInit(void)
Initialize the underlying HDMI Input sub-system.
Definition: dsHdmiIn.c:58
_dsHdmiInStatus_t
Definition: dsTypes.h:1029
dsHdmiInScaleVideo
dsError_t dsHdmiInScaleVideo(int32_t x, int32_t y, int32_t width, int32_t height)
Scale the HDMI In video This function is used to scale the HDMI In video.
Definition: dsHdmiIn.c:176
dsHdmiIn.h
Device Settings HAL HDMI Input Public API. This API defines the HAL for the Device Settings HDMI Inpu...
dsHdmiInSelectPort
dsError_t dsHdmiInSelectPort(dsHdmiInPort_t Port)
Select the HDMI Input port to be presented.
Definition: dsHdmiIn.c:152
dsVIDEO_PIXELRES_720x480
@ dsVIDEO_PIXELRES_720x480
Definition: dsTypes.h:459
device::HdmiInput
This class manages HDMI Input.
Definition: hdmiIn.hpp:71
dsHdmiInGetStatus
dsError_t dsHdmiInGetStatus(dsHdmiInStatus_t *pStatus)
Get the HDMI Inpuut Status.
Definition: dsHdmiIn.c:125
_dsVideoPortResolution_t
Structure that defines video port resolution settings of output video device.
Definition: dsTypes.h:642
device::Exception
This class handles exceptions occurring in DS module.
Definition: exception.hpp:52
device::HdmiInput::getActivePort
int8_t getActivePort() const
This API is used to specify the active (i.e. communicating with the set-top) HDMI Input port.
Definition: hdmiIn.cpp:198
device::HdmiInput::isPresented
bool isPresented() const
This API is used to specify if HDMI Input is being presented via HDMI Out.
Definition: hdmiIn.cpp:150
dsERR_OPERATION_NOT_SUPPORTED
@ dsERR_OPERATION_NOT_SUPPORTED
Definition: dsError.h:89
dsVIDEO_FRAMERATE_24
@ dsVIDEO_FRAMERATE_24
Definition: dsTypes.h:504
_dsVideoPortResolution_t::frameRate
dsVideoFrameRate_t frameRate
Definition: dsTypes.h:647
dsHdmiInResumeAudio
dsError_t dsHdmiInResumeAudio(void)
Start the output of HDMI Input audio.
Definition: dsHdmiIn.c:247
device::HdmiInput::getNumberOfInputs
uint8_t getNumberOfInputs() const
This API is used to get the number of HDMI Input ports on the set-top.
Definition: hdmiIn.cpp:125
dsVIDEO_PIXELRES_1920x1080
@ dsVIDEO_PIXELRES_1920x1080
Definition: dsTypes.h:462
dsVIDEO_PIXELRES_4096x2160
@ dsVIDEO_PIXELRES_4096x2160
Definition: dsTypes.h:465
Exception
Definition: Exception.hpp:42
dsError_t
dsError_t
Device Settings API Error return codes.
Definition: dsError.h:84
device::HdmiInput::getCurrentVideoMode
std::string getCurrentVideoMode() const
This API is used to get the current HDMI In video mode (resolution)
Definition: hdmiIn.cpp:459
_dsVideoPortResolution_t::interlaced
bool interlaced
Definition: dsTypes.h:648
dsVIDEO_PIXELRES_3840x2160
@ dsVIDEO_PIXELRES_3840x2160
Definition: dsTypes.h:464