[asterisk-dev] Dead code around HAVE_VIDEO_CONSOLE

Matt Fredrickson creslin at digium.com
Fri Jun 29 14:32:59 CDT 2018


On Sun, Jun 3, 2018 at 11:38 AM, Alexander Traud
<pabstraud at compuserve.com> wrote:
> In the script configure, while going through all AST_EXT_LIB_SETUP, I find more and more code which is dead. That means, external projects are not used anymore too. This time, this is HAVE_FFMPEG, HAVE_SDL, HAVE_SDL_IMAGE, HAVE_VIDEODEV_H, and HAVE_X11.
>
> That code is not maintained anymore since June 2008. It is guarded by the Define HAVE_VIDEO_CONSOLE. The project was called "console_video". It is used in the Console Channel Driver for the Open Sound System (channels/chan_oss). That Define must be set manually, therefore this code slipped through all the years. In the year 2011, with GitHub-Commit c26c190 for Asterisk 10, it got disabled completely.
>
> The problem is not so much the dead code. Those libraries/headers are detected, with every ./configure. Since Ubuntu 16.04 LTS (or even earlier) the following packages are involved:
>
> - libavcodec-dev, fails because symbol moved to libswscale/swscale.h
> - libavutil-dev, fails because Defines used but not included
> - libswscale-dev, fails because header file moved
> + libsdl1.2-dev
> + libsdl-image1.2-dev
> - libv4l-dev, fails because header file moved to libv4l1-videodev.h
> + libx11-dev
>
> This might confuse novice users who read the output of ./configure: "Video, I want video. Why can't I configure that? Why does it fail?" People waste time understanding and enabling this. Even after
> - changing those two paths in the script configure and in the source,
> - #define HAVE_VIDEO_CONSOLE not in chan_oss.c but in console_video.h,
> - #include <libavutil/pixfmt.h> in channels/vgrabbers.c for PIX_FMT_,
> still the code does not build. Too much changed in Asterisk and FFmpeg in the last ten years.
>
> I asked the original author Luigi Rizzo and he is not using that code anymore himself. Therefore, what about removing those parts within the configure script, at least?

Sorry about the delay on this Alexander.  I'm ok with removing those
parts of the configure script, if they're truly not being used right
now.  If someone wants to come along and get it working again, then
the code is still available for them to fix it.

-- 
Matthew Fredrickson
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA



More information about the asterisk-dev mailing list