Skip to content

Rename catalog task APIs to subscribe/unsubscribe #1064

@kixelated

Description

@kixelated

Summary

The moq_consume_catalog API returns two kinds of handles that are easy to confuse:

  1. A task handle from moq_consume_catalog() — represents the ongoing subscription
  2. A snapshot handle delivered via the on_catalog callback — represents a specific catalog version

Both are opaque u32 values with "catalog" in the name, making it unclear which handle goes with which close function.

Proposal

Rename the task-side functions to use subscribe/unsubscribe terminology:

Current Proposed
moq_consume_catalog() moq_consume_catalog_subscribe()
moq_consume_catalog_close() moq_consume_catalog_unsubscribe()

The snapshot-side functions keep the simpler naming since that's the pattern C callers expect:

  • moq_consume_catalog_free()moq_consume_catalog_close() (or keep as _free)
  • moq_consume_video_config() / moq_consume_audio_config() — unchanged

This is a breaking API change, so it should target the dev branch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingBreaking API changesrustPull requests that update Rust code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions