mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-26 23:25:56 -05:00
Remove unused structs and player arguments
This commit is contained in:
parent
6c66d39d91
commit
cef4fedfb4
@ -622,7 +622,7 @@ seek_timer_cb(int fd, short what, void *arg)
|
||||
return;
|
||||
}
|
||||
|
||||
ret = player_playback_start(NULL);
|
||||
ret = player_playback_start();
|
||||
if (ret < 0)
|
||||
DPRINTF(E_LOG, L_DACP, "Player returned an error for start after seek\n");
|
||||
}
|
||||
@ -1287,7 +1287,7 @@ dacp_reply_playspec(struct evhttp_request *req, struct evbuffer *evbuf, char **u
|
||||
free_queue_item(queue_item, 0);
|
||||
}
|
||||
else
|
||||
ret = player_playback_start(NULL);
|
||||
ret = player_playback_start();
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
@ -1338,7 +1338,7 @@ dacp_reply_playpause(struct evhttp_request *req, struct evbuffer *evbuf, char **
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = player_playback_start(NULL);
|
||||
ret = player_playback_start();
|
||||
if (ret < 0)
|
||||
{
|
||||
DPRINTF(E_LOG, L_DACP, "Player returned an error for start after pause\n");
|
||||
@ -1371,7 +1371,7 @@ dacp_reply_nextitem(struct evhttp_request *req, struct evbuffer *evbuf, char **u
|
||||
return;
|
||||
}
|
||||
|
||||
ret = player_playback_start(NULL);
|
||||
ret = player_playback_start();
|
||||
if (ret < 0)
|
||||
{
|
||||
DPRINTF(E_LOG, L_DACP, "Player returned an error for start after nextitem\n");
|
||||
@ -1403,7 +1403,7 @@ dacp_reply_previtem(struct evhttp_request *req, struct evbuffer *evbuf, char **u
|
||||
return;
|
||||
}
|
||||
|
||||
ret = player_playback_start(NULL);
|
||||
ret = player_playback_start();
|
||||
if (ret < 0)
|
||||
{
|
||||
DPRINTF(E_LOG, L_DACP, "Player returned an error for start after previtem\n");
|
||||
@ -1875,7 +1875,7 @@ dacp_reply_playqueueedit_add(struct evhttp_request *req, struct evbuffer *evbuf,
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = player_playback_start(NULL);
|
||||
ret = player_playback_start();
|
||||
}
|
||||
|
||||
if (ret < 0)
|
||||
|
16
src/mpd.c
16
src/mpd.c
@ -1063,7 +1063,7 @@ mpd_command_next(struct evbuffer *evbuf, int argc, char **argv, char **errmsg)
|
||||
return ACK_ERROR_UNKNOWN;
|
||||
}
|
||||
|
||||
ret = player_playback_start(NULL);
|
||||
ret = player_playback_start();
|
||||
if (ret < 0)
|
||||
{
|
||||
ret = asprintf(errmsg, "Player returned an error for start after nextitem");
|
||||
@ -1111,7 +1111,7 @@ mpd_command_pause(struct evbuffer *evbuf, int argc, char **argv, char **errmsg)
|
||||
if (pause == 1)
|
||||
ret = player_playback_pause();
|
||||
else
|
||||
ret = player_playback_start(NULL);
|
||||
ret = player_playback_start();
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
@ -1179,7 +1179,7 @@ mpd_command_play(struct evbuffer *evbuf, int argc, char **argv, char **errmsg)
|
||||
free_queue_item(queue_item, 0);
|
||||
}
|
||||
else
|
||||
ret = player_playback_start(NULL);
|
||||
ret = player_playback_start();
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
@ -1242,7 +1242,7 @@ mpd_command_playid(struct evbuffer *evbuf, int argc, char **argv, char **errmsg)
|
||||
free_queue_item(queue_item, 0);
|
||||
}
|
||||
else
|
||||
ret = player_playback_start(NULL);
|
||||
ret = player_playback_start();
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
@ -1274,7 +1274,7 @@ mpd_command_previous(struct evbuffer *evbuf, int argc, char **argv, char **errms
|
||||
return ACK_ERROR_UNKNOWN;
|
||||
}
|
||||
|
||||
ret = player_playback_start(NULL);
|
||||
ret = player_playback_start();
|
||||
if (ret < 0)
|
||||
{
|
||||
ret = asprintf(errmsg, "Player returned an error for start after previtem");
|
||||
@ -1331,7 +1331,7 @@ mpd_command_seek(struct evbuffer *evbuf, int argc, char **argv, char **errmsg)
|
||||
return ACK_ERROR_UNKNOWN;
|
||||
}
|
||||
|
||||
ret = player_playback_start(NULL);
|
||||
ret = player_playback_start();
|
||||
if (ret < 0)
|
||||
{
|
||||
ret = asprintf(errmsg, "Player returned an error for start after seekcur");
|
||||
@ -1397,7 +1397,7 @@ mpd_command_seekid(struct evbuffer *evbuf, int argc, char **argv, char **errmsg)
|
||||
return ACK_ERROR_UNKNOWN;
|
||||
}
|
||||
|
||||
ret = player_playback_start(NULL);
|
||||
ret = player_playback_start();
|
||||
if (ret < 0)
|
||||
{
|
||||
ret = asprintf(errmsg, "Player returned an error for start after seekcur");
|
||||
@ -1442,7 +1442,7 @@ mpd_command_seekcur(struct evbuffer *evbuf, int argc, char **argv, char **errmsg
|
||||
return ACK_ERROR_UNKNOWN;
|
||||
}
|
||||
|
||||
ret = player_playback_start(NULL);
|
||||
ret = player_playback_start();
|
||||
if (ret < 0)
|
||||
{
|
||||
ret = asprintf(errmsg, "Player returned an error for start after seekcur");
|
||||
|
50
src/player.c
50
src/player.c
@ -137,44 +137,6 @@ struct spk_enum
|
||||
void *arg;
|
||||
};
|
||||
|
||||
struct playback_start_param
|
||||
{
|
||||
uint32_t id;
|
||||
int pos;
|
||||
|
||||
uint32_t *id_ptr;
|
||||
};
|
||||
|
||||
struct playerqueue_get_param
|
||||
{
|
||||
int pos;
|
||||
int count;
|
||||
|
||||
struct queue *queue;
|
||||
};
|
||||
|
||||
struct playerqueue_add_param
|
||||
{
|
||||
struct queue_item *items;
|
||||
int pos;
|
||||
|
||||
uint32_t *item_id_ptr;
|
||||
};
|
||||
|
||||
struct playerqueue_move_param
|
||||
{
|
||||
uint32_t item_id;
|
||||
int from_pos;
|
||||
int to_pos;
|
||||
int count;
|
||||
};
|
||||
|
||||
struct playerqueue_remove_param
|
||||
{
|
||||
int from_pos;
|
||||
int count;
|
||||
};
|
||||
|
||||
struct icy_artwork
|
||||
{
|
||||
uint32_t id;
|
||||
@ -212,11 +174,6 @@ union player_arg
|
||||
uint32_t id;
|
||||
int intval;
|
||||
struct icy_artwork icy;
|
||||
struct playback_start_param playback_start_param;
|
||||
struct playerqueue_get_param queue_get_param;
|
||||
struct playerqueue_add_param queue_add_param;
|
||||
struct playerqueue_move_param queue_move_param;
|
||||
struct playerqueue_remove_param queue_remove_param;
|
||||
};
|
||||
|
||||
struct event_base *evbase_player;
|
||||
@ -3156,14 +3113,11 @@ player_get_icy_artwork_url(uint32_t id)
|
||||
* @return 0 if successful, -1 if an error occurred
|
||||
*/
|
||||
int
|
||||
player_playback_start(uint32_t *id)
|
||||
player_playback_start()
|
||||
{
|
||||
union player_arg cmdarg;
|
||||
int ret;
|
||||
|
||||
cmdarg.playback_start_param.id_ptr = id;
|
||||
|
||||
ret = commands_exec_sync(cmdbase, playback_start, playback_start_bh, &cmdarg);
|
||||
ret = commands_exec_sync(cmdbase, playback_start, playback_start_bh, NULL);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ int
|
||||
player_speaker_set(uint64_t *ids);
|
||||
|
||||
int
|
||||
player_playback_start(uint32_t *id);
|
||||
player_playback_start();
|
||||
|
||||
int
|
||||
player_playback_start_byitem(struct db_queue_item *queue_item);
|
||||
|
Loading…
Reference in New Issue
Block a user