mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-27 15:33:00 +02:00
get rid of most compiler warnings
This commit is contained in:
@@ -463,6 +463,31 @@ static void ASSThread(Context_t *context) {
|
|||||||
* so there is hopefully installed an output callback
|
* so there is hopefully installed an output callback
|
||||||
* in the subtitle output!
|
* 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;
|
SubtitleOut_t out;
|
||||||
|
|
||||||
out.type = eSub_Gfx;
|
out.type = eSub_Gfx;
|
||||||
@@ -486,6 +511,7 @@ static void ASSThread(Context_t *context) {
|
|||||||
if(context && context->playback && context->playback->isPlaying &&
|
if(context && context->playback && context->playback->isPlaying &&
|
||||||
context->output && context->output->subtitle)
|
context->output && context->output->subtitle)
|
||||||
context->output->subtitle->Write(context, &out);
|
context->output->subtitle->Write(context, &out);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -116,7 +116,11 @@ void data_to_manager(Context_t *context, char* Text, unsigned long long int Pts,
|
|||||||
SubtitleData_t data;
|
SubtitleData_t data;
|
||||||
data.data = line;
|
data.data = line;
|
||||||
data.len = strlen((char*)line);
|
data.len = strlen((char*)line);
|
||||||
|
#ifdef MARTII
|
||||||
|
data.extradata = (unsigned char *) DEFAULT_ASS_HEAD;
|
||||||
|
#else
|
||||||
data.extradata = DEFAULT_ASS_HEAD;
|
data.extradata = DEFAULT_ASS_HEAD;
|
||||||
|
#endif
|
||||||
data.extralen = strlen(DEFAULT_ASS_HEAD);
|
data.extralen = strlen(DEFAULT_ASS_HEAD);
|
||||||
data.pts = Pts*90;
|
data.pts = Pts*90;
|
||||||
data.duration = Duration;
|
data.duration = Duration;
|
||||||
|
@@ -104,7 +104,12 @@ static int hasThreadStarted = 0;
|
|||||||
char *SSAgetLine()
|
char *SSAgetLine()
|
||||||
{
|
{
|
||||||
char *strAux = NULL, *strInput;
|
char *strAux = NULL, *strInput;
|
||||||
|
#ifdef MARTII
|
||||||
|
char c[SSA_BUFFER_SIZE];
|
||||||
|
int ch;
|
||||||
|
#else
|
||||||
char c[SSA_BUFFER_SIZE], ch;
|
char c[SSA_BUFFER_SIZE], ch;
|
||||||
|
#endif
|
||||||
int k, tam, tamAux;
|
int k, tam, tamAux;
|
||||||
|
|
||||||
k = tamAux = 0;
|
k = tamAux = 0;
|
||||||
@@ -157,8 +162,13 @@ char *SSAgetLine()
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Worker Thread */
|
/* Worker Thread */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
#ifdef MARTII
|
||||||
|
static void* SsaSubtitleThread(void *Data) {
|
||||||
|
Context_t *context = (Context_t*) Data;
|
||||||
|
#else
|
||||||
static void* SsaSubtitleThread(void *data) {
|
static void* SsaSubtitleThread(void *data) {
|
||||||
Context_t *context = (Context_t*) data;
|
Context_t *context = (Context_t*) data;
|
||||||
|
#endif
|
||||||
char * head =malloc(sizeof(char)*1);
|
char * head =malloc(sizeof(char)*1);
|
||||||
|
|
||||||
ssa_printf(10, "\n");
|
ssa_printf(10, "\n");
|
||||||
|
@@ -799,7 +799,11 @@ int LinuxDvbGetFrameCount(Context_t *context, unsigned long long int* frameCoun
|
|||||||
linuxdvb_err("VIDEO_GET_PLAY_INFO: %s\n", strerror(errno));
|
linuxdvb_err("VIDEO_GET_PLAY_INFO: %s\n", strerror(errno));
|
||||||
ret = cERR_LINUXDVB_ERROR;
|
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);
|
else linuxdvb_err("V: %ull\n", playInfo.frame_count);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else if (audiofd != -1)
|
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));
|
linuxdvb_err("AUDIO_GET_PLAY_INFO: %s\n", strerror(errno));
|
||||||
ret = cERR_LINUXDVB_ERROR;
|
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);
|
else linuxdvb_err("A: %ull\n", playInfo.frame_count);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ret = cERR_LINUXDVB_ERROR;
|
ret = cERR_LINUXDVB_ERROR;
|
||||||
|
@@ -277,7 +277,7 @@ int PipeSwitch(Context_t *context, char * type) {
|
|||||||
return cERR_PIPE_NO_ERROR;
|
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;
|
int len = 0;
|
||||||
if (data_len > 0) {
|
if (data_len > 0) {
|
||||||
@@ -303,7 +303,7 @@ static int writePESDataTeletext(int fd, char *data, size_t data_len)
|
|||||||
return 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;
|
int len = 0;
|
||||||
if (data_len > 0) {
|
if (data_len > 0) {
|
||||||
|
@@ -597,7 +597,11 @@ static int Write(void* _context, void *data) {
|
|||||||
return cERR_SUBTITLE_NO_ERROR;
|
return cERR_SUBTITLE_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MARTII
|
||||||
|
static int subtitle_Open(Context_t* context) {
|
||||||
|
#else
|
||||||
static int subtitle_Open(context) {
|
static int subtitle_Open(context) {
|
||||||
|
#endif
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
subtitle_printf(10, "\n");
|
subtitle_printf(10, "\n");
|
||||||
@@ -690,7 +694,11 @@ static int subtitle_Play(Context_t* context) {
|
|||||||
return cERR_SUBTITLE_NO_ERROR;
|
return cERR_SUBTITLE_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MARTII
|
||||||
|
static int subtitle_Stop(Context_t* context) {
|
||||||
|
#else
|
||||||
static int subtitle_Stop(context) {
|
static int subtitle_Stop(context) {
|
||||||
|
#endif
|
||||||
int wait_time = 20;
|
int wait_time = 20;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@@ -100,13 +100,19 @@ static int reset()
|
|||||||
|
|
||||||
static int writeData(void* _call)
|
static int writeData(void* _call)
|
||||||
{
|
{
|
||||||
|
#ifndef MARTII
|
||||||
unsigned char r;
|
unsigned char r;
|
||||||
unsigned char g;
|
unsigned char g;
|
||||||
unsigned char b;
|
unsigned char b;
|
||||||
|
#endif
|
||||||
unsigned char a;
|
unsigned char a;
|
||||||
|
#ifndef MARTII
|
||||||
int x,y;
|
int x,y;
|
||||||
|
#endif
|
||||||
int res = 0;
|
int res = 0;
|
||||||
|
#ifndef MARTII
|
||||||
unsigned char* dst;
|
unsigned char* dst;
|
||||||
|
#endif
|
||||||
|
|
||||||
WriterFBCallData_t* call = (WriterFBCallData_t*) _call;
|
WriterFBCallData_t* call = (WriterFBCallData_t*) _call;
|
||||||
|
|
||||||
@@ -170,6 +176,9 @@ static int writeData(void* _call)
|
|||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
|
#ifdef MARTII
|
||||||
|
int y;
|
||||||
|
#endif
|
||||||
for (y = 0; y < call->Height; y++)
|
for (y = 0; y < call->Height; y++)
|
||||||
memset(call->destination + ((call->y + y) * call->destStride) + call->x * 4, 0, call->Width * 4);
|
memset(call->destination + ((call->y + y) * call->destStride) + call->x * 4, 0, call->Width * 4);
|
||||||
}
|
}
|
||||||
|
@@ -334,7 +334,9 @@ static int writeData(void* _call)
|
|||||||
while (NalLength > 0) {
|
while (NalLength > 0) {
|
||||||
unsigned int PacketLength = (NalLength < BUFFER_SIZE) ? NalLength : BUFFER_SIZE;
|
unsigned int PacketLength = (NalLength < BUFFER_SIZE) ? NalLength : BUFFER_SIZE;
|
||||||
int ExtraLength = 0;
|
int ExtraLength = 0;
|
||||||
|
#ifndef MARTII
|
||||||
unsigned char* PacketStart;
|
unsigned char* PacketStart;
|
||||||
|
#endif
|
||||||
|
|
||||||
NalLength -= PacketLength;
|
NalLength -= PacketLength;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user