Created
August 30, 2013 14:43
-
-
Save rday/6390601 to your computer and use it in GitHub Desktop.
Asterisk mod sample
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void *rtp_thread(void *args) | |
{ | |
struct ap_info* thread_info = args; | |
struct ast_frame *f = NULL; | |
struct ast_rtp *astRtp = NULL; // XXX <-- Replaced by rtp_engine | |
int pktCnt=0; | |
int res = 0; | |
astRtp = ast_rtp_new_fd(thread_info->sockFd); // XXX <-- Doesn't event exist anymore | |
fd_flush(thread_info->timerFd); | |
ast_log(LOG_WARNING, "NEW rtpthread has started - Network Port: %d TimerPort: %d\n", thread_info->sockFd, thread_info->timerFd); | |
for(;;) { | |
f = ast_rtp_read(astRtp); // XXX <-- Yea not really the same anymore | |
if( !f ) { | |
ast_log(LOG_WARNING, "%d - Ending Thread on Frame(%d) size-%d to ztc\n", thread_info->sockFd, f->subclass.integer, f->datalen); | |
break; | |
} | |
/* ... */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment