TEST_P(TDMClient, ClientCreateVOutput)
{
tdm_error ret;
+ int virtual_conf = 0;
const char name[TDM_NAME_LEN] = "Virtual Output";
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ if (virtual_conf == 0) {
+ ASSERT_EQ(virtual_conf, 0);
+ return;
+ }
+
ASSERT_EQ(PrepareClient(), true);
voutput = tdm_client_create_voutput(client, name, &ret);
bool TDMVirtualOutput::PrepareVOutput(void)
{
tdm_error ret;
+ int virtual_conf = 0;
const char name[TDM_NAME_LEN] = "Virtual Output";
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ if (virtual_conf == 0) return true;
+
client = tdm_client_create(&ret);
TDM_UT_RETURN_FALSE_IF_FAIL(ret == TDM_ERROR_NONE);
TDM_UT_RETURN_FALSE_IF_FAIL(client != NULL);
tdm_error ret;
tdm_client_output_mode modes[this->MODE_COUNT];
int count = this->MODE_COUNT;
+ int virtual_conf;
+ if (this->voutput == NULL) {
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ ASSERT_EQ(virtual_conf, 0);
+ return;
+ }
_tc_tdm_client_virutual_make_available_mode(modes, count);
ret = tdm_client_voutput_set_available_modes(this->voutput, modes, count);
tdm_error ret;
tdm_client_output_mode modes[this->MODE_COUNT];
int count = this->MODE_COUNT;
+ int virtual_conf;
+
+ if (this->voutput == NULL) {
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ ASSERT_EQ(virtual_conf, 0);
+ return;
+ }
ret = tdm_client_voutput_set_available_modes(NULL, modes, count);
ASSERT_EQ(ret, TDM_ERROR_INVALID_PARAMETER);
{
tdm_error ret;
unsigned int mmWidth = 1234, mmHeight = 1234;
+ int virtual_conf;
+
+ if (this->voutput == NULL) {
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ ASSERT_EQ(virtual_conf, 0);
+ return;
+ }
ret = tdm_client_voutput_set_physical_size(this->voutput, mmWidth, mmHeight);
ASSERT_EQ(ret, TDM_ERROR_NONE);
{
tdm_error ret;
unsigned int invalid_mmWidth = 0, invalid_mmHeight = 0;
+ int virtual_conf;
+
+ if (this->voutput == NULL) {
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ ASSERT_EQ(virtual_conf, 0);
+ return;
+ }
ret = tdm_client_voutput_set_physical_size(this->voutput, invalid_mmWidth, invalid_mmHeight);
ASSERT_EQ(ret, TDM_ERROR_INVALID_PARAMETER);
{
tdm_error ret;
int flag_callback_called = 0;
+ int virtual_conf;
+
+ if (this->voutput == NULL) {
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ ASSERT_EQ(virtual_conf, 0);
+ return;
+ }
ret = tdm_client_voutput_add_commit_handler(this->voutput,
_tc_tdm_client_voutput_commit_handler,
TEST_F(TDMVirtualOutput, CommitDone)
{
tdm_error ret;
+ int virtual_conf;
+
+ if (this->voutput == NULL) {
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ ASSERT_EQ(virtual_conf, 0);
+ return;
+ }
ret = tdm_client_voutput_commit_done(this->voutput);
ASSERT_EQ(ret, TDM_ERROR_NONE);
{
tdm_error ret;
tdm_client_output *output;
+ int virtual_conf;
+
+ if (this->voutput == NULL) {
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ ASSERT_EQ(virtual_conf, 0);
+ return;
+ }
output = tdm_client_voutput_get_client_output(this->voutput, &ret);
ASSERT_EQ(ret, TDM_ERROR_NONE);
unsigned int mmWidth = 300, mmHeight = 150;
tdm_client_output_mode modes[this->MODE_COUNT];
int count = this->MODE_COUNT;
+ int virtual_conf;
+
+ if (this->voutput == NULL) {
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ ASSERT_EQ(virtual_conf, 0);
+ return;
+ }
ret = tdm_client_voutput_set_physical_size(this->voutput, mmWidth, mmHeight);
ASSERT_EQ(ret, TDM_ERROR_NONE);
TEST_F(TDMVirtualOutput, Disconnect)
{
tdm_error ret;
+ int virtual_conf;
+
+ if (this->voutput == NULL) {
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ ASSERT_EQ(virtual_conf, 0);
+ return;
+ }
// TDM_UT_WAIT("check & press");
unsigned int mmWidth = 300, mmHeight = 150;
tdm_client_output_mode modes[this->MODE_COUNT];
int count = this->MODE_COUNT;
+ int virtual_conf;
+
+ if (this->voutput == NULL) {
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ ASSERT_EQ(virtual_conf, 0);
+ return;
+ }
ret = tdm_client_voutput_set_physical_size(this->voutput, mmWidth, mmHeight);
ASSERT_EQ(ret, TDM_ERROR_NONE);
unsigned int mmWidth = 300, mmHeight = 150;
tdm_client_output_mode modes[this->MODE_COUNT];
int count = this->MODE_COUNT;
+ int virtual_conf;
+
+ if (this->voutput == NULL) {
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ ASSERT_EQ(virtual_conf, 0);
+ return;
+ }
ret = tdm_client_voutput_set_physical_size(this->voutput, mmWidth, mmHeight);
ASSERT_EQ(ret, TDM_ERROR_NONE);
unsigned int mmWidth = 300, mmHeight = 150;
tdm_client_output_mode modes[this->MODE_COUNT];
int count = this->MODE_COUNT;
+ int virtual_conf;
+
+ if (this->voutput == NULL) {
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ ASSERT_EQ(virtual_conf, 0);
+ return;
+ }
ret = tdm_client_voutput_set_physical_size(this->voutput, mmWidth, mmHeight);
ASSERT_EQ(ret, TDM_ERROR_NONE);