set -e
DISPLAY=":0"
-
+
WIN_INFO="$(xwininfo)"
-
+
X=$(echo "$WIN_INFO" | sed -n -e "/^[[:space:]]*Absolute upper-left X:[[:space:]]*/s///p")
Y=$(echo "$WIN_INFO" | sed -n -e "/^[[:space:]]*Absolute upper-left Y:[[:space:]]*/s///p")
WIDTH=$(echo "$WIN_INFO" | sed -n -e "/^[[:space:]]*Width:[[:space:]]*/s///p")
HEIGHT=$(echo "$WIN_INFO" | sed -n -e "/^[[:space:]]*Height:[[:space:]]*/s///p")
-
+
set -x
am7xxx-play -f x11grab -i "${DISPLAY}+${X},${Y}" -o video_size="${WIDTH}x${HEIGHT}"
option(BUILD_AM7XXX-PLAY "Build a more complete example: am7xxx-play" TRUE)
if(BUILD_AM7XXX-PLAY)
find_package(FFmpeg REQUIRED)
- set(CMAKE_REQUIRED_LIBRARIES ${FFMPEG_LIBRARIES})
- set(CMAKE_REQUIRED_INCLUDES ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS})
+ set(CMAKE_REQUIRED_LIBRARIES ${FFMPEG_LIBRARIES})
+ set(CMAKE_REQUIRED_INCLUDES ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS})
check_symbol_exists(avformat_open_input
"${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS}/libavformat/avformat.h"
HAVE_AVFORMAT_OPEN_INPUT)
* This is the function that actually makes the device display something.
* Static pictures can be sent just once and the device will keep showing them
* until another image get sent or some command resets or turns off the display.
- *
+ *
* @note This _async() variant makes a copy of the image buffer, so the caller
* is free to reuse the buffer just after the function returns.
*
-/*
+/*
* Public domain, stripped down version of:
* https://gist.github.com/panzi/6856583
*/