Summary
The moq_consume_catalog API returns two kinds of handles that are easy to confuse:
- A task handle from
moq_consume_catalog() — represents the ongoing subscription
- 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.
Summary
The
moq_consume_catalogAPI returns two kinds of handles that are easy to confuse:moq_consume_catalog()— represents the ongoing subscriptionon_catalogcallback — represents a specific catalog versionBoth are opaque
u32values 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:
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()— unchangedThis is a breaking API change, so it should target the
devbranch.