RDK Documentation (Open Sourced RDK Components)
setZoomSettings.cpp
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 
22 /**
23 * @defgroup devicesettings
24 * @{
25 * @defgroup sample
26 * @{
27 **/
28 
29 
30 #include <iostream>
31 #include "host.hpp"
32 #include "videoDevice.hpp"
33 #include "videoDFC.hpp"
34 #include "manager.hpp"
35 
36 #include "dsUtl.h"
37 #include "dsError.h"
38 #include "list.hpp"
39 #include <exception>
40 
41 #include "libIBus.h"
42 
43 
44 
45 int main(int argc, char *argv[])
46 {
47 
48  IARM_Bus_Init("SampleDSClient");
50 
52 
53 
54  if (argc != 2) {
55  printf("%s : <Zoom Settings - Full, Platform, None>\r\n", argv[0]);
56  return 0;
57  }
58 
59  const char *zoomSetting = argv[1];
60 
61  try {
63 
64  decoder.setDFC(zoomSetting);
65  printf("ZoomSettings - set to [%s]\r\n", decoder.getDFC().getName().c_str());
66  }
67  catch (const std::exception e) {
68  printf("Exception caught\r\n");
69  }
70 
72  return 0;
73 }
74 
75 
76 
77 /** @} */
78 /** @} */
manager.hpp
It contains class referenced by manager.cpp file.
device::VideoDevice::setDFC
void setDFC(const VideoDFC &dfc)
This API is used to set the DFC[Decoder format convention used for zoom purpose] setting by its prope...
Definition: videoDevice.cpp:144
dsError.h
Device Settings HAL error codes.
dsUtl.h
Device Settings HAL utilities.
device::Manager::Initialize
static void Initialize()
This API is used to initialize the Device Setting module. Each API should be called by any client of ...
Definition: manager.cpp:97
libIBus.h
RDK IARM-Bus API Declarations.
device::Host::getVideoDevices
List< VideoDevice > getVideoDevices()
This API is used to get the list of the video devices (i.e. Decoders) supported on the device....
Definition: host.cpp:331
videoDevice.hpp
It contains class referenced by videoDevice.cpp file.
device::VideoDevice::getDFC
const VideoDFC & getDFC()
This API is used to get the current DFC setting.
Definition: videoDevice.cpp:220
device::DSConstant::getName
virtual const std::string & getName() const
This function is used to the get the data member name.
Definition: dsConstant.hpp:141
device::Manager::DeInitialize
static void DeInitialize()
This API is used to deinitialize the device settings module. DeInitialize() must be called to release...
Definition: manager.cpp:138
device::Host::getInstance
static Host & getInstance(void)
This API is used to get a reference to the single instance of the Host object.
Definition: host.cpp:88
device::VideoDevice
class extending DSConstant to implement the videoDevice interface.
Definition: videoDevice.hpp:53
IARM_Bus_Connect
IARM_Result_t IARM_Bus_Connect(void)
This API is used to connect application to the IARM bus daemon. After connected, the application can ...
Definition: iarmMgrMocks.cpp:33
IARM_Bus_Init
IARM_Result_t IARM_Bus_Init(const char *name)
This API is used to initialize the IARM-Bus library.
Definition: iarmMgrMocks.cpp:38
videoDFC.hpp
This file defines VideoDFC class for managing video decoder format conversion types.