summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuenter Bartsch <guenter@users.sourceforge.net>2002-10-27 22:48:57 +0000
committerGuenter Bartsch <guenter@users.sourceforge.net>2002-10-27 22:48:57 +0000
commit83efdb4fcb47ebaa2c0e0c82eedf4452e95e4276 (patch)
treed5b55a6d127c786444b7380c5ca5b4a882b37e5a
parent0dad3dc5f20bfbcf4afe6d9af8af7fe802804d60 (diff)
downloadxine-lib-83efdb4fcb47ebaa2c0e0c82eedf4452e95e4276.tar.gz
xine-lib-83efdb4fcb47ebaa2c0e0c82eedf4452e95e4276.tar.bz2
file plugin should handle file:// - type uris now, '#' is used as subtitle delimiter
CVS patchset: 3053 CVS date: 2002/10/27 22:48:57
-rw-r--r--ChangeLog2
-rw-r--r--TODO10
-rw-r--r--src/input/input_file.c35
3 files changed, 38 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index e11f464e3..5c8103679 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -32,6 +32,8 @@ xine-lib (next version) [someone fill in stability and urgency]
* content detection fixes (e.g. mpeg program streams)
* much improved plugin loader, makes it possible to have several
versions of libxine installed in parallel
+ * file:// mrl use an uri-like syntax now, %xx-encoded chars are handled,
+ '#' is used to separate subtitle files
xine-lib (0.9.13) unstable; urgency=low
diff --git a/TODO b/TODO
index e2f2e4c06..3d604794b 100644
--- a/TODO
+++ b/TODO
@@ -7,8 +7,6 @@ required for 1.0pre
- input_vcd
- input_stdin, input_net (guenter)
- demux_asf: content detection for files (guenter)
-- file plugin: handle URIS (translate %-encoded characters, # as separator)
- (guenter)
required for 1.0
@@ -25,8 +23,9 @@ required for 1.0
- fix rate estimation in demux_mpeg/demux_mpeg_block
- fix streaming if small files (e.g. http)
- implement timeout in input_http, implement it correctly using select()
-- fix potential overflow in compressor audio filter
-- xine health check
+ (guenter)
+- fix potential overflow in compressor audio filter (guenter)
+- xine health check (stephen)
- sputext decoder plugin
- spucc decoder plugin
- xvid decoder plugin
@@ -34,7 +33,7 @@ required for 1.0
- opengl video output plugin
- esd audio output plugin
- arts audio output plugin
-- irix audio output plugin
+- irix audio output plugin (matthias)
- input_dvd: detect errors, display useful error messages
- define a grammar for MRLs (michael)
- prepare architecture for post effect plugins (michael)
@@ -59,6 +58,7 @@ opional
- directfb video output plugin
- reduce memory footprint (e.g. variable fifo buffer sizes...)
- bring dxr3 video out to work with aaxine (michael)
+- streaming of avi files (e.g. via http)
Assigned tasks
diff --git a/src/input/input_file.c b/src/input/input_file.c
index 66d028ad3..7aea2fa75 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.64 2002/10/18 04:04:10 miguelfreitas Exp $
+ * $Id: input_file.c,v 1.65 2002/10/27 22:48:57 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -234,6 +234,33 @@ static void file_plugin_dispose (input_plugin_t *this_gen ) {
free (this);
}
+static char *decode_uri (char *uri) {
+
+ int len = strlen (uri);
+ int i;
+
+ for (i=0; i<len; i++) {
+
+ if ( (uri[i]=='%') && (i<(len-2)) ) {
+
+ int c;
+
+ if ( sscanf (&uri[i+1], "%02x", &c) == 1) {
+
+ uri[i]= (char) c;
+
+ memmove (uri+i+1, uri+i+3, len-i-3);
+
+ len-=2;
+ }
+ }
+ }
+
+ uri[len] = 0;
+
+ return uri;
+}
+
static input_plugin_t *open_plugin (input_class_t *cls_gen, xine_stream_t *stream,
const char *data) {
@@ -244,12 +271,12 @@ static input_plugin_t *open_plugin (input_class_t *cls_gen, xine_stream_t *strea
char *filename, *subtitle;
int fh;
- if (!strncasecmp (mrl, "file://", 7))
- filename = &mrl[7];
+ if (!strncasecmp (mrl, "file://", 7))
+ filename = decode_uri (&mrl[7]);
else
filename = mrl;
- subtitle = strrchr (filename, '%');
+ subtitle = strrchr (filename, '#');
if (subtitle) {
*subtitle = 0;
subtitle++;