diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-06 16:09:33 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-06 16:09:33 +0000 |
commit | 4506e03f3d24f4bd4f6b17803031ede1e353de28 (patch) | |
tree | b849a5c247c05d8e052b854defc2526e0f341a64 /frame.c | |
parent | 77abfdfd00db4460aeb6e9c3b5065406486ca4f4 (diff) |
Merge of the "sdpcleanup" branch. Thanks to John Martin for a lot of tests
and some patches (all disclaimed).
- Don't change RTP properties if we reject a re-INVITE
- Don't add video to an outbound channel if there's no video on the inbound channel
- Don't include video in the "preferred codec" list for codec selection
- Clean up and document code that parses and adds SDP attachments
Since we do not transcode video, we can't handle video the same way as audio. This is a
bug fix patch. In future releases, we need to work on a solution for video negotiation,
not codecs but formats and framerates instead.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32597 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'frame.c')
-rw-r--r-- | frame.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1008,9 +1008,12 @@ int ast_codec_choose(struct ast_codec_pref *pref, int formats, int find_best) break; } } - if(ret) + if(ret & AST_FORMAT_AUDIO_MASK) return ret; + if (option_debug > 3) + ast_log(LOG_DEBUG, "Could not find preferred codec - %s\n", find_best ? "Going for the best codec" : "Returning zero codec"); + return find_best ? ast_best_codec(formats) : 0; } @@ -1034,7 +1037,10 @@ void ast_parse_allow_disallow(struct ast_codec_pref *pref, int *mask, const char *mask &= ~format; } - if (pref) { + /* Set up a preference list for audio. Do not include video in preferences + since we can not transcode video and have to use whatever is offered + */ + if (pref && (format & AST_FORMAT_AUDIO_MASK)) { if (strcasecmp(this, "all")) { if (allowing) ast_codec_pref_append(pref, format); |