Programming V4l2. Problems when setting the frequency of the tuner

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



    Hi.
 
    I'm developing an aplication for image recognizing under linux with v4l2. My program starts very good, everything goes right. I detect the device, get and set the correct properties (at least i think so) but when i try to tune the tuner (um.) with VIDIOC_S_FREQUENCY, it doesn't work.
    VIDIOC_G_FREQUENCY doesn't work either.
 
    Previously i have made:
 
        - Opened the device "/dev/video0" with open
           
        - Query capabilities of the device VIDIOC_QUERYCAP
            - supports capture
            - supports read (this is what i am going to use)
 
        - Query the type of input VIDIOC_G_INPUT
            - there are one tuner and 2 camera inputs.
            - the current input is the tuner but for security...
        - Selected the tuner input VIDIOC_S_INPUT
       
        - Query the format of the capture VIDIOC_G_FMT setting the type field to V4L2_BUF_TYPE_CAPTURE
        - Set the new format of the capture VIDIOC_S_FMT
            - Modifying the result previously got.
        - Query again the format (and it goes right)
 
        - Query the standard VIDIOC_G_STD
            -PAL
        - Query the current tuner VIDIOC_G_TUNER
            - Tuner with standar pal but the frequencies are 0 and -1 (tuner.rangelow, tuner.rangehigh)
 
...and then...
 
        - Query the frequency of the tuner VIDIOC_G_FREQUENCY (with the struct v4l2_frequency to zero)
            The end.
 
        I can't make VIDIOC_S_FREQUENCY.
 
        Have i jumped any step in the way?
        Is there any mistake?
 
        I have read the sample programs but no one uses the tuner.
        I have tried to read xawtv but i lose myself in so much code. What i need is a simple program that tunes one channel, capture the image with read() and thats all. I don't need sound.
 
        Is there any tutorial anywhere?
        and the simple program?
 
        Thanks.
 
pd:
    Sorry for my english. I have been 6 years without practising it, and 6 years ago i was very bad too. :)
 

[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