summaryrefslogtreecommitdiff
path: root/pjmedia
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-06-11 23:19:43 +0000
committerBenny Prijono <bennylp@teluu.com>2006-06-11 23:19:43 +0000
commit66f91465de3c70018b6c31f14da273cdce518eb8 (patch)
tree91a1b36ad0ef92ff40b364838740a8c9f2e31fa9 /pjmedia
parent82d99dd0d38696cfdf0b4a07a3931c98833990fb (diff)
Changed codec priority to use integer with value between 0-255 instead of enum
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@497 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia')
-rw-r--r--pjmedia/include/pjmedia/codec.h14
-rw-r--r--pjmedia/src/pjmedia/codec.c2
2 files changed, 9 insertions, 7 deletions
diff --git a/pjmedia/include/pjmedia/codec.h b/pjmedia/include/pjmedia/codec.h
index 00e60e52..5b1cf9df 100644
--- a/pjmedia/include/pjmedia/codec.h
+++ b/pjmedia/include/pjmedia/codec.h
@@ -426,26 +426,26 @@ enum pjmedia_codec_priority
* highest place in the order, and will change the priority
* of previously highest priority codec to NEXT_HIGHER.
*/
- PJMEDIA_CODEC_PRIO_HIGHEST = 16,
+ PJMEDIA_CODEC_PRIO_HIGHEST = 255,
/**
* This priority will put the codec as the next codec after
* codecs with this same priority.
*/
- PJMEDIA_CODEC_PRIO_NEXT_HIGHER = 12,
+ PJMEDIA_CODEC_PRIO_NEXT_HIGHER = 254,
/**
* This is the initial codec priority when it is registered to
* codec manager by codec factory.
*/
- PJMEDIA_CODEC_PRIO_NORMAL = 8,
+ PJMEDIA_CODEC_PRIO_NORMAL = 128,
/**
* This priority makes the codec the lowest in the order.
* The last codec specified with this priority will be put
* in the last place in the order.
*/
- PJMEDIA_CODEC_PRIO_LOWEST = 4,
+ PJMEDIA_CODEC_PRIO_LOWEST = 1,
/**
* This priority will prevent the codec from being listed in the
@@ -637,14 +637,16 @@ pjmedia_codec_mgr_find_codecs_by_id( pjmedia_codec_mgr *mgr,
* instance by calling #pjmedia_endpt_get_codec_mgr().
* @param codec_id The full codec ID or codec ID prefix. If an empty
* string is given, it will match all codecs.
- * @param prio Priority to be set.
+ * @param prio Priority to be set. The priority can have any value
+ * between 1 to 255. When the priority is set to zero,
+ * the codec will be disabled.
*
* @return PJ_SUCCESS if at least one codec info is found.
*/
PJ_DECL(pj_status_t)
pjmedia_codec_mgr_set_codec_priority(pjmedia_codec_mgr *mgr,
const pj_str_t *codec_id,
- pjmedia_codec_priority prio);
+ pj_uint8_t prio);
/**
diff --git a/pjmedia/src/pjmedia/codec.c b/pjmedia/src/pjmedia/codec.c
index bcfa6d8b..fd390666 100644
--- a/pjmedia/src/pjmedia/codec.c
+++ b/pjmedia/src/pjmedia/codec.c
@@ -309,7 +309,7 @@ static void sort_codecs(pjmedia_codec_mgr *mgr)
PJ_DEF(pj_status_t)
pjmedia_codec_mgr_set_codec_priority(pjmedia_codec_mgr *mgr,
const pj_str_t *codec_id,
- pjmedia_codec_priority prio)
+ pj_uint8_t prio)
{
unsigned i, found = 0;