Set Frequency Problem
Hello all,
it's first time I write to this mailing list, so I'm sorry if this problem has been already discussed. I'm writing an application in java tha use v4l2 through JNI layer (but I have the same problem in a C test program)
When I call the VIDIOC_S_FREQUENCY the driver change the frequency, but the video signal is 0 (according to the VIDIOC_G_TUNER) and the image is black. I've to call some times the VIDIOC_S_FREQUENCY to get the signal on
The driver I'm using is the SAA7130.
Any ideas?
Just another question: at this time I'm working with userpointer and read method to grab the images, but probably I will must use the video overlay. I've tried to start the overlay following the v4l documentation, but it doesn't work. I suspect that I must use the Xorg library to get some information (such as the frame buffer address). Could someone show me the way?
Thanks in advance
Signature · 16 lines
Pillar Engineering di Sanfelici Claudio Via Monza, 53 20063 Cernusco sul Naviglio - MI P.Iva 05403820961 C.F. SNFCDP81D28C523E Tel. 02.99.76.55.69 Fax. 02.99.76.55.70 Cell. +39 333.14.27.805 E-Mail [email protected] Sito: www.pillar.it -- video4linux-list mailing list Unsubscribe mailto:[email protected]?subject=unsubscribe https://www.redhat.com/mailman/listinfo/video4linux-list
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
(I forgot to cc' the list)
---------- Forwarded message ----------
From: Sanfelici Claudio <[email protected]>
Date: Mon, 22 Mar 2010 18:32:03 +0100
Subject: Re: Set Frequency Problem
To: Adrian Pardini <[email protected]>
Yes, I set the input during initialization time. The set frequency sometimes works correctly and I can see the images. Normally, the first set works and I can see the images; than i call the set frequency and (sometimes) the signal goes 0. In this moment to continue with other tests, I've put the set frequency ioctl in a do/while loop that continue to call the set frequency untill the signal goes >0
Of course, with other programs the card works
Thank you !
Pillar Engineering
di Sanfelici Claudio
Via Monza, 53
20063 Cernusco sul Naviglio - MI
P.Iva 05403820961
C.F. SNFCDP81D28C523E
Tel. 02.99.76.55.69
Fax. 02.99.76.55.70
Cell. +39 333.14.27.805
E-Mail [email protected]
Sito: www.pillar.it
Adrian Pardini ha scritto:
Quoted 17 lines · Sanfelici Claudio
[...]
Quoted 6 lines
When I call the
VIDIOC_S_FREQUENCYthe driver change the frequency, but the video signal is 0 (according to theVIDIOC_G_TUNER) and the image is black. I've to call some times theVIDIOC_S_FREQUENCYto get the signal onHi, is the right input selected? Does the card work with other programs, like xawtv?
cheers
Signature · 8 lines
Adrian. http://elesquinazotango.com.ar http://www.noalcodigodescioli.blogspot.com/ -- video4linux-list mailing list Unsubscribe mailto:[email protected]?subject=unsubscribe https://www.redhat.com/mailman/listinfo/video4linux-list
Quoted 10 lines · Sanfelici Claudio
Yes, I set the input during initialization time. The set frequency sometimes works correctly and I can see the images. Normally, the first set works and I can see the images; than i call the set frequency and (sometimes) the signal goes 0. In this moment to continue with other tests, I've put the set frequency ioctl in a do/while loop that continue to call the set frequency untill the signal goes >0
Of course, with other programs the card works
Thank you !
Well, thats a good sign. Could you share with us the relevant C code and more info about the card?
Quoted 19 lines
Adrian Pardini ha scritto:
Quoted 18 lines · Sanfelici Claudio
[...]
Quoted 7 lines
When I call the
VIDIOC_S_FREQUENCYthe driver change the frequency, but the video signal is 0 (according to theVIDIOC_G_TUNER) and the image is black. I've to call some times theVIDIOC_S_FREQUENCYto get the signal onHi, is the right input selected? Does the card work with other programs, like xawtv?
cheers
Signature · 8 lines
Adrian. http://elesquinazotango.com.ar http://www.noalcodigodescioli.blogspot.com/ -- video4linux-list mailing list Unsubscribe mailto:[email protected]?subject=unsubscribe https://www.redhat.com/mailman/listinfo/video4linux-list
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
Quoted 7 lines · Sanfelici Claudio
Hi !
I was writing the C code for you and... I've solved the problem. In the Video for Linux two Api Specification, in the VIDIOC_G/S_INPUT section you can read:
"It is ggod pratice to select an input before querying or negotiating any other parameters."
Quoted 5 lines
So, if I call
VIODIOC_S_INPUTeverytime before call theVIDIOC_S_FREQUENCYit works!Has it sense?
Not for me. (N.B i'm no expert in v4l). Looking at xawtv sources (file libng/plugins/drv0-v4l2.c) it does the following:
---
static voidv4l2_setfreq(void *handle, unsigned long freq)
{
struct v4l2_handle *h = handle;
struct v4l2_frequency f;
if (ng_debug)
fprintf(stderr,"v4l2: freq: %.3f\n",(float)freq/16);
memset(&f,0,sizeof(f));
f.type = V4L2_TUNER_ANALOG_TV;
f.frequency = freq;
xioctl(h->fd, VIDIOC_S_FREQUENCY, &f, 0);
}---
I think you are missing something or your driver is somehow broken, but a lot of cheap (and not so) cards have an saa7130/7134 and work fine.
Quoted 1 line
Thank you !
You are welcome just keep in mind that this list is deprecated, most of the people is at [email protected]
Quoted 1 line
P.S. about my second question? the way to start video overlay?
i have no clue. The best advice I can give you is to grab the sources of some app (xawvt is a good starting point) and see how it works. Isn't free software wonderful?
Signature · 8 lines
Adrian. http://elesquinazotango.com.ar http://www.noalcodigodescioli.blogspot.com/ -- video4linux-list mailing list Unsubscribe mailto:[email protected]?subject=unsubscribe https://www.redhat.com/mailman/listinfo/video4linux-list