mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 23:12:44 +02:00
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:
@@ -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;
|
||||||
|
|
||||||
|
@@ -367,7 +367,9 @@ bool cDemux::sectionFilter(unsigned short pid, const unsigned char * const filte
|
|||||||
const unsigned char * const mask, int len, int timeout,
|
const unsigned char * const mask, int len, int timeout,
|
||||||
const unsigned char * const negmask)
|
const unsigned char * const negmask)
|
||||||
{
|
{
|
||||||
|
#ifndef MARTII
|
||||||
int length = len;
|
int length = len;
|
||||||
|
#endif
|
||||||
memset(&s_flt, 0, sizeof(s_flt));
|
memset(&s_flt, 0, sizeof(s_flt));
|
||||||
|
|
||||||
_open();
|
_open();
|
||||||
@@ -375,7 +377,11 @@ bool cDemux::sectionFilter(unsigned short pid, const unsigned char * const filte
|
|||||||
if (len > DMX_FILTER_SIZE)
|
if (len > DMX_FILTER_SIZE)
|
||||||
{
|
{
|
||||||
lt_info("%s #%d: len too long: %d, DMX_FILTER_SIZE %d\n", __func__, num, len, DMX_FILTER_SIZE);
|
lt_info("%s #%d: len too long: %d, DMX_FILTER_SIZE %d\n", __func__, num, len, DMX_FILTER_SIZE);
|
||||||
|
#ifdef MARTII
|
||||||
|
len = DMX_FILTER_SIZE;
|
||||||
|
#else
|
||||||
length = DMX_FILTER_SIZE;
|
length = DMX_FILTER_SIZE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
s_flt.pid = pid;
|
s_flt.pid = pid;
|
||||||
s_flt.timeout = timeout;
|
s_flt.timeout = timeout;
|
||||||
@@ -547,9 +553,13 @@ void *cDemux::getChannel()
|
|||||||
bool cDemux::addPid(unsigned short Pid)
|
bool cDemux::addPid(unsigned short Pid)
|
||||||
{
|
{
|
||||||
lt_debug("%s: pid 0x%04hx\n", __func__, Pid);
|
lt_debug("%s: pid 0x%04hx\n", __func__, Pid);
|
||||||
|
#ifndef MARTII
|
||||||
pes_pids pfd;
|
pes_pids pfd;
|
||||||
|
#endif
|
||||||
int ret;
|
int ret;
|
||||||
|
#ifndef MARTII
|
||||||
struct dmx_pes_filter_params p;
|
struct dmx_pes_filter_params p;
|
||||||
|
#endif
|
||||||
if (dmx_type != DMX_TP_CHANNEL)
|
if (dmx_type != DMX_TP_CHANNEL)
|
||||||
{
|
{
|
||||||
lt_info("%s pes_type %s not implemented yet! pid=%hx\n", __FUNCTION__, DMX_T[dmx_type], Pid);
|
lt_info("%s pes_type %s not implemented yet! pid=%hx\n", __FUNCTION__, DMX_T[dmx_type], Pid);
|
||||||
|
@@ -532,7 +532,11 @@ void cPlayback::FindAllDvbsubtitlePids(uint16_t *pids, uint16_t *numpids, std::s
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
|
#ifdef MARTII
|
||||||
|
cPlayback::cPlayback(int num __attribute__((unused)))
|
||||||
|
#else
|
||||||
cPlayback::cPlayback(int num)
|
cPlayback::cPlayback(int num)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
printf("%s:%s\n", FILENAME, __FUNCTION__);
|
printf("%s:%s\n", FILENAME, __FUNCTION__);
|
||||||
playing=false;
|
playing=false;
|
||||||
|
@@ -26,6 +26,7 @@ unsigned long cCpuFreqManager::GetCpuFreq(void) {
|
|||||||
fclose(pll0);
|
fclose(pll0);
|
||||||
return 1000 * 1000 * (unsigned long) freq;
|
return 1000 * 1000 * (unsigned long) freq;
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
unsigned long cCpuFreqManager::GetCpuFreq(void) { lt_debug("%s\n", __FUNCTION__); return 0; }
|
unsigned long cCpuFreqManager::GetCpuFreq(void) { lt_debug("%s\n", __FUNCTION__); return 0; }
|
||||||
@@ -53,7 +54,7 @@ bool cCpuFreqManager::SetCpuFreq(unsigned long f)
|
|||||||
FILE *pll0 = fopen ("/proc/cpu_frequ/pll0_ndiv_mdiv", "w");
|
FILE *pll0 = fopen ("/proc/cpu_frequ/pll0_ndiv_mdiv", "w");
|
||||||
if (pll0) {
|
if (pll0) {
|
||||||
f /= 1000000;
|
f /= 1000000;
|
||||||
fprintf(pll0, "%d\n", f/10 * 256 + 3);
|
fprintf(pll0, "%lu\n", f/10 * 256 + 3);
|
||||||
fclose (pll0);
|
fclose (pll0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -499,7 +499,9 @@ int cVideo::getBlank(void)
|
|||||||
size_t n = 0;
|
size_t n = 0;
|
||||||
ssize_t r;
|
ssize_t r;
|
||||||
char *line = NULL;
|
char *line = NULL;
|
||||||
|
#ifndef MARTII
|
||||||
char *p;
|
char *p;
|
||||||
|
#endif
|
||||||
/* hack: the "mailbox" irq is not increasing if
|
/* hack: the "mailbox" irq is not increasing if
|
||||||
* no audio or video is decoded... */
|
* no audio or video is decoded... */
|
||||||
FILE *f = fopen("/proc/interrupts", "r");
|
FILE *f = fopen("/proc/interrupts", "r");
|
||||||
|
Reference in New Issue
Block a user