aboutsummaryrefslogtreecommitdiff
path: root/rtmpserver.h
diff options
context:
space:
mode:
authorMistivia <i@mistivia.com>2025-09-10 17:41:52 +0800
committerMistivia <i@mistivia.com>2025-09-10 17:41:52 +0800
commit8d089010b37ee193b2b8c809a4f317fa2b11a758 (patch)
treef2a671f9bcc8760983ab016d8d181f2630fe16a7 /rtmpserver.h
rtmp server
Diffstat (limited to 'rtmpserver.h')
-rw-r--r--rtmpserver.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/rtmpserver.h b/rtmpserver.h
new file mode 100644
index 0000000..cae56a5
--- /dev/null
+++ b/rtmpserver.h
@@ -0,0 +1,25 @@
+#ifndef RTMPSERVER_H_
+#define RTMPSERVER_H_
+
+#include <stdint.h>
+#include <stdlib.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct {
+ void (*on_start)(void *ctx);
+ void (*on_stop)(void *ctx);
+ void (*on_video)(void* ctx, int64_t timestamp, char *buf, size_t size);
+ void (*on_audio)(void* ctx, int64_t timestamp, char *buf, size_t size);
+} RtmpCallbacks;
+
+void start_rtmpserver(RtmpCallbacks cbs, void *ctx);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif \ No newline at end of file