1
0
Fork 0
mirror of https://github.com/albfan/miraclecast.git synced 2025-02-15 04:42:06 +00:00

miracle-dispd: minor interface tweaks betwen wfd_session and wfd_out_session

Change-Id: Ib0c65ab64d543d5fce8908f6c47dbfc2acf47763
This commit is contained in:
Derek Dai 2017-05-09 16:16:20 +08:00
parent ca690fadcb
commit 10c0f22adf
3 changed files with 10 additions and 5 deletions

View file

@ -309,11 +309,12 @@ static int wfd_out_session_handle_get_parameter_reply(struct wfd_session *s,
}
static int wfd_out_session_request_get_parameter(struct wfd_session *s,
struct rtsp *bus,
const struct wfd_arg_list *args,
struct rtsp_message **out)
{
_rtsp_message_unref_ struct rtsp_message *m = NULL;
int r = rtsp_message_new_request(s->rtsp,
int r = rtsp_message_new_request(bus,
&m,
"GET_PARAMETER",
"rtsp://localhost/wfd1.0");
@ -425,11 +426,12 @@ static int wfd_out_session_handle_options_reply(struct wfd_session *s,
}
static int wfd_out_session_request_options(struct wfd_session *s,
struct rtsp *bus,
const struct wfd_arg_list *args,
struct rtsp_message **out)
{
_rtsp_message_unref_ struct rtsp_message *m = NULL;
int r = rtsp_message_new_request(s->rtsp,
int r = rtsp_message_new_request(bus,
&m,
"OPTIONS", "*");
if (0 > r) {
@ -696,6 +698,7 @@ static int wfd_out_session_handle_idr_request(struct wfd_session *s,
}
static int wfd_out_session_request_trigger(struct wfd_session *s,
struct rtsp *bus,
const struct wfd_arg_list *args,
struct rtsp_message **out)
{
@ -709,7 +712,7 @@ static int wfd_out_session_request_trigger(struct wfd_session *s,
assert(method);
r = rtsp_message_new_request(s->rtsp,
r = rtsp_message_new_request(bus,
&m,
"SET_PARAMETER",
wfd_session_get_stream_url(s));
@ -741,6 +744,7 @@ static int wfd_out_session_request_not_implement(struct wfd_session *s,
}
static int wfd_out_session_request_set_parameter(struct wfd_session *s,
struct rtsp *bus,
const struct wfd_arg_list *args,
struct rtsp_message **out)
{
@ -774,7 +778,7 @@ static int wfd_out_session_request_set_parameter(struct wfd_session *s,
return log_ERRNO();
}
r = rtsp_message_new_request(s->rtsp,
r = rtsp_message_new_request(bus,
&m,
"SET_PARAMETER",
"rtsp://localhost/wfd1.0");

View file

@ -73,7 +73,7 @@ static int wfd_session_do_request(struct wfd_session *s,
assert_ret(out);
assert_retv(s->rtsp_disp_tbl[id].request, -ENOTSUP);
r = (*s->rtsp_disp_tbl[id].request)(s, args, out);
r = (*s->rtsp_disp_tbl[id].request)(s, s->rtsp, args, out);
if(0 > r) {
return log_ERR(r);
}

View file

@ -69,6 +69,7 @@ struct rtsp_dispatch_entry
{
union {
int (*request)(struct wfd_session *s,
struct rtsp *bus,
const struct wfd_arg_list *args,
struct rtsp_message **out);
int (*handle_request)(struct wfd_session *s,