Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

OSD and images



Hi,

I would like to implement DVD subtitles on DVBs card
but I have problems with displaying images. Image larger
than 400x18 pixels hangs the driver. I tested with attached
software and driver version 0.05.
Any idea how to solve this problem?

Matjaz


#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "../DVB/driver/dvb_v4l.h"
#include "../DVB/libdvb/OSD.h"

int dev;
char bmp[720*574];

int main (int argc, char *argv[]){
  int i;

  for(i=0; i<720*574; i++)
    bmp[i]=(i/25)&3;

  dev = open("/dev/video", O_RDWR);

  OSDOpen(dev, 100, 300, 600, 500, 2, 0);
  OSDSetColor(dev, 0, 0, 0, 0, 255);
  OSDSetColor(dev, 1, 0, 255, 0, 255);
  OSDSetColor(dev, 2, 0, 0, 100, 255);
  OSDSetColor(dev, 3, 255, 0, 0, 255);
  OSDSetBlock(dev, 0, 0, 100, 20, 100, bmp);

  sleep(3);
  OSDClose(dev);
  sleep(2);

  OSDOpen(dev, 100, 300, 600, 500, 2, 0);
  OSDSetColor(dev, 0, 0, 0, 0, 255);
  OSDSetColor(dev, 1, 0, 255, 0, 255);
  OSDSetColor(dev, 2, 0, 0, 100, 255);
  OSDSetColor(dev, 3, 255, 0, 0, 255);
  OSDSetBlock(dev, 0, 0, 400, 160, 400, bmp);

  sleep(3);
  OSDClose(dev);

  close(dev);
  return 0;
}



Home | Main Index | Thread Index