Add WebRTC support using libdatachannel

The WebRTC is exposed via `/video.html` endpoint
and enabled by default as long as h264 stream
is available.
This commit is contained in:
Kamil Trzcinski
2022-08-31 19:04:54 +02:00
parent ff81088824
commit 5ee0bee59f
19 changed files with 644 additions and 87 deletions

View File

@ -3,7 +3,7 @@
#include "http.h"
static void http_write_response(
void http_write_response(
FILE *stream,
const char *status,
const char *content_type,
@ -46,6 +46,11 @@ void http_200(FILE *stream, const char *data)
http_write_response(stream, "200 OK", NULL, data ? data : "Nothing here.\n", 0);
}
void http_400(FILE *stream, const char *data)
{
http_write_response(stream, "400 Bad Request", NULL, data ? data : "Nothing here.\n", 0);
}
void http_404(FILE *stream, const char *data)
{
http_write_response(stream, "404 Not Found", NULL, data ? data : "Nothing here.\n", 0);