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

@@ -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()

View File

@@ -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};
/* ***************************** */

View File

@@ -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 */
/* ***************************** */
/* ***************************** */

View File

@@ -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)
{

View File

@@ -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;

View File

@@ -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 */
/* ***************************** */
/* ***************************** */

View File

@@ -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 */
/* ***************************** */

View File

@@ -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 */
/* ***************************** */

View File

@@ -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;

View File

@@ -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 */
/* ***************************** */
/* ***************************** */

View File

@@ -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];

View File

@@ -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;

View File

@@ -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;

View File

@@ -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};

View File

@@ -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;

View File

@@ -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;

View File

@@ -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};

View File

@@ -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[] =

View File

@@ -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,

View File

@@ -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 */
/* ***************************** */
/* ***************************** */

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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 */
/* ***************************** */
/* ***************************** */

View File

@@ -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 */
/* ***************************** */

View File

@@ -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)
{

View File

@@ -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");

View File

@@ -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;

View File

@@ -55,7 +55,7 @@
/* ***************************** */
/* ***************************** */
/* Varaibles */
/* Variables */
/* ***************************** */
/* ***************************** */

View File

@@ -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;

View File

@@ -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)
{

View File

@@ -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;

View File

@@ -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;

View File

@@ -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[] =