How Do I use the V4L2 interface for video output?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How Do I use the V4L2 interface for video output?

Jump to solution
3,819 Views
Philip_FSL
Contributor IV

One of the best sources of information and example source code for using the V4L2 interface in the Linux BSP are the unit tests provided by Freescale.  This code provides a concise example of how to accomplish basic functionalities which can be used a building blocks for your more complex use cases. The unit test source code can be accessed using the following ltib command:

./ltib -m prep -p imx-test

Afterward, the source code will be located in your ltib project directory in the following location:

<ltib install dir>/rpm/BUILD/imx-test-<version>/

This source code contains a wealth of information that hopefully will help you shorten the time it takes to get up and running with these sometimes complicated APIs.

Labels (1)
1 Solution
1,809 Views
Philip_FSL
Contributor IV

Yes.  Getting the source is the same process as before.  Using LTIB perform the following: ./ltib -m prep imx-test .  This will unpack the sources in the rpm/BUILD/ directory of your LTIB project.

View solution in original post

0 Kudos
7 Replies
1,809 Views
Philip_FSL
Contributor IV

For the fb test, you just need to have the framebuffer driver in the system.  For ipudev, libipu is necessary.

GStreamer does not require X Windows.  You can directly use the ipulib sink or the v4l2 sink plug-in for rendering video in a non-X environment.

0 Kudos
1,809 Views
fcs
Contributor IV

Does Freescale provide the source code for imx-test anymore? I finally found it here. Is there an official version?

https://community.freescale.com/thread/288297

0 Kudos
1,810 Views
Philip_FSL
Contributor IV

Yes.  Getting the source is the same process as before.  Using LTIB perform the following: ./ltib -m prep imx-test .  This will unpack the sources in the rpm/BUILD/ directory of your LTIB project.

0 Kudos
1,809 Views
fcs
Contributor IV

I couldn't find the source code for the unit tests anywhere in any package, is it in imx-test-11.09.01-1.arm.rpm?

$ ./ltib -m prep imx-test

The options prep, scbuild, scinstall and scdeploy are only allowed when working

on a single package, not a list.  You need to supply the option -p|--pkg <pkg>

$ ./ltib -p imx-test

Processing platform: Freescale iMX5x Based Boards
===================================================
using config/platform/imx/.config

Processing: imx-test
======================

Started: Tue Oct 16 23:23:24 2012
Ended:   Tue Oct 16 23:23:27 2012
Elapsed: 3 seconds

Build Succeeded

lucid@ubuntu:~/Desktop/B/ltib$ find . |grep imx-test
./rpm/BUILD/linux-2.6.35.3/patches/0247-ENGR00131944-Fix-imx-test-build-failure-issue-on-mx2.patch
./rpm/RPMS/arm/imx-test-11.09.01-1.arm.rpm
./dist/lfs-5.1/mxc-misc/imx-test.spec

0 Kudos
1,809 Views
Philip_FSL
Contributor IV

Sorry about that.  There is a command line option missing: ./ltib -m prep -p imx-test

1,809 Views
fcs
Contributor IV

Thanks, that works. I hadn't seen any documentation for that

0 Kudos
1,809 Views
sidebranch
Contributor II

Thank you, indeed these might be useful building blocks.

What are the prerequisites for the graphics related test tools?

imx-test-11.09.01/test/mxc_fb_test/

imx-test-11.09.01/test/mxc_ipudev_test/

I am building the software from scratch, not running the supplied image, and would like to learn what I need to bring up in order to run these tests.

Same question for the Freescale supplied GStreamer components; do these require the X Windows to be up and running on the target?

0 Kudos