mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-15 08:44:14 +00:00
Extract a repeated test into ast_channel_has_audio_frame_or_monitor().
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -45,7 +45,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
#include "asterisk/bridging_technology.h"
|
||||
#include "asterisk/frame.h"
|
||||
#include "asterisk/rtp_engine.h"
|
||||
#include "asterisk/audiohook.h"
|
||||
|
||||
/*! \brief Forward declarations for frame hook usage */
|
||||
static int native_rtp_bridge_join(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel);
|
||||
@@ -85,13 +84,7 @@ static struct ast_frame *native_rtp_framehook(struct ast_channel *chan, struct a
|
||||
/*! \brief Internal helper function which checks whether the channels are compatible with our native bridging */
|
||||
static int native_rtp_bridge_capable(struct ast_channel *chan)
|
||||
{
|
||||
if (ast_channel_monitor(chan) || (ast_channel_audiohooks(chan) &&
|
||||
!ast_audiohook_write_list_empty(ast_channel_audiohooks(chan))) ||
|
||||
!ast_framehook_list_contains_no_active(ast_channel_framehooks(chan))) {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
return ast_channel_has_audio_frame_or_monitor(chan);
|
||||
}
|
||||
|
||||
/*! \brief Internal helper function which gets all RTP information (glue and instances) relating to the given channels */
|
||||
|
Reference in New Issue
Block a user