libeplayer3: get rid of compiler warnings

This commit is contained in:
martii
2013-06-10 15:06:00 +02:00
parent 997af12a20
commit 65e69b07fb
31 changed files with 147 additions and 153 deletions

View File

@@ -100,7 +100,6 @@ static int writeData(void* _call)
unsigned int FakeHeaderLength;
unsigned char Version = 5;
unsigned int FakeStartCode = (Version << 8) | PES_VERSION_FAKE_START_CODE;
unsigned int HeaderLength = 0;
unsigned int usecPerFrame = 41708; /* Hellmaster1024: default value */
BitPacker_t ld = {FakeHeaders, 0, 32};

View File

@@ -97,7 +97,6 @@ static int writeData(void* _call)
{
WriterAVCallData_t* call = (WriterAVCallData_t*) _call;
int i = 0;
unsigned char PesHeader[PES_AUDIO_HEADER_SIZE];
dts_printf(10, "\n");

View File

@@ -128,7 +128,7 @@ static int writeData(void* _call)
int src_stride = call->Stride;
int dst_stride = call->destStride;
int dst_delta = dst_stride - call->Width*4;
int x,y;
unsigned int x,y;
const unsigned char *src = call->data;
unsigned char *dst = call->destination + (call->y * dst_stride + call->x * 4);
unsigned int k,ck,t;
@@ -175,7 +175,7 @@ static int writeData(void* _call)
}
} else
{
int y;
unsigned int y;
for (y = 0; y < call->Height; y++)
memset(call->destination + ((call->y + y) * call->destStride) + call->x * 4, 0, call->Width * 4);
}

View File

