Mercurial > mplayer.hg
comparison libmpdemux/cue_read.c @ 8812:f6456b177fdc
vcd_read_cue.h -> cue_read.c+h
author | arpi |
---|---|
date | Sun, 05 Jan 2003 23:51:05 +0000 |
parents | 6af7a6595cc9 |
children | bba27bc43b0d |
comparison
equal
deleted
inserted
replaced
8811:c72c8f6416e7 | 8812:f6456b177fdc |
---|---|
5 #include <string.h> | 5 #include <string.h> |
6 | 6 |
7 #include <sys/types.h> | 7 #include <sys/types.h> |
8 #include <sys/stat.h> | 8 #include <sys/stat.h> |
9 #include <unistd.h> | 9 #include <unistd.h> |
10 #include <fcntl.h> | |
10 #include <libgen.h> | 11 #include <libgen.h> |
11 | 12 |
13 #include "config.h" | |
14 #include "mp_msg.h" | |
15 //#include "help_mp.h" | |
16 | |
17 #include "stream.h" | |
18 | |
19 #include "cue_read.h" | |
12 | 20 |
13 #define byte unsigned char | 21 #define byte unsigned char |
14 #define SIZERAW 2352 | 22 #define SIZERAW 2352 |
15 #define SIZEISO_MODE1 2048 | 23 #define SIZEISO_MODE1 2048 |
16 #define SIZEISO_MODE2_RAW 2352 | 24 #define SIZEISO_MODE2_RAW 2352 |
239 return cue_msf_2_sector (cue_current_pos.minute, | 247 return cue_msf_2_sector (cue_current_pos.minute, |
240 cue_current_pos.second, | 248 cue_current_pos.second, |
241 cue_current_pos.frame); | 249 cue_current_pos.frame); |
242 } | 250 } |
243 | 251 |
244 static inline void cue_set_msf(unsigned int sect){ | 252 inline void cue_set_msf(unsigned int sect){ |
245 cue_current_pos.frame=sect%75; | 253 cue_current_pos.frame=sect%75; |
246 sect=sect/75; | 254 sect=sect/75; |
247 cue_current_pos.second=sect%60; | 255 cue_current_pos.second=sect%60; |
248 sect=sect/60; | 256 sect=sect/60; |
249 cue_current_pos.minute=sect; | 257 cue_current_pos.minute=sect; |
484 } | 492 } |
485 | 493 |
486 | 494 |
487 static char vcd_buf[VCD_SECTOR_SIZE]; | 495 static char vcd_buf[VCD_SECTOR_SIZE]; |
488 | 496 |
489 static int cue_vcd_read(char *mem){ | 497 int cue_vcd_read(char *mem){ |
490 | 498 |
491 if (cue_read_raw(vcd_buf)==-1) return 0; // EOF? | 499 if (cue_read_raw(vcd_buf)==-1) return 0; // EOF? |
492 | 500 |
493 memcpy(mem,&vcd_buf[VCD_SECTOR_OFFS],VCD_SECTOR_DATA); | 501 memcpy(mem,&vcd_buf[VCD_SECTOR_OFFS],VCD_SECTOR_DATA); |
494 | 502 |