Skip to content
This repository was archived by the owner on May 6, 2021. It is now read-only.

Commit e21a530

Browse files
committed
Merge branch 'master' of https://github.com/tvdzwan/hyperion.git
2 parents 1fda06d + f45b842 commit e21a530

36 files changed

+1557
-75
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ option (ENABLE_SPIDEV "Enable the SPIDEV device" ON)
1313
message(STATUS "ENABLE_DISPMANX = " ${ENABLE_DISPMANX})
1414
message(STATUS "ENABLE_SPIDEV = " ${ENABLE_SPIDEV})
1515

16+
option (ENABLE_V4L2 "Enable the V4L2 grabber" ON)
17+
message(STATUS "ENABLE_V4L2 = " ${ENABLE_V4L2})
18+
1619
# Createt the configuration file
1720
# configure a header file to pass some of the CMake settings
1821
# to the source code

HyperionConfig.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@
33
// Define to enable the dispmanx grabber
44
#cmakedefine ENABLE_DISPMANX
55

6+
// Define to enable the v4l2 grabber
7+
#cmakedefine ENABLE_V4L2
8+
69
// Define to enable the spi-device
710
#cmakedefine ENABLE_SPIDEV

bin/copy_binaries_to_deploy.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ tar --create --verbose --gzip --absolute-names --show-transformed-names \
2222
--transform "s://:/:g" \
2323
"$builddir/bin/hyperiond" \
2424
"$builddir/bin/hyperion-remote" \
25+
"$builddir/bin/hyperion-v4l2" \
2526
"$builddir/bin/gpio2spi" \
2627
"$builddir/bin/dispmanx2png" \
2728
"$repodir/effects/"* \

bin/install_hyperion.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ if [ $IS_OPENELEC -eq 1 ]; then
3636
# OpenELEC has a readonly file system. Use alternative location
3737
curl --get https://raw.github.com/tvdzwan/hyperion/master/deploy/hyperion.tar.gz | tar -C /storage -xz
3838
curl --get https://raw.github.com/tvdzwan/hyperion/master/deploy/hyperion.deps.openelec-rpi.tar.gz | tar -C /storage/hyperion/bin -xz
39-
39+
4040
# modify the default config to have a correct effect path
4141
sed -i 's:/opt:/storage:g' /storage/hyperion/config/hyperion.config.json
4242
else
@@ -47,6 +47,7 @@ fi
4747
if [ $IS_OPENELEC -ne 1 ]; then
4848
ln -fs /opt/hyperion/bin/hyperiond /usr/bin/hyperiond
4949
ln -fs /opt/hyperion/bin/hyperion-remote /usr/bin/hyperion-remote
50+
ln -fs /opt/hyperion/bin/hyperion-v4l2 /usr/bin/hyperion-v4l2
5051
fi
5152

5253
# create link to the gpio changer (gpio->spi)
@@ -62,7 +63,6 @@ if [ $IS_OPENELEC -eq 1 ]; then
6263
else
6364
ln -s /opt/hyperion/config/hyperion.config.json /etc/hyperion.config.json
6465
fi
65-
6666

6767
# Copy the service control configuration to /etc/int
6868
if [ $USE_INITCTL -eq 1 ]; then

config/hyperion.config.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,21 @@
5656
"red" :
5757
{
5858
"threshold" : 0.0000,
59-
"gamma" : 2.0000,
59+
"gamma" : 1.0000,
6060
"blacklevel" : 0.0000,
6161
"whitelevel" : 1.0000
6262
},
6363
"green" :
6464
{
6565
"threshold" : 0.0000,
66-
"gamma" : 2.0000,
66+
"gamma" : 1.0000,
6767
"blacklevel" : 0.0000,
6868
"whitelevel" : 1.0000
6969
},
7070
"blue" :
7171
{
7272
"threshold" : 0.0000,
73-
"gamma" : 2.0000,
73+
"gamma" : 1.0000,
7474
"blacklevel" : 0.0000,
7575
"whitelevel" : 1.0000
7676
}
@@ -348,10 +348,12 @@
348348
],
349349

350350
/// The black border configuration, contains the following items:
351-
/// * enable : true if the detector should be activated
351+
/// * enable : true if the detector should be activated
352+
/// * threshold : Value below which a pixel is regarded as black (value between 0.0 and 1.0)
352353
"blackborderdetector" :
353354
{
354-
"enable" : true
355+
"enable" : true,
356+
"threshold" : 0.01
355357
},
356358

