From: Michal Sojka Date: Fri, 7 May 2010 21:43:17 +0000 (+0200) Subject: Progress in O_DIRECT handling - not completed X-Git-Tag: jsa-paper-casestudy-v2~63 X-Git-Url: https://rtime.felk.cvut.cz/gitweb/frescor/demo.git/commitdiff_plain/b70b2a09935ed49696775752200e1e2b105b7e48 Progress in O_DIRECT handling - not completed --- diff --git a/build-no-frsh/cmd.gdb b/build-no-frsh/cmd.gdb index 6e65f61..eae5529 100644 --- a/build-no-frsh/cmd.gdb +++ b/build-no-frsh/cmd.gdb @@ -1,7 +1,9 @@ file /home/wsh/frescor/demo/build-no-frsh/_compiled/bin/recorder +b url_fopen b url_fdopen b file_open -b file_write b av_interleaved_write_frame -#run -s 640x480 -r 15 -f video4linux2 -i /dev/video0 -run -s 320x240 -f video4linux2 -i /dev/video0 +# b file_write +# b av_interleaved_write_frame +run -s 640x480 -r 15 -f video4linux2 -i /dev/video0 +#run -s 320x240 -f video4linux2 -i /dev/video0 diff --git a/src/ffmpeg b/src/ffmpeg index d62e9c1..77b0842 160000 --- a/src/ffmpeg +++ b/src/ffmpeg @@ -1 +1 @@ -Subproject commit d62e9c13e11e60fc2dd7363336d0018f3a103e41 +Subproject commit 77b0842e4959363e840f573192cccd6e4ac40cb9 diff --git a/src/recorder/ffmpeg.c b/src/recorder/ffmpeg.c index 7c01754..f625257 100644 --- a/src/recorder/ffmpeg.c +++ b/src/recorder/ffmpeg.c @@ -3505,10 +3505,22 @@ static void opt_output_file(const char *filename) } /* open the file */ - if (url_fopen(&oc->pb, filename, URL_WRONLY) < 0) { + if (url_fopen(&oc->pb, filename, URL_WRONLY|URL_DIRECT) < 0) { fprintf(stderr, "Could not open '%s'\n", filename); av_exit(1); } + + if (0) { + int i; + for (i=0; i<0x81; i++) { + put_le32(oc->pb, i); + if (i==0x42) + put_flush_packet(oc->pb); + } + url_close_buf(oc->pb); + url_fclose(oc->pb); + exit(0); + } } memset(ap, 0, sizeof(*ap));