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:
parent
ca690fadcb
commit
10c0f22adf
3 changed files with 10 additions and 5 deletions
|
@ -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,
|
static int wfd_out_session_request_get_parameter(struct wfd_session *s,
|
||||||
|
struct rtsp *bus,
|
||||||
const struct wfd_arg_list *args,
|
const struct wfd_arg_list *args,
|
||||||
struct rtsp_message **out)
|
struct rtsp_message **out)
|
||||||
{
|
{
|
||||||
_rtsp_message_unref_ struct rtsp_message *m = NULL;
|
_rtsp_message_unref_ struct rtsp_message *m = NULL;
|
||||||
int r = rtsp_message_new_request(s->rtsp,
|
int r = rtsp_message_new_request(bus,
|
||||||
&m,
|
&m,
|
||||||
"GET_PARAMETER",
|
"GET_PARAMETER",
|
||||||
"rtsp://localhost/wfd1.0");
|
"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,
|
static int wfd_out_session_request_options(struct wfd_session *s,
|
||||||
|
struct rtsp *bus,
|
||||||
const struct wfd_arg_list *args,
|
const struct wfd_arg_list *args,
|
||||||
struct rtsp_message **out)
|
struct rtsp_message **out)
|
||||||
{
|
{
|
||||||
_rtsp_message_unref_ struct rtsp_message *m = NULL;
|
_rtsp_message_unref_ struct rtsp_message *m = NULL;
|
||||||
int r = rtsp_message_new_request(s->rtsp,
|
int r = rtsp_message_new_request(bus,
|
||||||
&m,
|
&m,
|
||||||
"OPTIONS", "*");
|
"OPTIONS", "*");
|
||||||
if (0 > r) {
|
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,
|
static int wfd_out_session_request_trigger(struct wfd_session *s,
|
||||||
|
struct rtsp *bus,
|
||||||
const struct wfd_arg_list *args,
|
const struct wfd_arg_list *args,
|
||||||
struct rtsp_message **out)
|
struct rtsp_message **out)
|
||||||
{
|
{
|
||||||
|
@ -709,7 +712,7 @@ static int wfd_out_session_request_trigger(struct wfd_session *s,
|
||||||
|
|
||||||
assert(method);
|
assert(method);
|
||||||
|
|
||||||
r = rtsp_message_new_request(s->rtsp,
|
r = rtsp_message_new_request(bus,
|
||||||
&m,
|
&m,
|
||||||
"SET_PARAMETER",
|
"SET_PARAMETER",
|
||||||
wfd_session_get_stream_url(s));
|
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,
|
static int wfd_out_session_request_set_parameter(struct wfd_session *s,
|
||||||
|
struct rtsp *bus,
|
||||||
const struct wfd_arg_list *args,
|
const struct wfd_arg_list *args,
|
||||||
struct rtsp_message **out)
|
struct rtsp_message **out)
|
||||||
{
|
{
|
||||||
|
@ -774,7 +778,7 @@ static int wfd_out_session_request_set_parameter(struct wfd_session *s,
|
||||||
return log_ERRNO();
|
return log_ERRNO();
|
||||||
}
|
}
|
||||||
|
|
||||||
r = rtsp_message_new_request(s->rtsp,
|
r = rtsp_message_new_request(bus,
|
||||||
&m,
|
&m,
|
||||||
"SET_PARAMETER",
|
"SET_PARAMETER",
|
||||||
"rtsp://localhost/wfd1.0");
|
"rtsp://localhost/wfd1.0");
|
||||||
|
|
|
@ -73,7 +73,7 @@ static int wfd_session_do_request(struct wfd_session *s,
|
||||||
assert_ret(out);
|
assert_ret(out);
|
||||||
assert_retv(s->rtsp_disp_tbl[id].request, -ENOTSUP);
|
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) {
|
if(0 > r) {
|
||||||
return log_ERR(r);
|
return log_ERR(r);
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,6 +69,7 @@ struct rtsp_dispatch_entry
|
||||||
{
|
{
|
||||||
union {
|
union {
|
||||||
int (*request)(struct wfd_session *s,
|
int (*request)(struct wfd_session *s,
|
||||||
|
struct rtsp *bus,
|
||||||
const struct wfd_arg_list *args,
|
const struct wfd_arg_list *args,
|
||||||
struct rtsp_message **out);
|
struct rtsp_message **out);
|
||||||
int (*handle_request)(struct wfd_session *s,
|
int (*handle_request)(struct wfd_session *s,
|
||||||
|
|
Loading…
Reference in a new issue