RTP/IPTV multicast-to-HTTP streaming daemon written in C, with a React/TypeScript web UI embedded into the binary.
- Pure C (C11) — do NOT introduce C++ code or features
- Multi-worker model via
fork()— workers are independent, only sharing stats via shared memory - Cross-platform: Linux, macOS, FreeBSD — use
#ifdeffor platform-specific APIs - Web UI (React/Vite) is compiled and embedded as
src/embedded_web_data.h— never edit this file directly - Config file format is INI (
rtp2httpd.conf), not YAML/JSON
- Indentation: 2 spaces, no tabs
- Structs:
_ssuffix for struct tag,_tfor typedef (struct connection_s→connection_t) - Header guards:
#ifndef __MODULE_H__/#define __MODULE_H__ - Logging: always use
logger()fromutils.h— neverprintf/fprintf - Strings: use
snprintf/strncpy— neversprintf/strcpy
- Formatter/linter: Biome (
biome.json), line width 120, indent with tabs
- Package manager: uv — do not use pip/pipenv/poetry
- Always run Python scripts via
uv run— do not usepythondirectly
- Chinese docs (
docs/) are the single source of truth - English docs (
docs/en/) are translations — always usedoc-translator-zh-enagent, do not translate directly - Built with VitePress:
pnpm run docs:build
- Use Linux-only APIs without
#ifdefplatform guards - Use npm/yarn — this project uses pnpm
- Use autotools — this project uses CMake
- Add dependencies without discussing first