357359
/// The configuration of the effect engine, contains the following items:

config/hyperion_x86.config.json

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
"device" :
1414
{
1515
"name" : "MyPi",
16-
"type" : "test",
17-
"output" : "~/hyperion.test.out",
18-
"rate" : 250000,
16+
"type" : "adalight",
17+
"output" : "/dev/ttyUSB0",
18+
"rate" : 115200,
1919
"colorOrder" : "rgb"
2020
},
2121

@@ -348,10 +348,12 @@
348348
],
349349

350350
/// The black border configuration, contains the following items:
351-
/// * enable : true if the detector should be activated
351+
/// * enable : true if the detector should be activated
352+
/// * threshold : Value below which a pixel is regarded as black (value between 0.0 and 1.0)
352353
"blackborderdetector" :
353354
{
354-
"enable" : true
355+
"enable" : true,
356+
"threshold" : 0.01
355357
},
356358

357359
/// The configuration of the effect engine, contains the following items:
@@ -371,6 +373,38 @@
371373
"duration_ms" : 3000
372374
},
373375

376+
/// The configuration for the frame-grabber, contains the following items:
377+
/// * width : The width of the grabbed frames [pixels]
378+
/// * height : The height of the grabbed frames [pixels]
379+
/// * frequency_Hz : The frequency of the frame grab [Hz]
380+
// "framegrabber" :
381+
// {
382+
// "width" : 64,
383+
// "height" : 64,
384+
// "frequency_Hz" : 10.0
385+
// },
386+
387+
/// The configuration of the XBMC connection used to enable and disable the frame-grabber. Contains the following fields:
388+
/// * xbmcAddress : The IP address of the XBMC-host
389+
/// * xbmcTcpPort : The TCP-port of the XBMC-server
390+
/// * grabVideo : Flag indicating that the frame-grabber is on(true) during video playback
391+
/// * grabPictures : Flag indicating that the frame-grabber is on(true) during picture show
392+
/// * grabAudio : Flag indicating that the frame-grabber is on(true) during audio playback
393+
/// * grabMenu : Flag indicating that the frame-grabber is on(true) in the XBMC menu
394+
/// * grabScreensaver : Flag indicating that the frame-grabber is on(true) when XBMC is on screensaver
395+
/// * enable3DDetection : Flag indicating that the frame-grabber should switch to a 3D compatible modus if a 3D video is playing
396+
// "xbmcVideoChecker" :
397+
// {
398+
// "xbmcAddress" : "127.0.0.1",
399+
// "xbmcTcpPort" : 9090,
400+
// "grabVideo" : true,
401+
// "grabPictures" : true,
402+
// "grabAudio" : true,
403+
// "grabMenu" : false,
404+
// "grabScreensaver" : true,
405+
// "enable3DDetection" : true
406+
// },
407+
374408
/// The configuration of the Json server which enables the json remote interface
375409
/// * port : Port at which the json server is started
376410
"jsonServer" :

dependencies/build/getoptPlusPlus/getoptpp.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ void OptionsParser::usage() const {
120120
for(i = parameters.parameters.begin();
121121
i != parameters.parameters.end(); i++)
122122
{
123-
cerr.width(30);
123+
cerr.width(33);
124124
cerr << std::left << " " + (*i)->usageLine();
125125

126126
cerr.width(40);
-16.4 KB
Binary file not shown.

deploy/hyperion.tar.gz

454 KB
Binary file not shown.

include/hyperion/BlackBorderDetector.h renamed to include/blackborder/BlackBorderDetector.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ namespace hyperion
4848
public:
4949
///
5050
/// Constructs a black-border detector
51+
/// @param[in] blackborderThreshold The threshold which the blackborder detector should use
5152
///
52-
BlackBorderDetector();
53+
BlackBorderDetector(uint8_t blackborderThreshold);
5354

5455
///
5556
/// Performs the actual black-border detection on the given image
@@ -125,7 +126,11 @@ namespace hyperion
125126
inline bool isBlack(const Pixel_T & color)
126127
{
127128
// Return the simple compare of the color against black
128-
return color.red < 3 && color.green < 3 && color.green < 3;
129+
return color.red < _blackborderThreshold && color.green < _blackborderThreshold && color.green < _blackborderThreshold;
129130
}
131+
132+
private:
133+
/// Threshold for the blackborder detector [0 .. 255]
134+
const uint8_t _blackborderThreshold;
130135
};
131136
} // end namespace hyperion

0 commit comments

Comments
 (0)