@@ -55,7 +55,7 @@
#ifdef H264_DEBUG
static short debug_level = 0;
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)
@@ -112,16 +112,14 @@ static int writeData(void* _call)
{
WriterAVCallData_t* call = (WriterAVCallData_t*) _call;
unsigned char* PacketStart = NULL;
unsigned int PacketStartSIZE = 0;
unsigned char PesHeader[PES_MAX_HEADER_SIZE];
unsigned long long int VideoPts;
unsigned int TimeDelta;
unsigned int TimeScale;
int len = 0;
static int NoOtherBeginningFound = 1;
int ic = 0;
struct iovec iov[128];
int ic = 0;
struct iovec iov[128];
h264_printf(10, "\n");
if (call == NULL)
@@ -177,10 +175,10 @@ static int writeData(void* _call)
if (initialHeader)
{
avcC_t* avcCHeader = (avcC_t*)call->private_data;
int i;
unsigned int i;
unsigned int ParamSets;
unsigned int ParamOffset;
unsigned int InitialHeaderLength = 0;
unsigned int InitialHeaderLength = 0;
unsigned int ParametersLength;
if (avcCHeader == NULL) {
@@ -319,8 +317,6 @@ static int writeData(void* _call)
NalStart += NalLength;
while (NalLength > 0) {
unsigned int PacketLength = (NalLength < BUFFER_SIZE) ? NalLength : BUFFER_SIZE;
int ExtraLength = 0;
NalLength -= PacketLength;
ic = 0;

View File

@@ -65,7 +65,7 @@
void PutBits(BitPacker_t * ld, unsigned int code, unsigned int length)
{
unsigned int bit_buf;
int bit_left;
unsigned int bit_left;
bit_buf = ld->BitBuffer;
bit_left = ld->Remaining;

View File

@@ -96,7 +96,7 @@ static int writeData(void* _call)
unsigned char PesHeader[PES_MAX_HEADER_SIZE];
int len = 0;
int Position = 0;
unsigned int Position = 0;
mpeg2_printf(10, "\n");

View File

@@ -116,7 +116,7 @@ static unsigned int breakBufferFillSize = 0;
/* MISC Functions */
/* ***************************** */
static int prepareClipPlay(int uNoOfChannels, int uSampleRate, int uBitsPerSample, int bLittleEndian)
static int prepareClipPlay(int uNoOfChannels, int uSampleRate, int uBitsPerSample, int bLittleEndian __attribute__((unused)))
{
printf("rate: %d ch: %d bits: %d (%d bps)\n",
uSampleRate/*Format->dwSamplesPerSec*/,
@@ -189,8 +189,6 @@ static int writeData(void* _call)
{
WriterAVCallData_t* call = (WriterAVCallData_t*) _call;
unsigned char PesHeader[PES_MAX_HEADER_SIZE];
pcm_printf(10, "\n");
if (call == NULL)
@@ -223,15 +221,14 @@ static int writeData(void* _call)
}
unsigned char * buffer = call->data;
int size = call->len;
unsigned int size = call->len;
//printf("PCM %d size SubFrameLen=%d\n", size, SubFrameLen);
unsigned int qty;
unsigned int n;
unsigned int injectBufferSize = sizeof(lpcm_pes) + sizeof(lpcm_prv) + SubFrameLen;
unsigned char * injectBuffer = (unsigned char *)malloc(sizeof(unsigned char)*injectBufferSize);
unsigned char * injectBufferDataPointer = &injectBuffer[sizeof(lpcm_pes)+sizeof(lpcm_prv)];
int pos;
unsigned int pos;
for(pos = 0; pos < size; )
{

View File

@@ -200,7 +200,7 @@ static int writeData(void* _call)
}
{
int i;
unsigned int i;
/* For VC1 the codec private data is a standard vc1 sequence header so we just copy it to the output */
memcpy (&PesPacket[PES_MIN_HEADER_SIZE], call->private_data, call->private_size);
@@ -217,7 +217,7 @@ static int writeData(void* _call)
}
if(call->len > 0 && call->data) {
int Position = 0;
unsigned int Position = 0;
unsigned char insertSampleHeader = 1;
while(Position < call->len) {
@@ -232,7 +232,6 @@ static int writeData(void* _call)
unsigned char PesHeader[PES_MAX_HEADER_SIZE];
memset (PesHeader, '0', PES_MAX_HEADER_SIZE);
int HeaderLength = InsertPesHeader (PesHeader, PacketLength, VC1_VIDEO_PES_START_CODE, call->Pts, 0);
unsigned char* PacketStart;
if(insertSampleHeader) {
const unsigned char Vc1FrameStartCode[] = {0, 0, 1, VC1_FRAME_START_CODE};

View File

@@ -124,7 +124,6 @@ static int writeData(void* _call)
if (initialHeader) {
unsigned char PesHeader[PES_MAX_HEADER_SIZE];
int HeaderLength;
if ((call->private_size <= 0) || (call->private_data == NULL))
{

View File

@@ -203,7 +203,7 @@ static int writeData(void* _call)
}
if(call->len > 0 && call->data) {
int Position = 0;
unsigned int Position = 0;
unsigned char insertSampleHeader = 1;
while(Position < call->len) {
@@ -217,7 +217,6 @@ static int writeData(void* _call)
unsigned char PesHeader[PES_MAX_HEADER_SIZE];
memset (PesHeader, '0', PES_MAX_HEADER_SIZE);
int HeaderLength = InsertPesHeader (PesHeader, PacketLength, VC1_VIDEO_PES_START_CODE, call->Pts, 0);
unsigned char* PacketStart;
if(insertSampleHeader) {
unsigned int PesLength;

View File

@@ -58,6 +58,32 @@ if (debug_level >= level) printf(x); } while (0)
/* Varaibles */
/* ***************************** */
static Writer_t * AvailableWriter[] = {
&WriterAudioIPCM,
&WriterAudioPCM,
&WriterAudioMP3,
&WriterAudioMPEGL3,
&WriterAudioAC3,
&WriterAudioAAC,
&WriterAudioDTS,
&WriterAudioWMA,
&WriterAudioFLAC,
&WriterAudioVORBIS,
&WriterVideoMPEG2,
&WriterVideoMPEGH264,
&WriterVideoH264,
&WriterVideoDIVX,
&WriterVideoFOURCC,
&WriterVideoMSCOMP,
&WriterVideoWMV,
&WriterVideoH263,
&WriterVideoFLV,
&WriterVideoVC1,
&WriterFramebuffer,
NULL
};
/* ***************************** */
/* Prototypes */
/* ***************************** */