libeplayer3-arm: Code formatting

Origin commit data
------------------
Branch: master
Commit: ae31a0f3e7
Author: max_10 <max_10@gmx.de>
Date: 2017-12-28 (Thu, 28 Dec 2017)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
max_10
2017-12-28 12:07:38 +01:00
parent a31afe9151
commit c20ee59bda
49 changed files with 50 additions and 170 deletions

View File

@@ -126,23 +126,21 @@ static int ManagerAdd(Context_t *context, Track_t track)
return cERR_AUDIO_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;
audio_mgr_printf(10, "%s::%s\n", FILENAME, __FUNCTION__);
if (Tracks != NULL) {
if (Tracks != NULL)
{
tracklist = malloc(sizeof(char *) * ((TrackCount * 2) + 1));
if (tracklist == NULL) {
audio_mgr_err("%s:%s malloc failed\n", FILENAME, __FUNCTION__);
if (tracklist == NULL)
{
audio_mgr_err("%s:%s malloc failed\n", FILENAME, __FUNCTION__);
return NULL;
}
for (i = 0, j = 0; i < TrackCount; i++, j += 2) {
for (i = 0, j = 0; i < TrackCount; i++, j += 2)
{
if (Tracks[i].pending)
continue;
size_t len = strlen(Tracks[i].Name) + 20;
@@ -153,9 +151,7 @@ static char **ManagerList(Context_t * context __attribute__ ((unused)))
}
tracklist[j] = NULL;
}
audio_mgr_printf(10, "%s::%s return %p (%d - %d)\n", FILENAME, __FUNCTION__, tracklist, j, TrackCount);
return tracklist;
}
@@ -217,7 +213,6 @@ static int ManagerDel(Context_t *context)
return cERR_AUDIO_MGR_NO_ERROR;
}
static int Command(void *_context, ManagerCmd_t command, void *argument)
{
Context_t *context = (Context_t *) _context;
@@ -349,7 +344,6 @@ static int Command(void *_context, ManagerCmd_t command, void *argument)
return ret;
}
struct Manager_s AudioManager =
{
"Audio",

View File

@@ -195,34 +195,34 @@ static int Command(Context_t *context, ManagerCmd_t command, void *argument)
switch (command)
{
case MANAGER_ADD:
{
Track_t *track = argument;
ret = ManagerAdd(context, *track);
break;
}
case MANAGER_LIST:
{
container_ffmpeg_update_tracks(context, context->playback->uri, 0);
*((char ***) argument) = (char **) ManagerList(context);
break;
}
case MANAGER_DEL:
{
ret = ManagerDel(context);
break;
}
case MANAGER_INIT_UPDATE:
{
int i;
for (i = 0; i < TrackCount; i++)
Tracks[i].pending = 1;
break;
}
default:
chapter_mgr_err("%s::%s ContainerCmd %d not supported!\n", FILENAME, __FUNCTION__, command);
ret = cERR_CHAPTER_MGR_ERROR;
break;
case MANAGER_ADD:
{
Track_t *track = argument;
ret = ManagerAdd(context, *track);
break;
}
case MANAGER_LIST:
{
container_ffmpeg_update_tracks(context, context->playback->uri, 0);
*((char ***) argument) = (char **) ManagerList(context);
break;
}
case MANAGER_DEL:
{
ret = ManagerDel(context);
break;
}
case MANAGER_INIT_UPDATE:
{
int i;
for (i = 0; i < TrackCount; i++)
Tracks[i].pending = 1;
break;
}
default:
chapter_mgr_err("%s::%s ContainerCmd %d not supported!\n", FILENAME, __FUNCTION__, command);
ret = cERR_CHAPTER_MGR_ERROR;
break;
}
chapter_mgr_printf(10, "%s:%s: returning %d\n", FILENAME, __FUNCTION__, ret);
@@ -230,7 +230,6 @@ static int Command(Context_t *context, ManagerCmd_t command, void *argument)
return ret;
}
struct Manager_s ChapterManager =
{
"Chapter",

View File

@@ -39,7 +39,6 @@
#define SUBTITLE_MGR_SILENT
#endif
#ifdef SUBTITLE_MGR_DEBUG
static short debug_level = 20;
@@ -326,7 +325,6 @@ static int32_t Command(void *_context, ManagerCmd_t command, void *argument)
return ret;
}
Manager_t SubtitleManager =
{
"Subtitle",

View File

@@ -125,41 +125,7 @@ static int ManagerAdd(Context_t *context, Track_t track)
return cERR_VIDEO_MGR_NO_ERROR;
}
static char **ManagerList(Context_t * context __attribute__ ((unused)))
{
int i = 0, j = 0;
char **tracklist = NULL;
video_mgr_printf(10, "%s::%s\n", FILENAME, __FUNCTION__);
if (Tracks != NULL) {
tracklist = malloc(sizeof(char *) * ((TrackCount * 2) + 1));
if (tracklist == NULL) {
video_mgr_err("%s:%s malloc failed\n", FILENAME, __FUNCTION__);
return NULL;
}
for (i = 0, j = 0; i < TrackCount; i++, j += 2) {
if (Tracks[i].pending)
continue;
size_t len = strlen(Tracks[i].Name) + 20;
char tmp[len];
snprintf(tmp, len, "%d %s\n", Tracks[i].Id, Tracks[i].Name);
tracklist[j] = strdup(tmp);
tracklist[j + 1] = strdup(Tracks[i].Encoding);
}
tracklist[j] = NULL;
}
video_mgr_printf(10, "%s::%s return %p (%d - %d)\n", FILENAME, __FUNCTION__, tracklist, j, TrackCount);
return tracklist;
}
#if 0
static char **ManagerList(Context_t *context __attribute__((unused)))
static char **ManagerList(Context_t * context __attribute__((unused)))
{
int i = 0, j = 0;
char **tracklist = NULL;
@@ -181,15 +147,14 @@ static char **ManagerList(Context_t *context __attribute__((unused)))
size_t len = strlen(Tracks[i].Name) + 20;
char tmp[len];
snprintf(tmp, len, "%d %s\n", Tracks[i].Id, Tracks[i].Name);
tracklist[j] = strdup(tmp);
tracklist[j + 1] = strdup(Tracks[i].Encoding);
tracklist[j] = strdup(tmp);
tracklist[j + 1] = strdup(Tracks[i].Encoding);
}
tracklist[j] = NULL;
}
video_mgr_printf(10, "%s::%s return %p (%d - %d)\n", FILENAME, __FUNCTION__, tracklist, j, TrackCount);
return tracklist;
}
#endif
static int ManagerDel(Context_t *context)
{
@@ -362,7 +327,6 @@ static int Command(void *_context, ManagerCmd_t command, void *argument)
return ret;
}
struct Manager_s VideoManager =
{
"Video",