mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-27 07:23:11 +02:00
libeplayer3: sync with tdt git commit fed2a419dc
This commit is contained in:
@@ -74,14 +74,14 @@ void framebuffer_init()
|
||||
|
||||
fd = open("/dev/fb0", O_RDWR);
|
||||
|
||||
if (fd < 0)
|
||||
{
|
||||
if (fd < 0)
|
||||
{
|
||||
perror("/dev/fb0");
|
||||
return;
|
||||
}
|
||||
|
||||
if (ioctl(fd, FBIOGET_VSCREENINFO, &screeninfo) < 0)
|
||||
{
|
||||
if (ioctl(fd, FBIOGET_VSCREENINFO, &screeninfo) < 0)
|
||||
{
|
||||
perror("FBIOGET_VSCREENINFO");
|
||||
return;
|
||||
}
|
||||
@@ -90,7 +90,7 @@ void framebuffer_init()
|
||||
|
||||
ioctl(fd, FBIOGET_VSCREENINFO, &screeninfo);
|
||||
|
||||
printf("mode %d, %d, %d\n", screeninfo.xres, screeninfo.yres, screeninfo.bits_per_pixel);
|
||||
printf("mode %d, %d, %d\n", screeninfo.xres, screeninfo.yres, screeninfo.bits_per_pixel);
|
||||
|
||||
if (ioctl(fd, FBIOGET_FSCREENINFO, &fix)<0)
|
||||
{
|
||||
@@ -98,21 +98,21 @@ void framebuffer_init()
|
||||
printf("fb failed\n");
|
||||
}
|
||||
|
||||
stride = fix.line_length;
|
||||
stride = fix.line_length;
|
||||
xRes = screeninfo.xres;
|
||||
yRes = screeninfo.yres;
|
||||
bpp = screeninfo.bits_per_pixel;
|
||||
|
||||
printf("stride = %d, width %d\n", stride, xRes);
|
||||
printf("stride = %d, width %d\n", stride, xRes);
|
||||
|
||||
available = fix.smem_len;
|
||||
|
||||
printf("%dk video mem\n", available/1024);
|
||||
|
||||
lfb = (unsigned char*) mmap(0, available, PROT_WRITE|PROT_READ, MAP_SHARED, fd, 0);
|
||||
|
||||
if (lfb == NULL)
|
||||
{
|
||||
printf("%dk video mem\n", available/1024);
|
||||
|
||||
lfb = (unsigned char*) mmap(0, available, PROT_WRITE|PROT_READ, MAP_SHARED, fd, 0);
|
||||
|
||||
if (lfb == NULL)
|
||||
{
|
||||
perror("mmap");
|
||||
return;
|
||||
}
|
||||
@@ -146,7 +146,7 @@ int main(int argc,char* argv[]) {
|
||||
{
|
||||
showInfos = 1;
|
||||
}
|
||||
|
||||
|
||||
if(argc == 3 && !strcmp(argv[2], "-n"))
|
||||
noinput = 1;
|
||||
|
||||
@@ -173,7 +173,7 @@ int main(int argc,char* argv[]) {
|
||||
out.destination = lfb;
|
||||
out.destStride = stride;
|
||||
out.shareFramebuffer = 1;
|
||||
|
||||
|
||||
player->output->subtitle->Command(player, (OutputCmd_t)OUTPUT_SET_SUBTITLE_OUTPUT, (void*) &out);
|
||||
|
||||
if(player->playback->Command(player, PLAYBACK_OPEN, file) < 0)
|
||||
@@ -299,19 +299,19 @@ int main(int argc,char* argv[]) {
|
||||
}*/
|
||||
|
||||
while(player->playback->isPlaying) {
|
||||
int Key = 0;
|
||||
int Key = 0;
|
||||
|
||||
if(kbhit())
|
||||
if(noinput == 0)
|
||||
Key = getchar();
|
||||
|
||||
if(kbhit())
|
||||
if(noinput == 0)
|
||||
Key = getchar();
|
||||
|
||||
if(!player->playback->isPlaying) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if(Key == 0)
|
||||
continue;
|
||||
|
||||
continue;
|
||||
|
||||
switch (Key) {
|
||||
case 'a': {
|
||||
int Key2 = getchar();
|
||||
@@ -415,10 +415,10 @@ int main(int argc,char* argv[]) {
|
||||
break;
|
||||
|
||||
case 'f': {
|
||||
|
||||
|
||||
if (speed < 0)
|
||||
speed = 0;
|
||||
|
||||
|
||||
speed++;
|
||||
|
||||
if (speed > 7)
|
||||
@@ -434,7 +434,7 @@ int main(int argc,char* argv[]) {
|
||||
case 6: speedmap = 63; break;
|
||||
case 7: speedmap = 127; break;
|
||||
}
|
||||
|
||||
|
||||
player->playback->Command(player, PLAYBACK_FASTFORWARD, &speedmap);
|
||||
break;
|
||||
}
|
||||
@@ -442,9 +442,9 @@ int main(int argc,char* argv[]) {
|
||||
case 'b': {
|
||||
if (speed > 0)
|
||||
speed = 0;
|
||||
|
||||
|
||||
speed--;
|
||||
|
||||
|
||||
if (speed < -7)
|
||||
speed = -1;
|
||||
|
||||
@@ -464,14 +464,14 @@ int main(int argc,char* argv[]) {
|
||||
}
|
||||
#if defined(VDR1722)
|
||||
case 'g': {
|
||||
char gotoString [256];
|
||||
gets (gotoString);
|
||||
char gotoString [256];
|
||||
gets (gotoString);
|
||||
int gotoPos = atoi(gotoString);
|
||||
|
||||
double length = 0;
|
||||
float sec;
|
||||
double length = 0;
|
||||
float sec;
|
||||
|
||||
printf("gotoPos %i\n", gotoPos);
|
||||
printf("gotoPos %i\n", gotoPos);
|
||||
if (player->container && player->container->selectedContainer)
|
||||
player->container->selectedContainer->Command(player, CONTAINER_LENGTH, &length);
|
||||
|
||||
|
Reference in New Issue
Block a user