summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toxav/rtp.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/toxav/rtp.c b/toxav/rtp.c
index 9ba3b6a3..aa5e2635 100644
--- a/toxav/rtp.c
+++ b/toxav/rtp.c
@@ -29,10 +29,6 @@
29#include "rtp.h" 29#include "rtp.h"
30#include <stdlib.h> 30#include <stdlib.h>
31 31
32
33#define PAYLOAD_ID_VALUE_OPUS 1
34#define PAYLOAD_ID_VALUE_VP8 2
35
36#define size_32 4 32#define size_32 4
37 33
38#define ADD_FLAG_VERSION(_h, _v) do { ( _h->flags ) &= 0x3F; ( _h->flags ) |= ( ( ( _v ) << 6 ) & 0xC0 ); } while(0) 34#define ADD_FLAG_VERSION(_h, _v) do { ( _h->flags ) &= 0x3F; ( _h->flags ) |= ( ( ( _v ) << 6 ) & 0xC0 ); } while(0)
@@ -68,26 +64,6 @@ inline__ int check_late_message (RTPSession *session, RTPMessage *msg)
68 return ( msg->header->sequnum < session->rsequnum && msg->header->timestamp < session->timestamp ) ? 0 : -1; 64 return ( msg->header->sequnum < session->rsequnum && msg->header->timestamp < session->timestamp ) ? 0 : -1;
69} 65}
70 66
71/**
72 * @brief Speaks for it self.
73 *
74 */
75static const uint32_t payload_table[] = {
76 8000, 8000, 8000, 8000, 8000, 8000, 16000, 8000, 8000, 8000, /* 0-9 */
77 44100, 44100, 0, 0, 90000, 8000, 11025, 22050, 0, 0, /* 10-19 */
78 0, 0, 0, 0, 0, 90000, 90000, 0, 90000, 0, /* 20-29 */
79 0, 90000, 90000, 90000, 90000, 0, 0, 0, 0, 0, /* 30-39 */
80 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 40-49 */
81 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 50-59 */
82 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 60-69 */
83 PAYLOAD_ID_VALUE_OPUS, PAYLOAD_ID_VALUE_VP8, 0, 0, 0, 0, 0, 0, 0, 0,/* 70-79 */
84 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80-89 */
85 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90-99 */
86 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 100-109 */
87 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 110-119 */
88 0, 0, 0, 0, 0, 0, 0, 0 /* 120-127 */
89};
90
91 67
92/** 68/**
93 * @brief Extracts header from payload. 69 * @brief Extracts header from payload.
@@ -686,7 +662,7 @@ RTPSession *rtp_init_session ( int payload_type, Messenger *messenger, int frien
686 _retu->csrc = NULL; /* Container */ 662 _retu->csrc = NULL; /* Container */
687 _retu->ssrc = random_int(); 663 _retu->ssrc = random_int();
688 _retu->marker = 0; 664 _retu->marker = 0;
689 _retu->payload_type = payload_table[payload_type]; 665 _retu->payload_type = payload_type % 128;
690 666
691 _retu->dest = friend_num; 667 _retu->dest = friend_num;
692 668