|
|
|
|
@ -753,7 +753,7 @@ struct rtpPayloadType ast_rtp_lookup_pt(struct ast_rtp* rtp, int pt)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Looks up an RTP code out of our *static* outbound list */
|
|
|
|
|
int ast_rtp_lookup_code(struct ast_rtp* rtp, int isAstFormat, int code) {
|
|
|
|
|
int ast_rtp_lookup_code(struct ast_rtp* rtp, const int isAstFormat, const int code) {
|
|
|
|
|
int pt;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -787,7 +787,7 @@ int ast_rtp_lookup_code(struct ast_rtp* rtp, int isAstFormat, int code) {
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
char* ast_rtp_lookup_mime_subtype(int isAstFormat, int code) {
|
|
|
|
|
char* ast_rtp_lookup_mime_subtype(const int isAstFormat, const int code) {
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < sizeof mimeTypes/sizeof mimeTypes[0]; ++i) {
|
|
|
|
|
@ -799,6 +799,41 @@ char* ast_rtp_lookup_mime_subtype(int isAstFormat, int code) {
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
char *ast_rtp_lookup_mime_multiple(char *buf, int size, const int capability, const int isAstFormat)
|
|
|
|
|
{
|
|
|
|
|
int format;
|
|
|
|
|
unsigned len;
|
|
|
|
|
char *end = buf;
|
|
|
|
|
char *start = buf;
|
|
|
|
|
|
|
|
|
|
if (!buf || !size)
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
|
|
snprintf(end, size, "0x%x (", capability);
|
|
|
|
|
|
|
|
|
|
len = strlen(end);
|
|
|
|
|
end += len;
|
|
|
|
|
size -= len;
|
|
|
|
|
start = end;
|
|
|
|
|
|
|
|
|
|
for (format = 1; format < AST_RTP_MAX; format <<= 1) {
|
|
|
|
|
if (capability & format) {
|
|
|
|
|
const char *name = ast_rtp_lookup_mime_subtype(isAstFormat, format);
|
|
|
|
|
snprintf(end, size, "%s|", name);
|
|
|
|
|
len = strlen(end);
|
|
|
|
|
end += len;
|
|
|
|
|
size -= len;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (start == end)
|
|
|
|
|
snprintf(start, size, "nothing)");
|
|
|
|
|
else if (size > 1)
|
|
|
|
|
*(end -1) = ')';
|
|
|
|
|
|
|
|
|
|
return buf;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int rtp_socket(void)
|
|
|
|
|
{
|
|
|
|
|
int s;
|
|
|
|
|
|