mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-27 07:23:11 +02:00
libeplayer3-arm: reduce compiler warnings
This commit is contained in:
@@ -147,7 +147,7 @@ static int32_t seek_target_flag = 0;
|
||||
/* ***************************** */
|
||||
static int32_t container_ffmpeg_seek_bytes(off_t pos);
|
||||
static int32_t container_ffmpeg_seek(Context_t *context, int64_t sec, uint8_t absolute);
|
||||
static int32_t container_ffmpeg_seek_rel(Context_t *context, off_t pos, int64_t pts, int64_t sec);
|
||||
//static int32_t container_ffmpeg_seek_rel(Context_t *context, off_t pos, int64_t pts, int64_t sec);
|
||||
static int32_t container_ffmpeg_get_length(Context_t *context, int64_t *length);
|
||||
static int64_t calcPts(uint32_t avContextIdx, AVStream *stream, int64_t pts);
|
||||
|
||||
@@ -204,7 +204,7 @@ static int32_t flv2mpeg4_converter = 0;
|
||||
/* MISC Functions */
|
||||
/* ***************************** */
|
||||
|
||||
static void ffmpeg_silen_callback(void *avcl, int level, const char *fmt, va_list vl)
|
||||
static void ffmpeg_silen_callback(void *avcl __attribute__((unused)), int level __attribute__((unused)), const char *fmt __attribute__((unused)), va_list vl __attribute__((unused)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -287,7 +287,7 @@ static void initMutex(void)
|
||||
mutexInitialized = 1;
|
||||
}
|
||||
|
||||
static void getMutex(const char *filename __attribute__((unused)), const char *function __attribute__((unused)), int32_t line)
|
||||
static void getMutex(const char *filename __attribute__((unused)), const char *function __attribute__((unused)), int32_t line __attribute__((unused)))
|
||||
{
|
||||
ffmpeg_printf(100, "::%d requesting mutex\n", line);
|
||||
if (!mutexInitialized)
|
||||
@@ -298,13 +298,13 @@ static void getMutex(const char *filename __attribute__((unused)), const char *f
|
||||
ffmpeg_printf(100, "::%d received mutex\n", line);
|
||||
}
|
||||
|
||||
static void releaseMutex(const char *filename __attribute__((unused)), const const char *function __attribute__((unused)), int32_t line)
|
||||
static void releaseMutex(const char *filename __attribute__((unused)), const const char *function __attribute__((unused)), int32_t line __attribute__((unused)))
|
||||
{
|
||||
pthread_mutex_unlock(&mutex);
|
||||
ffmpeg_printf(100, "::%d released mutex\n", line);
|
||||
}
|
||||
|
||||
static char *Codec2Encoding(int32_t codec_id, int32_t media_type, uint8_t *extradata, int extradata_size, int profile, int32_t *version)
|
||||
static char *Codec2Encoding(int32_t codec_id, int32_t media_type, uint8_t *extradata, int extradata_size, int profile __attribute__((unused)), int32_t *version)
|
||||
{
|
||||
ffmpeg_printf(10, "Codec ID: %d (%.8lx)\n", codec_id, codec_id);
|
||||
switch (codec_id)
|
||||
@@ -524,8 +524,8 @@ static void FFMPEGThread(Context_t *context)
|
||||
threadname[16] = 0;
|
||||
prctl(PR_SET_NAME, (unsigned long)&threadname);
|
||||
AVPacket packet;
|
||||
off_t lastSeek = -1;
|
||||
int64_t lastPts = -1;
|
||||
//off_t lastSeek = -1;
|
||||
//int64_t lastPts = -1;
|
||||
int64_t currentVideoPts = -1;
|
||||
int64_t currentAudioPts = -1;
|
||||
/* lastVideoDts and lastAudioDts
|
||||
@@ -535,7 +535,7 @@ static void FFMPEGThread(Context_t *context)
|
||||
int64_t lastAudioDts = -1;
|
||||
int64_t showtime = 0;
|
||||
int64_t bofcount = 0;
|
||||
int32_t err = 0;
|
||||
//int32_t err = 0;
|
||||
AudioVideoOut_t avOut;
|
||||
g_context = context;
|
||||
SwrContext *swr = NULL;
|
||||
@@ -696,7 +696,7 @@ static void FFMPEGThread(Context_t *context)
|
||||
ffmpeg_err("error getting subtitle track\n");
|
||||
}
|
||||
ffmpeg_printf(200, "packet.size %d - index %d\n", packet.size, pid);
|
||||
if (videoTrack && (videoTrack->AVIdx == cAVIdx) && (videoTrack->Id == pid))
|
||||
if (videoTrack && (videoTrack->AVIdx == (int)cAVIdx) && (videoTrack->Id == pid))
|
||||
{
|
||||
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(56, 34, 100)
|
||||
AVCodecContext *codec_context = videoTrack->avCodecCtx;
|
||||
@@ -785,7 +785,7 @@ static void FFMPEGThread(Context_t *context)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (audioTrack && (audioTrack->AVIdx == cAVIdx) && (audioTrack->Id == pid))
|
||||
else if (audioTrack && (audioTrack->AVIdx == (int)cAVIdx) && (audioTrack->Id == pid))
|
||||
{
|
||||
uint8_t skipPacket = 0;
|
||||
currentAudioPts = audioTrack->pts = pts = calcPts(cAVIdx, audioTrack->stream, packet.pts);
|
||||
@@ -1070,7 +1070,7 @@ static void FFMPEGThread(Context_t *context)
|
||||
else if (subtitleTrack && (subtitleTrack->Id == pid))
|
||||
{
|
||||
int64_t duration = -1;
|
||||
int64_t pts = calcPts(cAVIdx, subtitleTrack->stream, packet.pts);
|
||||
pts = calcPts(cAVIdx, subtitleTrack->stream, packet.pts);
|
||||
AVStream *stream = subtitleTrack->stream;
|
||||
if (packet.duration != 0)
|
||||
{
|
||||
@@ -1563,7 +1563,7 @@ int32_t container_ffmpeg_init_av_context(Context_t *context, char *filename, int
|
||||
|
||||
int32_t container_ffmpeg_init(Context_t *context, PlayFiles_t *playFilesNames)
|
||||
{
|
||||
int32_t err = 0;
|
||||
//int32_t err = 0;
|
||||
ffmpeg_printf(10, ">\n");
|
||||
if (playFilesNames == NULL)
|
||||
{
|
||||
@@ -1700,7 +1700,7 @@ int32_t container_ffmpeg_update_tracks(Context_t *context, char *filename, int32
|
||||
}
|
||||
}
|
||||
}
|
||||
int32_t n = 0;
|
||||
uint32_t n = 0;
|
||||
for (n = 0; n < avContext->nb_streams; n++)
|
||||
{
|
||||
Track_t track;
|
||||
@@ -2281,7 +2281,7 @@ static int32_t container_ffmpeg_seek_bytes(off_t pos)
|
||||
ffmpeg_printf(30, "current_pos after seek %lld\n", avio_tell(avContextTab[0]->pb));
|
||||
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||
}
|
||||
|
||||
#if 0 //unused
|
||||
/* seeking relative to a given byteposition N seconds ->for reverse playback needed */
|
||||
static int32_t container_ffmpeg_seek_rel(Context_t *context, off_t pos, int64_t pts, int64_t sec)
|
||||
{
|
||||
@@ -2357,12 +2357,12 @@ static int32_t container_ffmpeg_seek_rel(Context_t *context, off_t pos, int64_t
|
||||
releaseMutex(__FILE__, __FUNCTION__, __LINE__);
|
||||
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||
}
|
||||
|
||||
#endif
|
||||
static int32_t container_ffmpeg_seek(Context_t *context, int64_t sec, uint8_t absolute)
|
||||
{
|
||||
Track_t *videoTrack = NULL;
|
||||
Track_t *audioTrack = NULL;
|
||||
Track_t *current = NULL;
|
||||
// Track_t *current = NULL;
|
||||
seek_target_flag = 0;
|
||||
if (!absolute)
|
||||
{
|
||||
@@ -2391,6 +2391,13 @@ static int32_t container_ffmpeg_seek(Context_t *context, int64_t sec, uint8_t ab
|
||||
}
|
||||
context->manager->video->Command(context, MANAGER_GET_TRACK, &videoTrack);
|
||||
context->manager->audio->Command(context, MANAGER_GET_TRACK, &audioTrack);
|
||||
if (!videoTrack && !audioTrack)
|
||||
{
|
||||
ffmpeg_err("no track available to seek\n");
|
||||
return cERR_CONTAINER_FFMPEG_ERR;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (videoTrack != NULL)
|
||||
{
|
||||
current = videoTrack;
|
||||
@@ -2404,6 +2411,8 @@ static int32_t container_ffmpeg_seek(Context_t *context, int64_t sec, uint8_t ab
|
||||
ffmpeg_err("no track available to seek\n");
|
||||
return cERR_CONTAINER_FFMPEG_ERR;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (sec < 0)
|
||||
{
|
||||
seek_target_flag |= AVSEEK_FLAG_BACKWARD;
|
||||
@@ -2502,7 +2511,7 @@ static int32_t container_ffmpeg_get_length(Context_t *context, int64_t *length)
|
||||
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||
}
|
||||
|
||||
static int32_t container_ffmpeg_switch_audio(Context_t *context, int32_t *arg)
|
||||
static int32_t container_ffmpeg_switch_audio(Context_t *context, int32_t *arg __attribute__((unused)))
|
||||
{
|
||||
ffmpeg_printf(10, "track %d\n", *arg);
|
||||
/* Hellmaster1024: nothing to do here! */
|
||||
@@ -2511,7 +2520,7 @@ static int32_t container_ffmpeg_switch_audio(Context_t *context, int32_t *arg)
|
||||
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||
}
|
||||
|
||||
static int32_t container_ffmpeg_switch_subtitle(Context_t *context, int32_t *arg)
|
||||
static int32_t container_ffmpeg_switch_subtitle(Context_t *context, int32_t *arg __attribute__((unused)))
|
||||
{
|
||||
ffmpeg_printf(10, "track %d\n", *arg);
|
||||
/* This is made to flush inside the buffer because
|
||||
|
Reference in New Issue
Block a user