Changeset 5270:e25346c13638 in roaraudio for libroar/stream.c
- Timestamp:
- 11/17/11 18:20:12 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/stream.c
r5240 r5270 510 510 } 511 511 512 if ( data[1] != ROAR_STREAM_PARA_NAME ) {512 if ( data[1] != (uint16_t)ROAR_STREAM_PARA_NAME ) { 513 513 roar_err_set(ROAR_ERROR_TYPEMM); 514 514 return -1; … … 815 815 */ 816 816 817 static struct {817 static const struct { 818 818 int dir; 819 819 const char * name; … … 870 870 */ 871 871 872 static struct {873 intcodec;874 const char * name;875 const char * mime;872 static const struct { 873 const uint32_t codec; 874 const char * name; 875 const char * mime; 876 876 } _libroar_codec[] = { 877 877 // PCM: … … 975 975 }; 976 976 977 int roar_str2codec(const char * codec) {978 int i;977 int32_t roar_str2codec(const char * codec) { 978 size_t i; 979 979 int guess; 980 980 … … 985 985 return guess; 986 986 987 for (i = 0; _libroar_codec[i].codec != -1; i++)987 for (i = 0; _libroar_codec[i].codec != (uint32_t)-1; i++) 988 988 if ( strcasecmp(_libroar_codec[i].name, codec) == 0 ) 989 989 return _libroar_codec[i].codec; … … 994 994 995 995 996 const char * roar_codec2str (const int codec) {996 const char * roar_codec2str (const uint32_t codec) { 997 997 int i; 998 998 999 for (i = 0; _libroar_codec[i].codec != -1; i++)999 for (i = 0; _libroar_codec[i].codec != (uint32_t)-1; i++) 1000 1000 if ( _libroar_codec[i].codec == codec ) 1001 1001 return _libroar_codec[i].name; … … 1004 1004 } 1005 1005 1006 int 1007 int i;1006 int32_t roar_mime2codec (const char * mime) { 1007 size_t i; 1008 1008 1009 1009 if ( mime == NULL ) { … … 1017 1017 } 1018 1018 1019 for (i = 0; _libroar_codec[i].codec != -1; i++)1019 for (i = 0; _libroar_codec[i].codec != (uint32_t)-1; i++) 1020 1020 if ( _libroar_codec[i].mime != NULL ) 1021 1021 if ( strcasecmp(_libroar_codec[i].mime, mime) == 0 ) … … 1026 1026 } 1027 1027 1028 const char * roar_codec2mime (const intcodec) {1029 int i;1030 1031 for (i = 0; _libroar_codec[i].codec != -1; i++)1028 const char * roar_codec2mime (const uint32_t codec) { 1029 size_t i; 1030 1031 for (i = 0; _libroar_codec[i].codec != (uint32_t)-1; i++) 1032 1032 if ( _libroar_codec[i].codec == codec ) 1033 1033 return _libroar_codec[i].mime; … … 1110 1110 } 1111 1111 1112 static struct {1112 static const struct { 1113 1113 int role; 1114 1114 const char * name; … … 1209 1209 } 1210 1210 1211 static struct {1211 static const struct { 1212 1212 const char * name; 1213 1213 struct roar_audio_info info;
Note: See TracChangeset
for help on using the changeset viewer.