diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-05-06 02:27:38 +0100 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-05-06 02:27:38 +0100 |
commit | 8ff78df42588e88762aaf1581f0e86a270f4a59d (patch) | |
tree | 7511f7788290a38a78d523d7c824efa31ad5e215 | |
parent | 61445f16252380d4f6b66f2c5680d36e62bbfd0f (diff) | |
parent | d5be45ea2436cdc45f086b54516157b5b2394715 (diff) | |
download | xine-lib-8ff78df42588e88762aaf1581f0e86a270f4a59d.tar.gz xine-lib-8ff78df42588e88762aaf1581f0e86a270f4a59d.tar.bz2 |
Merge from 1.1.
--HG--
rename : include/xine.h.in => include/xine.h
rename : src/xine-utils/attributes.h => include/xine/attributes.h
rename : src/xine-utils/xineutils.h => include/xine/xineutils.h
rename : src/combined/decoder_flac.c => src/combined/flac_decoder.c
rename : src/libxineadec/xine_speex_decoder.c => src/combined/xine_speex_decoder.c
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | include/xine.h | 9 | ||||
-rw-r--r-- | include/xine/attributes.h | 6 | ||||
-rw-r--r-- | include/xine/xineutils.h | 1 | ||||
-rw-r--r-- | m4/attributes.m4 | 259 | ||||
-rw-r--r-- | m4/decoders.m4 | 14 | ||||
-rw-r--r-- | m4/pthreads.m4 | 2 | ||||
-rw-r--r-- | src/combined/ffmpeg/ff_video_decoder.c | 2 | ||||
-rw-r--r-- | src/combined/flac_decoder.c | 2 | ||||
-rw-r--r-- | src/demuxers/demux_real.c | 2 | ||||
-rw-r--r-- | src/demuxers/demux_realaudio.c | 2 | ||||
-rw-r--r-- | src/demuxers/demux_wav.c | 3 | ||||
-rw-r--r-- | src/demuxers/id3.c | 20 | ||||
-rw-r--r-- | src/demuxers/id3.h | 23 | ||||
-rw-r--r-- | src/input/libreal/real.c | 2 | ||||
-rw-r--r-- | src/input/mms.c | 6 | ||||
-rw-r--r-- | src/video_out/video_out_raw.c | 4 | ||||
-rw-r--r-- | src/video_out/video_out_xv.c | 4 | ||||
-rw-r--r-- | src/xine-utils/utils.c | 14 |
19 files changed, 154 insertions, 226 deletions
diff --git a/configure.ac b/configure.ac index a841fe6a0..8d1789bab 100644 --- a/configure.ac +++ b/configure.ac @@ -436,8 +436,6 @@ CC_ATTRIBUTE_PACKED([XINE_PACKED='__attribute__((packed))'], [AC_MSG_WARN([Your compiler doesn't support __attribute__((packed)); xine might not work as expected.])]) AC_DEFINE_UNQUOTED([XINE_PACKED], [$XINE_PACKED], [Mark a structure as being packed]) -CC_ATTRIBUTE_MALLOC - CC_ATTRIBUTE_VISIBILITY([protected], [visibility_export="protected"], [CC_ATTRIBUTE_VISIBILITY([default], [visibility_export="default"])]) @@ -453,6 +451,9 @@ AC_SUBST([VISIBILITY_FLAG]) CC_ATTRIBUTE_SENTINEL CC_ATTRIBUTE_FORMAT CC_ATTRIBUTE_FORMAT_ARG +CC_ATTRIBUTE_DEPRECATED +CC_ATTRIBUTE_UNUSED +CC_ATTRIBUTE_MALLOC CC_CHECK_CFLAGS([-pipe], [miscflags="$miscflags -pipe"]) diff --git a/include/xine.h b/include/xine.h index b349c8c4e..6eaac8975 100644 --- a/include/xine.h +++ b/include/xine.h @@ -1256,12 +1256,9 @@ typedef struct { void *user_data; /* OR'ed frame_format - * a frontend must at least support rgb - * a frontend supporting yuv must support both yv12 and yuy2 - * then possible combinations are: - * XINE_VORAW_RGB ( rgb ) - * XINE_VORAW_YV12|XINE_VORAW_YUY2|XINE_VORAW_RGB ( yv12, yuy2 and rgb ) - * + * Unsupported frame formats are converted to rgb. + * XINE_VORAW_RGB is always assumed by the driver, even if not set. + * So a frontend must at least support rgb. * Be aware that rgb requires more cpu than yuv, * so avoid its usage for video playback. * However, it's usefull for single frame capture (e.g. thumbs) diff --git a/include/xine/attributes.h b/include/xine/attributes.h index b25c76572..c339e7113 100644 --- a/include/xine/attributes.h +++ b/include/xine/attributes.h @@ -51,6 +51,12 @@ # define XINE_SENTINEL #endif +#ifdef SUPPORT_ATTRIBUTE_DEPRECATED +# define XINE_DEPRECATED __attribute__((__deprecated__)) +#else +# define XINE_DEPRECATED +#endif + #ifndef __attr_unused # ifdef SUPPORT_ATTRIBUTE_UNUSED # define __attr_unused __attribute__((__unused__)) diff --git a/include/xine/xineutils.h b/include/xine/xineutils.h index a94835f5a..7eb0acdd8 100644 --- a/include/xine/xineutils.h +++ b/include/xine/xineutils.h @@ -629,6 +629,7 @@ const char *xine_get_homedir(void) XINE_PROTECTED; /* * Get other xine directories. */ +const char *xine_get_pluginroot(void) XINE_PROTECTED; const char *xine_get_plugindir(void) XINE_PROTECTED; const char *xine_get_fontdir(void) XINE_PROTECTED; const char *xine_get_localedir(void) XINE_PROTECTED; diff --git a/m4/attributes.m4 b/m4/attributes.m4 index 737a31bcb..b1f8e5ba2 100644 --- a/m4/attributes.m4 +++ b/m4/attributes.m4 @@ -83,94 +83,105 @@ AC_DEFUN([CC_CHECK_WERROR], [ ]) ]) +AC_DEFUN([CC_CHECK_ATTRIBUTE], [ + AC_REQUIRE([CC_CHECK_WERROR]) + AC_CACHE_CHECK([if $CC supports __attribute__(( ifelse([$2], , [$1], [$2]) ))], + AS_TR_SH([cc_cv_attribute_$1]), + [ac_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $cc_cv_werror" + AC_COMPILE_IFELSE([$3], + [eval "AS_TR_SH([cc_cv_attribute_$1])='yes'"], + [eval "AS_TR_SH([cc_cv_attribute_$1])='no'"]) + CFLAGS="$ac_save_CFLAGS" + ]) + + if eval test [x$]AS_TR_SH([cc_cv_attribute_$1]) = xyes; then + AC_DEFINE(AS_TR_CPP([SUPPORT_ATTRIBUTE_$1]), 1, [Define this if the compiler supports __attribute__(( ifelse([$2], , [$1], [$2]) ))]) + ifelse([$4], , [:], [$4]) + else + ifelse([$5], , [:], [$5]) + fi +]) + AC_DEFUN([CC_ATTRIBUTE_CONSTRUCTOR], [ - AC_REQUIRE([CC_CHECK_WERROR]) - ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $cc_cv_werror" - AC_CACHE_CHECK([if compiler supports __attribute__((constructor))], - [cc_cv_attribute_constructor], - [AC_COMPILE_IFELSE([ - void ctor() __attribute__((constructor)); - void ctor() { int a; }; - ], - [cc_cv_attribute_constructor=yes], - [cc_cv_attribute_constructor=no]) - ]) - CFLAGS="$ac_save_CFLAGS" - - if test "x$cc_cv_attribute_constructor" = "xyes"; then - AC_DEFINE([SUPPORT_ATTRIBUTE_CONSTRUCTOR], 1, [Define this if the compiler supports the constructor attribute]) - $1 - else - true - $2 - fi + CC_CHECK_ATTRIBUTE( + [constructor],, + [void __attribute__((constructor)) ctor() { int a; }], + [$1], + [$2]) ]) AC_DEFUN([CC_ATTRIBUTE_FORMAT], [ - AC_REQUIRE([CC_CHECK_WERROR]) - ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $cc_cv_werror" - AC_CACHE_CHECK([if compiler supports __attribute__((format(printf, n, n)))], - [cc_cv_attribute_format], - [AC_COMPILE_IFELSE([ - void __attribute__((format(printf, 1, 2))) printflike(const char *fmt, ...) { fmt = (void *)0; } - ], - [cc_cv_attribute_format=yes], - [cc_cv_attribute_format=no]) - ]) - CFLAGS="$ac_save_CFLAGS" - - if test "x$cc_cv_attribute_format" = "xyes"; then - AC_DEFINE([SUPPORT_ATTRIBUTE_FORMAT], 1, [Define this if the compiler supports the format attribute]) - $1 - else - true - $2 - fi + CC_CHECK_ATTRIBUTE( + [format], [format(printf, n, n)], + [void __attribute__((format(printf, 1, 2))) printflike(const char *fmt, ...) { fmt = (void *)0; }], + [$1], + [$2]) ]) AC_DEFUN([CC_ATTRIBUTE_FORMAT_ARG], [ - AC_REQUIRE([CC_CHECK_WERROR]) - ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $cc_cv_werror" - AC_CACHE_CHECK([if compiler supports __attribute__((format_arg(printf)))], - [cc_cv_attribute_format_arg], - [AC_COMPILE_IFELSE([ - char *__attribute__((format_arg(1))) gettextlike(const char *fmt) { fmt = (void *)0; } - ], - [cc_cv_attribute_format_arg=yes], - [cc_cv_attribute_format_arg=no]) - ]) - CFLAGS="$ac_save_CFLAGS" - - if test "x$cc_cv_attribute_format_arg" = "xyes"; then - AC_DEFINE([SUPPORT_ATTRIBUTE_FORMAT_ARG], 1, [Define this if the compiler supports the format_arg attribute]) - $1 - else - true - $2 - fi + CC_CHECK_ATTRIBUTE( + [format_arg], [format_arg(printf)], + [char *__attribute__((format_arg(1))) gettextlike(const char *fmt) { fmt = (void *)0; }], + [$1], + [$2]) ]) AC_DEFUN([CC_ATTRIBUTE_VISIBILITY], [ - AC_REQUIRE([CC_CHECK_WERROR]) - AC_CACHE_CHECK([if $CC supports __attribute__((visibility("$1")))], - AS_TR_SH([cc_cv_attribute_visibility_$1]), - [ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $cc_cv_werror" - AC_COMPILE_IFELSE([void __attribute__((visibility("$1"))) $1_function() { }], - [eval "AS_TR_SH([cc_cv_attribute_visibility_$1])='yes'"], - [eval "AS_TR_SH([cc_cv_attribute_visibility_$1])='no'"]) - CFLAGS="$ac_save_CFLAGS" - ]) + CC_CHECK_ATTRIBUTE( + [visibility_$1], [visibility("$1")], + [void __attribute__((visibility("$1"))) $1_function() { }], + [$2], + [$3]) +]) - if eval test [x$]AS_TR_SH([cc_cv_attribute_visibility_$1]) = xyes; then - AC_DEFINE(AS_TR_CPP([SUPPORT_ATTRIBUTE_VISIBILITY_$1]), 1, [Define this if the compiler supports __attribute__((visibility("$1")))]) - ifelse([$2], , [:], [$2]) - else - ifelse([$3], , [:], [$3]) - fi +AC_DEFUN([CC_ATTRIBUTE_NONNULL], [ + CC_CHECK_ATTRIBUTE( + [nonnull], [nonnull()], + [void __attribute__((nonnull())) some_function(void *foo, void *bar) { foo = (void*)0; bar = (void*)0; }], + [$1], + [$2]) +]) + +AC_DEFUN([CC_ATTRIBUTE_UNUSED], [ + CC_CHECK_ATTRIBUTE( + [unused], , + [void some_function(void *foo, __attribute__((unused)) void *bar);], + [$1], + [$2]) +]) + +AC_DEFUN([CC_ATTRIBUTE_SENTINEL], [ + CC_CHECK_ATTRIBUTE( + [sentinel], , + [void some_function(void *foo, ...) __attribute__((sentinel));], + [$1], + [$2]) +]) + +AC_DEFUN([CC_ATTRIBUTE_DEPRECATED], [ + CC_CHECK_ATTRIBUTE( + [deprecated], , + [void some_function(void *foo, ...) __attribute__((deprecated));], + [$1], + [$2]) +]) + +AC_DEFUN([CC_ATTRIBUTE_ALIAS], [ + CC_CHECK_ATTRIBUTE( + [alias], [weak, alias], + [void other_function(void *foo) { } + void some_function(void *foo) __attribute__((weak, alias("other_function")));], + [$1], + [$2]) +]) + +AC_DEFUN([CC_ATTRIBUTE_MALLOC], [ + CC_CHECK_ATTRIBUTE( + [malloc], , + [void * __attribute__((malloc)) my_alloc(int n);], + [$1], + [$2]) ]) AC_DEFUN([CC_FLAG_VISIBILITY], [ @@ -198,53 +209,6 @@ AC_DEFUN([CC_FLAG_VISIBILITY], [ fi ]) -AC_DEFUN([CC_ATTRIBUTE_NONNULL], [ - AC_REQUIRE([CC_CHECK_WERROR]) - ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $cc_cv_werror" - AC_CACHE_CHECK([if compiler supports __attribute__((nonnull()))], - [cc_cv_attribute_nonnull], - [AC_COMPILE_IFELSE([ - void some_function(void *foo, void *bar) __attribute__((nonnull())); - void some_function(void *foo, void *bar) { foo = (void *)0; bar = (void *)0; } - ], - [cc_cv_attribute_nonnull=yes], - [cc_cv_attribute_nonnull=no]) - ]) - CFLAGS="$ac_save_CFLAGS" - - if test "x$cc_cv_attribute_nonnull" = "xyes"; then - AC_DEFINE([SUPPORT_ATTRIBUTE_NONNULL], 1, [Define this if the compiler supports the nonnull attribute]) - $1 - else - true - $2 - fi -]) - -AC_DEFUN([CC_ATTRIBUTE_UNUSED], [ - AC_REQUIRE([CC_CHECK_WERROR]) - ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $cc_cv_werror" - AC_CACHE_CHECK([if compiler supports __attribute__((unused))], - [cc_cv_attribute_unused], - [AC_COMPILE_IFELSE([ - void some_function(void *foo, __attribute__((unused)) void *bar); - ], - [cc_cv_attribute_unused=yes], - [cc_cv_attribute_unused=no]) - ]) - CFLAGS="$ac_save_CFLAGS" - - if test "x$cc_cv_attribute_unused" = "xyes"; then - AC_DEFINE([SUPPORT_ATTRIBUTE_UNUSED], 1, [Define this if the compiler supports the unused attribute]) - $1 - else - true - $2 - fi -]) - AC_DEFUN([CC_FUNC_EXPECT], [ AC_REQUIRE([CC_CHECK_WERROR]) ac_save_CFLAGS="$CFLAGS" @@ -272,53 +236,6 @@ AC_DEFUN([CC_FUNC_EXPECT], [ fi ]) -AC_DEFUN([CC_ATTRIBUTE_SENTINEL], [ - AC_REQUIRE([CC_CHECK_WERROR]) - ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $cc_cv_werror" - AC_CACHE_CHECK([if compiler supports __attribute__((sentinel))], - [cc_cv_attribute_sentinel], - [AC_COMPILE_IFELSE([ - void some_function(void *foo, ...) __attribute__((sentinel)); - ], - [cc_cv_attribute_sentinel=yes], - [cc_cv_attribute_sentinel=no]) - ]) - CFLAGS="$ac_save_CFLAGS" - - if test "x$cc_cv_attribute_sentinel" = "xyes"; then - AC_DEFINE([SUPPORT_ATTRIBUTE_SENTINEL], 1, [Define this if the compiler supports the sentinel attribute]) - $1 - else - true - $2 - fi -]) - -AC_DEFUN([CC_ATTRIBUTE_ALIAS], [ - AC_REQUIRE([CC_CHECK_WERROR]) - ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $cc_cv_werror" - AC_CACHE_CHECK([if compiler supports __attribute__((weak, alias))], - [cc_cv_attribute_alias], - [AC_COMPILE_IFELSE([ - void other_function(void *foo) { } - void some_function(void *foo) __attribute__((weak, alias("other_function"))); - ], - [cc_cv_attribute_alias=yes], - [cc_cv_attribute_alias=no]) - ]) - CFLAGS="$ac_save_CFLAGS" - - if test "x$cc_cv_attribute_alias" = "xyes"; then - AC_DEFINE([SUPPORT_ATTRIBUTE_ALIAS], 1, [Define this if the compiler supports the alias attribute]) - $1 - else - true - $2 - fi -]) - AC_DEFUN([CC_ATTRIBUTE_ALIGNED], [ AC_REQUIRE([CC_CHECK_WERROR]) AC_CACHE_CHECK([highest __attribute__ ((aligned ())) supported], diff --git a/m4/decoders.m4 b/m4/decoders.m4 index 08aa9e8e7..24dc01d13 100644 --- a/m4/decoders.m4 +++ b/m4/decoders.m4 @@ -111,16 +111,16 @@ AC_DEFUN([XINE_DECODER_PLUGINS], [ dnl style for headers. The new style would be preferred actually... AC_CHECK_HEADERS([ffmpeg/avutil.h]) + AC_MSG_RESULT([Using external ffmpeg]) + else AC_MSG_NOTICE([ ********************************************************************* -xine-lib is configured with external ffmpeg. - -This requires the same version of ffmpeg what is included in xine and -you should know what you do. If some problems occur, please try to -use internal ffmpeg. +xine-lib is configured to use internal ffmpeg. + +This copy of ffmpeg is old. You are strongly advised to install a +newer version (including development files) and to reconfigure +xine-lib to use it. *********************************************************************]) - else - AC_MSG_RESULT([Using included ffmpeg]) fi AM_CONDITIONAL([FFMPEG_DISABLE_UNCOMMON_CODECS], [test x"$enable_ffmpeg_uncommon_codecs" = x"no"]) AM_CONDITIONAL([FFMPEG_DISABLE_POPULAR_CODECS], [test x"$enable_ffmpeg_popular_codecs" = x"no"]) diff --git a/m4/pthreads.m4 b/m4/pthreads.m4 index d29f0d660..7f914e562 100644 --- a/m4/pthreads.m4 +++ b/m4/pthreads.m4 @@ -47,7 +47,7 @@ AC_DEFUN([CC_PTHREAD_FLAGS], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include <pthread.h> - void *fakethread(void *arg) { return NULL; } + void *fakethread(void *arg) { (void)arg; return NULL; } pthread_t fakevariable; ]], [[pthread_create(&fakevariable, NULL, &fakethread, NULL);]] diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c index db1e5a9c1..b278f991f 100644 --- a/src/combined/ffmpeg/ff_video_decoder.c +++ b/src/combined/ffmpeg/ff_video_decoder.c @@ -383,7 +383,7 @@ static void init_video_codec (ff_video_decoder_t *this, unsigned int codec_type) /* Some codecs (eg rv10) copy flags in init so it's necessary to set * this flag here in case we are going to use direct rendering */ - if(this->codec->capabilities & CODEC_CAP_DR1) { + if(this->codec->capabilities & CODEC_CAP_DR1 && this->codec->id != CODEC_ID_H264) { this->context->flags |= CODEC_FLAG_EMU_EDGE; } diff --git a/src/combined/flac_decoder.c b/src/combined/flac_decoder.c index 43bad327e..a2631cdc6 100644 --- a/src/combined/flac_decoder.c +++ b/src/combined/flac_decoder.c @@ -158,6 +158,7 @@ flac_write_callback (const FLAC__StreamDecoder *decoder, return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE; } +#ifdef LEGACY_FLAC static void flac_metadata_callback (const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, @@ -180,6 +181,7 @@ flac_metadata_callback (const FLAC__StreamDecoder *decoder, return; } +#endif static void flac_error_callback (const FLAC__StreamDecoder *decoder, diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c index 45e8a2e38..cc86e94b2 100644 --- a/src/demuxers/demux_real.c +++ b/src/demuxers/demux_real.c @@ -240,7 +240,7 @@ static void real_parse_index(demux_real_t *this) { if(index && entries) /* Allocate memory for index */ - *index = xine_xcalloc(entries, sizeof(real_index_entry_t)); + *index = calloc(entries, sizeof(real_index_entry_t)); if(index && entries && *index) { /* Read index */ diff --git a/src/demuxers/demux_realaudio.c b/src/demuxers/demux_realaudio.c index 2873a522e..6a88a8065 100644 --- a/src/demuxers/demux_realaudio.c +++ b/src/demuxers/demux_realaudio.c @@ -243,12 +243,10 @@ static int demux_ra_send_chunk(demux_plugin_t *this_gen) { } if (this->audio_type == BUF_AUDIO_28_8 || this->audio_type == BUF_AUDIO_SIPRO) { - int x; uint8_t * buffer; buffer = this->frame_buffer; if (this->audio_type == BUF_AUDIO_SIPRO) { - int n; int len = this->h * this->w; if(this->input->read(this->input, this->frame_buffer, len) < len) { xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, diff --git a/src/demuxers/demux_wav.c b/src/demuxers/demux_wav.c index 2beb43291..e2cb95035 100644 --- a/src/demuxers/demux_wav.c +++ b/src/demuxers/demux_wav.c @@ -111,9 +111,6 @@ static int find_chunk_by_tag(demux_wav_t *this, const uint32_t given_chunk_tag, /* returns 1 if the WAV file was opened successfully, 0 otherwise */ static int open_wav_file(demux_wav_t *this) { uint8_t signature[WAV_SIGNATURE_SIZE]; - uint32_t chunk_tag; - uint32_t chunk_size; - uint8_t chunk_preamble[8]; off_t wave_pos; /* check the signature */ diff --git a/src/demuxers/id3.c b/src/demuxers/id3.c index 71cb5e743..b57d1bd82 100644 --- a/src/demuxers/id3.c +++ b/src/demuxers/id3.c @@ -329,9 +329,9 @@ static int id3v22_interp_frame(input_plugin_t *input, } -int id3v22_parse_tag(input_plugin_t *input, - xine_stream_t *stream, - uint32_t id3_signature) { +static int id3v22_parse_tag(input_plugin_t *input, + xine_stream_t *stream, + uint32_t id3_signature) { id3v2_header_t tag_header; id3v22_frame_header_t tag_frame_header; int pos = 0; @@ -514,9 +514,9 @@ static int id3v23_interp_frame(input_plugin_t *input, } } -int id3v23_parse_tag(input_plugin_t *input, - xine_stream_t *stream, - uint32_t id3_signature) { +static int id3v23_parse_tag(input_plugin_t *input, + xine_stream_t *stream, + uint32_t id3_signature) { id3v2_header_t tag_header; id3v23_frame_header_t tag_frame_header; id3v23_frame_ext_header_t tag_frame_ext_header; @@ -759,9 +759,9 @@ static int id3v24_interp_frame(input_plugin_t *input, } } -int id3v24_parse_tag(input_plugin_t *input, - xine_stream_t *stream, - uint32_t id3_signature) { +static int id3v24_parse_tag(input_plugin_t *input, + xine_stream_t *stream, + uint32_t id3_signature) { id3v2_header_t tag_header; id3v24_frame_header_t tag_frame_header; id3v24_frame_ext_header_t tag_frame_ext_header; @@ -849,6 +849,6 @@ int id3v2_parse_tag(input_plugin_t *input, default: xprintf(stream->xine, XINE_VERBOSITY_LOG, LOG_MODULE ": Unknown ID3v2 signature: 0x%08x.\n", be2me_32(id3_signature)); } - + return 0; } diff --git a/src/demuxers/id3.h b/src/demuxers/id3.h index 542a17bc4..837d8243f 100644 --- a/src/demuxers/id3.h +++ b/src/demuxers/id3.h @@ -152,19 +152,16 @@ typedef struct { int id3v1_parse_tag (input_plugin_t *input, xine_stream_t *stream); -int id3v22_parse_tag(input_plugin_t *input, - xine_stream_t *stream, - uint32_t id3_signature); - -int id3v23_parse_tag(input_plugin_t *input, - xine_stream_t *stream, - uint32_t id3_signature); - -int id3v24_parse_tag(input_plugin_t *input, - xine_stream_t *stream, - uint32_t id3_signature); - -/* Generic function that switch between the three above */ +/** + * @brief Generic function for ID3v2 tags parsing. + * @param input Pointer to the input plugin used by the demuxer, used + * to access the tag's data. + * @param stream Pointer to the xine stream currently being read. + * @param mp3_frame_header Header of the MP3 frame carrying the tag. + * + * @note This function will take care of calling the proper function for + * parsing ID3v2.2, ID3v2.3 or ID3v2.4 tags. + */ int id3v2_parse_tag(input_plugin_t *input, xine_stream_t *stream, uint32_t id3_signature); diff --git a/src/input/libreal/real.c b/src/input/libreal/real.c index 213769ff5..71bbfba60 100644 --- a/src/input/libreal/real.c +++ b/src/input/libreal/real.c @@ -659,7 +659,7 @@ rmff_header_t *real_setup_and_get_header(rtsp_t *rtsp_session, uint32_t bandwid lprintf("Stream description size: %i\n", size); - description = calloc(size+1, sizeof(char)); + description = malloc(size+1); if( rtsp_read_data(rtsp_session, description, size) <= 0) { xine_buffer_free(buf); diff --git a/src/input/mms.c b/src/input/mms.c index ba584b4f8..69694aff2 100644 --- a/src/input/mms.c +++ b/src/input/mms.c @@ -202,9 +202,9 @@ static void mms_buffer_put_64 (mms_buffer_t *mms_buffer, uint64_t value) { } +#ifdef LOG static void print_command (char *data, int len) { -#ifdef LOG int i; int dir = _X_LE_32 (data + 36) >> 16; int comm = _X_LE_32 (data + 36) & 0xFFFF; @@ -240,8 +240,10 @@ static void print_command (char *data, int len) { if (len > CMD_HEADER_LEN) printf ("\n"); printf ("----------------------------------------------\n"); +} +#else +# define print_command(data, len) #endif -} diff --git a/src/video_out/video_out_raw.c b/src/video_out/video_out_raw.c index 87d1afb4f..ff239608e 100644 --- a/src/video_out/video_out_raw.c +++ b/src/video_out/video_out_raw.c @@ -208,7 +208,6 @@ static void raw_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_ static void raw_overlay_end (vo_driver_t *this_gen, vo_frame_t *vo_img) { raw_driver_t *this = (raw_driver_t *) this_gen; - int i; if ( !this->ovl_changed ) return; @@ -322,7 +321,6 @@ static vo_frame_t *raw_alloc_frame (vo_driver_t *this_gen) static void raw_update_frame_format (vo_driver_t *this_gen, vo_frame_t *frame_gen, uint32_t width, uint32_t height, double ratio, int format, int flags) { - raw_driver_t *this = (raw_driver_t *) this_gen; raw_frame_t *frame = (raw_frame_t *) frame_gen; /* Check frame size and format and reallocate if necessary */ @@ -429,8 +427,6 @@ static void raw_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) static int raw_get_property (vo_driver_t *this_gen, int property) { - raw_driver_t *this = (raw_driver_t *) this_gen; - switch (property) { case VO_PROP_ASPECT_RATIO: return XINE_VO_ASPECT_AUTO; diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index 0026bd8af..89b6e9d9e 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -720,8 +720,8 @@ static void xv_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { if( factor > 1 ) { - lprintf( "%s PutImage %dX interval (%fs)\n", - log_line_prefix(), factor, elapse_time ); + lprintf( "%s PutImage %dX interval (%fs)\n", + LOG_MODULE, factor, elapse_time ); } } diff --git a/src/xine-utils/utils.c b/src/xine-utils/utils.c index c414f481f..5b037f510 100644 --- a/src/xine-utils/utils.c +++ b/src/xine-utils/utils.c @@ -405,6 +405,20 @@ static void xine_get_rootdir(char *rootdir, size_t maxlen) { if ((s = strrchr(rootdir, XINE_DIRECTORY_SEPARATOR_CHAR))) *s = '\0'; } +const char *xine_get_pluginroot(void) { + static char pluginroot[1024] = {0, }; + + if (!pluginroot[0]) { + char *sep, *sep2; + strcpy (pluginroot, xine_get_plugindir ()); + sep = strrchr (pluginroot, '/'); + sep2 = strrchr (pluginroot, '\\'); + *(sep < sep2 ? sep : sep2) = 0; + } + + return pluginroot; +} + const char *xine_get_plugindir(void) { static char plugindir[1024] = {0, }; |