Skip to content

Commit

Permalink
Add z_encoding_loan_default (#700)
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc authored Oct 1, 2024
1 parent 54d6db9 commit 4d8e6ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
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(); }

0 comments on commit 4d8e6ee

Please sign in to comment.