mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-18 19:31:02 +00:00
Add RTSP example
This commit is contained in:
1 parent
1bb85799ce
commit
63318a7e48
7 files changed
+2198
No files matched your search
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) 2026 Cesanta Software Limited
|
||||
// All rights reserved
|
||||
|
||||
#include "mongoose.h"
|
||||
|
||||
int main(void) {
|
||||
struct mg_mgr mgr;
|
||||
|
||||
struct mg_rtsp_opts opts = {
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
mg_rtsp_get_mp4_frame,
|
||||
(void *) "test.mp4",
|
||||
mg_rtsp_get_mp4_audio,
|
||||
(void *) "test.mp4",
|
||||
{0x12, 0x10},
|
||||
};
|
||||
|
||||
mg_mgr_init(&mgr);
|
||||
mg_rtsp_listen(&mgr, "rtsp://0.0.0.0:8554/cam", &opts);
|
||||
|
||||
while (true) {
|
||||
mg_mgr_poll(&mgr, 10);
|
||||
}
|
||||
mg_mgr_free(&mgr);
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user