libmoq 0.1.2

Media over QUIC, C bindings
docs.rs failed to build libmoq-0.1.2
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: libmoq-0.2.2

libmoq

C bindings for Media over QUIC.

Building

Build the Rust library and generate C headers

cargo build --release

This will:

  • Build the static library (libmoq.a on Unix-like systems, moq.lib on Windows)
  • Generate the C header file at target/include/moq.h
  • Generate the pkg-config file at target/moq.pc

There's also a CMakeLists.txt file that can be used to import/build the library.

API

The library exposes the following C functions, see lib.rs for full details:

int32_t moq_log_level(const char *level);

int32_t moq_session_connect(const char *url, void (*callback)(void *user_data, int32_t code), void *user_data);
int32_t moq_session_close(int32_t id);

int32_t moq_broadcast_create(void);
int32_t moq_broadcast_close(int32_t id);
int32_t moq_broadcast_publish(int32_t id, int32_t session, const char *path);

int32_t moq_track_create(int32_t broadcast, const char *format);
int32_t moq_track_close(int32_t id);
int32_t moq_track_init(int32_t id, const uint8_t *extra, uintptr_t extra_size);
int32_t moq_track_write(int32_t id, const uint8_t *data, uintptr_t data_size, uint64_t pts);