1.. zephyr:code-sample:: video-tcpserversink 2 :name: Video TCP server sink 3 :relevant-api: video_interface bsd_sockets 4 5 Capture video frames and send them over the network to a TCP client. 6 7Description 8*********** 9 10This sample application gets frames from a video capture device and sends 11them over the network to the connected TCP client. 12 13Requirements 14************ 15 16This samples requires a video capture device and network support. 17 18- :zephyr:board:`mimxrt1064_evk` 19- `MT9M114 camera module`_ 20 21Wiring 22****** 23 24On :zephyr:board:`mimxrt1064_evk`, The MT9M114 camera module should be plugged in the 25J35 camera connector. A USB cable should be connected from a host to the micro 26USB debug connector (J41) in order to get console output via the freelink 27interface. Ethernet cable must be connected to RJ45 connector. 28 29Building and Running 30******************** 31 32For :zephyr:board:`mimxrt1064_evk`, the sample can be built with the following command. 33If a mt9m114 camera shield is missing, video software generator will be used instead. 34 35.. zephyr-app-commands:: 36 :zephyr-app: samples/drivers/video/tcpserversink 37 :board: mimxrt1064_evk 38 :shield: dvp_fpc24_mt9m114 39 :goals: build 40 :compact: 41 42For testing purpose and without the need of any real video capture hardware, 43a video software pattern generator is supported by using :ref:`snippet-video-sw-generator`: 44 45.. zephyr-app-commands:: 46 :zephyr-app: samples/drivers/video/capture 47 :board: native_sim/native/64 48 :snippets: video-sw-generator 49 :goals: build 50 :compact: 51 52Sample Output 53============= 54 55.. code-block:: console 56 57 Video device detected, format: RGBP 480x272 58 TCP: Waiting for client... 59 60Then from a peer on the same network you can connect and grab frames. 61 62Example with gstreamer: 63 64.. code-block:: console 65 66 gst-launch-1.0 tcpclientsrc host=192.0.2.1 port=5000 \ 67 ! videoparse format=rgb16 width=480 height=272 \ 68 ! queue \ 69 ! videoconvert \ 70 ! fpsdisplaysink sync=false 71 72For video software generator, the default resolution should be width=320 and height=160. 73 74References 75********** 76 77.. target-notes:: 78 79.. _MT9M114 camera module: https://www.onsemi.com/PowerSolutions/product.do?id=MT9M114 80