Merge the latest code. 41/40041/1 accepted/tizen/common/20150601.145448 accepted/tizen/common/20150603.075557 accepted/tizen/mobile/20150602.003215 accepted/tizen/mobile/20150603.082910 accepted/tizen/tv/20150602.003146 accepted/tizen/tv/20150603.083513 accepted/tizen/wearable/20150602.003157 accepted/tizen/wearable/20150603.083210 submit/tizen/20150601.053048 submit/tizen/20150603.045535
authorSangkyu Park <sk1122.park@samsung.com>
Thu, 28 May 2015 05:38:19 +0000 (14:38 +0900)
committerSangkyu Park <sk1122.park@samsung.com>
Thu, 28 May 2015 05:39:04 +0000 (14:39 +0900)
Change-Id: I02e1ec3a81ce27ef753825368d078d122df3085f
Signed-off-by: Sangkyu Park <sk1122.park@samsung.com>
configure.ac
include/mm_wfd_common_private.h [new file with mode: 0755]
packaging/libmm-scmirroring-common.spec
wfdconfig/Makefile.am
wfdconfig/wfdconfigmessage.c

index 03ff509..5138893 100755 (executable)
@@ -29,6 +29,9 @@ PKG_CHECK_MODULES(GLIB, glib-2.0)
 AC_SUBST(GLIB_CFLAGS)
 AC_SUBST(GLIB_LIBS)
 
+PKG_CHECK_MODULES(DLOG, dlog)
+AC_SUBST(DLOG_CFLAGS)
+AC_SUBST(DLOG_LIBS)
 # for testsuite
 
 AC_ARG_ENABLE(context-manager, AC_HELP_STRING([--enable-context-manager], [context manager]),
diff --git a/include/mm_wfd_common_private.h b/include/mm_wfd_common_private.h
new file mode 100755 (executable)
index 0000000..92d33c7
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+* Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef __MM_WFD_COMMON_PRIVATE_H__
+#define __MM_WFD_COMMON_PRIVATE_H__
+
+#include <dlog.h>
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif
+#define LOG_TAG "MM_WFD_COMMON"
+
+#define wfd_debug(fmt, arg...) do { \
+                       LOGD(""fmt"", ##arg);     \
+               } while (0)
+
+#define wfd_info(fmt, arg...) do { \
+                       LOGI(""fmt"", ##arg);     \
+               } while (0)
+
+#define wfd_error(fmt, arg...) do { \
+                       LOGE(""fmt"", ##arg);     \
+               } while (0)
+
+#define wfd_warning(fmt, arg...) do { \
+                       LOGW(""fmt"", ##arg);     \
+               } while (0)
+
+#define wfd_debug_fenter() do { \
+                       LOGD("<Enter>");     \
+               } while (0)
+
+#define wfd_debug_fleave() do { \
+                       LOGD("<Leave>");     \
+               } while (0)
+
+#define wfd_error_fenter() do { \
+                       LOGE("NO-ERROR : <Enter>");     \
+               } while (0)
+
+#define wfd_error_fleave() do { \
+                       LOGE("NO-ERROR : <Leave>");     \
+               } while (0)
+
+#define wfd_sucure_info(fmt, arg...) do { \
+                       SECURE_LOGI(""fmt"", ##arg);     \
+               } while (0)
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __MM_WFD_COMMON_PRIVATE_H__ */
index a189770..4eb900e 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       libmm-scmirroring-common
 Summary:    Multimedia Framework Wifi-Display Common Library
-Version:    0.0.27
+Version:    0.0.35
 Release:    0
 Group:      System/Libraries
 License:    Apache License 2.0
@@ -8,6 +8,7 @@ Source0:    %{name}-%{version}.tar.gz
 Requires(post):  /sbin/ldconfig
 Requires(postun):  /sbin/ldconfig
 BuildRequires:  pkgconfig(mm-common)
+BuildRequires:  pkgconfig(dlog)
 
 BuildRoot:  %{_tmppath}/%{name}-%{version}-build
 
