zephyr/samples/subsys/video/capture
Gerard Marull-Paretas c7b5b3c419 samples: migrate includes to contain <zephyr/...> prefix
In order to bring consistency in-tree, migrate all samples to the use
the new prefix <zephyr/...>. Note that the conversion has been scripted:

```python
from pathlib import Path
import re

EXTENSIONS = ("c", "h", "cpp", "rst")

for p in Path(".").glob("samples/**/*"):
    if not p.is_file() or p.suffix and p.suffix[1:] not in EXTENSIONS:
        continue

    content = ""
    with open(p) as f:
        for line in f:
            m = re.match(r"^(.*)#include <(.*)>(.*)$", line)
            if (m and
                not m.group(2).startswith("zephyr/") and
                (Path(".") / "include" / "zephyr" / m.group(2)).exists()):
                content += (
                    m.group(1) +
                    "#include <zephyr/" + m.group(2) +">" +
                    m.group(3) + "\n"
                )
            else:
                content += line

    with open(p, "w") as f:
        f.write(content)
```

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 11:29:59 +02:00
..
boards
src
CMakeLists.txt
README.rst
prj.conf
sample.yaml

README.rst

.. _video_capture-sample:

Video Capture
#############

Description
***********

This sample application uses the Video API to retrieve video frames from the
video capture device, writes a frame count message to the console, and then
discards the video frame data.

Requirements
************

This sample requires a video capture device (e.g. a camera).

- :ref:`mimxrt1064_evk`
- `MT9M114 camera module`_

Wiring
******

On :ref:`mimxrt1064_evk`, The MT9M114 camera module should be plugged in the
J35 camera connector. A USB cable should be connected from a host to the micro
USB debug connector (J41) in order to get console output via the freelink
interface.

Building and Running
********************

For :ref:`mimxrt1064_evk`, build this sample application with the following commands:

.. zephyr-app-commands::
   :zephyr-app: samples/video/mt9m114
   :board: mimxrt1064_evk
   :goals: build
   :compact:

Sample Output
=============

.. code-block:: console

    Found video device: CSI
    width (640,640), height (480,480)
    Supported pixelformats (fourcc):
     - RGBP
    Use default format (640x480)
    Capture started
    Got frame 743! size: 614400; timestamp 100740 ms
    Got frame 744! size: 614400; timestamp 100875 ms
    Got frame 745! size: 614400; timestamp 101010 ms
    Got frame 746! size: 614400; timestamp 101146 ms
    Got frame 747! size: 614400; timestamp 101281 ms
    Got frame 748! size: 614400; timestamp 101416 ms

   <repeats endlessly>

References
**********

.. _MT9M114 camera module: https://www.onsemi.com/PowerSolutions/product.do?id=MT9M114