diff options
| author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-06-20 16:38:25 +0100 |
|---|---|---|
| committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-06-20 16:38:25 +0100 |
| commit | 3ce0de86ad429962ab581b9af762aa5dc9d3f156 (patch) | |
| tree | 4640aaa3ece95b03f3ee7ef74e5162005347753a /src/xine-engine | |
| parent | 17c9a01cbafd5ff0e6645f96f8ac084fbf239e4d (diff) | |
| parent | f3974e74f2f1548bf07604fddfa60cf75b2fda57 (diff) | |
| download | xine-lib-3ce0de86ad429962ab581b9af762aa5dc9d3f156.tar.gz xine-lib-3ce0de86ad429962ab581b9af762aa5dc9d3f156.tar.bz2 | |
Merge the avutil branch; port the "raw" video output plugin.
--HG--
rename : src/combined/ffmpeg/ff_dvaudio_decoder.c => src/audio_dec/ff_dvaudio_decoder.c
rename : src/combined/ffmpeg/ffmpeg_encoder.c => src/dxr3/ffmpeg_encoder.c
Diffstat (limited to 'src/xine-engine')
| -rw-r--r-- | src/xine-engine/Makefile.am | 6 | ||||
| -rw-r--r-- | src/xine-engine/buffer.c | 15 | ||||
| -rw-r--r-- | src/xine-engine/configfile.c | 15 |
3 files changed, 21 insertions, 15 deletions
diff --git a/src/xine-engine/Makefile.am b/src/xine-engine/Makefile.am index 5792b667d..e32f2d2f4 100644 --- a/src/xine-engine/Makefile.am +++ b/src/xine-engine/Makefile.am @@ -1,7 +1,8 @@ include $(top_srcdir)/misc/Makefile.common include $(top_srcdir)/lib/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(X_CFLAGS) $(FT2_CFLAGS) $(FONTCONFIG_CFLAGS) $(VISIBILITY_FLAG) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(X_CFLAGS) $(FT2_CFLAGS) $(FONTCONFIG_CFLAGS) \ + $(AVUTIL_CFLAGS) $(VISIBILITY_FLAG) AM_CPPFLAGS = $(XDG_BASEDIR_CPPFLAGS) $(ZLIB_CPPFLAGS) -DXINE_LIBRARY_COMPILE XINEUTILS_LIB = $(top_builddir)/src/xine-utils/libxineutils.la @@ -31,7 +32,8 @@ libxine_la_DEPENDENCIES = $(XINEUTILS_LIB) $(XDG_BASEDIR_DEPS) \ $(pthread_dep) $(LIBXINEPOSIX) libxine_la_LIBADD = $(PTHREAD_LIBS) $(DYNAMIC_LD_LIBS) $(LTLIBINTL) $(ZLIB_LIBS) \ -lm $(XINEUTILS_LIB) $(LTLIBICONV) $(FT2_LIBS) $(FONTCONFIG_LIBS) \ - $(LIBXINEPOSIX) $(RT_LIBS) $(NET_LIBS) $(XDG_BASEDIR_LIBS) + $(LIBXINEPOSIX) $(RT_LIBS) $(NET_LIBS) $(XDG_BASEDIR_LIBS) \ + $(AVUTIL_LIBS) libxine_la_LDFLAGS = $(AM_LDFLAGS) $(def_ldflags) $(GCSECTIONS) \ -version-info $(XINE_LT_CURRENT):$(XINE_LT_REVISION):$(XINE_LT_AGE) diff --git a/src/xine-engine/buffer.c b/src/xine-engine/buffer.c index defa572db..563999bbf 100644 --- a/src/xine-engine/buffer.c +++ b/src/xine-engine/buffer.c @@ -36,6 +36,8 @@ #include <stdlib.h> #include <assert.h> +#include <mem.h> + /********** logging **********/ #define LOG_MODULE "buffer" #define LOG_VERBOSE @@ -358,7 +360,7 @@ static void fifo_buffer_dispose (fifo_buffer_t *this) { received++; } - free (this->buffer_pool_base); + av_free (this->buffer_pool_base); pthread_mutex_destroy(&this->mutex); pthread_cond_destroy(&this->not_empty); pthread_mutex_destroy(&this->buffer_pool_mutex); @@ -497,7 +499,6 @@ fifo_buffer_t *_x_fifo_buffer_new (int num_buffers, uint32_t buf_size) { fifo_buffer_t *this; int i; - int alignment = 2048; unsigned char *multi_buffer = NULL; this = calloc(1, sizeof(fifo_buffer_t)); @@ -527,15 +528,11 @@ fifo_buffer_t *_x_fifo_buffer_new (int num_buffers, uint32_t buf_size) { */ - if (buf_size % alignment != 0) - buf_size += alignment - (buf_size % alignment); - /* - printf ("Allocating %d buffers of %ld bytes in one chunk (alignment = %d)\n", - num_buffers, (long int) buf_size, alignment); + printf ("Allocating %d buffers of %ld bytes in one chunk\n", + num_buffers, (long int) buf_size); */ - multi_buffer = xine_xmalloc_aligned (alignment, num_buffers * buf_size, - &this->buffer_pool_base); + multi_buffer = this->buffer_pool_base = av_mallocz (num_buffers * buf_size); this->buffer_pool_top = NULL; diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c index afd99db65..91113cdfc 100644 --- a/src/xine-engine/configfile.c +++ b/src/xine-engine/configfile.c @@ -33,7 +33,7 @@ #include <unistd.h> #include <xine/configfile.h> #include "bswap.h" -#include "base64.h" +#include <base64.h> #define LOG_MODULE "configfile" #define LOG_VERBOSE @@ -1341,7 +1341,12 @@ static char* config_get_serialized_entry (config_values_t *this, const char *key } /* and now the output encoding */ - output = _x_base64_encode (buffer, total_len, &output_len); + /* We're going to encode total_len bytes in base64 + * libavutil's base64 encoding functions want the size to + * be at least len * 4 / 3 + 12, so let's use that! + */ + output = malloc(total_len * 4 / 3 + 12); + av_base64_encode(output, total_len * 4 / 3 + 12, buffer, total_len); free(buffer); } @@ -1409,11 +1414,13 @@ static char* config_register_serialized_entry (config_values_t *this, const char int bytes; int pos; void *output = NULL; - unsigned long output_len; + size_t output_len; int value_count = 0; int i; - output = _x_base64_decode (value, strlen(value), &output_len); + output_len = strlen(value) * 3 / 4 + 1; + output = malloc(output_len); + av_base64_decode(output, value, output_len); pos = 0; pos += bytes = get_int(output, output_len, pos, &type); |
