libeplayer3: implement Output class

This commit is contained in:
martii
2014-04-06 18:19:00 +02:00
parent 558b9410a8
commit cd3d91fa38
13 changed files with 377 additions and 679 deletions

View File

@@ -77,11 +77,11 @@ static int CurrentPid = -1;
static int ManagerAdd(Player * context, Track_t track)
{
Tracks[track.Id] = track;
Tracks[track.pid] = track;
context->playback->isAudio = 1;
if (CurrentPid < 0)
CurrentPid = track.Id;
CurrentPid = track.pid;
return cERR_AUDIO_MGR_NO_ERROR;
}
@@ -95,7 +95,7 @@ static char **ManagerList(Player * context __attribute__ ((unused)))
{
size_t len = it->second.Name.length() + 20;
char tmp[len];
snprintf(tmp, len, "%d %s\n", it->second.Id, it->second.Name.c_str());
snprintf(tmp, len, "%d %s\n", it->second.pid, it->second.Name.c_str());
tracklist[j] = strdup(tmp);
snprintf(tmp, len, "%d\n", it->second.ac3flags);
tracklist[j + 1] = strdup(tmp);