This commit is contained in:
Kamil Trzcinski 2022-04-08 14:24:51 +02:00
parent 740bbba104
commit 45724981ad
2 changed files with 17 additions and 1 deletions

View File

@ -17,7 +17,7 @@
<br>
<li>
<a href="stream"><b>/stream</b></a><br>
Get a live stream. Query params:<br>
Get a live stream.<br>
</li>
<br>
<li>
@ -29,7 +29,19 @@
<li><a href="?action=stream">/?action=stream</a> as alias to the <a href="stream">/stream</a>.</li>
</ul>
</li>
<br>
<li>
<a href="video"><b>/video</b></a><br>
Get a live video (H264) stream.<br>
<br>
<ul>
<li><a href="video.mp4"><b>/video.mp4</b></a><br> get a live video stream in MP4 format (if FFMPEG enabled).</li>
<br>
<li><a href="video.mkv"><b>/video.mp4</b></a><br> get a live video stream in MKV format (if FFMPEG enabled).</li>
</ul>
</li>
</ul>
<br>
<hr>
</body>
</html>

View File

@ -26,6 +26,10 @@ static void http_write_response(
void http_content(http_worker_t *worker, FILE *stream)
{
if (worker->current_method) {
if (worker->current_method->content_lengthp) {
worker->current_method->content_length = *worker->current_method->content_lengthp;
}
http_write_response(stream,
NULL,
worker->current_method->content_type,