Wire up player

This commit is contained in:
Julien BLACHE 2010-04-04 13:52:17 +02:00
parent 87861b54ea
commit d036fa306e

View File

@ -63,6 +63,7 @@ GCRY_THREAD_OPTION_PTHREAD_IMPL;
#include "httpd.h"
#include "mdns_avahi.h"
#include "remote_pairing.h"
#include "player.h"
#include "ffmpeg_url_evbuffer.h"
@ -647,6 +648,16 @@ main(int argc, char **argv)
goto filescanner_fail;
}
/* Spawn player thread */
ret = player_init();
if (ret != 0)
{
DPRINTF(E_FATAL, L_MAIN, "Player thread failed to start\n");
ret = EXIT_FAILURE;
goto player_fail;
}
/* Spawn HTTPd thread */
ret = httpd_init();
if (ret != 0)
@ -740,6 +751,10 @@ main(int argc, char **argv)
DPRINTF(E_LOG, L_MAIN, "HTTPd deinit\n");
httpd_deinit();
player_fail:
DPRINTF(E_LOG, L_MAIN, "Player deinit\n");
player_deinit();
httpd_fail:
DPRINTF(E_LOG, L_MAIN, "File scanner deinit\n");
filescanner_deinit();