index 075faa0..c846644 100755 (executable)
@@ -8,7 +8,8 @@ libmmfwfdconfig_la_SOURCES = wfdconfigmessage.c
 
 libmmfwfdconfig_la_CFLAGS = -I$(srcdir)/include \
         $(GLIB_CFLAGS) \
-        $(MMCOMMON_CFLAGS)
+        $(MMCOMMON_CFLAGS) \
+        -I$(top_builddir)/include
 
 libmmfwfdconfig_la_LIBADD = $(GLIB_LIBS) \
         $(GST_LIBS) \
index a01cd5c..4ff1627 100755 (executable)
@@ -33,7 +33,7 @@
 
 #include <glib.h>               /* for G_OS_WIN32 */
 #include "wfdconfigmessage.h"
-#include <mm_debug.h>
+#include "mm_wfd_common_private.h"
 
 /* FIXME, is currently allocated on the stack */
 #define MAX_LINE_LEN    1024 * 16
@@ -1193,258 +1193,258 @@ WFDResult
 wfdconfig_message_dump (const WFDMessage * msg)
 {
   g_return_val_if_fail (msg != NULL, WFD_EINVAL);
-  debug_log("===========WFD Message dump=========");
+  wfd_debug("===========WFD Message dump=========");
 
   if(msg->audio_codecs) {
     guint i=0;
-    debug_log("Audio supported formats : \n");
+    wfd_debug("Audio supported formats : \n");
     for(;i<msg->audio_codecs->count;i++) {
-      debug_log("Codec: %s\n",msg->audio_codecs->list[i].audio_format);
+      wfd_debug("Codec: %s\n",msg->audio_codecs->list[i].audio_format);
       if(!strcmp(msg->audio_codecs->list[i].audio_format,"LPCM")) {
         if(msg->audio_codecs->list[i].modes & WFD_FREQ_44100)
-          debug_log("  Freq: %d\n", 44100);
+          wfd_debug("  Freq: %d\n", 44100);
         if(msg->audio_codecs->list[i].modes & WFD_FREQ_48000)
-          debug_log("  Freq: %d\n", 48000);
-        debug_log("    Channels: %d\n", 2);
+          wfd_debug("  Freq: %d\n", 48000);
+        wfd_debug("    Channels: %d\n", 2);
       }
       if(!strcmp(msg->audio_codecs->list[i].audio_format,"AAC")) {
-        debug_log("    Freq: %d\n", 48000);
+        wfd_debug("    Freq: %d\n", 48000);
         if(msg->audio_codecs->list[i].modes & WFD_CHANNEL_2)
-          debug_log("  Channels: %d\n", 2);
+          wfd_debug("  Channels: %d\n", 2);
         if(msg->audio_codecs->list[i].modes & WFD_CHANNEL_4)
-          debug_log("  Channels: %d\n", 4);
+          wfd_debug("  Channels: %d\n", 4);
         if(msg->audio_codecs->list[i].modes & WFD_CHANNEL_6)
-          debug_log("  Channels: %d\n", 6);
+          wfd_debug("  Channels: %d\n", 6);
         if(msg->audio_codecs->list[i].modes & WFD_CHANNEL_8)
-          debug_log("  Channels: %d\n", 8);
+          wfd_debug("  Channels: %d\n", 8);
       }
       if(!strcmp(msg->audio_codecs->list[i].audio_format,"AC3")) {
-        debug_log("    Freq: %d\n", 48000);
+        wfd_debug("    Freq: %d\n", 48000);
         if(msg->audio_codecs->list[i].modes & WFD_CHANNEL_2)
-          debug_log("  Channels: %d\n", 2);
+          wfd_debug("  Channels: %d\n", 2);
         if(msg->audio_codecs->list[i].modes & WFD_CHANNEL_4)
-          debug_log("  Channels: %d\n", 4);
+          wfd_debug("  Channels: %d\n", 4);
         if(msg->audio_codecs->list[i].modes & WFD_CHANNEL_6)
-          debug_log("  Channels: %d\n", 6);
+          wfd_debug("  Channels: %d\n", 6);
       }
-      debug_log("      Bitwidth: %d\n", 16);
-      debug_log("      Latency: %d\n", msg->audio_codecs->list[i].latency);
+      wfd_debug("      Bitwidth: %d\n", 16);
+      wfd_debug("      Latency: %d\n", msg->audio_codecs->list[i].latency);
     }
   }
 
 
   if(msg->video_formats) {
-    debug_log("Video supported formats : \n");
+    wfd_debug("Video supported formats : \n");
     if(msg->video_formats->list) {
-      debug_log("Codec: H264\n");
+      wfd_debug("Codec: H264\n");
       guint nativeindex = 0;
       if((msg->video_formats->list->native & 0x7) == WFD_VIDEO_CEA_RESOLUTION) {
-        debug_log ("   Native type: CEA\n");
+        wfd_debug ("   Native type: CEA\n");
       } else if((msg->video_formats->list->native & 0x7) == WFD_VIDEO_VESA_RESOLUTION) {
-        debug_log ("   Native type: VESA\n");
+        wfd_debug ("   Native type: VESA\n");
       } else if((msg->video_formats->list->native & 0x7) == WFD_VIDEO_HH_RESOLUTION) {
-        debug_log ("   Native type: HH\n");
+        wfd_debug ("   Native type: HH\n");
       }
       nativeindex = msg->video_formats->list->native >> 3;
-      debug_log ("     Resolution: %d\n", (1 << nativeindex));
+      wfd_debug ("     Resolution: %d\n", (1 << nativeindex));
 
       if(msg->video_formats->list->H264_codec.profile & WFD_H264_BASE_PROFILE) {
-        debug_log ("   Profile: BASE\n");
+        wfd_debug ("   Profile: BASE\n");
       } else if(msg->video_formats->list->H264_codec.profile & WFD_H264_HIGH_PROFILE) {
-        debug_log ("   Profile: HIGH\n");
+        wfd_debug ("   Profile: HIGH\n");
       } if(msg->video_formats->list->H264_codec.level & WFD_H264_LEVEL_3_1) {
-        debug_log ("   Level: 3.1\n");
+        wfd_debug ("   Level: 3.1\n");
       } else if(msg->video_formats->list->H264_codec.level & WFD_H264_LEVEL_3_2) {
-        debug_log ("   Level: 3.2\n");
+        wfd_debug ("   Level: 3.2\n");
       } else if(msg->video_formats->list->H264_codec.level & WFD_H264_LEVEL_4) {
-        debug_log ("   Level: 4\n");
+        wfd_debug ("   Level: 4\n");
       } else if(msg->video_formats->list->H264_codec.level & WFD_H264_LEVEL_4_1) {
-        debug_log ("   Level: 4.1\n");
+        wfd_debug ("   Level: 4.1\n");
       } else if(msg->video_formats->list->H264_codec.level & WFD_H264_LEVEL_4_2) {
-        debug_log ("   Level: 4.2\n");
+        wfd_debug ("   Level: 4.2\n");
       }
-      debug_log ("     Latency: %d\n", msg->video_formats->list->H264_codec.misc_params.latency);
-      debug_log ("     min_slice_size: %x\n", msg->video_formats->list->H264_codec.misc_params.min_slice_size);
-      debug_log ("     slice_enc_params: %x\n", msg->video_formats->list->H264_codec.misc_params.slice_enc_params);
-      debug_log ("     frame_rate_control_support: %x\n", msg->video_formats->list->H264_codec.misc_params.frame_rate_control_support);
+      wfd_debug ("     Latency: %d\n", msg->video_formats->list->H264_codec.misc_params.latency);
+      wfd_debug ("     min_slice_size: %x\n", msg->video_formats->list->H264_codec.misc_params.min_slice_size);
+      wfd_debug ("     slice_enc_params: %x\n", msg->video_formats->list->H264_codec.misc_params.slice_enc_params);
+      wfd_debug ("     frame_rate_control_support: %x\n", msg->video_formats->list->H264_codec.misc_params.frame_rate_control_support);
       if(msg->video_formats->list->H264_codec.max_hres) {
-        debug_log ("   Max Height: %04d\n", msg->video_formats->list->H264_codec.max_hres);
+        wfd_debug ("   Max Width: %04d\n", msg->video_formats->list->H264_codec.max_hres);
       }
       if(msg->video_formats->list->H264_codec.max_vres) {
-        debug_log ("   Max Width: %04d\n", msg->video_formats->list->H264_codec.max_vres);
+        wfd_debug ("   Max Height: %04d\n", msg->video_formats->list->H264_codec.max_vres);
       }
     }
   }
 
   if(msg->video_3d_formats) {
-    debug_log ("wfd_3d_formats");
-    debug_log ("\r\n");
+    wfd_debug ("wfd_3d_formats");
+    wfd_debug ("\r\n");
   }
 
   if(msg->content_protection) {
-    debug_log ("wfd_content_protection");
-    debug_log ("\r\n");
+    wfd_debug ("wfd_content_protection");
+    wfd_debug ("\r\n");
   }
 
   if(msg->display_edid) {
-    debug_log ("wfd_display_edid");
-    debug_log ("\r\n");
+    wfd_debug ("wfd_display_edid");
+    wfd_debug ("\r\n");
   }
 
   if(msg->coupled_sink) {
-    debug_log ("wfd_coupled_sink");
-    debug_log ("\r\n");
+    wfd_debug ("wfd_coupled_sink");
+    wfd_debug ("\r\n");
   }
 
   if(msg->trigger_method) {
-    debug_log ("       Trigger type: %s\n", msg->trigger_method->wfd_trigger_method);
+    wfd_debug ("       Trigger type: %s\n", msg->trigger_method->wfd_trigger_method);
   }
 
   if(msg->presentation_url) {
-    debug_log ("wfd_presentation_URL");
-    debug_log ("\r\n");
+    wfd_debug ("wfd_presentation_URL");
+    wfd_debug ("\r\n");
   }
 
   if(msg->client_rtp_ports) {
-    debug_log(" Client RTP Ports : \n");
+    wfd_debug(" Client RTP Ports : \n");
     if(msg->client_rtp_ports->profile) {
-      debug_log ("%s\n", msg->client_rtp_ports->profile);
-      debug_log ("     %d\n", msg->client_rtp_ports->rtp_port0);
-      debug_log ("     %d\n", msg->client_rtp_ports->rtp_port1);
-      debug_log ("     %s\n", msg->client_rtp_ports->mode);
+      wfd_debug ("%s\n", msg->client_rtp_ports->profile);
+      wfd_debug ("     %d\n", msg->client_rtp_ports->rtp_port0);
+      wfd_debug ("     %d\n", msg->client_rtp_ports->rtp_port1);
+      wfd_debug ("     %s\n", msg->client_rtp_ports->mode);
     }
-    debug_log("\r\n");
+    wfd_debug("\r\n");
   }
 
   if(msg->route) {
-    debug_log ("wfd_route");
-    debug_log ("\r\n");
+    wfd_debug ("wfd_route");
+    wfd_debug ("\r\n");
   }
 
   if(msg->I2C) {
-    debug_log ("wfd_I2C");
-    debug_log ("\r\n");
+    wfd_debug ("wfd_I2C");
+    wfd_debug ("\r\n");
   }
 
   if(msg->av_format_change_timing) {
-    debug_log ("wfd_av_format_change_timing");
-    debug_log ("\r\n");
+    wfd_debug ("wfd_av_format_change_timing");
+    wfd_debug ("\r\n");
   }
 
   if(msg->preferred_display_mode) {
-    debug_log ("wfd_preferred_display_mode");
-    debug_log ("\r\n");
+    wfd_debug ("wfd_preferred_display_mode");
+    wfd_debug ("\r\n");
   }
 
   if(msg->uibc_capability) {
-    debug_log ("wfd_uibc_capability \r\n");
-    debug_log ("input category list:");
+    wfd_debug ("wfd_uibc_capability \r\n");
+    wfd_debug ("input category list:");
     if(msg->uibc_capability->input_category_list.input_cat & WFD_UIBC_INPUT_CAT_GENERIC)
-      debug_log ("GENERIC");
+      wfd_debug ("GENERIC");
     if(msg->uibc_capability->input_category_list.input_cat & WFD_UIBC_INPUT_CAT_HIDC)
-      debug_log ("HIDC");
+      wfd_debug ("HIDC");
     if(!msg->uibc_capability->input_category_list.input_cat)
-      debug_log ("none");
+      wfd_debug ("none");
     if(msg->uibc_capability->input_category_list.input_cat & WFD_UIBC_INPUT_CAT_GENERIC) {
-      debug_log ("generic cap list: ");
+      wfd_debug ("generic cap list: ");
       if(msg->uibc_capability->generic_cap_list.inp_type & WFD_UIBC_INPUT_TYPE_KEYBOARD)
-        debug_log("keyboard ");
+        wfd_debug("keyboard ");
       if(msg->uibc_capability->generic_cap_list.inp_type & WFD_UIBC_INPUT_TYPE_MOUSE)
-        debug_log("mouse ");
+        wfd_debug("mouse ");
       if(msg->uibc_capability->generic_cap_list.inp_type & WFD_UIBC_INPUT_TYPE_SINGLETOUCH)
-        debug_log("single-touch ");
+        wfd_debug("single-touch ");
       if(msg->uibc_capability->generic_cap_list.inp_type & WFD_UIBC_INPUT_TYPE_MULTITOUCH)
-        debug_log("multi-touch ");
+        wfd_debug("multi-touch ");
       if(msg->uibc_capability->generic_cap_list.inp_type & WFD_UIBC_INPUT_TYPE_JOYSTICK)
-        debug_log("joystick ");
+        wfd_debug("joystick ");
       if(msg->uibc_capability->generic_cap_list.inp_type & WFD_UIBC_INPUT_TYPE_CAMERA)
-        debug_log("camera ");
+        wfd_debug("camera ");
       if(msg->uibc_capability->generic_cap_list.inp_type & WFD_UIBC_INPUT_TYPE_GESTURE)
-        debug_log("gesture ");
+        wfd_debug("gesture ");
       if(msg->uibc_capability->generic_cap_list.inp_type & WFD_UIBC_INPUT_TYPE_REMOTECONTROL)
-        debug_log("remote control ");
+        wfd_debug("remote control ");
       if(!msg->uibc_capability->generic_cap_list.inp_type)
-        debug_log("none ");
+        wfd_debug("none ");
     }
     if(msg->uibc_capability->input_category_list.input_cat & WFD_UIBC_INPUT_CAT_HIDC) {
-      debug_log ("hidc cap list:");
+      wfd_debug ("hidc cap list:");
       if(msg->uibc_capability->hidc_cap_list.cap_count) {
         detailed_cap *temp_cap = msg->uibc_capability->hidc_cap_list.next;
         while (temp_cap) {
           if(temp_cap->p.inp_type & WFD_UIBC_INPUT_TYPE_KEYBOARD) {
-            debug_log("keyboard ");
+            wfd_debug("keyboard ");
           } else if(temp_cap->p.inp_type & WFD_UIBC_INPUT_TYPE_MOUSE) {
-            debug_log("mouse ");
+            wfd_debug("mouse ");
           } else if(temp_cap->p.inp_type & WFD_UIBC_INPUT_TYPE_SINGLETOUCH) {
-            debug_log("single-touch ");
+            wfd_debug("single-touch ");
           } else if(temp_cap->p.inp_type & WFD_UIBC_INPUT_TYPE_MULTITOUCH) {
-            debug_log("multi-touch ");
+            wfd_debug("multi-touch ");
           } else if(temp_cap->p.inp_type & WFD_UIBC_INPUT_TYPE_JOYSTICK) {
-            debug_log("joystick ");
+            wfd_debug("joystick ");
           } else if(temp_cap->p.inp_type & WFD_UIBC_INPUT_TYPE_CAMERA) {
-            debug_log("camera ");
+            wfd_debug("camera ");
           } else if(temp_cap->p.inp_type & WFD_UIBC_INPUT_TYPE_GESTURE) {
-            debug_log("gesture ");
+            wfd_debug("gesture ");
           } else if(temp_cap->p.inp_type & WFD_UIBC_INPUT_TYPE_REMOTECONTROL) {
-            debug_log("remote control ");
+            wfd_debug("remote control ");
           } else if(!temp_cap->p.inp_type) {
-            debug_log("none ");
+            wfd_debug("none ");
           }
           if(temp_cap->p.inp_path & WFD_UIBC_INPUT_PATH_INFRARED) {
-            debug_log("infrared");
+            wfd_debug("infrared");
           } else if(temp_cap->p.inp_path & WFD_UIBC_INPUT_PATH_USB) {
-            debug_log("usb");
+            wfd_debug("usb");
           } else if(temp_cap->p.inp_path & WFD_UIBC_INPUT_PATH_BT) {
-            debug_log("bluetooth");
+            wfd_debug("bluetooth");
           } else if(temp_cap->p.inp_path & WFD_UIBC_INPUT_PATH_WIFI) {
-            debug_log("Wi-Fi");
+            wfd_debug("Wi-Fi");
           } else if(temp_cap->p.inp_path & WFD_UIBC_INPUT_PATH_ZIGBEE) {
-            debug_log("Zigbee");
+            wfd_debug("Zigbee");
           } else if(temp_cap->p.inp_path & WFD_UIBC_INPUT_PATH_NOSP) {
-            debug_log("No-SP");
+            wfd_debug("No-SP");
           } else if(!temp_cap->p.inp_path) {
-            debug_log("none");
+            wfd_debug("none");
           }
           temp_cap = temp_cap->next;
         }
       }
     }
     if(msg->uibc_capability->tcp_port)
-      debug_log("tcp port:%u", msg->uibc_capability->tcp_port);
+      wfd_debug("tcp port:%u", msg->uibc_capability->tcp_port);
     if(!msg->uibc_capability->tcp_port)
-      debug_log ("tcp port: none");
-    debug_log ("\r\n");
+      wfd_debug ("tcp port: none");
+    wfd_debug ("\r\n");
   }
 
   if(msg->uibc_setting) {
-    debug_log ("wfd_uibc_setting: ");
+    wfd_debug ("wfd_uibc_setting: ");
     if(msg->uibc_setting->uibc_setting) {
-      debug_log("true");
-    } else debug_log("false");
-    debug_log ("\r\n");
+      wfd_debug("true");
+    } else wfd_debug("false");
+    wfd_debug ("\r\n");
   }
 
   if(msg->standby_resume_capability) {
-    debug_log ("wfd_standby_resume_capability");
-    debug_log ("\r\n");
+    wfd_debug ("wfd_standby_resume_capability");
+    wfd_debug ("\r\n");
   }
 
   if(msg->standby) {
-    debug_log ("wfd_standby");
-    debug_log ("\r\n");
+    wfd_debug ("wfd_standby");
+    wfd_debug ("\r\n");
   }
 
   if(msg->connector_type) {
-    debug_log ("wfd_connector_type");
-    debug_log ("\r\n");
+    wfd_debug ("wfd_connector_type");
+    wfd_debug ("\r\n");
   }
 
   if(msg->idr_request) {
-    debug_log ("wfd_idr_request");
-    debug_log ("\r\n");
+    wfd_debug ("wfd_idr_request");
+    wfd_debug ("\r\n");
   }
 
