zephyr/samples/subsys/video/tcpserversink
Gerard Marull-Paretas 79e6b0e0f6 includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h>
As of today <zephyr/zephyr.h> is 100% equivalent to <zephyr/kernel.h>.
This patch proposes to then include <zephyr/kernel.h> instead of
<zephyr/zephyr.h> since it is more clear that you are including the
Kernel APIs and (probably) nothing else. <zephyr/zephyr.h> sounds like a
catch-all header that may be confusing. Most applications need to
include a bunch of other things to compile, e.g. driver headers or
subsystem headers like BT, logging, etc.

The idea of a catch-all header in Zephyr is probably not feasible
anyway. Reason is that Zephyr is not a library, like it could be for
example `libpython`. Zephyr provides many utilities nowadays: a kernel,
drivers, subsystems, etc and things will likely grow. A catch-all header
would be massive, difficult to keep up-to-date. It is also likely that
an application will only build a small subset. Note that subsystem-level
headers may use a catch-all approach to make things easier, though.

NOTE: This patch is **NOT** removing the header, just removing its usage
in-tree. I'd advocate for its deprecation (add a #warning on it), but I
understand many people will have concerns.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-05 16:31:47 +02:00
..
src includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
CMakeLists.txt
README.rst
prj.conf
sample.yaml

README.rst

.. _video_tcpserversink-sample:

VIDEO TCP SERVER SINK
#####################

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

This sample application gets frames from video capture device and sends
them over the network to the connected TCP client.

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

This samples requires a video capture device and network support.

- :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. Ethernet cable must be connected to RJ45 connector.

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

    Video device detected, format: RGBP 640x480
    TCP: Waiting for client...

Then from a peer on the same network you can connect and grab frames.

Example with gstreamer:

.. code-block:: console

    gst-launch-1.0 tcpclientsrc host=192.0.2.1 port=5000 \
        ! videoparse format=rgb16 width=640 height=480 \
        ! queue \
	! videoconvert \
        ! fpsdisplaysink sync=false


References
**********

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