Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] displaying image on the dvb card
- To: linux-dvb <linux-dvb@linuxtv.org>
- Subject: [linux-dvb] displaying image on the dvb card
- From: Alessio Sangalli <alesan@manoweb.com>
- Date: Mon, 15 Apr 2002 13:10:28 +0200
- Content-Transfer-Encoding: 7bit
- Content-Type: text/plain; charset=us-ascii; format=flowed
- Delivered-To: mhonarc@limes.convergence.de
- Sender: linux-dvb-bounce@linuxtv.org
- User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020313
Hi, I'm trying to display an image on the DVB card, I've read a thread
on the linux-dvb mailing list:
http://linuxtv.org/mailinglists/linux-dvb/2001/03-2001/msg00445.html
However, I only get a black screen...
I take my image, I resize it with 'display' to 352x288;
then I encode it with:
convert test.jpg test.mpeg
(convert uses mpeg2encode from mpeg.org)
This creates a file of about 10KB in size. Then I give this file to a
program very similar to the one written by Marcus on the mailing list
(see below)...
I tried many times, but I alway get than black screen. Do you have any
advice?
bye, thank you
as
The program listing:
#include <stdlib.h>
#include <linux/videodev.h>
#include <ost/dmx.h>
#include <ost/sec.h>
#include <ost/frontend.h>
#include <ost/video.h>
#include <ost/audio.h>
#include <ost/osd.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
int main(int argc, char **argv)
{
int filefd;
struct stat st;
struct videoDisplayStillPicture sp;
int fd;
int ans;
if (argc < 2) return -1;
if ( (filefd = open(argv[1], O_RDONLY)) < 0)
{
perror("File open:");
return 1;
}
if((fd = open("/dev/ost/video", O_RDWR|O_NONBLOCK)) < 0){
perror("VIDEO DEVICE: ");
return -1;
}
fstat(filefd, &st);
sp.iFrame = (char *) malloc(st.st_size);
sp.size = st.st_size;
printf("I-frame size: %d\n", sp.size);
printf("read: %d bytes\n", read(filefd,sp.iFrame,sp.size));
if ((ans = ioctl(fd, VIDEO_STILLPICTURE, sp)) < 0)
{
perror("VIDEO STILLPICTURE: ");
return 1;
}
sleep(3);
}
and I compile this with:
g++ -I/usr/src/DVB/ost/include/ test.c
bye thank you
as
--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.
Home |
Main Index |
Thread Index