CMakeLists.txt: use GNUInstallDirs This fixes installation in multi-arch paths on systems which supports that.
examples/CMakeLists.txt: restrict required libraries for avformat_open_input() When checking if avformat_open_input() exists, link only with FFMPEG_LIBAVFORMAT_LIBRARIES, this is more essential and also more symmetric from a readability point of view.
examples/CMakeLists.txt: use a relative path for the include file This is the correct way to include a file when calling check_symbol_exists(), since the include paths are already set with: set(CMAKE_REQUIRED_INCLUDES ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS})
examples/CMakeLists.txt: clean up Feature Test Macro Requirements defines Setting _POSIX_C_SOURCE to the right value enables all the needed functionalities. This also avoids using _DEFAULT_SOURCE explicitly to get rid of the _BSD_SOURCE deprecation warning.
Strip trailing spaces here and there
examples: fix handling optional libraries in target_link_libraries() am7xxx-play can compile just fine without XCB, but cmake was being overly strict when XCB was missing.
Rename am7xxx_mode_switch to am7xxx-modeswitch The new name matches more closely the name of the binary used in recent usb-modeswitch versions.
am7xxx-play: check if strtok_r is available On Windows systems, where strtok_r is not available, strtok_s could be used but this needs the C Run-Time library (msvcrt.dll or msvcr80.dll) and we can't distribute it. So for now, when strtok_r is not available, just print a message to warn the user that the '-o' options is not available.
am7xxx-play: check if sigaction is available If sigaction is not available just stub out the set_signal_handler() function.
Add a simple usb_mode_switch clone for am7xxx devices Add am7xxx_mode_switch, this is will be used on systems where usb_mode_switch is not easily available (e.g. MS Windows).
Stop CMake if function avformat_open_input not available, print an error message. Prevents compile errors later on.
Make example programs optional.
Link to all ffmpeg libraries, not just to avdevice.
examples: add a am7xxx-play example program am7xxx-play is a simple player based on ffmpeg/libav which displays the output on a am7xxx device. It can be used to capture the desktop screen, or video from a v4l2 device, or from any other device supported by libavdevice including video files. However it is to note that am7xxx-play displays the output as fast as it can so it is not reliable when used to display video files directly.
picoproj: move it to an example/ directory We plan on adding some more useful examples in the future, so it is better to have them all in their separate directory in order to make the project structure easier to understand.