Skip to content

Commit

Permalink
Add XCB grabbing
Browse files Browse the repository at this point in the history
  • Loading branch information
m-seker committed Jul 27, 2020
1 parent a8782cb commit 6b555f8
Show file tree
Hide file tree
Showing 106 changed files with 2,790 additions and 3,901 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Breaking

### Added

- Add XCB grabber, a faster and safer alternative for X11 grabbing (#)
### Changed

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion assets/webconfig/js/content_dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ $(document).ready( function() {

if(grabbers.indexOf('dispmanx') > -1)
html += 'Raspberry Pi';
else if(grabbers.indexOf('x11') > -1)
else if(grabbers.indexOf('x11') > -1 || grabbers.indexOf('xcb') > -1)
html += 'X86';
else if(grabbers.indexOf('osx') > -1)
html += 'OSX';
Expand Down
2 changes: 1 addition & 1 deletion assets/webconfig/js/content_grabber.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ $(document).ready( function() {

if (grabbers.indexOf('dispmanx') > -1)
hideEl(["device","pixelDecimation"]);
else if (grabbers.indexOf('x11') > -1)
else if (grabbers.indexOf('x11') > -1 || grabbers.indexOf('xcb') > -1)
hideEl(["device","width","height"]);
else if (grabbers.indexOf('osx') > -1 )
hideEl(["device","pixelDecimation"]);
Expand Down
6 changes: 6 additions & 0 deletions bin/install_hyperion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ else
ln -fs $BINSP/hyperion-v4l2 $BINTP/hyperion-v4l2
ln -fs $BINSP/hyperion-dispmanx $BINTP/hyperion-dispmanx 2>/dev/null
ln -fs $BINSP/hyperion-x11 $BINTP/hyperion-x11 2>/dev/null
ln -fs $BINSP/hyperion-xcb $BINTP/hyperion-xcb 2>/dev/null
ln -fs $BINSP/hyperion-aml $BINTP/hyperion-aml 2>/dev/null
fi

Expand All @@ -260,6 +261,11 @@ elif [ $OS_OPENELEC -eq 1 ]; then
echo '---> Adding Hyperion-x11 to OpenELEC/LibreELEC autostart.sh'
echo "DISPLAY=:0.0 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/storage/hyperion/bin /storage/hyperion/bin/hyperion-x11 </dev/null >/storage/logfiles/hyperion.log 2>&1 &" >> /storage/.config/autostart.sh
fi
# only add hyperion-xcb to startup, if not found and x32x64 detected
if [ $CPU_X32X64 -eq 1 ] && [ `cat /storage/.config/autostart.sh 2>/dev/null | grep hyperion-xcb | wc -l` -eq 0 ]; then
echo '---> Adding Hyperion-xcb to OpenELEC/LibreELEC autostart.sh'
echo "DISPLAY=:0.0 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/storage/hyperion/bin /storage/hyperion/bin/hyperion-xcb </dev/null >/storage/logfiles/hyperion.log 2>&1 &" >> /storage/.config/autostart.sh
fi
elif [ $USE_SYSTEMD -eq 1 ]; then
echo '---> Installing systemd script'
#place startup script for systemd and activate
Expand Down
8 changes: 5 additions & 3 deletions bin/remove_hyperion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ elif [ $OS_OPENELEC -eq 1 ]; then
echo "---> Remove Hyperion from OpenELEC autostart.sh"
sed -i "/hyperiond/d" /storage/.config/autostart.sh 2>/dev/null
sed -i "/hyperion-x11/d" /storage/.config/autostart.sh 2>/dev/null
sed -i "/hyperion-xcb/d" /storage/.config/autostart.sh 2>/dev/null
elif [ $USE_SYSTEMD -eq 1 ]; then
# Delete and disable Hyperion systemd script
echo '---> Delete and disable Hyperion systemd script'
Expand All @@ -97,14 +98,15 @@ if [ $OS_OPENELEC -eq 1 ]; then
echo '---> Remove the OpenELEC Hyperion binaries and hyperion.config.json'
rm -rv /storage/hyperion 2>/dev/null
rm -v /storage/.config/hyperion.config.json 2>/dev/null
else
else
#Remove binaries on all distributions/systems (not OpenELEC)
echo "---> Remove links to the binaries"
echo "---> Remove links to the binaries"
rm -v /usr/bin/hyperiond 2>/dev/null
rm -v /usr/bin/hyperion-remote 2>/dev/null
rm -v /usr/bin/hyperion-v4l2 2>/dev/null
rm -v /usr/bin/hyperion-dispmanx 2>/dev/null
rm -v /usr/bin/hyperion-x11 2>/dev/null
rm -v /usr/bin/hyperion-xcb 2>/dev/null
rm -v /usr/bin/hyperion-aml 2>/dev/null
rm -v /etc/hyperion.config.json 2>/dev/null
echo "---> Remove binaries"
Expand All @@ -116,4 +118,4 @@ echo '**************************************************************************
echo 'Hyperion successful removed!'
echo '*******************************************************************************'
exit 0

1 change: 1 addition & 0 deletions cmake/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ ln -fs $BINSP/hyperion-v4l2 $BINTP/hyperion-v4l2
ln -fs $BINSP/hyperion-framebuffer $BINTP/hyperion-framebuffer 2>/dev/null
ln -fs $BINSP/hyperion-dispmanx $BINTP/hyperion-dispmanx 2>/dev/null
ln -fs $BINSP/hyperion-x11 $BINTP/hyperion-x11 2>/dev/null
ln -fs $BINSP/hyperion-xcb $BINTP/hyperion-xcb 2>/dev/null
ln -fs $BINSP/hyperion-aml $BINTP/hyperion-aml 2>/dev/null
ln -fs $BINSP/hyperion-qt $BINTP/hyperion-qt 2>/dev/null

Expand Down
12 changes: 12 additions & 0 deletions cmake/packages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ endif()
if(ENABLE_X11)
SET ( CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} "hyperion_x11" )
endif()
if(ENABLE_XCB)
SET ( CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} "hyperion_xcb" )
endif()
if(ENABLE_DISPMANX)
SET ( CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} "hyperion_dispmanx" )
endif()
Expand Down Expand Up @@ -210,6 +213,15 @@ if(ENABLE_X11)
DEPENDS Hyperion
)
endif()
if(ENABLE_X11)
cpack_add_component(hyperion_xcb
DISPLAY_NAME "XCB Standalone Screencap"
DESCRIPTION "XCB based standalone screen capture"
INSTALL_TYPES Full
GROUP Screencapture
DEPENDS Hyperion
)
endif()
if(ENABLE_DISPMANX)
cpack_add_component(hyperion_dispmanx
DISPLAY_NAME "RPi dispmanx Standalone Screencap"
Expand Down
1 change: 1 addition & 0 deletions cmake/rpm/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ ln -fs $BINSP/hyperion-v4l2 $BINTP/hyperion-v4l2
ln -fs $BINSP/hyperion-framebuffer $BINTP/hyperion-framebuffer 2>/dev/null
ln -fs $BINSP/hyperion-dispmanx $BINTP/hyperion-dispmanx 2>/dev/null
ln -fs $BINSP/hyperion-x11 $BINTP/hyperion-x11 2>/dev/null
ln -fs $BINSP/hyperion-xcb $BINTP/hyperion-xcb 2>/dev/null
ln -fs $BINSP/hyperion-aml $BINTP/hyperion-aml 2>/dev/null
ln -fs $BINSP/hyperion-qt $BINTP/hyperion-qt 2>/dev/null

Expand Down
Loading

0 comments on commit 6b555f8

Please sign in to comment.