mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
[libarmbox] libeplayer3-arm code format
This commit is contained in:
@@ -80,13 +80,13 @@
|
||||
static short debug_level = 1;
|
||||
|
||||
#define ffmpeg_printf(level, fmt, x...) do { \
|
||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||
if (debug_level >= level) printf("[%s::%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||
#else
|
||||
#define ffmpeg_printf(level, fmt, x...)
|
||||
#endif
|
||||
|
||||
#ifndef FFMPEG_SILENT
|
||||
#define ffmpeg_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||
#define ffmpeg_err(fmt, x...) do { printf("[%s::%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||
#else
|
||||
#define ffmpeg_err(fmt, x...)
|
||||
#endif
|
||||
|
@@ -46,7 +46,7 @@
|
||||
static short debug_level = 40;
|
||||
|
||||
#define audio_mgr_printf(level, fmt, x...) do { \
|
||||
if (debug_level >= level) printf("[%s:%s] \n" fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||
if (debug_level >= level) printf("[%s::%s] \n" fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||
#else
|
||||
#define audio_mgr_printf(level, x...)
|
||||
#endif
|
||||
@@ -97,7 +97,7 @@ static int ManagerAdd(Context_t *context, Track_t track)
|
||||
|
||||
if (Tracks == NULL)
|
||||
{
|
||||
audio_mgr_err("%s:%s malloc failed\n", __FILE__, __FUNCTION__);
|
||||
audio_mgr_err("%s::%s malloc failed\n", __FILE__, __FUNCTION__);
|
||||
return cERR_AUDIO_MGR_ERROR;
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ static int ManagerAdd(Context_t *context, Track_t track)
|
||||
}
|
||||
else
|
||||
{
|
||||
audio_mgr_err("%s:%s TrackCount out if range %d - %d\n", __FILE__, __FUNCTION__, TrackCount, TRACKWRAP);
|
||||
audio_mgr_err("%s::%s TrackCount out if range %d - %d\n", __FILE__, __FUNCTION__, TrackCount, TRACKWRAP);
|
||||
return cERR_AUDIO_MGR_ERROR;
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ static char **ManagerList(Context_t *context __attribute__((unused)))
|
||||
|
||||
if (tracklist == NULL)
|
||||
{
|
||||
audio_mgr_err("%s:%s malloc failed\n", __FILE__, __FUNCTION__);
|
||||
audio_mgr_err("%s::%s malloc failed\n", __FILE__, __FUNCTION__);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ static TrackDescription_t *ManagerList(Context_t *context __attribute__((unused
|
||||
|
||||
if (tracklist == NULL)
|
||||
{
|
||||
audio_mgr_err("%s:%s malloc failed\n", __FILE__, __FUNCTION__);
|
||||
audio_mgr_err("%s::%s malloc failed\n", __FILE__, __FUNCTION__);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -384,7 +384,7 @@ static int Command(Context_t *context, ManagerCmd_t command, void *argument)
|
||||
break;
|
||||
}
|
||||
|
||||
audio_mgr_printf(10, "%s:%s: returning %d\n", __FILE__, __FUNCTION__, ret);
|
||||
audio_mgr_printf(10, "%s::%s returning %d\n", __FILE__, __FUNCTION__, ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@@ -118,7 +118,7 @@ static int ManagerAdd(Context_t *context __attribute__((unused)), Track_t track)
|
||||
}
|
||||
else
|
||||
{
|
||||
subtitle_mgr_err("%s:%s TrackCount out if range %d - %d\n", __FILE__, __FUNCTION__, TrackCount, TRACKWRAP);
|
||||
subtitle_mgr_err("%s::%s TrackCount out if range %d - %d\n", __FILE__, __FUNCTION__, TrackCount, TRACKWRAP);
|
||||
return cERR_SUBTITLE_MGR_ERROR;
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ static char **ManagerList(Context_t *context __attribute__((unused)))
|
||||
|
||||
if (tracklist == NULL)
|
||||
{
|
||||
subtitle_mgr_err("%s:%s malloc failed\n", __FILE__, __FUNCTION__);
|
||||
subtitle_mgr_err("%s::%s malloc failed\n", __FILE__, __FUNCTION__);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -223,6 +223,8 @@ static int Command(Context_t *context, ManagerCmd_t command, void *argument)
|
||||
}
|
||||
case MANAGER_GET:
|
||||
{
|
||||
subtitle_mgr_printf(20, "%s::%s MANAGER_GET\n", FILENAME, __FUNCTION__);
|
||||
|
||||
if (TrackCount > 0 && CurrentTrack >= 0)
|
||||
{
|
||||
*((int *)argument) = (int)Tracks[CurrentTrack].Id;
|
||||
@@ -255,6 +257,8 @@ static int Command(Context_t *context, ManagerCmd_t command, void *argument)
|
||||
}
|
||||
case MANAGER_GET_TRACK:
|
||||
{
|
||||
subtitle_mgr_printf(20, "%s::%s MANAGER_GET_TRACK\n", FILENAME, __FUNCTION__);
|
||||
|
||||
if ((TrackCount > 0) && (CurrentTrack >= 0))
|
||||
{
|
||||
*((Track_t **)argument) = (Track_t *) &Tracks[CurrentTrack];
|
||||
@@ -292,6 +296,7 @@ static int Command(Context_t *context, ManagerCmd_t command, void *argument)
|
||||
case MANAGER_SET:
|
||||
{
|
||||
int i;
|
||||
|
||||
subtitle_mgr_printf(20, "%s::%s MANAGER_SET id=%d\n", __FILE__, __FUNCTION__, *((int *)argument));
|
||||
|
||||
if (*((int *)argument) < 0)
|
||||
|
@@ -192,10 +192,12 @@ static int Command(Context_t *context, OutputCmd_t command, void *argument)
|
||||
{
|
||||
ret |= context->output->video->Command(context, OUTPUT_CLOSE, "video");
|
||||
}
|
||||
|
||||
if (context->playback->isAudio)
|
||||
{
|
||||
ret |= context->output->audio->Command(context, OUTPUT_CLOSE, "audio");
|
||||
}
|
||||
|
||||
if (context->playback->isSubtitle)
|
||||
{
|
||||
ret |= context->output->subtitle->Command(context, OUTPUT_CLOSE, "subtitle");
|
||||
@@ -239,6 +241,7 @@ static int Command(Context_t *context, OutputCmd_t command, void *argument)
|
||||
{
|
||||
ret = context->output->audio->Command(context, OUTPUT_PLAY, "audio");
|
||||
}
|
||||
|
||||
if (!ret)
|
||||
{
|
||||
if (context->playback->isSubtitle)
|
||||
@@ -261,10 +264,12 @@ static int Command(Context_t *context, OutputCmd_t command, void *argument)
|
||||
{
|
||||
ret |= context->output->video->Command(context, OUTPUT_STOP, "video");
|
||||
}
|
||||
|
||||
if (context->playback->isAudio)
|
||||
{
|
||||
ret |= context->output->audio->Command(context, OUTPUT_STOP, "audio");
|
||||
}
|
||||
|
||||
if (context->playback->isSubtitle)
|
||||
{
|
||||
ret |= context->output->subtitle->Command(context, OUTPUT_STOP, "subtitle");
|
||||
@@ -284,10 +289,12 @@ static int Command(Context_t *context, OutputCmd_t command, void *argument)
|
||||
{
|
||||
ret |= context->output->video->Command(context, OUTPUT_FLUSH, "video");
|
||||
}
|
||||
|
||||
if (context->playback->isAudio)
|
||||
{
|
||||
ret |= context->output->audio->Command(context, OUTPUT_FLUSH, "audio");
|
||||
}
|
||||
|
||||
if (context->playback->isSubtitle)
|
||||
{
|
||||
ret |= context->output->subtitle->Command(context, OUTPUT_FLUSH, "subtitle");
|
||||
@@ -307,10 +314,12 @@ static int Command(Context_t *context, OutputCmd_t command, void *argument)
|
||||
{
|
||||
ret |= context->output->video->Command(context, OUTPUT_PAUSE, "video");
|
||||
}
|
||||
|
||||
if (context->playback->isAudio)
|
||||
{
|
||||
ret |= context->output->audio->Command(context, OUTPUT_PAUSE, "audio");
|
||||
}
|
||||
|
||||
if (context->playback->isSubtitle)
|
||||
{
|
||||
ret |= context->output->subtitle->Command(context, OUTPUT_PAUSE, "subtitle");
|
||||
@@ -330,6 +339,7 @@ static int Command(Context_t *context, OutputCmd_t command, void *argument)
|
||||
{
|
||||
ret |= context->output->video->Command(context, OUTPUT_FASTFORWARD, "video");
|
||||
}
|
||||
|
||||
if (context->playback->isAudio)
|
||||
{
|
||||
ret |= context->output->audio->Command(context, OUTPUT_FASTFORWARD, "audio");
|
||||
@@ -349,6 +359,7 @@ static int Command(Context_t *context, OutputCmd_t command, void *argument)
|
||||
{
|
||||
ret |= context->output->video->Command(context, OUTPUT_REVERSE, "video");
|
||||
}
|
||||
|
||||
if (context->playback->isAudio)
|
||||
{
|
||||
ret |= context->output->audio->Command(context, OUTPUT_REVERSE, "audio");
|
||||
@@ -368,10 +379,12 @@ static int Command(Context_t *context, OutputCmd_t command, void *argument)
|
||||
{
|
||||
ret |= context->output->video->Command(context, OUTPUT_CONTINUE, "video");
|
||||
}
|
||||
|
||||
if (context->playback->isAudio)
|
||||
{
|
||||
ret |= context->output->audio->Command(context, OUTPUT_CONTINUE, "audio");
|
||||
}
|
||||
|
||||
if (context->playback->isSubtitle)
|
||||
{
|
||||
ret |= context->output->subtitle->Command(context, OUTPUT_CONTINUE, "subtitle");
|
||||
@@ -406,10 +419,12 @@ static int Command(Context_t *context, OutputCmd_t command, void *argument)
|
||||
{
|
||||
ret |= context->output->video->Command(context, OUTPUT_CLEAR, "video");
|
||||
}
|
||||
|
||||
if (context->playback->isAudio && (argument == NULL || *(char *) argument == 'a'))
|
||||
{
|
||||
ret |= context->output->audio->Command(context, OUTPUT_CLEAR, "audio");
|
||||
}
|
||||
|
||||
if (context->playback->isSubtitle && (argument == NULL || *(char *) argument == 's'))
|
||||
{
|
||||
ret |= context->output->subtitle->Command(context, OUTPUT_CLEAR, "subtitle");
|
||||
@@ -429,6 +444,7 @@ static int Command(Context_t *context, OutputCmd_t command, void *argument)
|
||||
{
|
||||
return context->output->video->Command(context, OUTPUT_PTS, argument);
|
||||
}
|
||||
|
||||
if (context->playback->isAudio)
|
||||
{
|
||||
return context->output->audio->Command(context, OUTPUT_PTS, argument);
|
||||
@@ -448,10 +464,12 @@ static int Command(Context_t *context, OutputCmd_t command, void *argument)
|
||||
{
|
||||
return context->output->audio->Command(context, OUTPUT_SWITCH, "audio");
|
||||
}
|
||||
|
||||
if (context->playback->isVideo)
|
||||
{
|
||||
return context->output->video->Command(context, OUTPUT_SWITCH, "video");
|
||||
}
|
||||
|
||||
if (context->playback->isSubtitle)
|
||||
{
|
||||
return context->output->subtitle->Command(context, OUTPUT_SWITCH, "subtitle");
|
||||
@@ -471,6 +489,7 @@ static int Command(Context_t *context, OutputCmd_t command, void *argument)
|
||||
{
|
||||
ret |= context->output->video->Command(context, OUTPUT_SLOWMOTION, "video");
|
||||
}
|
||||
|
||||
if (context->playback->isAudio)
|
||||
{
|
||||
ret |= context->output->audio->Command(context, OUTPUT_SLOWMOTION, "audio");
|
||||
@@ -520,6 +539,7 @@ static int Command(Context_t *context, OutputCmd_t command, void *argument)
|
||||
{
|
||||
return context->output->video->Command(context, OUTPUT_GET_FRAME_COUNT, argument);
|
||||
}
|
||||
|
||||
if (context->playback->isAudio)
|
||||
{
|
||||
return context->output->audio->Command(context, OUTPUT_GET_FRAME_COUNT, argument);
|
||||
|
Reference in New Issue
Block a user