libeplayer3-arm: Code formatting

This commit is contained in:
max_10
2018-01-06 22:02:22 +01:00
committed by Thilo Graf
parent 0cdc859110
commit f72e8edc2e
48 changed files with 249 additions and 191 deletions

View File

@@ -48,6 +48,7 @@
/* ***************************** */
/* Makros/Constants */
/* ***************************** */
// SULGE DEBUG
//#define SAM_WITH_DEBUG
@@ -63,7 +64,7 @@ static const char FILENAME[] = __FILE__;
#ifdef LINUXDVB_DEBUG
#define linuxdvb_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 linuxdvb_printf(level, fmt, x...)
#endif
@@ -77,11 +78,11 @@ static const char FILENAME[] = __FILE__;
#define cERR_LINUXDVB_NO_ERROR 0
#define cERR_LINUXDVB_ERROR -1
static const char VIDEODEV[] = "/dev/dvb/adapter0/video0";
static const char AUDIODEV[] = "/dev/dvb/adapter0/audio0";
static const char VIDEODEV[] = "/dev/dvb/adapter0/video0";
static const char AUDIODEV[] = "/dev/dvb/adapter0/audio0";
static int videofd = -1;
static int audiofd = -1;
static int videofd = -1;
static int audiofd = -1;
struct DVBApiVideoInfo_s
{
@@ -99,10 +100,11 @@ pthread_mutex_t LinuxDVBmutex;
/* ***************************** */
/* Prototypes */
/* ***************************** */
int LinuxDvbStop(Context_t *context, char *type);
int LinuxDvbStop(Context_t *context, char *type);
/* ***************************** */
/* MISC Functions */
/* Functions */
/* ***************************** */
void getLinuxDVBMutex(const char *filename __attribute__((unused)), const char *function __attribute__((unused)), int line __attribute__((unused)))
@@ -127,7 +129,7 @@ static int LinuxDvbMapBypassMode(int bypass)
return bypass;
}
int LinuxDvbOpen(Context_t *context __attribute__((unused)), char *type)
int LinuxDvbOpen(Context_t *context __attribute__((unused)), char *type)
{
unsigned char video = !strcmp("video", type);
unsigned char audio = !strcmp("audio", type);
@@ -185,7 +187,7 @@ int LinuxDvbOpen(Context_t *context __attribute__((unused)), char *type)
return cERR_LINUXDVB_NO_ERROR;
}
int LinuxDvbClose(Context_t *context, char *type)
int LinuxDvbClose(Context_t *context, char *type)
{
unsigned char video = !strcmp("video", type);
unsigned char audio = !strcmp("audio", type);
@@ -210,7 +212,7 @@ int LinuxDvbClose(Context_t *context, char *type)
return cERR_LINUXDVB_NO_ERROR;
}
int LinuxDvbPlay(Context_t *context, char *type)
int LinuxDvbPlay(Context_t *context, char *type)
{
int ret = cERR_LINUXDVB_NO_ERROR;
Writer_t *writer;
@@ -313,7 +315,7 @@ int LinuxDvbPlay(Context_t *context, char *type)
return 0;
}
int LinuxDvbStop(Context_t *context __attribute__((unused)), char *type)
int LinuxDvbStop(Context_t *context __attribute__((unused)), char *type)
{
int ret = cERR_LINUXDVB_NO_ERROR;
unsigned char video = !strcmp("video", type);
@@ -362,7 +364,7 @@ int LinuxDvbStop(Context_t *context __attribute__((unused)), char *type)
return ret;
}
int LinuxDvbPause(Context_t *context __attribute__((unused)), char *type)
int LinuxDvbPause(Context_t *context __attribute__((unused)), char *type)
{
int ret = cERR_LINUXDVB_NO_ERROR;
unsigned char video = !strcmp("video", type);
@@ -391,7 +393,7 @@ int LinuxDvbPause(Context_t *context __attribute__((unused)), char *type)
return ret;
}
int LinuxDvbContinue(Context_t *context __attribute__((unused)), char *type)
int LinuxDvbContinue(Context_t *context __attribute__((unused)), char *type)
{
int ret = cERR_LINUXDVB_NO_ERROR;
unsigned char video = !strcmp("video", type);
@@ -419,7 +421,7 @@ int LinuxDvbContinue(Context_t *context __attribute__((unused)), char *type)
return ret;
}
int LinuxDvbReverseDiscontinuity(Context_t *context __attribute__((unused)), int *surplus)
int LinuxDvbReverseDiscontinuity(Context_t *context __attribute__((unused)), int *surplus)
{
int ret = cERR_LINUXDVB_NO_ERROR;
// int dis_type = VIDEO_DISCONTINUITY_CONTINUOUS_REVERSE | *surplus;
@@ -433,7 +435,7 @@ int LinuxDvbReverseDiscontinuity(Context_t *context __attribute__((unused)), in
return ret;
}
int LinuxDvbAudioMute(Context_t *context __attribute__((unused)), char *flag)
int LinuxDvbAudioMute(Context_t *context __attribute__((unused)), char *flag)
{
int ret = cERR_LINUXDVB_NO_ERROR;
linuxdvb_printf(10, "\n");
@@ -468,7 +470,7 @@ int LinuxDvbAudioMute(Context_t *context __attribute__((unused)), char *flag)
return ret;
}
int LinuxDvbFlush(Context_t *context __attribute__((unused)), char *type)
int LinuxDvbFlush(Context_t *context __attribute__((unused)), char *type)
{
// unsigned char video = !strcmp("video", type);
// unsigned char audio = !strcmp("audio", type);
@@ -496,7 +498,7 @@ int LinuxDvbFlush(Context_t *context __attribute__((unused)), char *type)
}
#ifndef use_set_speed_instead_ff
int LinuxDvbFastForward(Context_t *context, char *type)
int LinuxDvbFastForward(Context_t *context, char *type)
{
int ret = cERR_LINUXDVB_NO_ERROR;
unsigned char video = !strcmp("video", type);
@@ -527,7 +529,7 @@ static unsigned int SpeedList[] =
125, 250, 500, 700, 800, 900
};
int LinuxDvbFastForward(Context_t *context, char *type)
int LinuxDvbFastForward(Context_t *context, char *type)
{
int ret = cERR_LINUXDVB_NO_ERROR;
int speedIndex;
@@ -565,13 +567,13 @@ int LinuxDvbFastForward(Context_t *context, char *type)
}
#endif
int LinuxDvbReverse(Context_t *context __attribute__((unused)), char *type __attribute__((unused)))
int LinuxDvbReverse(Context_t *context __attribute__((unused)), char *type __attribute__((unused)))
{
int ret = cERR_LINUXDVB_NO_ERROR;
return ret;
}
int LinuxDvbSlowMotion(Context_t *context, char *type)
int LinuxDvbSlowMotion(Context_t *context, char *type)
{
int ret = cERR_LINUXDVB_NO_ERROR;
unsigned char video = !strcmp("video", type);
@@ -595,7 +597,7 @@ int LinuxDvbSlowMotion(Context_t *context, char *type)
return ret;
}
int LinuxDvbAVSync(Context_t *context, char *type __attribute__((unused)))
int LinuxDvbAVSync(Context_t *context, char *type __attribute__((unused)))
{
int ret = cERR_LINUXDVB_NO_ERROR;
/* konfetti: this one is dedicated to audiofd so we
@@ -618,7 +620,7 @@ int LinuxDvbAVSync(Context_t *context, char *type __attribute__((unused)))
return ret;
}
int LinuxDvbClear(Context_t *context __attribute__((unused)), char *type)
int LinuxDvbClear(Context_t *context __attribute__((unused)), char *type)
{
int32_t ret = cERR_LINUXDVB_NO_ERROR;
uint8_t video = !strcmp("video", type);
@@ -651,7 +653,7 @@ int LinuxDvbClear(Context_t *context __attribute__((unused)), char *type)
return ret;
}
int LinuxDvbPts(Context_t *context __attribute__((unused)), unsigned long long int *pts)
int LinuxDvbPts(Context_t *context __attribute__((unused)), unsigned long long int *pts)
{
int ret = cERR_LINUXDVB_ERROR;
linuxdvb_printf(50, "\n");
@@ -691,7 +693,7 @@ int LinuxDvbGetFrameCount(Context_t *context __attribute__((unused)), unsigned
return ret;
}
int LinuxDvbSwitch(Context_t *context, char *type)
int LinuxDvbSwitch(Context_t *context, char *type)
{
unsigned char audio = !strcmp("audio", type);
unsigned char video = !strcmp("video", type);
@@ -801,7 +803,7 @@ int LinuxDvbSwitch(Context_t *context, char *type)
return cERR_LINUXDVB_NO_ERROR;
}
static int Write(void *_context, void *_out)
static int Write(void *_context, void *_out)
{
Context_t *context = (Context_t *) _context;
AudioVideoOut_t *out = (AudioVideoOut_t *) _out;
@@ -953,10 +955,10 @@ static int Write(void *_context, void *_out)
return ret;
}
static int reset(Context_t *context)
static int reset(Context_t *context)
{
int ret = cERR_LINUXDVB_NO_ERROR;
Writer_t *writer;
Writer_t *writer;
char *Encoding = NULL;
context->manager->video->Command(context, MANAGER_GETENCODING, &Encoding);
writer = getWriter(Encoding);
@@ -985,7 +987,7 @@ static int reset(Context_t *context)
return ret;
}
static int Command(void *_context, OutputCmd_t command, void *argument)
static int Command(void *_context, OutputCmd_t command, void *argument)
{
Context_t *context = (Context_t *) _context;
int ret = cERR_LINUXDVB_NO_ERROR;