Raw Video and PCM audio files now selectable.

This commit is contained in:
n-a-c-h
2006-02-26 03:20:23 +00:00
parent 38dee0a2dd
commit 0dfd43e7b1
2 changed files with 10 additions and 6 deletions

View File

@@ -1,9 +1,13 @@
md_raw_file times 50 db "rawvideo.bin" @ Only for Raw Video
md_pcm_audio times 50 db "pcmaudio.wav" @ AVI dumping always dumps audio seperatly
md_ntsc times 20 db "59649/995" md_ntsc times 20 db "59649/995"
md_pal times 5 db "50/1" md_pal times 5 db "50/1"
md_prog times 50 db "mencoder" md_prog times 50 db "mencoder"
md_raw times 100 db "-demuxer rawvideo -rawvideo format=0x42475218:w=256:h=224:size=172032" md_raw times 100 db "-demuxer rawvideo -rawvideo format=0x42475218:w=256:h=224:size=172032"
md_other times 50 db "-aspect 4/3 -mc 0 -nosound" md_other times 50 db "-aspect 4/3 -mc 0 -nosound"
md_file times 50 db "video.avi" md_file times 50 db "video.avi"
@Valid variables to use in the next three lines are: @Valid variables to use in the next three lines are:
@$md_prog, $md_raw, $md_other, $md_file, $md_video_rate @$md_prog, $md_raw, $md_other, $md_file, $md_video_rate
@These variables are defined above. @These variables are defined above.

View File

@@ -1892,8 +1892,6 @@ static char *pick_var(char **str)
FILE *open_movie_file() FILE *open_movie_file()
{ {
char command[450], *p, *var; char command[450], *p, *var;
read_movie_vars("zmovie.cfg");
*command = 0; *command = 0;
switch (MovieVideoMode) switch (MovieVideoMode)
@@ -1985,12 +1983,14 @@ static void raw_video_close()
} }
} }
static bool raw_video_open(const char *video_filename, const char *audio_filename) static bool raw_video_open()
{ {
read_movie_vars("zmovie.cfg");
switch (MovieVideoMode) switch (MovieVideoMode)
{ {
case 1: case 1:
raw_vid.vp = fopen(video_filename, "wb"); raw_vid.vp = fopen(md_raw_file, "wb");
break; break;
case 2: case 3: case 4: case 2: case 3: case 4:
@@ -2009,7 +2009,7 @@ static bool raw_video_open(const char *video_filename, const char *audio_filenam
if (!MovieVideoMode || raw_vid.vp) if (!MovieVideoMode || raw_vid.vp)
{ {
if ((raw_vid.ap = fopen(audio_filename, "wb"))) if ((raw_vid.ap = fopen(md_pcm_audio, "wb")))
{ {
if ((raw_vid.sample_buffer = (unsigned short *)malloc(RAW_BUFFER_SAMPLES*sizeof(short)))) if ((raw_vid.sample_buffer = (unsigned short *)malloc(RAW_BUFFER_SAMPLES*sizeof(short))))
{ {
@@ -2684,7 +2684,7 @@ void MovieDumpRaw()
case MOVIE_OFF: case MOVIE_OFF:
MoviePlay(); MoviePlay();
SRAMChdir(); SRAMChdir();
RawDumpInProgress = raw_video_open("rawvideo.bin", "pcmaudio.wav"); RawDumpInProgress = raw_video_open();
asm_call(ChangetoLOADdir); asm_call(ChangetoLOADdir);
break; break;
} }