mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
libeplayer3: sync with tdt
This commit is contained in:
@@ -42,7 +42,7 @@ if (debug_level >= level) printf(x); } while (0)
|
||||
#endif
|
||||
|
||||
|
||||
static const char FILENAME[] = "container.c";
|
||||
static const char FILENAME[] = __FILE__;
|
||||
|
||||
static void printContainerCapabilities() {
|
||||
int i, j;
|
||||
@@ -121,5 +121,5 @@ ContainerHandler_t ContainerHandler = {
|
||||
&SrtContainer,
|
||||
&SsaContainer,
|
||||
&ASSContainer,
|
||||
Command,
|
||||
Command
|
||||
};
|
||||
|
@@ -55,17 +55,16 @@
|
||||
|
||||
#ifdef ASS_DEBUG
|
||||
|
||||
static const char *FILENAME = "container_ass.c";
|
||||
static short debug_level = 10;
|
||||
|
||||
#define ass_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 ass_printf(level, fmt, x...)
|
||||
#endif
|
||||
|
||||
#ifndef ASS_SILENT
|
||||
#define ass_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
|
||||
#define ass_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||
#else
|
||||
#define ass_err(fmt, x...)
|
||||
#endif
|
||||
@@ -392,7 +391,8 @@ static void ASSThread(Context_t *context) {
|
||||
// subtitel zeitpunkt zu bestimmen und solange zu schlafen.
|
||||
usleep(1000);
|
||||
|
||||
img = ass_render_frame(ass_renderer, ass_track, playPts / 90.0, &change);
|
||||
if(ass_renderer && ass_track)
|
||||
img = ass_render_frame(ass_renderer, ass_track, playPts / 90.0, &change);
|
||||
|
||||
ass_printf(150, "img %p pts %lu %f\n", img, playPts, playPts / 90.0);
|
||||
|
||||
@@ -449,8 +449,8 @@ static void ASSThread(Context_t *context) {
|
||||
if(context && context->playback && context->playback->isPlaying && writer){
|
||||
writer->writeData(&out);
|
||||
if(threeDMode == 1){
|
||||
out.x = screen_width/2 + img->dst_x;
|
||||
writer->writeData(&out);
|
||||
out.x = screen_width/2 + img->dst_x;
|
||||
writer->writeData(&out);
|
||||
}else if(threeDMode == 2){
|
||||
out.y = screen_height/2 + img->dst_y;
|
||||
writer->writeData(&out);
|
||||
@@ -469,7 +469,7 @@ static void ASSThread(Context_t *context) {
|
||||
|
||||
if (ass_track->events)
|
||||
{
|
||||
/* fixme: check values */
|
||||
/* fixme: check values */
|
||||
out.pts = ass_track->events->Start * 90.0;
|
||||
out.duration = ass_track->events->Duration / 1000.0;
|
||||
} else
|
||||
@@ -556,7 +556,7 @@ int container_ass_init(Context_t *context)
|
||||
if(modefd > 0){
|
||||
read(modefd, buf, 15);
|
||||
buf[15]='\0';
|
||||
close(modefd);
|
||||
close(modefd);
|
||||
}else threeDMode = 0;
|
||||
|
||||
if(strncmp(buf,"sbs",3)==0)threeDMode = 1;
|
||||
@@ -813,6 +813,5 @@ static char *ASS_Capabilities[] = {"ass", NULL };
|
||||
Container_t ASSContainer = {
|
||||
"ASS",
|
||||
&Command,
|
||||
ASS_Capabilities,
|
||||
|
||||
ASS_Capabilities
|
||||
};
|
||||
|
@@ -59,13 +59,13 @@
|
||||
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)
|
||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||
#else
|
||||
#define ffmpeg_printf(level, fmt, x...)
|
||||
#endif
|
||||
|
||||
#ifndef FFMPEG_SILENT
|
||||
#define ffmpeg_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
|
||||
#define ffmpeg_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||
#else
|
||||
#define ffmpeg_err(fmt, x...)
|
||||
#endif
|
||||
@@ -83,7 +83,7 @@ if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x);
|
||||
#define cERR_CONTAINER_FFMPEG_ERR -9
|
||||
#define cERR_CONTAINER_FFMPEG_END_OF_FILE -10
|
||||
|
||||
static const char* FILENAME = "container_ffmpeg.c";
|
||||
static const char* FILENAME = __FILE__;
|
||||
|
||||
/* ***************************** */
|
||||
/* Types */
|
||||
@@ -171,7 +171,7 @@ static char* Codec2Encoding(enum CodecID id, int* version)
|
||||
case CODEC_ID_VC1:
|
||||
return "V_VC1";
|
||||
case CODEC_ID_H264:
|
||||
#ifdef CODEC_ID_FFH264
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 54
|
||||
case CODEC_ID_FFH264:
|
||||
#endif
|
||||
return "V_MPEG4/ISO/AVC";
|
||||
@@ -274,16 +274,17 @@ float getDurationFromSSALine(unsigned char* line){
|
||||
/* search for metatdata in context and stream
|
||||
* and map it to our metadata.
|
||||
*/
|
||||
#if LIBAVFORMAT_VERSION_MAJOR > 53
|
||||
static char* searchMeta(AVDictionary *metadata, char* ourTag)
|
||||
#else
|
||||
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 54
|
||||
static char* searchMeta(AVMetadata *metadata, char* ourTag)
|
||||
#else
|
||||
static char* searchMeta(AVDictionary * metadata, char* ourTag)
|
||||
#endif
|
||||
{
|
||||
#if LIBAVFORMAT_VERSION_MAJOR > 53
|
||||
AVDictionaryEntry *tag = NULL;
|
||||
#else
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 54
|
||||
AVMetadataTag *tag = NULL;
|
||||
#else
|
||||
AVDictionaryEntry *tag = NULL;
|
||||
#endif
|
||||
int i = 0;
|
||||
|
||||
@@ -291,10 +292,10 @@ static char* searchMeta(AVMetadata *metadata, char* ourTag)
|
||||
{
|
||||
if (strcmp(ourTag, metadata_map[i]) == 0)
|
||||
{
|
||||
#if LIBAVFORMAT_VERSION_MAJOR > 53
|
||||
while ((tag = av_dict_get(metadata, "", tag, AV_DICT_IGNORE_SUFFIX)))
|
||||
#else
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 54
|
||||
while ((tag = av_metadata_get(metadata, "", tag, AV_METADATA_IGNORE_SUFFIX)))
|
||||
#else
|
||||
while ((tag = av_dict_get(metadata, "", tag, AV_DICT_IGNORE_SUFFIX)))
|
||||
#endif
|
||||
{
|
||||
if (strcmp(tag->key, metadata_map[ i + 1 ]) == 0)
|
||||
@@ -435,10 +436,10 @@ if(!context->playback->BackWard && audioMute)
|
||||
}
|
||||
else
|
||||
{
|
||||
#if LIBAVFORMAT_VERSION_MAJOR > 53
|
||||
lastSeek = currentReadPosition = avio_tell(avContext->pb);
|
||||
#else
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 54
|
||||
lastSeek = currentReadPosition = url_ftell(avContext->pb);
|
||||
#else
|
||||
lastSeek = currentReadPosition = avio_tell(avContext->pb);
|
||||
#endif
|
||||
gotlastPts = 1;
|
||||
|
||||
@@ -480,10 +481,10 @@ if(!context->playback->BackWard && audioMute)
|
||||
|
||||
int index = packet.stream_index;
|
||||
|
||||
#if LIBAVFORMAT_VERSION_MAJOR > 53
|
||||
currentReadPosition = avio_tell(avContext->pb);
|
||||
#else
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 54
|
||||
currentReadPosition = url_ftell(avContext->pb);
|
||||
#else
|
||||
currentReadPosition = avio_tell(avContext->pb);
|
||||
#endif
|
||||
|
||||
if (context->manager->video->Command(context, MANAGER_GET_TRACK, &videoTrack) < 0)
|
||||
@@ -539,8 +540,8 @@ if(!context->playback->BackWard && audioMute)
|
||||
latestPts = currentAudioPts;
|
||||
|
||||
#ifdef reverse_playback_2
|
||||
if (currentAudioPts != INVALID_PTS_VALUE && gotlastPts == 1 && (!videoTrack))
|
||||
{
|
||||
if (currentAudioPts != INVALID_PTS_VALUE && gotlastPts == 1 && (!videoTrack))
|
||||
{
|
||||
lastPts = currentAudioPts;
|
||||
gotlastPts = 0;
|
||||
}
|
||||
@@ -586,11 +587,7 @@ if(!context->playback->BackWard && audioMute)
|
||||
avOut.len = decoded_data_size;
|
||||
|
||||
avOut.pts = pts;
|
||||
#if LIBAVFORMAT_VERSION_MAJOR > 53
|
||||
avOut.extradata = (unsigned char *) &extradata;
|
||||
#else
|
||||
avOut.extradata = &extradata;
|
||||
#endif
|
||||
avOut.extralen = sizeof(extradata);
|
||||
avOut.frameRate = 0;
|
||||
avOut.timeScale = 0;
|
||||
@@ -681,7 +678,6 @@ if(!context->playback->BackWard && audioMute)
|
||||
/* no clue yet */
|
||||
}
|
||||
|
||||
|
||||
/* konfetti: I've found cases where the duration from getDurationFromSSALine
|
||||
* is zero (start end and are really the same in text). I think it make's
|
||||
* no sense to pass those.
|
||||
@@ -751,11 +747,7 @@ if(!context->playback->BackWard && audioMute)
|
||||
SubtitleData_t data;
|
||||
data.data = line;
|
||||
data.len = strlen((char*)line);
|
||||
#if LIBAVFORMAT_VERSION_MAJOR > 53
|
||||
data.extradata = (unsigned char *) DEFAULT_ASS_HEAD;
|
||||
#else
|
||||
data.extradata = DEFAULT_ASS_HEAD;
|
||||
#endif
|
||||
data.extralen = strlen(DEFAULT_ASS_HEAD);
|
||||
data.pts = pts;
|
||||
data.duration = duration;
|
||||
@@ -827,14 +819,18 @@ int container_ffmpeg_init(Context_t *context, char * filename)
|
||||
avcodec_register_all();
|
||||
av_register_all();
|
||||
|
||||
#if LIBAVFORMAT_VERSION_MAJOR > 53
|
||||
if ((err = avformat_open_input(&avContext, filename, NULL, 0)) != 0) {
|
||||
#else
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 54
|
||||
if ((err = av_open_input_file(&avContext, filename, NULL, 0, NULL)) != 0) {
|
||||
#else
|
||||
if ((err = avformat_open_input(&avContext, filename, NULL, 0)) != 0) {
|
||||
#endif
|
||||
char error[512];
|
||||
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 54
|
||||
ffmpeg_err("av_open_input_file failed %d (%s)\n", err, filename);
|
||||
#else
|
||||
ffmpeg_err("avformat_open_input failed %d (%s)\n", err, filename);
|
||||
#endif
|
||||
av_strerror(err, error, 512);
|
||||
ffmpeg_err("Cause: %s\n", error);
|
||||
|
||||
@@ -861,10 +857,10 @@ int container_ffmpeg_init(Context_t *context, char * filename)
|
||||
|
||||
ffmpeg_printf(20, "dump format\n");
|
||||
|
||||
#if LIBAVFORMAT_VERSION_MAJOR > 53
|
||||
av_dump_format(avContext, 0, filename, 0);
|
||||
#else
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 54
|
||||
dump_format(avContext, 0, filename, 0);
|
||||
#else
|
||||
av_dump_format(avContext, 0, filename, 0);
|
||||
#endif
|
||||
|
||||
ffmpeg_printf(1, "number streams %d\n", avContext->nb_streams);
|
||||
@@ -997,8 +993,6 @@ int container_ffmpeg_init(Context_t *context, char * filename)
|
||||
printf("AVCODEC__INIT__SUCCESS\n");
|
||||
else
|
||||
printf("AVCODEC__INIT__FAILED\n");
|
||||
|
||||
|
||||
}
|
||||
else if(stream->codec->codec_id == CODEC_ID_AAC) {
|
||||
ffmpeg_printf(10,"Create AAC ExtraData\n");
|
||||
@@ -1315,10 +1309,10 @@ static int container_ffmpeg_stop(Context_t *context) {
|
||||
|
||||
static int container_ffmpeg_seek_bytes(off_t pos) {
|
||||
int flag = AVSEEK_FLAG_BYTE;
|
||||
#if LIBAVFORMAT_VERSION_MAJOR > 53
|
||||
off_t current_pos = avio_tell(avContext->pb);
|
||||
#else
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 54
|
||||
off_t current_pos = url_ftell(avContext->pb);
|
||||
#else
|
||||
off_t current_pos = avio_tell(avContext->pb);
|
||||
#endif
|
||||
|
||||
ffmpeg_printf(20, "seeking to position %lld (bytes)\n", pos);
|
||||
@@ -1332,10 +1326,10 @@ static int container_ffmpeg_seek_bytes(off_t pos) {
|
||||
return cERR_CONTAINER_FFMPEG_ERR;
|
||||
}
|
||||
|
||||
#if LIBAVFORMAT_VERSION_MAJOR > 53
|
||||
ffmpeg_printf(30, "current_pos after seek %lld\n", avio_tell(avContext->pb));
|
||||
#else
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 54
|
||||
ffmpeg_printf(30, "current_pos after seek %lld\n", url_ftell(avContext->pb));
|
||||
#else
|
||||
ffmpeg_printf(30, "current_pos after seek %lld\n", avio_tell(avContext->pb));
|
||||
#endif
|
||||
|
||||
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||
@@ -1345,10 +1339,10 @@ static int container_ffmpeg_seek_bytes(off_t pos) {
|
||||
static int container_ffmpeg_seek_bytes_rel(off_t start, off_t bytes) {
|
||||
int flag = AVSEEK_FLAG_BYTE;
|
||||
off_t newpos;
|
||||
#if LIBAVFORMAT_VERSION_MAJOR > 53
|
||||
off_t current_pos = avio_tell(avContext->pb);
|
||||
#else
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 54
|
||||
off_t current_pos = url_ftell(avContext->pb);
|
||||
#else
|
||||
off_t current_pos = avio_tell(avContext->pb);
|
||||
#endif
|
||||
|
||||
if (start == -1)
|
||||
@@ -1378,10 +1372,10 @@ static int container_ffmpeg_seek_bytes_rel(off_t start, off_t bytes) {
|
||||
return cERR_CONTAINER_FFMPEG_ERR;
|
||||
}
|
||||
|
||||
#if LIBAVFORMAT_VERSION_MAJOR > 53
|
||||
ffmpeg_printf(30, "current_pos after seek %lld\n", avio_tell(avContext->pb));
|
||||
#else
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 54
|
||||
ffmpeg_printf(30, "current_pos after seek %lld\n", url_ftell(avContext->pb));
|
||||
#else
|
||||
ffmpeg_printf(30, "current_pos after seek %lld\n", avio_tell(avContext->pb));
|
||||
#endif
|
||||
|
||||
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||
@@ -1411,10 +1405,10 @@ static int container_ffmpeg_seek_rel(Context_t *context, off_t pos, long long in
|
||||
|
||||
if (pos == -1)
|
||||
{
|
||||
#if LIBAVFORMAT_VERSION_MAJOR > 53
|
||||
pos = avio_tell(avContext->pb);
|
||||
#else
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 54
|
||||
pos = url_ftell(avContext->pb);
|
||||
#else
|
||||
pos = avio_tell(avContext->pb);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1433,7 +1427,6 @@ static int container_ffmpeg_seek_rel(Context_t *context, off_t pos, long long in
|
||||
if (avContext->bit_rate)
|
||||
{
|
||||
sec *= avContext->bit_rate / 8.0;
|
||||
|
||||
ffmpeg_printf(10, "bit_rate %d\n", avContext->bit_rate);
|
||||
}
|
||||
else
|
||||
@@ -1541,10 +1534,10 @@ static int container_ffmpeg_seek(Context_t *context, float sec) {
|
||||
* about 10 seconds, backward does not work.
|
||||
*/
|
||||
|
||||
#if LIBAVFORMAT_VERSION_MAJOR > 53
|
||||
off_t pos = avio_tell(avContext->pb);
|
||||
#else
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 54
|
||||
off_t pos = url_ftell(avContext->pb);
|
||||
#else
|
||||
off_t pos = avio_tell(avContext->pb);
|
||||
#endif
|
||||
|
||||
ffmpeg_printf(10, "pos %lld %d\n", pos, avContext->bit_rate);
|
||||
@@ -1552,7 +1545,6 @@ static int container_ffmpeg_seek(Context_t *context, float sec) {
|
||||
if (avContext->bit_rate)
|
||||
{
|
||||
sec *= avContext->bit_rate / 8.0;
|
||||
|
||||
ffmpeg_printf(10, "bit_rate %d\n", avContext->bit_rate);
|
||||
}
|
||||
else
|
||||
@@ -1659,7 +1651,7 @@ static int container_ffmpeg_swich_subtitle(Context_t* context, int* arg)
|
||||
|
||||
/* konfetti comment: I dont like the mechanism of overwriting
|
||||
* the pointer in infostring. This lead in most cases to
|
||||
* user errors, like it is in the current version (libeplayer2 <-->e2->servicemp3.cpp).
|
||||
* user errors, like it is in the current version (libeplayer2 <-->e2->servicemp3.cpp)
|
||||
* From e2 there is passed a tag=strdup here and we overwrite this
|
||||
* strdupped tag. This lead to dangling pointers which are never freed!
|
||||
* I do not free the string here because this is the wrong way. The mechanism
|
||||
@@ -1718,7 +1710,7 @@ static int container_ffmpeg_get_info(Context_t* context, char ** infoString)
|
||||
return cERR_CONTAINER_FFMPEG_ERR;
|
||||
}
|
||||
|
||||
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||
|
||||
}
|
||||
|
||||
@@ -1791,6 +1783,5 @@ static char *FFMPEG_Capabilities[] = {"avi", "mkv", "mp4", "ts", "mov", "flv", "
|
||||
Container_t FFMPEGContainer = {
|
||||
"FFMPEG",
|
||||
&Command,
|
||||
FFMPEG_Capabilities,
|
||||
|
||||
FFMPEG_Capabilities
|
||||
};
|
||||
|
@@ -50,13 +50,13 @@
|
||||
static short debug_level = 10;
|
||||
|
||||
#define srt_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 srt_printf(level, fmt, x...)
|
||||
#endif
|
||||
|
||||
#ifndef SRT_SILENT
|
||||
#define srt_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
|
||||
#define srt_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||
#else
|
||||
#define srt_err(fmt, x...)
|
||||
#endif
|
||||
@@ -68,7 +68,7 @@ if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x);
|
||||
#define TRACKWRAP 20
|
||||
#define MAXLINELENGTH 80
|
||||
|
||||
static const char FILENAME[] = "text_srt.c";
|
||||
static const char FILENAME[] = __FILE__;
|
||||
|
||||
/* ***************************** */
|
||||
/* Types */
|
||||
@@ -486,5 +486,5 @@ static char *SrtCapabilities[] = { "srt", NULL };
|
||||
Container_t SrtContainer = {
|
||||
"SRT",
|
||||
&Command,
|
||||
SrtCapabilities,
|
||||
SrtCapabilities
|
||||
};
|
||||
|
@@ -50,13 +50,13 @@
|
||||
static short debug_level = 10;
|
||||
|
||||
#define ssa_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 ssa_printf(level, fmt, x...)
|
||||
#endif
|
||||
|
||||
#ifndef SSA_SILENT
|
||||
#define ssa_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
|
||||
#define ssa_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||
#else
|
||||
#define ssa_err(fmt, x...)
|
||||
#endif
|
||||
@@ -71,7 +71,7 @@ if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x);
|
||||
//Buffer size used in getLine function. Do not set to value less than 1 !!!
|
||||
#define SSA_BUFFER_SIZE 14
|
||||
|
||||
static const char FILENAME[] = "text_ssa.c";
|
||||
static const char FILENAME[] = __FILE__;
|
||||
|
||||
/* ***************************** */
|
||||
/* Types */
|
||||
@@ -488,5 +488,5 @@ static char *SsaCapabilities[] = { "ssa", NULL };
|
||||
Container_t SsaContainer = {
|
||||
"SSA",
|
||||
&Command,
|
||||
SsaCapabilities,
|
||||
SsaCapabilities
|
||||
};
|
||||
|
@@ -29,7 +29,7 @@ typedef enum {
|
||||
OUTPUT_SUBTITLE_REGISTER_FUNCTION = 222,
|
||||
OUTPUT_SUBTITLE_REGISTER_BUFFER = 223,
|
||||
OUTPUT_GET_SUBTITLE_OUTPUT,
|
||||
OUTPUT_SET_SUBTITLE_OUTPUT,
|
||||
OUTPUT_SET_SUBTITLE_OUTPUT
|
||||
} OutputCmd_t;
|
||||
|
||||
typedef struct
|
||||
|
@@ -58,7 +58,7 @@ typedef enum {
|
||||
STREAM_TYPE_H264, /* Deprecated */
|
||||
STREAM_TYPE_ASF, /* Needs work so it can be deprecated */
|
||||
STREAM_TYPE_MP4, /* Deprecated */
|
||||
STREAM_TYPE_RAW, /* Deprecated */
|
||||
STREAM_TYPE_RAW /* Deprecated */
|
||||
} stream_type_t;
|
||||
|
||||
/*
|
||||
@@ -322,4 +322,3 @@ typedef dvb_option_t video_option_t;
|
||||
#define AUDIO_GET_PLAY_INFO _IOR('o', 78, audio_play_info_t)
|
||||
|
||||
#endif /* H_DVB_STM_H */
|
||||
|
||||
|
@@ -57,7 +57,7 @@ if (debug_level >= level) printf(x); } while (0)
|
||||
#define cERR_AUDIO_MGR_NO_ERROR 0
|
||||
#define cERR_AUDIO_MGR_ERROR -1
|
||||
|
||||
static const char FILENAME[] = "audio.c";
|
||||
static const char FILENAME[] = __FILE__;
|
||||
|
||||
/* ***************************** */
|
||||
/* Types */
|
||||
@@ -258,6 +258,5 @@ static int Command(void *_context, ManagerCmd_t command, void * argument) {
|
||||
struct Manager_s AudioManager = {
|
||||
"Audio",
|
||||
&Command,
|
||||
NULL,
|
||||
|
||||
NULL
|
||||
};
|
||||
|
@@ -45,7 +45,7 @@ ManagerHandler_t ManagerHandler = {
|
||||
"ManagerHandler",
|
||||
&AudioManager,
|
||||
&VideoManager,
|
||||
&SubtitleManager,
|
||||
&SubtitleManager
|
||||
};
|
||||
|
||||
/* ***************************** */
|
||||
@@ -90,4 +90,3 @@ void freeTrack(Track_t* track)
|
||||
free(track->aacbuf);
|
||||
|
||||
}
|
||||
|
||||
|
@@ -54,7 +54,7 @@ if (debug_level >= level) printf(x); } while (0)
|
||||
#define cERR_SUBTITLE_MGR_NO_ERROR 0
|
||||
#define cERR_SUBTITLE_MGR_ERROR -1
|
||||
|
||||
static const char FILENAME[] = "subtitle.c";
|
||||
static const char FILENAME[] = __FILE__;
|
||||
|
||||
/* ***************************** */
|
||||
/* Types */
|
||||
@@ -248,6 +248,5 @@ static int Command(void *_context, ManagerCmd_t command, void * argument) {
|
||||
struct Manager_s SubtitleManager = {
|
||||
"Subtitle",
|
||||
&Command,
|
||||
NULL,
|
||||
|
||||
NULL
|
||||
};
|
||||
|
@@ -54,7 +54,7 @@ if (debug_level >= level) printf(x); } while (0)
|
||||
#define cERR_VIDEO_MGR_NO_ERROR 0
|
||||
#define cERR_VIDEO_MGR_ERROR -1
|
||||
|
||||
static const char FILENAME[] = "video.c";
|
||||
static const char FILENAME[] = __FILE__;
|
||||
|
||||
/* ***************************** */
|
||||
/* Types */
|
||||
@@ -237,6 +237,5 @@ static int Command(void *_context, ManagerCmd_t command, void * argument) {
|
||||
struct Manager_s VideoManager = {
|
||||
"Video",
|
||||
&Command,
|
||||
NULL,
|
||||
|
||||
NULL
|
||||
};
|
||||
|
@@ -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
|
||||
};
|
||||
|
||||
|
@@ -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
|
||||
};
|
||||
|
@@ -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
|
||||
};
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
};
|
||||
|
||||
|
@@ -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
|
||||
};
|
||||
|
@@ -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
|
||||
};
|
||||
|
@@ -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
|
||||
};
|
||||
|
||||
|
@@ -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
|
||||
};
|
||||
|
@@ -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
|
||||
};
|
||||
|
@@ -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
|
||||
};
|
||||
|
||||
|
@@ -123,4 +123,3 @@ void FlushBits(BitPacker_t * ld)
|
||||
ld->Remaining = 32;
|
||||
ld->BitBuffer = 0;
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
};
|
||||
|
@@ -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
|
||||
};
|
||||
|
@@ -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
|
||||
};
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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
|
||||
};
|
||||
|
||||
|
@@ -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
|
||||
};
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
};
|
||||
|
||||
|
@@ -138,4 +138,3 @@ Writer_t* getDefaultFramebufferWriter()
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@@ -31,16 +31,15 @@
|
||||
|
||||
static short debug_level = 10;
|
||||
|
||||
static const char *FILENAME = "playback.c";
|
||||
#ifdef PLAYBACK_DEBUG
|
||||
#define playback_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 playback_printf(level, fmt, x...)
|
||||
#endif
|
||||
|
||||
#ifndef PLAYBACK_SILENT
|
||||
#define playback_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
|
||||
#define playback_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||
#else
|
||||
#define playback_err(fmt, x...)
|
||||
#endif
|
||||
@@ -227,7 +226,7 @@ static int PlaybackOpen(Context_t *context, char * uri) {
|
||||
|
||||
//free(extension);
|
||||
} /* http */
|
||||
else if (!strncmp("mms://", uri, 6) || !strncmp("rtsp://", uri, 7) || !strncmp("rtmp://", uri, 7)) {
|
||||
else if (!strncmp("mms://", uri, 6) || !strncmp("rtsp://", uri, 7) || !strncmp("rtmp://", uri, 7) || !strncmp("rtmpt://", uri, 8) || !strncmp("rtmpe://", uri, 8) || !strncmp("rtmpte://", uri, 9) || !strncmp("rtmps://", uri, 8) || !strncmp("rtp://", uri, 6)) {
|
||||
/* char * extension = NULL; */
|
||||
context->playback->isFile = 0;
|
||||
context->playback->isHttp = 1;
|
||||
@@ -762,7 +761,7 @@ static int PlaybackSeek(Context_t *context, float * pos) {
|
||||
|
||||
playback_printf(10, "pos: %f\n", *pos);
|
||||
|
||||
if (!context->playback->isHttp && context->playback->isPlaying && !context->playback->isForwarding && !context->playback->BackWard && !context->playback->SlowMotion && !context->playback->isPaused) {
|
||||
if (context->playback->isPlaying && !context->playback->isForwarding && !context->playback->BackWard && !context->playback->SlowMotion && !context->playback->isPaused) {
|
||||
context->playback->isSeeking = 1;
|
||||
|
||||
context->output->Command(context, OUTPUT_CLEAR, NULL);
|
||||
@@ -1058,5 +1057,5 @@ PlaybackHandler_t PlaybackHandler = {
|
||||
0,
|
||||
&Command,
|
||||
"",
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
@@ -16,12 +16,12 @@ static AVFormatContext* avContext = NULL;
|
||||
|
||||
void dump_metadata()
|
||||
{
|
||||
#if LIBAVFORMAT_VERSION_MAJOR > 53
|
||||
AVDictionaryEntry *tag = NULL;
|
||||
while ((tag = av_dict_get(avContext->metadata, "", tag, AV_DICT_IGNORE_SUFFIX)))
|
||||
#else
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 54
|
||||
AVMetadataTag *tag = NULL;
|
||||
while ((tag = av_metadata_get(avContext->metadata, "", tag, AV_METADATA_IGNORE_SUFFIX)))
|
||||
#else
|
||||
AVDictionaryEntry *tag = NULL;
|
||||
while ((tag = av_dict_get(avContext->metadata, "", tag, AV_DICT_IGNORE_SUFFIX)))
|
||||
#endif
|
||||
printf("%s: %s\n", tag->key, tag->value);
|
||||
}
|
||||
@@ -47,14 +47,18 @@ int main(int argc,char* argv[])
|
||||
|
||||
av_register_all();
|
||||
|
||||
#if LIBAVFORMAT_VERSION_MAJOR > 53
|
||||
if ((err = avformat_open_input(&avContext, file, NULL, 0)) != 0) {
|
||||
#else
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 54
|
||||
if ((err = av_open_input_file(&avContext, file, NULL, 0, NULL)) != 0) {
|
||||
#else
|
||||
if ((err = avformat_open_input(&avContext, file, NULL, 0)) != 0) {
|
||||
#endif
|
||||
char error[512];
|
||||
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 54
|
||||
printf("av_open_input_file failed %d (%s)\n", err, file);
|
||||
#else
|
||||
printf("avformat_open_input failed %d (%s)\n", err, file);
|
||||
#endif
|
||||
av_strerror(err, error, 512);
|
||||
printf("Cause: %s\n", error);
|
||||
|
||||
@@ -76,17 +80,16 @@ int main(int argc,char* argv[])
|
||||
|
||||
if (stream)
|
||||
{
|
||||
#if LIBAVFORMAT_VERSION_MAJOR > 53
|
||||
AVDictionaryEntry *tag = NULL;
|
||||
#else
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 54
|
||||
AVMetadataTag *tag = NULL;
|
||||
#endif
|
||||
|
||||
if (stream->metadata != NULL)
|
||||
#if LIBAVFORMAT_VERSION_MAJOR > 53
|
||||
while ((tag = av_dict_get(stream->metadata, "", tag, AV_DICT_IGNORE_SUFFIX)))
|
||||
#else
|
||||
AVDictionaryEntry *tag = NULL;
|
||||
#endif
|
||||
if (stream->metadata != NULL)
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 54
|
||||
while ((tag = av_metadata_get(stream->metadata, "", tag, AV_METADATA_IGNORE_SUFFIX)))
|
||||
#else
|
||||
while ((tag = av_dict_get(stream->metadata, "", tag, AV_DICT_IGNORE_SUFFIX)))
|
||||
#endif
|
||||
printf("%s: %s\n", tag->key, tag->value);
|
||||
}
|
||||
|
Reference in New Issue
Block a user