Commit fb7c54eb authored by Thomas Guillem's avatar Thomas Guillem

playback_service: remove intf dependency

parent fa898f17
......@@ -78,7 +78,7 @@ app_create(void *data)
media_library_discover( app->p_mediaLibrary, application_get_media_path( app, MEDIA_DIRECTORY_MUSIC ) );
/* */
app->p_ps = playback_service_create(app, app->p_intf);
app->p_ps = playback_service_create(app);
if (!app->p_ps)
goto error;
......
......@@ -52,6 +52,7 @@ struct playback_service
Evas_Object *p_ea; /* emotion audio */
Evas_Object *p_ev; /* emotion video */
Evas_Object *p_e; /* emotion audio or video */
Evas *p_ea_evas;
Eina_List *p_cbs_list;
bool b_started;
......@@ -197,7 +198,7 @@ ps_emotion_create(playback_service *p_ps, Evas *p_evas, bool b_mute_video)
}
playback_service *
playback_service_create(application *p_app, interface *p_intf)
playback_service_create(application *p_app)
{
playback_service *p_ps = calloc(1, sizeof(playback_service));
if (!p_ps)
......@@ -220,10 +221,14 @@ playback_service_create(application *p_app, interface *p_intf)
p_ps->p_ml = p_ps->p_ml_list[PLAYLIST_CONTEXT_AUDIO];
emotion_init();
p_ps->p_ea = ps_emotion_create(p_ps, intf_get_window(p_intf), true);
p_ps->p_ea_evas = evas_new();
if (!p_ps->p_ea_evas)
goto error;
p_ps->p_ea = ps_emotion_create(p_ps, p_ps->p_ea_evas, true);
if (!p_ps->p_ea)
goto error;
p_ps->p_e = p_ps->p_ea;
return p_ps;
......@@ -254,8 +259,8 @@ playback_service_destroy(playback_service *p_ps)
evas_object_del(p_ps->p_ea);
if (p_ps->p_ev)
evas_object_del(p_ps->p_ev);
emotion_shutdown();
if (p_ps->p_ea_evas)
evas_free(p_ps->p_ea_evas);
free(p_ps);
}
......
......@@ -50,7 +50,7 @@ struct playback_service_callbacks
};
playback_service *
playback_service_create(application *p_app, interface *p_intf);
playback_service_create(application *p_app);
void
playback_service_destroy(playback_service *p_ps);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment