mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
implement proto forwarding for osxgrabber and framebuffer. prepare forwarding in amlogic and dispmanx
Former-commit-id: d67fc2b7fe8877e6eadf31a8c76e4a68110c6680
This commit is contained in:
parent
46c5a2ec05
commit
a9e8f0264a
@ -68,6 +68,9 @@ public slots:
|
|||||||
///
|
///
|
||||||
void setVideoMode(const VideoMode videoMode);
|
void setVideoMode(const VideoMode videoMode);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void emitImage(int priority, const Image<ColorRgb> & image, const int timeout_ms);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// The update rate [Hz]
|
/// The update rate [Hz]
|
||||||
const int _updateInterval_ms;
|
const int _updateInterval_ms;
|
||||||
|
@ -68,6 +68,9 @@ public slots:
|
|||||||
///
|
///
|
||||||
void setVideoMode(const VideoMode videoMode);
|
void setVideoMode(const VideoMode videoMode);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void emitImage(int priority, const Image<ColorRgb> & image, const int timeout_ms);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// The update rate [Hz]
|
/// The update rate [Hz]
|
||||||
const int _updateInterval_ms;
|
const int _updateInterval_ms;
|
||||||
|
@ -69,6 +69,9 @@ public slots:
|
|||||||
///
|
///
|
||||||
void setVideoMode(const VideoMode videoMode);
|
void setVideoMode(const VideoMode videoMode);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void emitImage(int priority, const Image<ColorRgb> & image, const int timeout_ms);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// The update rate [Hz]
|
/// The update rate [Hz]
|
||||||
const int _updateInterval_ms;
|
const int _updateInterval_ms;
|
||||||
|
@ -51,10 +51,12 @@ void DispmanxWrapper::action()
|
|||||||
// Grab frame into the allocated image
|
// Grab frame into the allocated image
|
||||||
_frameGrabber->grabFrame(_image);
|
_frameGrabber->grabFrame(_image);
|
||||||
|
|
||||||
_processor->process(_image, _ledColors);
|
//emit emitImage(_priority, _image, _timeout_ms);
|
||||||
|
|
||||||
|
_processor->process(_image, _ledColors);
|
||||||
_hyperion->setColors(_priority, _ledColors, _timeout_ms);
|
_hyperion->setColors(_priority, _ledColors, _timeout_ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DispmanxWrapper::stop()
|
void DispmanxWrapper::stop()
|
||||||
{
|
{
|
||||||
// Stop the timer, effectivly stopping the process
|
// Stop the timer, effectivly stopping the process
|
||||||
|
@ -46,8 +46,9 @@ void FramebufferWrapper::action()
|
|||||||
// Grab frame into the allocated image
|
// Grab frame into the allocated image
|
||||||
_frameGrabber->grabFrame(_image);
|
_frameGrabber->grabFrame(_image);
|
||||||
|
|
||||||
_processor->process(_image, _ledColors);
|
emit emitImage(_priority, _image, _timeout_ms);
|
||||||
|
|
||||||
|
_processor->process(_image, _ledColors);
|
||||||
_hyperion->setColors(_priority, _ledColors, _timeout_ms);
|
_hyperion->setColors(_priority, _ledColors, _timeout_ms);
|
||||||
}
|
}
|
||||||
void FramebufferWrapper::stop()
|
void FramebufferWrapper::stop()
|
||||||
|
@ -46,8 +46,9 @@ void OsxWrapper::action()
|
|||||||
// Grab frame into the allocated image
|
// Grab frame into the allocated image
|
||||||
_frameGrabber->grabFrame(_image);
|
_frameGrabber->grabFrame(_image);
|
||||||
|
|
||||||
_processor->process(_image, _ledColors);
|
emit emitImage(_priority, _image, _timeout_ms);
|
||||||
|
|
||||||
|
_processor->process(_image, _ledColors);
|
||||||
_hyperion->setColors(_priority, _ledColors, _timeout_ms);
|
_hyperion->setColors(_priority, _ledColors, _timeout_ms);
|
||||||
}
|
}
|
||||||
void OsxWrapper::stop()
|
void OsxWrapper::stop()
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "LedDeviceFadeCandy.h"
|
#include "LedDeviceFadeCandy.h"
|
||||||
|
|
||||||
static const unsigned MAX_NUM_LEDS = 10000; // OPC can handle 21845 leds - in theory, fadecandy device should handle 10000 leds
|
static const signed MAX_NUM_LEDS = 10000; // OPC can handle 21845 leds - in theory, fadecandy device should handle 10000 leds
|
||||||
static const unsigned OPC_SET_PIXELS = 0; // OPC command codes
|
static const unsigned OPC_SET_PIXELS = 0; // OPC command codes
|
||||||
static const unsigned OPC_HEADER_SIZE = 4; // OPC header size
|
static const unsigned OPC_HEADER_SIZE = 4; // OPC header size
|
||||||
|
|
||||||
|
@ -240,6 +240,10 @@ int main(int argc, char** argv)
|
|||||||
QObject::connect(xbmcVideoChecker, SIGNAL(videoMode(VideoMode)), dispmanx, SLOT(setVideoMode(VideoMode)));
|
QObject::connect(xbmcVideoChecker, SIGNAL(videoMode(VideoMode)), dispmanx, SLOT(setVideoMode(VideoMode)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_PROTOBUF
|
||||||
|
QObject::connect(dispmanx, SIGNAL(emitImage(int, const Image<ColorRgb>&, const int)), protoServer, SLOT(sendImageToProtoSlaves(int, const Image<ColorRgb>&, const int)) );
|
||||||
|
#endif
|
||||||
|
|
||||||
dispmanx->start();
|
dispmanx->start();
|
||||||
std::cout << "Frame grabber created and started" << std::endl;
|
std::cout << "Frame grabber created and started" << std::endl;
|
||||||
}
|
}
|
||||||
@ -341,6 +345,10 @@ int main(int argc, char** argv)
|
|||||||
QObject::connect(xbmcVideoChecker, SIGNAL(videoMode(VideoMode)), fbGrabber, SLOT(setVideoMode(VideoMode)));
|
QObject::connect(xbmcVideoChecker, SIGNAL(videoMode(VideoMode)), fbGrabber, SLOT(setVideoMode(VideoMode)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_PROTOBUF
|
||||||
|
QObject::connect(fbGrabber, SIGNAL(emitImage(int, const Image<ColorRgb>&, const int)), protoServer, SLOT(sendImageToProtoSlaves(int, const Image<ColorRgb>&, const int)) );
|
||||||
|
#endif
|
||||||
|
|
||||||
fbGrabber->start();
|
fbGrabber->start();
|
||||||
std::cout << "Framebuffer grabber created and started" << std::endl;
|
std::cout << "Framebuffer grabber created and started" << std::endl;
|
||||||
}
|
}
|
||||||
@ -376,6 +384,10 @@ int main(int argc, char** argv)
|
|||||||
QObject::connect(xbmcVideoChecker, SIGNAL(videoMode(VideoMode)), osxGrabber, SLOT(setVideoMode(VideoMode)));
|
QObject::connect(xbmcVideoChecker, SIGNAL(videoMode(VideoMode)), osxGrabber, SLOT(setVideoMode(VideoMode)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_PROTOBUF
|
||||||
|
QObject::connect(osxGrabber, SIGNAL(emitImage(int, const Image<ColorRgb>&, const int)), protoServer, SLOT(sendImageToProtoSlaves(int, const Image<ColorRgb>&, const int)) );
|
||||||
|
#endif
|
||||||
|
|
||||||
osxGrabber->start();
|
osxGrabber->start();
|
||||||
std::cout << "OSX grabber created and started" << std::endl;
|
std::cout << "OSX grabber created and started" << std::endl;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user