Logging Event Fix
Description of Patch
This patch will improve upon a few ambiguous log messages which may be emitted by the Event handling code with regards to Ffmpeg.
Installation of Patch
Download the patch file. If it is packed as a gz or tar.gz unpack it first. Then copy it to the motion source directory and issue the command (assuming the patch file is called filename_of_patch_file.diff)
patch < filename_of_patch_file.diff
Then re-build Motion and test the patch.
Change History of Patch
I simply don't understand how to get things like this to do, but sounds interresting ...
[klaus@medion4 motion-20060509-051001]$ patch < patch.diff
patching file event.c
Hunk #1 FAILED at 358.
Hunk #2 FAILED at 390.
Hunk #3 FAILED at 439.
3 out of 3 hunks FAILED -- saving rejects to file event.c.rej
event.c.rej:
***************
*** 358,364 ****
ffmpeg_open((char *)cnt->conf.ffmpeg_video_codec, cnt->newfilename, y, u, v,
cnt->imgs.width, cnt->imgs.height, fps, cnt->conf.ffmpeg_bps,
cnt->conf.ffmpeg_vbr)) == NULL) {
- motion_log(LOG_ERR, 1, "ffopen_open error creating file [%s]",cnt->newfilename);
cnt->finish=1;
return;
}
--- 358,364 ----
ffmpeg_open((char *)cnt->conf.ffmpeg_video_codec, cnt->newfilename, y, u, v,
cnt->imgs.width, cnt->imgs.height, fps, cnt->conf.ffmpeg_bps,
cnt->conf.ffmpeg_vbr)) == NULL) {
+ motion_log(LOG_ERR, 1, "ffopen_open error creating (new) file [%s]",cnt->newfilename);
cnt->finish=1;
return;
}
***************
*** 390,396 ****
ffmpeg_open((char *)cnt->conf.ffmpeg_video_codec, cnt->motionfilename, y, u, v,
cnt->imgs.width, cnt->imgs.height, fps, cnt->conf.ffmpeg_bps,
cnt->conf.ffmpeg_vbr)) == NULL){
- motion_log(LOG_ERR, 1, "ffopen_open error creating file [%s]", cnt->motionfilename);
cnt->finish=1;
return;
}
--- 390,396 ----
ffmpeg_open((char *)cnt->conf.ffmpeg_video_codec, cnt->motionfilename, y, u, v,
cnt->imgs.width, cnt->imgs.height, fps, cnt->conf.ffmpeg_bps,
cnt->conf.ffmpeg_vbr)) == NULL){
+ motion_log(LOG_ERR, 1, "ffopen_open error creating (motion) file [%s]", cnt->motionfilename);
cnt->finish=1;
return;
}
***************
*** 439,445 ****
ffmpeg_open((char *)TIMELAPSE_CODEC, cnt->timelapsefilename, y, u, v,
cnt->imgs.width, cnt->imgs.height, 24, cnt->conf.ffmpeg_bps,
cnt->conf.ffmpeg_vbr)) == NULL) {
- motion_log(LOG_ERR, 1, "ffopen_open error creating file [%s]", cnt->timelapsefilename);
cnt->finish=1;
return;
}
--- 439,445 ----
ffmpeg_open((char *)TIMELAPSE_CODEC, cnt->timelapsefilename, y, u, v,
cnt->imgs.width, cnt->imgs.height, 24, cnt->conf.ffmpeg_bps,
cnt->conf.ffmpeg_vbr)) == NULL) {
+ motion_log(LOG_ERR, 1, "ffopen_open error creating (timelapse) file [%s]", cnt->timelapsefilename);
cnt->finish=1;
return;
}
As claimed in
http://www.lavrsen.dk/twiki/bin/view/Motion/BugReport2006x04x07x164654 I really need to get something cut out in big letters to understand how to test things like this.
--
TheOtherBug - 10 May 2006
I suspected that might happen to you--it is a result of some other patches I have installed. I'll try and make a cleaner one. You have the process correct.
--
PeterS - 10 May 2006
I've updated the patch to be clean against today's build.
--
PeterS - 10 May 2006
Actually looking at your text I'm not entirely sure why it would have rejected the patch. It looks like some extra spaces snuck in there somehow. Not sure how that happened.
--
PeterS - 10 May 2006
Thanks Peter it worked now, no complains from patch, motion compiled and installed fine - now I'll just wait and see what will happen.
Is it allrigt to remove the above postings again to keep it clean here?
--
TheOtherBug - 10 May 2006
I have implemented the patch. Thanks Peter.
SVN 79
--
KennethLavrsen - 25 May 2006
In 3.2.7
--
KennethLavrsen - 20 Oct 2006