RE: Output jpeg-frames on DC10+

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



Hello Ronald!

Sorry fo bothering you again with this question, I just can't get it to work... :((

You pointed me to the API description, the only documentation I've found however is 
/usr/linux/Documentation/video4linux/API.html
which doesn't help me much :(

Well, if anyone has time, please help me out with this (getting a bit frustrated here.. :)

The problem is that I want to output a still jpeg image on the video out device. (In the end I want to update 
that image regulary, but as I can't even get the first one right, I'll start there.)

What I get now, is a rolling screen on the tv, you can however (with a litte bit of imagination) see the actual picture behind the noise and rolling. (big breakthrough, yeehaw ;)

Any help appreciated!

I've included my source files, and the sample picture with this email.

sincerely
Markus Nilsson (Student at Lund Institute of Technology)

-----Original Message-----
From: Ronald Bultje [mailto:rbultje@xxxxxxxxxxxxxxxxxxx]
Sent: den 23 januari 2003 16:41
To: video4linux-list@xxxxxxxxxx
Subject: Re: Output jpeg-frames on DC10+


Hey Markus,

On Thu, 2003-01-23 at 09:51, Markus Nilsson wrote:
> 	//Store params
> 	bp.norm = 0; //PAL
> 	bp.quality = 100;
>     	bp.field_per_buff = 1;
>    	bp.img_width = 352;
> 	bp.img_height = 240;
> 	if (ioctl(vid_fd, MJPIOC_S_PARAMS, &bp) < 0) {
> 		cout << "***Error setting video parameters" << endl << "::" << strerror(errno) << endl;
>     	}

That's wrong. You need to set the width/height of the *unscaled* frame,
so 704/240 (field height!), and then use HorDcm/VerDcm/TmpDcm to scale
the frame to full size or double field/frame, in this case
bp.decimation=0 (which means 'manual' instead of 'auto'), bp.HorDcm=2,
bp.VerDcm=1, bp.TmpDcm=2  (see the API description provided in the
kernel package).

> 	/* REQBUFS */
> 	if(ioctl(vid_fd, MJPIOC_REQBUFS, &vm)<0) {
> 		cout << "***Error requesting buffers" << endl << "::" << strerror(errno) << endl;
> 	}
> 	/* mmap */
> 	vm.frames = 5;
> 	vm.size = 352*240*3*5; 

First set the vm.count and vm.size, then request buffers, you're doing
it the other way around. Your vm.size is a bit large, by the way (128k
is enough for this size), and vm.size is the size *per buffer*, not the
total size (again, see the API description provided in the kernel
package).

> void PS_VideoDriver::update() {

Looks good to me. :-).

Ronald

-- 
Ronald Bultje <rbultje@xxxxxxxxxxxxxxxxxxx>
Linux Video/Multimedia developer



--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/video4linux-list

Attachment: VideoDebug.cpp
Description: Binary data

Attachment: VideoDebug.h
Description: Binary data

Attachment: sample.jpg
Description: JPEG image


[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux