mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-28 07:50:58 +02:00
libeplayer3: get rid of compiler warnings
Origin commit data
------------------
Branch: master
Commit: 9d4502b7fe
Author: martii <m4rtii@gmx.de>
Date: 2013-06-10 (Mon, 10 Jun 2013)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -44,6 +44,11 @@ if (debug_level >= level) printf(x); } while (0)
|
||||
|
||||
static const char FILENAME[] = __FILE__;
|
||||
|
||||
static Container_t * AvailableContainer[] = {
|
||||
&FFMPEGContainer,
|
||||
NULL
|
||||
};
|
||||
|
||||
static void printContainerCapabilities() {
|
||||
int i, j;
|
||||
|
||||
|
@@ -139,7 +139,7 @@ static region_t* firstRegion = NULL;
|
||||
/* MISC Functions */
|
||||
/* ***************************** */
|
||||
|
||||
void ass_msg_callback(int level, const char *format, va_list va, void *ctx)
|
||||
void ass_msg_callback(int level __attribute__((unused)), const char *format, va_list va, void *ctx __attribute__((unused)))
|
||||
{
|
||||
int n;
|
||||
char *str;
|
||||
@@ -613,7 +613,7 @@ int container_ass_init(Context_t *context)
|
||||
return cERR_CONTAINER_ASS_NO_ERROR;
|
||||
}
|
||||
|
||||
int container_ass_process_data(Context_t *context, SubtitleData_t* data)
|
||||
int container_ass_process_data(Context_t *context __attribute__((unused)), SubtitleData_t* data)
|
||||
{
|
||||
int first_kiss;
|
||||
|
||||
@@ -656,7 +656,7 @@ int container_ass_process_data(Context_t *context, SubtitleData_t* data)
|
||||
return cERR_CONTAINER_ASS_NO_ERROR;
|
||||
}
|
||||
|
||||
static int container_ass_stop(Context_t *context) {
|
||||
static int container_ass_stop(Context_t *context __attribute__((unused))) {
|
||||
int ret = cERR_CONTAINER_ASS_NO_ERROR;
|
||||
int wait_time = 20;
|
||||
Writer_t* writer;
|
||||
@@ -715,7 +715,7 @@ static int container_ass_stop(Context_t *context) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int container_ass_switch_subtitle(Context_t* context, int* arg)
|
||||
static int container_ass_switch_subtitle(Context_t* context, int* arg __attribute__((unused)))
|
||||
{
|
||||
int error;
|
||||
int ret = cERR_CONTAINER_ASS_NO_ERROR;
|
||||
|
@@ -64,7 +64,7 @@
|
||||
|
||||
#ifdef FFMPEG_DEBUG
|
||||
|
||||
static short debug_level = 0;
|
||||
static short debug_level = 10;
|
||||
|
||||
#define ffmpeg_printf(level, fmt, x...) do { \
|
||||
if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
|
||||
@@ -118,13 +118,15 @@ long long int latestPts = 0;
|
||||
static int container_ffmpeg_seek_bytes(off_t pos);
|
||||
static int container_ffmpeg_seek(Context_t *context, float sec, int absolute);
|
||||
static int container_ffmpeg_seek_rel(Context_t *context, off_t pos, long long int pts, float sec);
|
||||
#if defined(use_sec_to_seek)
|
||||
static int container_ffmpeg_seek_bytes_rel(off_t start, off_t bytes);
|
||||
#endif
|
||||
|
||||
/* ***************************** */
|
||||
/* MISC Functions */
|
||||
/* ***************************** */
|
||||
|
||||
void getMutex(const char *filename, const char *function, int line) {
|
||||
void getMutex(const char *filename __attribute__((unused)), const char *function __attribute__((unused)), int line) {
|
||||
ffmpeg_printf(100, "::%d requesting mutex\n", line);
|
||||
|
||||
pthread_mutex_lock(&mutex);
|
||||
@@ -132,7 +134,7 @@ void getMutex(const char *filename, const char *function, int line) {
|
||||
ffmpeg_printf(100, "::%d received mutex\n", line);
|
||||
}
|
||||
|
||||
void releaseMutex(const char *filename, const const char *function, int line) {
|
||||
void releaseMutex(const char *filename __attribute__((unused)), const const char *function __attribute__((unused)), int line) {
|
||||
pthread_mutex_unlock(&mutex);
|
||||
|
||||
ffmpeg_printf(100, "::%d released mutex\n", line);
|
||||
@@ -325,10 +327,13 @@ static void FFMPEGThread(Context_t *context) {
|
||||
threadname[16] = 0;
|
||||
prctl (PR_SET_NAME, (unsigned long)&threadname);
|
||||
AVPacket packet;
|
||||
off_t lastReverseSeek = 0; /* max address to read before seek again in reverse play */
|
||||
off_t lastSeek = -1;
|
||||
long long int lastPts = -1, currentVideoPts = -1, currentAudioPts = -1, showtime = 0, bofcount = 0;
|
||||
int err = 0, gotlastPts = 0, audioMute = 0;
|
||||
int err = 0, audioMute = 0;
|
||||
#ifdef reverse_playback_2
|
||||
int gotlastPts = 0;
|
||||
off_t lastReverseSeek = 0; /* max address to read before seek again in reverse play */
|
||||
#endif
|
||||
AudioVideoOut_t avOut;
|
||||
|
||||
#ifdef USE_LIBSWRESAMPLE
|
||||
@@ -476,12 +481,7 @@ static void FFMPEGThread(Context_t *context) {
|
||||
#endif
|
||||
getMutex(FILENAME, __FUNCTION__,__LINE__);
|
||||
|
||||
#define use_read_frame
|
||||
#ifdef use_read_frame
|
||||
if (av_read_frame(avContext, &packet) == 0 )
|
||||
#else
|
||||
if (av_read_packet(avContext, &packet) == 0 )
|
||||
#endif
|
||||
{
|
||||
long long int pts;
|
||||
Track_t * videoTrack = NULL;
|
||||
@@ -823,7 +823,7 @@ static void FFMPEGThread(Context_t *context) {
|
||||
ffmpeg_err("error decoding subtitle\n");
|
||||
} else
|
||||
{
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
ffmpeg_printf(0, "format %d\n", sub.format);
|
||||
ffmpeg_printf(0, "start_display_time %d\n", sub.start_display_time);
|
||||
@@ -1058,7 +1058,7 @@ int container_ffmpeg_update_tracks(Context_t *context, char *filename)
|
||||
if (terminating)
|
||||
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||
|
||||
int n;
|
||||
unsigned int n;
|
||||
|
||||
if (context->manager->audio)
|
||||
context->manager->audio->Command(context, MANAGER_DEL, NULL);
|
||||
@@ -1550,6 +1550,7 @@ static int container_ffmpeg_seek_bytes(off_t pos) {
|
||||
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||
}
|
||||
|
||||
#if defined(use_sec_to_seek)
|
||||
/* seeking relative to a given byteposition N bytes ->for reverse playback needed */
|
||||
static int container_ffmpeg_seek_bytes_rel(off_t start, off_t bytes) {
|
||||
int flag = AVSEEK_FLAG_BYTE;
|
||||
@@ -1587,6 +1588,7 @@ static int container_ffmpeg_seek_bytes_rel(off_t start, off_t bytes) {
|
||||
|
||||
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* seeking relative to a given byteposition N seconds ->for reverse playback needed */
|
||||
static int container_ffmpeg_seek_rel(Context_t *context, off_t pos, long long int pts, float sec) {
|
||||
@@ -1834,18 +1836,18 @@ static int container_ffmpeg_swich_audio(Context_t* context, int* arg)
|
||||
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||
}
|
||||
|
||||
static int container_ffmpeg_swich_subtitle(Context_t* context, int* arg)
|
||||
static int container_ffmpeg_swich_subtitle(Context_t* context __attribute__((unused)), int* arg __attribute__((unused)))
|
||||
{
|
||||
/* Hellmaster1024: nothing to do here!*/
|
||||
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||
}
|
||||
|
||||
static int container_ffmpeg_switch_dvbsubtitle(Context_t* context, int* arg)
|
||||
static int container_ffmpeg_switch_dvbsubtitle(Context_t* context __attribute__((unused)), int* arg __attribute__((unused)))
|
||||
{
|
||||
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||
}
|
||||
|
||||
static int container_ffmpeg_switch_teletext(Context_t* context, int* arg)
|
||||
static int container_ffmpeg_switch_teletext(Context_t* context __attribute__((unused)), int* arg __attribute__((unused)))
|
||||
{
|
||||
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||
}
|
||||
|
@@ -212,7 +212,7 @@ static void* SrtSubtitleThread(void *data) {
|
||||
/* Functions */
|
||||
/* ***************************** */
|
||||
|
||||
static void SrtManagerAdd(Context_t *context, SrtTrack_t track) {
|
||||
static void SrtManagerAdd(Context_t *context __attribute__((unused)), SrtTrack_t track) {
|
||||
srt_printf(10, "%s %d\n",track.File, track.Id);
|
||||
|
||||
if (Tracks == NULL) {
|
||||
@@ -226,7 +226,8 @@ static void SrtManagerAdd(Context_t *context, SrtTrack_t track) {
|
||||
}
|
||||
}
|
||||
|
||||
static char ** SrtManagerList(Context_t *context) {
|
||||
#if 0
|
||||
static char ** SrtManagerList(Context_t *context __attribute__((unused))) {
|
||||
char ** tracklist = NULL;
|
||||
|
||||
srt_printf(10, "\n");
|
||||
@@ -248,8 +249,9 @@ static char ** SrtManagerList(Context_t *context) {
|
||||
|
||||
return tracklist;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void SrtManagerDel(Context_t * context) {
|
||||
static void SrtManagerDel(Context_t * context __attribute__((unused))) {
|
||||
int i = 0;
|
||||
|
||||
srt_printf(10, "\n");
|
||||
@@ -362,11 +364,11 @@ static int SrtGetSubtitle(Context_t *context, char * Filename) {
|
||||
|
||||
SrtManagerAdd(context, SrtSubtitle);
|
||||
|
||||
Track_t Subtitle = {
|
||||
subtitleExtension,
|
||||
"S_TEXT/SRT",
|
||||
i++,
|
||||
};
|
||||
Track_t Subtitle;
|
||||
memset(&Subtitle, 0, sizeof(Subtitle));
|
||||
Subtitle.Name = subtitleExtension;
|
||||
Subtitle.Encoding = "S_TEXT/SRT";
|
||||
Subtitle.Id = i++,
|
||||
context->manager->subtitle->Command(context, MANAGER_ADD, &Subtitle);
|
||||
}
|
||||
|
||||
@@ -382,7 +384,7 @@ static int SrtGetSubtitle(Context_t *context, char * Filename) {
|
||||
return cERR_SRT_NO_ERROR;
|
||||
}
|
||||
|
||||
static int SrtOpenSubtitle(Context_t *context, int trackid) {
|
||||
static int SrtOpenSubtitle(Context_t *context __attribute__((unused)), int trackid) {
|
||||
srt_printf(10, "\n");
|
||||
|
||||
if(trackid < TEXTSRTOFFSET || (trackid % TEXTSRTOFFSET) >= TrackCount) {
|
||||
@@ -406,7 +408,7 @@ static int SrtOpenSubtitle(Context_t *context, int trackid) {
|
||||
return cERR_SRT_NO_ERROR;
|
||||
}
|
||||
|
||||
static int SrtCloseSubtitle(Context_t *context) {
|
||||
static int SrtCloseSubtitle(Context_t *context __attribute__((unused))) {
|
||||
srt_printf(10, "\n");
|
||||
|
||||
if(fsub)
|
||||
|
@@ -217,7 +217,7 @@ static void* SsaSubtitleThread(void *Data) {
|
||||
/* Functions */
|
||||
/* ***************************** */
|
||||
|
||||
static void SsaManagerAdd(Context_t *context, SsaTrack_t track) {
|
||||
static void SsaManagerAdd(Context_t *context __attribute__((unused)), SsaTrack_t track) {
|
||||
ssa_printf(10, "%s %d\n", track.File, track.Id);
|
||||
|
||||
if (Tracks == NULL) {
|
||||
@@ -231,7 +231,8 @@ static void SsaManagerAdd(Context_t *context, SsaTrack_t track) {
|
||||
}
|
||||
}
|
||||
|
||||
static char ** SsaManagerList(Context_t *context) {
|
||||
#if 0
|
||||
static char ** SsaManagerList(Context_t *context __attribute__((unused))) {
|
||||
char ** tracklist = NULL;
|
||||
|
||||
ssa_printf(10, "\n");
|
||||
@@ -251,8 +252,9 @@ static char ** SsaManagerList(Context_t *context) {
|
||||
|
||||
return tracklist;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void SsaManagerDel(Context_t * context) {
|
||||
static void SsaManagerDel(Context_t * context __attribute__((unused))) {
|
||||
int i = 0;
|
||||
|
||||
ssa_printf(10, "\n");
|
||||
@@ -364,11 +366,11 @@ static int SsaGetSubtitle(Context_t *context, char * Filename) {
|
||||
|
||||
SsaManagerAdd(context, SsaSubtitle);
|
||||
|
||||
Track_t Subtitle = {
|
||||
subtitleExtension,
|
||||
"S_TEXT/SSA",
|
||||
i++,
|
||||
};
|
||||
Track_t Subtitle;
|
||||
memset(&Subtitle, 0, sizeof(Subtitle));
|
||||
Subtitle.Name = subtitleExtension;
|
||||
Subtitle.Encoding = "S_TEXT/SSA";
|
||||
Subtitle.Id = i++;
|
||||
context->manager->subtitle->Command(context, MANAGER_ADD, &Subtitle);
|
||||
}
|
||||
|
||||
@@ -384,7 +386,7 @@ static int SsaGetSubtitle(Context_t *context, char * Filename) {
|
||||
|
||||
return cERR_SSA_NO_ERROR;
|
||||
}
|
||||
static int SsaOpenSubtitle(Context_t *context, int trackid) {
|
||||
static int SsaOpenSubtitle(Context_t *context __attribute__((unused)), int trackid) {
|
||||
ssa_printf(10, "\n");
|
||||
|
||||
if(trackid < TEXTSSAOFFSET || (trackid % TEXTSSAOFFSET) >= TrackCount ) {
|
||||
@@ -408,7 +410,7 @@ static int SsaOpenSubtitle(Context_t *context, int trackid) {
|
||||
return cERR_SSA_NO_ERROR;
|
||||
}
|
||||
|
||||
static int SsaCloseSubtitle(Context_t *context) {
|
||||
static int SsaCloseSubtitle(Context_t *context __attribute__((unused))) {
|
||||
ssa_printf(10, "\n");
|
||||
|
||||
if(fssa)
|
||||
|
Reference in New Issue
Block a user