static GstRTSPResult
-gst_wfdrtspsrc_send (GstWFDRTSPSrc * src, GstRTSPConnection * conn,
- GstRTSPMessage * request, GstRTSPMessage * response,
+gst_wfdrtspsrc_send (GstWFDRTSPSrc * src, GstRTSPMessage * request, GstRTSPMessage * response,
GstRTSPStatusCode * code);
static gboolean gst_wfdrtspsrc_parse_methods (GstWFDRTSPSrc * src, GstRTSPMessage * response);
/* create manager */
src->manager = wfd_rtsp_manager_new (GST_ELEMENT_CAST(src));
if (G_UNLIKELY (src->manager == NULL)) {
- GST_ERROR_OBJECT (src, "could not create wfdrtspmanager element");
+ GST_ERROR_OBJECT (src, "could not create wfdrtspmanager");
return;
}
gst_pad_set_query_function (src->manager->srcpad,
GST_DEBUG_FUNCPTR (gst_wfdrtspsrc_handle_src_query));
-
src->state = GST_RTSP_STATE_INVALID;
GST_OBJECT_FLAG_SET (src, GST_ELEMENT_FLAG_SOURCE);
}
static GstRTSPResult
-gst_wfdrtspsrc_connection_send (GstWFDRTSPSrc * src, GstRTSPConnection * conn,
+gst_wfdrtspsrc_connection_send (GstWFDRTSPSrc * src,
GstRTSPMessage * message, GTimeVal * timeout)
{
GstRTSPResult ret = GST_RTSP_OK;
if (src->debug)
gst_wfdrtspsrc_message_dump (message);
- if (conn)
- ret = gst_rtsp_connection_send (conn, message, timeout);
+ if (src->conninfo.connection)
+ ret = gst_rtsp_connection_send (src->conninfo.connection, message, timeout);
else
ret = GST_RTSP_ERROR;
}
static GstRTSPResult
-gst_wfdrtspsrc_connection_receive (GstWFDRTSPSrc * src, GstRTSPConnection * conn,
+gst_wfdrtspsrc_connection_receive (GstWFDRTSPSrc * src,
GstRTSPMessage * message, GTimeVal * timeout)
{
GstRTSPResult ret;
- if (conn)
- ret = gst_rtsp_connection_receive (conn, message, timeout);
+ if (src->conninfo.connection)
+ ret = gst_rtsp_connection_receive (src->conninfo.connection, message, timeout);
else
ret = GST_RTSP_ERROR;
/* send request message */
GST_DEBUG_OBJECT (src, "send reuest...");
- if ((res = gst_wfdrtspsrc_send (src, src->conninfo.connection, &request, &response,
+ if ((res = gst_wfdrtspsrc_send (src, &request, &response,
NULL)) < 0)
goto error;
gboolean res = TRUE;
gboolean forward = FALSE;
const GstStructure *s;
- /*static gdouble elapsed = 0.0;
- static int count = 0;*/
src = GST_WFDRTSPSRC_CAST (parent);
if(src == NULL) {
}
static GstRTSPResult
-gst_wfdrtspsrc_handle_request (GstWFDRTSPSrc * src, GstRTSPConnection * conn,
- GstRTSPMessage * request)
+gst_wfdrtspsrc_handle_request (GstWFDRTSPSrc * src, GstRTSPMessage * request)
{
GstRTSPMethod method = GST_RTSP_INVALID;
GstRTSPVersion version = GST_RTSP_VERSION_INVALID;
goto send_error;
}
g_free(str);
- GST_DEBUG_OBJECT (src, "Creating OPTIONS response : %s", options_str);
res = gst_rtsp_message_init_response (&response, GST_RTSP_STS_OK,
gst_rtsp_status_as_text (GST_RTSP_STS_OK), request);
break;
}
- if(src->extended_wfd_message_support == FALSE)
- goto message_config_error;
-
WFDCONFIG_MESSAGE_NEW(&wfd_msg, message_config_error);
WFDCONFIG_MESSAGE_INIT(wfd_msg, message_config_error);
WFDCONFIG_MESSAGE_PARSE_BUFFER(data, size, wfd_msg, message_config_error);
WFDCONFIG_GET_TRIGGER_TYPE(wfd_msg, &trigger, message_config_error);
- res = gst_wfdrtspsrc_connection_send (src, conn, &response, NULL);
+ res = gst_wfdrtspsrc_connection_send (src, &response, NULL);
if (res < 0)
goto send_error;
}
}
- res = gst_wfdrtspsrc_connection_send (src, conn, &response, src->ptcp_timeout);
+ res = gst_wfdrtspsrc_connection_send (src, &response, src->ptcp_timeout);
if (res < 0)
goto send_error;
/* ERRORS */
setup_failed:
{
- GST_ERROR_OBJECT(src, "Error: Could not setup(error)");
+ GST_ERROR_OBJECT(src, "Could not setup(error)");
gst_rtsp_message_unset (request);
gst_rtsp_message_unset (&response);
WFDCONFIG_MESSAGE_FREE(wfd_msg);
}
message_config_error:
{
- GST_ERROR_OBJECT(src, "Error: Message config error (%d)", wfd_res);
+ GST_ERROR_OBJECT(src, "Message config error (%d)", wfd_res);
gst_rtsp_message_unset (request);
gst_rtsp_message_unset (&response);
WFDCONFIG_MESSAGE_FREE(wfd_msg);
}
send_error:
{
- GST_ERROR_OBJECT(src, "Error: Could not send message");
+ GST_ERROR_OBJECT(src, "Could not send message");
gst_rtsp_message_unset (request);
gst_rtsp_message_unset (&response);
WFDCONFIG_MESSAGE_FREE(wfd_msg);
GST_OBJECT_UNLOCK (src);
}
-static GstFlowReturn
-gst_wfdrtspsrc_loop_udp (GstWFDRTSPSrc * src)
+static gboolean
+gst_wfdrtspsrc_loop (GstWFDRTSPSrc * src)
{
GstRTSPResult res = GST_RTSP_OK;
+ GstFlowReturn ret = GST_FLOW_OK;
GstRTSPMessage message = { 0 };
+ if (!src->conninfo.connection || !src->conninfo.connected)
+ goto no_connection;
+
while (TRUE) {
GTimeVal tv_timeout;
/* we should continue reading the TCP socket because the server might
* send us requests. When the session timeout expires, we need to send a
* keep-alive request to keep the session open. */
- res = gst_wfdrtspsrc_connection_receive (src, src->conninfo.connection,
- &message, &tv_timeout);
+ res = gst_wfdrtspsrc_connection_receive (src, &message, &tv_timeout);
switch (res) {
case GST_RTSP_OK:
switch (message.type) {
case GST_RTSP_MESSAGE_REQUEST:
/* server sends us a request message, handle it */
- res =
- gst_wfdrtspsrc_handle_request (src, src->conninfo.connection,
- &message);
+ res = gst_wfdrtspsrc_handle_request(src, &message);
if (res == GST_RTSP_EEOF)
goto server_eof;
else if (res < 0)
break;
}
}
+ g_assert_not_reached ();
- /* we get here when the connection got interrupted */
+ return TRUE;
+
+no_connection:
+ {
+ GST_ERROR_OBJECT (src, "we are not connected");
+ ret = GST_FLOW_FLUSHING;
+ goto pause;
+ }
interrupt:
{
+ /* we get here when the connection got interrupted */
gst_rtsp_message_unset (&message);
GST_DEBUG_OBJECT (src, "got interrupted");
- return GST_FLOW_FLUSHING;
+ ret = GST_FLOW_FLUSHING;
+ goto pause;
}
connect_error:
{
gchar *str = gst_rtsp_strresult (res);
- GstFlowReturn ret;
src->conninfo.connected = FALSE;
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ_WRITE, (NULL),
g_free (str);
ret = GST_FLOW_ERROR;
- return ret;
+ goto pause;
}
receive_error:
{
GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
("Could not receive message. (%s)", str));
g_free (str);
- return GST_FLOW_ERROR;
+ ret = GST_FLOW_ERROR;
+
+ goto pause;
}
handle_request_failed:
{
gchar *str = gst_rtsp_strresult (res);
- GstFlowReturn ret;
gst_rtsp_message_unset (&message);
if (res != GST_RTSP_EINTR) {
} else {
ret = GST_FLOW_FLUSHING;
}
- return ret;
+ goto pause;
}
server_eof:
{
("The server closed the connection."));
src->conninfo.connected = FALSE;
gst_rtsp_message_unset (&message);
- return GST_FLOW_EOS;
- }
-}
-
-static gboolean
-gst_wfdrtspsrc_loop (GstWFDRTSPSrc * src)
-{
- GstFlowReturn ret;
-
- if (!src->conninfo.connection || !src->conninfo.connected)
- goto no_connection;
-
- ret = gst_wfdrtspsrc_loop_udp (src);
+ ret = GST_FLOW_EOS;
- if (ret != GST_FLOW_OK)
- goto pause;
-
- return TRUE;
-
- /* ERRORS */
-no_connection:
- {
- GST_ERROR_OBJECT (src, "we are not connected");
- ret = GST_FLOW_FLUSHING;
goto pause;
}
pause:
("streaming task paused, reason %s (%d)", reason, ret));
gst_wfdrtspsrc_push_event (src, gst_event_new_eos ());
}
-
return FALSE;
}
}
static GstRTSPResult
-gst_wfdrtspsrc_try_send (GstWFDRTSPSrc * src, GstRTSPConnection * conn,
- GstRTSPMessage * request, GstRTSPMessage * response,
- GstRTSPStatusCode * code)
+gst_wfdrtspsrc_try_send (GstWFDRTSPSrc * src, GstRTSPMessage * request,
+ GstRTSPMessage * response, GstRTSPStatusCode * code)
{
GstRTSPResult res = GST_RTSP_OK;
GstRTSPStatusCode thecode = GST_RTSP_STS_OK;
- GST_DEBUG_OBJECT (src, "sending message");
-
- res = gst_wfdrtspsrc_connection_send (src, conn, request, src->ptcp_timeout);
+ res = gst_wfdrtspsrc_connection_send (src, request, src->ptcp_timeout);
if (res < 0)
goto send_error;
- gst_rtsp_connection_reset_timeout (conn);
+ gst_rtsp_connection_reset_timeout (src->conninfo.connection);
next:
- res = gst_wfdrtspsrc_connection_receive (src, conn, response, src->ptcp_timeout);
+ res = gst_wfdrtspsrc_connection_receive (src, response, src->ptcp_timeout);
if (res < 0)
goto receive_error;
switch (response->type) {
case GST_RTSP_MESSAGE_REQUEST:
- res = gst_wfdrtspsrc_handle_request (src, conn, response);
+ res = gst_wfdrtspsrc_handle_request(src, response);
if (res == GST_RTSP_EEOF)
goto server_eof;
else if (res < 0)
*/
static GstRTSPResult
-gst_wfdrtspsrc_send (GstWFDRTSPSrc * src, GstRTSPConnection * conn,
- GstRTSPMessage * request, GstRTSPMessage * response,
- GstRTSPStatusCode * code)
+gst_wfdrtspsrc_send (GstWFDRTSPSrc * src, GstRTSPMessage * request,
+ GstRTSPMessage * response, GstRTSPStatusCode * code)
{
GstRTSPStatusCode int_code = GST_RTSP_STS_OK;
GstRTSPResult res = GST_RTSP_ERROR;
method = request->type_data.request.method;
if ((res =
- gst_wfdrtspsrc_try_send (src, conn, request, response, &int_code)) < 0)
+ gst_wfdrtspsrc_try_send (src, request, response, &int_code)) < 0)
goto error;
/* If the user requested the code, let them handle errors, otherwise
}
/* handle the code ourselves */
- if ((res = gst_wfdrtspsrc_send (src, src->conninfo.connection, &request, &response, &code) < 0))
+ if ((res = gst_wfdrtspsrc_send (src, &request, &response, &code) < 0))
goto send_error;
switch (code) {
}
}
-
-/* Parse all the wifi related messages.
- *
- * Uses wfdconfig utility to parse the wfd parameters sent from the server
+/* Note : RTSP M1~M6 :
+ * WFD session capability negotiation
*/
-
static GstRTSPResult
-gst_wfdrtspsrc_retrieve_wifi_parameters (GstWFDRTSPSrc * src)
+gst_wfdrtspsrc_open (GstWFDRTSPSrc * src)
{
GstRTSPResult res = GST_RTSP_OK;
GstRTSPMessage request = { 0 };
if ((res = gst_wfdrtspsrc_conninfo_connect (src, &src->conninfo)) < 0)
goto connect_failed;
- res = gst_wfdrtspsrc_connection_receive (src, src->conninfo.connection, &message,
- src->ptcp_timeout);
+ res = gst_wfdrtspsrc_connection_receive (src, &message, src->ptcp_timeout);
if(res != GST_RTSP_OK)
goto connect_failed;
if(message.type == GST_RTSP_MESSAGE_REQUEST) {
method = message.type_data.request.method;
if(method == GST_RTSP_OPTIONS) {
- res = gst_wfdrtspsrc_handle_request (src, src->conninfo.connection, &message);
+ res = gst_wfdrtspsrc_handle_request(src, &message);
if (res < GST_RTSP_OK)
goto connect_failed;
} else
/* send OPTIONS */
GST_DEBUG_OBJECT (src, "send options...");
- if ((res = gst_wfdrtspsrc_send (src, src->conninfo.connection, &request, &response,
+ if ((res = gst_wfdrtspsrc_send (src, &request, &response,
NULL)) < 0)
goto send_error;
/* Receive request message from source */
receive_request_message:
- res = gst_wfdrtspsrc_connection_receive (src, src->conninfo.connection, &message,
+ res = gst_wfdrtspsrc_connection_receive (src, &message,
src->ptcp_timeout);
if(res != GST_RTSP_OK)
goto connect_failed;
if(message.type == GST_RTSP_MESSAGE_REQUEST) {
method = message.type_data.request.method;
- if(method == GST_RTSP_GET_PARAMETER ||method == GST_RTSP_SET_PARAMETER)
- gst_wfdrtspsrc_handle_request (src, src->conninfo.connection, &message);
- else
+ if(method == GST_RTSP_GET_PARAMETER ||method == GST_RTSP_SET_PARAMETER) {
+ res = gst_wfdrtspsrc_handle_request(src, &message);
+ if (res < GST_RTSP_OK)
+ goto handle_request_failed;
+ } else
goto methods_error;
if (src->state != GST_RTSP_STATE_READY)
gst_rtsp_message_unset (&request);
gst_rtsp_message_unset (&response);
+ gst_wfdrtspsrc_loop_end_cmd (src, CMD_OPEN, res);
+
return res;
/* ERRORS */
g_free (str);
goto cleanup_error;
}
-
send_error:
{
+ GST_ERROR_OBJECT (src, "send errors");
/* Don't post a message - the rtsp_send method will have
* taken care of it because we passed NULL for the response code */
goto cleanup_error;
/* error was posted */
goto cleanup_error;
}
-
+handle_request_failed:
+ {
+ GST_ERROR_OBJECT (src, "failed to handle request");
+ /* error was posted */
+ goto cleanup_error;
+ }
cleanup_error:
{
+ GST_ERROR_OBJECT (src, "failed to open");
+
if (src->conninfo.connection) {
GST_ERROR_OBJECT (src, "free connection");
gst_wfdrtspsrc_conninfo_close (src, &src->conninfo, TRUE);
}
}
-
-/* Note : RTSP M1~M6 :
- * WFD session capability negotiation
- */
-static GstRTSPResult
-gst_wfdrtspsrc_open (GstWFDRTSPSrc * src)
-{
- GstRTSPResult res;
-
- if ((res = gst_wfdrtspsrc_retrieve_wifi_parameters (src)) < 0)
- goto open_failed;
-
-done:
- gst_wfdrtspsrc_loop_end_cmd (src, CMD_OPEN, res);
-
- return res;
-
- /* ERRORS */
-open_failed:
- {
- GST_ERROR_OBJECT (src, "failed to open");
- goto done;
- }
-}
-
static void
gst_wfdrtspsrc_send_close_cmd (GstWFDRTSPSrc * src)
{
goto create_request_failed;
if ((res =
- gst_wfdrtspsrc_send (src, src->conninfo.connection, &request, &response,
+ gst_wfdrtspsrc_send (src, &request, &response,
NULL)) < 0)
goto send_error;
gst_rtsp_message_add_header (&request, GST_RTSP_HDR_USER_AGENT, (const gchar*)src->user_agent);
- if ((res = gst_wfdrtspsrc_send (src, src->conninfo.connection, &request, &response, NULL)) < 0)
+ if ((res = gst_wfdrtspsrc_send (src, &request, &response, NULL)) < 0)
goto send_error;
gst_rtsp_message_unset (&request);
gst_rtsp_message_add_header (&request, GST_RTSP_HDR_USER_AGENT, (const gchar *)src->user_agent);
- if ((res = gst_wfdrtspsrc_send (src, src->conninfo.connection, &request, &response, NULL)) < 0)
+ if ((res = gst_wfdrtspsrc_send (src, &request, &response, NULL)) < 0)
goto send_error;
gst_rtsp_message_unset (&request);
goto label;\
}\
wfd_res = func(msg);\
- if (G_UNLIKELY (wfd_res != WFD_OK) || G_LIKELY((*(msg)) == NULL)) \
- goto label; \
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
+ if (G_UNLIKELY (wfd_res != WFD_OK) || G_LIKELY((*(msg)) == NULL))\
+ goto label;\
} G_STMT_END
#define WFDCONFIG_MESSAGE_INIT(msg, label)\
goto label;\
}\
wfd_res = func(msg);\
- if (G_UNLIKELY (wfd_res != WFD_OK)) \
- goto label; \
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
+ if (G_UNLIKELY (wfd_res != WFD_OK))\
+ goto label;\
} G_STMT_END
#define WFDCONFIG_SET_AUDIO_SINK_TYPE(msg, sink_number, label)\
goto label;\
}\
wfd_res = func(msg, sink_number);\
- if (G_UNLIKELY (wfd_res != WFD_OK)) \
- goto label; \
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
+ if (G_UNLIKELY (wfd_res != WFD_OK))\
+ goto label;\
} G_STMT_END
#define WFDCONFIG_SET_CONNECTOR_TYPE(msg, connector, label)\
goto label;\
}\
wfd_res = func(msg, connector);\
- if (G_UNLIKELY (wfd_res != WFD_OK)) \
- goto label; \
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
+ if (G_UNLIKELY (wfd_res != WFD_OK))\
+ goto label;\
} G_STMT_END
#define WFDCONFIG_SET_STANDBY(msg, standby_enable, label)\
goto label;\
}\
wfd_res = func(msg, standby_enable);\
- if (G_UNLIKELY (wfd_res != WFD_OK)) \
- goto label; \
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
+ if (G_UNLIKELY (wfd_res != WFD_OK))\
+ goto label;\
} G_STMT_END
#define WFDCONFIG_SET_IDR_REQUEST(msg, label)\
goto label;\
}\
wfd_res = func(msg);\
- if (G_UNLIKELY (wfd_res != WFD_OK)) \
- goto label; \
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
+ if (G_UNLIKELY (wfd_res != WFD_OK))\
+ goto label;\
} G_STMT_END
#define WFDCONFIG_SET_UIBC_CAPABILITY(msg, input_category, inp_type, inp_pair, inp_type_path_count, tcp_port, label)\
goto label;\
}\
wfd_res = func(msg, input_category, inp_type, inp_pair, inp_type_path_count, tcp_port);\
- if (G_UNLIKELY (wfd_res != WFD_OK)) \
- goto label; \
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
+ if (G_UNLIKELY (wfd_res != WFD_OK))\
+ goto label;\
} G_STMT_END
#define WFDCONFIG_SET_UIBC_STATUS(msg, uibc_enable, label)\
goto label;\
}\
wfd_res = func(msg, uibc_enable);\
- if (G_UNLIKELY (wfd_res != WFD_OK)) \
- goto label; \
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
+ if (G_UNLIKELY (wfd_res != WFD_OK))\
+ goto label;\
} G_STMT_END
#define WFDCONFIG_MESSAGE_FREE(msg)\
} else {\
wfd_res = WFD_NOT_IMPLEMENTED;\
}\
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
} G_STMT_END
} else {\
wfd_res = WFD_NOT_IMPLEMENTED;\
}\
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
} G_STMT_END
text = func(msg);\
if (!text)\
goto label;\
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
} G_STMT_END
goto label;\
}\
wfd_res = func(data, size, msg);\
- if (G_UNLIKELY (wfd_res != WFD_OK)) \
- goto label; \
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
+ if (G_UNLIKELY (wfd_res != WFD_OK))\
+ goto label;\
} G_STMT_END
#define WFDCONFIG_SET_SUPPORTED_AUDIO_FORMAT(msg, audio_codec, audio_sampling_frequency, audio_channels, audio_bit_width, audio_latency, label)\
goto label;\
}\
wfd_res = func(msg, audio_codec, audio_sampling_frequency, audio_channels, audio_bit_width, audio_latency);\
- if (G_UNLIKELY (wfd_res != WFD_OK)) \
- goto label; \
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
+ if (G_UNLIKELY (wfd_res != WFD_OK))\
+ goto label;\
} G_STMT_END
#define WFDCONFIG_SET_SUPPORTED_VIDEO_FORMAT(msg, video_codec, video_native, video_native_resolution, video_cea_support,\
video_slice_enc_param,\
video_framerate_control_support,\
video_preferred_display_mode);\
- if (G_UNLIKELY (wfd_res != WFD_OK)) \
- goto label; \
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
+ if (G_UNLIKELY (wfd_res != WFD_OK))\
+ goto label;\
} G_STMT_END
#define WFDCONFIG_SET_PREFERD_RTP_PORT(msg, trans, profile, lowertrans, rtp_port0, rtp_port1, label)\
goto label;\
}\
wfd_res = func(msg, trans, profile, lowertrans, rtp_port0, rtp_port1);\
- if (G_UNLIKELY (wfd_res != WFD_OK)) \
- goto label; \
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
+ if (G_UNLIKELY (wfd_res != WFD_OK))\
+ goto label;\
} G_STMT_END
#define WFDCONFIG_GET_PREFERD_RTP_PORT(msg, trans, profile, lowertrans, rtp_port0, rtp_port1, label)\
goto label;\
}\
wfd_res = func(msg, trans, profile, lowertrans, rtp_port0, rtp_port1);\
- if (G_UNLIKELY (wfd_res != WFD_OK)) \
- goto label; \
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
+ if (G_UNLIKELY (wfd_res != WFD_OK))\
+ goto label;\
} G_STMT_END
goto label;\
}\
wfd_res = func(msg, hdcp_version, (guint32)hdcp_port_no);\
- if (G_UNLIKELY (wfd_res != WFD_OK)) \
- goto label; \
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
+ if (G_UNLIKELY (wfd_res != WFD_OK))\
+ goto label;\
} G_STMT_END
#define WFDCONFIG_SET_COUPLED_SINK(msg, status, sink_address, label)\
goto label;\
}\
wfd_res = func(msg, status,(gchar *)sink_address);\
- if (G_UNLIKELY (wfd_res != WFD_OK)) \
- goto label; \
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
+ if (G_UNLIKELY (wfd_res != WFD_OK))\
+ goto label;\
} G_STMT_END
#define WFDCONFIG_GET_PRESENTATION_URL(msg, wfd_url0, wfd_url1, label)\
goto label;\
}\
wfd_res = func(msg, wfd_url0, wfd_url1);\
- if (G_UNLIKELY (wfd_res != WFD_OK)) \
- goto label; \
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
+ if (G_UNLIKELY (wfd_res != WFD_OK))\
+ goto label;\
} G_STMT_END
#define WFDCONFIG_GET_STANDBY(msg, standby_enable, label)\
goto label;\
}\
wfd_res = func(msg, standby_enable);\
- if (G_UNLIKELY (wfd_res != WFD_OK)) \
- goto label; \
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
+ if (G_UNLIKELY (wfd_res != WFD_OK))\
+ goto label;\
} G_STMT_END
#define WFDCONFIG_GET_UIBC_CAPABILITY(msg, input_category, inp_type, inp_pair, inp_type_path_count, tcp_port, label)\
goto label;\
}\
wfd_res = func(msg, input_category, inp_type, inp_pair, inp_type_path_count, tcp_port);\
- if (G_UNLIKELY (wfd_res != WFD_OK)) \
- goto label; \
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
+ if (G_UNLIKELY (wfd_res != WFD_OK))\
+ goto label;\
} G_STMT_END
#define WFDCONFIG_GET_UIBC_STATUS(msg, uibc_enable, label)\
goto label;\
}\
wfd_res = func(msg, uibc_enable);\
- if (G_UNLIKELY (wfd_res != WFD_OK)) \
- goto label; \
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
+ if (G_UNLIKELY (wfd_res != WFD_OK))\
+ goto label;\
} G_STMT_END
#define WFDCONFIG_GET_PREFERED_AUDIO_FORMAT(msg, audio_format, audio_frequency, audio_channels, audio_bitwidth, audio_latency)\
} else {\
wfd_res = WFD_NOT_IMPLEMENTED;\
}\
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
} G_STMT_END
} else {\
wfd_res = WFD_NOT_IMPLEMENTED;\
}\
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
} G_STMT_END
goto label;\
}\
wfd_res = func(msg, trigger);\
- if (G_UNLIKELY (wfd_res != WFD_OK)) \
- goto label; \
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
+ if (G_UNLIKELY (wfd_res != WFD_OK))\
+ goto label;\
} G_STMT_END
#define WFDCONFIG_GET_AV_FORMAT_CHANGE_TIMING(msg, PTS, DTS, label)\
goto label;\
}\
wfd_res = func(msg, PTS, DTS);\
- if (G_UNLIKELY (wfd_res != WFD_OK)) \
- goto label; \
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
+ if (G_UNLIKELY (wfd_res != WFD_OK))\
+ goto label;\
} G_STMT_END
#define WFDCONFIG_SET_DISPLAY_EDID(msg, edid_supported, edid_blockcount, edid_payload, label)\
goto label;\
}\
wfd_res = func(msg, edid_supported, edid_blockcount, edid_payload);\
- if (G_UNLIKELY (wfd_res != WFD_OK)) \
- goto label; \
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
+ if (G_UNLIKELY (wfd_res != WFD_OK))\
+ goto label;\
} G_STMT_END
#define WFDCONFIG_GET_DISPLAY_EDID(msg, edid_supported, edid_blockcount, edid_payload, label)\
goto label;\
}\
wfd_res = func(msg, edid_supported, edid_blockcount, edid_payload);\
- if (G_UNLIKELY (wfd_res != WFD_OK)) \
- goto label; \
+ } else {\
+ wfd_res = WFD_NOT_SUPPORTED;\
}\
+ if (G_UNLIKELY (wfd_res != WFD_OK))\
+ goto label;\
} G_STMT_END
#define WFDCONFIG_MESSAGE_CHECK(stmt, label) \