mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-27 07:23:11 +02:00
libeplayer3-arm: cleanup types, use Context_t in commands
This commit is contained in:
@@ -71,7 +71,7 @@ if (debug_level >= level) printf("[%s:%s] \n" fmt, __FILE__, __FUNCTION__, ## x)
|
||||
|
||||
static Track_t *Tracks = NULL;
|
||||
static int TrackCount = 0;
|
||||
static int CurrentTrack = 0; //TRACK[0] as default.
|
||||
static int CurrentTrack = 0; //TRACK[0] as default.
|
||||
|
||||
/* ***************************** */
|
||||
/* Prototypes */
|
||||
@@ -212,9 +212,8 @@ static int ManagerDel(Context_t *context)
|
||||
return cERR_AUDIO_MGR_NO_ERROR;
|
||||
}
|
||||
|
||||
static int Command(void *_context, ManagerCmd_t command, void *argument)
|
||||
static int Command(Context_t *context, ManagerCmd_t command, void *argument)
|
||||
{
|
||||
Context_t *context = (Context_t *) _context;
|
||||
int ret = cERR_AUDIO_MGR_NO_ERROR;
|
||||
audio_mgr_printf(10, "%s::%s\n", __FILE__, __FUNCTION__);
|
||||
switch (command)
|
||||
@@ -228,7 +227,8 @@ static int Command(void *_context, ManagerCmd_t command, void *argument)
|
||||
case MANAGER_LIST:
|
||||
{
|
||||
container_ffmpeg_update_tracks(context, context->playback->uri, 0);
|
||||
*((TrackDescription_t **)argument) = ManagerList(context);
|
||||
// *((TrackDescription_t **)argument) = ManagerList(context);
|
||||
*((char ** *) argument) = (char **) ManagerList(context);
|
||||
break;
|
||||
}
|
||||
case MANAGER_GET:
|
||||
@@ -269,7 +269,7 @@ static int Command(void *_context, ManagerCmd_t command, void *argument)
|
||||
audio_mgr_printf(20, "%s::%s MANAGER_GET_TRACK\n", __FILE__, __FUNCTION__);
|
||||
if ((TrackCount > 0) && (CurrentTrack >= 0))
|
||||
{
|
||||
*((Track_t **)argument) = (Track_t *) &Tracks[CurrentTrack];
|
||||
*((Track_t **)argument) = (Track_t *) & Tracks[CurrentTrack];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -66,7 +66,7 @@ static const char FILENAME[] = __FILE__;
|
||||
|
||||
static Track_t *Tracks = NULL;
|
||||
static int TrackCount = 0;
|
||||
static int CurrentTrack = 0; //TRACK[0] as default.
|
||||
static int CurrentTrack = 0; //TRACK[0] as default.
|
||||
|
||||
/* ***************************** */
|
||||
/* Prototypes */
|
||||
@@ -76,7 +76,7 @@ static int CurrentTrack = 0; //TRACK[0] as default.
|
||||
/* Functions */
|
||||
/* ***************************** */
|
||||
|
||||
static int ManagerAdd(Context_t * context __attribute__((unused)), Track_t track)
|
||||
static int ManagerAdd(Context_t *context __attribute__((unused)), Track_t track)
|
||||
{
|
||||
chapter_mgr_printf(10, "%s::%s\n", FILENAME, __FUNCTION__);
|
||||
|
||||
@@ -121,7 +121,7 @@ static int ManagerAdd(Context_t * context __attribute__((unused)), Track_t track
|
||||
return cERR_CHAPTER_MGR_NO_ERROR;
|
||||
}
|
||||
|
||||
static char **ManagerList(Context_t * context __attribute__ ((unused)))
|
||||
static char **ManagerList(Context_t *context __attribute__((unused)))
|
||||
{
|
||||
int i = 0, j = 0;
|
||||
char **tracklist = NULL;
|
||||
@@ -157,7 +157,7 @@ static char **ManagerList(Context_t * context __attribute__ ((unused)))
|
||||
return tracklist;
|
||||
}
|
||||
|
||||
static int ManagerDel(Context_t * context __attribute__((unused)))
|
||||
static int ManagerDel(Context_t *context __attribute__((unused)))
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
|
@@ -69,7 +69,7 @@ if (debug_level >= level) printf(x); } while (0)
|
||||
|
||||
static Track_t *Tracks = NULL;
|
||||
static int TrackCount = 0;
|
||||
static int CurrentTrack = -1; //no as default.
|
||||
static int CurrentTrack = -1; //no as default.
|
||||
|
||||
/* ***************************** */
|
||||
/* Prototypes */
|
||||
@@ -256,7 +256,7 @@ static int Command(Context_t *context, ManagerCmd_t command, void *argument)
|
||||
{
|
||||
if ((TrackCount > 0) && (CurrentTrack >= 0))
|
||||
{
|
||||
*((Track_t **)argument) = (Track_t *) &Tracks[CurrentTrack];
|
||||
*((Track_t **)argument) = (Track_t *) & Tracks[CurrentTrack];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -69,7 +69,7 @@ if (debug_level >= level) printf(x); } while (0)
|
||||
|
||||
static Track_t *Tracks = NULL;
|
||||
static int TrackCount = 0;
|
||||
static int CurrentTrack = 0; //TRACK[0] as default.
|
||||
static int CurrentTrack = 0; //TRACK[0] as default.
|
||||
|
||||
static void (* updatedTrackInfoFnc)(void) = NULL;
|
||||
|
||||
@@ -181,9 +181,8 @@ static int ManagerDel(Context_t *context)
|
||||
return cERR_VIDEO_MGR_NO_ERROR;
|
||||
}
|
||||
|
||||
static int Command(void *_context, ManagerCmd_t command, void *argument)
|
||||
static int Command(Context_t *context, ManagerCmd_t command, void *argument)
|
||||
{
|
||||
Context_t *context = (Context_t *) _context;
|
||||
int ret = cERR_VIDEO_MGR_NO_ERROR;
|
||||
video_mgr_printf(10, "%s::%s\n", __FILE__, __FUNCTION__);
|
||||
switch (command)
|
||||
@@ -243,7 +242,7 @@ static int Command(void *_context, ManagerCmd_t command, void *argument)
|
||||
video_mgr_printf(20, "%s::%s MANAGER_GET_TRACK\n", __FILE__, __FUNCTION__);
|
||||
if ((TrackCount > 0) && (CurrentTrack >= 0))
|
||||
{
|
||||
*((Track_t **)argument) = (Track_t *) &Tracks[CurrentTrack];
|
||||
*((Track_t **)argument) = (Track_t *) & Tracks[CurrentTrack];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user