libeplayer3: sync with tdt

This commit is contained in:
martii
2012-07-21 21:03:59 +02:00
parent 450fc1966a
commit 1d0e6663c4
34 changed files with 300 additions and 344 deletions

View File

@@ -51,17 +51,17 @@
static short debug_level = 10;
static const char FILENAME[] = "linuxdvb.c";
static const char FILENAME[] = __FILE__;
#ifdef LINUXDVB_DEBUG
#define linuxdvb_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, __FILE__, __FUNCTION__, ## x ); } while (0)
#else
#define linuxdvb_printf(x...)
#endif
#ifndef LINUXDVB_SILENT
#define linuxdvb_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
#define linuxdvb_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define linuxdvb_err(x...)
#endif
@@ -601,8 +601,8 @@ int LinuxDvbFastForward(Context_t *context, char * type) {
int LinuxDvbReverse(Context_t *context, char * type) {
#ifdef reverse_playback_2
int ret = cERR_LINUXDVB_NO_ERROR;
#ifdef reverse_playback_2
int speed;
unsigned char video = !strcmp("video", type);
@@ -654,8 +654,8 @@ int LinuxDvbReverse(Context_t *context, char * type) {
linuxdvb_printf(10, "exiting with value %d\n", ret);
return ret;
#endif
return ret;
}
int LinuxDvbSlowMotion(Context_t *context, char * type) {
@@ -1204,7 +1204,5 @@ struct Output_s LinuxDvbOutput = {
"LinuxDvb",
&Command,
&Write,
LinuxDvbCapabilities,
LinuxDvbCapabilities
};

View File

@@ -53,7 +53,7 @@ if (debug_level >= level) printf(x); } while (0)
#define cERR_OUTPUT_NO_ERROR 0
#define cERR_OUTPUT_INTERNAL_ERROR -1
static const char* FILENAME = "output.c";
static const char* FILENAME = __FILE__;
/* ***************************** */
/* Types */
@@ -349,5 +349,5 @@ OutputHandler_t OutputHandler = {
NULL,
NULL,
NULL,
&Command,
&Command
};

View File

@@ -49,13 +49,13 @@
static short debug_level = 10;
#define subtitle_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, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define subtitle_printf(level, fmt, x...)
#endif
#ifndef SUBTITLE_SILENT
#define subtitle_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
#define subtitle_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define subtitle_err(fmt, x...)
#endif
@@ -64,7 +64,7 @@ if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x);
#define cERR_SUBTITLE_NO_ERROR 0
#define cERR_SUBTITLE_ERROR -1
static const char FILENAME[] = "output_subtitle.c";
static const char FILENAME[] = "subtitle.c";
/*
Number, Style, Name,, MarginL, MarginR, MarginV, Effect,, Text
@@ -839,7 +839,5 @@ struct Output_s SubtitleOutput = {
"Subtitle",
&Command,
&Write,
SubtitleCapabilitis,
SubtitleCapabilitis
};

View File

@@ -57,16 +57,15 @@
#ifdef AAC_DEBUG
static short debug_level = 0;
static const char *FILENAME = "aac.c";
#define aac_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, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define aac_printf(level, fmt, x...)
#endif
#ifndef AAC_SILENT
#define aac_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
#define aac_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define aac_err(fmt, x...)
#endif

View File

@@ -56,16 +56,15 @@
#ifdef AC3_DEBUG
static short debug_level = 0;
static const char *FILENAME = "ac3.c";
#define ac3_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, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define ac3_printf(level, fmt, x...)
#endif
#ifndef AC3_SILENT
#define ac3_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
#define ac3_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define ac3_err(fmt, x...)
#endif
@@ -140,13 +139,12 @@ static WriterCaps_t caps_ac3 = {
"ac3",
eAudio,
"A_AC3",
AUDIO_ENCODING_AC3,
AUDIO_ENCODING_AC3
};
struct Writer_s WriterAudioAC3 = {
&reset,
&writeData,
NULL,
&caps_ac3,
&caps_ac3
};

View File

@@ -55,16 +55,15 @@
#ifdef DIVX_DEBUG
static short debug_level = 0;
static const char *FILENAME = "divx.c";
#define divx_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, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define divx_printf(level, fmt, x...)
#endif
#ifndef DIVX_SILENT
#define divx_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
#define divx_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define divx_err(fmt, x...)
#endif
@@ -177,40 +176,40 @@ static WriterCaps_t mpeg4p2_caps = {
"mscomp",
eVideo,
"V_MSCOMP",
VIDEO_ENCODING_MPEG4P2,
VIDEO_ENCODING_MPEG4P2
};
struct Writer_s WriterVideoMSCOMP = {
&reset,
&writeData,
NULL,
&mpeg4p2_caps,
&mpeg4p2_caps
};
static WriterCaps_t fourcc_caps = {
"fourcc",
eVideo,
"V_MS/VFW/FOURCC",
VIDEO_ENCODING_MPEG4P2,
VIDEO_ENCODING_MPEG4P2
};
struct Writer_s WriterVideoFOURCC = {
&reset,
&writeData,
NULL,
&fourcc_caps,
&fourcc_caps
};
static WriterCaps_t divx_caps = {
"divx",
eVideo,
"V_MKV/XVID",
VIDEO_ENCODING_MPEG4P2,
VIDEO_ENCODING_MPEG4P2
};
struct Writer_s WriterVideoDIVX = {
&reset,
&writeData,
NULL,
&divx_caps,
&divx_caps
};

View File

@@ -59,16 +59,15 @@
#ifdef DTS_DEBUG
static short debug_level = 0;
static const char *FILENAME = "dts.c";
#define dts_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, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define dts_printf(level, fmt, x...)
#endif
#ifndef DTS_SILENT
#define dts_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
#define dts_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define dts_err(fmt, x...)
#endif
@@ -158,12 +157,12 @@ static WriterCaps_t caps = {
"dts",
eAudio,
"A_DTS",
AUDIO_ENCODING_DTS,
AUDIO_ENCODING_DTS
};
struct Writer_s WriterAudioDTS = {
&reset,
&writeData,
NULL,
&caps,
&caps
};

View File

@@ -54,16 +54,15 @@
#ifdef FLAC_DEBUG
static short debug_level = 1;
static const char *FILENAME = "flac.c";
#define flac_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, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define flac_printf(level, fmt, x...)
#endif
#ifndef FLAC_SILENT
#define flac_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
#define flac_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define flac_err(fmt, x...)
#endif
@@ -140,13 +139,12 @@ static WriterCaps_t caps_flac = {
"flac",
eAudio,
"A_FLAC",
AUDIO_ENCODING_LPCM, //AUDIO_ENCODING_FLAC,
AUDIO_ENCODING_LPCM //AUDIO_ENCODING_FLAC
};
struct Writer_s WriterAudioFLAC = {
&reset,
&writeData,
NULL,
&caps_flac,
&caps_flac
};

View File

@@ -54,16 +54,15 @@
#ifdef FB_DEBUG
static short debug_level = 10;
static const char *FILENAME = "framebuffer.c";
#define fb_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, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define fb_printf(level, fmt, x...)
#endif
#ifndef FB_SILENT
#define fb_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
#define fb_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define fb_err(fmt, x...)
#endif
@@ -186,12 +185,12 @@ static WriterCaps_t caps = {
"framebuffer",
eGfx,
"framebuffer",
0,
0
};
struct Writer_s WriterFramebuffer = {
&reset,
&writeData,
NULL,
&caps,
&caps
};

View File

@@ -54,16 +54,15 @@
#ifdef H263_DEBUG
static short debug_level = 0;
static const char *FILENAME = "h263.c";
#define h263_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, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define h263_printf(level, fmt, x...)
#endif
#ifndef H263_SILENT
#define h263_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
#define h263_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define h263_err(fmt, x...)
#endif
@@ -152,26 +151,26 @@ static WriterCaps_t caps_h263 = {
"h263",
eVideo,
"V_H263",
VIDEO_ENCODING_H263,
VIDEO_ENCODING_H263
};
struct Writer_s WriterVideoH263 = {
&reset,
&writeData,
NULL,
&caps_h263,
&caps_h263
};
static WriterCaps_t caps_flv = {
"FLV",
eVideo,
"V_FLV",
VIDEO_ENCODING_FLV1,
VIDEO_ENCODING_FLV1
};
struct Writer_s WriterVideoFLV = {
&reset,
&writeData,
NULL,
&caps_flv,
&caps_flv
};

View File

@@ -53,17 +53,16 @@
#ifdef H264_DEBUG
static const char *FILENAME = "h264.c";
static short debug_level = 0;
#define h264_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, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define h264_printf(level, fmt, x...)
#endif
#ifndef H264_SILENT
#define h264_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
#define h264_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define h264_err(fmt, x...)
#endif
@@ -428,13 +427,12 @@ static WriterCaps_t caps = {
"h264",
eVideo,
"V_MPEG4/ISO/AVC",
VIDEO_ENCODING_H264,
VIDEO_ENCODING_H264
};
struct Writer_s WriterVideoH264 = {
&reset,
&writeData,
&writeReverseData,
&caps,
&caps
};

View File

@@ -123,4 +123,3 @@ void FlushBits(BitPacker_t * ld)
ld->Remaining = 32;
ld->BitBuffer = 0;
}

View File

@@ -54,16 +54,15 @@
#ifdef MP3_DEBUG
static short debug_level = 0;
static const char *FILENAME = "mp3.c";
#define mp3_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, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define mp3_printf(level, fmt, x...)
#endif
#ifndef MP3_SILENT
#define mp3_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
#define mp3_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define mp3_err(fmt, x...)
#endif
@@ -140,26 +139,26 @@ static WriterCaps_t caps_mp3 = {
"mp3",
eAudio,
"A_MP3",
AUDIO_ENCODING_MP3,
AUDIO_ENCODING_MP3
};
struct Writer_s WriterAudioMP3 = {
&reset,
&writeData,
NULL,
&caps_mp3,
&caps_mp3
};
static WriterCaps_t caps_mpegl3 = {
"mpeg/l3",
eAudio,
"A_MPEG/L3",
AUDIO_ENCODING_MPEG2,
AUDIO_ENCODING_MPEG2
};
struct Writer_s WriterAudioMPEGL3 = {
&reset,
&writeData,
NULL,
&caps_mpegl3,
&caps_mpegl3
};

View File

@@ -55,16 +55,15 @@
#ifdef MPEG2_DEBUG
static short debug_level = 0;
static const char *FILENAME = "mpeg2.c";
#define mpeg2_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, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define mpeg2_printf(level, fmt, x...)
#endif
#ifndef MPEG2_SILENT
#define mpeg2_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
#define mpeg2_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define mpeg2_err(fmt, x...)
#endif
@@ -154,26 +153,26 @@ static WriterCaps_t caps = {
"mpeg2",
eVideo,
"V_MPEG2",
VIDEO_ENCODING_AUTO,
VIDEO_ENCODING_AUTO
};
struct Writer_s WriterVideoMPEG2 = {
&reset,
&writeData,
NULL,
&caps,
&caps
};
static WriterCaps_t h264_caps = {
"mpges_h264",
eVideo,
"V_MPEG2/H264",
VIDEO_ENCODING_H264,
VIDEO_ENCODING_H264
};
struct Writer_s WriterVideoMPEGH264 = {
&reset,
&writeData,
NULL,
&h264_caps,
&h264_caps
};

View File

@@ -55,16 +55,15 @@
#ifdef PCM_DEBUG
static short debug_level = 1;
static const char *FILENAME = "pcm.c";
#define pcm_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, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define pcm_printf(level, fmt, x...)
#endif
#ifndef PCM_SILENT
#define pcm_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
#define pcm_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define pcm_err(fmt, x...)
#endif
@@ -320,27 +319,26 @@ static WriterCaps_t caps_pcm = {
"pcm",
eAudio,
"A_PCM",
AUDIO_ENCODING_LPCMA,
AUDIO_ENCODING_LPCMA
};
struct Writer_s WriterAudioPCM = {
&reset,
&writeData,
NULL,
&caps_pcm,
&caps_pcm
};
static WriterCaps_t caps_ipcm = {
"ipcm",
eAudio,
"A_IPCM",
AUDIO_ENCODING_LPCMA,
AUDIO_ENCODING_LPCMA
};
struct Writer_s WriterAudioIPCM = {
&reset,
&writeData,
NULL,
&caps_ipcm,
&caps_ipcm
};

View File

@@ -90,11 +90,8 @@ int InsertPesHeader (unsigned char *data, int size, unsigned char stream_id, uns
{
BitPacker_t ld2 = {data, 0, 32};
#if 0
/* does not seem to hurt, at least with h264 data...? */
if (size > MAX_PES_PACKET_SIZE)
printf("%s: Packet bigger than 63.9K eeeekkkkk\n",__FUNCTION__);
#endif
PutBits(&ld2,0x0 ,8);
PutBits(&ld2,0x0 ,8);

View File

@@ -66,16 +66,15 @@
#ifdef VC1_DEBUG
static short debug_level = 10;
static const char *FILENAME = "vc1.c";
#define vc1_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, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define vc1_printf(level, fmt, x...)
#endif
#ifndef VC1_SILENT
#define vc1_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
#define vc1_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define vc1_err(fmt, x...)
#endif
@@ -290,4 +289,3 @@ struct Writer_s WriterVideoVC1 = {
NULL,
&caps
};

View File

@@ -54,16 +54,15 @@
#ifdef VORBIS_DEBUG
static short debug_level = 1;
static const char *FILENAME = "vorbis.c";
#define vorbis_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, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define vorbis_printf(level, fmt, x...)
#endif
#ifndef VORBIS_SILENT
#define vorbis_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
#define vorbis_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define vorbis_err(fmt, x...)
#endif
@@ -140,13 +139,12 @@ static WriterCaps_t caps_vorbis = {
"vorbis",
eAudio,
"A_VORBIS",
AUDIO_ENCODING_VORBIS,
AUDIO_ENCODING_VORBIS
};
struct Writer_s WriterAudioVORBIS = {
&reset,
&writeData,
NULL,
&caps_vorbis,
&caps_vorbis
};

View File

@@ -55,16 +55,15 @@
#ifdef WMA_DEBUG
static short debug_level = 10;
static const char *FILENAME = "wma.c";
#define wma_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, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define wma_printf(level, fmt, x...)
#endif
#ifndef WMA_SILENT
#define wma_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
#define wma_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define wma_err(fmt, x...)
#endif

View File

@@ -62,16 +62,15 @@
#ifdef WMV_DEBUG
static short debug_level = 10;
static const char *FILENAME = "wmv.c";
#define wmv_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, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define wmv_printf(level, fmt, x...)
#endif
#ifndef WMV_SILENT
#define wmv_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
#define wmv_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
#else
#define wmv_err(fmt, x...)
#endif
@@ -278,4 +277,3 @@ struct Writer_s WriterVideoWMV = {
NULL,
&caps
};

View File

@@ -138,4 +138,3 @@ Writer_t* getDefaultFramebufferWriter()
return NULL;
}