-
Notifications
You must be signed in to change notification settings - Fork 15
Libmoq 0.2.13 api refactor fix #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
danrossi
wants to merge
1
commit into
moq-dev:main
Choose a base branch
from
danrossi:api-refactor-fix
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: moq-dev/obs
Length of output: 37
🌐 Web query:
libmoq 0.2.13 moq_consume_frame API documentation💡 Result:
In libmoq 0.2.13, the moq_consume_frame APIs are the frame-consuming functions in the crate’s public C ABI, exposed as the following functions: 1) moq_consume_frame_chunk(uint32_t frame, uint32_t index, moq_frame *dst) - Purpose: retrieve a chunk of a frame’s payload (“Consuming: Frames” → “moq_consume_frame_chunk”). [1] 2) moq_consume_frame_close(uint32_t frame) - Purpose: close/clean up a frame consumer (“Consuming: Frames” → “moq_consume_frame_close”). [1] Related lifecycle functions you typically use around frame consumption: - moq_consume_close(uint32_t consume): close the overall consumer resource. [2] Where to find the API documentation for libmoq 0.2.13: - The libmoq 0.2.13 docs are published on docs.rs and include the C API header declarations and/or “README.md” excerpt that lists the consuming APIs including moq_consume_frame_chunk and moq_consume_frame_close. [3] - The crate itself indicates that it generates the C header moq.h during the build (“Generate the C header file at target/include/moq.h”), which is where these symbols originate in the C integration. [1] Primary sources: - libmoq v0.2.13 crate page (version/update date and build notes about generating the C header). [1] - docs.rs/libmoq 0.2.13 README source excerpt containing the “Consuming: Frames” function names. [3]
Citations:
🏁 Script executed:
Repository: moq-dev/obs
Length of output: 476
🏁 Script executed:
Repository: moq-dev/obs
Length of output: 2822
🏁 Script executed:
Repository: moq-dev/obs
Length of output: 37
🏁 Script executed:
Repository: moq-dev/obs
Length of output: 102
🏁 Script executed:
Repository: moq-dev/obs
Length of output: 83
🌐 Web query:
moq_consume_frame libmoq API function💡 Result:
In libmoq, there is no function named moq_consume_frame. Instead, libmoq exposes frame-consumption functions named: 1) moq_consume_frame_chunk(uint32_t frame, uint32_t index, moq_frame *dst) - “Consuming: Frames” API for retrieving a chunk of a frame’s payload [1]. 2) moq_consume_frame_close(uint32_t frame) - “Consuming: Frames” API for closing/cleaning up a consumed frame [1]. Context: these frame functions are part of libmoq’s C API for consuming media tracks/frames (e.g., moq_consume_video_ordered / moq_consume_audio_ordered ultimately deliver frames, which you then read via moq_consume_frame_chunk and release via moq_consume_frame_close) [2][1]. References: libmoq C API function list includes moq_consume_frame_chunk and moq_consume_frame_close under “Consuming: Frames” [1], and libmoq’s docs.rs page enumerates moq_consume_frame_chunk / moq_consume_frame_close under consuming frames [2].
Citations:
🏁 Script executed:
Repository: moq-dev/obs
Length of output: 37
🏁 Script executed:
Repository: moq-dev/obs
Length of output: 37
🌐 Web query:
libmoq 0.2.13 "moq_consume_frame" C API function signature💡 Result:
In libmoq v0.2.13, the C API does not expose a function named moq_consume_frame; instead, frame-consuming functions are: 1) int32_t moq_consume_frame_chunk(uint32_t frame, uint32_t index, moq_frame dst); 2) int32_t moq_consume_frame_close(uint32_t frame); So there is no C API function signature for moq_consume_frame in that version; the closest equivalents are moq_consume_frame_chunk (to read a chunk payload into moq_frame) and moq_consume_frame_close (to close/cleanup the frame consumer handle). [1] If you intended the Rust API (not the C bindings), the Rust docs list moq_consume_frame_close and moq_consume_frame_chunk as well, not a Rust function named moq_consume_frame. [2]
Citations:
🏁 Script executed:
Repository: moq-dev/obs
Length of output: 37
🏁 Script executed:
Repository: moq-dev/obs
Length of output: 74
🏁 Script executed:
Repository: moq-dev/obs
Length of output: 144
🏁 Script executed:
# Read the actual commit that changed this git show 8d96b63 --statRepository: moq-dev/obs
Length of output: 5865
🏁 Script executed:
Repository: moq-dev/obs
Length of output: 2940
🏁 Script executed:
Repository: moq-dev/obs
Length of output: 72
🏁 Script executed:
Repository: moq-dev/obs
Length of output: 631
🏁 Script executed:
Repository: moq-dev/obs
Length of output: 37
🌐 Web query:
libmoq C API moq_consume_frame newer version function💡 Result:
In the current libmoq C API, there is no function named moq_consume_frame. Instead, the frame-consumption API is split into “chunk” and “close” calls: 1) moq_consume_frame_chunk(frame, index, moq_frame* dst) 2) moq_consume_frame_close(frame) So if you previously used moq_consume_frame in older code, the equivalent newer pattern is to: - call moq_consume_frame_chunk(...), repeatedly for each chunk index in the frame, and - call moq_consume_frame_close(...) when you’re done with the frame. This split is reflected in the documented C functions exposed by libmoq (e.g., libmoq v0.2.13): it lists moq_consume_frame_chunk(...) and moq_consume_frame_close(...) under “Consuming: Frames”. [1]
Citations:
🏁 Script executed:
Repository: moq-dev/obs
Length of output: 443
🏁 Script executed:
Repository: moq-dev/obs
Length of output: 108
🌐 Web query:
libmoq moq_consume_frame latest version C API💡 Result:
In libmoq (C FFI for moq-lite), the “consume frame” operations are exposed as frame-level functions, not a single function literally named
moq_consume_frame. Latest libmoq version (as published on crates.io at the time of research): v0.2.13 [1]. C API frame consumption functions (consuming frames): -int32_t moq_consume_frame_chunk(uint32_t frame, uint32_t index, moq_frame *dst);[1][2] -int32_t moq_consume_frame_close(uint32_t frame);[1][2] Related frame consumer lifecycle (consume handle cleanup): -int32_t moq_consume_close(uint32_t consume);(close the broadcast consumer / top-level consume handle) [1][2] Notes on “latest version C API”: - The libmoq crate documentation states the library exposes C functions and points toapi.rsfor full details [3]. - The Rust bindings documentation page lists the consuming frame APIs includingmoq_consume_frame_chunkandmoq_consume_frame_close[2]. If you meant a different API surface (e.g., moq-lite RustFrameConsumervs libmoq C FFI), tell me which language/API you’re using and I’ll map the corresponding calls.Citations:
Fix API call to match libmoq 0.2.13 C API.
The function
moq_consume_framedoes not exist in libmoq 0.2.13. The official C API provides only:moq_consume_frame_chunk(uint32_t frame, uint32_t index, moq_frame *dst)moq_consume_frame_close(uint32_t frame)Line 791 will fail at link time with an undefined reference. The code needs to use the actual libmoq 0.2.13 API, likely calling
moq_consume_frame_chunkwith an appropriate chunk index (0 for the first chunk, if applicable) instead of the non-existentmoq_consume_frame.🤖 Prompt for AI Agents