/* list of audio codecs */
if (msg->audio_codecs) {
guint i = 0;
- g_string_append_printf(lines, "wfd_audio_codecs");
+ g_string_append_printf(lines, STRING_WFD_AUDIO_CODECS);
if (msg->audio_codecs->list) {
g_string_append_printf(lines, ":");
for (; i < msg->audio_codecs->count; i++) {
/* list of video codecs */
if (msg->video_formats) {
- g_string_append_printf(lines, "wfd_video_formats");
+ g_string_append_printf(lines, STRING_WFD_VIDEO_FORMATS);
if (msg->video_formats->list) {
g_string_append_printf(lines, ":");
g_string_append_printf(lines, " %02x", msg->video_formats->list->native);
/* list of video 3D codecs */
if (msg->video_3d_formats) {
- g_string_append_printf(lines, "wfd_3d_video_formats");
+ g_string_append_printf(lines, STRING_WFD_3D_VIDEO_FORMATS);
g_string_append_printf(lines, ":");
if (msg->video_3d_formats->list) {
g_string_append_printf(lines, " %02x", msg->video_3d_formats->list->native);
}
if (msg->content_protection) {
- g_string_append_printf(lines, "wfd_content_protection");
+ g_string_append_printf(lines, STRING_WFD_CONTENT_PROTECTION);
g_string_append_printf(lines, ":");
if (msg->content_protection->hdcp2_spec) {
if (msg->content_protection->hdcp2_spec->hdcpversion) {
}
if (msg->display_edid) {
- g_string_append_printf(lines, "wfd_display_edid");
+ g_string_append_printf(lines, STRING_WFD_DISPLAY_EDID);
g_string_append_printf(lines, ":");
if (msg->display_edid->edid_supported) {
g_string_append_printf(lines, " %d", msg->display_edid->edid_supported);
}
if (msg->coupled_sink) {
- g_string_append_printf(lines, "wfd_coupled_sink");
+ g_string_append_printf(lines, STRING_WFD_COUPLED_SINK);
g_string_append_printf(lines, ":");
if (msg->coupled_sink->coupled_sink_cap) {
g_string_append_printf(lines, " %02x", msg->coupled_sink->coupled_sink_cap->status);
}
if (msg->trigger_method) {
- g_string_append_printf(lines, "wfd_trigger_method");
+ g_string_append_printf(lines, STRING_WFD_TRIGGER_METHOD);
g_string_append_printf(lines, ":");
g_string_append_printf(lines, " %s", msg->trigger_method->wfd_trigger_method);
g_string_append_printf(lines, "\r\n");
}
if (msg->presentation_url) {
- g_string_append_printf(lines, "wfd_presentation_URL");
+ g_string_append_printf(lines, STRING_WFD_PRESENTATION_URL);
g_string_append_printf(lines, ":");
if (msg->presentation_url->wfd_url0)
g_string_append_printf(lines, " %s", msg->presentation_url->wfd_url0);
}
if (msg->client_rtp_ports) {
- g_string_append_printf(lines, "wfd_client_rtp_ports");
+ g_string_append_printf(lines, STRING_WFD_CLIENT_RTP_PORTS);
if (msg->client_rtp_ports->profile) {
g_string_append_printf(lines, ":");
g_string_append_printf(lines, " %s", msg->client_rtp_ports->profile);
}
if (msg->route) {
- g_string_append_printf(lines, "wfd_route");
+ g_string_append_printf(lines, STRING_WFD_ROUTE);
g_string_append_printf(lines, ":");
g_string_append_printf(lines, " %s", msg->route->destination);
g_string_append_printf(lines, "\r\n");
}
if (msg->I2C) {
- g_string_append_printf(lines, "wfd_I2C");
+ g_string_append_printf(lines, STRING_WFD_I2C);
g_string_append_printf(lines, ":");
if (msg->I2C->I2CPresent)
g_string_append_printf(lines, " %x", msg->I2C->I2C_port);
}
if (msg->av_format_change_timing) {
- g_string_append_printf(lines, "wfd_av_format_change_timing");
+ g_string_append_printf(lines, STRING_WFD_AV_FORMAT_CHANGE_TIMING);
g_string_append_printf(lines, ":");
g_string_append_printf(lines, " %010llx", msg->av_format_change_timing->PTS);
g_string_append_printf(lines, " %010llx", msg->av_format_change_timing->DTS);
}
if (msg->preferred_display_mode) {
- g_string_append_printf(lines, "wfd_preferred_display_mode");
+ g_string_append_printf(lines, STRING_WFD_PREFERRED_DISPLAY_MODE);
g_string_append_printf(lines, ":");
if (msg->preferred_display_mode->displaymodesupported) {
g_string_append_printf(lines, " %06llx", msg->preferred_display_mode->p_clock);
}
if (msg->uibc_capability) {
- g_string_append_printf(lines, "wfd_uibc_capability");
+ g_string_append_printf(lines, STRING_WFD_UIBC_CAPABILITY);
g_string_append_printf(lines, ":");
if (msg->uibc_capability->uibcsupported) {
g_string_append_printf(lines, " input_category_list=");
}
if (msg->uibc_setting) {
- g_string_append_printf(lines, "wfd_uibc_setting");
+ g_string_append_printf(lines, STRING_WFD_UIBC_SETTING);
g_string_append_printf(lines, ":");
if (msg->uibc_setting->uibc_setting)
g_string_append_printf(lines, " enable");
}
if (msg->standby_resume_capability) {
- g_string_append_printf(lines, "wfd_standby_resume_capability");
+ g_string_append_printf(lines, STRING_WFD_STANDBY_RESUME_CAPABILITY);
g_string_append_printf(lines, ":");
if (msg->standby_resume_capability->standby_resume_cap)
g_string_append_printf(lines, " supported");
}
if (msg->standby) {
- g_string_append_printf(lines, "wfd_standby");
+ g_string_append_printf(lines, STRING_WFD_STANDBY);
g_string_append_printf(lines, "\r\n");
}
if (msg->connector_type) {
- g_string_append_printf(lines, "wfd_connector_type");
+ g_string_append_printf(lines, STRING_WFD_CONNECTOR_TYPE);
g_string_append_printf(lines, ":");
g_string_append_printf(lines, "\r\n");
}
if (msg->idr_request) {
- g_string_append_printf(lines, "wfd_idr_request");
+ g_string_append_printf(lines, STRING_WFD_IDR_REQUEST);
g_string_append_printf(lines, "\r\n");
}
/* list of audio codecs */
if (msg->audio_codecs) {
- g_string_append_printf(lines, "wfd_audio_codecs");
+ g_string_append_printf(lines, STRING_WFD_AUDIO_CODECS);
g_string_append_printf(lines, "\r\n");
}
/* list of video codecs */
if (msg->video_formats) {
- g_string_append_printf(lines, "wfd_video_formats");
+ g_string_append_printf(lines, STRING_WFD_VIDEO_FORMATS);
g_string_append_printf(lines, "\r\n");
}
/* list of video 3D codecs */
if (msg->video_3d_formats) {
- g_string_append_printf(lines, "wfd_3d_video_formats");
+ g_string_append_printf(lines, STRING_WFD_3D_VIDEO_FORMATS);
g_string_append_printf(lines, "\r\n");
}
if (msg->content_protection) {
- g_string_append_printf(lines, "wfd_content_protection");
+ g_string_append_printf(lines, STRING_WFD_CONTENT_PROTECTION);
g_string_append_printf(lines, "\r\n");
}
if (msg->display_edid) {
- g_string_append_printf(lines, "wfd_display_edid");
+ g_string_append_printf(lines, STRING_WFD_DISPLAY_EDID);
g_string_append_printf(lines, "\r\n");
}
if (msg->coupled_sink) {
- g_string_append_printf(lines, "wfd_coupled_sink");
+ g_string_append_printf(lines, STRING_WFD_COUPLED_SINK);
g_string_append_printf(lines, "\r\n");
}
if (msg->trigger_method) {
- g_string_append_printf(lines, "wfd_trigger_method");
+ g_string_append_printf(lines, STRING_WFD_TRIGGER_METHOD);
g_string_append_printf(lines, "\r\n");
}
if (msg->presentation_url) {
- g_string_append_printf(lines, "wfd_presentation_URL");
+ g_string_append_printf(lines, STRING_WFD_PRESENTATION_URL);
g_string_append_printf(lines, "\r\n");
}
if (msg->client_rtp_ports) {
- g_string_append_printf(lines, "wfd_client_rtp_ports");
+ g_string_append_printf(lines, STRING_WFD_CLIENT_RTP_PORTS);
g_string_append_printf(lines, "\r\n");
}
if (msg->route) {
- g_string_append_printf(lines, "wfd_route");
+ g_string_append_printf(lines, STRING_WFD_ROUTE);
g_string_append_printf(lines, "\r\n");
}
if (msg->I2C) {
- g_string_append_printf(lines, "wfd_I2C");
+ g_string_append_printf(lines, STRING_WFD_I2C);
g_string_append_printf(lines, "\r\n");
}
if (msg->av_format_change_timing) {
- g_string_append_printf(lines, "wfd_av_format_change_timing");
+ g_string_append_printf(lines, STRING_WFD_AV_FORMAT_CHANGE_TIMING);
g_string_append_printf(lines, "\r\n");
}
if (msg->preferred_display_mode) {
- g_string_append_printf(lines, "wfd_preferred_display_mode");
+ g_string_append_printf(lines, STRING_WFD_PREFERRED_DISPLAY_MODE);
g_string_append_printf(lines, "\r\n");
}
if (msg->uibc_capability) {
- g_string_append_printf(lines, "wfd_uibc_capability");
+ g_string_append_printf(lines, STRING_WFD_UIBC_CAPABILITY);
g_string_append_printf(lines, "\r\n");
}
if (msg->uibc_setting) {
- g_string_append_printf(lines, "wfd_uibc_setting");
+ g_string_append_printf(lines, STRING_WFD_UIBC_SETTING);
g_string_append_printf(lines, "\r\n");
}
if (msg->standby_resume_capability) {
- g_string_append_printf(lines, "wfd_standby_resume_capability");
+ g_string_append_printf(lines, STRING_WFD_STANDBY_RESUME_CAPABILITY);
g_string_append_printf(lines, "\r\n");
}
if (msg->standby) {
- g_string_append_printf(lines, "wfd_standby");
+ g_string_append_printf(lines, STRING_WFD_STANDBY);
g_string_append_printf(lines, "\r\n");
}
if (msg->connector_type) {
- g_string_append_printf(lines, "wfd_connector_type");
+ g_string_append_printf(lines, STRING_WFD_CONNECTOR_TYPE);
g_string_append_printf(lines, "\r\n");
}
if (msg->idr_request) {
- g_string_append_printf(lines, "wfd_idr_request");
+ g_string_append_printf(lines, STRING_WFD_IDR_REQUEST);
g_string_append_printf(lines, "\r\n");
}
return g_string_free(lines, FALSE);
/*g_print("wfdconfig_parse_line input: %s\n", buffer); */
read_string_type_and_value(type, value, sizeof(type), sizeof(value), ':', p);
/*g_print("wfdconfig_parse_line type:%s value:%s\n", type, value); */
- if (!g_strcmp0(type, "wfd_audio_codecs")) {
+ if (!g_strcmp0(type, STRING_WFD_AUDIO_CODECS)) {
msg->audio_codecs = g_new0(WFDAudioCodeclist, 1);
if (strlen(v)) {
guint i = 0;
WFD_SKIP_COMMA(v);
}
}
- } else if (!g_strcmp0(type, "wfd_video_formats")) {
+ } else if (!g_strcmp0(type, STRING_WFD_VIDEO_FORMATS)) {
msg->video_formats = g_new0(WFDVideoCodeclist, 1);
if (strlen(v)) {
msg->video_formats->count = 1;
WFD_SKIP_SPACE(v);
}
}
- } else if (!g_strcmp0(type, "wfd_3d_video_formats")) {
+ } else if (!g_strcmp0(type, STRING_WFD_3D_VIDEO_FORMATS)) {
msg->video_3d_formats = g_new0(WFD3DFormats, 1);
if (strlen(v)) {
msg->video_3d_formats->count = 1;
WFD_SKIP_SPACE(v);
}
}
- } else if (!g_strcmp0(type, "wfd_content_protection")) {
+ } else if (!g_strcmp0(type, STRING_WFD_CONTENT_PROTECTION)) {
msg->content_protection = g_new0(WFDContentProtection, 1);
if (strlen(v)) {
WFD_SKIP_SPACE(v);
WFD_READ_STRING(msg->content_protection->hdcp2_spec->TCPPort);
}
}
- } else if (!g_strcmp0(type, "wfd_display_edid")) {
+ } else if (!g_strcmp0(type, STRING_WFD_DISPLAY_EDID)) {
msg->display_edid = g_new0(WFDDisplayEdid, 1);
if (strlen(v)) {
WFD_SKIP_SPACE(v);
} else v += strlen(v);
}
}
- } else if (!g_strcmp0(type, "wfd_coupled_sink")) {
+ } else if (!g_strcmp0(type, STRING_WFD_COUPLED_SINK)) {
msg->coupled_sink = g_new0(WFDCoupledSink, 1);
if (strlen(v)) {
msg->coupled_sink->coupled_sink_cap = g_new0(WFDCoupled_sink_cap, 1);
WFD_SKIP_SPACE(v);
WFD_READ_STRING(msg->coupled_sink->coupled_sink_cap->sink_address);
}
- } else if (!g_strcmp0(type, "wfd_trigger_method")) {
+ } else if (!g_strcmp0(type, STRING_WFD_TRIGGER_METHOD)) {
msg->trigger_method = g_new0(WFDTriggerMethod, 1);
if (strlen(v)) {
WFD_SKIP_SPACE(v);
WFD_READ_STRING(msg->trigger_method->wfd_trigger_method);
}
- } else if (!g_strcmp0(type, "wfd_presentation_URL")) {
+ } else if (!g_strcmp0(type, STRING_WFD_PRESENTATION_URL)) {
msg->presentation_url = g_new0(WFDPresentationUrl, 1);
if (strlen(v)) {
WFD_SKIP_SPACE(v);
WFD_SKIP_SPACE(v);
WFD_READ_STRING(msg->presentation_url->wfd_url1);
}
- } else if (!g_strcmp0(type, "wfd_client_rtp_ports")) {
+ } else if (!g_strcmp0(type, STRING_WFD_CLIENT_RTP_PORTS)) {
msg->client_rtp_ports = g_new0(WFDClientRtpPorts, 1);
if (strlen(v)) {
WFD_SKIP_SPACE(v);
WFD_SKIP_SPACE(v);
WFD_READ_STRING(msg->client_rtp_ports->mode);
}
- } else if (!g_strcmp0(type, "wfd_route")) {
+ } else if (!g_strcmp0(type, STRING_WFD_ROUTE)) {
msg->route = g_new0(WFDRoute, 1);
if (strlen(v)) {
WFD_SKIP_SPACE(v);
WFD_READ_STRING(msg->route->destination);
}
- } else if (!g_strcmp0(type, "wfd_I2C")) {
+ } else if (!g_strcmp0(type, STRING_WFD_I2C)) {
msg->I2C = g_new0(WFDI2C, 1);
if (strlen(v)) {
msg->I2C->I2CPresent = TRUE;
WFD_READ_UINT32_DIGIT(msg->I2C->I2C_port);
if (msg->I2C->I2C_port) msg->I2C->I2CPresent = TRUE;
}
- } else if (!g_strcmp0(type, "wfd_av_format_change_timing")) {
+ } else if (!g_strcmp0(type, STRING_WFD_AV_FORMAT_CHANGE_TIMING)) {
msg->av_format_change_timing = g_new0(WFDAVFormatChangeTiming, 1);
if (strlen(v)) {
WFD_SKIP_SPACE(v);
WFD_SKIP_SPACE(v);
WFD_READ_UINT32(msg->av_format_change_timing->DTS);
}
- } else if (!g_strcmp0(type, "wfd_preferred_display_mode")) {
+ } else if (!g_strcmp0(type, STRING_WFD_PREFERRED_DISPLAY_MODE)) {
msg->preferred_display_mode = g_new0(WFDPreferredDisplayMode, 1);
if (strlen(v)) {
WFD_SKIP_SPACE(v);
WFD_SKIP_SPACE(v);
}
}
- } else if (!g_strcmp0(type, "wfd_uibc_capability")) {
+ } else if (!g_strcmp0(type, STRING_WFD_UIBC_CAPABILITY)) {
msg->uibc_capability = g_new0(WFDUibcCapability, 1);
if (strstr(v, "input_category_list")) {
gchar *tstring = NULL;
} else if (strstr(v, "none")) {
msg->uibc_capability->uibcsupported = FALSE;
}
- } else if (!g_strcmp0(type, "wfd_uibc_setting")) {
+ } else if (!g_strcmp0(type, STRING_WFD_UIBC_SETTING)) {
msg->uibc_setting = g_new0(WFDUibcSetting, 1);
if (strlen(v)) {
WFD_SKIP_SPACE(v);
else
msg->uibc_setting->uibc_setting = FALSE;
}
- } else if (!g_strcmp0(type, "wfd_standby_resume_capability")) {
+ } else if (!g_strcmp0(type, STRING_WFD_STANDBY_RESUME_CAPABILITY)) {
msg->standby_resume_capability = g_new0(WFDStandbyResumeCapability, 1);
if (strlen(v)) {
WFD_SKIP_SPACE(v);
else
msg->standby_resume_capability->standby_resume_cap = FALSE;
}
- } else if (!g_strcmp0(type, "wfd_standby")) {
+ } else if (!g_strcmp0(type, STRING_WFD_STANDBY)) {
msg->standby = g_new0(WFDStandby, 1);
msg->standby->wfd_standby = TRUE;
- } else if (!g_strcmp0(type, "wfd_connector_type")) {
+ } else if (!g_strcmp0(type, STRING_WFD_CONNECTOR_TYPE)) {
msg->connector_type = g_new0(WFDConnectorType, 1);
if (strlen(v)) {
msg->connector_type->supported = TRUE;
WFD_SKIP_SPACE(v);
WFD_READ_UINT32(msg->connector_type->connector_type);
}
- } else if (!g_strcmp0(type, "wfd_idr_request")) {
+ } else if (!g_strcmp0(type, STRING_WFD_IDR_REQUEST)) {
msg->idr_request = g_new0(WFDIdrRequest, 1);
msg->idr_request->idr_request = TRUE;
}
}
if (msg->content_protection) {
- wfd_debug("wfd_content_protection");
+ wfd_debug(STRING_WFD_CONTENT_PROTECTION);
wfd_debug("\r\n");
}
if (msg->display_edid) {
- wfd_debug("wfd_display_edid");
+ wfd_debug(STRING_WFD_DISPLAY_EDID);
wfd_debug("\r\n");
}
if (msg->coupled_sink) {
- wfd_debug("wfd_coupled_sink");
+ wfd_debug(STRING_WFD_COUPLED_SINK);
wfd_debug("\r\n");
}
}
if (msg->presentation_url) {
- wfd_debug("wfd_presentation_URL");
+ wfd_debug(STRING_WFD_PRESENTATION_URL);
wfd_debug("\r\n");
}
}
if (msg->route) {
- wfd_debug("wfd_route");
+ wfd_debug(STRING_WFD_ROUTE);
wfd_debug("\r\n");
}
if (msg->I2C) {
- wfd_debug("wfd_I2C");
+ wfd_debug(STRING_WFD_I2C);
wfd_debug("\r\n");
}
if (msg->av_format_change_timing) {
- wfd_debug("wfd_av_format_change_timing");
+ wfd_debug(STRING_WFD_AV_FORMAT_CHANGE_TIMING);
wfd_debug("\r\n");
}
if (msg->preferred_display_mode) {
- wfd_debug("wfd_preferred_display_mode");
+ wfd_debug(STRING_WFD_PREFERRED_DISPLAY_MODE);
wfd_debug("\r\n");
}
}
if (msg->standby_resume_capability) {
- wfd_debug("wfd_standby_resume_capability");
+ wfd_debug(STRING_WFD_STANDBY_RESUME_CAPABILITY);
wfd_debug("\r\n");
}
if (msg->standby) {
- wfd_debug("wfd_standby");
+ wfd_debug(STRING_WFD_STANDBY);
wfd_debug("\r\n");
}
if (msg->connector_type) {
- wfd_debug("wfd_connector_type");
+ wfd_debug(STRING_WFD_CONNECTOR_TYPE);
wfd_debug("\r\n");
}
if (msg->idr_request) {
- wfd_debug("wfd_idr_request");
+ wfd_debug(STRING_WFD_IDR_REQUEST);
wfd_debug("\r\n");
}