cmd: add /status.json
to describe what and how it works
This commit is contained in:
@ -244,6 +244,7 @@ extern "C" int rtsp_server(rtsp_options_t *options)
|
||||
buffer_lock_register_notify_buffer(&video_lock, rtsp_h264_capture);
|
||||
|
||||
pthread_create(&rtsp_thread, NULL, rtsp_server_thread, env);
|
||||
options->running = true;
|
||||
return 0;
|
||||
|
||||
error:
|
||||
|
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
typedef struct rtsp_options_s {
|
||||
bool running;
|
||||
uint port;
|
||||
} rtsp_options_t;
|
||||
|
||||
|
@ -5,6 +5,11 @@ extern "C" {
|
||||
#include "device/buffer_lock.h"
|
||||
#include "device/device.h"
|
||||
#include "output/output.h"
|
||||
#include "util/http/http.h"
|
||||
#include "util/opts/log.h"
|
||||
#include "util/opts/fourcc.h"
|
||||
#include "util/opts/control.h"
|
||||
#include "device/buffer.h"
|
||||
};
|
||||
|
||||
#ifdef USE_LIBDATACHANNEL
|
||||
@ -381,10 +386,12 @@ extern "C" void http_webrtc_offer(http_worker_t *worker, FILE *stream)
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" void webrtc_server()
|
||||
extern "C" int webrtc_server(webrtc_options_t *options)
|
||||
{
|
||||
buffer_lock_register_check_streaming(&video_lock, webrtc_h264_needs_buffer);
|
||||
buffer_lock_register_notify_buffer(&video_lock, webrtc_h264_capture);
|
||||
options->running = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else // USE_LIBDATACHANNEL
|
||||
@ -394,8 +401,9 @@ extern "C" void http_webrtc_offer(http_worker_t *worker, FILE *stream)
|
||||
http_404(stream, NULL);
|
||||
}
|
||||
|
||||
extern "C" void webrtc_server()
|
||||
extern "C" int webrtc_server(webrtc_options_t *options)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif // USE_LIBDATACHANNEL
|
||||
|
@ -1,11 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "util/http/http.h"
|
||||
#include "util/opts/log.h"
|
||||
#include "util/opts/fourcc.h"
|
||||
#include "util/opts/control.h"
|
||||
#include "device/buffer.h"
|
||||
#include <stdio.h>
|
||||
|
||||
typedef struct http_worker_s http_worker_t;
|
||||
|
||||
typedef struct webrtc_options_s {
|
||||
bool running;
|
||||
bool disabled;
|
||||
} webrtc_options_t;
|
||||
|
||||
// WebRTC
|
||||
void http_webrtc_offer(http_worker_t *worker, FILE *stream);
|
||||
void webrtc_server();
|
||||
int webrtc_server(webrtc_options_t *options);
|
||||
|
Reference in New Issue
Block a user