Removed logging to stderr and fixed timeout handling

This commit is contained in:
mannol 2014-03-12 00:22:49 +01:00
parent 54b1dafb0b
commit 9ba7cb7e76
3 changed files with 10 additions and 10 deletions

View File

@ -197,7 +197,7 @@ int init_video_decoder(CodecState *cs)
{
if (vpx_codec_dec_init_ver(&cs->v_decoder, VIDEO_CODEC_DECODER_INTERFACE, NULL, 0,
VPX_DECODER_ABI_VERSION) != VPX_CODEC_OK) {
fprintf(stderr, "Init video_decoder failed!\n");
/*fprintf(stderr, "Init video_decoder failed!\n");*/
return -1;
}
@ -210,7 +210,7 @@ int init_audio_decoder(CodecState *cs, uint32_t audio_channels)
cs->audio_decoder = opus_decoder_create(cs->audio_sample_rate, audio_channels, &rc );
if ( rc != OPUS_OK ) {
fprintf(stderr, "Error while starting audio decoder!\n");
/*fprintf(stderr, "Error while starting audio decoder!\n");*/
return -1;
}
@ -224,7 +224,7 @@ int init_video_encoder(CodecState *cs, uint16_t width, uint16_t height, uint32_t
int res = vpx_codec_enc_config_default(VIDEO_CODEC_ENCODER_INTERFACE, &cfg, 0);
if (res) {
fprintf(stderr, "Failed to get config: %s\n", vpx_codec_err_to_string(res));
/*fprintf(stderr, "Failed to get config: %s\n", vpx_codec_err_to_string(res));*/
return -1;
}
@ -234,7 +234,7 @@ int init_video_encoder(CodecState *cs, uint16_t width, uint16_t height, uint32_t
if (vpx_codec_enc_init_ver(&cs->v_encoder, VIDEO_CODEC_ENCODER_INTERFACE, &cfg, 0,
VPX_ENCODER_ABI_VERSION) != VPX_CODEC_OK) {
fprintf(stderr, "Failed to initialize encoder\n");
/*fprintf(stderr, "Failed to initialize encoder\n");*/
return -1;
}

View File

@ -729,7 +729,10 @@ void *handle_timeout ( void *arg )
{
/* Send hangup either way */
MSISession *_session = arg;
if ( callbacks[MSI_OnRequestTimeout].function ) callbacks[MSI_OnRequestTimeout].function ( callbacks[MSI_OnRequestTimeout].data );
if ( callbacks[MSI_OnEnding].function ) callbacks[MSI_OnEnding ].function ( callbacks[MSI_OnEnding].data );
if ( _session && _session->call ) {
uint32_t *_peers = _session->call->peers;
@ -744,9 +747,6 @@ void *handle_timeout ( void *arg )
}
if ( callbacks[MSI_OnRequestTimeout].function ) callbacks[MSI_OnRequestTimeout].function ( callbacks[MSI_OnRequestTimeout].data );
if ( callbacks[MSI_OnEnding].function ) callbacks[MSI_OnEnding ].function ( callbacks[MSI_OnEnding].data );
return NULL;
}

View File

@ -751,7 +751,7 @@ int rtp_send_msg ( RTPSession *session, Messenger *messenger, const uint8_t *dat
/*if ( full_length != sendpacket ( messenger->net, *((IP_Port*) &session->dest), _send_data, full_length) ) {*/
if ( full_length != send_custom_user_packet(messenger, session->dest, _send_data, full_length) ) {
fprintf(stderr, "Rtp error: %s\n", strerror(errno));
/*fprintf(stderr, "Rtp error: %s\n", strerror(errno));*/
return -1;
}
@ -823,7 +823,7 @@ RTPSession *rtp_init_session ( int payload_type,
/*networking_registerhandler(messenger->net, payload_type, rtp_handle_packet, _retu);*/
if ( -1 == custom_user_packet_registerhandler(messenger, friend_num, payload_type, rtp_handle_packet, _retu) ) {
fprintf(stderr, "Error setting custom register handler for rtp session\n");
/*fprintf(stderr, "Error setting custom register handler for rtp session\n");*/
free(_retu);
return NULL;
}