summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2001-11-17 14:26:36 +0000
committerDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2001-11-17 14:26:36 +0000
commitbacac99192b65faed1a0047a8be5b95abf15873d (patch)
treec1ca0949f9cb222c8ef6305d8150ca4d9e85b4a7
parent75a1024fb27dbff9c4bfc948392910af94797683 (diff)
downloadxine-lib-bacac99192b65faed1a0047a8be5b95abf15873d.tar.gz
xine-lib-bacac99192b65faed1a0047a8be5b95abf15873d.tar.bz2
Add 'xine_' prefix to all of xine-utils functions (what about cpu
acceleration?). Merge xine-utils header files to a new one "xineutils.h". Update xine-lib C/headers to reflect those changes. dxr3 headers are no more installed ine $includdir, but $includdir/xine. CVS patchset: 1054 CVS date: 2001/11/17 14:26:36
-rw-r--r--configure.in3
-rw-r--r--src/audio_out/audio_alsa05_out.c5
-rw-r--r--src/audio_out/audio_alsa_out.c5
-rw-r--r--src/audio_out/audio_arts_out.c5
-rw-r--r--src/audio_out/audio_esd_out.c5
-rw-r--r--src/audio_out/audio_irixal_out.c5
-rw-r--r--src/audio_out/audio_oss_out.c5
-rw-r--r--src/audio_out/audio_sun_out.c6
-rw-r--r--src/demuxers/demux_asf.c12
-rw-r--r--src/demuxers/demux_avi.c17
-rw-r--r--src/demuxers/demux_elem.c4
-rw-r--r--src/demuxers/demux_mpeg.c7
-rw-r--r--src/demuxers/demux_mpeg_block.c9
-rw-r--r--src/demuxers/demux_mpgaudio.c4
-rw-r--r--src/demuxers/demux_ogg.c7
-rw-r--r--src/demuxers/demux_pes.c7
-rw-r--r--src/demuxers/demux_qt.c9
-rw-r--r--src/demuxers/demux_ts.c6
-rw-r--r--src/dxr3/Makefile.am23
-rw-r--r--src/dxr3/dxr3_video_out.h4
-rw-r--r--src/dxr3/dxr3_vo_encoder.c4
-rw-r--r--src/input/input_dvd.c16
-rw-r--r--src/input/input_file.c32
-rw-r--r--src/input/input_http.c8
-rw-r--r--src/input/input_net.c4
-rw-r--r--src/input/input_rtp.c8
-rw-r--r--src/input/input_stdin_fifo.c6
-rw-r--r--src/input/input_vcd.c16
-rw-r--r--src/input/read_cache.c12
-rw-r--r--src/liba52/imdct.c2
-rw-r--r--src/liba52/xine_decoder.c6
-rw-r--r--src/libdivx4/xine_decoder.c19
-rw-r--r--src/libffmpeg/libavcodec/dsputil.c4
-rw-r--r--src/libffmpeg/libavcodec/dsputil.h2
-rw-r--r--src/libffmpeg/libavcodec/dsputil_mmx.c4
-rw-r--r--src/libffmpeg/libavcodec/idct_mmx.c2
-rw-r--r--src/libffmpeg/libavcodec/mpegvideo_mmx.c4
-rw-r--r--src/libffmpeg/xine_decoder.c13
-rw-r--r--src/libmpeg2/decode.c9
-rw-r--r--src/libmpeg2/idct.c2
-rw-r--r--src/libmpeg2/idct_mmx.c3
-rw-r--r--src/libmpeg2/motion_comp.c2
-rw-r--r--src/libmpeg2/motion_comp_mmx.c3
-rw-r--r--src/libspudec/spu.c4
-rw-r--r--src/libspudec/xine_decoder.c20
-rw-r--r--src/libvfill/xine_decoder.c8
-rw-r--r--src/libw32dll/w32codec.c25
-rw-r--r--src/video_out/deinterlace.c44
-rw-r--r--src/video_out/video_out_syncfb.c15
-rw-r--r--src/video_out/video_out_xshm.c15
-rw-r--r--src/video_out/video_out_xv.c13
-rw-r--r--src/video_out/yuv2rgb.c63
-rw-r--r--src/video_out/yuv2rgb_mmx.c14
-rw-r--r--src/xine-engine/audio_decoder.c12
-rw-r--r--src/xine-engine/audio_out.c14
-rw-r--r--src/xine-engine/buffer.c10
-rw-r--r--src/xine-engine/buffer_types.c3
-rw-r--r--src/xine-engine/configfile.c24
-rw-r--r--src/xine-engine/load_plugins.c17
-rw-r--r--src/xine-engine/lrb.c6
-rw-r--r--src/xine-engine/metronom.c7
-rw-r--r--src/xine-engine/video_decoder.c16
-rw-r--r--src/xine-engine/video_out.c27
-rw-r--r--src/xine-engine/xine.c13
-rw-r--r--src/xine-utils/Makefile.am5
-rw-r--r--src/xine-utils/attributes.h1
-rw-r--r--src/xine-utils/cpu_accel.c11
-rw-r--r--src/xine-utils/memcpy.c14
-rw-r--r--src/xine-utils/memcpy.h33
-rw-r--r--src/xine-utils/monitor.c15
-rw-r--r--src/xine-utils/monitor.h115
-rw-r--r--src/xine-utils/utils.c14
-rw-r--r--src/xine-utils/utils.h52
-rw-r--r--src/xine-utils/xineutils.h (renamed from src/xine-utils/cpu_accel.h)159
74 files changed, 510 insertions, 608 deletions
diff --git a/configure.in b/configure.in
index 6c7b17b80..c1cbac264 100644
--- a/configure.in
+++ b/configure.in
@@ -884,7 +884,6 @@ echo " - file - net"
echo " - stdin - rtp"
echo " - http"
if test x"$have_cdrom_ioctls" = "xyes"; then
- echo " - dvd"
- echo " - vcd"
+ echo " - dvd - vcd"
fi
echo "---"
diff --git a/src/audio_out/audio_alsa05_out.c b/src/audio_out/audio_alsa05_out.c
index 14f1a2259..338a22a73 100644
--- a/src/audio_out/audio_alsa05_out.c
+++ b/src/audio_out/audio_alsa05_out.c
@@ -24,7 +24,7 @@
* for the SPDIF A52 sync part
* (c) 2000 Andy Lo A Foe <andy@alsaplayer.org>
*
- * $Id: audio_alsa05_out.c,v 1.10 2001/09/06 15:40:47 joachim_koenig Exp $
+ * $Id: audio_alsa05_out.c,v 1.11 2001/11/17 14:26:37 f1rmb Exp $
*/
/* required for swab() */
@@ -44,11 +44,10 @@
#include <sys/asoundlib.h>
#include "xine_internal.h"
-#include "monitor.h"
#include "audio_out.h"
#include "metronom.h"
#include "resample.h"
-#include "utils.h"
+#include "xineutils.h"
#define AO_ALSA_IFACE_VERSION 2
diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c
index 18a7488ec..419957690 100644
--- a/src/audio_out/audio_alsa_out.c
+++ b/src/audio_out/audio_alsa_out.c
@@ -26,7 +26,7 @@
* (c) 2001 James Courtier-Dutton <James@superbug.demon.co.uk>
*
*
- * $Id: audio_alsa_out.c,v 1.35 2001/11/14 22:04:38 siggi Exp $
+ * $Id: audio_alsa_out.c,v 1.36 2001/11/17 14:26:37 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -61,9 +61,8 @@
#include "xine_internal.h"
-#include "monitor.h"
+#include "xineutils.h"
#include "audio_out.h"
-#include "utils.h"
#ifndef AFMT_S16_NE
# if defined(sparc) || defined(__sparc__) || defined(PPC)
diff --git a/src/audio_out/audio_arts_out.c b/src/audio_out/audio_arts_out.c
index bcd9a4e21..682c4a6ce 100644
--- a/src/audio_out/audio_arts_out.c
+++ b/src/audio_out/audio_arts_out.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_arts_out.c,v 1.6 2001/10/12 19:25:11 miguelfreitas Exp $
+ * $Id: audio_arts_out.c,v 1.7 2001/11/17 14:26:37 f1rmb Exp $
*/
/* required for swab() */
@@ -38,9 +38,8 @@
#include <artsc.h>
#include "xine_internal.h"
-#include "monitor.h"
+#include "xineutils.h"
#include "audio_out.h"
-#include "utils.h"
#define AO_OUT_ARTS_IFACE_VERSION 2
diff --git a/src/audio_out/audio_esd_out.c b/src/audio_out/audio_esd_out.c
index 9a3a77a10..8a20bdad8 100644
--- a/src/audio_out/audio_esd_out.c
+++ b/src/audio_out/audio_esd_out.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_esd_out.c,v 1.12 2001/10/14 17:16:11 guenter Exp $
+ * $Id: audio_esd_out.c,v 1.13 2001/11/17 14:26:37 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -35,10 +35,9 @@
#include <inttypes.h>
#include "xine_internal.h"
-#include "monitor.h"
+#include "xineutils.h"
#include "audio_out.h"
#include "metronom.h"
-#include "utils.h"
#define AO_OUT_ESD_IFACE_VERSION 2
diff --git a/src/audio_out/audio_irixal_out.c b/src/audio_out/audio_irixal_out.c
index 063b917fa..56e857283 100644
--- a/src/audio_out/audio_irixal_out.c
+++ b/src/audio_out/audio_irixal_out.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_irixal_out.c,v 1.2 2001/09/14 20:44:01 jcdutton Exp $
+ * $Id: audio_irixal_out.c,v 1.3 2001/11/17 14:26:37 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -52,9 +52,8 @@
#include "xine_internal.h"
-#include "monitor.h"
+#include "xineutils.h"
#include "audio_out.h"
-#include "utils.h"
//#ifndef AFMT_S16_NE
//# if defined(sparc) || defined(__sparc__) || defined(PPC)
diff --git a/src/audio_out/audio_oss_out.c b/src/audio_out/audio_oss_out.c
index b1598005d..388adc9f5 100644
--- a/src/audio_out/audio_oss_out.c
+++ b/src/audio_out/audio_oss_out.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_oss_out.c,v 1.48 2001/11/04 22:49:38 guenter Exp $
+ * $Id: audio_oss_out.c,v 1.49 2001/11/17 14:26:37 f1rmb Exp $
*
* 20-8-2001 First implementation of Audio sync and Audio driver separation.
* Copyright (C) 2001 James Courtier-Dutton James@superbug.demon.co.uk
@@ -60,9 +60,8 @@
#include <inttypes.h>
#include "xine_internal.h"
-#include "monitor.h"
+#include "xineutils.h"
#include "audio_out.h"
-#include "utils.h"
#include <sys/time.h>
diff --git a/src/audio_out/audio_sun_out.c b/src/audio_out/audio_sun_out.c
index e8b68ee00..e765e956b 100644
--- a/src/audio_out/audio_sun_out.c
+++ b/src/audio_out/audio_sun_out.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_sun_out.c,v 1.13 2001/10/06 13:49:49 jkeil Exp $
+ * $Id: audio_sun_out.c,v 1.14 2001/11/17 14:26:37 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -39,10 +39,8 @@
#endif
#include "xine_internal.h"
-#include "monitor.h"
+#include "xineutils.h"
#include "audio_out.h"
-#include "utils.h"
-
#ifndef AUDIO_CHANNELS_MONO
#define AUDIO_CHANNELS_MONO 1
diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c
index 20f9a27cf..656900266 100644
--- a/src/demuxers/demux_asf.c
+++ b/src/demuxers/demux_asf.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: demux_asf.c,v 1.11 2001/11/16 17:53:10 miguelfreitas Exp $
+ * $Id: demux_asf.c,v 1.12 2001/11/17 14:26:37 f1rmb Exp $
*
* demultiplexer for asf streams
*
@@ -38,10 +38,8 @@
#include <stdlib.h>
#include "xine_internal.h"
-#include "monitor.h"
#include "demux.h"
-#include "utils.h"
-#include "memcpy.h"
+#include "xineutils.h"
#define WINE_TYPEDEFS_ONLY
#include "libw32dll/wine/avifmt.h"
@@ -565,7 +563,7 @@ static void asf_reorder(demux_asf_t *this, uint8_t *src, int len){
s2+=this->reorder_h*this->reorder_w*this->reorder_b;
}
- fast_memcpy(src,dst,i);
+ xine_fast_memcpy(src,dst,i);
free(dst);
}
@@ -731,7 +729,7 @@ static void asf_send_buffer_defrag (demux_asf_t *this, asf_stream_t *stream,
buf = stream->fifo->buffer_pool_alloc (stream->fifo);
buf->content = buf->mem;
- fast_memcpy (buf->content, p, bufsize);
+ xine_fast_memcpy (buf->content, p, bufsize);
if (stream->fifo == this->video_fifo) {
buf->input_pos = this->input->get_current_pos (this->input);
@@ -1213,7 +1211,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
return NULL;
}
- this = xmalloc (sizeof (demux_asf_t));
+ this = xine_xmalloc (sizeof (demux_asf_t));
config = xine->config;
xine_debug = config->lookup_int (config, "xine_debug", 0);
diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c
index 2e831110c..3d8dc7c0f 100644
--- a/src/demuxers/demux_avi.c
+++ b/src/demuxers/demux_avi.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: demux_avi.c,v 1.51 2001/11/10 13:48:02 guenter Exp $
+ * $Id: demux_avi.c,v 1.52 2001/11/17 14:26:37 f1rmb Exp $
*
* demultiplexer for avi streams
*
@@ -38,9 +38,8 @@
#include <stdlib.h>
#include "xine_internal.h"
-#include "monitor.h"
+#include "xineutils.h"
#include "demux.h"
-#include "utils.h"
#define WINE_TYPEDEFS_ONLY
#include "libw32dll/wine/avifmt.h"
@@ -262,7 +261,7 @@ static avi_t *AVI_init(demux_avi_t *this) {
/* Create avi_t structure */
- AVI = (avi_t *) xmalloc(sizeof(avi_t));
+ AVI = (avi_t *) xine_xmalloc(sizeof(avi_t));
if(AVI==NULL) {
this->AVI_errno = AVI_ERR_NO_MEM;
return 0;
@@ -298,7 +297,7 @@ static avi_t *AVI_init(demux_avi_t *this) {
if(strncasecmp(data,"hdrl",4) == 0) {
hdrl_len = n;
- hdrl_data = (unsigned char *) xmalloc(n);
+ hdrl_data = (unsigned char *) xine_xmalloc(n);
if(hdrl_data==0)
ERR_EXIT(AVI_ERR_NO_MEM);
if (this->input->read(this->input, hdrl_data,n) != n )
@@ -317,7 +316,7 @@ static avi_t *AVI_init(demux_avi_t *this) {
break if this is not the case */
AVI->n_idx = AVI->max_idx = n/16;
- AVI->idx = (unsigned char((*)[16]) ) xmalloc(n);
+ AVI->idx = (unsigned char((*)[16]) ) xine_xmalloc(n);
if (AVI->idx==0)
ERR_EXIT(AVI_ERR_NO_MEM);
@@ -535,11 +534,11 @@ static avi_t *AVI_init(demux_avi_t *this) {
}
- AVI->video_index = (video_index_entry_t *) xmalloc(nvi*sizeof(video_index_entry_t));
+ AVI->video_index = (video_index_entry_t *) xine_xmalloc(nvi*sizeof(video_index_entry_t));
if(AVI->video_index==0) ERR_EXIT(AVI_ERR_NO_MEM) ;
if(AVI->audio_chunks) {
- AVI->audio_index = (audio_index_entry_t *) xmalloc(nai*sizeof(audio_index_entry_t));
+ AVI->audio_index = (audio_index_entry_t *) xine_xmalloc(nai*sizeof(audio_index_entry_t));
if(AVI->audio_index==0) ERR_EXIT(AVI_ERR_NO_MEM) ;
}
@@ -1114,7 +1113,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
return NULL;
}
- this = xmalloc (sizeof (demux_avi_t));
+ this = xine_xmalloc (sizeof (demux_avi_t));
config = xine->config;
xine_debug = config->lookup_int (config, "xine_debug", 0);
diff --git a/src/demuxers/demux_elem.c b/src/demuxers/demux_elem.c
index 2e019327c..19ff4a9d6 100644
--- a/src/demuxers/demux_elem.c
+++ b/src/demuxers/demux_elem.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: demux_elem.c,v 1.27 2001/11/10 13:48:02 guenter Exp $
+ * $Id: demux_elem.c,v 1.28 2001/11/17 14:26:37 f1rmb Exp $
*
* demultiplexer for elementary mpeg streams
*
@@ -35,7 +35,7 @@
#include <string.h>
#include "xine_internal.h"
-#include "monitor.h"
+#include "xineutils.h"
#include "demux.h"
#ifndef __GNUC__
diff --git a/src/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c
index 8ee0109e5..ade2e7961 100644
--- a/src/demuxers/demux_mpeg.c
+++ b/src/demuxers/demux_mpeg.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: demux_mpeg.c,v 1.43 2001/11/13 21:47:57 heikos Exp $
+ * $Id: demux_mpeg.c,v 1.44 2001/11/17 14:26:37 f1rmb Exp $
*
* demultiplexer for mpeg 1/2 program streams
* reads streams of variable blocksizes
@@ -38,10 +38,9 @@
#include <string.h>
#include <unistd.h>
-#include "monitor.h"
#include "xine_internal.h"
#include "demux.h"
-#include "utils.h"
+#include "xineutils.h"
#define NUM_PREVIEW_BUFFERS 150
@@ -945,7 +944,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
return NULL;
}
- this = xmalloc (sizeof (demux_mpeg_t));
+ this = xine_xmalloc (sizeof (demux_mpeg_t));
config = xine->config;
xine_debug = config->lookup_int (config, "xine_debug", 0);
diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c
index fc54626e1..74c32c062 100644
--- a/src/demuxers/demux_mpeg_block.c
+++ b/src/demuxers/demux_mpeg_block.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: demux_mpeg_block.c,v 1.60 2001/11/10 13:48:02 guenter Exp $
+ * $Id: demux_mpeg_block.c,v 1.61 2001/11/17 14:26:37 f1rmb Exp $
*
* demultiplexer for mpeg 1/2 program streams
*
@@ -35,9 +35,8 @@
#include <stdlib.h>
#include "xine_internal.h"
-#include "monitor.h"
+#include "xineutils.h"
#include "demux.h"
-#include "utils.h"
#define NUM_PREVIEW_BUFFERS 250
@@ -1003,7 +1002,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
return NULL;
}
- this = xmalloc (sizeof (demux_mpeg_block_t));
+ this = xine_xmalloc (sizeof (demux_mpeg_block_t));
this->xine = xine;
config = xine->config;
xine_debug = config->lookup_int (config, "xine_debug", 0);
@@ -1018,7 +1017,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
this->demux_plugin.get_stream_length = demux_mpeg_block_get_stream_length;
this->demux_plugin.get_mimetypes = demux_mpeg_block_get_mimetypes;
- this->scratch = xmalloc_aligned (512, 4096);
+ this->scratch = xine_xmalloc_aligned (512, 4096);
return (demux_plugin_t *) this;
}
diff --git a/src/demuxers/demux_mpgaudio.c b/src/demuxers/demux_mpgaudio.c
index 6ec5113be..634b9174e 100644
--- a/src/demuxers/demux_mpgaudio.c
+++ b/src/demuxers/demux_mpgaudio.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: demux_mpgaudio.c,v 1.27 2001/11/10 13:48:02 guenter Exp $
+ * $Id: demux_mpgaudio.c,v 1.28 2001/11/17 14:26:37 f1rmb Exp $
*
* demultiplexer for mpeg audio (i.e. mp3) streams
*
@@ -35,7 +35,7 @@
#include <stdlib.h>
#include "xine_internal.h"
-#include "monitor.h"
+#include "xineutils.h"
#include "demux.h"
#ifndef __GNUC__
diff --git a/src/demuxers/demux_ogg.c b/src/demuxers/demux_ogg.c
index 4842becb7..79338c447 100644
--- a/src/demuxers/demux_ogg.c
+++ b/src/demuxers/demux_ogg.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: demux_ogg.c,v 1.8 2001/11/10 13:48:02 guenter Exp $
+ * $Id: demux_ogg.c,v 1.9 2001/11/17 14:26:37 f1rmb Exp $
*
* demultiplexer for ogg streams
*
@@ -37,9 +37,8 @@
#include <ogg/ogg.h>
#include "xine_internal.h"
-#include "monitor.h"
+#include "xineutils.h"
#include "demux.h"
-#include "utils.h"
#define CHUNKSIZE 8500
@@ -406,7 +405,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
return NULL;
}
- this = xmalloc (sizeof (demux_ogg_t));
+ this = xine_xmalloc (sizeof (demux_ogg_t));
config = xine->config;
xine_debug = config->lookup_int (config, "xine_debug", 0);
diff --git a/src/demuxers/demux_pes.c b/src/demuxers/demux_pes.c
index 77defa9a7..4b4e728b5 100644
--- a/src/demuxers/demux_pes.c
+++ b/src/demuxers/demux_pes.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: demux_pes.c,v 1.12 2001/11/10 13:48:02 guenter Exp $
+ * $Id: demux_pes.c,v 1.13 2001/11/17 14:26:37 f1rmb Exp $
*
* demultiplexer for mpeg 2 PES (Packetized Elementary Streams)
* reads streams of variable blocksizes
@@ -37,10 +37,9 @@
#include <string.h>
#include <unistd.h>
-#include "monitor.h"
#include "xine_internal.h"
#include "demux.h"
-#include "utils.h"
+#include "xineutils.h"
#define NUM_PREVIEW_BUFFERS 400
@@ -577,7 +576,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
return NULL;
}
- this = xmalloc (sizeof (demux_pes_t));
+ this = xine_xmalloc (sizeof (demux_pes_t));
config = xine->config;
xine_debug = config->lookup_int (config, "xine_debug", 0);
diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c
index a214f0326..cbba4a79c 100644
--- a/src/demuxers/demux_qt.c
+++ b/src/demuxers/demux_qt.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: demux_qt.c,v 1.11 2001/11/10 13:48:02 guenter Exp $
+ * $Id: demux_qt.c,v 1.12 2001/11/17 14:26:37 f1rmb Exp $
*
* demultiplexer for quicktime streams, based on:
*
@@ -44,10 +44,9 @@
#include <zlib.h>
#include "xine_internal.h"
-#include "monitor.h"
+#include "xineutils.h"
#include "demux.h"
#include "buffer.h"
-#include "utils.h"
#define WINE_TYPEDEFS_ONLY
#include "libw32dll/wine/avifmt.h"
@@ -3866,7 +3865,7 @@ static int quicktime_check_sig(input_plugin_t *input) {
quicktime_atom_t leaf_atom;
int result1 = 0, result2 = 0;
- file = xmalloc (sizeof (quicktime_t));
+ file = xine_xmalloc (sizeof (quicktime_t));
quicktime_init(file);
@@ -4377,7 +4376,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
return NULL;
}
- this = xmalloc (sizeof (demux_qt_t));
+ this = xine_xmalloc (sizeof (demux_qt_t));
config = xine->config;
xine_debug = config->lookup_int (config, "xine_debug", 0);
diff --git a/src/demuxers/demux_ts.c b/src/demuxers/demux_ts.c
index 5bf4e254c..137b56969 100644
--- a/src/demuxers/demux_ts.c
+++ b/src/demuxers/demux_ts.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: demux_ts.c,v 1.27 2001/11/12 13:58:51 jcdutton Exp $
+ * $Id: demux_ts.c,v 1.28 2001/11/17 14:26:37 f1rmb Exp $
*
* Demultiplexer for MPEG2 Transport Streams.
*
@@ -65,7 +65,7 @@
#include <string.h>
#include "xine_internal.h"
-#include "monitor.h"
+#include "xineutils.h"
#include "demux.h"
/*
@@ -1174,7 +1174,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
/*
* Initialise the generic plugin.
*/
- this = xmalloc(sizeof(*this));
+ this = xine_xmalloc(sizeof(*this));
config = xine->config;
xine_debug = config->lookup_int(config, "xine_debug", 0);
this->plugin.interface_version = DEMUXER_PLUGIN_IFACE_VERSION;
diff --git a/src/dxr3/Makefile.am b/src/dxr3/Makefile.am
index 8c09a7762..8bbd53657 100644
--- a/src/dxr3/Makefile.am
+++ b/src/dxr3/Makefile.am
@@ -33,6 +33,29 @@ debug:
install-debug: debug
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+###
+# Install header files (default=$includedir/xine)
+#
+install-includeHEADERS: $(include_HEADERS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(includedir)/xine
+ @list='$(include_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
+ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/xine/$$p"; \
+ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/xine/$$p; \
+ done
+
+
+###
+# Remove them
+#
+uninstall-includeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ list='$(include_HEADERS)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(includedir)/xine/$$p; \
+ done
+
+
mostlyclean-generic:
-rm -f *~ \#* .*~ .\#*
diff --git a/src/dxr3/dxr3_video_out.h b/src/dxr3/dxr3_video_out.h
index 74874d9ac..0a6d65c59 100644
--- a/src/dxr3/dxr3_video_out.h
+++ b/src/dxr3/dxr3_video_out.h
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: dxr3_video_out.h,v 1.3 2001/11/08 08:49:26 mlampard Exp $
+ * $Id: dxr3_video_out.h,v 1.4 2001/11/17 14:26:38 f1rmb Exp $
*
*/
@@ -41,7 +41,7 @@
#include "xine_internal.h"
/* for fast_memcpy: */
-#include "memcpy.h"
+#include "xineutils.h"
#include <X11/Xlib.h>
#include <X11/Xatom.h>
diff --git a/src/dxr3/dxr3_vo_encoder.c b/src/dxr3/dxr3_vo_encoder.c
index 42c57dfcd..0e1570f63 100644
--- a/src/dxr3/dxr3_vo_encoder.c
+++ b/src/dxr3/dxr3_vo_encoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: dxr3_vo_encoder.c,v 1.2 2001/11/12 23:56:31 hrm Exp $
+ * $Id: dxr3_vo_encoder.c,v 1.3 2001/11/17 14:26:38 f1rmb Exp $
*
* mpeg1 encoding video out plugin for the dxr3.
*
@@ -445,7 +445,7 @@ static void dxr3_frame_copy(vo_frame_t *frame_gen, uint8_t **src)
}
# if USE_MPEG_BUFFER
/* copy mpeg data to frame */
- fast_memcpy(frame->mpeg, buffer, size);
+ xine_fast_memcpy(frame->mpeg, buffer, size);
frame->mpeg_size = size;
# endif
#endif
diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c
index a494f4a41..efdc470ba 100644
--- a/src/input/input_dvd.c
+++ b/src/input/input_dvd.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: input_dvd.c,v 1.34 2001/10/20 02:01:51 guenter Exp $
+ * $Id: input_dvd.c,v 1.35 2001/11/17 14:26:38 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -47,7 +47,7 @@
#endif
#include "xine_internal.h"
-#include "monitor.h"
+#include "xineutils.h"
#include "input_plugin.h"
#include "dvd_udf.h"
#include "read_cache.h"
@@ -606,7 +606,7 @@ static mrl_t **dvd_plugin_get_dir (input_plugin_t *this_gen,
++this->mrls_allocated_entries;
/* note: 1 extra pointer for terminating NULL */
this->mrls = realloc(this->mrls, (this->mrls_allocated_entries+1) * sizeof(mrl_t*));
- this->mrls[nFiles2] = (mrl_t *) xmalloc(sizeof(mrl_t));
+ this->mrls[nFiles2] = (mrl_t *) xine_xmalloc(sizeof(mrl_t));
}
if(this->mrls[nFiles2]->mrl) {
@@ -615,7 +615,7 @@ static mrl_t **dvd_plugin_get_dir (input_plugin_t *this_gen,
}
else {
this->mrls[nFiles2]->mrl = (char *)
- xmalloc(strlen(this->filelist[i]) + 7);
+ xine_xmalloc(strlen(this->filelist[i]) + 7);
}
this->mrls[nFiles2]->origin = NULL;
@@ -747,13 +747,13 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
return NULL;
}
- this = (dvd_input_plugin_t *) xmalloc (sizeof (dvd_input_plugin_t));
+ this = (dvd_input_plugin_t *) xine_xmalloc (sizeof (dvd_input_plugin_t));
config = xine->config;
xine_debug = config->lookup_int (config, "xine_debug", 0);
for (i = 0; i < MAX_DIR_ENTRIES; i++) {
- this->filelist[i] = (char *) xmalloc (256);
- this->filelist2[i] = (char *) xmalloc (256);
+ this->filelist[i] = (char *) xine_xmalloc (256);
+ this->filelist2[i] = (char *) xine_xmalloc (256);
}
this->input_plugin.interface_version = INPUT_PLUGIN_IFACE_VERSION;
@@ -783,7 +783,7 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
#endif
this->mrls_allocated_entries = 0;
- this->mrls = xmalloc(sizeof(mrl_t*));
+ this->mrls = xine_xmalloc(sizeof(mrl_t*));
this->mrl = NULL;
this->config = config;
diff --git a/src/input/input_file.c b/src/input/input_file.c
index ab7b70356..f262150cb 100644
--- a/src/input/input_file.c
+++ b/src/input/input_file.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: input_file.c,v 1.27 2001/10/20 02:01:51 guenter Exp $
+ * $Id: input_file.c,v 1.28 2001/11/17 14:26:38 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -36,7 +36,7 @@
#include <limits.h> /*PATH_MAX*/
#include "xine_internal.h"
-#include "monitor.h"
+#include "xineutils.h"
#include "input_plugin.h"
extern int errno;
@@ -429,9 +429,9 @@ static mrl_t **file_plugin_get_dir (input_plugin_t *this_gen,
if((pdir = opendir(current_dir)) == NULL)
return NULL;
- dir_files = (mrl_t *) xmalloc(sizeof(mrl_t) * MAXFILES);
- hide_files = (mrl_t *) xmalloc(sizeof(mrl_t) * MAXFILES);
- norm_files = (mrl_t *) xmalloc(sizeof(mrl_t) * MAXFILES);
+ dir_files = (mrl_t *) xine_xmalloc(sizeof(mrl_t) * MAXFILES);
+ hide_files = (mrl_t *) xine_xmalloc(sizeof(mrl_t) * MAXFILES);
+ norm_files = (mrl_t *) xine_xmalloc(sizeof(mrl_t) * MAXFILES);
while((pdirent = readdir(pdir)) != NULL) {
@@ -441,7 +441,7 @@ static mrl_t **file_plugin_get_dir (input_plugin_t *this_gen,
if(is_a_dir(fullfilename)) {
dir_files[num_dir_files].mrl = (char *)
- xmalloc(strlen(current_dir_slashed) + 1 + strlen(pdirent->d_name) + 1);
+ xine_xmalloc(strlen(current_dir_slashed) + 1 + strlen(pdirent->d_name) + 1);
dir_files[num_dir_files].origin = strdup(current_dir);
sprintf(dir_files[num_dir_files].mrl, "%s%s",
@@ -463,7 +463,7 @@ static mrl_t **file_plugin_get_dir (input_plugin_t *this_gen,
__FUNCTION__, __LINE__, strerror(errno));
}
else {
- dir_files[num_dir_files].link = (char *) xmalloc(linksize + 1);
+ dir_files[num_dir_files].link = (char *) xine_xmalloc(linksize + 1);
strncpy(dir_files[num_dir_files].link, linkbuf, linksize);
dir_files[num_dir_files].type |= get_file_type(dir_files[num_dir_files].link, current_dir);
}
@@ -475,7 +475,7 @@ static mrl_t **file_plugin_get_dir (input_plugin_t *this_gen,
&& (pdirent->d_name[0] == '.' && pdirent->d_name[1] != '.')) {
hide_files[num_hide_files].mrl = (char *)
- xmalloc(strlen(current_dir_slashed) + 1 + strlen(pdirent->d_name) + 1);
+ xine_xmalloc(strlen(current_dir_slashed) + 1 + strlen(pdirent->d_name) + 1);
hide_files[num_hide_files].origin = strdup(current_dir);
sprintf(hide_files[num_hide_files].mrl, "%s%s",
@@ -498,7 +498,7 @@ static mrl_t **file_plugin_get_dir (input_plugin_t *this_gen,
}
else {
hide_files[num_hide_files].link = (char *)
- xmalloc(linksize + 1);
+ xine_xmalloc(linksize + 1);
strncpy(hide_files[num_hide_files].link, linkbuf, linksize);
hide_files[num_hide_files].type |= get_file_type(hide_files[num_hide_files].link, current_dir);
}
@@ -509,7 +509,7 @@ static mrl_t **file_plugin_get_dir (input_plugin_t *this_gen,
else {
norm_files[num_norm_files].mrl = (char *)
- xmalloc(strlen(current_dir_slashed) + 1 + strlen(pdirent->d_name) + 1);
+ xine_xmalloc(strlen(current_dir_slashed) + 1 + strlen(pdirent->d_name) + 1);
norm_files[num_norm_files].origin = strdup(current_dir);
sprintf(norm_files[num_norm_files].mrl, "%s%s",
@@ -532,7 +532,7 @@ static mrl_t **file_plugin_get_dir (input_plugin_t *this_gen,
}
else {
norm_files[num_norm_files].link = (char *)
- xmalloc(linksize + 1);
+ xine_xmalloc(linksize + 1);
strncpy(norm_files[num_norm_files].link, linkbuf, linksize);
norm_files[num_norm_files].type |= get_file_type(norm_files[num_norm_files].link, current_dir);
}
@@ -575,7 +575,7 @@ static mrl_t **file_plugin_get_dir (input_plugin_t *this_gen,
if(num_files >= this->mrls_allocated_entries) {
++this->mrls_allocated_entries;
this->mrls = realloc(this->mrls, (this->mrls_allocated_entries+1) * sizeof(mrl_t*));
- this->mrls[num_files] = (mrl_t *) xmalloc(sizeof(mrl_t));
+ this->mrls[num_files] = (mrl_t *) xine_xmalloc(sizeof(mrl_t));
}
else
memset(this->mrls[num_files], 0, sizeof(mrl_t));
@@ -593,7 +593,7 @@ static mrl_t **file_plugin_get_dir (input_plugin_t *this_gen,
if(num_files >= this->mrls_allocated_entries) {
++this->mrls_allocated_entries;
this->mrls = realloc(this->mrls, (this->mrls_allocated_entries+1) * sizeof(mrl_t*));
- this->mrls[num_files] = (mrl_t *) xmalloc(sizeof(mrl_t));
+ this->mrls[num_files] = (mrl_t *) xine_xmalloc(sizeof(mrl_t));
}
else
memset(this->mrls[num_files], 0, sizeof(mrl_t));
@@ -611,7 +611,7 @@ static mrl_t **file_plugin_get_dir (input_plugin_t *this_gen,
if(num_files >= this->mrls_allocated_entries) {
++this->mrls_allocated_entries;
this->mrls = realloc(this->mrls, (this->mrls_allocated_entries+1) * sizeof(mrl_t*));
- this->mrls[num_files] = (mrl_t *) xmalloc(sizeof(mrl_t));
+ this->mrls[num_files] = (mrl_t *) xine_xmalloc(sizeof(mrl_t));
}
else
memset(this->mrls[num_files], 0, sizeof(mrl_t));
@@ -749,7 +749,7 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
return NULL;
}
- this = (file_input_plugin_t *) xmalloc (sizeof (file_input_plugin_t));
+ this = (file_input_plugin_t *) xine_xmalloc (sizeof (file_input_plugin_t));
config = xine->config;
xine_debug = config->lookup_int (config, "xine_debug", 0);
@@ -777,7 +777,7 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
this->mrl = NULL;
this->config = config;
- this->mrls = (mrl_t **) xmalloc(sizeof(mrl_t*));
+ this->mrls = (mrl_t **) xine_xmalloc(sizeof(mrl_t*));
this->mrls_allocated_entries = 0;
return (input_plugin_t *) this;
diff --git a/src/input/input_http.c b/src/input/input_http.c
index acf08f9b9..7a12863af 100644
--- a/src/input/input_http.c
+++ b/src/input/input_http.c
@@ -37,7 +37,7 @@
#include <sys/time.h>
#include "xine_internal.h"
-#include "monitor.h"
+#include "xineutils.h"
#include "input_plugin.h"
#define BUFSIZE 1024
@@ -433,8 +433,8 @@ static int http_plugin_open (input_plugin_t *this_gen, char *mrl) {
if (this->contentlength == 0) {
off_t contentlength;
- if (sscanf(this->buf, "Content-Length: %ld", &contentlength) == 1) {
- printf ("input_http: content length = %ld bytes\n", contentlength);
+ if (sscanf(this->buf, "Content-Length: %Ld", &contentlength) == 1) {
+ printf ("input_http: content length = %Ld bytes\n", contentlength);
this->contentlength = contentlength;
}
}
@@ -605,7 +605,7 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
return NULL;
}
- this = (http_input_plugin_t *) xmalloc(sizeof(http_input_plugin_t));
+ this = (http_input_plugin_t *) xine_xmalloc(sizeof(http_input_plugin_t));
config = xine->config;
xine_debug = config->lookup_int (config, "xine_debug", 0);
diff --git a/src/input/input_net.c b/src/input/input_net.c
index d7a576030..67d5d3fb9 100644
--- a/src/input/input_net.c
+++ b/src/input/input_net.c
@@ -38,7 +38,7 @@
#include <sys/time.h>
#include "xine_internal.h"
-#include "monitor.h"
+#include "xineutils.h"
#include "input_plugin.h"
#if !defined(NDELAY) && defined(O_NDELAY)
@@ -310,7 +310,7 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
return NULL;
}
- this = (net_input_plugin_t *) xmalloc(sizeof(net_input_plugin_t));
+ this = (net_input_plugin_t *) xine_xmalloc(sizeof(net_input_plugin_t));
config = xine->config;
xine_debug = config->lookup_int (config, "xine_debug", 0);
diff --git a/src/input/input_rtp.c b/src/input/input_rtp.c
index 488980be7..1550efd23 100644
--- a/src/input/input_rtp.c
+++ b/src/input/input_rtp.c
@@ -81,7 +81,7 @@
#include <stdlib.h>
#include "xine_internal.h"
-#include "monitor.h"
+#include "xineutils.h"
#include "input_plugin.h"
#define RTP_BLOCKSIZE 2048
@@ -471,17 +471,17 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
}
- this = (rtp_input_plugin_t *) xmalloc(sizeof(rtp_input_plugin_t));
+ this = (rtp_input_plugin_t *) xine_xmalloc(sizeof(rtp_input_plugin_t));
config = xine->config;
xine_debug = config->lookup_int (config, "xine_debug", 0);
for (bufn = 0; bufn < N_BUFFERS; bufn++) {
- input_buffer_t *buf = xmalloc(sizeof(input_buffer_t));
+ input_buffer_t *buf = xine_xmalloc(sizeof(input_buffer_t));
if (!buf) {
fprintf(stderr, "unable to allocate input buffer.\n");
exit(1);
}
- buf->buf = xmalloc(IBUFFER_SIZE);
+ buf->buf = xine_xmalloc(IBUFFER_SIZE);
if (!buf->buf) {
fprintf(stderr, "unable to allocate input buffer.\n");
exit(1);
diff --git a/src/input/input_stdin_fifo.c b/src/input/input_stdin_fifo.c
index f0b2ccd54..a7c556e54 100644
--- a/src/input/input_stdin_fifo.c
+++ b/src/input/input_stdin_fifo.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: input_stdin_fifo.c,v 1.15 2001/10/20 02:01:51 guenter Exp $
+ * $Id: input_stdin_fifo.c,v 1.16 2001/11/17 14:26:38 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -37,7 +37,7 @@
#endif
#include "xine_internal.h"
-#include "monitor.h"
+#include "xineutils.h"
#include "input_plugin.h"
static uint32_t xine_debug;
@@ -265,7 +265,7 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
return NULL;
}
- this = (stdin_input_plugin_t *) xmalloc(sizeof(stdin_input_plugin_t));
+ this = (stdin_input_plugin_t *) xine_xmalloc(sizeof(stdin_input_plugin_t));
config = xine->config;
xine_debug = config->lookup_int (config, "xine_debug", 0);
diff --git a/src/input/input_vcd.c b/src/input/input_vcd.c
index 9c6581dd5..f2591410a 100644
--- a/src/input/input_vcd.c
+++ b/src/input/input_vcd.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: input_vcd.c,v 1.29 2001/10/20 02:01:51 guenter Exp $
+ * $Id: input_vcd.c,v 1.30 2001/11/17 14:26:38 f1rmb Exp $
*
*/
@@ -48,7 +48,7 @@
#endif
#include "xine_internal.h"
-#include "monitor.h"
+#include "xineutils.h"
#include "input_plugin.h"
static uint32_t xine_debug;
@@ -166,7 +166,7 @@ static int input_vcd_read_toc (vcd_input_plugin_t *this) {
ntracks = this->tochdr.ending_track
- this->tochdr.starting_track + 2;
this->tocent = (struct cd_toc_entry *)
- xmalloc(sizeof(*this->tocent) * ntracks);
+ xine_xmalloc(sizeof(*this->tocent) * ntracks);
te.address_format = CD_LBA_FORMAT;
te.starting_track = 0;
@@ -991,7 +991,7 @@ static mrl_t **vcd_plugin_get_dir (input_plugin_t *this_gen,
++this->mrls_allocated_entries;
/* note: 1 extra pointer for terminating NULL */
this->mrls = realloc(this->mrls, (this->mrls_allocated_entries+1) * sizeof(mrl_t*));
- this->mrls[(i-1)] = (mrl_t *) xmalloc(sizeof(mrl_t));
+ this->mrls[(i-1)] = (mrl_t *) xine_xmalloc(sizeof(mrl_t));
}
else {
memset(this->mrls[(i-1)], 0, sizeof(mrl_t));
@@ -1002,7 +1002,7 @@ static mrl_t **vcd_plugin_get_dir (input_plugin_t *this_gen,
realloc(this->mrls[(i-1)]->mrl, strlen(mrl) + 1);
}
else {
- this->mrls[(i-1)]->mrl = (char *) xmalloc(strlen(mrl) + 1);
+ this->mrls[(i-1)]->mrl = (char *) xine_xmalloc(strlen(mrl) + 1);
}
this->mrls[i-1]->origin = NULL;
@@ -1108,12 +1108,12 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
return NULL;
}
- this = (vcd_input_plugin_t *) xmalloc(sizeof(vcd_input_plugin_t));
+ this = (vcd_input_plugin_t *) xine_xmalloc(sizeof(vcd_input_plugin_t));
config = xine->config;
xine_debug = config->lookup_int (config, "xine_debug", 0);
for (i = 0; i < 100; i++) {
- this->filelist[i] = (char *) xmalloc (256);
+ this->filelist[i] = (char *) xine_xmalloc (256);
}
this->input_plugin.interface_version = INPUT_PLUGIN_IFACE_VERSION;
@@ -1138,7 +1138,7 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
this->device = config->lookup_str(config, "vcd_device", CDROM);
- this->mrls = (mrl_t **) xmalloc(sizeof(mrl_t*));
+ this->mrls = (mrl_t **) xine_xmalloc(sizeof(mrl_t*));
this->mrls_allocated_entries = 0;
this->fd = -1;
diff --git a/src/input/read_cache.c b/src/input/read_cache.c
index 0207ab8b5..2ba9318e5 100644
--- a/src/input/read_cache.c
+++ b/src/input/read_cache.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: read_cache.c,v 1.6 2001/10/05 18:45:07 jkeil Exp $
+ * $Id: read_cache.c,v 1.7 2001/11/17 14:26:38 f1rmb Exp $
*/
#include <sys/types.h>
@@ -26,7 +26,7 @@
#include <string.h>
#include <errno.h>
-#include "utils.h"
+#include "xineutils.h"
#include "read_cache.h"
@@ -121,7 +121,7 @@ read_cache_t *read_cache_new () {
char *multi_buffer = NULL;
int buf_size;
- this = (read_cache_t *) xmalloc (sizeof (read_cache_t));
+ this = (read_cache_t *) xine_xmalloc (sizeof (read_cache_t));
pthread_mutex_init (&this->lock, NULL);
pthread_cond_init (&this->buf_pool_not_empty, NULL);
@@ -133,7 +133,7 @@ read_cache_t *read_cache_new () {
for (i = 0; i<NUM_BUFFERS; i++) {
buf_element_t *buf;
- buf = xmalloc (sizeof (buf_element_t));
+ buf = xine_xmalloc (sizeof (buf_element_t));
buf->max_size = 2048;
buf->free_buffer = buf_free;
@@ -146,7 +146,7 @@ read_cache_t *read_cache_new () {
buf_size = NUM_MACRO_BUFFERS * 2048 * 16;
buf_size += 2048; /* alignment space */
- this->multi_base = xmalloc (buf_size);
+ this->multi_base = xine_xmalloc (buf_size);
multi_buffer = this->multi_base;
while ((int) multi_buffer % 2048)
multi_buffer++;
@@ -155,7 +155,7 @@ read_cache_t *read_cache_new () {
for (i = 0; i<NUM_MACRO_BUFFERS; i++) {
macro_buf_t *mbuf;
- mbuf = xmalloc (sizeof (macro_buf_t));
+ mbuf = xine_xmalloc (sizeof (macro_buf_t));
mbuf->data = (uint8_t *)multi_buffer;
multi_buffer += 2048*16;
diff --git a/src/liba52/imdct.c b/src/liba52/imdct.c
index 3e592a27a..cf4236555 100644
--- a/src/liba52/imdct.c
+++ b/src/liba52/imdct.c
@@ -24,7 +24,7 @@
#include <inttypes.h>
#include <math.h>
-#include <cpu_accel.h>
+#include "xineutils.h"
#include "a52.h"
#include "a52_internal.h"
diff --git a/src/liba52/xine_decoder.c b/src/liba52/xine_decoder.c
index d431cc01c..ffad6f2f6 100644
--- a/src/liba52/xine_decoder.c
+++ b/src/liba52/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.8 2001/11/13 21:47:58 heikos Exp $
+ * $Id: xine_decoder.c,v 1.9 2001/11/17 14:26:38 f1rmb Exp $
*
* stuff needed to turn liba52 into a xine decoder plugin
*/
@@ -35,7 +35,7 @@
#include "a52_internal.h"
#include "buffer.h"
#include "xine_internal.h"
-#include "cpu_accel.h"
+#include "xineutils.h"
#undef DEBUG_A52
#ifdef DEBUG_A52
@@ -95,7 +95,7 @@ void a52dec_init (audio_decoder_t *this_gen, ao_instance_t *audio_out) {
this->pts = 0;
this->last_pts = 0;
- this->samples = a52_init (mm_accel());
+ this->samples = a52_init (xine_mm_accel());
/*
* find out if this driver supports a52 output
diff --git a/src/libdivx4/xine_decoder.c b/src/libdivx4/xine_decoder.c
index cbab42157..d772b7c33 100644
--- a/src/libdivx4/xine_decoder.c
+++ b/src/libdivx4/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.9 2001/11/13 21:47:58 heikos Exp $
+ * $Id: xine_decoder.c,v 1.10 2001/11/17 14:26:38 f1rmb Exp $
*
* xine decoder plugin using divx4
*
@@ -50,11 +50,10 @@
#include <dlfcn.h>
#include "xine_internal.h"
-#include "cpu_accel.h"
#include "video_out.h"
#include "buffer.h"
#include "metronom.h"
-#include "memcpy.h"
+#include "xineutils.h"
#include "decore-if.h"
@@ -209,12 +208,12 @@ static inline void divx4_copy_frame(divx4_decoder_t *this, vo_frame_t *img,
src_offset = 0;
dst_offset = 0;
if (pict.stride_y == img->width) {
- fast_memcpy(img->base[0]+dst_offset, pict.y, this->biWidth*this->biHeight);
+ xine_fast_memcpy(img->base[0]+dst_offset, pict.y, this->biWidth*this->biHeight);
dst_offset += this->biWidth * this->biHeight;
}
else { /* copy line by line */
for (i=0; i<this->biHeight; i++) {
- fast_memcpy(img->base[0]+dst_offset, pict.y+src_offset, this->biWidth);
+ xine_fast_memcpy(img->base[0]+dst_offset, pict.y+src_offset, this->biWidth);
src_offset += pict.stride_y;
dst_offset += this->biWidth;
}
@@ -228,14 +227,14 @@ static inline void divx4_copy_frame(divx4_decoder_t *this, vo_frame_t *img,
src_offset = 0;
dst_offset = 0;
if (pict.stride_uv == img->width>>1) {
- fast_memcpy(img->base[1]+dst_offset, pict.u, (this->biWidth*this->biHeight)/4);
- fast_memcpy(img->base[2]+dst_offset, pict.v, (this->biWidth*this->biHeight)/4);
+ xine_fast_memcpy(img->base[1]+dst_offset, pict.u, (this->biWidth*this->biHeight)/4);
+ xine_fast_memcpy(img->base[2]+dst_offset, pict.v, (this->biWidth*this->biHeight)/4);
dst_offset += (this->biWidth*this->biHeight)/4;
}
else {
for (i=0; i<this->biHeight>>1; i++) {
- fast_memcpy(img->base[1]+dst_offset, pict.u+src_offset, this->biWidth/2);
- fast_memcpy(img->base[2]+dst_offset, pict.v+src_offset, this->biWidth/2);
+ xine_fast_memcpy(img->base[1]+dst_offset, pict.u+src_offset, this->biWidth/2);
+ xine_fast_memcpy(img->base[2]+dst_offset, pict.v+src_offset, this->biWidth/2);
src_offset += pict.stride_uv;
dst_offset += this->biWidth/2;
}
@@ -300,7 +299,7 @@ static void divx4_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
if (! this->decoder_ok) /* don't try to do anything */
return;
- fast_memcpy (&this->buf[this->size], buf->content, buf->size);
+ xine_fast_memcpy (&this->buf[this->size], buf->content, buf->size);
this->size += buf->size;
if (buf->decoder_info[0] == 2) { /* need to decode a frame */
diff --git a/src/libffmpeg/libavcodec/dsputil.c b/src/libffmpeg/libavcodec/dsputil.c
index c29574303..e68833b7c 100644
--- a/src/libffmpeg/libavcodec/dsputil.c
+++ b/src/libffmpeg/libavcodec/dsputil.c
@@ -20,7 +20,7 @@
#include <stdio.h>
#include "avcodec.h"
#include "dsputil.h"
-#include "cpu_accel.h"
+#include "xineutils.h"
void (*ff_idct)(DCTELEM *block);
void (*get_pixels)(DCTELEM *block, const UINT8 *pixels, int line_size);
@@ -415,7 +415,7 @@ void dsputil_init(void)
{
int i, j;
#ifdef ARCH_X86
- uint32_t mm = mm_accel();
+ uint32_t mm = xine_mm_accel();
#endif
int use_permuted_mmx_idct;
int accel_dsputil;
diff --git a/src/libffmpeg/libavcodec/dsputil.h b/src/libffmpeg/libavcodec/dsputil.h
index f5e22e4c4..e401065a0 100644
--- a/src/libffmpeg/libavcodec/dsputil.h
+++ b/src/libffmpeg/libavcodec/dsputil.h
@@ -76,7 +76,7 @@ void block_permute(INT16 *block);
#if defined(ARCH_X86)
-#include "cpu_accel.h"
+#include "xineutils.h"
extern int mm_flags;
diff --git a/src/libffmpeg/libavcodec/dsputil_mmx.c b/src/libffmpeg/libavcodec/dsputil_mmx.c
index 44b0b23d2..b806c34e5 100644
--- a/src/libffmpeg/libavcodec/dsputil_mmx.c
+++ b/src/libffmpeg/libavcodec/dsputil_mmx.c
@@ -20,7 +20,7 @@
*/
#include "dsputil.h"
-#include "cpu_accel.h"
+#include "xineutils.h"
int mm_flags; /* multimedia extension flags */
@@ -967,7 +967,7 @@ static void sub_pixels_xy2_mmx( DCTELEM *block, const UINT8 *pixels, int line
void dsputil_init_mmx(void)
{
- mm_flags = mm_accel();
+ mm_flags = xine_mm_accel();
#if 0
printf("CPU flags:");
if (mm_flags & MM_MMX)
diff --git a/src/libffmpeg/libavcodec/idct_mmx.c b/src/libffmpeg/libavcodec/idct_mmx.c
index 3c1a401e3..88fd3b806 100644
--- a/src/libffmpeg/libavcodec/idct_mmx.c
+++ b/src/libffmpeg/libavcodec/idct_mmx.c
@@ -26,7 +26,7 @@
#include "../config.h"
-#include "cpu_accel.h"
+#include "xineutils.h"
#ifdef ATTR_ALIGN
#undef ATTR_ALIGN
diff --git a/src/libffmpeg/libavcodec/mpegvideo_mmx.c b/src/libffmpeg/libavcodec/mpegvideo_mmx.c
index 279e5ec22..7b3ba8aff 100644
--- a/src/libffmpeg/libavcodec/mpegvideo_mmx.c
+++ b/src/libffmpeg/libavcodec/mpegvideo_mmx.c
@@ -21,7 +21,7 @@
#include "dsputil.h"
#include "mpegvideo.h"
-#include "cpu_accel.h"
+#include "xineutils.h"
#if 0
@@ -222,7 +222,7 @@ void MPV_common_init_mmx(MpegEncContext *s)
{
int mm_flags;
- mm_flags = mm_accel();
+ mm_flags = xine_mm_accel();
if (mm_flags & MM_ACCEL_X86_MMX) {
/* XXX: should include h263 optimization too. It would go even
diff --git a/src/libffmpeg/xine_decoder.c b/src/libffmpeg/xine_decoder.c
index 7c23f4a5f..3b092bfd4 100644
--- a/src/libffmpeg/xine_decoder.c
+++ b/src/libffmpeg/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.18 2001/11/13 21:47:58 heikos Exp $
+ * $Id: xine_decoder.c,v 1.19 2001/11/17 14:26:38 f1rmb Exp $
*
* xine decoder plugin using ffmpeg
*
@@ -33,11 +33,10 @@
#include <string.h>
#include "xine_internal.h"
-#include "cpu_accel.h"
#include "video_out.h"
#include "buffer.h"
#include "metronom.h"
-#include "memcpy.h"
+#include "xineutils.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/dsputil.h"
@@ -198,7 +197,7 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
} else if (this->decoder_ok) {
- fast_memcpy (&this->buf[this->size], buf->content, buf->size);
+ xine_fast_memcpy (&this->buf[this->size], buf->content, buf->size);
this->size += buf->size;
@@ -244,7 +243,7 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
for (y=0; y<this->biHeight; y++) {
- fast_memcpy (dy, sy, this->biWidth);
+ xine_fast_memcpy (dy, sy, this->biWidth);
dy += this->biWidth;
@@ -255,8 +254,8 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
if (this->context.pix_fmt != PIX_FMT_YUV444P) {
- fast_memcpy (du, su, this->biWidth/2);
- fast_memcpy (dv, sv, this->biWidth/2);
+ xine_fast_memcpy (du, su, this->biWidth/2);
+ xine_fast_memcpy (dv, sv, this->biWidth/2);
} else {
diff --git a/src/libmpeg2/decode.c b/src/libmpeg2/decode.c
index 1064e6fed..0e84ccbaa 100644
--- a/src/libmpeg2/decode.c
+++ b/src/libmpeg2/decode.c
@@ -32,8 +32,7 @@
#include "video_out.h"
#include "mpeg2.h"
#include "mpeg2_internal.h"
-#include "cpu_accel.h"
-#include "utils.h"
+#include "xineutils.h"
#define BUFFER_SIZE (224 * 1024)
@@ -46,13 +45,13 @@ void mpeg2_init (mpeg2dec_t * mpeg2dec,
if (do_init) {
do_init = 0;
- config.flags = mm_accel();
+ config.flags = xine_mm_accel();
idct_init ();
motion_comp_init ();
}
- mpeg2dec->chunk_buffer = xmalloc_aligned (16, BUFFER_SIZE + 4);
- mpeg2dec->picture = xmalloc_aligned (16, sizeof (picture_t));
+ mpeg2dec->chunk_buffer = xine_xmalloc_aligned (16, BUFFER_SIZE + 4);
+ mpeg2dec->picture = xine_xmalloc_aligned (16, sizeof (picture_t));
mpeg2dec->shift = 0xffffff00;
mpeg2dec->is_sequence_needed = 1;
diff --git a/src/libmpeg2/idct.c b/src/libmpeg2/idct.c
index 757d2c5e3..2aaf6eaf9 100644
--- a/src/libmpeg2/idct.c
+++ b/src/libmpeg2/idct.c
@@ -43,7 +43,7 @@
#include <inttypes.h>
#include "mpeg2_internal.h"
-#include "cpu_accel.h"
+#include "xineutils.h"
#define W1 2841 /* 2048*sqrt (2)*cos (1*pi/16) */
#define W2 2676 /* 2048*sqrt (2)*cos (2*pi/16) */
diff --git a/src/libmpeg2/idct_mmx.c b/src/libmpeg2/idct_mmx.c
index 927a78996..8741d838e 100644
--- a/src/libmpeg2/idct_mmx.c
+++ b/src/libmpeg2/idct_mmx.c
@@ -26,8 +26,7 @@
#include <inttypes.h>
#include "mpeg2_internal.h"
-#include "attributes.h"
-#include "cpu_accel.h"
+#include "xineutils.h"
#define ROW_SHIFT 11
#define COL_SHIFT 6
diff --git a/src/libmpeg2/motion_comp.c b/src/libmpeg2/motion_comp.c
index fd4055265..b8f308525 100644
--- a/src/libmpeg2/motion_comp.c
+++ b/src/libmpeg2/motion_comp.c
@@ -25,7 +25,7 @@
#include <inttypes.h>
#include "mpeg2_internal.h"
-#include "cpu_accel.h"
+#include "xineutils.h"
mc_functions_t mc_functions;
diff --git a/src/libmpeg2/motion_comp_mmx.c b/src/libmpeg2/motion_comp_mmx.c
index 049546b1f..29bd78cbf 100644
--- a/src/libmpeg2/motion_comp_mmx.c
+++ b/src/libmpeg2/motion_comp_mmx.c
@@ -26,8 +26,7 @@
#include <inttypes.h>
#include "mpeg2_internal.h"
-#include "attributes.h"
-#include "cpu_accel.h"
+#include "xineutils.h"
#define CPU_MMXEXT 0
#define CPU_3DNOW 1
diff --git a/src/libspudec/spu.c b/src/libspudec/spu.c
index cfd2f7a1a..4a95e0980 100644
--- a/src/libspudec/spu.c
+++ b/src/libspudec/spu.c
@@ -35,7 +35,7 @@
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: spu.c,v 1.21 2001/10/26 13:39:21 jcdutton Exp $
+ * $Id: spu.c,v 1.22 2001/11/17 14:26:39 f1rmb Exp $
*
*/
@@ -51,7 +51,7 @@
#include "spu.h"
#include "video_out/alphablend.h"
-#include "monitor.h"
+#include "xineutils.h"
#define LOG_DEBUG 1
diff --git a/src/libspudec/xine_decoder.c b/src/libspudec/xine_decoder.c
index 9a968bb63..454b13034 100644
--- a/src/libspudec/xine_decoder.c
+++ b/src/libspudec/xine_decoder.c
@@ -19,7 +19,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.33 2001/11/15 23:18:04 guenter Exp $
+ * $Id: xine_decoder.c,v 1.34 2001/11/17 14:26:39 f1rmb Exp $
*
* stuff needed to turn libspu into a xine decoder plugin
*/
@@ -37,7 +37,7 @@
#include "xine_internal.h"
#include "video_out/alphablend.h"
#include "xine-engine/bswap.h"
-#include "monitor.h"
+#include "xineutils.h"
static void spudec_print_overlay( vo_overlay_t *ovl );
@@ -193,7 +193,7 @@ static void spudec_reset (spudec_decoder_t *this) {
i,
this->spu_events[i].event,
sizeof(spu_overlay_event_t));
- this->spu_events[i].event = xmalloc (sizeof(spu_overlay_event_t));
+ this->spu_events[i].event = xine_xmalloc (sizeof(spu_overlay_event_t));
xprintf (VERBOSE|SPU, "MALLOC2: this->spu_events[%d].event %p, len=%d\n",
i,
this->spu_events[i].event,
@@ -210,10 +210,10 @@ static void spudec_reset (spudec_decoder_t *this) {
this->spu_objects[1].pts=0;
xprintf (VERBOSE|SPU, "MALLOC1: this->spu_objects[1].overlay %p, len=%d\n",
this->spu_objects[1].overlay, sizeof(vo_overlay_t));
- this->spu_objects[1].overlay = xmalloc (sizeof(vo_overlay_t));
+ this->spu_objects[1].overlay = xine_xmalloc (sizeof(vo_overlay_t));
xprintf (VERBOSE|SPU, "MALLOC2: this->spu_objects[1].overlay %p, len=%d\n",
this->spu_objects[1].overlay, sizeof(vo_overlay_t));
-/* xmalloc does memset */
+/* xine_xmalloc does memset */
/* memset(this->spu_objects[1].overlay,0,sizeof(vo_overlay_t));
*/
@@ -326,7 +326,7 @@ static int32_t spu_add_event(spudec_decoder_t *this, spu_overlay_event_t *event
new_event,
this->spu_events[new_event].event->object.overlay,
sizeof(vo_overlay_t));
- this->spu_events[new_event].event->object.overlay = xmalloc (sizeof(vo_overlay_t));
+ this->spu_events[new_event].event->object.overlay = xine_xmalloc (sizeof(vo_overlay_t));
xprintf (VERBOSE|SPU, "328MALLOC2: this->spu_events[new_event=%d].event->object.overlay %p, len=%d\n",
new_event,
this->spu_events[new_event].event->object.overlay,
@@ -796,14 +796,14 @@ static void spudec_event_listener(void *this_gen, xine_event_t *event_gen) {
xprintf (VERBOSE|SPU, "MALLOC1: overlay_event %p, len=%d\n",
overlay_event,
sizeof(spu_overlay_event_t));
- overlay_event = xmalloc (sizeof(spu_overlay_event_t));
+ overlay_event = xine_xmalloc (sizeof(spu_overlay_event_t));
xprintf (VERBOSE|SPU, "MALLOC2: overlay_event %p, len=%d\n",
overlay_event,
sizeof(spu_overlay_event_t));
xprintf (VERBOSE|SPU, "MALLOC1: overlay %p, len=%d\n",
overlay,
sizeof(vo_overlay_t));
- overlay = xmalloc (sizeof(vo_overlay_t));
+ overlay = xine_xmalloc (sizeof(vo_overlay_t));
xprintf (VERBOSE|SPU, "MALLOC2: overlay %p, len=%d\n",
overlay,
sizeof(vo_overlay_t));
@@ -889,8 +889,8 @@ spu_decoder_t *init_spu_decoder_plugin (int iface_version, xine_t *xine) {
return NULL;
}
- this = (spudec_decoder_t *) xmalloc (sizeof (spudec_decoder_t));
-/* xmalloc does memset */
+ this = (spudec_decoder_t *) xine_xmalloc (sizeof (spudec_decoder_t));
+/* xine_xmalloc does memset */
/* memset (this, 0, sizeof(*this)); */
this->spu_decoder.interface_version = 4;
diff --git a/src/libvfill/xine_decoder.c b/src/libvfill/xine_decoder.c
index 328f1feb7..bc92b74bc 100644
--- a/src/libvfill/xine_decoder.c
+++ b/src/libvfill/xine_decoder.c
@@ -31,7 +31,7 @@
#include "video_out.h"
#include "buffer.h"
#include "xine_internal.h"
-#include "memcpy.h"
+#include "xineutils.h"
/* The videofill decoder's job in life is to copy the last frame displayed into
* the current display queue, incrementing the PTS value accordingly. It probably
@@ -79,9 +79,9 @@ static void videofill_decode_data (video_decoder_t *this_gen, buf_element_t *buf
image_size = last_img->width * last_img->height;
- fast_memcpy(img->base[0], last_img->base[0], image_size);
- fast_memcpy(img->base[1], last_img->base[1], image_size >> 2);
- fast_memcpy(img->base[2], last_img->base[2], image_size >> 2);
+ xine_fast_memcpy(img->base[0], last_img->base[0], image_size);
+ xine_fast_memcpy(img->base[1], last_img->base[1], image_size >> 2);
+ xine_fast_memcpy(img->base[2], last_img->base[2], image_size >> 2);
img->PTS = 0;
img->bad_frame = 0;
diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c
index 774dae12c..e2dac10cd 100644
--- a/src/libw32dll/w32codec.c
+++ b/src/libw32dll/w32codec.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: w32codec.c,v 1.45 2001/11/16 20:21:09 miguelfreitas Exp $
+ * $Id: w32codec.c,v 1.46 2001/11/17 14:26:39 f1rmb Exp $
*
* routines for using w32 codecs
* DirectShow support by Miguel Freitas (Nov/2001)
@@ -44,9 +44,8 @@
#include "video_out.h"
#include "audio_out.h"
#include "buffer.h"
-#include "monitor.h"
+#include "xineutils.h"
#include "xine_internal.h"
-#include "memcpy.h"
static GUID CLSID_Voxware =
{
@@ -574,7 +573,7 @@ static void w32v_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
this->buf = realloc( this->buf, this->bufsize );
}
- fast_memcpy (&this->buf[this->size], buf->content, buf->size);
+ xine_fast_memcpy (&this->buf[this->size], buf->content, buf->size);
this->size += buf->size;
@@ -613,7 +612,7 @@ static void w32v_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
if (this->outfmt==IMGFMT_YUY2) {
/* already decoded into YUY2 format by DLL */
- fast_memcpy(img->base[0], this->img_buffer, this->bih.biHeight*this->bih.biWidth*2);
+ xine_fast_memcpy(img->base[0], this->img_buffer, this->bih.biHeight*this->bih.biWidth*2);
} else {
/* now, convert rgb to yuv */
int row, col;
@@ -621,7 +620,7 @@ static void w32v_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
int32_t *ctab = rgb_ycc_tab;
#endif
- profiler_start_count (this->prof_rgb2yuv);
+ xine_profiler_start_count (this->prof_rgb2yuv);
for (row=0; row<this->bih.biHeight; row++) {
@@ -666,7 +665,7 @@ static void w32v_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
}
}
- profiler_stop_count (this->prof_rgb2yuv);
+ xine_profiler_stop_count (this->prof_rgb2yuv);
}
img->PTS = buf->PTS;
@@ -961,7 +960,7 @@ static void w32a_decode_audio (w32a_decoder_t *this,
this->buf = realloc( this->buf, this->max_audio_src_size );
}
- fast_memcpy (&this->buf[this->size], data, size);
+ xine_fast_memcpy (&this->buf[this->size], data, size);
this->size += size;
@@ -1022,7 +1021,7 @@ static void w32a_decode_audio (w32a_decoder_t *this,
else
bufsize = audio_buffer->mem_size;
- fast_memcpy( audio_buffer->mem, p, bufsize );
+ xine_fast_memcpy( audio_buffer->mem, p, bufsize );
/*
printf(" outputing %d bytes, pts = %d\n", bufsize, pts );
*/
@@ -1041,7 +1040,7 @@ static void w32a_decode_audio (w32a_decoder_t *this,
this->size=0;
} else {
this->size-=ash.cbSrcLengthUsed;
- fast_memcpy( this->buf, &this->buf [ash.cbSrcLengthUsed], this->size);
+ xine_fast_memcpy( this->buf, &this->buf [ash.cbSrcLengthUsed], this->size);
}
if( !this->ds_driver ) {
@@ -1115,7 +1114,7 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, config_values_t *
win32_def_path = cfg->lookup_str (cfg, "win32_path", "/usr/lib/win32");
- this = (w32v_decoder_t *) xmalloc (sizeof (w32v_decoder_t));
+ this = (w32v_decoder_t *) xine_xmalloc (sizeof (w32v_decoder_t));
this->video_decoder.interface_version = 3;
this->video_decoder.can_handle = w32v_can_handle;
@@ -1126,7 +1125,7 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, config_values_t *
this->video_decoder.get_identifier = w32v_get_id;
this->video_decoder.priority = 1;
- this->prof_rgb2yuv = profiler_allocate_slot ("w32codec rgb2yuv convert");
+ this->prof_rgb2yuv = xine_profiler_allocate_slot ("w32codec rgb2yuv convert");
return (video_decoder_t *) this;
@@ -1148,7 +1147,7 @@ audio_decoder_t *init_audio_decoder_plugin (int iface_version, config_values_t *
win32_def_path = cfg->lookup_str (cfg, "win32_path", "/usr/lib/win32");
- this = (w32a_decoder_t *) xmalloc (sizeof (w32a_decoder_t));
+ this = (w32a_decoder_t *) xine_xmalloc (sizeof (w32a_decoder_t));
this->audio_decoder.interface_version = 3;
this->audio_decoder.can_handle = w32a_can_handle;
diff --git a/src/video_out/deinterlace.c b/src/video_out/deinterlace.c
index ea8964a7b..9b057f51d 100644
--- a/src/video_out/deinterlace.c
+++ b/src/video_out/deinterlace.c
@@ -28,10 +28,8 @@
#include <string.h>
#include "xine_internal.h"
#include "deinterlace.h"
-#include "memcpy.h"
+#include "xineutils.h"
-#include "cpu_accel.c"
-#include "memcpy.c"
/*
DeinterlaceFieldBob algorithm
@@ -72,9 +70,9 @@ static void deinterlace_bob_yuv_mmx( uint8_t *pdst, uint8_t *psrc[],
// copy first even line no matter what, and the first odd line if we're
// processing an odd field.
- fast_memcpy(pdst, pEvenLines, LineLength);
+ xine_fast_memcpy(pdst, pEvenLines, LineLength);
if (IsOdd)
- fast_memcpy(pdst + LineLength, pOddLines, LineLength);
+ xine_fast_memcpy(pdst + LineLength, pOddLines, LineLength);
height = height / 2;
for (Line = 0; Line < height - 1; ++Line)
@@ -103,7 +101,7 @@ static void deinterlace_bob_yuv_mmx( uint8_t *pdst, uint8_t *psrc[],
// half the time this function is called, those words' meanings will invert.
// Copy the odd line to the overlay verbatim.
- fast_memcpy((char *)Dest + LineLength, YVal3, LineLength);
+ xine_fast_memcpy((char *)Dest + LineLength, YVal3, LineLength);
n = LineLength >> 3;
while( n-- )
@@ -167,7 +165,7 @@ static void deinterlace_bob_yuv_mmx( uint8_t *pdst, uint8_t *psrc[],
// Copy last odd line if we're processing an even field.
if (! IsOdd)
{
- fast_memcpy(pdst + (height * 2 - 1) * LineLength,
+ xine_fast_memcpy(pdst + (height * 2 - 1) * LineLength,
pOddLines + (height - 1) * SourcePitch,
LineLength);
}
@@ -236,9 +234,9 @@ static int deinterlace_weave_yuv_mmx( uint8_t *pdst, uint8_t *psrc[],
// copy first even line no matter what, and the first odd line if we're
// processing an even field.
- fast_memcpy(pdst, pEvenLines, LineLength);
+ xine_fast_memcpy(pdst, pEvenLines, LineLength);
if (!IsOdd)
- fast_memcpy(pdst + LineLength, pOddLines, LineLength);
+ xine_fast_memcpy(pdst + LineLength, pOddLines, LineLength);
height = height / 2;
for (Line = 0; Line < height - 1; ++Line)
@@ -271,7 +269,7 @@ static int deinterlace_weave_yuv_mmx( uint8_t *pdst, uint8_t *psrc[],
// Copy the even scanline below this one to the overlay buffer, since we'll be
// adapting the current scanline to the even lines surrounding it. The scanline
// above has already been copied by the previous pass through the loop.
- fast_memcpy((char *)Dest + LineLength, YVal3, LineLength);
+ xine_fast_memcpy((char *)Dest + LineLength, YVal3, LineLength);
n = LineLength >> 3;
while( n-- )
@@ -356,7 +354,7 @@ static int deinterlace_weave_yuv_mmx( uint8_t *pdst, uint8_t *psrc[],
// Copy last odd line if we're processing an odd field.
if (IsOdd)
{
- fast_memcpy(pdst + (height * 2 - 1) * LineLength,
+ xine_fast_memcpy(pdst + (height * 2 - 1) * LineLength,
pOddLines + (height - 1) * SourcePitch,
LineLength);
}
@@ -421,9 +419,9 @@ static int deinterlace_greedy_yuv_mmx( uint8_t *pdst, uint8_t *psrc[],
// copy first even line no matter what, and the first odd line if we're
// processing an EVEN field. (note diff from other deint rtns.)
- fast_memcpy(pdst, pEvenLines, LineLength); //DL0
+ xine_fast_memcpy(pdst, pEvenLines, LineLength); //DL0
if (!IsOdd)
- fast_memcpy(pdst + LineLength, pOddLines, LineLength); //DL1
+ xine_fast_memcpy(pdst + LineLength, pOddLines, LineLength); //DL1
height = height / 2;
for (Line = 0; Line < height - 1; ++Line)
@@ -447,7 +445,7 @@ static int deinterlace_greedy_yuv_mmx( uint8_t *pdst, uint8_t *psrc[],
Dest = (uint64_t *)(pdst + (Line * 2 + 2) * LineLength);
}
- fast_memcpy((char *)Dest + LineLength, L3, LineLength);
+ xine_fast_memcpy((char *)Dest + LineLength, L3, LineLength);
// For ease of reading, the comments below assume that we're operating on an odd
// field (i.e., that info->IsOdd is true). Assume the obvious for even lines..
@@ -528,7 +526,7 @@ static int deinterlace_greedy_yuv_mmx( uint8_t *pdst, uint8_t *psrc[],
/* Copy last odd line if we're processing an Odd field. */
if (IsOdd)
{
- fast_memcpy(pdst + (height * 2 - 1) * LineLength,
+ xine_fast_memcpy(pdst + (height * 2 - 1) * LineLength,
pOddLines + (height - 1) * SourcePitch,
LineLength);
}
@@ -568,9 +566,9 @@ static void deinterlace_onefield_yuv_mmx( uint8_t *pdst, uint8_t *psrc[],
* processing an odd field.
*/
- fast_memcpy(pdst, pEvenLines, LineLength);
+ xine_fast_memcpy(pdst, pEvenLines, LineLength);
if (IsOdd)
- fast_memcpy(pdst + LineLength, pOddLines, LineLength);
+ xine_fast_memcpy(pdst + LineLength, pOddLines, LineLength);
height = height / 2;
for (Line = 0; Line < height - 1; ++Line)
@@ -589,7 +587,7 @@ static void deinterlace_onefield_yuv_mmx( uint8_t *pdst, uint8_t *psrc[],
}
// Copy the odd line to the overlay verbatim.
- fast_memcpy((char *)Dest + LineLength, YVal3, LineLength);
+ xine_fast_memcpy((char *)Dest + LineLength, YVal3, LineLength);
n = LineLength >> 3;
while( n-- )
@@ -611,7 +609,7 @@ static void deinterlace_onefield_yuv_mmx( uint8_t *pdst, uint8_t *psrc[],
/* Copy last odd line if we're processing an even field. */
if (! IsOdd)
{
- fast_memcpy(pdst + (height * 2 - 1) * LineLength,
+ xine_fast_memcpy(pdst + (height * 2 - 1) * LineLength,
pOddLines + (height - 1) * SourcePitch,
LineLength);
}
@@ -630,7 +628,7 @@ static int check_for_mmx(void)
static int config_flags = -1;
if ( config_flags == -1 )
- config_flags = mm_accel();
+ config_flags = xine_mm_accel();
if (config_flags & MM_ACCEL_X86_MMX)
return 1;
return 0;
@@ -658,7 +656,7 @@ void deinterlace_yuv( uint8_t *pdst, uint8_t *psrc[],
{
switch( method ) {
case DEINTERLACE_NONE:
- fast_memcpy(pdst,psrc[0],width*height);
+ xine_fast_memcpy(pdst,psrc[0],width*height);
break;
case DEINTERLACE_BOB:
if( check_for_mmx() )
@@ -670,7 +668,7 @@ void deinterlace_yuv( uint8_t *pdst, uint8_t *psrc[],
if( check_for_mmx() )
{
if( !deinterlace_weave_yuv_mmx(pdst,psrc,width,height) )
- fast_memcpy(pdst,psrc[0],width*height);
+ xine_fast_memcpy(pdst,psrc[0],width*height);
}
else /* FIXME: provide an alternative? */
abort_mmx_missing();
@@ -679,7 +677,7 @@ void deinterlace_yuv( uint8_t *pdst, uint8_t *psrc[],
if( check_for_mmx() )
{
if( !deinterlace_greedy_yuv_mmx(pdst,psrc,width,height) )
- fast_memcpy(pdst,psrc[0],width*height);
+ xine_fast_memcpy(pdst,psrc[0],width*height);
}
else /* FIXME: provide an alternative? */
abort_mmx_missing();
diff --git a/src/video_out/video_out_syncfb.c b/src/video_out/video_out_syncfb.c
index e62460c20..9397dffdb 100644
--- a/src/video_out/video_out_syncfb.c
+++ b/src/video_out/video_out_syncfb.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_syncfb.c,v 1.45 2001/11/09 19:53:57 joachim_koenig Exp $
+ * $Id: video_out_syncfb.c,v 1.46 2001/11/17 14:26:39 f1rmb Exp $
*
* video_out_syncfb.c, SyncFB (for Matrox G200/G400 cards) interface for xine
*
@@ -54,12 +54,11 @@
#include "video_out_syncfb.h"
-#include "monitor.h"
#include "video_out.h"
#include "video_out_x11.h"
#include "xine_internal.h"
#include "alphablend.h"
-#include "memcpy.h"
+#include "xineutils.h"
uint32_t xine_debug;
@@ -258,7 +257,7 @@ static void write_frame_YUV420P2(syncfb_driver_t* this, syncfb_frame_t* frame)
dst8 = this->video_mem + this->bufinfo.offset;
for(h = 0; h < frame->height; h++) {
- fast_memcpy(dst8, y, frame->width);
+ xine_fast_memcpy(dst8, y, frame->width);
y += frame->width;
dst8 += bespitch;
}
@@ -274,21 +273,21 @@ static void write_frame_YUV420P3(syncfb_driver_t* this, syncfb_frame_t* frame)
int bespitch = (frame->width + 31) & ~31;
for(h = 0; h < frame->height; h++) {
- fast_memcpy(dst8, y, frame->width);
+ xine_fast_memcpy(dst8, y, frame->width);
y += frame->width;
dst8 += bespitch;
}
dst8 = this->video_mem + this->bufinfo.offset_p2;
for(h = 0; h < (frame->height / 2); h++) {
- fast_memcpy(dst8, cb, (frame->width / 2));
+ xine_fast_memcpy(dst8, cb, (frame->width / 2));
cb += (frame->width / 2);
dst8 += (bespitch / 2);
}
dst8 = this->video_mem + this->bufinfo.offset_p3;
for(h=0; h < (frame->height / 2); h++) {
- fast_memcpy(dst8, cr, (frame->width / 2));
+ xine_fast_memcpy(dst8, cr, (frame->width / 2));
cr += (frame->width / 2);
dst8 += (bespitch / 2);
}
@@ -302,7 +301,7 @@ static void write_frame_YUY2(syncfb_driver_t* this, syncfb_frame_t* frame)
int bespitch = (frame->width + 31) & ~31;
for(h = 0; h < frame->height; h++) {
- fast_memcpy(dst8, src8, (frame->width * 2));
+ xine_fast_memcpy(dst8, src8, (frame->width * 2));
dst8 += (bespitch * 2);
src8 += (frame->width * 2);
diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c
index 115883a6c..85cbaf261 100644
--- a/src/video_out/video_out_xshm.c
+++ b/src/video_out/video_out_xshm.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_xshm.c,v 1.49 2001/10/29 02:15:22 miguelfreitas Exp $
+ * $Id: video_out_xshm.c,v 1.50 2001/11/17 14:26:39 f1rmb Exp $
*
* video_out_xshm.c, X11 shared memory extension interface for xine
*
@@ -54,11 +54,10 @@
#include <netinet/in.h>
#include "xine_internal.h"
-#include "monitor.h"
-#include "utils.h"
#include "video_out_x11.h"
#include "alphablend.h"
#include "yuv2rgb.h"
+#include "xineutils.h"
uint32_t xine_debug;
@@ -192,7 +191,7 @@ static void *my_malloc_aligned (size_t alignment, size_t size, uint8_t **chunk)
uint8_t *pMem;
- pMem = xmalloc (size+alignment);
+ pMem = xine_xmalloc (size+alignment);
*chunk = pMem;
@@ -312,7 +311,7 @@ static XImage *create_ximage (xshm_driver_t *this, XShmSegmentInfo *shminfo,
this->bytes_per_pixel = this->bpp / 8;
this->image_byte_order = myimage->byte_order;
- myimage->data = xmalloc (width * this->bytes_per_pixel * height);
+ myimage->data = xine_xmalloc (width * this->bytes_per_pixel * height);
}
return myimage;
@@ -353,7 +352,7 @@ static void xshm_frame_copy (vo_frame_t *vo_img, uint8_t **src) {
xshm_frame_t *frame = (xshm_frame_t *) vo_img ;
xshm_driver_t *this = (xshm_driver_t *) vo_img->instance->driver;
- profiler_start_count (this->prof_yuv2rgb);
+ xine_profiler_start_count (this->prof_yuv2rgb);
if (frame->format == IMGFMT_YV12) {
this->yuv2rgb->yuv2rgb_fun (this->yuv2rgb, frame->rgb_dst,
@@ -365,7 +364,7 @@ static void xshm_frame_copy (vo_frame_t *vo_img, uint8_t **src) {
}
- profiler_stop_count (this->prof_yuv2rgb);
+ xine_profiler_stop_count (this->prof_yuv2rgb);
frame->rgb_dst += frame->stripe_inc;
}
@@ -1212,7 +1211,7 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) {
this->gc = XCreateGC (this->display, this->drawable,
0, NULL);
- this->prof_yuv2rgb = profiler_allocate_slot ("xshm yuv2rgb convert");
+ this->prof_yuv2rgb = xine_profiler_allocate_slot ("xshm yuv2rgb convert");
this->vo_driver.get_capabilities = xshm_get_capabilities;
this->vo_driver.alloc_frame = xshm_alloc_frame;
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c
index ea264353c..4299bac9f 100644
--- a/src/video_out/video_out_xv.c
+++ b/src/video_out/video_out_xv.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_xv.c,v 1.74 2001/11/09 14:06:48 matt2000 Exp $
+ * $Id: video_out_xv.c,v 1.75 2001/11/17 14:26:39 f1rmb Exp $
*
* video_out_xv.c, X11 video extension interface for xine
*
@@ -50,14 +50,13 @@
#include <stdlib.h>
#include <string.h>
-#include "monitor.h"
#include "video_out.h"
#include "video_out_x11.h"
#include "xine_internal.h"
/* #include "overlay.h" */
#include "alphablend.h"
#include "deinterlace.h"
-#include "memcpy.h"
+#include "xineutils.h"
uint32_t xine_debug;
@@ -473,7 +472,7 @@ static void xv_deinterlace_frame (xv_driver_t *this) {
#else
/* know bug: we are not deinterlacing Cb and Cr */
- fast_memcpy(this->deinterlace_frame.image->data + frame->width*frame->height,
+ xine_fast_memcpy(this->deinterlace_frame.image->data + frame->width*frame->height,
frame->image->data + frame->width*frame->height,
frame->width*frame->height*1/2);
@@ -498,7 +497,7 @@ static void xv_deinterlace_frame (xv_driver_t *this) {
dst = this->deinterlace_frame.image->data;
src = this->recent_frames[0]->image->data;
for( i = 0; i < frame->height; i+=2 ) {
- fast_memcpy(dst,src,frame->width);
+ xine_fast_memcpy(dst,src,frame->width);
dst+=frame->width;
src+=2*frame->width;
}
@@ -506,7 +505,7 @@ static void xv_deinterlace_frame (xv_driver_t *this) {
dst = this->deinterlace_frame.image->data + frame->width*frame->height/2;
src = this->recent_frames[0]->image->data + frame->width*frame->height;
for( i = 0; i < frame->height; i+=4 ) {
- fast_memcpy(dst,src,frame->width/2);
+ xine_fast_memcpy(dst,src,frame->width/2);
dst+=frame->width/2;
src+=frame->width;
}
@@ -514,7 +513,7 @@ static void xv_deinterlace_frame (xv_driver_t *this) {
dst = this->deinterlace_frame.image->data + frame->width*frame->height*5/8;
src = this->recent_frames[0]->image->data + frame->width*frame->height*5/4;
for( i = 0; i < frame->height; i+=4 ) {
- fast_memcpy(dst,src,frame->width/2);
+ xine_fast_memcpy(dst,src,frame->width/2);
dst+=frame->width/2;
src+=frame->width;
}
diff --git a/src/video_out/yuv2rgb.c b/src/video_out/yuv2rgb.c
index ec1015b82..587292618 100644
--- a/src/video_out/yuv2rgb.c
+++ b/src/video_out/yuv2rgb.c
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: yuv2rgb.c,v 1.26 2001/10/29 02:15:22 miguelfreitas Exp $
+ * $Id: yuv2rgb.c,v 1.27 2001/11/17 14:26:39 f1rmb Exp $
*/
#include "config.h"
@@ -33,11 +33,8 @@
#include <inttypes.h>
#include "yuv2rgb.h"
-#include "attributes.h"
-#include "cpu_accel.h"
-#include "monitor.h"
-#include "utils.h"
-#include "memcpy.h"
+#include "xineutils.h"
+
static int prof_scale_line = -1;
@@ -60,7 +57,7 @@ static void *my_malloc_aligned (size_t alignment, size_t size, void **chunk) {
char *pMem;
- pMem = xmalloc (size+alignment);
+ pMem = xine_xmalloc (size+alignment);
*chunk = pMem;
@@ -81,7 +78,7 @@ int yuv2rgb_setup (yuv2rgb_t *this,
dest_width, dest_height);
*/
if (prof_scale_line == -1)
- prof_scale_line = profiler_allocate_slot("xshm scale line");
+ prof_scale_line = xine_profiler_allocate_slot("xshm scale line");
this->source_width = source_width;
this->source_height = source_height;
@@ -158,7 +155,7 @@ static void scale_line_gen (uint8_t *source, uint8_t *dest,
int p2;
int dx;
- profiler_start_count(prof_scale_line);
+ xine_profiler_start_count(prof_scale_line);
p1 = *source++;
p2 = *source++;
@@ -179,7 +176,7 @@ static void scale_line_gen (uint8_t *source, uint8_t *dest,
width --;
}
- profiler_stop_count(prof_scale_line);
+ xine_profiler_stop_count(prof_scale_line);
}
/*
@@ -193,7 +190,7 @@ static void scale_line_15_16 (uint8_t *source, uint8_t *dest,
int p1, p2;
- profiler_start_count(prof_scale_line);
+ xine_profiler_start_count(prof_scale_line);
while ((width -= 16) >= 0) {
p1 = source[0];
@@ -262,7 +259,7 @@ static void scale_line_15_16 (uint8_t *source, uint8_t *dest,
if (--width <= 0) goto done;
*dest++ = (7*source[13] + 1*source[14]) >> 3;
done:
- profiler_stop_count(prof_scale_line);
+ xine_profiler_stop_count(prof_scale_line);
}
@@ -279,7 +276,7 @@ static void scale_line_45_53 (uint8_t *source, uint8_t *dest,
int p1, p2;
- profiler_start_count(prof_scale_line);
+ xine_profiler_start_count(prof_scale_line);
while ((width -= 53) >= 0) {
p1 = source[0];
@@ -491,7 +488,7 @@ static void scale_line_45_53 (uint8_t *source, uint8_t *dest,
*dest++ = (3*source[43] + 1*source[44]) >> 2;
done:
- profiler_stop_count(prof_scale_line);
+ xine_profiler_stop_count(prof_scale_line);
}
@@ -507,7 +504,7 @@ static void scale_line_45_64 (uint8_t *source, uint8_t *dest,
int p1, p2;
- profiler_start_count(prof_scale_line);
+ xine_profiler_start_count(prof_scale_line);
while ((width -= 64) >= 0) {
p1 = source[0];
@@ -752,7 +749,7 @@ static void scale_line_45_64 (uint8_t *source, uint8_t *dest,
*dest++ = (3*source[43] + 5*source[44]) >> 3;
done:
- profiler_stop_count(prof_scale_line);
+ xine_profiler_stop_count(prof_scale_line);
}
@@ -766,7 +763,7 @@ static void scale_line_9_16 (uint8_t *source, uint8_t *dest,
int p1, p2;
- profiler_start_count(prof_scale_line);
+ xine_profiler_start_count(prof_scale_line);
while ((width -= 16) >= 0) {
p1 = source[0];
@@ -830,7 +827,7 @@ static void scale_line_9_16 (uint8_t *source, uint8_t *dest,
if (--width <= 0) goto done;
*dest++ = (1*source[7] + 7*source[8]) >> 3;
done:
- profiler_stop_count(prof_scale_line);
+ xine_profiler_stop_count(prof_scale_line);
}
@@ -843,7 +840,7 @@ static void scale_line_11_12 (uint8_t *source, uint8_t *dest,
int p1, p2;
- profiler_start_count(prof_scale_line);
+ xine_profiler_start_count(prof_scale_line);
while ((width -= 12) >= 0) {
p1 = source[0];
@@ -898,7 +895,7 @@ static void scale_line_11_12 (uint8_t *source, uint8_t *dest,
*dest++ = (7*source[9] + 1*source[10]) >> 3;
done:
- profiler_stop_count(prof_scale_line);
+ xine_profiler_stop_count(prof_scale_line);
}
@@ -912,7 +909,7 @@ static void scale_line_11_24 (uint8_t *source, uint8_t *dest,
int p1, p2;
- profiler_start_count(prof_scale_line);
+ xine_profiler_start_count(prof_scale_line);
while ((width -= 24) >= 0) {
p1 = source[0];
@@ -1003,7 +1000,7 @@ static void scale_line_11_24 (uint8_t *source, uint8_t *dest,
*dest++ = (7*source[10] + 1*source[11]) >> 3;
done:
- profiler_stop_count(prof_scale_line);
+ xine_profiler_stop_count(prof_scale_line);
}
@@ -1016,7 +1013,7 @@ static void scale_line_5_8 (uint8_t *source, uint8_t *dest,
int p1, p2;
- profiler_start_count(prof_scale_line);
+ xine_profiler_start_count(prof_scale_line);
while ((width -= 8) >= 0) {
p1 = source[0];
@@ -1053,7 +1050,7 @@ static void scale_line_5_8 (uint8_t *source, uint8_t *dest,
*dest++ = (1*source[3] + 3*source[4]) >> 2;
done:
- profiler_stop_count(prof_scale_line);
+ xine_profiler_stop_count(prof_scale_line);
}
@@ -1066,7 +1063,7 @@ static void scale_line_3_4 (uint8_t *source, uint8_t *dest,
int p1, p2;
- profiler_start_count(prof_scale_line);
+ xine_profiler_start_count(prof_scale_line);
while ((width -= 4) >= 0) {
p1 = source[0];
@@ -1089,7 +1086,7 @@ static void scale_line_3_4 (uint8_t *source, uint8_t *dest,
*dest++ = (1*source[1] + 1*source[2]) >> 1;
done:
- profiler_stop_count(prof_scale_line);
+ xine_profiler_stop_count(prof_scale_line);
}
@@ -1099,7 +1096,7 @@ static void scale_line_1_2 (uint8_t *source, uint8_t *dest,
int width, int step) {
int p1, p2;
- profiler_start_count(prof_scale_line);
+ xine_profiler_start_count(prof_scale_line);
p1 = *source;
while ((width -= 4) >= 0) {
@@ -1119,7 +1116,7 @@ static void scale_line_1_2 (uint8_t *source, uint8_t *dest,
*dest++ = source[1];
done:
- profiler_stop_count(prof_scale_line);
+ xine_profiler_stop_count(prof_scale_line);
}
@@ -1130,9 +1127,9 @@ static void scale_line_1_2 (uint8_t *source, uint8_t *dest,
static void scale_line_1_1 (uint8_t *source, uint8_t *dest,
int width, int step) {
- profiler_start_count(prof_scale_line);
- fast_memcpy(dest, source, width);
- profiler_stop_count(prof_scale_line);
+ xine_profiler_start_count(prof_scale_line);
+ xine_fast_memcpy(dest, source, width);
+ xine_profiler_stop_count(prof_scale_line);
}
@@ -2962,9 +2959,9 @@ static void yuy22rgb_c_init (yuv2rgb_t *this, int mode, int swapped)
yuv2rgb_t *yuv2rgb_init (int mode, int swapped, uint8_t *colormap) {
#ifdef ARCH_X86
- uint32_t mm = mm_accel();
+ uint32_t mm = xine_mm_accel();
#endif
- yuv2rgb_t *this = xmalloc (sizeof (yuv2rgb_t));
+ yuv2rgb_t *this = xine_xmalloc (sizeof (yuv2rgb_t));
this->matrix_coefficients = 6;
diff --git a/src/video_out/yuv2rgb_mmx.c b/src/video_out/yuv2rgb_mmx.c
index d085fc635..8c94e5cb5 100644
--- a/src/video_out/yuv2rgb_mmx.c
+++ b/src/video_out/yuv2rgb_mmx.c
@@ -31,10 +31,8 @@
#include <string.h>
#include <inttypes.h>
-#include "attributes.h"
-#include "cpu_accel.h"
#include "yuv2rgb.h"
-#include "memcpy.h"
+#include "xineutils.h"
#define CPU_MMXEXT 0
#define CPU_MMX 1
@@ -453,7 +451,7 @@ static inline void yuv420_rgb16 (yuv2rgb_t *this,
while (--dst_height > 0 && dy < 32768) {
- fast_memcpy (image, image-rgb_stride, this->dest_width*2);
+ xine_fast_memcpy (image, image-rgb_stride, this->dest_width*2);
dy += this->step_dy;
image += rgb_stride;
@@ -561,7 +559,7 @@ static inline void yuv420_rgb15 (yuv2rgb_t *this,
while (--dst_height > 0 && dy < 32768) {
- fast_memcpy (image, image-rgb_stride, this->dest_width*2);
+ xine_fast_memcpy (image, image-rgb_stride, this->dest_width*2);
dy += this->step_dy;
image += rgb_stride;
@@ -668,7 +666,7 @@ static inline void yuv420_rgb24 (yuv2rgb_t *this,
while (--dst_height > 0 && dy < 32768) {
- fast_memcpy (image, image-rgb_stride, this->dest_width*3);
+ xine_fast_memcpy (image, image-rgb_stride, this->dest_width*3);
dy += this->step_dy;
image += rgb_stride;
@@ -776,7 +774,7 @@ static inline void yuv420_argb32 (yuv2rgb_t *this,
while (--dst_height > 0 && dy < 32768) {
- fast_memcpy (image, image-rgb_stride, this->dest_width*4);
+ xine_fast_memcpy (image, image-rgb_stride, this->dest_width*4);
dy += this->step_dy;
image += rgb_stride;
@@ -884,7 +882,7 @@ static inline void yuv420_abgr32 (yuv2rgb_t *this,
while (--dst_height > 0 && dy < 32768) {
- fast_memcpy (image, image-rgb_stride, this->dest_width*4);
+ xine_fast_memcpy (image, image-rgb_stride, this->dest_width*4);
dy += this->step_dy;
image += rgb_stride;
diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c
index 6f13ffcda..019231b0e 100644
--- a/src/xine-engine/audio_decoder.c
+++ b/src/xine-engine/audio_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_decoder.c,v 1.54 2001/11/15 23:18:04 guenter Exp $
+ * $Id: audio_decoder.c,v 1.55 2001/11/17 14:26:39 f1rmb Exp $
*
*
* functions that implement audio decoding
@@ -34,9 +34,7 @@
#include <unistd.h>
#include "xine_internal.h"
-#include "utils.h"
-#include "monitor.h"
-
+#include "xineutils.h"
void *audio_decoder_loop (void *this_gen) {
@@ -48,7 +46,7 @@ void *audio_decoder_loop (void *this_gen) {
static int prof_audio_decode = -1;
if (prof_audio_decode == -1)
- prof_audio_decode = profiler_allocate_slot ("audio decoder/output");
+ prof_audio_decode = xine_profiler_allocate_slot ("audio decoder/output");
while (running) {
@@ -171,7 +169,7 @@ void *audio_decoder_loop (void *this_gen) {
break;
}
- profiler_start_count (prof_audio_decode);
+ xine_profiler_start_count (prof_audio_decode);
if ( (buf->type & 0xFF000000) == BUF_AUDIO_BASE ) {
@@ -263,7 +261,7 @@ void *audio_decoder_loop (void *this_gen) {
} else
printf ("audio_loop: unknown buffer type: %08x\n", buf->type);
- profiler_stop_count (prof_audio_decode);
+ xine_profiler_stop_count (prof_audio_decode);
}
buf->free_buffer (buf);
diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c
index bb72a64a5..9c0140cf3 100644
--- a/src/xine-engine/audio_out.c
+++ b/src/xine-engine/audio_out.c
@@ -17,7 +17,7 @@
* along with self program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_out.c,v 1.28 2001/11/16 21:06:22 jcdutton Exp $
+ * $Id: audio_out.c,v 1.29 2001/11/17 14:26:39 f1rmb Exp $
*
* 22-8-2001 James imported some useful AC3 sections from the previous alsa driver.
* (c) 2001 Andy Lo A Foe <andy@alsaplayer.org>
@@ -60,11 +60,11 @@
#include <inttypes.h>
#include "xine_internal.h"
-#include "monitor.h"
+#include "xineutils.h"
#include "audio_out.h"
#include "resample.h"
#include "metronom.h"
-#include "utils.h"
+
/*
#define AUDIO_OUT_LOG
@@ -138,7 +138,7 @@ static audio_fifo_t *fifo_new () {
audio_fifo_t *fifo;
- fifo = (audio_fifo_t *) xmalloc (sizeof (audio_fifo_t));
+ fifo = (audio_fifo_t *) xine_xmalloc (sizeof (audio_fifo_t));
if (!fifo) {
printf ("audio_out: out of memory!\n");
@@ -650,7 +650,7 @@ ao_instance_t *ao_new_instance (ao_driver_t *driver, metronom_t *metronom,
ao_instance_t *this;
int i;
- this = xmalloc (sizeof (ao_instance_t)) ;
+ this = xine_xmalloc (sizeof (ao_instance_t)) ;
this->driver = driver;
this->metronom = metronom;
@@ -665,8 +665,8 @@ ao_instance_t *ao_new_instance (ao_driver_t *driver, metronom_t *metronom,
this->set_property = ao_set_property;
this->audio_loop_running = 0;
/* FIXME: is 4* good enough for all resample cases?? */
- this->frame_buffer = xmalloc (4 * AUDIO_BUF_SIZE);
- this->zero_space = xmalloc (ZERO_BUF_SIZE * 2 * 6);
+ this->frame_buffer = xine_xmalloc (4 * AUDIO_BUF_SIZE);
+ this->zero_space = xine_xmalloc (ZERO_BUF_SIZE * 2 * 6);
this->gap_tolerance = driver->get_gap_tolerance (this->driver);
this->resample_conf = config->lookup_int (config, "audio_resample_mode", 0);
diff --git a/src/xine-engine/buffer.c b/src/xine-engine/buffer.c
index 382d6de0a..e7a71f764 100644
--- a/src/xine-engine/buffer.c
+++ b/src/xine-engine/buffer.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: buffer.c,v 1.11 2001/11/06 21:46:05 miguelfreitas Exp $
+ * $Id: buffer.c,v 1.12 2001/11/17 14:26:39 f1rmb Exp $
*
*
* contents:
@@ -38,7 +38,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "buffer.h"
-#include "utils.h"
+#include "xineutils.h"
/*
* put a previously allocated buffer element back into the buffer pool
@@ -229,7 +229,7 @@ fifo_buffer_t *fifo_buffer_new (int num_buffers, uint32_t buf_size) {
int alignment = 2048;
char *multi_buffer = NULL;
- this = xmalloc (sizeof (fifo_buffer_t));
+ this = xine_xmalloc (sizeof (fifo_buffer_t));
this->first = NULL;
this->last = NULL;
@@ -254,7 +254,7 @@ fifo_buffer_t *fifo_buffer_new (int num_buffers, uint32_t buf_size) {
printf ("Allocating %d buffers of %ld bytes in one chunk (alignment = %d)\n",
num_buffers, (long int) buf_size, alignment);
*/
- multi_buffer = xmalloc_aligned (alignment, num_buffers * buf_size);
+ multi_buffer = xine_xmalloc_aligned (alignment, num_buffers * buf_size);
this->buffer_pool_top = NULL;
@@ -264,7 +264,7 @@ fifo_buffer_t *fifo_buffer_new (int num_buffers, uint32_t buf_size) {
for (i = 0; i<num_buffers; i++) {
buf_element_t *buf;
- buf = xmalloc (sizeof (buf_element_t));
+ buf = xine_xmalloc (sizeof (buf_element_t));
buf->mem = multi_buffer;
multi_buffer += buf_size;
diff --git a/src/xine-engine/buffer_types.c b/src/xine-engine/buffer_types.c
index be480d770..d59c8b74e 100644
--- a/src/xine-engine/buffer_types.c
+++ b/src/xine-engine/buffer_types.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: buffer_types.c,v 1.4 2001/11/15 00:30:33 miguelfreitas Exp $
+ * $Id: buffer_types.c,v 1.5 2001/11/17 14:26:39 f1rmb Exp $
*
*
* contents:
@@ -36,7 +36,6 @@
#include <stdlib.h>
#include <inttypes.h>
#include "buffer.h"
-#include "utils.h"
#define WINE_TYPEDEFS_ONLY
#include "libw32dll/wine/avifmt.h"
diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c
index d901f0d5c..0eddae1a9 100644
--- a/src/xine-engine/configfile.c
+++ b/src/xine-engine/configfile.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: configfile.c,v 1.4 2001/07/26 11:12:26 f1rmb Exp $
+ * $Id: configfile.c,v 1.5 2001/11/17 14:26:39 f1rmb Exp $
*
* config file management - implementation
*
@@ -31,7 +31,7 @@
#include <stdlib.h>
#include <string.h>
#include "configfile.h"
-#include "utils.h"
+#include "xineutils.h"
/*
* internal utility functions
@@ -42,14 +42,14 @@ void config_file_add (config_values_t *this, char *key, char *value) {
cfg_entry_t *entry;
int len;
- entry = (cfg_entry_t *) xmalloc (sizeof (cfg_entry_t));
+ entry = (cfg_entry_t *) xine_xmalloc (sizeof (cfg_entry_t));
len = strlen (key);
- entry->key = (char *) xmalloc (len+2);
+ entry->key = (char *) xine_xmalloc (len+2);
strncpy (entry->key, key, len+1);
len = strlen (value);
- entry->value = (char *) xmalloc (len+21);
+ entry->value = (char *) xine_xmalloc (len+21);
strncpy (entry->value, value, len+1);
entry->next = NULL;
@@ -172,7 +172,7 @@ static void config_file_set_str (config_values_t *this,
free (entry->value);
len = strlen (value);
- entry->value = (char *) xmalloc (len+20);
+ entry->value = (char *) xine_xmalloc (len+20);
strncpy (entry->value, value, len);
}
@@ -188,7 +188,7 @@ static void config_file_save (config_values_t *this) {
FILE *f_config;
char filename[1024];
- sprintf (filename, "%s/.xinerc", get_homedir());
+ sprintf (filename, "%s/.xinerc", xine_get_homedir());
f_config = fopen (filename, "w");
@@ -250,8 +250,8 @@ config_values_t *config_file_init (char *filename) {
config_values_t *this;
cfg_data_t *data;
- if ( (this = xmalloc(sizeof(config_values_t))) ) {
- if ( (data = xmalloc(sizeof(cfg_data_t))) ) {
+ if ( (this = xine_xmalloc(sizeof(config_values_t))) ) {
+ if ( (data = xine_xmalloc(sizeof(cfg_data_t))) ) {
data->gConfig = NULL;
data->gConfigLast = NULL;
this->data = data;
@@ -279,6 +279,12 @@ config_values_t *config_file_init (char *filename) {
/*
* $Log: configfile.c,v $
+ * Revision 1.5 2001/11/17 14:26:39 f1rmb
+ * Add 'xine_' prefix to all of xine-utils functions (what about cpu
+ * acceleration?). Merge xine-utils header files to a new one "xineutils.h".
+ * Update xine-lib C/headers to reflect those changes.
+ * dxr3 headers are no more installed ine $includdir, but $includdir/xine.
+ *
* Revision 1.4 2001/07/26 11:12:26 f1rmb
* Updated doxy sections in xine.h.tmpl.in. Added man3. Removed french man page. Added API doc in html. Add new rpm package (doc). Fixes some little bugs in
* proto decl, etc...
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c
index 55cd6f78a..a1feeac35 100644
--- a/src/xine-engine/load_plugins.c
+++ b/src/xine-engine/load_plugins.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: load_plugins.c,v 1.53 2001/11/06 00:23:14 miguelfreitas Exp $
+ * $Id: load_plugins.c,v 1.54 2001/11/17 14:26:39 f1rmb Exp $
*
*
* Load input/demux/audio_out/video_out/codec plugins
@@ -44,8 +44,7 @@
#include "video_out.h"
#include "metronom.h"
#include "configfile.h"
-#include "utils.h"
-#include "monitor.h"
+#include "xineutils.h"
#ifndef __GNUC__
#define __FUNCTION__ __func__
@@ -187,11 +186,11 @@ void xine_list_demux_plugins (config_values_t *config,
int incsize;
char *s;
- this = xmalloc (sizeof (xine_t));
+ this = xine_xmalloc (sizeof (xine_t));
sizeid = sizemime = incsize = 4096;
- *identifiers = xmalloc (sizeid);
- *mimetypes = xmalloc (sizemime);
+ *identifiers = xine_xmalloc (sizeid);
+ *mimetypes = xine_xmalloc (sizemime);
this->config = config;
xine_debug = config->lookup_int (config, "xine_debug", 0);
@@ -358,7 +357,7 @@ static char **_xine_get_featured_input_plugin_ids(xine_t *this, int feature) {
if(!this->num_input_plugins)
return NULL;
- plugin_ids = (char **) xmalloc (this->num_input_plugins * sizeof (char *));
+ plugin_ids = (char **) xine_xmalloc (this->num_input_plugins * sizeof (char *));
for(i = 0; i < this->num_input_plugins; i++) {
@@ -608,7 +607,7 @@ char **xine_list_video_output_plugins (int visual_type) {
int i,j;
int plugin_prios[50];
- plugin_ids = (char **) xmalloc (50 * sizeof (char *));
+ plugin_ids = (char **) xine_xmalloc (50 * sizeof (char *));
plugin_ids[0] = NULL;
install_segv_handler();
@@ -788,7 +787,7 @@ char **xine_list_audio_output_plugins(void) {
int i,j;
int plugin_prios[50];
- plugin_ids = (char **) xmalloc (50 * sizeof (char *));
+ plugin_ids = (char **) xine_xmalloc (50 * sizeof (char *));
plugin_ids[0] = NULL;
install_segv_handler();
diff --git a/src/xine-engine/lrb.c b/src/xine-engine/lrb.c
index dd71ef298..a87252c9b 100644
--- a/src/xine-engine/lrb.c
+++ b/src/xine-engine/lrb.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: lrb.c,v 1.1 2001/10/18 18:50:53 guenter Exp $
+ * $Id: lrb.c,v 1.2 2001/11/17 14:26:39 f1rmb Exp $
*
*/
@@ -27,14 +27,14 @@
#include <assert.h>
#include "lrb.h"
-#include "utils.h"
+#include "xineutils.h"
lrb_t *lrb_new (int max_num_entries,
fifo_buffer_t *fifo) {
lrb_t *this;
- this = xmalloc (sizeof (lrb_t));
+ this = xine_xmalloc (sizeof (lrb_t));
this->max_num_entries = max_num_entries;
this->cur_num_entries = 0;
diff --git a/src/xine-engine/metronom.c b/src/xine-engine/metronom.c
index e15907cc0..950f80cd2 100644
--- a/src/xine-engine/metronom.c
+++ b/src/xine-engine/metronom.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: metronom.c,v 1.35 2001/11/13 21:47:59 heikos Exp $
+ * $Id: metronom.c,v 1.36 2001/11/17 14:26:39 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -34,10 +34,9 @@
#include <errno.h>
#include <assert.h>
-#include "monitor.h"
#include "xine_internal.h"
#include "metronom.h"
-#include "utils.h"
+#include "xineutils.h"
#define MAX_PTS_TOLERANCE 5000
#define MAX_VIDEO_DELTA 1600
@@ -781,7 +780,7 @@ static int metronom_sync_loop (metronom_t *this) {
metronom_t * metronom_init (int have_audio) {
- metronom_t *this = xmalloc (sizeof (metronom_t));
+ metronom_t *this = xine_xmalloc (sizeof (metronom_t));
int err;
this->audio_stream_start = metronom_audio_stream_start;
diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c
index 87ca1a956..d03d8d7ba 100644
--- a/src/xine-engine/video_decoder.c
+++ b/src/xine-engine/video_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_decoder.c,v 1.64 2001/11/15 23:18:04 guenter Exp $
+ * $Id: video_decoder.c,v 1.65 2001/11/17 14:26:39 f1rmb Exp $
*
*/
@@ -30,7 +30,7 @@
#include <string.h>
#include "xine_internal.h"
-#include "monitor.h"
+#include "xineutils.h"
#include <sched.h>
/*
@@ -66,9 +66,9 @@ void *video_decoder_loop (void *this_gen) {
static int prof_spu_decode = -1;
if (prof_video_decode == -1)
- prof_video_decode = profiler_allocate_slot ("video decoder");
+ prof_video_decode = xine_profiler_allocate_slot ("video decoder");
if (prof_spu_decode == -1)
- prof_spu_decode = profiler_allocate_slot ("spu decoder");
+ prof_spu_decode = xine_profiler_allocate_slot ("spu decoder");
while (running) {
@@ -134,14 +134,14 @@ void *video_decoder_loop (void *this_gen) {
case BUF_SPU_SUBP_CONTROL:
case BUF_SPU_CLUT:
case BUF_SPU_PACKAGE:
- profiler_start_count (prof_spu_decode);
+ xine_profiler_start_count (prof_spu_decode);
spu_decoder = update_spu_decoder(this, buf->type);
if (spu_decoder)
spu_decoder->decode_data (spu_decoder, buf);
- profiler_stop_count (prof_spu_decode);
+ xine_profiler_stop_count (prof_spu_decode);
break;
case BUF_CONTROL_SPU_CHANNEL:
@@ -209,7 +209,7 @@ void *video_decoder_loop (void *this_gen) {
break;
default:
- profiler_start_count (prof_video_decode);
+ xine_profiler_start_count (prof_video_decode);
if ( (buf->type & 0xFF000000) == BUF_VIDEO_BASE ) {
@@ -244,7 +244,7 @@ void *video_decoder_loop (void *this_gen) {
} else
printf ("video_decoder: unknown buffer type: %08x\n", buf->type);
- profiler_stop_count (prof_video_decode);
+ xine_profiler_stop_count (prof_video_decode);
break;
diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c
index 63b2f4a91..b9c98703d 100644
--- a/src/xine-engine/video_out.c
+++ b/src/xine-engine/video_out.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out.c,v 1.54 2001/11/15 23:18:04 guenter Exp $
+ * $Id: video_out.c,v 1.55 2001/11/17 14:26:39 f1rmb Exp $
*
*/
@@ -33,8 +33,7 @@
#include <string.h>
#include "video_out.h"
-#include "utils.h"
-#include "monitor.h"
+#include "xineutils.h"
/*
#define VIDEO_OUT_LOG
@@ -56,7 +55,7 @@ static img_buf_fifo_t *vo_new_img_buf_queue () {
img_buf_fifo_t *queue;
- queue = (img_buf_fifo_t *) xmalloc (sizeof (img_buf_fifo_t));
+ queue = (img_buf_fifo_t *) xine_xmalloc (sizeof (img_buf_fifo_t));
if( queue ) {
queue->first = NULL;
queue->last = NULL;
@@ -156,9 +155,9 @@ static void *video_out_loop (void *this_gen) {
/* printf ("%d video_out start\n", getpid()); */
if (prof_video_out == -1)
- prof_video_out = profiler_allocate_slot ("video output");
+ prof_video_out = xine_profiler_allocate_slot ("video output");
if (prof_spu_blend == -1)
- prof_spu_blend = profiler_allocate_slot ("spu blend");
+ prof_spu_blend = xine_profiler_allocate_slot ("spu blend");
/*
sigemptyset(&vo_mask);
@@ -193,7 +192,7 @@ static void *video_out_loop (void *this_gen) {
/* sigwait(&vo_mask, &dummysignum); */ /* wait for next timer tick */
pause ();
- profiler_start_count (prof_video_out);
+ xine_profiler_start_count (prof_video_out);
video_step_new = this->metronom->get_video_rate (this->metronom);
if (video_step_new != video_step) {
@@ -213,7 +212,7 @@ static void *video_out_loop (void *this_gen) {
img = this->display_img_buf_queue->first;
if (!img) {
- profiler_stop_count (prof_video_out);
+ xine_profiler_stop_count (prof_video_out);
continue;
}
@@ -264,7 +263,7 @@ static void *video_out_loop (void *this_gen) {
#endif
if (diff<0) {
- profiler_stop_count (prof_video_out);
+ xine_profiler_stop_count (prof_video_out);
continue;
}
@@ -281,7 +280,7 @@ static void *video_out_loop (void *this_gen) {
if (!img) {
- profiler_stop_count (prof_video_out);
+ xine_profiler_stop_count (prof_video_out);
continue;
}
@@ -301,18 +300,18 @@ static void *video_out_loop (void *this_gen) {
* for flushing it's buffers. So don't remove it! */
vo_overlay_t *ovl;
- profiler_start_count (prof_spu_blend);
+ xine_profiler_start_count (prof_spu_blend);
ovl = this->overlay_source->get_overlay (this->overlay_source, img->PTS);
if (this->video_loop_running && ovl && this->driver->overlay_blend && this->overlay_enabled)
this->driver->overlay_blend (this->driver, img, ovl);
- profiler_stop_count (prof_spu_blend);
+ xine_profiler_stop_count (prof_spu_blend);
}
this->driver->display_frame (this->driver, img);
- profiler_stop_count (prof_video_out);
+ xine_profiler_stop_count (prof_video_out);
}
/*
@@ -587,7 +586,7 @@ vo_instance_t *vo_new_instance (vo_driver_t *driver, metronom_t *metronom) {
vo_instance_t *this;
int i;
- this = xmalloc (sizeof (vo_instance_t)) ;
+ this = xine_xmalloc (sizeof (vo_instance_t)) ;
this->driver = driver;
this->metronom = metronom;
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index c64d3490e..bd8273c44 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine.c,v 1.73 2001/11/15 23:18:04 guenter Exp $
+ * $Id: xine.c,v 1.74 2001/11/17 14:26:39 f1rmb Exp $
*
* top-level xine functions
*
@@ -50,9 +50,8 @@
#include "input/input_plugin.h"
#include "metronom.h"
#include "configfile.h"
-#include "monitor.h"
-#include "utils.h"
-#include "memcpy.h"
+
+#include "xineutils.h"
#ifndef __GNUC__
#define __FUNCTION__ __func__
@@ -378,7 +377,7 @@ void xine_exit (xine_t *this) {
printf ("xine_exit: bye!\n");
- profiler_print_results ();
+ xine_profiler_print_results ();
}
@@ -386,14 +385,14 @@ xine_t *xine_init (vo_driver_t *vo,
ao_driver_t *ao,
config_values_t *config) {
- xine_t *this = xmalloc (sizeof (xine_t));
+ xine_t *this = xine_xmalloc (sizeof (xine_t));
printf("xine_init entered\n");
this->config = config;
xine_debug = config->lookup_int (config, "xine_debug", 0);
/* probe for optimized memcpy or config setting */
- probe_fast_memcpy(config);
+ xine_probe_fast_memcpy(config);
/*
* init locks
diff --git a/src/xine-utils/Makefile.am b/src/xine-utils/Makefile.am
index 29ef6eef0..a5a9f60c3 100644
--- a/src/xine-utils/Makefile.am
+++ b/src/xine-utils/Makefile.am
@@ -2,7 +2,7 @@
## Process this file with automake to produce Makefile.in
##
-CFLAGS = @GLOBAL_CFLAGS@ @THREAD_CFLAGS@
+CFLAGS = @GLOBAL_CFLAGS@ @THREAD_CFLAGS@ -DXINEUTILS_COMPILE
EXTRA_DIST = cpu_accel.c
@@ -19,7 +19,8 @@ libxineutils_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-release $(LT_RELEASE)
-include_HEADERS = attributes.h cpu_accel.h memcpy.h utils.h monitor.h
+noinst_HEADERS = attributes.h
+include_HEADERS = xineutils.h
###
# Hardcoded rule:
diff --git a/src/xine-utils/attributes.h b/src/xine-utils/attributes.h
index 8ed7aef9e..7c190476b 100644
--- a/src/xine-utils/attributes.h
+++ b/src/xine-utils/attributes.h
@@ -20,6 +20,7 @@
*/
//use gcc attribs to align critical data structures
+
#ifdef ATTRIBUTE_ALIGNED_MAX
#define ATTR_ALIGN(align) __attribute__ ((__aligned__ ((ATTRIBUTE_ALIGNED_MAX < align) ? ATTRIBUTE_ALIGNED_MAX : align)))
#else
diff --git a/src/xine-utils/cpu_accel.c b/src/xine-utils/cpu_accel.c
index 8c28d950a..b463b3140 100644
--- a/src/xine-utils/cpu_accel.c
+++ b/src/xine-utils/cpu_accel.c
@@ -18,13 +18,14 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#define XINEUTILS_COMPILE
#include "config.h"
#include <inttypes.h>
#include "attributes.h"
-#include "cpu_accel.h"
+#include "xineutils.h"
#ifdef ARCH_X86
static uint32_t x86_accel (void)
@@ -97,7 +98,7 @@ static uint32_t x86_accel (void)
}
#endif
-uint32_t mm_accel (void)
+uint32_t xine_mm_accel (void)
{
#ifdef ARCH_X86
static int got_accel = 0;
@@ -118,7 +119,9 @@ uint32_t mm_accel (void)
#endif
}
-uint32_t mm_support (void)
+/*
+uint32_t xine_mm_support (void)
{
- return mm_accel();
+ return xine_mm_accel();
}
+*/
diff --git a/src/xine-utils/memcpy.c b/src/xine-utils/memcpy.c
index 2d644d4a9..39cbad416 100644
--- a/src/xine-utils/memcpy.c
+++ b/src/xine-utils/memcpy.c
@@ -38,9 +38,9 @@
#include <signal.h>
#include <setjmp.h>
#include "xine_internal.h"
-#include "cpu_accel.h"
+#include "xineutils.h"
-void *(* fast_memcpy)(void *to, const void *from, size_t len);
+void *(* xine_fast_memcpy)(void *to, const void *from, size_t len);
/* Original comments from mplayer (file: aclib.c)
This part of code was taken by me from Linux-2.4.3 and slightly modified
@@ -401,7 +401,7 @@ static void sigill_handler (int n) {
#define BUFSIZE 1024*1024
-void probe_fast_memcpy(config_values_t *config)
+void xine_probe_fast_memcpy(config_values_t *config)
{
unsigned long long t;
char *buf1, *buf2;
@@ -409,7 +409,7 @@ void probe_fast_memcpy(config_values_t *config)
static int config_flags = -1;
#ifdef ARCH_X86
- config_flags = mm_accel();
+ config_flags = xine_mm_accel();
#else
config_flags = 0;
#endif
@@ -420,13 +420,13 @@ void probe_fast_memcpy(config_values_t *config)
(config_flags & memcpy_method[best].cpu_require) ==
memcpy_method[best].cpu_require ) {
printf("xine: using %s\n", memcpy_method[best].name );
- fast_memcpy = memcpy_method[best].function;
+ xine_fast_memcpy = memcpy_method[best].function;
return;
}
best = -1;
- fast_memcpy = memcpy;
+ xine_fast_memcpy = memcpy;
if( (buf1 = malloc(BUFSIZE)) == NULL )
return;
@@ -468,7 +468,7 @@ void probe_fast_memcpy(config_values_t *config)
best = i;
}
printf("xine: using %s\n", memcpy_method[best].name );
- fast_memcpy = memcpy_method[best].function;
+ xine_fast_memcpy = memcpy_method[best].function;
config->set_int (config, "fast_memcpy", best );
free(buf1);
diff --git a/src/xine-utils/memcpy.h b/src/xine-utils/memcpy.h
deleted file mode 100644
index a693f37fe..000000000
--- a/src/xine-utils/memcpy.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2000-2001 the xine project
- *
- * This file is part of xine, a unix video player.
- *
- * xine is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * xine is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- *
- */
-
-#ifndef HAVE_MEMCPY_H
-#define HAVE_MEMCPY_H
-
-/* optimized/fast memcpy */
-extern void *(* fast_memcpy)(void *to, const void *from, size_t len);
-
-#ifdef HAVE_XINE_INTERNAL_H
-/* benchmark available memcpy methods */
-void probe_fast_memcpy(config_values_t *config);
-#endif
-
-#endif
diff --git a/src/xine-utils/monitor.c b/src/xine-utils/monitor.c
index 9250ee2c4..f780baa77 100644
--- a/src/xine-utils/monitor.c
+++ b/src/xine-utils/monitor.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: monitor.c,v 1.1 2001/10/22 00:52:10 guenter Exp $
+ * $Id: monitor.c,v 1.2 2001/11/17 14:26:39 f1rmb Exp $
*
* debug print and profiling functions - implementation
*
@@ -29,8 +29,7 @@
#include <stdio.h>
#include <sys/time.h>
-#include "utils.h"
-#include "monitor.h"
+#include "xineutils.h"
#define MAX_ID 10
@@ -41,7 +40,7 @@ long long int profiler_start[MAX_ID] ;
long profiler_calls[MAX_ID] ;
char * profiler_label[MAX_ID] ;
-void profiler_init () {
+void xine_profiler_init () {
int i;
for (i=0; i<MAX_ID; i++) {
profiler_times[i] = 0;
@@ -51,7 +50,7 @@ void profiler_init () {
}
}
-int profiler_allocate_slot (char *label) {
+int xine_profiler_allocate_slot (char *label) {
int id;
for (id = 0; id < MAX_ID && profiler_label[id] != NULL; id++)
@@ -74,7 +73,7 @@ __inline__ unsigned long long int rdtsc()
}
#endif
-void profiler_start_count (int id) {
+void xine_profiler_start_count (int id) {
if ((unsigned)id >= MAX_ID) return;
@@ -83,7 +82,7 @@ void profiler_start_count (int id) {
#endif
}
-void profiler_stop_count (int id) {
+void xine_profiler_stop_count (int id) {
if ((unsigned)id >= MAX_ID) return;
@@ -93,7 +92,7 @@ void profiler_stop_count (int id) {
profiler_calls[id]++;
}
-void profiler_print_results () {
+void xine_profiler_print_results () {
int i;
#ifdef ARCH_X86
diff --git a/src/xine-utils/monitor.h b/src/xine-utils/monitor.h
deleted file mode 100644
index fa1e3b359..000000000
--- a/src/xine-utils/monitor.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (C) 2000-2001 the xine project
- *
- * This file is part of xine, a unix video player.
- *
- * xine is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * xine is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- *
- * $Id: monitor.h,v 1.2 2001/10/23 21:33:43 jcdutton Exp $
- *
- * debug print and profiling functions
- *
- */
-
-#ifndef HAVE_MONITOR_H
-#define HAVE_MONITOR_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <inttypes.h>
-
-extern uint32_t xine_debug;
-
-#define VERBOSE (xine_debug & 0x8000>>1) // 16384
-#define METRONOM (xine_debug & 0x8000>>2) // 8192
-#define AUDIO (xine_debug & 0x8000>>3) // 4096
-#define DEMUX (xine_debug & 0x8000>>4) // 2048
-#define INPUT (xine_debug & 0x8000>>5) // 1024
-#define VIDEO (xine_debug & 0x8000>>6) // 512
-#define VPTS (xine_debug & 0x8000>>7) // 256
-#define MPEG (xine_debug & 0x8000>>8) // 128
-#define VAVI (xine_debug & 0x8000>>9) // 64
-#define AC3 (xine_debug & 0x8000>>10) // 32
-#define LOOP (xine_debug & 0x8000>>11) // 16
-#define GUI (xine_debug & 0x8000>>12) // 8
-#define SPU (xine_debug & 0x8000>>13) // 4
-
-#ifdef __GNUC__
-#define perr(FMT,ARGS...) {fprintf(stderr, FMT, ##ARGS);fflush(stderr);}
-#else /* C99 version: */
-#define perr(...) {fprintf(stderr, __VA_ARGS__);fflush(stderr);}
-#endif
-
-#ifdef DEBUG
-
-/*
- * Debug stuff
- */
-
-//#define perr(FMT,ARGS...) {fprintf(stderr, FMT, ##ARGS);fflush(stderr);}
-
-#ifdef __GNUC__
-#define xprintf(LVL, FMT, ARGS...) { \
- if(LVL) { \
- printf(FMT, ##ARGS); \
- } \
- }
-#else /* C99 version: */
-#define xprintf(LVL, ...) { \
- if(LVL) { \
- printf(__VA_ARGS__); \
- } \
- }
-#endif
-
-/*
- * profiling
- */
-
-void profiler_init ();
-
-int profiler_allocate_slot (char *label);
-
-void profiler_start_count (int id);
-
-void profiler_stop_count (int id);
-
-void profiler_print_results ();
-
-#else /* no DEBUG, release version */
-
-//#define perr(FMT,ARGS...)
-
-#ifdef __GNUC__
-#define xprintf(LVL, FMT, ARGS...)
-#else /* C99 version: */
-#define xprintf(LVL, ...)
-#endif
-
-#define profiler_init()
-#define profiler_allocate_slot(label) (-1)
-#define profiler_start_count(id)
-#define profiler_stop_count(id)
-#define profiler_print_results()
-
-#endif /* DEBUG*/
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* HAVE_MONITOR_H */
diff --git a/src/xine-utils/utils.c b/src/xine-utils/utils.c
index d3435ea84..30670b109 100644
--- a/src/xine-utils/utils.c
+++ b/src/xine-utils/utils.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: utils.c,v 1.1 2001/10/22 00:52:10 guenter Exp $
+ * $Id: utils.c,v 1.2 2001/11/17 14:26:39 f1rmb Exp $
*
*/
#define _POSIX_PTHREAD_SEMANTICS 1 /* for 5-arg getpwuid_r on solaris */
@@ -43,7 +43,7 @@
/*
*
*/
-void *xmalloc(size_t size) {
+void *xine_xmalloc(size_t size) {
void *ptr;
if((ptr = malloc(size)) == NULL) {
@@ -60,10 +60,10 @@ void *xmalloc(size_t size) {
/*
*
*/
-void *xmalloc_aligned (size_t alignment, size_t size) {
+void *xine_xmalloc_aligned (size_t alignment, size_t size) {
char *pMem;
- pMem = xmalloc (size+alignment);
+ pMem = xine_xmalloc (size+alignment);
while ((int) pMem % alignment)
pMem++;
@@ -74,7 +74,7 @@ void *xmalloc_aligned (size_t alignment, size_t size) {
/*
*
*/
-const char *get_homedir(void) {
+const char *xine_get_homedir(void) {
struct passwd *pw = NULL;
char *homedir = NULL;
#ifdef HAVE_GETPWUID_R
@@ -83,7 +83,7 @@ const char *get_homedir(void) {
char *buffer = NULL;
int bufsize = 128;
- buffer = (char *) xmalloc(bufsize);
+ buffer = (char *) xine_xmalloc(bufsize);
if((ret = getpwuid_r(getuid(), &pwd, buffer, bufsize, &pw)) < 0) {
#else
@@ -111,7 +111,7 @@ const char *get_homedir(void) {
/*
*
*/
-char *chomp(char *str) {
+char *xine_chomp(char *str) {
char *pbuf;
pbuf = str;
diff --git a/src/xine-utils/utils.h b/src/xine-utils/utils.h
deleted file mode 100644
index 2c35d52db..000000000
--- a/src/xine-utils/utils.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2000-2001 the xine project
- *
- * This file is part of xine, a unix video player.
- *
- * xine is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * xine is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- *
- * $Id: utils.h,v 1.1 2001/10/22 00:52:10 guenter Exp $
- *
- */
-#ifndef HAVE_UTILS_H
-#define HAVE_UTILS_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void *xmalloc(size_t size);
-
-void *xmalloc_aligned(size_t alignment, size_t size);
-
-const char *get_homedir(void);
-
-/*
- * Clean a string (remove spaces and '=' at the begin,
- * and '\n', '\r' and spaces at the end.
- */
-
-char *chomp (char *str);
-
-/*
- * A thread-safe usecond sleep
- */
-void xine_usec_sleep(unsigned usec);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/src/xine-utils/cpu_accel.h b/src/xine-utils/xineutils.h
index 053c142f6..eadd17f34 100644
--- a/src/xine-utils/cpu_accel.h
+++ b/src/xine-utils/xineutils.h
@@ -1,42 +1,44 @@
-/*
- * cpu_accel.h - based on mmx.h, sse.h
- * Copyright (C) 1997-1999 H. Dietz and R. Fisher
- *
- * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
- *
- * mpeg2dec is free software; you can redistribute it and/or modify
+/*
+ * Copyright (C) 2000-2001 the xine project
+ *
+ * This file is part of xine, a unix video player.
+ *
+ * xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
- * mpeg2dec is distributed in the hope that it will be useful,
+ *
+ * xine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * xine specific modifications 2001 by G. Bartsch
+ * $Id: xineutils.h,v 1.1 2001/11/17 14:26:39 f1rmb Exp $
*
*/
-
-/*
- * The type of an value that fits in an MMX register (note that long
- * long constant values MUST be suffixed by LL and unsigned long long
- * values by ULL, lest they be truncated by the compiler)
- */
-
-#ifndef _CPU_ACCEL_H
-#define _CPU_ACCEL_H
+#ifndef XINEUTILS_H
+#define XINEUTILS_H
#ifdef __cplusplus
extern "C" {
#endif
+#include <unistd.h>
+#include <inttypes.h>
#include "attributes.h"
+ /* CPU Acceleration */
+
+/*
+ * The type of an value that fits in an MMX register (note that long
+ * long constant values MUST be suffixed by LL and unsigned long long
+ * values by ULL, lest they be truncated by the compiler)
+ */
+
/* generic accelerations */
#define MM_ACCEL_MLIB 0x00000001
@@ -53,8 +55,8 @@ extern "C" {
#define MM_SSE MM_ACCEL_X86_SSE
#define MM_SSE2 MM_ACCEL_X86_SSE2
-uint32_t mm_accel (void) ;
-/* uint32_t mm_support (void) ; */
+uint32_t xine_mm_accel (void);
+/* uint32_t xine_mm_support (void) ; */
#ifdef ARCH_X86
@@ -523,9 +525,116 @@ typedef union {
: "X" (mem))
#endif /*ARCH_X86 */
+
+
+ /* Optimized/fast memcpy */
+
+extern void *(* xine_fast_memcpy)(void *to, const void *from, size_t len);
+
+#ifdef HAVE_XINE_INTERNAL_H
+/* Benchmark available memcpy methods */
+void xine_probe_fast_memcpy(config_values_t *config);
+#endif
+
+
+
+ /* Debugging/Monitoring */
+
+extern uint32_t xine_debug;
+
+#define VERBOSE (xine_debug & 0x8000>>1) // 16384
+#define METRONOM (xine_debug & 0x8000>>2) // 8192
+#define AUDIO (xine_debug & 0x8000>>3) // 4096
+#define DEMUX (xine_debug & 0x8000>>4) // 2048
+#define INPUT (xine_debug & 0x8000>>5) // 1024
+#define VIDEO (xine_debug & 0x8000>>6) // 512
+#define VPTS (xine_debug & 0x8000>>7) // 256
+#define MPEG (xine_debug & 0x8000>>8) // 128
+#define VAVI (xine_debug & 0x8000>>9) // 64
+#define AC3 (xine_debug & 0x8000>>10) // 32
+#define LOOP (xine_debug & 0x8000>>11) // 16
+#define GUI (xine_debug & 0x8000>>12) // 8
+#define SPU (xine_debug & 0x8000>>13) // 4
+
+#ifdef __GNUC__
+#define perr(FMT,ARGS...) {fprintf(stderr, FMT, ##ARGS);fflush(stderr);}
+#else /* C99 version: */
+#define perr(...) {fprintf(stderr, __VA_ARGS__);fflush(stderr);}
+#endif
+
+#ifdef DEBUG
+/*
+ * Debug stuff
+ */
+#ifdef __GNUC__
+#define xprintf(LVL, FMT, ARGS...) { \
+ if(LVL) { \
+ printf(FMT, ##ARGS); \
+ } \
+ }
+#else /* C99 version: */
+#define xprintf(LVL, ...) { \
+ if(LVL) { \
+ printf(__VA_ARGS__); \
+ } \
+ }
+#endif /* __GNUC__ */
+
+/*
+ * profiling
+ */
+void xine_profiler_init (void);
+int xine_profiler_allocate_slot (char *label);
+void xine_profiler_start_count (int id);
+void xine_profiler_stop_count (int id);
+void xine_profiler_print_results (void);
+
+#else /* no DEBUG, release version */
+
+#ifdef __GNUC__
+#define xprintf(LVL, FMT, ARGS...)
+#else /* C99 version: */
+#define xprintf(LVL, ...)
+#endif
+
+#define xine_profiler_init()
+#define xine_profiler_allocate_slot(label) (-1)
+#define xine_profiler_start_count(id)
+#define xine_profiler_stop_count(id)
+#define xine_profiler_print_results()
+
+#endif /* DEBUG*/
+
+/*
+ * Allocate and clean memory size_t 'size', then return the pointer
+ * to the allocated memory.
+ */
+void *xine_xmalloc(size_t size);
+
+/*
+ * Same as above, but memory is aligned to 'alignement'.
+ */
+void *xine_xmalloc_aligned(size_t alignment, size_t size);
+
+/*
+ * Get user home directory.
+ */
+const char *xine_get_homedir(void);
+
+/*
+ * Clean a string (remove spaces and '=' at the begin,
+ * and '\n', '\r' and spaces at the end.
+ */
+char *xine_chomp (char *str);
+
+/*
+ * A thread-safe usecond sleep
+ */
+void xine_usec_sleep(unsigned usec);
+
+
#ifdef __cplusplus
}
#endif
-#endif
-
+#endif