From b627f62de4dbc6c3b56126bf26be0de7ad4f65d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 4 Jul 2008 15:25:28 +0200 Subject: Use calloc to allocate the lists of audio and video ports. --HG-- extra : transplant_source : T6%E7%60%7F%D4%60%C8l4%9AX%97%86hrR%AD%13%C0 --- src/xine-engine/post.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/post.c b/src/xine-engine/post.c index 4d8032bc0..af791c1f7 100644 --- a/src/xine-engine/post.c +++ b/src/xine-engine/post.c @@ -30,13 +30,10 @@ void _x_post_init(post_plugin_t *post, int num_audio_inputs, int num_video_inputs) { - int audio_inputs_size = (num_audio_inputs + 1) * sizeof(xine_audio_port_t *); - int video_inputs_size = (num_video_inputs + 1) * sizeof(xine_video_port_t *); - post->input = xine_list_new(); post->output = xine_list_new(); - post->xine_post.audio_input = (xine_audio_port_t **)xine_xmalloc(audio_inputs_size); - post->xine_post.video_input = (xine_video_port_t **)xine_xmalloc(video_inputs_size); + post->xine_post.audio_input = calloc(num_audio_inputs + 1, sizeof(xine_audio_port_t *)); + post->xine_post.audio_input = calloc(num_video_inputs + 1, sizeof(xine_video_port_t *)); } -- cgit v1.2.3 From 53d779e680b56506f5e882fe777206ef45e0ff79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 4 Jul 2008 15:25:46 +0200 Subject: Use calloc to allocate the area for the OSD. --HG-- extra : transplant_source : %99%9B%D5%B3Ro%87%BFV%E9%2BY%AA%83QE/%CD%5D%ED --- src/xine-engine/osd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/osd.c b/src/xine-engine/osd.c index 36ce47e44..05acd4779 100644 --- a/src/xine-engine/osd.c +++ b/src/xine-engine/osd.c @@ -145,7 +145,7 @@ static osd_object_t *XINE_MALLOC osd_new_object (osd_renderer_t *this, int width osd->width = width; osd->height = height; - osd->area = xine_xmalloc( width * height ); + osd->area = calloc(width, height); osd->x1 = width; osd->y1 = height; -- cgit v1.2.3 From 9c387686faaecae77027f0df541ddaf66fb78897 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 4 Jul 2008 15:36:39 +0200 Subject: Add a _x_is_fourcc() inline function to wrap around memcmp(). This should be simpler and faster for the compiler to optimise rather than a _X_[BLM]E_32 macro and a comparison. --HG-- extra : transplant_source : %C7%1C%16%17N%3Bh%9B%EB%AA%00%A9%F1%15%C8%CB%8A%99%EE%7D --- src/xine-engine/buffer.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/xine-engine') diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h index 5e43028e8..34e6f7c1d 100644 --- a/src/xine-engine/buffer.h +++ b/src/xine-engine/buffer.h @@ -39,6 +39,7 @@ extern "C" { #include "config.h" #endif +#include #include #include #include @@ -672,6 +673,10 @@ void _x_bmiheader_le2me( xine_bmiheader *bih ) XINE_PROTECTED; /* convert xine_waveformatex struct from little endian */ void _x_waveformatex_le2me( xine_waveformatex *wavex ) XINE_PROTECTED; +static inline _x_is_fourcc(void *ptr, void *tag) { + return memcmp(ptr, tag, 4) == 0; +} + #ifdef __cplusplus } #endif -- cgit v1.2.3 From 606022ce80723be1c8660c52ab4953ba44cc239b Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sun, 6 Jul 2008 23:41:16 +0100 Subject: Fix a stupid bug in post-plugin initialisation. --- src/xine-engine/post.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/post.c b/src/xine-engine/post.c index af791c1f7..aa182d627 100644 --- a/src/xine-engine/post.c +++ b/src/xine-engine/post.c @@ -33,7 +33,7 @@ void _x_post_init(post_plugin_t *post, int num_audio_inputs, int num_video_input post->input = xine_list_new(); post->output = xine_list_new(); post->xine_post.audio_input = calloc(num_audio_inputs + 1, sizeof(xine_audio_port_t *)); - post->xine_post.audio_input = calloc(num_video_inputs + 1, sizeof(xine_video_port_t *)); + post->xine_post.video_input = calloc(num_video_inputs + 1, sizeof(xine_video_port_t *)); } -- cgit v1.2.3 From db77cc621ac71f2a18aba0c2072c3d379e871e85 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Tue, 8 Jul 2008 22:49:00 +0200 Subject: Fix compilation for pthread support provided by PTHREAD_{CFLAGS+LIBS} includes which includes . As all xine sources include , the PTHREAD_CFLAGS are always needed. This patch removed it from two Makefile.am and adds them to CPPFLAGS --- src/xine-engine/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/Makefile.am b/src/xine-engine/Makefile.am index 03176fb80..17dd96b10 100644 --- a/src/xine-engine/Makefile.am +++ b/src/xine-engine/Makefile.am @@ -1,8 +1,8 @@ include $(top_srcdir)/misc/Makefile.common include $(top_srcdir)/lib/Makefile.common -AM_CFLAGS = $(X_CFLAGS) $(FT2_CFLAGS) $(FONTCONFIG_CFLAGS) $(PTHREAD_CFLAGS) $(VISIBILITY_FLAG) -AM_CPPFLAGS = $(ZLIB_CPPFLAGS) $(PTHREAD_CFLAGS) -DXINE_LIBRARY_COMPILE +AM_CFLAGS = $(X_CFLAGS) $(FT2_CFLAGS) $(FONTCONFIG_CFLAGS) $(VISIBILITY_FLAG) +AM_CPPFLAGS = $(ZLIB_CPPFLAGS) -DXINE_LIBRARY_COMPILE LIBTOOL = $(SHELL) $(top_builddir)/libtool lib_LTLIBRARIES = libxine.la -- cgit v1.2.3 From 20697e3c7d3c2516a8a8d4a9232c70be79815301 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Wed, 9 Jul 2008 22:49:22 +0200 Subject: Don't try to load static libraries on mingw32 dlopen of a static library causes a Windows error dialog otherwise. just ignore *.dll.a in plugins folder --- src/xine-engine/load_plugins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index a71092761..3d1c0e4a8 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -592,7 +592,7 @@ static void collect_plugins(xine_t *this, char *path){ #if defined(__hpux) if(!strstr(str, ".sl") #elif defined(__CYGWIN__) || defined(WIN32) - if(!strstr(str, ".dll") + if(!strstr(str, ".dll") || strstr(str, ".dll.a") #else if(!strstr(str, ".so") #endif -- cgit v1.2.3 From 49884786e3f639a89910c27bdfc96dfe0f7799b1 Mon Sep 17 00:00:00 2001 From: Jason Tackaberry Date: Sat, 12 Jul 2008 23:52:02 +0100 Subject: xine_get_stream_info() not returning values for skipped/discarded frames When passing XINE_STREAM_INFO_SKIPPED_FRAMES or XINE_STREAM_INFO_DISCARDED_FRAMES to xine_get_stream_info(), the return value is always 0, even if there are skipped or discarded frames. --- src/xine-engine/xine_interface.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/xine-engine') diff --git a/src/xine-engine/xine_interface.c b/src/xine-engine/xine_interface.c index 415ceec56..d1d5a18d9 100644 --- a/src/xine-engine/xine_interface.c +++ b/src/xine-engine/xine_interface.c @@ -739,6 +739,8 @@ uint32_t xine_get_stream_info (xine_stream_t *stream, int info) { case XINE_STREAM_INFO_IGNORE_AUDIO: case XINE_STREAM_INFO_IGNORE_SPU: case XINE_STREAM_INFO_VIDEO_HAS_STILL: + case XINE_STREAM_INFO_SKIPPED_FRAMES: + case XINE_STREAM_INFO_DISCARDED_FRAMES: case XINE_STREAM_INFO_VIDEO_AFD: case XINE_STREAM_INFO_DVD_TITLE_NUMBER: case XINE_STREAM_INFO_DVD_TITLE_COUNT: -- cgit v1.2.3 From 0eabb0332dd91fdcd5bccfbdd02862ae7d34f681 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Tue, 15 Jul 2008 12:28:58 +0100 Subject: Recognise AMR audio (normally found in 3GP files). --- src/xine-engine/buffer.h | 2 ++ src/xine-engine/buffer_types.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+) (limited to 'src/xine-engine') diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h index 34e6f7c1d..97df4d2ae 100644 --- a/src/xine-engine/buffer.h +++ b/src/xine-engine/buffer.h @@ -260,6 +260,8 @@ extern "C" { #define BUF_AUDIO_FLVADPCM 0x033C0000 #define BUF_AUDIO_WAVPACK 0x033D0000 #define BUF_AUDIO_MP3ADU 0x033E0000 +#define BUF_AUDIO_AMR_NB 0x033F0000 +#define BUF_AUDIO_AMR_WB 0x03400000 /* spu buffer types: */ diff --git a/src/xine-engine/buffer_types.c b/src/xine-engine/buffer_types.c index 26adc1b3c..688ed1609 100644 --- a/src/xine-engine/buffer_types.c +++ b/src/xine-engine/buffer_types.c @@ -1145,6 +1145,20 @@ static const audio_db_t audio_db[] = { BUF_AUDIO_WAVPACK, "Wavpack" }, +{ + { + ME_FOURCC('s', 'a', 'm', 'r'), + }, + BUF_AUDIO_AMR_NB, + "AMR narrow band" +}, +{ + { + ME_FOURCC('s', 'a', 'w', 'b'), + }, + BUF_AUDIO_AMR_WB, + "AMR wide band" +}, { { 0 }, 0, "last entry" } }; -- cgit v1.2.3 From 73afa8058fdcd0fdb699c8d4802981980e28e0a5 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Wed, 16 Jul 2008 13:41:30 +0100 Subject: Add FourCC code for Wavpack. --- src/xine-engine/buffer_types.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/xine-engine') diff --git a/src/xine-engine/buffer_types.c b/src/xine-engine/buffer_types.c index 688ed1609..5c3ddf65a 100644 --- a/src/xine-engine/buffer_types.c +++ b/src/xine-engine/buffer_types.c @@ -1140,7 +1140,7 @@ static const audio_db_t audio_db[] = { }, { { - 0 + ME_FOURCC('W', 'V', 'P', 'K'), }, BUF_AUDIO_WAVPACK, "Wavpack" -- cgit v1.2.3 From 2dc2dea3f814ef273456136083fa726dce23e24b Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Wed, 16 Jul 2008 13:58:41 +0100 Subject: Add a buffer types entry for TTA. --- src/xine-engine/buffer_types.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/xine-engine') diff --git a/src/xine-engine/buffer_types.c b/src/xine-engine/buffer_types.c index 5c3ddf65a..e454a0fe2 100644 --- a/src/xine-engine/buffer_types.c +++ b/src/xine-engine/buffer_types.c @@ -1159,6 +1159,13 @@ static const audio_db_t audio_db[] = { BUF_AUDIO_AMR_WB, "AMR wide band" }, +{ + { + ME_FOURCC('T', 'T', 'A', '1'), + }, + BUF_AUDIO_TTA, + "True Audio Lossless" +}, { { 0 }, 0, "last entry" } }; -- cgit v1.2.3 From f1382ea01b368dc1d8044b368f602aad87f6468e Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Wed, 16 Jul 2008 14:08:24 +0100 Subject: Add support for the Snow video codec. --- src/xine-engine/buffer.h | 1 + src/xine-engine/buffer_types.c | 8 ++++++++ 2 files changed, 9 insertions(+) (limited to 'src/xine-engine') diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h index 97df4d2ae..4176b89e5 100644 --- a/src/xine-engine/buffer.h +++ b/src/xine-engine/buffer.h @@ -192,6 +192,7 @@ extern "C" { #define BUF_VIDEO_THEORA_RAW 0x02640000 #define BUF_VIDEO_VC1 0x02650000 #define BUF_VIDEO_VMNC 0x02660000 +#define BUF_VIDEO_SNOW 0x02670000 /* audio buffer types: (please keep in sync with buffer_types.c) */ diff --git a/src/xine-engine/buffer_types.c b/src/xine-engine/buffer_types.c index e454a0fe2..911e123ed 100644 --- a/src/xine-engine/buffer_types.c +++ b/src/xine-engine/buffer_types.c @@ -779,6 +779,14 @@ static const video_db_t video_db[] = { BUF_VIDEO_VMNC, "VMware Screen Codec" }, +{ + { + ME_FOURCC('S','N','O','W'), + 0 + }, + BUF_VIDEO_SNOW, + "Snow" +}, { { 0 }, 0, "last entry" } }; -- cgit v1.2.3