summaryrefslogtreecommitdiff
path: root/src/input
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 /src/input
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
Diffstat (limited to 'src/input')
-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
8 files changed, 51 insertions, 51 deletions
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;