Skip to content
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

Add z_encoding_loan_default #700

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions include/zenoh-pico/api/encoding.h
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,11 @@ extern const z_owned_encoding_t ENCODING_VIDEO_VP8;
const z_loaned_encoding_t *z_encoding_video_vp9(void);
extern const z_owned_encoding_t ENCODING_VIDEO_VP9;

/**
* Returns a loaned default `z_loaned_encoding_t`.
*/
const z_loaned_encoding_t *z_encoding_loan_default(void);

#endif

#ifdef __cplusplus
Expand Down
2 changes: 2 additions & 0 deletions src/api/encoding.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,3 +282,5 @@ z_result_t z_encoding_to_string(const z_loaned_encoding_t *encoding, z_owned_str
_z_encoding_convert_into_string(encoding, s);
return _Z_RES_OK;
}

const z_loaned_encoding_t *z_encoding_loan_default(void) { return z_encoding_zenoh_bytes(); }
Loading