Hello list,
I'm trying to write my next plugin.
But I don't succeed in displaying a still picture from within the
plugin.
I have been trying to do this:
uchar tempbuf[100000];
int n;
FILE *f;
f=fopen("test.mpg","r");
if (f!=NULL) {
n=fread(tempbuf,1,sizeof(tempbuf),f);
fclose(f);
if (n > 0) {
cDevice::PrimaryDevice()->DeviceStillPicture(tempbuf, n);
} else {
esyslog("Error when displaying background picture");
}
} else {
esyslog("Can't open test.mpg file");
}
But this doesn't work, I get at compile time:
menu.c:187: no matching function for call to
`cDevice::DeviceStillPicture (unsigned char[100000], int &)'
make[1]: *** [menu.o] Error 1
By digging in the ML archives, I saw that Jan Elkom and Daniel Sáez
Domingo succeeded in doing something like that (and probably Klaus :) )
Could you help me?
I used this function in my VCD and PCD plugins and it works nicely. You
can see it implemeted in the source files vcd_viewer.c and pcd_viewer.c