From 0f900a2b4d7707dddeddadd62ac5a109aed93e7e Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 6 Jan 2014 08:07:56 +0100 Subject: Fix round robin frame selector. Add l16 and jpeg profiles. Add timestamp to lrtp_enqueue_frame. --- src/lrtp.h | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'src/lrtp.h') diff --git a/src/lrtp.h b/src/lrtp.h index ce6b0e2..d4abbc1 100644 --- a/src/lrtp.h +++ b/src/lrtp.h @@ -56,15 +56,13 @@ struct lrtp_t *lrtp_init(const char *key, unsigned int ssrc); EXPORT void lrtp_close(struct lrtp_t *lrtp); -struct lrtp_profile_t; - /** - * @param ... + * @return 0 on success, 1 on error. */ EXPORT -struct lrtp_profile_t *lrtp_create_profile(struct lrtp_t *lrtp, - lrtp_profile_id_t profile_id, - unsigned int csrc, ...); +int lrtp_create_profile(struct lrtp_t *lrtp, + lrtp_profile_id_t profile_id, + unsigned int csrc, ...); EXPORT void lrtp_destroy_profile(struct lrtp_t *lrtp, unsigned int csrc); @@ -75,7 +73,7 @@ typedef enum { PACK_BUFFER_TOO_SMALL = 1001, // Packet buffer needs to be bigger. PACK_UNKNOWN_PROFILE = 1002, // Illegal profile id PACK_MISSING_PROFILE = 1003, // Profile pointer NULL or not valid. -} lrtp_pack_status_t; +} lrtp_pack_status_t;f /** * Enqueue a media frame for the packetiser. @@ -83,15 +81,16 @@ typedef enum { * @param framedate The frame data that needs encapsulation. * @param framesize The size in bytes of the frame data. * @return 0 on success, or a negative error code on error. - * NOTE: 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 + * 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 * OPTION_SET_PROCESS_FINISHED_HANDLER option to set a process finished handler. * See lrtp_profiles.h for further details. */ EXPORT -int lrtp_enqueue_frame(struct lrtp_profile_t *profile, - const char *framedate, size_t framesize); +int lrtp_enqueue_frame(struct lrtp_t *lrtp, unsigned int csrc, + const char *framedate, size_t framesize, + unsigned long int timestamp); /** * Handle frame data from the frame queue and create at most a single sRTP -- cgit v1.2.3