|
RDK Documentation (Open Sourced RDK Components)
|
Go to the documentation of this file.
33 #include "illegalArgumentException.hpp"
34 #include "exception.hpp"
35 #include "videoDeviceConfig.hpp"
36 #include "dsVideoResolutionSettings.h"
47 #include "safec_lib.h"
56 extern int stringToNumber (std::string text);
59 const char *_names[] = {
63 inline const bool isValid(
int id) {
70 const char * VideoDevice::kPropertyDFC =
".DFC";
87 return VideoDeviceConfig::getInstance().getDevice(
id);
113 std::stringstream out;
114 out <<
"VideoDevice" <<
_id;
195 setDFC(VideoDeviceConfig::getInstance().getDefaultDFC());
256 void VideoDevice::getHDRCapabilities(
int *capabilities)
261 void VideoDevice::getSettopSupportedResolutions(std::list<std::string>& stbSupportedResoltuions)
263 size_t numResolutions =
dsUTL_DIM(kResolutions);
264 for (
size_t i = 0; i < numResolutions; i++)
267 stbSupportedResoltuions.push_back(std::string(resolution->
name));
273 unsigned int VideoDevice::getSupportedVideoCodingFormats()
const
275 unsigned int formats = 0;
293 int VideoDevice::forceDisableHDRSupport(
bool disable)
295 dsForceDisableHDRSupport(_handle, disable);
299 int VideoDevice::setFRFMode(
int frfmode)
const
302 ret = dsSetFRFMode(_handle, frfmode);
306 int VideoDevice::getFRFMode(
int *frfmode)
const
310 ret = dsGetFRFMode(_handle, &frfmode1);
315 int VideoDevice::setDisplayframerate(
const char *framerate)
const
320 rc = strcpy_s(buf,
sizeof(buf), framerate);
325 ret = dsSetDisplayframerate(_handle, buf);
329 int VideoDevice::getCurrentDisframerate(
char *framerate)
const
332 char getframerate[20];
333 ret = dsGetCurrentDisplayframerate(_handle, getframerate);
335 rc = strcpy_s(framerate ,
sizeof(getframerate) ,getframerate);
int _id
Indicates the id of the instance inheriting this class.
static VideoDevice & getInstance(int id)
This API is used to get the instance of the video device port based on the port id returned by the ge...
This class is implemented using templates and it is used to maintain a container with the list of sup...
dsError_t dsGetSupportedVideoCodingFormats(intptr_t handle, unsigned int *supported_formats)
To find the Video formats supported by the SoC.
Device Settings HAL types.
VideoDevice(int id)
Constructor for videodevice class. This function initializes the the handle for the corresponding vid...
static bool isValid(int min, int max, int val)
This function checks if the given value lies between min and max values provided.
Device Settings HAL error codes.
Device Settings HAL utilities.
dsError_t dsGetHDRCapabilities(intptr_t handle, int *capabilities)
To find the HDR capabilities of SoC.
void setPlatformDFC()
This API is used to set the DFC setting to the default one supported by the platform....
static const int kPlatform
Indicates decoding format conversion will be managed by the platform.
virtual ~VideoDevice()
This is a default destructor of the class VideoDevice.
static const VideoDFC & getInstance(int id)
This function gets an instance of VideoDFC against the id specified, only if the id passed is valid.
This class extends DSConstant to manage the video Decoder Format Conversion.
std::string _name
Indicates the name string of the instance inheriting this class.
enum _dsVideoZoom_t dsVideoZoom_t
It contains class referenced by videoDevice.cpp file.
const VideoDFC & getDFC()
This API is used to get the current DFC setting.
dsError_t dsSetDFC(intptr_t handle, dsVideoZoom_t dfc)
This function is used to set the screen zoom mode (decoder format conversion). This function sets the...
List< VideoDFC > _supportedDFCs
List of supported dfc's.
Structure that defines video port resolution settings of output video device.
This class handles exceptions occurring in DS module.
dsError_t dsGetVideoCodecInfo(intptr_t handle, dsVideoCodingFormat_t codec, dsVideoCodecInfo_t *info)
This API is used to get the video codec information.
void addDFC(const VideoDFC &dfc)
This function is used to push DFC into the list of supported DFC (i.e. Zoom Settings) by the device.
class extending DSConstant to implement the videoDevice interface.
dsError_t dsGetDFC(intptr_t handle, dsVideoZoom_t *dfc)
This function is used to get the screen zoom mode (decoder format conversion). This function Gets the...
int _dfc
Decoder format converter variable.
This class extends Exception class to manage the expections caused due to illegal arguments.
void setDFC()
This API is used to set the default dfc.
#define dsUTL_DIM(arr)
Device Settings general Array dimension calculation inline definition.
dsError_t
Device Settings API Error return codes.
virtual int getId() const
This function is used to get the id.
This file defines VideoDFC class for managing video decoder format conversion types.
dsError_t dsGetVideoDevice(int index, intptr_t *handle)
This function gets the handle for the video device requested.
const List< VideoDFC > getSupportedDFCs() const
This API is used to get the list of supported DFC (i.e. Zoom Settings) by the video device.