diff options
| author | Mistivia <i@mistivia.com> | 2025-12-20 05:09:26 +0800 |
|---|---|---|
| committer | Mistivia <i@mistivia.com> | 2025-12-20 05:25:07 +0800 |
| commit | 038c58b0ac053dbfe8aea3faab73863000d5fdc9 (patch) | |
| tree | 5a7e477a5f75d76be7adc9dcaab82347bac82ae7 /srtserver.h | |
| parent | bb725cc3802b42992666e18d0758459e4332cdd7 (diff) | |
use srt instead of rtmp
Diffstat (limited to 'srtserver.h')
| -rw-r--r-- | srtserver.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/srtserver.h b/srtserver.h new file mode 100644 index 0000000..b228884 --- /dev/null +++ b/srtserver.h @@ -0,0 +1,32 @@ +#ifndef RTMPSERVER_H_ +#define RTMPSERVER_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include <stdint.h> +#include <stdlib.h> + +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; + +typedef struct { + void (*on_start)(void *ctx); + void (*on_stop)(void *ctx); + void (*on_data)(void* ctx, char *buf, size_t size); +} SrtCallbacks; + +void start_rtmpserver(RtmpCallbacks cbs, void *ctx); +void start_srt_server(SrtCallbacks cbs, void *ctx); + +#ifdef __cplusplus +} +#endif + + +#endif
\ No newline at end of file |
