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:
martii
2013-06-10 15:06:00 +02:00
parent 3cdf749527
commit fa45cac121
32 changed files with 148 additions and 154 deletions

View File

@@ -21,9 +21,9 @@ AM_CFLAGS = -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOUR
# get rid of many warnings. This is not my project, so fixing them is not # get rid of many warnings. This is not my project, so fixing them is not
# top priority # top priority
AM_CFLAGS += \ #AM_CFLAGS += \
-Wno-unused -Wno-unused-parameter -Wno-unused-function -Wno-unused-variable \ # -Wno-unused -Wno-unused-parameter -Wno-unused-function -Wno-unused-variable \
-Wno-sign-compare -Wno-missing-field-initializers # -Wno-sign-compare -Wno-missing-field-initializers
# silence ffmpeg deprecation warnings # silence ffmpeg deprecation warnings
#AM_CPPFLAGS = -Dattribute_deprecated='' #AM_CPPFLAGS = -Dattribute_deprecated=''

View File

@@ -44,6 +44,11 @@ if (debug_level >= level) printf(x); } while (0)
static const char FILENAME[] = __FILE__; static const char FILENAME[] = __FILE__;
static Container_t * AvailableContainer[] = {
&FFMPEGContainer,
NULL
};
static void printContainerCapabilities() { static void printContainerCapabilities() {
int i, j; int i, j;

View File

@@ -139,7 +139,7 @@ static region_t* firstRegion = NULL;
/* MISC Functions */ /* 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; int n;
char *str; char *str;
@@ -613,7 +613,7 @@ int container_ass_init(Context_t *context)
return cERR_CONTAINER_ASS_NO_ERROR; 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; int first_kiss;
@@ -656,7 +656,7 @@ int container_ass_process_data(Context_t *context, SubtitleData_t* data)
return cERR_CONTAINER_ASS_NO_ERROR; 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 ret = cERR_CONTAINER_ASS_NO_ERROR;
int wait_time = 20; int wait_time = 20;
Writer_t* writer; Writer_t* writer;
@@ -715,7 +715,7 @@ static int container_ass_stop(Context_t *context) {
return ret; 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 error;
int ret = cERR_CONTAINER_ASS_NO_ERROR; int ret = cERR_CONTAINER_ASS_NO_ERROR;

View File

@@ -64,7 +64,7 @@
#ifdef FFMPEG_DEBUG #ifdef FFMPEG_DEBUG
static short debug_level = 0; static short debug_level = 10;
#define ffmpeg_printf(level, fmt, x...) do { \ #define ffmpeg_printf(level, fmt, x...) do { \
if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) 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_bytes(off_t pos);
static int container_ffmpeg_seek(Context_t *context, float sec, int absolute); 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); 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); static int container_ffmpeg_seek_bytes_rel(off_t start, off_t bytes);
#endif
/* ***************************** */ /* ***************************** */
/* MISC Functions */ /* 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); ffmpeg_printf(100, "::%d requesting mutex\n", line);
pthread_mutex_lock(&mutex); 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); 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); pthread_mutex_unlock(&mutex);
ffmpeg_printf(100, "::%d released mutex\n", line); ffmpeg_printf(100, "::%d released mutex\n", line);
@@ -325,10 +327,13 @@ static void FFMPEGThread(Context_t *context) {
threadname[16] = 0; threadname[16] = 0;
prctl (PR_SET_NAME, (unsigned long)&threadname); prctl (PR_SET_NAME, (unsigned long)&threadname);
AVPacket packet; AVPacket packet;
off_t lastReverseSeek = 0; /* max address to read before seek again in reverse play */
off_t lastSeek = -1; off_t lastSeek = -1;
long long int lastPts = -1, currentVideoPts = -1, currentAudioPts = -1, showtime = 0, bofcount = 0; 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; AudioVideoOut_t avOut;
#ifdef USE_LIBSWRESAMPLE #ifdef USE_LIBSWRESAMPLE
@@ -476,12 +481,7 @@ static void FFMPEGThread(Context_t *context) {
#endif #endif
getMutex(FILENAME, __FUNCTION__,__LINE__); getMutex(FILENAME, __FUNCTION__,__LINE__);
#define use_read_frame
#ifdef use_read_frame
if (av_read_frame(avContext, &packet) == 0 ) if (av_read_frame(avContext, &packet) == 0 )
#else
if (av_read_packet(avContext, &packet) == 0 )
#endif
{ {
long long int pts; long long int pts;
Track_t * videoTrack = NULL; Track_t * videoTrack = NULL;
@@ -823,7 +823,7 @@ static void FFMPEGThread(Context_t *context) {
ffmpeg_err("error decoding subtitle\n"); ffmpeg_err("error decoding subtitle\n");
} else } else
{ {
int i; unsigned int i;
ffmpeg_printf(0, "format %d\n", sub.format); ffmpeg_printf(0, "format %d\n", sub.format);
ffmpeg_printf(0, "start_display_time %d\n", sub.start_display_time); 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) if (terminating)
return cERR_CONTAINER_FFMPEG_NO_ERROR; return cERR_CONTAINER_FFMPEG_NO_ERROR;
int n; unsigned int n;
if (context->manager->audio) if (context->manager->audio)
context->manager->audio->Command(context, MANAGER_DEL, NULL); 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; return cERR_CONTAINER_FFMPEG_NO_ERROR;
} }
#if defined(use_sec_to_seek)
/* seeking relative to a given byteposition N bytes ->for reverse playback needed */ /* 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) { static int container_ffmpeg_seek_bytes_rel(off_t start, off_t bytes) {
int flag = AVSEEK_FLAG_BYTE; 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; return cERR_CONTAINER_FFMPEG_NO_ERROR;
} }
#endif
/* seeking relative to a given byteposition N seconds ->for reverse playback needed */ /* 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) { 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; 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!*/ /* Hellmaster1024: nothing to do here!*/
return cERR_CONTAINER_FFMPEG_NO_ERROR; 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; 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; return cERR_CONTAINER_FFMPEG_NO_ERROR;
} }

View File

@@ -212,7 +212,7 @@ static void* SrtSubtitleThread(void *data) {
/* Functions */ /* 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); srt_printf(10, "%s %d\n",track.File, track.Id);
if (Tracks == NULL) { 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; char ** tracklist = NULL;
srt_printf(10, "\n"); srt_printf(10, "\n");
@@ -248,8 +249,9 @@ static char ** SrtManagerList(Context_t *context) {
return tracklist; return tracklist;
} }
#endif
static void SrtManagerDel(Context_t * context) { static void SrtManagerDel(Context_t * context __attribute__((unused))) {
int i = 0; int i = 0;
srt_printf(10, "\n"); srt_printf(10, "\n");
@@ -362,11 +364,11 @@ static int SrtGetSubtitle(Context_t *context, char * Filename) {
SrtManagerAdd(context, SrtSubtitle); SrtManagerAdd(context, SrtSubtitle);
Track_t Subtitle = { Track_t Subtitle;
subtitleExtension, memset(&Subtitle, 0, sizeof(Subtitle));
"S_TEXT/SRT", Subtitle.Name = subtitleExtension;
i++, Subtitle.Encoding = "S_TEXT/SRT";
}; Subtitle.Id = i++,
context->manager->subtitle->Command(context, MANAGER_ADD, &Subtitle); 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; 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"); srt_printf(10, "\n");
if(trackid < TEXTSRTOFFSET || (trackid % TEXTSRTOFFSET) >= TrackCount) { if(trackid < TEXTSRTOFFSET || (trackid % TEXTSRTOFFSET) >= TrackCount) {
@@ -406,7 +408,7 @@ static int SrtOpenSubtitle(Context_t *context, int trackid) {
return cERR_SRT_NO_ERROR; return cERR_SRT_NO_ERROR;
} }
static int SrtCloseSubtitle(Context_t *context) { static int SrtCloseSubtitle(Context_t *context __attribute__((unused))) {
srt_printf(10, "\n"); srt_printf(10, "\n");
if(fsub) if(fsub)

View File

@@ -217,7 +217,7 @@ static void* SsaSubtitleThread(void *Data) {
/* Functions */ /* 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); ssa_printf(10, "%s %d\n", track.File, track.Id);
if (Tracks == NULL) { 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; char ** tracklist = NULL;
ssa_printf(10, "\n"); ssa_printf(10, "\n");
@@ -251,8 +252,9 @@ static char ** SsaManagerList(Context_t *context) {
return tracklist; return tracklist;
} }
#endif
static void SsaManagerDel(Context_t * context) { static void SsaManagerDel(Context_t * context __attribute__((unused))) {
int i = 0; int i = 0;
ssa_printf(10, "\n"); ssa_printf(10, "\n");
@@ -364,11 +366,11 @@ static int SsaGetSubtitle(Context_t *context, char * Filename) {
SsaManagerAdd(context, SsaSubtitle); SsaManagerAdd(context, SsaSubtitle);
Track_t Subtitle = { Track_t Subtitle;
subtitleExtension, memset(&Subtitle, 0, sizeof(Subtitle));
"S_TEXT/SSA", Subtitle.Name = subtitleExtension;
i++, Subtitle.Encoding = "S_TEXT/SSA";
}; Subtitle.Id = i++;
context->manager->subtitle->Command(context, MANAGER_ADD, &Subtitle); 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; 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"); ssa_printf(10, "\n");
if(trackid < TEXTSSAOFFSET || (trackid % TEXTSSAOFFSET) >= TrackCount ) { if(trackid < TEXTSSAOFFSET || (trackid % TEXTSSAOFFSET) >= TrackCount ) {
@@ -408,7 +410,7 @@ static int SsaOpenSubtitle(Context_t *context, int trackid) {
return cERR_SSA_NO_ERROR; return cERR_SSA_NO_ERROR;
} }
static int SsaCloseSubtitle(Context_t *context) { static int SsaCloseSubtitle(Context_t *context __attribute__((unused))) {
ssa_printf(10, "\n"); ssa_printf(10, "\n");
if(fssa) if(fssa)

View File

@@ -33,11 +33,6 @@ typedef struct Container_s {
extern Container_t FFMPEGContainer; extern Container_t FFMPEGContainer;
static Container_t * AvailableContainer[] = {
&FFMPEGContainer,
NULL
};
typedef struct ContainerHandler_s { typedef struct ContainerHandler_s {
char * Name; char * Name;
Container_t * selectedContainer; Container_t * selectedContainer;

View File

@@ -116,7 +116,7 @@ static inline char * basename(char * name)
static inline char * dirname(char * name) static inline char * dirname(char * name)
{ {
static char path[100]; static char path[100];
int i = 0; unsigned int i = 0;
int pos = 0; int pos = 0;
while((name[i] != 0) && (i < sizeof(path))) while((name[i] != 0) && (i < sizeof(path)))

View File

@@ -63,13 +63,6 @@ extern Output_t LinuxDvbOutput;
extern Output_t SubtitleOutput; extern Output_t SubtitleOutput;
extern Output_t PipeOutput; extern Output_t PipeOutput;
static Output_t * AvailableOutput[] = {
&LinuxDvbOutput,
&SubtitleOutput,
&PipeOutput,
NULL
};
typedef struct OutputHandler_s { typedef struct OutputHandler_s {
char * Name; char * Name;
Output_t * audio; Output_t * audio;

View File

@@ -77,32 +77,6 @@ extern Writer_t WriterFramebuffer;
extern Writer_t WriterPipe; extern Writer_t WriterPipe;
extern Writer_t WriterDVBSubtitle; extern Writer_t WriterDVBSubtitle;
static Writer_t * AvailableWriter[] = {
&WriterAudioIPCM,
&WriterAudioPCM,
&WriterAudioMP3,
&WriterAudioMPEGL3,
&WriterAudioAC3,
&WriterAudioAAC,
&WriterAudioDTS,
&WriterAudioWMA,
&WriterAudioFLAC,
&WriterAudioVORBIS,
&WriterVideoMPEG2,
&WriterVideoMPEGH264,
&WriterVideoH264,
&WriterVideoDIVX,
&WriterVideoFOURCC,
&WriterVideoMSCOMP,
&WriterVideoWMV,
&WriterVideoH263,
&WriterVideoFLV,
&WriterVideoVC1,
&WriterFramebuffer,
NULL
};
Writer_t* getWriter(char* encoding); Writer_t* getWriter(char* encoding);
Writer_t* getDefaultVideoWriter(); Writer_t* getDefaultVideoWriter();

View File

@@ -107,7 +107,7 @@ static int ManagerAdd(Context_t *context, Track_t track) {
return cERR_AUDIO_MGR_NO_ERROR; return cERR_AUDIO_MGR_NO_ERROR;
} }
static char ** ManagerList(Context_t *context) { static char ** ManagerList(Context_t *context __attribute__((unused))) {
int i = 0, j = 0; int i = 0, j = 0;
char ** tracklist = NULL; char ** tracklist = NULL;

View File

@@ -107,7 +107,7 @@ static int ManagerAdd(Context_t *context, Track_t track) {
return cERR_DVBSUBTITLE_MGR_NO_ERROR; return cERR_DVBSUBTITLE_MGR_NO_ERROR;
} }
static char ** ManagerList(Context_t *context) { static char ** ManagerList(Context_t *context __attribute__((unused))) {
int i = 0, j = 0; int i = 0, j = 0;
char ** tracklist = NULL; char ** tracklist = NULL;

View File

@@ -107,7 +107,7 @@ static int ManagerAdd(Context_t *context, Track_t track) {
return cERR_SUBTITLE_MGR_NO_ERROR; return cERR_SUBTITLE_MGR_NO_ERROR;
} }
static char ** ManagerList(Context_t *context) { static char ** ManagerList(Context_t *context __attribute__((unused))) {
char ** tracklist = NULL; char ** tracklist = NULL;
int i = 0, j = 0; int i = 0, j = 0;

View File

@@ -107,14 +107,13 @@ static int ManagerAdd(Context_t *context, Track_t track) {
return cERR_TELETEXT_MGR_NO_ERROR; return cERR_TELETEXT_MGR_NO_ERROR;
} }
static char ** ManagerList(Context_t *context) { static char ** ManagerList(Context_t *context __attribute__((unused))) {
int i = 0, j = 0; int i = 0, j = 0;
char ** tracklist = NULL; char ** tracklist = NULL;
teletext_mgr_printf(10, "%s::%s\n", FILENAME, __FUNCTION__); teletext_mgr_printf(10, "%s::%s\n", FILENAME, __FUNCTION__);
if (Tracks != NULL) { if (Tracks != NULL) {
char tmp[30];
tracklist = malloc(sizeof(char *) * ((TrackCount*2) + 1)); tracklist = malloc(sizeof(char *) * ((TrackCount*2) + 1));
if (tracklist == NULL) if (tracklist == NULL)

View File

@@ -106,7 +106,7 @@ static int ManagerAdd(Context_t *context, Track_t track) {
return cERR_VIDEO_MGR_NO_ERROR; return cERR_VIDEO_MGR_NO_ERROR;
} }
static char ** ManagerList(Context_t *context) { static char ** ManagerList(Context_t *context __attribute__((unused))) {
int i = 0, j = 0; int i = 0, j = 0;
char ** tracklist = NULL; char ** tracklist = NULL;

View File

@@ -88,7 +88,7 @@ int LinuxDvbStop(Context_t *context, char * type);
/* MISC Functions */ /* MISC Functions */
/* ***************************** */ /* ***************************** */
void getLinuxDVBMutex(const char *filename, const char *function, int line) { void getLinuxDVBMutex(const char *filename __attribute__((unused)), const char *function __attribute__((unused)), int line __attribute__((unused))) {
linuxdvb_printf(250, "requesting mutex\n"); linuxdvb_printf(250, "requesting mutex\n");
@@ -97,14 +97,14 @@ void getLinuxDVBMutex(const char *filename, const char *function, int line) {
linuxdvb_printf(250, "received mutex\n"); linuxdvb_printf(250, "received mutex\n");
} }
void releaseLinuxDVBMutex(const char *filename, const char *function, int line) { void releaseLinuxDVBMutex(const char *filename __attribute__((unused)), const char *function __attribute__((unused)), int line __attribute__((unused))) {
pthread_mutex_unlock(&LinuxDVBmutex); pthread_mutex_unlock(&LinuxDVBmutex);
linuxdvb_printf(250, "released mutex\n"); linuxdvb_printf(250, "released mutex\n");
} }
int LinuxDvbOpen(Context_t *context, char * type) { int LinuxDvbOpen(Context_t *context __attribute__((unused)), char * type) {
unsigned char video = !strcmp("video", type); unsigned char video = !strcmp("video", type);
unsigned char audio = !strcmp("audio", type); unsigned char audio = !strcmp("audio", type);
@@ -292,7 +292,7 @@ int LinuxDvbPlay(Context_t *context, char * type) {
return ret; return ret;
} }
int LinuxDvbStop(Context_t *context, char * type) { int LinuxDvbStop(Context_t *context __attribute__((unused)), char * type) {
int ret = cERR_LINUXDVB_NO_ERROR; int ret = cERR_LINUXDVB_NO_ERROR;
unsigned char video = !strcmp("video", type); unsigned char video = !strcmp("video", type);
unsigned char audio = !strcmp("audio", type); unsigned char audio = !strcmp("audio", type);
@@ -349,7 +349,7 @@ int LinuxDvbStop(Context_t *context, char * type) {
return ret; return ret;
} }
int LinuxDvbPause(Context_t *context, char * type) { int LinuxDvbPause(Context_t *context __attribute__((unused)), char * type) {
int ret = cERR_LINUXDVB_NO_ERROR; int ret = cERR_LINUXDVB_NO_ERROR;
unsigned char video = !strcmp("video", type); unsigned char video = !strcmp("video", type);
unsigned char audio = !strcmp("audio", type); unsigned char audio = !strcmp("audio", type);
@@ -380,7 +380,7 @@ int LinuxDvbPause(Context_t *context, char * type) {
return ret; return ret;
} }
int LinuxDvbContinue(Context_t *context, char * type) { int LinuxDvbContinue(Context_t *context __attribute__((unused)), char * type) {
int ret = cERR_LINUXDVB_NO_ERROR; int ret = cERR_LINUXDVB_NO_ERROR;
unsigned char video = !strcmp("video", type); unsigned char video = !strcmp("video", type);
unsigned char audio = !strcmp("audio", type); unsigned char audio = !strcmp("audio", type);
@@ -410,7 +410,7 @@ int LinuxDvbContinue(Context_t *context, char * type) {
return ret; return ret;
} }
int LinuxDvbReverseDiscontinuity(Context_t *context, int* surplus) { int LinuxDvbReverseDiscontinuity(Context_t *context __attribute__((unused)), int* surplus) {
int ret = cERR_LINUXDVB_NO_ERROR; int ret = cERR_LINUXDVB_NO_ERROR;
int dis_type = VIDEO_DISCONTINUITY_CONTINUOUS_REVERSE | *surplus; int dis_type = VIDEO_DISCONTINUITY_CONTINUOUS_REVERSE | *surplus;
@@ -427,7 +427,7 @@ int LinuxDvbReverseDiscontinuity(Context_t *context, int* surplus) {
return ret; return ret;
} }
int LinuxDvbAudioMute(Context_t *context, char *flag) { int LinuxDvbAudioMute(Context_t *context __attribute__((unused)), char *flag) {
int ret = cERR_LINUXDVB_NO_ERROR; int ret = cERR_LINUXDVB_NO_ERROR;
linuxdvb_printf(10, "\n"); linuxdvb_printf(10, "\n");
@@ -465,7 +465,7 @@ int LinuxDvbAudioMute(Context_t *context, char *flag) {
} }
int LinuxDvbFlush(Context_t *context, char * type) { int LinuxDvbFlush(Context_t *context __attribute__((unused)), char * type) {
unsigned char video = !strcmp("video", type); unsigned char video = !strcmp("video", type);
unsigned char audio = !strcmp("audio", type); unsigned char audio = !strcmp("audio", type);
@@ -600,7 +600,7 @@ int LinuxDvbFastForward(Context_t *context, char * type) {
#endif #endif
int LinuxDvbReverse(Context_t *context, char * type) { int LinuxDvbReverse(Context_t *context __attribute__((unused)), char * type __attribute__((unused))) {
int ret = cERR_LINUXDVB_NO_ERROR; int ret = cERR_LINUXDVB_NO_ERROR;
#ifdef reverse_playback_2 #ifdef reverse_playback_2
int speed; int speed;
@@ -686,7 +686,7 @@ int LinuxDvbSlowMotion(Context_t *context, char * type) {
return ret; return ret;
} }
int LinuxDvbAVSync(Context_t *context, char * type) { int LinuxDvbAVSync(Context_t *context, char * type __attribute__((unused))) {
int ret = cERR_LINUXDVB_NO_ERROR; int ret = cERR_LINUXDVB_NO_ERROR;
/* konfetti: this one is dedicated to audiofd so we /* konfetti: this one is dedicated to audiofd so we
* are ignoring what is given by type! I think we should * are ignoring what is given by type! I think we should
@@ -710,7 +710,7 @@ int LinuxDvbAVSync(Context_t *context, char * type) {
return ret; return ret;
} }
int LinuxDvbClear(Context_t *context, char * type) { int LinuxDvbClear(Context_t *context __attribute__((unused)), char * type) {
int ret = cERR_LINUXDVB_NO_ERROR; int ret = cERR_LINUXDVB_NO_ERROR;
unsigned char video = !strcmp("video", type); unsigned char video = !strcmp("video", type);
unsigned char audio = !strcmp("audio", type); unsigned char audio = !strcmp("audio", type);
@@ -745,7 +745,7 @@ int LinuxDvbClear(Context_t *context, char * type) {
return ret; return ret;
} }
int LinuxDvbPts(Context_t *context, unsigned long long int* pts) { int LinuxDvbPts(Context_t *context __attribute__((unused)), unsigned long long int* pts) {
int ret = cERR_LINUXDVB_NO_ERROR; int ret = cERR_LINUXDVB_NO_ERROR;
linuxdvb_printf(50, "\n"); linuxdvb_printf(50, "\n");
@@ -783,7 +783,7 @@ int LinuxDvbPts(Context_t *context, unsigned long long int* pts) {
return ret; return ret;
} }
int LinuxDvbGetFrameCount(Context_t *context, unsigned long long int* frameCount) { int LinuxDvbGetFrameCount(Context_t *context __attribute__((unused)), unsigned long long int* frameCount) {
int ret = cERR_LINUXDVB_NO_ERROR; int ret = cERR_LINUXDVB_NO_ERROR;
dvb_play_info_t playInfo; dvb_play_info_t playInfo;

View File

@@ -63,6 +63,13 @@ static const char* FILENAME = "output.c";
/* Varaibles */ /* Varaibles */
/* ***************************** */ /* ***************************** */
static Output_t * AvailableOutput[] = {
&LinuxDvbOutput,
&SubtitleOutput,
&PipeOutput,
NULL
};
/* ***************************** */ /* ***************************** */
/* Prototypes */ /* Prototypes */
/* ***************************** */ /* ***************************** */

View File

@@ -88,7 +88,7 @@ int PipeStop(Context_t *context, char * type);
/* MISC Functions */ /* MISC Functions */
/* ***************************** */ /* ***************************** */
void getPipeMutex(const char *filename, const char *function, int line) { void getPipeMutex(const char *filename __attribute__((unused)), const char *function __attribute__((unused)), int line __attribute__((unused))) {
pipe_printf(250, "requesting mutex\n"); pipe_printf(250, "requesting mutex\n");
@@ -97,14 +97,14 @@ void getPipeMutex(const char *filename, const char *function, int line) {
pipe_printf(250, "received mutex\n"); pipe_printf(250, "received mutex\n");
} }
void releasePipeMutex(const char *filename, const char *function, int line) { void releasePipeMutex(const char *filename __attribute__((unused)), const char *function __attribute__((unused)), int line __attribute__((unused))) {
pthread_mutex_unlock(&Pipemutex); pthread_mutex_unlock(&Pipemutex);
pipe_printf(250, "released mutex\n"); pipe_printf(250, "released mutex\n");
} }
int PipeOpen(Context_t *context, char * type) { int PipeOpen(Context_t *context __attribute__((unused)), char * type) {
unsigned char teletext = !strcmp("teletext", type); unsigned char teletext = !strcmp("teletext", type);
unsigned char dvbsubtitle = !strcmp("dvbsubtitle", type); unsigned char dvbsubtitle = !strcmp("dvbsubtitle", type);
@@ -163,10 +163,10 @@ int PipeClose(Context_t *context, char * type) {
return cERR_PIPE_NO_ERROR; return cERR_PIPE_NO_ERROR;
} }
int PipePlay(Context_t *context, char * type) { int PipePlay(Context_t *context __attribute__((unused)), char * type __attribute__((unused))) {
int ret = cERR_PIPE_NO_ERROR; int ret = cERR_PIPE_NO_ERROR;
Writer_t* writer;
#if 0
unsigned char dvbsubtitle = !strcmp("dvbsubtitle", type); unsigned char dvbsubtitle = !strcmp("dvbsubtitle", type);
unsigned char teletext = !strcmp("teletext", type); unsigned char teletext = !strcmp("teletext", type);
@@ -176,12 +176,14 @@ int PipePlay(Context_t *context, char * type) {
} }
if (teletext && teletextfd != -1) { if (teletext && teletextfd != -1) {
} }
#endif
return ret; return ret;
} }
int PipeStop(Context_t *context, char * type) { int PipeStop(Context_t *context __attribute__((unused)), char * type __attribute__((unused))) {
int ret = cERR_PIPE_NO_ERROR; int ret = cERR_PIPE_NO_ERROR;
#if 0
unsigned char dvbsubtitle = !strcmp("dvbsubtitle", type); unsigned char dvbsubtitle = !strcmp("dvbsubtitle", type);
unsigned char teletext = !strcmp("teletext", type); unsigned char teletext = !strcmp("teletext", type);
@@ -195,11 +197,12 @@ int PipeStop(Context_t *context, char * type) {
} }
releasePipeMutex(FILENAME, __FUNCTION__,__LINE__); releasePipeMutex(FILENAME, __FUNCTION__,__LINE__);
#endif
return ret; return ret;
} }
int PipeFlush(Context_t *context, char * type) { int PipeFlush(Context_t *context __attribute__((unused)), char * type) {
unsigned char dvbsubtitle = !strcmp("dvbsubtitle", type); unsigned char dvbsubtitle = !strcmp("dvbsubtitle", type);
unsigned char teletext = !strcmp("teletext", type); unsigned char teletext = !strcmp("teletext", type);
@@ -225,7 +228,7 @@ int PipeFlush(Context_t *context, char * type) {
return cERR_PIPE_NO_ERROR; return cERR_PIPE_NO_ERROR;
} }
int PipeClear(Context_t *context, char * type) { int PipeClear(Context_t *context __attribute__((unused)), char * type) {
int ret = cERR_PIPE_NO_ERROR; int ret = cERR_PIPE_NO_ERROR;
unsigned char dvbsubtitle = !strcmp("dvbsubtitle", type); unsigned char dvbsubtitle = !strcmp("dvbsubtitle", type);
unsigned char teletext = !strcmp("teletext", type); unsigned char teletext = !strcmp("teletext", type);
@@ -252,10 +255,10 @@ int PipeClear(Context_t *context, char * type) {
return ret; return ret;
} }
int PipeSwitch(Context_t *context, char * type) { int PipeSwitch(Context_t *context __attribute__((unused)), char * type __attribute__((unused))) {
#if 0
unsigned char dvbsubtitle = !strcmp("dvbsubtitle", type); unsigned char dvbsubtitle = !strcmp("dvbsubtitle", type);
unsigned char teletext = !strcmp("teletext", type); unsigned char teletext = !strcmp("teletext", type);
Writer_t* writer;
pipe_printf(10, "v%d a%d\n", dvbsubtitle, teletext); pipe_printf(10, "v%d a%d\n", dvbsubtitle, teletext);
@@ -273,13 +276,13 @@ int PipeSwitch(Context_t *context, char * type) {
} }
pipe_printf(10, "exiting\n"); pipe_printf(10, "exiting\n");
#endif
return cERR_PIPE_NO_ERROR; return cERR_PIPE_NO_ERROR;
} }
static int writePESDataTeletext(int fd, unsigned char *data, size_t data_len) static int writePESDataTeletext(int fd, unsigned char *data, size_t data_len)
{ {
int len = 0; unsigned int len = 0;
if (data_len > 0) { if (data_len > 0) {
len = data_len + 39; len = data_len + 39;
char header[45]; char header[45];
@@ -335,7 +338,7 @@ static int writePESDataDvbsubtitle(int fd, unsigned char *data, size_t data_len,
iov[1].iov_base = data; iov[1].iov_base = data;
iov[1].iov_len = data_len; iov[1].iov_len = data_len;
len = writev(fd, iov, 2); len = writev(fd, iov, 2);
if (len != iov[0].iov_len + iov[1].iov_len) { if (len != (int)(iov[0].iov_len + iov[1].iov_len)) {
// writing to pipe failed, clear it. // writing to pipe failed, clear it.
char buf[65536]; char buf[65536];
while(0 < read(fd, buf, sizeof(buf))); while(0 < read(fd, buf, sizeof(buf)));
@@ -344,16 +347,13 @@ static int writePESDataDvbsubtitle(int fd, unsigned char *data, size_t data_len,
return len; return len;
} }
static int Write(void *_context, void* _out) static int Write(void *_context __attribute__((unused)), void* _out)
{ {
Context_t *context = (Context_t *) _context;
AudioVideoOut_t *out = (AudioVideoOut_t*) _out; AudioVideoOut_t *out = (AudioVideoOut_t*) _out;
int ret = cERR_PIPE_NO_ERROR; int ret = cERR_PIPE_NO_ERROR;
int res = 0; int res = 0;
unsigned char dvbsubtitle; unsigned char dvbsubtitle;
unsigned char teletext; unsigned char teletext;
Writer_t* writer;
WriterAVCallData_t call;
if (out == NULL) if (out == NULL)
{ {
@@ -387,7 +387,7 @@ static int Write(void *_context, void* _out)
return ret; return ret;
} }
static int reset(Context_t *context) static int reset(Context_t *context __attribute__((unused)))
{ {
int ret = cERR_PIPE_NO_ERROR; int ret = cERR_PIPE_NO_ERROR;

View File

@@ -597,7 +597,7 @@ static int Write(void* _context, void *data) {
return cERR_SUBTITLE_NO_ERROR; return cERR_SUBTITLE_NO_ERROR;
} }
static int subtitle_Open(Context_t* context) { static int subtitle_Open(Context_t* context __attribute__((unused))) {
int i; int i;
subtitle_printf(10, "\n"); subtitle_printf(10, "\n");
@@ -629,7 +629,7 @@ static int subtitle_Open(Context_t* context) {
return cERR_SUBTITLE_NO_ERROR; return cERR_SUBTITLE_NO_ERROR;
} }
static int subtitle_Close(Context_t* context) { static int subtitle_Close(Context_t* context __attribute__((unused))) {
int i; int i;
subtitle_printf(10, "\n"); subtitle_printf(10, "\n");
@@ -690,7 +690,7 @@ static int subtitle_Play(Context_t* context) {
return cERR_SUBTITLE_NO_ERROR; return cERR_SUBTITLE_NO_ERROR;
} }
static int subtitle_Stop(Context_t* context) { static int subtitle_Stop(Context_t* context __attribute__((unused))) {
int wait_time = 20; int wait_time = 20;
int i; int i;

View File

@@ -100,7 +100,6 @@ static int writeData(void* _call)
unsigned int FakeHeaderLength; unsigned int FakeHeaderLength;
unsigned char Version = 5; unsigned char Version = 5;
unsigned int FakeStartCode = (Version << 8) | PES_VERSION_FAKE_START_CODE; unsigned int FakeStartCode = (Version << 8) | PES_VERSION_FAKE_START_CODE;
unsigned int HeaderLength = 0;
unsigned int usecPerFrame = 41708; /* Hellmaster1024: default value */ unsigned int usecPerFrame = 41708; /* Hellmaster1024: default value */
BitPacker_t ld = {FakeHeaders, 0, 32}; BitPacker_t ld = {FakeHeaders, 0, 32};

View File

@@ -97,7 +97,6 @@ static int writeData(void* _call)
{ {
WriterAVCallData_t* call = (WriterAVCallData_t*) _call; WriterAVCallData_t* call = (WriterAVCallData_t*) _call;
int i = 0;
unsigned char PesHeader[PES_AUDIO_HEADER_SIZE]; unsigned char PesHeader[PES_AUDIO_HEADER_SIZE];
dts_printf(10, "\n"); dts_printf(10, "\n");

View File

@@ -128,7 +128,7 @@ static int writeData(void* _call)
int src_stride = call->Stride; int src_stride = call->Stride;
int dst_stride = call->destStride; int dst_stride = call->destStride;
int dst_delta = dst_stride - call->Width*4; int dst_delta = dst_stride - call->Width*4;
int x,y; unsigned int x,y;
const unsigned char *src = call->data; const unsigned char *src = call->data;
unsigned char *dst = call->destination + (call->y * dst_stride + call->x * 4); unsigned char *dst = call->destination + (call->y * dst_stride + call->x * 4);
unsigned int k,ck,t; unsigned int k,ck,t;
@@ -175,7 +175,7 @@ static int writeData(void* _call)
} }
} else } else
{ {
int y; unsigned int y;
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);
} }

View File

@@ -55,7 +55,7 @@
#ifdef H264_DEBUG #ifdef H264_DEBUG
static short debug_level = 0; static short debug_level = 10;
#define h264_printf(level, fmt, x...) do { \ #define h264_printf(level, fmt, x...) do { \
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
@@ -112,8 +112,6 @@ static int writeData(void* _call)
{ {
WriterAVCallData_t* call = (WriterAVCallData_t*) _call; WriterAVCallData_t* call = (WriterAVCallData_t*) _call;
unsigned char* PacketStart = NULL;
unsigned int PacketStartSIZE = 0;
unsigned char PesHeader[PES_MAX_HEADER_SIZE]; unsigned char PesHeader[PES_MAX_HEADER_SIZE];
unsigned long long int VideoPts; unsigned long long int VideoPts;
unsigned int TimeDelta; unsigned int TimeDelta;
@@ -177,7 +175,7 @@ static int writeData(void* _call)
if (initialHeader) if (initialHeader)
{ {
avcC_t* avcCHeader = (avcC_t*)call->private_data; avcC_t* avcCHeader = (avcC_t*)call->private_data;
int i; unsigned int i;
unsigned int ParamSets; unsigned int ParamSets;
unsigned int ParamOffset; unsigned int ParamOffset;
unsigned int InitialHeaderLength = 0; unsigned int InitialHeaderLength = 0;
@@ -319,8 +317,6 @@ static int writeData(void* _call)
NalStart += NalLength; NalStart += NalLength;
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;
NalLength -= PacketLength; NalLength -= PacketLength;
ic = 0; ic = 0;

View File

@@ -65,7 +65,7 @@
void PutBits(BitPacker_t * ld, unsigned int code, unsigned int length) void PutBits(BitPacker_t * ld, unsigned int code, unsigned int length)
{ {
unsigned int bit_buf; unsigned int bit_buf;
int bit_left; unsigned int bit_left;
bit_buf = ld->BitBuffer; bit_buf = ld->BitBuffer;
bit_left = ld->Remaining; bit_left = ld->Remaining;

View File

@@ -96,7 +96,7 @@ static int writeData(void* _call)
unsigned char PesHeader[PES_MAX_HEADER_SIZE]; unsigned char PesHeader[PES_MAX_HEADER_SIZE];
int len = 0; int len = 0;
int Position = 0; unsigned int Position = 0;
mpeg2_printf(10, "\n"); mpeg2_printf(10, "\n");

View File

@@ -116,7 +116,7 @@ static unsigned int breakBufferFillSize = 0;
/* MISC Functions */ /* MISC Functions */
/* ***************************** */ /* ***************************** */
static int prepareClipPlay(int uNoOfChannels, int uSampleRate, int uBitsPerSample, int bLittleEndian) static int prepareClipPlay(int uNoOfChannels, int uSampleRate, int uBitsPerSample, int bLittleEndian __attribute__((unused)))
{ {
printf("rate: %d ch: %d bits: %d (%d bps)\n", printf("rate: %d ch: %d bits: %d (%d bps)\n",
uSampleRate/*Format->dwSamplesPerSec*/, uSampleRate/*Format->dwSamplesPerSec*/,
@@ -189,8 +189,6 @@ static int writeData(void* _call)
{ {
WriterAVCallData_t* call = (WriterAVCallData_t*) _call; WriterAVCallData_t* call = (WriterAVCallData_t*) _call;
unsigned char PesHeader[PES_MAX_HEADER_SIZE];
pcm_printf(10, "\n"); pcm_printf(10, "\n");
if (call == NULL) if (call == NULL)
@@ -223,15 +221,14 @@ static int writeData(void* _call)
} }
unsigned char * buffer = call->data; unsigned char * buffer = call->data;
int size = call->len; unsigned int size = call->len;
//printf("PCM %d size SubFrameLen=%d\n", size, SubFrameLen); //printf("PCM %d size SubFrameLen=%d\n", size, SubFrameLen);
unsigned int qty;
unsigned int n; unsigned int n;
unsigned int injectBufferSize = sizeof(lpcm_pes) + sizeof(lpcm_prv) + SubFrameLen; unsigned int injectBufferSize = sizeof(lpcm_pes) + sizeof(lpcm_prv) + SubFrameLen;
unsigned char * injectBuffer = (unsigned char *)malloc(sizeof(unsigned char)*injectBufferSize); unsigned char * injectBuffer = (unsigned char *)malloc(sizeof(unsigned char)*injectBufferSize);
unsigned char * injectBufferDataPointer = &injectBuffer[sizeof(lpcm_pes)+sizeof(lpcm_prv)]; unsigned char * injectBufferDataPointer = &injectBuffer[sizeof(lpcm_pes)+sizeof(lpcm_prv)];
int pos; unsigned int pos;
for(pos = 0; pos < size; ) for(pos = 0; pos < size; )
{ {

View File

@@ -200,7 +200,7 @@ static int writeData(void* _call)
} }
{ {
int i; unsigned int i;
/* For VC1 the codec private data is a standard vc1 sequence header so we just copy it to the output */ /* For VC1 the codec private data is a standard vc1 sequence header so we just copy it to the output */
memcpy (&PesPacket[PES_MIN_HEADER_SIZE], call->private_data, call->private_size); memcpy (&PesPacket[PES_MIN_HEADER_SIZE], call->private_data, call->private_size);
@@ -217,7 +217,7 @@ static int writeData(void* _call)
} }
if(call->len > 0 && call->data) { if(call->len > 0 && call->data) {
int Position = 0; unsigned int Position = 0;
unsigned char insertSampleHeader = 1; unsigned char insertSampleHeader = 1;
while(Position < call->len) { while(Position < call->len) {
@@ -232,7 +232,6 @@ static int writeData(void* _call)
unsigned char PesHeader[PES_MAX_HEADER_SIZE]; unsigned char PesHeader[PES_MAX_HEADER_SIZE];
memset (PesHeader, '0', PES_MAX_HEADER_SIZE); memset (PesHeader, '0', PES_MAX_HEADER_SIZE);
int HeaderLength = InsertPesHeader (PesHeader, PacketLength, VC1_VIDEO_PES_START_CODE, call->Pts, 0); int HeaderLength = InsertPesHeader (PesHeader, PacketLength, VC1_VIDEO_PES_START_CODE, call->Pts, 0);
unsigned char* PacketStart;
if(insertSampleHeader) { if(insertSampleHeader) {
const unsigned char Vc1FrameStartCode[] = {0, 0, 1, VC1_FRAME_START_CODE}; const unsigned char Vc1FrameStartCode[] = {0, 0, 1, VC1_FRAME_START_CODE};

View File

@@ -124,7 +124,6 @@ static int writeData(void* _call)
if (initialHeader) { if (initialHeader) {
unsigned char PesHeader[PES_MAX_HEADER_SIZE]; unsigned char PesHeader[PES_MAX_HEADER_SIZE];
int HeaderLength;
if ((call->private_size <= 0) || (call->private_data == NULL)) if ((call->private_size <= 0) || (call->private_data == NULL))
{ {

View File

@@ -203,7 +203,7 @@ static int writeData(void* _call)
} }
if(call->len > 0 && call->data) { if(call->len > 0 && call->data) {
int Position = 0; unsigned int Position = 0;
unsigned char insertSampleHeader = 1; unsigned char insertSampleHeader = 1;
while(Position < call->len) { while(Position < call->len) {
@@ -217,7 +217,6 @@ static int writeData(void* _call)
unsigned char PesHeader[PES_MAX_HEADER_SIZE]; unsigned char PesHeader[PES_MAX_HEADER_SIZE];
memset (PesHeader, '0', PES_MAX_HEADER_SIZE); memset (PesHeader, '0', PES_MAX_HEADER_SIZE);
int HeaderLength = InsertPesHeader (PesHeader, PacketLength, VC1_VIDEO_PES_START_CODE, call->Pts, 0); int HeaderLength = InsertPesHeader (PesHeader, PacketLength, VC1_VIDEO_PES_START_CODE, call->Pts, 0);
unsigned char* PacketStart;
if(insertSampleHeader) { if(insertSampleHeader) {
unsigned int PesLength; unsigned int PesLength;

View File

@@ -58,6 +58,32 @@ if (debug_level >= level) printf(x); } while (0)
/* Varaibles */ /* Varaibles */
/* ***************************** */ /* ***************************** */
static Writer_t * AvailableWriter[] = {
&WriterAudioIPCM,
&WriterAudioPCM,
&WriterAudioMP3,
&WriterAudioMPEGL3,
&WriterAudioAC3,
&WriterAudioAAC,
&WriterAudioDTS,
&WriterAudioWMA,
&WriterAudioFLAC,
&WriterAudioVORBIS,
&WriterVideoMPEG2,
&WriterVideoMPEGH264,
&WriterVideoH264,
&WriterVideoDIVX,
&WriterVideoFOURCC,
&WriterVideoMSCOMP,
&WriterVideoWMV,
&WriterVideoH263,
&WriterVideoFLV,
&WriterVideoVC1,
&WriterFramebuffer,
NULL
};
/* ***************************** */ /* ***************************** */
/* Prototypes */ /* Prototypes */
/* ***************************** */ /* ***************************** */

View File

@@ -25,7 +25,8 @@ void dump_metadata()
int main(int argc,char* argv[]) int main(int argc,char* argv[])
{ {
char file[255] = {""}; char file[255] = {""};
int err, i; unsigned int i;
int err;
if (argc < 2) if (argc < 2)
{ {
@@ -52,9 +53,9 @@ int main(int argc,char* argv[])
return -1; return -1;
} }
if (av_find_stream_info(avContext) < 0) if (avformat_find_stream_info(avContext, NULL) < 0)
{ {
printf("Error av_find_stream_info\n"); printf("Error avformat_find_stream_info\n");
} }
printf("\n***\n"); printf("\n***\n");

View File

@@ -9,7 +9,7 @@
#include <unistd.h> #include <unistd.h>
#include <include/init_td.h> #include <include/init_td.h>
int main(int argc, char ** argv) int main(int argc __attribute__((unused)), char ** argv __attribute__((unused)))
{ {
init_td_api(); init_td_api();
while (1) { while (1) {