-  debug_log("===============================================\n");
+  wfd_debug("===============================================\n");
   return WFD_OK;
 }
 
@@ -1605,8 +1605,8 @@ WFDResult wfdconfig_set_supported_video_format(WFDMessage *msg, WFDVideoCodecs v
     msg->video_formats->list->preferred_display_mode_supported = 1;
     msg->video_formats->list->H264_codec.profile = vProfile;
     msg->video_formats->list->H264_codec.level = vLevel;
-    msg->video_formats->list->H264_codec.max_hres = vMaxHeight;
-    msg->video_formats->list->H264_codec.max_vres = vMaxWidth;
+    msg->video_formats->list->H264_codec.max_hres = vMaxWidth;
+    msg->video_formats->list->H264_codec.max_vres = vMaxHeight;
     msg->video_formats->list->H264_codec.misc_params.CEA_Support = vCEAResolution;
     msg->video_formats->list->H264_codec.misc_params.VESA_Support = vVESAResolution;
     msg->video_formats->list->H264_codec.misc_params.HH_Support = vHHResolution;
@@ -1650,8 +1650,8 @@ WFDResult wfdconfig_set_prefered_video_format(WFDMessage *msg, WFDVideoCodecs vC
   msg->video_formats->list->preferred_display_mode_supported = 0;
   msg->video_formats->list->H264_codec.profile = vProfile;
   msg->video_formats->list->H264_codec.level = vLevel;
-  msg->video_formats->list->H264_codec.max_hres = vMaxHeight;
-  msg->video_formats->list->H264_codec.max_vres = vMaxWidth;
+  msg->video_formats->list->H264_codec.max_hres = vMaxWidth;
+  msg->video_formats->list->H264_codec.max_vres = vMaxHeight;
   msg->video_formats->list->H264_codec.misc_params.CEA_Support = vCEAResolution;
   msg->video_formats->list->H264_codec.misc_params.VESA_Support = vVESAResolution;
   msg->video_formats->list->H264_codec.misc_params.HH_Support = vHHResolution;
@@ -1680,8 +1680,8 @@ WFDResult wfdconfig_get_supported_video_format(WFDMessage *msg, WFDVideoCodecs *
   *vNativeResolution = (guint64)1 << nativeindex;
   *vProfile = msg->video_formats->list->H264_codec.profile;
   *vLevel = msg->video_formats->list->H264_codec.level;
-  *vMaxHeight = msg->video_formats->list->H264_codec.max_hres;
-  *vMaxWidth = msg->video_formats->list->H264_codec.max_vres;
+  *vMaxWidth = msg->video_formats->list->H264_codec.max_hres;
+  *vMaxHeight = msg->video_formats->list->H264_codec.max_vres;
   *vCEAResolution = msg->video_formats->list->H264_codec.misc_params.CEA_Support;
   *vVESAResolution = msg->video_formats->list->H264_codec.misc_params.VESA_Support;
   *vHHResolution = msg->video_formats->list->H264_codec.misc_params.HH_Support;
@@ -1710,8 +1710,8 @@ WFDResult wfdconfig_get_prefered_video_format(WFDMessage *msg, WFDVideoCodecs *v
   *vNativeResolution = (guint64)1 << nativeindex;
   *vProfile = msg->video_formats->list->H264_codec.profile;
   *vLevel = msg->video_formats->list->H264_codec.level;
-  *vMaxHeight = msg->video_formats->list->H264_codec.max_hres;
-  *vMaxWidth = msg->video_formats->list->H264_codec.max_vres;
+  *vMaxWidth = msg->video_formats->list->H264_codec.max_hres;
+  *vMaxHeight = msg->video_formats->list->H264_codec.max_vres;
   *vCEAResolution = msg->video_formats->list->H264_codec.misc_params.CEA_Support;
   *vVESAResolution = msg->video_formats->list->H264_codec.misc_params.VESA_Support;
   *vHHResolution = msg->video_formats->list->H264_codec.misc_params.HH_Support;
@@ -1744,7 +1744,7 @@ WFDResult wfdconfig_get_contentprotection_type(WFDMessage *msg, WFDHDCPProtectio
     char *result = NULL;
     char *ptr = NULL;
     if(!g_strcmp0(msg->content_protection->hdcp2_spec->hdcpversion,"none")) {
-         debug_warning("HDCP none");
+         wfd_warning("HDCP none");
          *hdcpversion = WFD_HDCP_NONE;
          *TCPPort = 0;
          return WFD_OK;
@@ -1752,7 +1752,7 @@ WFDResult wfdconfig_get_contentprotection_type(WFDMessage *msg, WFDHDCPProtectio
     if(!g_strcmp0(msg->content_protection->hdcp2_spec->hdcpversion,"HDCP2.0")) *hdcpversion = WFD_HDCP_2_0;
     else if(!g_strcmp0(msg->content_protection->hdcp2_spec->hdcpversion,"HDCP2.1")) *hdcpversion = WFD_HDCP_2_1;
     else {
-         debug_warning("Unknown protection type");
+         wfd_warning("Unknown protection type");
          *hdcpversion = WFD_HDCP_NONE;
          *TCPPort = 0;
          return WFD_OK;