diff options
author | Lorenzo Miniero <lminiero@gmail.com> | 2016-11-29 16:31:21 +0100 |
---|---|---|
committer | Lorenzo Miniero <lminiero@gmail.com> | 2017-01-23 13:25:31 +0100 |
commit | 1061539b75811d9115dcbc0be46967515bd9e2d1 (patch) | |
tree | 5c1996f9a2943cc130c067546960732d2d81129b /include/asterisk/translate.h | |
parent | 31268e0a280110748f33314a2c09563c576243de (diff) |
media: Add experimental support for RTCP feedback.
This change adds experimental support for providing RTCP
feedback information to codec modules so they can dynamically
change themselves based on conditions.
ASTERISK-26584
Change-Id: Ifd6aa77fb4a7ff546c6025900fc2baf332c31857
Diffstat (limited to 'include/asterisk/translate.h')
-rw-r--r-- | include/asterisk/translate.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/asterisk/translate.h b/include/asterisk/translate.h index 8188eb8eb..f0fa83918 100644 --- a/include/asterisk/translate.h +++ b/include/asterisk/translate.h @@ -121,7 +121,7 @@ enum ast_trans_cost_table { * * As a minimum, a translator should supply name, srcfmt and dstfmt, * the required buf_size (in bytes) and buffer_samples (in samples), - * and a few callbacks (framein, frameout, sample). + * and a few callbacks (framein, frameout, feedback, sample). * The outbuf is automatically prepended by AST_FRIENDLY_OFFSET * spare bytes so generic routines can place data in there. * @@ -159,6 +159,10 @@ struct ast_translator { /*!< Output frame callback. Generate a frame * with outbuf content. */ + void (*feedback)(struct ast_trans_pvt *pvt, struct ast_frame *feedback); + /*!< Feedback frame callback. Handle + * input frame. */ + void (*destroy)(struct ast_trans_pvt *pvt); /*!< cleanup private data, if needed * (often unnecessary). */ @@ -316,7 +320,9 @@ void ast_translator_free_path(struct ast_trans_pvt *tr); /*! * \brief translates one or more frames * Apply an input frame into the translator and receive zero or one output frames. Consume - * determines whether the original frame should be freed + * determines whether the original frame should be freed. In case the frame type is + * AST_FRAME_RTCP, the frame is not translated but passed to the translator codecs + * via the feedback callback, and a pointer to ast_null_frame is returned after that. * \param path tr translator structure to use for translation * \param f frame to translate * \param consume Whether or not to free the original frame |