summaryrefslogtreecommitdiff
path: root/src/xine-engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/xine-engine')
-rw-r--r--src/xine-engine/audio_out.c10
-rw-r--r--src/xine-engine/buffer.c4
-rw-r--r--src/xine-engine/configfile.c20
-rw-r--r--src/xine-engine/lrb.c4
-rw-r--r--src/xine-engine/osd.c23
-rw-r--r--src/xine-engine/vo_scale.c4
-rw-r--r--src/xine-engine/xine_interface.c8
7 files changed, 40 insertions, 33 deletions
diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c
index 6bd3ea0eb..8797dd3d6 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.155 2003/12/05 15:55:04 f1rmb Exp $
+ * $Id: audio_out.c,v 1.156 2003/12/07 15:34:30 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>
@@ -300,7 +300,7 @@ static void fifo_append_int (audio_fifo_t *fifo,
/* buf->next = NULL; */
- XINE_ASSERT(!buf->next, "Next audio buffer is not NULL.");
+ _x_assert(!buf->next);
if (!fifo->first) {
fifo->first = buf;
@@ -1067,7 +1067,7 @@ static void *ao_loop (void *this_gen) {
#endif
lprintf ("loop: writing %d samples to sound device\n", out_buf->num_frames);
-
+
pthread_mutex_lock( &this->driver_lock );
result = this->driver->write (this->driver, out_buf->mem, out_buf->num_frames );
pthread_mutex_unlock( &this->driver_lock );
@@ -1077,8 +1077,10 @@ static void *ao_loop (void *this_gen) {
* Maybe we should pause the stream until the USB device is plugged in again.
* Return values 0 happen even if usb not unplugged, so needs further investigation.
*/
- XINE_ASSERT(result >= 0, "write to sound card failed. Was a USB device unplugged?");
+ xprintf(this->xine, XINE_VERBOSITY_LOG, _("write to sound card failed. Was a USB device unplugged ?\n"));
+ _x_assert(result >= 0);
+
lprintf ("loop: next buf from fifo\n");
fifo_append (this->free_fifo, in_buf);
in_buf = NULL;
diff --git a/src/xine-engine/buffer.c b/src/xine-engine/buffer.c
index a6e92060a..1f7c896d6 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.33 2003/11/20 00:42:14 tmattern Exp $
+ * $Id: buffer.c,v 1.34 2003/12/07 15:34:30 f1rmb Exp $
*
*
* contents:
@@ -65,7 +65,7 @@ static void buffer_pool_free (buf_element_t *element) {
this->buffer_pool_num_free++;
if (this->buffer_pool_num_free > this->buffer_pool_capacity) {
printf("xine-lib:buffer: Their has been a fatal error: TOO MANY FREE's\n");
- assert(0);
+ abort();
}
pthread_cond_signal (&this->buffer_pool_cond_not_empty);
diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c
index 80cd57641..775152640 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.58 2003/12/05 15:55:04 f1rmb Exp $
+ * $Id: configfile.c,v 1.59 2003/12/07 15:34:30 f1rmb Exp $
*
* config object (was: file) management - implementation
*
@@ -203,8 +203,8 @@ static char *__config_register_string (config_values_t *this,
cfg_entry_t *entry, *prev;
- XINE_ASSERT(key, "Register key is NULL. This is a required argument.");
- XINE_ASSERT(def_value, "Default value is NULL. This is a required argument.");
+ _x_assert(key);
+ _x_assert(def_value);
lprintf ("registering %s\n", key);
@@ -266,7 +266,7 @@ static int __config_register_num (config_values_t *this,
void *cb_data) {
cfg_entry_t *entry, *prev;
- XINE_ASSERT(key, "Register key is NULL. This is a required argument.");
+ _x_assert(key);
lprintf ("registering %s\n", key);
@@ -331,7 +331,7 @@ static int __config_register_bool (config_values_t *this,
void *cb_data) {
cfg_entry_t *entry, *prev;
- XINE_ASSERT(key, "Register key is NULL. This is a required argument.");
+ _x_assert(key);
lprintf ("registering %s\n", key);
@@ -397,7 +397,7 @@ static int __config_register_range (config_values_t *this,
void *cb_data) {
cfg_entry_t *entry, *prev;
- XINE_ASSERT(key, "Register key is NULL. This is a required argument.");
+ _x_assert(key);
lprintf ("registering range %s\n", key);
@@ -489,8 +489,8 @@ static int __config_register_enum (config_values_t *this,
void *cb_data) {
cfg_entry_t *entry, *prev;
- XINE_ASSERT(key, "Register key is NULL. This is a required argument.");
- XINE_ASSERT(values, "Argument 'values' is NULL. This is a required argument.");
+ _x_assert(key);
+ _x_assert(values);
lprintf ("registering enum %s\n", key);
@@ -909,8 +909,8 @@ static void __config_unregister_cb (config_values_t *this, const char *key) {
cfg_entry_t *entry;
- XINE_ASSERT(key, "Register key is NULL. This is a required argument.");
- XINE_ASSERT(this, "Argument 'this' is NULL. Cannot find key if this is not set.");
+ _x_assert(key);
+ _x_assert(this);
entry = __config_lookup_entry (this, key);
if (entry) {
diff --git a/src/xine-engine/lrb.c b/src/xine-engine/lrb.c
index 3f7189fad..1e767a48d 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.6 2003/12/06 18:11:56 mroi Exp $
+ * $Id: lrb.c,v 1.7 2003/12/07 15:34:31 f1rmb Exp $
*
*/
@@ -48,7 +48,7 @@ void lrb_drop (lrb_t *this) {
buf_element_t *buf = this->oldest;
- XINE_ASSERT(buf, "Oldest buffer element is NULL");
+ _x_assert(buf);
this->oldest = buf->next;
diff --git a/src/xine-engine/osd.c b/src/xine-engine/osd.c
index d4fd58d94..fee032df3 100644
--- a/src/xine-engine/osd.c
+++ b/src/xine-engine/osd.c
@@ -1149,29 +1149,30 @@ static int osd_get_text_size(osd_object_t *osd, const char *text, int *width, in
}
static void osd_preload_fonts (osd_renderer_t *this, char *path) {
- DIR *dir;
- osd_font_t *font;
- char *pathname;
- char *s, *p;
+ DIR *dir;
+ char *s, *p;
lprintf ("path='%s'\n", path);
- dir = opendir (path) ;
+ dir = opendir (path);
if (dir) {
-
- struct dirent *entry;
+ struct dirent *entry;
while ((entry = readdir (dir)) != NULL) {
- int len;
+ int len;
len = strlen (entry->d_name);
-
- if ( (len>12) && !strncmp (&entry->d_name[len-12], ".xinefont.gz", 12)) {
+
+ if ( (len > 12) && !strncmp (&entry->d_name[len-12], ".xinefont.gz", 12)) {
s = strdup(entry->d_name);
p = strchr(s, '-');
+
if( p ) {
+ osd_font_t *font;
+ char *pathname;
+
*p++ = '\0';
font = xine_xmalloc( sizeof(osd_font_t) );
@@ -1181,7 +1182,7 @@ static void osd_preload_fonts (osd_renderer_t *this, char *path) {
lprintf("font '%s' size %d is preloaded\n",
font->name, font->size);
- pathname = malloc(1024);
+ pathname = (char *) xine_xmalloc(strlen(path) + strlen(entry->d_name) + 2);
sprintf (pathname, "%s/%s", path, entry->d_name);
font->filename = pathname;
diff --git a/src/xine-engine/vo_scale.c b/src/xine-engine/vo_scale.c
index 170e3158a..870811c34 100644
--- a/src/xine-engine/vo_scale.c
+++ b/src/xine-engine/vo_scale.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: vo_scale.c,v 1.27 2003/11/26 19:43:38 f1rmb Exp $
+ * $Id: vo_scale.c,v 1.28 2003/12/07 15:34:31 f1rmb Exp $
*
* Contains common code to calculate video scaling parameters.
* In short, it will map frame dimensions to screen/window size.
@@ -79,7 +79,7 @@ void _x_vo_scale_compute_ideal_size (vo_scale_t *this) {
this->video_pixel_aspect = desired_ratio / image_ratio;
- XINE_ASSERT(this->gui_pixel_aspect != 0.0, "GUI pixel aspect is not 0.0: %f",this->gui_pixel_aspect);
+ _x_assert(this->gui_pixel_aspect != 0.0);
if (fabs (this->video_pixel_aspect / this->gui_pixel_aspect - 1.0)
< 0.01) {
diff --git a/src/xine-engine/xine_interface.c b/src/xine-engine/xine_interface.c
index 0003eaea8..a7c0aca0a 100644
--- a/src/xine-engine/xine_interface.c
+++ b/src/xine-engine/xine_interface.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_interface.c,v 1.71 2003/12/05 15:55:05 f1rmb Exp $
+ * $Id: xine_interface.c,v 1.72 2003/12/07 15:34:31 f1rmb Exp $
*
* convenience/abstraction layer, functions to implement
* libxine's public interface
@@ -54,7 +54,11 @@
*/
const char *xine_get_version_string(void) {
- return VERSION;
+ return VERSION
+#ifndef NDEBUG
+ "[DEBUG]"
+#endif
+ ;
}
void xine_get_version (int *major, int *minor, int *sub) {