gh #755 Add API to relase the acquired avbufferhelper instance - #765
Open
susanmary007 wants to merge 1 commit into
Open
gh #755 Add API to relase the acquired avbufferhelper instance#765susanmary007 wants to merge 1 commit into
susanmary007 wants to merge 1 commit into
Conversation
susanmary007
commented
Jul 31, 2026
- Add API to relase the acquired avbufferhelper instance
- Add changes to support dynamic library loading of avbufferhelper library
* Add API to release the acquired avbufferhelper instance * Add changes to support dynamic library loading of avbufferhelper library
susanmary007
force-pushed
the
feature/gh755_release_avbuffer_helper_instance
branch
from
July 31, 2026 12:48
bccb568 to
f652275
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the avbuffer module’s public AVBufferHelper header to support a release API for the acquired helper instance and to support dynamic loading expectations for a vendor-provided libavbufferhelper.so.
Changes:
- Documented the expected shared library name (
libavbufferhelper.so) for vendor implementations. - Added a new
releaseAVBufferHelperInstance(IAVBufferHelper*)API alongside the existing acquisition factory. - Wrapped the factory functions in an
extern "C"block to support predictable symbol names for dynamic loading.
Comment on lines
+98
to
106
| #ifdef __cplusplus | ||
| extern "C" { | ||
| #endif | ||
|
|
||
| // Factory function to acquire the AVBufferHelper singleton instance. | ||
| // This API returns the singleton AVBufferHelper instance and increments | ||
| // the internal reference count. The caller must invoke | ||
| // releaseAVBufferHelperInstance() when the instance is no longer needed. | ||
| IAVBufferHelper* getAVBufferHelperInstance(); |
Comment on lines
+36
to
+42
| /** | ||
| * @brief Vendors shall provide the AV Buffer Helper implementation as libavbufferhelper.so. | ||
| * | ||
| * The middleware uses this predefined library name for dynamic loading, eliminating the need for | ||
| * vendor-specific handling and avoiding build-time dependencies. | ||
| */ | ||
|
|
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (3)
avbuffer/current/avbufferhelper.h:41
- The library name is documented here as a predefined value, but it’s only present in a comment. Exposing it as a constant in the header reduces the risk of callers hardcoding divergent strings when doing dlopen/dlsym.
* @brief Vendors shall provide the AV Buffer Helper implementation as libavbufferhelper.so.
*
* The middleware uses this predefined library name for dynamic loading, eliminating the need for
* vendor-specific handling and avoiding build-time dependencies.
*/
avbuffer/current/avbufferhelper.h:46
- With the new releaseAVBufferHelperInstance() API and reference-counted lifetime, implementations may end up deleting the helper via an IAVBufferHelper* when the refcount reaches zero. Without a virtual destructor on the interface, deleting through the base pointer is undefined behaviour.
public:
struct CopyMap {
avbuffer/current/avbufferhelper.h:106
- This header now has an extern "C" block around the factory APIs, but it also still contains an earlier empty extern "C" block (lines 23-30) that doesn’t wrap any declarations. Keeping both is confusing for readers and maintainers; prefer a single extern "C" wrapper for the factory symbols.
#ifdef __cplusplus
extern "C" {
#endif
// Factory function to acquire the AVBufferHelper singleton instance.
// This API returns the singleton AVBufferHelper instance and increments
// the internal reference count. The caller must invoke
// releaseAVBufferHelperInstance() when the instance is no longer needed.
IAVBufferHelper* getAVBufferHelperInstance();
Ulrond
requested changes
Aug 13, 2026
Ulrond
left a comment
Collaborator
There was a problem hiding this comment.
fix your copilot questions please.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.