Hi Dave, On 12.11.2015 02:04, Mr Dave wrote: > 2. The 3.4.1rc01 (release candidate 01) is currently on the wiki as a > proposed patch. > It is still being considered for putting into the SVN but this is not > something that > I can do since I do not have access to the SVN. It is also in github under > the MrDave fork. > I will say that the github has a lot of "noise" in the commits because when I > started, I did > not anticipate it would be proposed for a release. Below are the links to > the wiki and github. > > Wiki: http://www.lavrsen.dk/foswiki/bin/view/Motion/PatchworkForNewRelease > github: https://github.com/Mr-Dave/motion/tree/motion-3.4
Thanks for these links. > 3. The code in 3.4.1 takes a different approach in ffmpeg.c. Rather than > using so many preprocessor > directives, it creates "MY" functions based upon the build version of ffmpeg. > In this way I was able > to get the code to function and compile correctly with what I think are all > the versions of Libav and > ffmpeg from 2012 onwards. As a result, you will still see those functions in > the code but they are > now isolated and surrounded by simple directives. The following is the code > snippet for the frame > allocate for illustration. > > AVFrame *my_frame_alloc(void){ > AVFrame *pic; > #if (LIBAVFORMAT_VERSION_MAJOR >= 55) > pic = av_frame_alloc(); > #else > pic = avcodec_alloc_frame(); > #endif > return pic; > } > > I believe this allows the code to be backwards compatible to at least 2012 > and also across libav and > ffmpeg while at the same time make it much easier to maintain as those two > projects evolve in the future. Yes this should work fine. I see that you removed the deinterlace functionality. If you want to keep/reintroduce that, you can use the yadif filter from libavfilter as I did in my patch. > An additional enhancement that is outstanding is determining a precise method > of identifying whether > the libraries are Libav or ffmpeg. You can use e.g. LIBAVCODEC_VERSION_MICRO for that purpose: '>= 100' is FFmpeg '< 100' is Libav. Best regards, Andreas