summaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
Diffstat (limited to 'src/input')
-rw-r--r--src/input/input_dvd.c40
-rw-r--r--src/input/input_file.c10
-rw-r--r--src/input/input_http.c3
-rw-r--r--src/input/input_net.c8
-rw-r--r--src/input/input_rtp.c3
-rw-r--r--src/input/input_stdin_fifo.c7
-rw-r--r--src/input/input_vcd.c21
7 files changed, 27 insertions, 65 deletions
diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c
index efdc470ba..09b04c2a0 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.35 2001/11/17 14:26:38 f1rmb Exp $
+ * $Id: input_dvd.c,v 1.36 2001/11/18 03:53:23 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -52,8 +52,6 @@
#include "dvd_udf.h"
#include "read_cache.h"
-static uint32_t xine_debug;
-
#if defined(__sun)
#define RDVD "/vol/dev/aliases/cdrom0"
#define DVD RDVD
@@ -259,8 +257,6 @@ static int openDVDFile (dvd_input_plugin_t *this,
int lbnum;
int encrypted=0;
- xprintf (VERBOSE|INPUT, "input_dvd : openDVDFile >%s<\n", filename);
-
if (openDrive(this) < 0) {
printf ("input_dvd: cannot open dvd drive >%s<\n", this->device);
return 0;
@@ -314,8 +310,6 @@ static int openDVDFile (dvd_input_plugin_t *this,
snprintf (str, sizeof(str), "/VIDEO_TS/%s", filename);
- xprintf (VERBOSE|INPUT, "UDFFindFile %s\n", str);
-
if (!(lbnum = UDFFindFile(this->dvd_fd, str, size))) {
printf ("input_dvd: cannot open file >%s<\n", filename);
@@ -348,8 +342,6 @@ static int dvd_plugin_open (input_plugin_t *this_gen, char *mrl) {
this->mrl = mrl;
- xprintf (VERBOSE|INPUT, "input dvd : input_plugin_open >%s<\n", mrl);
-
/*
* do we handle this kind of MRL ?
*/
@@ -358,16 +350,13 @@ static int dvd_plugin_open (input_plugin_t *this_gen, char *mrl) {
filename = (char *) &mrl[6];
- xprintf (VERBOSE|INPUT, "input dvd : dvd_plugin_open media type correct."
- " file name is %s\n", filename);
-
sscanf (filename, "VTS_%d_%d.VOB", &this->gVTSMajor, &this->gVTSMinor);
this->file_lbstart = openDVDFile (this, filename, &this->file_size) ;
this->file_lbcur = this->file_lbstart;
if (!this->file_lbstart) {
- fprintf (stderr, "Unable to find >%s< on dvd.\n", filename);
+ printf ("input_dvd: Unable to find >%s< on dvd.\n", filename);
return 0;
}
@@ -401,11 +390,11 @@ static off_t dvd_plugin_read (input_plugin_t *this_gen,
return DVD_VIDEO_LB_LEN;
} else if (bytes_read < 0)
- fprintf (stderr, "read error in input_dvd plugin (%s)\n",
- strerror (errno));
+ printf ("input_dvd: read error in input_dvd plugin (%s)\n",
+ strerror (errno));
else
- fprintf (stderr, "short read in input_dvd (%d != %d)\n",
- bytes_read, DVD_VIDEO_LB_LEN);
+ printf ("input_dvd: short read in input_dvd (%d != %d)\n",
+ bytes_read, DVD_VIDEO_LB_LEN);
return 0;
}
@@ -507,19 +496,19 @@ static int dvd_plugin_eject_media (input_plugin_t *this_gen) {
switch(status) {
case CDS_TRAY_OPEN:
if((ret = ioctl(fd, CDROMCLOSETRAY)) != 0) {
- xprintf(VERBOSE|INPUT, "CDROMCLOSETRAY failed: %s\n",
+ printf ("input_dvd: CDROMCLOSETRAY failed: %s\n",
strerror(errno));
}
break;
case CDS_DISC_OK:
if((ret = ioctl(fd, CDROMEJECT)) != 0) {
- xprintf(VERBOSE|INPUT, "CDROMEJECT failed: %s\n", strerror(errno));
+ printf ("input_dvd: CDROMEJECT failed: %s\n", strerror(errno));
}
break;
}
}
else {
- xprintf(VERBOSE|INPUT, "CDROM_DRIVE_STATUS failed: %s\n",
+ printf ("input_dvd: CDROM_DRIVE_STATUS failed: %s\n",
strerror(errno));
close(fd);
return 0;
@@ -530,7 +519,7 @@ static int dvd_plugin_eject_media (input_plugin_t *this_gen) {
# if defined (__sun)
status = 0;
if ((ret = ioctl(fd, CDROMEJECT)) != 0) {
- xprintf(VERBOSE|INPUT, "CDROMEJECT failed: %s\n", strerror(errno));
+ printf("input_dvd: CDROMEJECT failed: %s\n", strerror(errno));
}
# else
@@ -749,7 +738,6 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
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 *) xine_xmalloc (256);
@@ -776,8 +764,12 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
this->input_plugin.get_optional_data = dvd_plugin_get_optional_data;
this->input_plugin.is_branch_possible= NULL;
- this->device = config->lookup_str(config, "dvd_device", DVD);
- this->raw_device = config->lookup_str(config, "dvd_raw_device", RDVD);
+ this->device = config->register_string(config, "input.dvd_device", DVD,
+ "path to your local dvd device file",
+ NULL, NULL, NULL);
+ this->raw_device = config->register_string(config, "input.dvd_raw_device", RDVD,
+ "path to a raw device set up for dvd access",
+ NULL, NULL, NULL);
#ifdef __sun
check_solaris_vold_device(this);
#endif
diff --git a/src/input/input_file.c b/src/input/input_file.c
index f262150cb..ae7267a2b 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.28 2001/11/17 14:26:38 f1rmb Exp $
+ * $Id: input_file.c,v 1.29 2001/11/18 03:53:23 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -41,8 +41,6 @@
extern int errno;
-static uint32_t xine_debug;
-
#ifndef __GNUC__
#define __FUNCTION__ __func__
#endif
@@ -257,8 +255,6 @@ static int file_plugin_open (input_plugin_t *this_gen, char *mrl) {
else
filename = mrl;
- xprintf (VERBOSE|INPUT, "Opening >%s<\n",filename);
-
this->fh = open (filename, O_RDONLY);
if (this->fh == -1) {
@@ -694,8 +690,6 @@ static char* file_plugin_get_mrl (input_plugin_t *this_gen) {
static void file_plugin_close (input_plugin_t *this_gen) {
file_input_plugin_t *this = (file_input_plugin_t *) this_gen;
- xprintf (VERBOSE|INPUT, "closing input\n");
-
close(this->fh);
this->fh = -1;
}
@@ -705,7 +699,6 @@ static void file_plugin_close (input_plugin_t *this_gen) {
*/
static void file_plugin_stop (input_plugin_t *this_gen) {
- xprintf (VERBOSE|INPUT, "stopping input\n");
file_plugin_close(this_gen);
}
@@ -751,7 +744,6 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
this = (file_input_plugin_t *) xine_xmalloc (sizeof (file_input_plugin_t));
config = xine->config;
- xine_debug = config->lookup_int (config, "xine_debug", 0);
this->input_plugin.interface_version = INPUT_PLUGIN_IFACE_VERSION;
this->input_plugin.get_capabilities = file_plugin_get_capabilities;
diff --git a/src/input/input_http.c b/src/input/input_http.c
index 7a12863af..406d9e41d 100644
--- a/src/input/input_http.c
+++ b/src/input/input_http.c
@@ -44,8 +44,6 @@
#define DEFAULT_HTTP_PORT 80
-static uint32_t xine_debug;
-
typedef struct {
input_plugin_t input_plugin;
@@ -607,7 +605,6 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
this = (http_input_plugin_t *) xine_xmalloc(sizeof(http_input_plugin_t));
config = xine->config;
- xine_debug = config->lookup_int (config, "xine_debug", 0);
this->input_plugin.interface_version = INPUT_PLUGIN_IFACE_VERSION;
this->input_plugin.get_capabilities = http_plugin_get_capabilities;
diff --git a/src/input/input_net.c b/src/input/input_net.c
index 67d5d3fb9..fcf0914d9 100644
--- a/src/input/input_net.c
+++ b/src/input/input_net.c
@@ -46,8 +46,6 @@
#endif
-static uint32_t xine_debug;
-
#define NET_BS_LEN 2324
typedef struct {
@@ -167,11 +165,8 @@ static int net_plugin_open (input_plugin_t *this_gen, char *mrl) {
if(strncmp(filename, "//", 2)==0)
filename+=2;
- xprintf (VERBOSE|INPUT, "Opening >%s<\n", filename);
-
pptr=strrchr(filename, ':');
- if(pptr)
- {
+ if(pptr) {
*pptr++=0;
sscanf(pptr,"%d", &port);
}
@@ -312,7 +307,6 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
this = (net_input_plugin_t *) xine_xmalloc(sizeof(net_input_plugin_t));
config = xine->config;
- xine_debug = config->lookup_int (config, "xine_debug", 0);
this->input_plugin.interface_version = INPUT_PLUGIN_IFACE_VERSION;
this->input_plugin.get_capabilities = net_plugin_get_capabilities;
diff --git a/src/input/input_rtp.c b/src/input/input_rtp.c
index 1550efd23..95ddc4363 100644
--- a/src/input/input_rtp.c
+++ b/src/input/input_rtp.c
@@ -86,8 +86,6 @@
#define RTP_BLOCKSIZE 2048
-static uint32_t xine_debug;
-
typedef struct _input_buffer {
struct _input_buffer *next;
unsigned char *buf;
@@ -473,7 +471,6 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
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 = xine_xmalloc(sizeof(input_buffer_t));
diff --git a/src/input/input_stdin_fifo.c b/src/input/input_stdin_fifo.c
index a7c556e54..06b002b86 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.16 2001/11/17 14:26:38 f1rmb Exp $
+ * $Id: input_stdin_fifo.c,v 1.17 2001/11/18 03:53:23 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -40,8 +40,6 @@
#include "xineutils.h"
#include "input_plugin.h"
-static uint32_t xine_debug;
-
typedef struct {
input_plugin_t input_plugin;
@@ -89,8 +87,6 @@ static int stdin_plugin_open(input_plugin_t *this_gen, char *mrl) {
return 0;
}
- xprintf (VERBOSE|INPUT, "Opening >%s<\n",filename);
-
this->fh = open (filename, O_RDONLY);
this->curpos = 0;
@@ -267,7 +263,6 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
this = (stdin_input_plugin_t *) xine_xmalloc(sizeof(stdin_input_plugin_t));
config = xine->config;
- xine_debug = config->lookup_int (config, "xine_debug", 0);
this->input_plugin.interface_version = INPUT_PLUGIN_IFACE_VERSION;
this->input_plugin.get_capabilities = stdin_plugin_get_capabilities;
diff --git a/src/input/input_vcd.c b/src/input/input_vcd.c
index f2591410a..20d8cb12d 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.30 2001/11/17 14:26:38 f1rmb Exp $
+ * $Id: input_vcd.c,v 1.31 2001/11/18 03:53:23 guenter Exp $
*
*/
@@ -51,8 +51,6 @@
#include "xineutils.h"
#include "input_plugin.h"
-static uint32_t xine_debug;
-
#if defined(__sun)
#define CDROM "/vol/dev/aliases/cdrom0"
#else
@@ -332,8 +330,6 @@ static int vcd_plugin_open (input_plugin_t *this_gen, char *mrl) {
filename = (char *) &mrl[6];
- xprintf (VERBOSE|INPUT, "Opening >%s<\n",filename);
-
if (sscanf (filename, "%d", &this->cur_track) != 1) {
fprintf (stderr, "input_vcd: malformed MRL. Use vcd://<track #>\n");
close (this->fd);
@@ -853,18 +849,18 @@ static int vcd_plugin_eject_media (input_plugin_t *this_gen) {
switch(status) {
case CDS_TRAY_OPEN:
if((ret = ioctl(this->fd, CDROMCLOSETRAY)) != 0) {
- xprintf(VERBOSE|INPUT, "CDROMCLOSETRAY failed: %s\n", strerror(errno));
+ printf ("input_vcd: CDROMCLOSETRAY failed: %s\n", strerror(errno));
}
break;
case CDS_DISC_OK:
if((ret = ioctl(this->fd, CDROMEJECT)) != 0) {
- xprintf(VERBOSE|INPUT, "CDROMEJECT failed: %s\n", strerror(errno));
+ printf ("input_vcd: CDROMEJECT failed: %s\n", strerror(errno));
}
break;
}
}
else {
- xprintf(VERBOSE|INPUT, "CDROM_DRIVE_STATUS failed: %s\n",
+ printf ("input_vcd: CDROM_DRIVE_STATUS failed: %s\n",
strerror(errno));
close(this->fd);
return 0;
@@ -900,7 +896,7 @@ static int vcd_plugin_eject_media (input_plugin_t *this_gen) {
if ((fd = open(this->device, O_RDONLY|O_NONBLOCK)) > -1) {
if ((ret = ioctl(fd, CDROMEJECT)) != 0) {
- xprintf(VERBOSE|INPUT, "CDROMEJECT failed: %s\n", strerror(errno));
+ printf ("input_vcd: CDROMEJECT failed: %s\n", strerror(errno));
}
close(fd);
}
@@ -915,8 +911,6 @@ static int vcd_plugin_eject_media (input_plugin_t *this_gen) {
static void vcd_plugin_close (input_plugin_t *this_gen) {
vcd_input_plugin_t *this = (vcd_input_plugin_t *) this_gen;
- xprintf (VERBOSE|INPUT, "closing input\n");
-
close(this->fd);
this->fd = -1;
}
@@ -1110,7 +1104,6 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
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 *) xine_xmalloc (256);
@@ -1136,7 +1129,9 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
this->input_plugin.get_optional_data = vcd_plugin_get_optional_data;
this->input_plugin.is_branch_possible= NULL;
- this->device = config->lookup_str(config, "vcd_device", CDROM);
+ this->device = config->register_string(config, "input.vcd_device", CDROM,
+ "path to your local vcd device file",
+ NULL, NULL, NULL);
this->mrls = (mrl_t **) xine_xmalloc(sizeof(mrl_t*));
this->mrls_allocated_entries = 0;