diff options
Diffstat (limited to 'src/xine-engine')
-rw-r--r-- | src/xine-engine/audio_decoder.c | 12 | ||||
-rw-r--r-- | src/xine-engine/audio_out.c | 14 | ||||
-rw-r--r-- | src/xine-engine/buffer.c | 10 | ||||
-rw-r--r-- | src/xine-engine/buffer_types.c | 3 | ||||
-rw-r--r-- | src/xine-engine/configfile.c | 24 | ||||
-rw-r--r-- | src/xine-engine/load_plugins.c | 17 | ||||
-rw-r--r-- | src/xine-engine/lrb.c | 6 | ||||
-rw-r--r-- | src/xine-engine/metronom.c | 7 | ||||
-rw-r--r-- | src/xine-engine/video_decoder.c | 16 | ||||
-rw-r--r-- | src/xine-engine/video_out.c | 27 | ||||
-rw-r--r-- | src/xine-engine/xine.c | 13 |
11 files changed, 74 insertions, 75 deletions
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 |