get rid of most compiler warnings

Origin commit data
------------------
Branch: master
Commit: aca3da1f29
Author: martii <m4rtii@gmx.de>
Date: 2012-10-27 (Sat, 27 Oct 2012)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
martii
2012-10-27 18:08:29 +02:00
parent f7baf5ea30
commit e6519f45fe
12 changed files with 87 additions and 3 deletions

View File

@@ -463,6 +463,31 @@ static void ASSThread(Context_t *context) {
* so there is hopefully installed an output callback
* in the subtitle output!
*/
#ifdef MARTII
SubtitleOut_t sub_out;
sub_out.type = eSub_Gfx;
if (ass_track->events)
{
/* fixme: check values */
sub_out.pts = ass_track->events->Start * 90.0;
sub_out.duration = ass_track->events->Duration / 1000.0;
} else
{
sub_out.pts = playPts;
sub_out.duration = 10.0;
}
sub_out.u.gfx.data = img->bitmap;
sub_out.u.gfx.Width = img->w;
sub_out.u.gfx.Height = img->h;
sub_out.u.gfx.x = img->dst_x;
sub_out.u.gfx.y = img->dst_y;
if(context && context->playback && context->playback->isPlaying &&
context->output && context->output->subtitle)
context->output->subtitle->Write(context, &sub_out);
#else
SubtitleOut_t out;
out.type = eSub_Gfx;
@@ -486,6 +511,7 @@ static void ASSThread(Context_t *context) {
if(context && context->playback && context->playback->isPlaying &&
context->output && context->output->subtitle)
context->output->subtitle->Write(context, &out);
#endif
}
}

View File

@@ -116,7 +116,11 @@ void data_to_manager(Context_t *context, char* Text, unsigned long long int Pts,
SubtitleData_t data;
data.data = line;
data.len = strlen((char*)line);
#ifdef MARTII
data.extradata = (unsigned char *) DEFAULT_ASS_HEAD;
#else
data.extradata = DEFAULT_ASS_HEAD;
#endif
data.extralen = strlen(DEFAULT_ASS_HEAD);
data.pts = Pts*90;
data.duration = Duration;

View File

@@ -104,7 +104,12 @@ static int hasThreadStarted = 0;
char *SSAgetLine()
{
char *strAux = NULL, *strInput;
#ifdef MARTII
char c[SSA_BUFFER_SIZE];
int ch;
#else
char c[SSA_BUFFER_SIZE], ch;
#endif
int k, tam, tamAux;
k = tamAux = 0;
@@ -157,8 +162,13 @@ char *SSAgetLine()
/* ***************************** */
/* Worker Thread */
/* ***************************** */
#ifdef MARTII
static void* SsaSubtitleThread(void *Data) {
Context_t *context = (Context_t*) Data;
#else
static void* SsaSubtitleThread(void *data) {
Context_t *context = (Context_t*) data;
#endif
char * head =malloc(sizeof(char)*1);
ssa_printf(10, "\n");

View File

@@ -799,7 +799,11 @@ int LinuxDvbGetFrameCount(Context_t *context, unsigned long long int* frameCoun
linuxdvb_err("VIDEO_GET_PLAY_INFO: %s\n", strerror(errno));
ret = cERR_LINUXDVB_ERROR;
}
#ifdef MARTII
else linuxdvb_err("V: %llu\n", playInfo.frame_count);
#else
else linuxdvb_err("V: %ull\n", playInfo.frame_count);
#endif
}
else if (audiofd != -1)
{
@@ -809,7 +813,11 @@ int LinuxDvbGetFrameCount(Context_t *context, unsigned long long int* frameCoun
linuxdvb_err("AUDIO_GET_PLAY_INFO: %s\n", strerror(errno));
ret = cERR_LINUXDVB_ERROR;
}
#ifdef MARTII
else linuxdvb_err("A: %llu\n", playInfo.frame_count);
#else
else linuxdvb_err("A: %ull\n", playInfo.frame_count);
#endif
}
else {
ret = cERR_LINUXDVB_ERROR;

View File

@@ -277,7 +277,7 @@ int PipeSwitch(Context_t *context, char * type) {
return cERR_PIPE_NO_ERROR;
}
static int writePESDataTeletext(int fd, char *data, size_t data_len)
static int writePESDataTeletext(int fd, unsigned char *data, size_t data_len)
{
int len = 0;
if (data_len > 0) {
@@ -303,7 +303,7 @@ static int writePESDataTeletext(int fd, char *data, size_t data_len)
return len;
}
static int writePESDataDvbsubtitle(int fd, char *data, size_t data_len, int64_t pts)
static int writePESDataDvbsubtitle(int fd, unsigned char *data, size_t data_len, int64_t pts)
{
int len = 0;
if (data_len > 0) {

View File

@@ -597,7 +597,11 @@ static int Write(void* _context, void *data) {
return cERR_SUBTITLE_NO_ERROR;
}
#ifdef MARTII
static int subtitle_Open(Context_t* context) {
#else
static int subtitle_Open(context) {
#endif
int i;
subtitle_printf(10, "\n");
@@ -690,7 +694,11 @@ static int subtitle_Play(Context_t* context) {
return cERR_SUBTITLE_NO_ERROR;
}
#ifdef MARTII
static int subtitle_Stop(Context_t* context) {
#else
static int subtitle_Stop(context) {
#endif
int wait_time = 20;
int i;

View File

@@ -100,13 +100,19 @@ static int reset()
static int writeData(void* _call)
{
#ifndef MARTII
unsigned char r;
unsigned char g;
unsigned char b;
#endif
unsigned char a;
#ifndef MARTII
int x,y;
#endif
int res = 0;
#ifndef MARTII
unsigned char* dst;
#endif
WriterFBCallData_t* call = (WriterFBCallData_t*) _call;
@@ -170,6 +176,9 @@ static int writeData(void* _call)
}
} else
{
#ifdef MARTII
int y;
#endif
for (y = 0; y < call->Height; y++)
memset(call->destination + ((call->y + y) * call->destStride) + call->x * 4, 0, call->Width * 4);
}

View File

@@ -334,7 +334,9 @@ static int writeData(void* _call)
while (NalLength > 0) {
unsigned int PacketLength = (NalLength < BUFFER_SIZE) ? NalLength : BUFFER_SIZE;
int ExtraLength = 0;
#ifndef MARTII
unsigned char* PacketStart;
#endif
NalLength -= PacketLength;