aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-05 18:36:31 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-05 18:36:31 +0000
commitaada5c97a114d2e377532b205fb24f7e1052236c (patch)
tree7aec9f702b437d5de11667be63d0407ab7417dad /include
parent8a6eca9fc0d411cb79812ebb0b3c343b94e3495c (diff)
Merged revisions 180373 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r180373 | kpfleming | 2009-03-05 12:29:38 -0600 (Thu, 05 Mar 2009) | 15 lines Merged revisions 180372 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r180372 | kpfleming | 2009-03-05 12:22:16 -0600 (Thu, 05 Mar 2009) | 9 lines Fix problems when RTP packet frame size is changed During some code analysis, I found that calling ast_rtp_codec_setpref() on an ast_rtp session does not work as expected; it does not adjust the smoother that may on the RTP session, in fact it summarily drops it, even if it has data in it, even if the current format's framing size has not changed. This is not good. This patch changes this behavior, so that if the packetization size for the current format changes, any existing smoother is safely updated to use the new size, and if no smoother was present, one is created. A new API call for smoothers, ast_smoother_reconfigure(), was required to implement these changes. Review: http://reviewboard.digium.com/r/184/ ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@180377 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/frame.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asterisk/frame.h b/include/asterisk/frame.h
index c866cf743..430c79b17 100644
--- a/include/asterisk/frame.h
+++ b/include/asterisk/frame.h
@@ -517,6 +517,16 @@ int ast_smoother_get_flags(struct ast_smoother *smoother);
int ast_smoother_test_flag(struct ast_smoother *s, int flag);
void ast_smoother_free(struct ast_smoother *s);
void ast_smoother_reset(struct ast_smoother *s, int bytes);
+
+/*!
+ * \brief Reconfigure an existing smoother to output a different number of bytes per frame
+ * \param s the smoother to reconfigure
+ * \param bytes the desired number of bytes per output frame
+ * \return nothing
+ *
+ */
+void ast_smoother_reconfigure(struct ast_smoother *s, int bytes);
+
int __ast_smoother_feed(struct ast_smoother *s, struct ast_frame *f, int swap);
struct ast_frame *ast_smoother_read(struct ast_smoother *s);
#define ast_smoother_feed(s,f) __ast_smoother_feed(s, f, 0)