mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Isolate frames returned from a DSP instance or codec translator.
The reasoning for these changes are the same as what I wrote in the commit message for rev 222878. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@224931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -108,17 +108,4 @@ int ast_dsp_get_tstate(struct ast_dsp *dsp);
|
||||
/*! \brief Get tcount (Threshold counter) */
|
||||
int ast_dsp_get_tcount(struct ast_dsp *dsp);
|
||||
|
||||
/*!
|
||||
* \brief Hint that a frame from a dsp was freed
|
||||
*
|
||||
* This is called from ast_frame_free if AST_FRFLAG_FROM_DSP is set. This occurs
|
||||
* because it is possible for the dsp to be freed while someone still holds a reference
|
||||
* to the frame that is in that dsp. This has been known to happen when the dsp on a Zap
|
||||
* channel detects a busy signal. The channel is hung up, and the application that read the
|
||||
* frame to begin with still has a reference to the frame.
|
||||
*
|
||||
* \return nothing
|
||||
*/
|
||||
void ast_dsp_frame_freed(struct ast_frame *fr);
|
||||
|
||||
#endif /* _ASTERISK_DSP_H */
|
||||
|
@@ -127,14 +127,6 @@ enum ast_frame_type {
|
||||
enum {
|
||||
/*! This frame contains valid timing information */
|
||||
AST_FRFLAG_HAS_TIMING_INFO = (1 << 0),
|
||||
/*! This frame came from a translator and is still the original frame.
|
||||
* The translator can not be free'd if the frame inside of it still has
|
||||
* this flag set. */
|
||||
AST_FRFLAG_FROM_TRANSLATOR = (1 << 1),
|
||||
/*! This frame came from a dsp and is still the original frame.
|
||||
* The dsp cannot be free'd if the frame inside of it still has
|
||||
* this flag set. */
|
||||
AST_FRFLAG_FROM_DSP = (1 << 2),
|
||||
};
|
||||
|
||||
/*! \brief Data structure associated with a single frame of data
|
||||
|
@@ -137,10 +137,6 @@ struct ast_trans_pvt {
|
||||
int samples; /*!< samples available in outbuf */
|
||||
/*!
|
||||
* \brief actual space used in outbuf
|
||||
*
|
||||
* Also, for the sake of ABI compatability, a magic value of -1 in this
|
||||
* field means that the pvt has been requested to be destroyed, but is
|
||||
* pending destruction until ast_translate_frame_freed() gets called.
|
||||
*/
|
||||
int datalen;
|
||||
void *pvt; /*!< more private data, if any */
|
||||
@@ -252,20 +248,6 @@ unsigned int ast_translate_path_steps(unsigned int dest, unsigned int src);
|
||||
*/
|
||||
unsigned int ast_translate_available_formats(unsigned int dest, unsigned int src);
|
||||
|
||||
/*!
|
||||
* \brief Hint that a frame from a translator has been freed
|
||||
*
|
||||
* This is sort of a hack. This function gets called when ast_frame_free() gets
|
||||
* called on a frame that has the AST_FRFLAG_FROM_TRANSLATOR flag set. This is
|
||||
* because it is possible for a translation path to be destroyed while a frame
|
||||
* from a translator is still in use. Specifically, this happens if a masquerade
|
||||
* happens after a call to ast_read() but before the frame is done being processed,
|
||||
* since the frame processing is generally done without the channel lock held.
|
||||
*
|
||||
* \return nothing
|
||||
*/
|
||||
void ast_translate_frame_freed(struct ast_frame *fr);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user