comparison mplayer.c @ 1596:fc0e9953bc2d

libDVDread support
author arpi
date Mon, 20 Aug 2001 21:20:03 +0000
parents e49b3927c793
children c817a44598cd
comparison
equal deleted inserted replaced
1595:1918610d2802 1596:fc0e9953bc2d
230 static int video_id=-1; 230 static int video_id=-1;
231 static int dvdsub_id=-1; 231 static int dvdsub_id=-1;
232 static int vcd_track=0; 232 static int vcd_track=0;
233 static char *stream_dump_name=NULL; 233 static char *stream_dump_name=NULL;
234 static int stream_dump_type=0; 234 static int stream_dump_type=0;
235
236 extern int dvd_title;
235 237
236 int index_mode=-1; // -1=untouched 0=don't use index 1=use (geneate) index 238 int index_mode=-1; // -1=untouched 0=don't use index 1=use (geneate) index
237 int force_ni=0; 239 int force_ni=0;
238 240
239 static float default_max_pts_correction=-1;//0.01f; 241 static float default_max_pts_correction=-1;//0.01f;
493 #ifdef HAVE_GUI 495 #ifdef HAVE_GUI
494 } 496 }
495 #endif 497 #endif
496 498
497 if(!filename){ 499 if(!filename){
498 if(vcd_track) filename=DEFAULT_CDROM_DEVICE; 500 if(!vcd_track && !dvd_title){
499 else {
500 printf("%s",help_text); exit(0); 501 printf("%s",help_text); exit(0);
501 } 502 }
502 } 503 }
503 504
504 #ifdef USE_LIBVO2 505 #ifdef USE_LIBVO2
589 // check .sub 590 // check .sub
590 if(sub_name){ 591 if(sub_name){
591 subtitles=sub_read_file(sub_name); 592 subtitles=sub_read_file(sub_name);
592 if(!subtitles) mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadSub,sub_name); 593 if(!subtitles) mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadSub,sub_name);
593 } else { 594 } else {
594 if(sub_auto) // auto load sub file ... 595 if(sub_auto && filename) // auto load sub file ...
595 subtitles=sub_read_file( sub_filename( get_path("sub/"), filename ) ); 596 subtitles=sub_read_file( sub_filename( get_path("sub/"), filename ) );
596 if(!subtitles) subtitles=sub_read_file(get_path("default.sub")); // try default 597 if(!subtitles) subtitles=sub_read_file(get_path("default.sub")); // try default
597 } 598 }
598 #endif 599 #endif
599 600
600 stream=open_stream(filename,vcd_track,&file_format); 601 stream=open_stream(filename,vcd_track,&file_format);
601 if(!stream) return 1; // error... 602 if(!stream) return 1; // error...
602 use_stdin=(!strcmp(filename,"-")); 603 use_stdin=filename && (!strcmp(filename,"-"));
603 stream->start_pos+=seek_to_byte; 604 stream->start_pos+=seek_to_byte;
604 605
605 #ifdef HAVE_LIBCSS 606 #ifdef HAVE_LIBCSS
606 if (dvdimportkey) { 607 if (dvdimportkey) {
607 if (dvd_import_key(dvdimportkey)) { 608 if (dvd_import_key(dvdimportkey)) {