This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

File Output equivalent to v4l2_usrptr_loopback?

I'm working with a legacy board that doesn't have a video output device, trying to get demo code working on it.

v4l2_usrptr_loopback appears to run, but there's no way to see the output.  None of the demos that I can find which write a file to the disk will run.

Is there a file-writing demo that uses the same capture and video code as v4l2_usrptr_loopback??

 

Thx

  • Tom Hanson said:
    None of the demos that I can find which write a file to the disk will run.

    What demos are you referring to, and how are they failing to run?

    Tom Hanson said:
    Is there a file-writing demo that uses the same capture and video code as v4l2_usrptr_loopback??

    I do not believe there is such a demo within the DVSDK/PSP installs, though it should not be hard to modify an example like you are using to write to a file instead, you should be able to just copy the data into a file using standard C i/o (i.e. fopen, fwrite, etc.)

  • Hi,

    You can use the V4l2 standard capture only example and you can just modify it to open a file and write the captured frames to it using standard C I/0 calls as already suggested by Bernie Thompson.

    This is the link to the example-

    http://v4l2spec.bytesex.org/spec/capture-example.html

    Thanks,

    Prathap.

  • Bernie Thompson said:

    None of the demos that I can find which write a file to the disk will run.

    What demos are you referring to, and how are they failing to run?

    [/quote]

    The SDK  "encode" app. and dvtb for example.  Unmodified they won't talk to the custom video driver.  Modified, they'll talk to it but aren't formatting the data correctly (blocks of color instead of images).  Neither of these is too suprising since it's custom hardware and potentially a custom driver.

    Since v4l2_usrptr_loopback runs with minimal changes, I'm hoping that it may be doing something different.

  • Thanks! Looks like I may have to go that route.

    Is the file created by your example playable by an app like mplayer?