|
Line
Link Here
|
|
-- Makefile |
|
|
|
Lines 4-10
Link Here
|
| 4 |
|
4 |
|
| 5 |
### Sources |
5 |
### Sources |
| 6 |
|
6 |
|
| 7 |
SOURCE_FILES=file_io.h file_io.c in_buffer.h in_buffer.c parse_ifo.h parse_ifo.c s_types.h main.c vstrip.h vstrip.c |
7 |
SOURCE_FILES=file_io.h file_io.c in_buffer.h in_buffer.c parse_ifo.h parse_ifo.c s_types.h main.c vstrip.h vstrip.c dvd2avi_plugin.c |
| 8 |
|
8 |
|
| 9 |
### Objects and executables |
9 |
### Objects and executables |
| 10 |
|
10 |
|
|
Lines 27-34
Link Here
|
| 27 |
|
27 |
|
| 28 |
### Details |
28 |
### Details |
| 29 |
|
29 |
|
| 30 |
vstrip : file_io.o in_buffer.o main.o parse_ifo.o vstrip.o |
30 |
vstrip : file_io.o in_buffer.o main.o parse_ifo.o vstrip.o dvd2avi_plugin.o |
| 31 |
$(CC) -g file_io.o in_buffer.o main.o parse_ifo.o vstrip.o -o vstrip |
31 |
$(CC) -g file_io.o in_buffer.o main.o parse_ifo.o vstrip.o dvd2avi_plugin.o -o vstrip |
| 32 |
file_io.o : s_types.h file_io.h file_io.c |
32 |
file_io.o : s_types.h file_io.h file_io.c |
| 33 |
in_buffer.o : s_types.h file_io.h in_buffer.h in_buffer.c |
33 |
in_buffer.o : s_types.h file_io.h in_buffer.h in_buffer.c |
| 34 |
main.o : s_types.h file_io.h vstrip.h main.c |
34 |
main.o : s_types.h file_io.h vstrip.h main.c |
| 35 |
-- dvd2avi_plugin.c |
|
|
|
Lines 6-18
Link Here
|
| 6 |
|
6 |
|
| 7 |
*************************************************************************/ |
7 |
*************************************************************************/ |
| 8 |
|
8 |
|
|
|
9 |
#include <string.h> |
| 10 |
#include <stdlib.h> |
| 9 |
#include <stdio.h> |
11 |
#include <stdio.h> |
| 10 |
#include <io.h> |
12 |
#include <asm/io.h> |
| 11 |
#include <fcntl.h> |
13 |
#include <fcntl.h> |
| 12 |
#include "s_types.h" |
14 |
#include "s_types.h" |
| 13 |
#include "vstrip.h" |
15 |
#include "vstrip.h" |
| 14 |
#include "dvd2avi_plugin.h" |
16 |
#include "dvd2avi_plugin.h" |
| 15 |
|
17 |
|
|
|
18 |
#define max(a,b) a < b ? b : a |
| 19 |
|
| 16 |
bool dvd2avi_process(byte *data, tp_vs_streaminfo const si, void *user_data) |
20 |
bool dvd2avi_process(byte *data, tp_vs_streaminfo const si, void *user_data) |
| 17 |
{ |
21 |
{ |
| 18 |
t_dvd2avi* d2v = (t_dvd2avi *)user_data; |
22 |
t_dvd2avi* d2v = (t_dvd2avi *)user_data; |
|
Lines 206-212
Link Here
|
| 206 |
fp = _open(fname, _O_BINARY | _O_RDONLY); // check size |
210 |
fp = _open(fname, _O_BINARY | _O_RDONLY); // check size |
| 207 |
if (fp != -1) |
211 |
if (fp != -1) |
| 208 |
{ |
212 |
{ |
| 209 |
__int64 fposition = _filelengthi64(fp); |
213 |
__int64_t fposition = lseek64(fp, 0, SEEK_END); |
| 210 |
|
214 |
|
| 211 |
lba = (dword)(fposition / fio_SECTOR_SIZE); |
215 |
lba = (dword)(fposition / fio_SECTOR_SIZE); |
| 212 |
_close(fp); |
216 |
_close(fp); |
| 213 |
-- file_io.c |
|
|
|
Lines 32-38
Link Here
|
| 32 |
fp = _open(name, _O_BINARY | _O_RDONLY); // check size |
32 |
fp = _open(name, _O_BINARY | _O_RDONLY); // check size |
| 33 |
if (fp != -1) |
33 |
if (fp != -1) |
| 34 |
{ |
34 |
{ |
| 35 |
__int64 fposition = _filelengthi64(fp); |
35 |
__int64_t fposition = lseek64(fp, 0, SEEK_END); |
| 36 |
|
36 |
|
| 37 |
f->written_to = fposition > 0; |
37 |
f->written_to = fposition > 0; |
| 38 |
if (fposition > 0) |
38 |
if (fposition > 0) |