mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-27 15:33:00 +02:00
libeplayer3-arm: Code formatting
This commit is contained in:
@@ -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;
|
||||
|
@@ -59,7 +59,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(x...)
|
||||
#endif
|
||||
@@ -73,11 +73,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
|
||||
{
|
||||
@@ -95,10 +95,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)))
|
||||
@@ -114,7 +115,7 @@ void releaseLinuxDVBMutex(const char *filename __attribute__((unused)), const ch
|
||||
linuxdvb_printf(250, "released mutex\n");
|
||||
}
|
||||
|
||||
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);
|
||||
@@ -179,7 +180,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);
|
||||
@@ -204,7 +205,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;
|
||||
@@ -282,7 +283,7 @@ int LinuxDvbPlay(Context_t *context, char *type)
|
||||
return ret;
|
||||
}
|
||||
|
||||
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);
|
||||
@@ -333,7 +334,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);
|
||||
@@ -362,7 +363,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);
|
||||
@@ -390,7 +391,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;
|
||||
@@ -404,7 +405,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");
|
||||
@@ -439,7 +440,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);
|
||||
@@ -470,7 +471,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);
|
||||
@@ -501,7 +502,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;
|
||||
@@ -539,13 +540,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);
|
||||
@@ -569,7 +570,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
|
||||
@@ -592,7 +593,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);
|
||||
@@ -625,7 +626,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");
|
||||
@@ -659,7 +660,7 @@ int LinuxDvbPts(Context_t *context __attribute__((unused)), unsigned long long
|
||||
return ret;
|
||||
}
|
||||
|
||||
int LinuxDvbGetFrameCount(Context_t *context __attribute__((unused)), unsigned long long int *frameCount)
|
||||
int LinuxDvbGetFrameCount(Context_t *context __attribute__((unused)), unsigned long long int *frameCount)
|
||||
{
|
||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||
dvb_play_info_t playInfo;
|
||||
@@ -695,7 +696,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);
|
||||
@@ -805,7 +806,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;
|
||||
@@ -957,10 +958,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);
|
||||
@@ -989,7 +990,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;
|
||||
|
@@ -42,7 +42,7 @@
|
||||
static short debug_level = 0;
|
||||
|
||||
#define output_printf(level, x...) do { \
|
||||
if (debug_level >= level) fprintf(stderr, x); } while (0)
|
||||
if (debug_level >= level) fprintf(stderr, x); } while (0)
|
||||
#else
|
||||
#define output_printf(level, x...)
|
||||
#endif
|
||||
@@ -64,7 +64,7 @@ static const char *FILENAME = "output.c";
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
static Output_t *AvailableOutput[] =
|
||||
@@ -79,7 +79,7 @@ static Output_t *AvailableOutput[] =
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* MISC Functions */
|
||||
/* Functions */
|
||||
/* ***************************** */
|
||||
|
||||
static void printOutputCapabilities()
|
||||
@@ -102,7 +102,7 @@ static void printOutputCapabilities()
|
||||
/* Output Functions */
|
||||
/* ***************************** */
|
||||
|
||||
static void OutputAdd(Context_t *context, char *port)
|
||||
static void OutputAdd(Context_t *context, char *port)
|
||||
{
|
||||
int i, j;
|
||||
output_printf(10, "%s::%s\n", FILENAME, __FUNCTION__);
|
||||
@@ -132,7 +132,7 @@ static void OutputAdd(Context_t *context, char *port)
|
||||
}
|
||||
}
|
||||
|
||||
static void OutputDel(Context_t *context, char *port)
|
||||
static void OutputDel(Context_t *context, char *port)
|
||||
{
|
||||
output_printf(10, "%s::%s\n", FILENAME, __FUNCTION__);
|
||||
if (!strcmp("audio", port))
|
||||
@@ -149,7 +149,7 @@ static void OutputDel(Context_t *context, char *port)
|
||||
}
|
||||
}
|
||||
|
||||
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_OUTPUT_NO_ERROR;
|
||||
|
@@ -53,7 +53,7 @@
|
||||
static short debug_level = 0;
|
||||
|
||||
#define subtitle_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 subtitle_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -85,7 +85,7 @@ Number, Style, Name,, MarginL, MarginR, MarginV, Effect,, Text
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
static pthread_mutex_t mutex;
|
||||
@@ -96,8 +96,9 @@ static int isSubtitleOpened = 0;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* MISC Functions */
|
||||
/* Functions */
|
||||
/* ***************************** */
|
||||
|
||||
static void getMutex(int line)
|
||||
{
|
||||
subtitle_printf(100, "%d requesting mutex\n", line);
|
||||
@@ -258,7 +259,7 @@ static int32_t subtitle_Close(Context_t *context __attribute__((unused)))
|
||||
return cERR_SUBTITLE_NO_ERROR;
|
||||
}
|
||||
|
||||
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_SUBTITLE_NO_ERROR;
|
||||
|
@@ -70,7 +70,7 @@
|
||||
static short debug_level = 0;
|
||||
|
||||
#define aac_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 aac_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -86,7 +86,7 @@ static short debug_level = 0;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
/// ** AAC ADTS format **
|
||||
@@ -125,7 +125,7 @@ ADTS = streaming format called Audio Data Transport Stream (ADTS)
|
||||
LOAS = Low Overhead Audio Stream (LOAS), a self-synchronizing streaming format
|
||||
*/
|
||||
|
||||
static unsigned char DefaultAACHeader[] =
|
||||
static unsigned char DefaultAACHeader[] =
|
||||
{
|
||||
0xff,
|
||||
0xf1,
|
||||
@@ -143,7 +143,7 @@ LATMContext *pLATMCtx = NULL;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* MISC Functions */
|
||||
/* Functions */
|
||||
/* ***************************** */
|
||||
|
||||
static int reset()
|
||||
|
@@ -61,7 +61,7 @@
|
||||
static short debug_level = 0;
|
||||
|
||||
#define ac3_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 ac3_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -77,8 +77,9 @@ static short debug_level = 0;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
unsigned char AC3_SYNC_HEADER[] = {0x80, 0x01, 0x00, 0x01};
|
||||
|
||||
/* ***************************** */
|
||||
|
@@ -64,7 +64,7 @@
|
||||
static short debug_level = 0;
|
||||
|
||||
#define amr_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 amr_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -80,7 +80,7 @@ static short debug_level = 0;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
|
@@ -52,6 +52,7 @@
|
||||
/* ***************************** */
|
||||
/* Makros/Constants */
|
||||
/* ***************************** */
|
||||
|
||||
#define B_GET_BITS(w,e,b) (((w)>>(b))&(((unsigned)(-1))>>((sizeof(unsigned))*8-(e+1-b))))
|
||||
#define B_SET_BITS(name,v,e,b) (((unsigned)(v))<<(b))
|
||||
|
||||
@@ -66,7 +67,7 @@
|
||||
static short debug_level = 0;
|
||||
|
||||
#define divx_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 divx_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -82,8 +83,9 @@ static short debug_level = 0;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
static uint8_t initialHeader = 1;
|
||||
static uint8_t brcm_divx311_sequence_header[] =
|
||||
{
|
||||
@@ -115,7 +117,7 @@ static int writeData(void *_call)
|
||||
WriterAVCallData_t *call = (WriterAVCallData_t *) _call;
|
||||
unsigned char PesHeader[PES_MAX_HEADER_SIZE + 4];
|
||||
unsigned char Version = 5;
|
||||
unsigned int FakeStartCode = (Version << 8) | PES_VERSION_FAKE_START_CODE;
|
||||
unsigned int FakeStartCode = (Version << 8) | PES_VERSION_FAKE_START_CODE;
|
||||
divx_printf(10, "\n");
|
||||
if (call == NULL)
|
||||
{
|
||||
|
@@ -68,7 +68,7 @@
|
||||
static int16_t debug_level = 0;
|
||||
|
||||
#define dts_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 dts_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -84,7 +84,7 @@ static int16_t debug_level = 0;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
@@ -94,6 +94,7 @@ static int16_t debug_level = 0;
|
||||
/* ***************************** */
|
||||
/* MISC Functions */
|
||||
/* ***************************** */
|
||||
|
||||
static int32_t reset()
|
||||
{
|
||||
return 0;
|
||||
|
@@ -59,7 +59,7 @@
|
||||
static short debug_level = 0;
|
||||
|
||||
#define h263_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 h263_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -74,7 +74,7 @@ static short debug_level = 0;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
|
@@ -61,7 +61,7 @@
|
||||
static short debug_level = 0;
|
||||
|
||||
#define h264_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 h264_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -79,14 +79,16 @@ static short debug_level = 0;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
static unsigned char Head[] = {0, 0, 0, 1};
|
||||
static int initialHeader = 1;
|
||||
static unsigned int NalLengthBytes = 1;
|
||||
static unsigned char *CodecData = NULL;
|
||||
static unsigned int CodecDataLen = 0;
|
||||
static int avc3 = 0;
|
||||
|
||||
/* ***************************** */
|
||||
/* Prototypes */
|
||||
/* ***************************** */
|
||||
|
@@ -61,7 +61,7 @@
|
||||
static short debug_level = 10;
|
||||
|
||||
#define h264_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 h264_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -79,13 +79,15 @@ static short debug_level = 10;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
static unsigned char Head[] = {0, 0, 0, 1};
|
||||
static int initialHeader = 1;
|
||||
static unsigned int NalLengthBytes = 1;
|
||||
static unsigned char *CodecData = NULL;
|
||||
static unsigned int CodecDataLen = 0;
|
||||
|
||||
/* ***************************** */
|
||||
/* Prototypes */
|
||||
/* ***************************** */
|
||||
|
@@ -57,7 +57,9 @@
|
||||
/* ***************************** */
|
||||
/* Makros/Constants */
|
||||
/* ***************************** */
|
||||
|
||||
//#define SAM_WITH_DEBUG
|
||||
|
||||
#ifdef SAM_WITH_DEBUG
|
||||
#define LPCM_DEBUG
|
||||
#else
|
||||
@@ -69,7 +71,7 @@
|
||||
static uint16_t debug_level = 1;
|
||||
|
||||
#define lpcm_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 lpcm_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -87,8 +89,9 @@ static uint16_t debug_level = 1;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
static uint8_t PesHeader[PES_MAX_HEADER_SIZE];
|
||||
static uint8_t initialHeader = 1;
|
||||
|
||||
|
@@ -59,7 +59,7 @@
|
||||
static short debug_level = 0;
|
||||
|
||||
#define mp3_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 mp3_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -75,7 +75,7 @@ static short debug_level = 0;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
|
@@ -60,7 +60,7 @@
|
||||
static short debug_level = 0;
|
||||
|
||||
#define mpeg2_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 mpeg2_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -76,7 +76,7 @@ static short debug_level = 0;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
@@ -118,7 +118,7 @@ static int writeData(void *_call)
|
||||
while (Position < call->len)
|
||||
{
|
||||
int PacketLength = (call->len - Position) <= MAX_PES_PACKET_SIZE ?
|
||||
(call->len - Position) : MAX_PES_PACKET_SIZE;
|
||||
(call->len - Position) : MAX_PES_PACKET_SIZE;
|
||||
int Remaining = call->len - Position - PacketLength;
|
||||
mpeg2_printf(20, "PacketLength=%d, Remaining=%d, Position=%d\n", PacketLength, Remaining, Position);
|
||||
struct iovec iov[2];
|
||||
|
@@ -65,7 +65,7 @@
|
||||
static short debug_level = 0;
|
||||
|
||||
#define mpeg4_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 mpeg4_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -81,8 +81,9 @@ static short debug_level = 0;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
static int initialHeader = 1;
|
||||
|
||||
/* ***************************** */
|
||||
@@ -92,6 +93,7 @@ static int initialHeader = 1;
|
||||
/* ***************************** */
|
||||
/* MISC Functions */
|
||||
/* ***************************** */
|
||||
|
||||
static int reset()
|
||||
{
|
||||
initialHeader = 1;
|
||||
|
@@ -55,6 +55,9 @@
|
||||
/* ***************************** */
|
||||
/* Makros/Constants */
|
||||
/* ***************************** */
|
||||
|
||||
//#define SAM_WITH_DEBUG
|
||||
|
||||
#ifdef SAM_WITH_DEBUG
|
||||
#define PCM_DEBUG
|
||||
#else
|
||||
@@ -66,7 +69,7 @@
|
||||
static uint16_t debug_level = 0;
|
||||
|
||||
#define pcm_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 pcm_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -82,8 +85,9 @@ static uint16_t debug_level = 0;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
static uint8_t initialHeader = 1;
|
||||
static uint8_t codec_data[18];
|
||||
static uint64_t fixed_buffertimestamp;
|
||||
|
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/* ***************************** */
|
||||
/* Includes */
|
||||
/* Includes */
|
||||
/* ***************************** */
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -50,9 +50,10 @@
|
||||
#include "writer.h"
|
||||
|
||||
/* ***************************** */
|
||||
/* Makros/Constants */
|
||||
/* Makros/Constants */
|
||||
/* ***************************** */
|
||||
#define VC1_SEQUENCE_LAYER_METADATA_START_CODE 0x80
|
||||
|
||||
#define VC1_SEQUENCE_LAYER_METADATA_START_CODE 0x80
|
||||
#define VC1_FRAME_START_CODE 0x0d
|
||||
|
||||
#define SAM_WITH_DEBUG
|
||||
@@ -67,7 +68,7 @@
|
||||
static short debug_level = 10;
|
||||
|
||||
#define vc1_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 vc1_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -82,12 +83,13 @@ static short debug_level = 10;
|
||||
/* Types */
|
||||
/* ***************************** */
|
||||
|
||||
static const unsigned char SequenceLayerStartCode[] = {0x00, 0x00, 0x01, VC1_SEQUENCE_LAYER_METADATA_START_CODE};
|
||||
static const uint8_t Vc1FrameStartCode[] = {0, 0, 1, VC1_FRAME_START_CODE};
|
||||
static const unsigned char SequenceLayerStartCode[] = {0x00, 0x00, 0x01, VC1_SEQUENCE_LAYER_METADATA_START_CODE};
|
||||
static const uint8_t Vc1FrameStartCode[] = {0, 0, 1, VC1_FRAME_START_CODE};
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
static int initialHeader = 1;
|
||||
static video_codec_data_t videocodecdata = {0, 0};
|
||||
|
||||
|
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/* ***************************** */
|
||||
/* Includes */
|
||||
/* Includes */
|
||||
/* ***************************** */
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -50,9 +50,11 @@
|
||||
#include "writer.h"
|
||||
|
||||
/* ***************************** */
|
||||
/* Makros/Constants */
|
||||
/* Makros/Constants */
|
||||
/* ***************************** */
|
||||
|
||||
//#define SAM_WITH_DEBUG
|
||||
|
||||
#ifdef SAM_WITH_DEBUG
|
||||
#define VP_DEBUG
|
||||
#else
|
||||
@@ -64,7 +66,7 @@
|
||||
static short debug_level = 10;
|
||||
|
||||
#define vp_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 vp_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -80,7 +82,7 @@ static short debug_level = 10;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
@@ -90,6 +92,7 @@ static short debug_level = 10;
|
||||
/* ***************************** */
|
||||
/* MISC Functions */
|
||||
/* ***************************** */
|
||||
|
||||
static int reset()
|
||||
{
|
||||
return 0;
|
||||
|
@@ -53,6 +53,8 @@
|
||||
/* Makros/Constants */
|
||||
/* ***************************** */
|
||||
|
||||
//#define SAM_WITH_DEBUG
|
||||
|
||||
#ifdef SAM_WITH_DEBUG
|
||||
#define WMA_DEBUG
|
||||
#else
|
||||
@@ -64,7 +66,7 @@
|
||||
static short debug_level = 0;
|
||||
|
||||
#define wma_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 wma_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -80,7 +82,7 @@ static short debug_level = 0;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
static int initialHeader = 1;
|
||||
|
@@ -67,7 +67,7 @@
|
||||
static short debug_level = 10;
|
||||
|
||||
#define wmv_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 wmv_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -85,8 +85,9 @@ static short debug_level = 10;
|
||||
static const uint8_t Vc1FrameStartCode[] = {0, 0, 1, WMV_FRAME_START_CODE};
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
static int initialHeader = 1;
|
||||
static video_codec_data_t videocodecdata = {0, 0};
|
||||
|
||||
|
@@ -41,7 +41,7 @@
|
||||
static short debug_level = 0;
|
||||
|
||||
#define writer_printf(level, x...) do { \
|
||||
if (debug_level >= level) printf(x); } while (0)
|
||||
if (debug_level >= level) printf(x); } while (0)
|
||||
#else
|
||||
#define writer_printf(level, x...)
|
||||
#endif
|
||||
@@ -57,7 +57,7 @@ static short debug_level = 0;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
static Writer_t *AvailableWriter[] =
|
||||
|
@@ -68,7 +68,7 @@
|
||||
static short debug_level = 0;
|
||||
|
||||
#define aac_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 aac_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -84,7 +84,7 @@ static short debug_level = 0;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
/// ** AAC ADTS format **
|
||||
@@ -123,7 +123,7 @@ ADTS = streaming format called Audio Data Transport Stream (ADTS)
|
||||
LOAS = Low Overhead Audio Stream (LOAS), a self-synchronizing streaming format
|
||||
*/
|
||||
|
||||
static unsigned char DefaultAACHeader[] =
|
||||
static unsigned char DefaultAACHeader[] =
|
||||
{
|
||||
0xff,
|
||||
0xf1,
|
||||
|
@@ -63,7 +63,7 @@
|
||||
static short debug_level = 0;
|
||||
|
||||
#define ac3_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 ac3_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -79,7 +79,7 @@ static short debug_level = 0;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
|
@@ -62,7 +62,7 @@
|
||||
static short debug_level = 0;
|
||||
|
||||
#define divx_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 divx_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -78,8 +78,9 @@ static short debug_level = 0;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
static int initialHeader = 1;
|
||||
|
||||
/* ***************************** */
|
||||
@@ -89,6 +90,7 @@ static int initialHeader = 1;
|
||||
/* ***************************** */
|
||||
/* MISC Functions */
|
||||
/* ***************************** */
|
||||
|
||||
static int reset()
|
||||
{
|
||||
initialHeader = 1;
|
||||
|
@@ -62,7 +62,7 @@
|
||||
static short debug_level = 0;
|
||||
|
||||
#define divx_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 divx_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -78,8 +78,9 @@ static short debug_level = 0;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
static int initialHeader = 1;
|
||||
|
||||
/* ***************************** */
|
||||
@@ -89,6 +90,7 @@ static int initialHeader = 1;
|
||||
/* ***************************** */
|
||||
/* MISC Functions */
|
||||
/* ***************************** */
|
||||
|
||||
static int reset()
|
||||
{
|
||||
initialHeader = 1;
|
||||
|
@@ -50,6 +50,7 @@
|
||||
/* ***************************** */
|
||||
/* Makros/Constants */
|
||||
/* ***************************** */
|
||||
|
||||
#define PES_AUDIO_PRIVATE_HEADER_SIZE 16 // consider maximum private header size.
|
||||
#define PES_AUDIO_HEADER_SIZE (32 + PES_AUDIO_PRIVATE_HEADER_SIZE)
|
||||
#define PES_AUDIO_PACKET_SIZE 2028
|
||||
@@ -66,7 +67,7 @@
|
||||
static short debug_level = 0;
|
||||
|
||||
#define dts_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 dts_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -82,7 +83,7 @@ static short debug_level = 0;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
@@ -92,6 +93,7 @@ static short debug_level = 0;
|
||||
/* ***************************** */
|
||||
/* MISC Functions */
|
||||
/* ***************************** */
|
||||
|
||||
static int reset()
|
||||
{
|
||||
return 0;
|
||||
|
@@ -50,6 +50,7 @@
|
||||
/* ***************************** */
|
||||
/* Makros/Constants */
|
||||
/* ***************************** */
|
||||
|
||||
#ifdef SAM_WITH_DEBUG
|
||||
#define H263_DEBUG
|
||||
#else
|
||||
@@ -61,7 +62,7 @@ static short debug_level = 0;
|
||||
static const char *FILENAME = "h263.c";
|
||||
|
||||
#define h263_printf(level, fmt, x...) do { \
|
||||
if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
|
||||
if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
|
||||
#else
|
||||
#define h263_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -71,12 +72,13 @@ static const char *FILENAME = "h263.c";
|
||||
#else
|
||||
#define h263_err(fmt, x...)
|
||||
#endif
|
||||
|
||||
/* ***************************** */
|
||||
/* Types */
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
|
@@ -63,7 +63,7 @@
|
||||
static short debug_level = 0;
|
||||
|
||||
#define h264_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 h264_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -92,12 +92,14 @@ typedef struct avcC_s
|
||||
} avcC_t;
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
const uint8_t Head[] = {0, 0, 0, 1};
|
||||
static int32_t initialHeader = 1;
|
||||
static uint32_t NalLengthBytes = 1;
|
||||
static int avc3 = 0;
|
||||
|
||||
/* ***************************** */
|
||||
/* Prototypes */
|
||||
/* ***************************** */
|
||||
|
@@ -50,6 +50,7 @@
|
||||
/* ***************************** */
|
||||
/* Makros/Constants */
|
||||
/* ***************************** */
|
||||
|
||||
#ifdef SAM_WITH_DEBUG
|
||||
#define MP3_DEBUG
|
||||
#else
|
||||
@@ -61,7 +62,7 @@
|
||||
static short debug_level = 0;
|
||||
|
||||
#define mp3_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 mp3_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -77,7 +78,7 @@ static short debug_level = 0;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
@@ -96,7 +97,7 @@ static int reset()
|
||||
static int writeData(void *_call)
|
||||
{
|
||||
WriterAVCallData_t *call = (WriterAVCallData_t *) _call;
|
||||
unsigned char PesHeader[PES_MAX_HEADER_SIZE];
|
||||
unsigned char PesHeader[PES_MAX_HEADER_SIZE];
|
||||
mp3_printf(10, "\n");
|
||||
if (call == NULL)
|
||||
{
|
||||
|
@@ -50,6 +50,7 @@
|
||||
/* ***************************** */
|
||||
/* Makros/Constants */
|
||||
/* ***************************** */
|
||||
|
||||
#ifdef SAM_WITH_DEBUG
|
||||
#define MPEG2_DEBUG
|
||||
#else
|
||||
@@ -61,7 +62,7 @@
|
||||
static short debug_level = 0;
|
||||
|
||||
#define mpeg2_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 mpeg2_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -77,7 +78,7 @@ static short debug_level = 0;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
@@ -96,7 +97,7 @@ static int reset()
|
||||
static int writeData(void *_call)
|
||||
{
|
||||
WriterAVCallData_t *call = (WriterAVCallData_t *) _call;
|
||||
unsigned char PesHeader[PES_MAX_HEADER_SIZE];
|
||||
unsigned char PesHeader[PES_MAX_HEADER_SIZE];
|
||||
int len = 0;
|
||||
unsigned int Position = 0;
|
||||
mpeg2_printf(10, "\n");
|
||||
|
@@ -53,6 +53,7 @@
|
||||
/* ***************************** */
|
||||
/* Makros/Constants */
|
||||
/* ***************************** */
|
||||
|
||||
#ifdef SAM_WITH_DEBUG
|
||||
#define PCM_DEBUG
|
||||
#else
|
||||
@@ -64,7 +65,7 @@
|
||||
static short debug_level = 0;
|
||||
|
||||
#define pcm_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 pcm_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -80,7 +81,7 @@ static short debug_level = 0;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
static int32_t initialHeader = 1;
|
||||
|
@@ -55,7 +55,7 @@
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
|
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/* ***************************** */
|
||||
/* Includes */
|
||||
/* Includes */
|
||||
/* ***************************** */
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -48,7 +48,7 @@
|
||||
#include "writer.h"
|
||||
|
||||
/* ***************************** */
|
||||
/* Makros/Constants */
|
||||
/* Makros/Constants */
|
||||
/* ***************************** */
|
||||
|
||||
#define WMV3_PRIVATE_DATA_LENGTH 4
|
||||
@@ -72,7 +72,7 @@
|
||||
static short debug_level = 0;
|
||||
|
||||
#define vc1_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 vc1_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -105,6 +105,7 @@ static const unsigned char Metadata[] =
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* ***************************** */
|
||||
|
||||
static int initialHeader = 1;
|
||||
static unsigned char FrameHeaderSeen = 0;
|
||||
|
||||
@@ -115,6 +116,7 @@ static unsigned char FrameHeaderSeen = 0;
|
||||
/* ***************************** */
|
||||
/* MISC Functions */
|
||||
/* ***************************** */
|
||||
|
||||
static int reset()
|
||||
{
|
||||
initialHeader = 1;
|
||||
|
@@ -49,6 +49,9 @@
|
||||
/* ***************************** */
|
||||
/* Makros/Constants */
|
||||
/* ***************************** */
|
||||
|
||||
//#define SAM_WITH_DEBUG
|
||||
|
||||
#ifdef SAM_WITH_DEBUG
|
||||
#define VORBIS_DEBUG
|
||||
#else
|
||||
@@ -60,7 +63,7 @@
|
||||
static short debug_level = 1;
|
||||
|
||||
#define vorbis_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 vorbis_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -76,7 +79,7 @@ static short debug_level = 1;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
@@ -95,7 +98,7 @@ static int reset()
|
||||
static int writeData(void *_call)
|
||||
{
|
||||
WriterAVCallData_t *call = (WriterAVCallData_t *) _call;
|
||||
unsigned char PesHeader[PES_MAX_HEADER_SIZE];
|
||||
unsigned char PesHeader[PES_MAX_HEADER_SIZE];
|
||||
vorbis_printf(10, "\n");
|
||||
if (call == NULL)
|
||||
{
|
||||
|
@@ -51,6 +51,8 @@
|
||||
/* Makros/Constants */
|
||||
/* ***************************** */
|
||||
|
||||
//#define SAM_WITH_DEBUG
|
||||
|
||||
#ifdef SAM_WITH_DEBUG
|
||||
#define WMA_DEBUG
|
||||
#else
|
||||
@@ -62,7 +64,7 @@
|
||||
static short debug_level = 0;
|
||||
|
||||
#define wma_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 wma_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -78,7 +80,7 @@ static short debug_level = 0;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
static int initialHeader = 1;
|
||||
|
@@ -69,7 +69,7 @@
|
||||
static short debug_level = 0;
|
||||
|
||||
#define wmv_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 wmv_printf(level, fmt, x...)
|
||||
#endif
|
||||
@@ -106,8 +106,9 @@ static const unsigned char Metadata[] =
|
||||
};
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
static int initialHeader = 1;
|
||||
|
||||
/* ***************************** */
|
||||
@@ -117,6 +118,7 @@ static int initialHeader = 1;
|
||||
/* ***************************** */
|
||||
/* MISC Functions */
|
||||
/* ***************************** */
|
||||
|
||||
static int reset()
|
||||
{
|
||||
initialHeader = 1;
|
||||
|
@@ -43,7 +43,7 @@
|
||||
static short debug_level = 0;
|
||||
|
||||
#define writer_printf(level, x...) do { \
|
||||
if (debug_level >= level) printf(x); } while (0)
|
||||
if (debug_level >= level) printf(x); } while (0)
|
||||
#else
|
||||
#define writer_printf(level, x...)
|
||||
#endif
|
||||
@@ -59,7 +59,7 @@ static short debug_level = 0;
|
||||
/* ***************************** */
|
||||
|
||||
/* ***************************** */
|
||||
/* Varaibles */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
||||
static Writer_t *AvailableWriter[] =
|
||||
|
Reference in New Issue
Block a user