diff options
Diffstat (limited to 'src/lrtp.h')
-rw-r--r-- | src/lrtp.h | 22 |
1 files changed, 18 insertions, 4 deletions
@@ -93,6 +93,11 @@ enum lrtp_status_t { LRTP_BUFFER_TOO_SMALL = -32, ///< Supplied buffer was not big enough. LRTP_CSRC_ALREADY_ACTIVE= -33, ///< CSrc already in session list. + + LRTP_KEY_TOO_LONG = -34, ///< Supplied key string is longer than 64 bytes + LRTP_INVALID_KEY_STRING = -35, ///< Supplied key string is not valid hex. + LRTP_KEY_TOO_SHORT = -36, ///< Supplied key string is shorter than 64 bytes. + }; struct lrtp_t; @@ -144,13 +149,21 @@ enum lrtp_status_t lrtp_create_profile(struct lrtp_t *lrtp, EXPORT enum lrtp_status_t lrtp_destroy_profile(struct lrtp_t *lrtp, unsigned int csrc); +enum lrtp_data_flags_t { + LRTP_NO_FLAGS = 0, + LRTP_TAKE_OWNERSHIP = 1, + LRTP_COPY = 2, +}; + /** * Enqueue a media frame for the packetiser. * @param profile A pointer to profile needed for processing the frame type. - * @param framedate The frame data that needs encapsulation. + * @param framedata The frame data that needs encapsulation. * @param framesize The size in bytes of the frame data. + * @param timestamp TODO: TBD + * @param flags Controls the data memory ownership behaviour. + * See @ref enum lrtp_data_flags_t for possible values. * @return TODO: TBD - * @return 0 on success, or a negative error code on error. * WARNING: The frame pointer cannot be freed or overwritten until all frame * data has been handled by lrtp_pack(). Either call lrtp_pack() until it * returns 0 after each call to lrtp_enqueue_frame or use the @@ -159,8 +172,9 @@ enum lrtp_status_t lrtp_destroy_profile(struct lrtp_t *lrtp, unsigned int csrc); */ EXPORT enum lrtp_status_t lrtp_enqueue_frame(struct lrtp_t *lrtp, unsigned int csrc, - char *framedate, size_t framesize, - unsigned long int timestamp); + char *framedata, size_t framesize, + unsigned long int timestamp, + int flags); /** * Handle frame data from the frame queue and create at most a single sRTP |