mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
media-session: make the services more modular
This commit is contained in:
parent
b7aa8f5c85
commit
80ac755670
13 changed files with 567 additions and 354 deletions
|
|
@ -539,13 +539,13 @@ static const struct sm_media_session_events session_events = {
|
|||
.rescan = session_rescan,
|
||||
};
|
||||
|
||||
int sm_policy_ep_start(struct sm_media_session *session)
|
||||
void *sm_policy_ep_start(struct sm_media_session *session)
|
||||
{
|
||||
struct impl *impl;
|
||||
|
||||
impl = calloc(1, sizeof(struct impl));
|
||||
if (impl == NULL)
|
||||
return -errno;
|
||||
return NULL;
|
||||
|
||||
impl->session = session;
|
||||
impl->core = session->core;
|
||||
|
|
@ -554,10 +554,12 @@ int sm_policy_ep_start(struct sm_media_session *session)
|
|||
|
||||
sm_media_session_add_listener(impl->session, &impl->listener, &session_events, impl);
|
||||
|
||||
return 0;
|
||||
return impl;
|
||||
}
|
||||
|
||||
int sm_policy_ep_stop(struct pw_core *core)
|
||||
int sm_policy_ep_stop(void *data)
|
||||
{
|
||||
struct impl *impl = data;
|
||||
free(impl);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue