Skip to content

Commit 61c1277

Browse files
committed
Renamed 2 examples
1 parent fbd8ad3 commit 61c1277

File tree

3 files changed

+56
-5
lines changed

3 files changed

+56
-5
lines changed

docs/source/samples/Script/script_http_server.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ If you open this IP in the browser (eg. chrome), you will see this:
2020
.. image:: /_static/images/components/http_server.png
2121

2222
if you click on the :code:`here` href, you will get a static image. For video stream,
23-
you should check out :ref:`Script HTTP stream`.
23+
you should check out :ref:`Script MJPEG server`.
2424

2525
Setup
2626
#####
@@ -42,9 +42,9 @@ Source code
4242

4343
.. tab:: C++
4444

45-
Also `available on GitHub <https://github.com/luxonis/depthai-core/blob/main/examples/src/Script/script_http_server.cpp>`__
45+
Also `available on GitHub <https://github.com/luxonis/depthai-core/blob/main/examples/Script/script_http_server.cpp>`__
4646

47-
.. literalinclude:: ../../../../depthai-core/examples/src/Script/script_http_server.cpp
47+
.. literalinclude:: ../../../../depthai-core/examples/Script/script_http_server.cpp
4848
:language: cpp
4949
:linenos:
5050

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
Script MJPEG server
2+
===================
3+
4+
.. note::
5+
This example can only run on `OAK POE devices <https://docs.luxonis.com/projects/hardware/en/latest/#poe-designs>`__. You need **bootloader** on/above version **0.0.15**. You can flash bootloader by running :code:`python3 examples/bootloader/flash_bootloader.py`.
6+
7+
This demo runs an HTTP server on the device itself. Server will serve you MJPEG stream when you connect to it.
8+
9+
Demo
10+
####
11+
12+
When you run the demo, it will print something similar to
13+
14+
.. code-block:: bash
15+
16+
Serving at 192.168.1.193:8080
17+
18+
If you open this IP in the browser (eg. chrome), you will see this:
19+
20+
.. image:: /_static/images/components/http_server.png
21+
22+
if you click on the :code:`here` href, you will get the MJPEG video stream. For static image, you can check
23+
out :ref:`Script HTTP server`.
24+
25+
Setup
26+
#####
27+
28+
.. include:: /includes/install_from_pypi.rst
29+
30+
Source code
31+
###########
32+
33+
.. tabs::
34+
35+
.. tab:: Python
36+
37+
Also `available on GitHub <https://github.com/luxonis/depthai-python/blob/main/examples/Script/script_mjpeg_server.py>`__
38+
39+
.. literalinclude:: ../../../../examples/Script/script_mjpeg_server.py
40+
:language: python
41+
:linenos:
42+
43+
.. tab:: C++
44+
45+
Also `available on GitHub <https://github.com/luxonis/depthai-core/blob/main/examples/Script/script_mjpeg_server.cpp>`__
46+
47+
.. literalinclude:: ../../../../depthai-core/examples/Script/script_mjpeg_server.cpp
48+
:language: cpp
49+
:linenos:
50+
51+
.. include:: /includes/footer-short.rst

docs/source/tutorials/code_samples.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ Code samples are used for automated testing. They are also a great starting poin
105105
- :ref:`Script get local IP` - Get local IP of the device (only OAK-POE devices)
106106
- :ref:`Script HTTP client` - Send HTTP request to a server (only OAK-POE devices)
107107
- :ref:`Script HTTP server` - Serve still image over HTTP response (only OAK-POE devices)
108-
- :ref:`Script HTTP stream` - Serve MJPEG video stream over HTTP response (only OAK-POE devices)
109-
- :ref:`Script NNData Datatype` - Constructs :ref:`NNData` in Script node and sends it to the host
108+
- :ref:`Script MJPEG server` - Serve MJPEG video stream over HTTP response (only OAK-POE devices)
109+
- :ref:`Script NNData example` - Constructs :ref:`NNData` in Script node and sends it to the host
110110

111111
.. rubric:: SpatialDetection
112112

0 commit comments

Comments
 (0)