summaryrefslogtreecommitdiff
path: root/toxav/toxav.c
diff options
context:
space:
mode:
authormannol <eniz_vukovic@hotmail.com>2014-07-21 04:10:05 +0200
committermannol <eniz_vukovic@hotmail.com>2014-07-21 04:10:05 +0200
commit79115259a81dc958041f18573f34299c083cebea (patch)
tree594fbf60dc01e2aa78c775c4e2d9977c5b18752f /toxav/toxav.c
parent2ca2baf120c5dd4dcdd9c450ef35560b0726136f (diff)
parentb63e4ad88fb93820fb740372f36d74c65b8b7b81 (diff)
Fixed conflicts
Diffstat (limited to 'toxav/toxav.c')
-rw-r--r--toxav/toxav.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/toxav/toxav.c b/toxav/toxav.c
index 003c2116..0e9ef4c4 100644
--- a/toxav/toxav.c
+++ b/toxav/toxav.c
@@ -37,8 +37,9 @@
37#include <stdlib.h> 37#include <stdlib.h>
38#include <string.h> 38#include <string.h>
39 39
40/* Assume 60 fps*/ 40/* Assume 24 fps*/
41#define MAX_ENCODE_TIME_US ((1000 / 24) * 1000) 41#define MAX_ENCODE_TIME_US ((1000 / 24) * 1000)
42#define MAX_DECODE_TIME_US MAX_ENCODE_TIME_US
42 43
43#define MAX_VIDEOFRAME_SIZE 0x40000 /* 256KiB */ 44#define MAX_VIDEOFRAME_SIZE 0x40000 /* 256KiB */
44#define VIDEOFRAME_PIECE_SIZE 0x500 /* 1.25 KiB*/ 45#define VIDEOFRAME_PIECE_SIZE 0x500 /* 1.25 KiB*/
@@ -85,8 +86,8 @@ struct _ToxAv {
85 86
86const ToxAvCodecSettings av_DefaultSettings = { 87const ToxAvCodecSettings av_DefaultSettings = {
87 500, 88 500,
88 800, 89 1280,
89 600, 90 720,
90 91
91 64000, 92 64000,
92 20, 93 20,
@@ -816,7 +817,7 @@ void toxav_handle_packet(RTPSession *_session, RTPMessage *_msg)
816 /* piece of current frame */ 817 /* piece of current frame */
817 } else if (i > 0 && i < 128) { 818 } else if (i > 0 && i < 128) {
818 /* recieved a piece of a frame ahead, flush current frame and start reading this new frame */ 819 /* recieved a piece of a frame ahead, flush current frame and start reading this new frame */
819 int rc = vpx_codec_decode(&call->cs->v_decoder, call->frame_buf, call->frame_limit, NULL, 0); 820 int rc = vpx_codec_decode(&call->cs->v_decoder, call->frame_buf, call->frame_limit, NULL, MAX_DECODE_TIME_US);
820 call->frame_id = packet[0]; 821 call->frame_id = packet[0];
821 memset(call->frame_buf, 0, call->frame_limit); 822 memset(call->frame_buf, 0, call->frame_limit);
822 call->frame_limit = 0; 823 call->frame_limit = 0;