mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 15:02:43 +02:00
add skeleton for Raspberry Pi support
no audio / video decoding, yet :-(
Origin commit data
------------------
Branch: master
Commit: 92edef3e48
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-10-05 (Sat, 05 Oct 2013)
------------------
This commit was generated by Migit
This commit is contained in:
23
libtest.cpp
23
libtest.cpp
@@ -1,18 +1,39 @@
|
||||
/* minimal test program for libstb-hal
|
||||
* (C) 2012 Stefan Seyfried
|
||||
* (C) 2012-2013 Stefan Seyfried
|
||||
* License: GPL v2 or later
|
||||
*
|
||||
* this does just test the input converter thread for now...
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
#include <include/init_td.h>
|
||||
#if HAVE_GENERIC_HARDWARE
|
||||
#include <include/glfb.h>
|
||||
|
||||
extern GLFramebuffer *glfb;
|
||||
#define fb_pixel_t uint32_t
|
||||
#endif
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
init_td_api();
|
||||
#if HAVE_GENERIC_HARDWARE
|
||||
int available = glfb->getOSDBuffer()->size(); /* allocated in glfb constructor */
|
||||
fb_pixel_t *lfb = reinterpret_cast<fb_pixel_t*>(glfb->getOSDBuffer()->data());
|
||||
|
||||
int x = 0;
|
||||
#endif
|
||||
while (1) {
|
||||
#if HAVE_GENERIC_HARDWARE
|
||||
fb_pixel_t c = (0xff << (8 * x))|0xff000000;
|
||||
x++;
|
||||
if (x > 3) x = 0;
|
||||
for (int i = 0; i < available / 4; i++)
|
||||
*(lfb + i) = c;
|
||||
glfb->blit();
|
||||
#endif
|
||||
sleep(1);
|
||||
if (! access("/tmp/endtest", R_OK))
|
||||
{
|
||||
|
Reference in New Issue
Block a user