diff options
author | nicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-05-15 07:38:42 +0000 |
---|---|---|
committer | nicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-05-15 07:38:42 +0000 |
commit | ce228ac4cdd537b764d9a30502c2725f53c9d9f2 (patch) | |
tree | e02ad657f58e5c0e85e82e97b77275d5b96a699b /libmpdemux/open.c | |
parent | 1e285998e64770dc6abff8701d7d6d271f07647b (diff) | |
download | mpv-ce228ac4cdd537b764d9a30502c2725f53c9d9f2.tar.bz2 mpv-ce228ac4cdd537b764d9a30502c2725f53c9d9f2.tar.xz |
ported cue:// to the new stream api; note: this stream must still be optimized in its read() and seek() functions
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15477 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/open.c')
-rw-r--r-- | libmpdemux/open.c | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/libmpdemux/open.c b/libmpdemux/open.c index 216f5a2795..33cdbfd57b 100644 --- a/libmpdemux/open.c +++ b/libmpdemux/open.c @@ -32,7 +32,6 @@ static URL_t* url; /// We keep these 2 for the gui atm, but they will be removed. int dvd_title=0; -int vcd_track=0; int dvd_chapter=1; int dvd_last_chapter=0; @@ -67,10 +66,6 @@ char * dvd_audio_stream_channels[6] = { "mono", "stereo", "unknown", "unknown", "5.1/6.1", "5.1" }; #endif -#include "cue_read.h" - - - // Define function about auth the libsmbclient library // FIXME: I really do not not is this function is properly working @@ -126,35 +121,6 @@ if(!filename) { return NULL; } -// for opening of vcds in bincue files -if(strncmp("cue://",filename,6) == 0){ - int ret,ret2; - char* p = filename + 6; - vcd_track = 1; - p = strchr(p,':'); - if(p && p[1] != '\0') { - vcd_track = strtol(p+1,NULL,0); - if(vcd_track < 1){ - mp_msg(MSGT_OPEN,MSGL_ERR,"Invalid cue track %s\n",p+1); - return NULL; - } - p[0] = '\0'; - } - f = cue_read_cue (filename + 6); - if(p && p[1] != '\0') p[0] = ':'; - if (f == -1) return NULL; - cue_vcd_read_toc(); - ret2=cue_vcd_get_track_end(vcd_track); - ret=cue_vcd_seek_to_track(vcd_track); - if(ret<0){ mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_ErrTrackSelect " (seek)\n");return NULL;} - mp_msg(MSGT_OPEN,MSGL_V,"VCD start byte position: 0x%X end: 0x%X\n",ret,ret2); - - stream=new_stream(f,STREAMTYPE_VCDBINCUE); - stream->start_pos=ret; - stream->end_pos=ret2; - return stream; -} - //============ Open DVD title ============== #ifdef USE_DVDNAV @@ -497,7 +463,7 @@ if(strncmp("dvd://",filename,6) == 0){ strncmp("vcd://", filename, 6) && strncmp("dvb://", filename, 6) && strncmp("cdda://", filename, 7) && strncmp("cddb://", filename, 7) && strncmp("mpst://", filename, 7) && strncmp("tivo://", filename, 7) && - strncmp("file://", filename, 7) && + strncmp("file://", filename, 7) && strncmp("cue://", filename, 6) && strstr(filename, "://")) { url = url_new(filename); } |