[asterisk-dev] Dead code around HAVE_VIDEO_CONSOLE

Alexander Traud pabstraud at compuserve.com
Sun Jun 3 05:38:31 CDT 2018


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?





More information about the asterisk-dev mailing list