summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2008-05-06 02:27:38 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2008-05-06 02:27:38 +0100
commit8ff78df42588e88762aaf1581f0e86a270f4a59d (patch)
tree7511f7788290a38a78d523d7c824efa31ad5e215 /src
parent61445f16252380d4f6b66f2c5680d36e62bbfd0f (diff)
parentd5be45ea2436cdc45f086b54516157b5b2394715 (diff)
downloadxine-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
Diffstat (limited to 'src')
-rw-r--r--src/combined/ffmpeg/ff_video_decoder.c2
-rw-r--r--src/combined/flac_decoder.c2
-rw-r--r--src/demuxers/demux_real.c2
-rw-r--r--src/demuxers/demux_realaudio.c2
-rw-r--r--src/demuxers/demux_wav.c3
-rw-r--r--src/demuxers/id3.c20
-rw-r--r--src/demuxers/id3.h23
-rw-r--r--src/input/libreal/real.c2
-rw-r--r--src/input/mms.c6
-rw-r--r--src/video_out/video_out_raw.c4
-rw-r--r--src/video_out/video_out_xv.c4
-rw-r--r--src/xine-utils/utils.c14
12 files changed, 45 insertions, 39 deletions
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, };