mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Merge branch 'master' into merge_v4l2
Former-commit-id: 97b281cc14b3bc239fc5eab1f66c9d15e67f753f
This commit is contained in:
@@ -7,6 +7,7 @@ SET(V4L2_QT_HEADERS
|
||||
)
|
||||
|
||||
SET(V4L2_HEADERS
|
||||
${CURRENT_HEADER_DIR}/VideoStandard.h
|
||||
)
|
||||
|
||||
SET(V4L2_SOURCES
|
||||
|
@@ -328,7 +328,7 @@ void V4L2Grabber::init_device(VideoStandard videoStandard, int input)
|
||||
// set the video standard if needed
|
||||
switch (videoStandard)
|
||||
{
|
||||
case PAL:
|
||||
case VIDEOSTANDARD_PAL:
|
||||
{
|
||||
v4l2_std_id std_id = V4L2_STD_PAL;
|
||||
if (-1 == xioctl(VIDIOC_S_STD, &std_id))
|
||||
@@ -337,7 +337,7 @@ void V4L2Grabber::init_device(VideoStandard videoStandard, int input)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case NTSC:
|
||||
case VIDEOSTANDARD_NTSC:
|
||||
{
|
||||
v4l2_std_id std_id = V4L2_STD_NTSC;
|
||||
if (-1 == xioctl(VIDIOC_S_STD, &std_id))
|
||||
@@ -346,7 +346,7 @@ void V4L2Grabber::init_device(VideoStandard videoStandard, int input)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case NO_CHANGE:
|
||||
case VIDEOSTANDARD_NO_CHANGE:
|
||||
default:
|
||||
// No change to device settings
|
||||
break;
|
||||
|
@@ -19,11 +19,12 @@ LedDeviceLpd6803::LedDeviceLpd6803(const std::string& outputDevice, const unsign
|
||||
|
||||
int LedDeviceLpd6803::write(const std::vector<ColorRgb> &ledValues)
|
||||
{
|
||||
unsigned messageLength = 4 + 2*ledValues.size() + ledValues.size()/8 + 1;
|
||||
// Reconfigure if the current connfiguration does not match the required configuration
|
||||
if (4 + 2*ledValues.size() != _ledBuffer.size())
|
||||
if (messageLength != _ledBuffer.size())
|
||||
{
|
||||
// Initialise the buffer
|
||||
_ledBuffer.resize(4 + 2*ledValues.size(), 0x00);
|
||||
_ledBuffer.resize(messageLength, 0x00);
|
||||
}
|
||||
|
||||
// Copy the colors from the ColorRgb vector to the Ldp6803 data vector
|
||||
|
Reference in New Issue
Block a user