Changed codec priority to use integer with value between 0-255 instead of enum

git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@497 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjlib/include/pj/compat/os_linux_kernel.h b/pjlib/include/pj/compat/os_linux_kernel.h
index fe3f737..7327339 100644
--- a/pjlib/include/pj/compat/os_linux_kernel.h
+++ b/pjlib/include/pj/compat/os_linux_kernel.h
@@ -77,6 +77,13 @@
  */
 #define PJ_SELECT_NEEDS_NFDS	    0
 
+/* Is errno a good way to retrieve OS errors?
+ * (probably no for linux kernel) 
+ * If you answer no here, you'll need to tell pjlib how to get OS
+ * error (a compile error will tell you exactly where)
+ */
+#define PJ_HAS_ERRNO_VAR	    0
+
 /* This value specifies the value set in errno by the OS when a non-blocking
  * socket recv() can not return immediate daata.
  */
@@ -114,6 +121,7 @@
 #define PJ_HAS_HIGH_RES_TIMER	    1
 #ifndef PJ_OS_HAS_CHECK_STACK
 #   define PJ_OS_HAS_CHECK_STACK    0
+#endif
 #define PJ_TERM_HAS_COLOR	    0
 #define PJ_NATIVE_STRING_IS_UNICODE 0
 
diff --git a/pjmedia/include/pjmedia/codec.h b/pjmedia/include/pjmedia/codec.h
index 00e60e5..5b1cf9d 100644
--- a/pjmedia/include/pjmedia/codec.h
+++ b/pjmedia/include/pjmedia/codec.h
@@ -426,26 +426,26 @@
      * 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 @@
  *		    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 bcfa6d8..fd39066 100644
--- a/pjmedia/src/pjmedia/codec.c
+++ b/pjmedia/src/pjmedia/codec.c
@@ -309,7 +309,7 @@
 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;