#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
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;
}
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;
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;
*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;
*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;
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;
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;