Changeset 1929 for pjproject/trunk
- Timestamp:
- Apr 14, 2008 4:04:30 AM (17 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/conference.c
r1898 r1929 1374 1374 if (cport->channel_count != conf->channel_count) { 1375 1375 if (cport->channel_count == 1) { 1376 pjmedia_convert_channel_1ton(f.buf, f.buf, 1376 pjmedia_convert_channel_1ton((pj_int16_t*)f.buf, 1377 (const pj_int16_t*)f.buf, 1377 1378 conf->channel_count, 1378 1379 cport->samples_per_frame, … … 1381 1382 conf->channel_count); 1382 1383 } else { /* conf->channel_count == 1 */ 1383 pjmedia_convert_channel_nto1(f.buf, f.buf, 1384 pjmedia_convert_channel_nto1((pj_int16_t*)f.buf, 1385 (const pj_int16_t*)f.buf, 1384 1386 cport->channel_count, 1385 1387 cport->samples_per_frame, -
pjproject/trunk/pjmedia/src/pjmedia/g711.c
r1846 r1929 584 584 #if !PLC_DISABLED 585 585 if (priv->plc_enabled) 586 pjmedia_plc_save( priv->plc, output->buf);586 pjmedia_plc_save( priv->plc, (pj_int16_t*)output->buf); 587 587 #endif 588 588 … … 595 595 struct pjmedia_frame *output) 596 596 { 597 struct g711_private *priv = codec->codec_data;597 struct g711_private *priv = (struct g711_private*) codec->codec_data; 598 598 599 599 if (!priv->plc_enabled) … … 603 603 PJMEDIA_CODEC_EPCMTOOSHORT); 604 604 605 pjmedia_plc_generate(priv->plc, output->buf);605 pjmedia_plc_generate(priv->plc, (pj_int16_t*)output->buf); 606 606 output->size = SAMPLES_PER_FRAME * 2; 607 607 -
pjproject/trunk/pjmedia/src/pjmedia/stereo_port.c
r1901 r1929 119 119 tmp_frame.buf = sport->put_buf; 120 120 if (sport->dn_port->info.channel_count == 1) { 121 pjmedia_convert_channel_nto1(tmp_frame.buf, frame->buf, 121 pjmedia_convert_channel_nto1((pj_int16_t*)tmp_frame.buf, 122 (const pj_int16_t*)frame->buf, 122 123 sport->base.info.channel_count, 123 124 sport->base.info.samples_per_frame, … … 125 126 0); 126 127 } else { 127 pjmedia_convert_channel_1ton(tmp_frame.buf, frame->buf, 128 pjmedia_convert_channel_1ton((pj_int16_t*)tmp_frame.buf, 129 (const pj_int16_t*)frame->buf, 128 130 sport->dn_port->info.channel_count, 129 131 sport->base.info.samples_per_frame, … … 176 178 177 179 if (sport->base.info.channel_count == 1) { 178 pjmedia_convert_channel_nto1(frame->buf, tmp_frame.buf, 180 pjmedia_convert_channel_nto1((pj_int16_t*)frame->buf, 181 (const pj_int16_t*)tmp_frame.buf, 179 182 sport->dn_port->info.channel_count, 180 183 sport->dn_port->info.samples_per_frame, 181 184 (sport->options & PJMEDIA_STEREO_MIX), 0); 182 185 } else { 183 pjmedia_convert_channel_1ton(frame->buf, tmp_frame.buf, 186 pjmedia_convert_channel_1ton((pj_int16_t*)frame->buf, 187 (const pj_int16_t*)tmp_frame.buf, 184 188 sport->base.info.channel_count, 185 189 sport->dn_port->info.samples_per_frame, -
pjproject/trunk/pjmedia/src/pjmedia/transport_srtp.c
r1881 r1929 212 212 "error while using pfkey" /* err_status_pfkey_err = 24 */ 213 213 }; 214 if (err >= 0 && err < PJ_ARRAY_SIZE(liberr)) {214 if (err >= 0 && err < (int)PJ_ARRAY_SIZE(liberr)) { 215 215 return liberr[err]; 216 216 } else { … … 264 264 PJ_DEF(void) pjmedia_srtp_setting_default(pjmedia_srtp_setting *opt) 265 265 { 266 inti;266 unsigned i; 267 267 268 268 pj_bzero(opt, sizeof(pjmedia_srtp_setting)); … … 289 289 transport_srtp *srtp; 290 290 pj_status_t status; 291 inti;291 unsigned i; 292 292 293 293 PJ_ASSERT_RETURN(endpt && p_tp, PJ_EINVAL); … … 821 821 char key[MAX_KEY_LEN]; 822 822 err_status_t err; 823 inti;823 unsigned i; 824 824 825 825 PJ_ASSERT_RETURN(MAX_KEY_LEN >= crypto_suites[cs_idx].cipher_key_len, … … 840 840 841 841 } while (!key_ok); 842 crypto->key.ptr = pj_pool_zalloc(pool, 842 crypto->key.ptr = (char*) 843 pj_pool_zalloc(pool, 843 844 crypto_suites[cs_idx].cipher_key_len); 844 845 pj_memcpy(crypto->key.ptr, key, crypto_suites[cs_idx].cipher_key_len); … … 923 924 } 924 925 tmp = pj_str(token); 925 crypto->key.ptr = pj_pool_zalloc(pool, MAX_KEY_LEN);926 crypto->key.ptr = (char*) pj_pool_zalloc(pool, MAX_KEY_LEN); 926 927 927 928 /* Decode key */ … … 953 954 pjmedia_sdp_attr *attr; 954 955 pj_str_t attr_value; 955 inti, j;956 unsigned i, j; 956 957 unsigned member_tp_option; 957 958 … … 1234 1235 1235 1236 /* our offer tag is always ordered by setting */ 1236 if (rem_tag < 1 || rem_tag > srtp->setting.crypto_count) {1237 if (rem_tag < 1 || rem_tag > (int)srtp->setting.crypto_count) { 1237 1238 DEACTIVATE_MEDIA(pool, m_loc); 1238 1239 return PJMEDIA_SRTP_ESDPINCRYPTOTAG; -
pjproject/trunk/pjnath/src/pjnath-test/sess_auth.c
r1916 r1929 164 164 PJ_UNUSED_ARG(unused); 165 165 166 PJ_LOG(5,("", " server thread started")); 167 166 168 while (!server->quit) { 167 169 pj_fd_set_t readset; … … 171 173 PJ_FD_SET(server->sock, &readset); 172 174 173 if (pj_sock_select(server->sock , &readset, NULL, NULL, &delay)==1 &&175 if (pj_sock_select(server->sock+1, &readset, NULL, NULL, &delay)==1 && 174 176 PJ_FD_ISSET(server->sock, &readset)) 175 177 { … … 384 386 PJ_FD_SET(client->sock, &readset); 385 387 386 if (pj_sock_select(client->sock , &readset, NULL, NULL, &delay)==1 &&388 if (pj_sock_select(client->sock+1, &readset, NULL, NULL, &delay)==1 && 387 389 PJ_FD_ISSET(client->sock, &readset)) 388 390 { … … 451 453 pj_bool_t dummy_mi, 452 454 453 pj_ stun_statusexpected_error,454 pj_st un_statusexpected_code,455 pj_bool_t expected_error, 456 pj_status_t expected_code, 455 457 const char *expected_realm, 456 458 const char *expected_nonce, … … 690 692 static int retransmit_check(void) 691 693 { 692 if (server->recv_count != PJ_STUN_MAX_TRANSMIT_COUNT) 694 695 if (server->recv_count != PJ_STUN_MAX_TRANSMIT_COUNT) { 696 PJ_LOG(3,("", " expecting %d retransmissions, got %d", 697 PJ_STUN_MAX_TRANSMIT_COUNT, server->recv_count)); 693 698 return -700; 699 } 694 700 if (client->recv_count != 0) 695 701 return -710; -
pjproject/trunk/pjnath/src/pjnath/turn_session.c
r1914 r1929 940 940 941 941 sess = (pj_turn_session*) pj_stun_session_get_user_data(stun); 942 return (*sess->cb.on_send_pkt)(sess, pkt, pkt_size,942 return (*sess->cb.on_send_pkt)(sess, (const pj_uint8_t*)pkt, pkt_size, 943 943 dst_addr, addr_len); 944 944 } … … 1124 1124 { 1125 1125 pj_turn_session *sess; 1126 int method = PJ_STUN_GET_METHOD(tdata->msg->hdr.type); 1126 enum pj_stun_method_e method = (enum pj_stun_method_e) 1127 PJ_STUN_GET_METHOD(tdata->msg->hdr.type); 1127 1128 1128 1129 PJ_UNUSED_ARG(src_addr); … … 1409 1410 pj_lock_acquire(sess->lock); 1410 1411 1411 eid = e->id;1412 eid = (enum timer_id_t) e->id; 1412 1413 e->id = TIMER_NONE; 1413 1414 -
pjproject/trunk/pjnath/src/pjturn-client/client_main.c
r1914 r1929 122 122 * Create peers 123 123 */ 124 for (i=0; i< PJ_ARRAY_SIZE(g.peer); ++i) {124 for (i=0; i<(int)PJ_ARRAY_SIZE(g.peer); ++i) { 125 125 int len; 126 126 pj_sockaddr addr; … … 203 203 /* Poll peer sockets */ 204 204 PJ_FD_ZERO(&readset); 205 for (i=0; i< PJ_ARRAY_SIZE(g.peer); ++i) {205 for (i=0; i<(int)PJ_ARRAY_SIZE(g.peer); ++i) { 206 206 PJ_FD_SET(g.peer[i].sock, &readset); 207 207 if (g.peer[i].sock > n) … … 213 213 214 214 /* Handle incoming data on peer socket */ 215 for (i=0; i< PJ_ARRAY_SIZE(g.peer); ++i) {215 for (i=0; i<(int)PJ_ARRAY_SIZE(g.peer); ++i) { 216 216 char buf[128]; 217 217 pj_ssize_t len; … … 267 267 cred.data.static_cred.realm = pj_str(o.realm); 268 268 cred.data.static_cred.username = pj_str(o.user_name); 269 cred.data.static_cred.data_type = 0;269 cred.data.static_cred.data_type = PJ_STUN_PASSWD_PLAIN; 270 270 cred.data.static_cred.data = pj_str(o.password); 271 271 //cred.data.static_cred.nonce = pj_str(o.nonce); -
pjproject/trunk/pjnath/src/pjturn-srv/auth.c
r1924 r1929 103 103 for (i=0; i<PJ_ARRAY_SIZE(g_cred); ++i) { 104 104 if (pj_stricmp2(username, g_cred[i].username) == 0) { 105 *data_type = 0;105 *data_type = PJ_STUN_PASSWD_PLAIN; 106 106 *data = pj_str(g_cred[i].passwd); 107 107 return PJ_SUCCESS; -
pjproject/trunk/pjnath/src/pjturn-srv/main.c
r1924 r1929 21 21 22 22 #define REALM "pjsip.org" 23 #define TURN_PORT PJ_STUN_TURN_PORT 24 //#define TURN_PORT 34780 23 //#define TURN_PORT PJ_STUN_TURN_PORT 24 #define TURN_PORT 34780 25 #define LOG_LEVEL 4 25 26 26 27 … … 157 158 puts("Server is running"); 158 159 160 pj_log_set_level(LOG_LEVEL); 161 159 162 console_main(srv); 160 163 -
pjproject/trunk/pjnath/src/pjturn-srv/server.c
r1924 r1929 567 567 /* Get TURN allocation from the source address */ 568 568 pj_lock_acquire(srv->core.lock); 569 alloc = pj_hash_get(srv->tables.alloc, &pkt->src, sizeof(pkt->src), NULL); 569 alloc = (pj_turn_allocation*) 570 pj_hash_get(srv->tables.alloc, &pkt->src, sizeof(pkt->src), NULL); 570 571 pj_lock_release(srv->core.lock); 571 572 -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
r1908 r1929 520 520 /* Remote doesn't support rport */ 521 521 rport = via->sent_by.port; 522 if (rport==0) 523 rport = pjsip_transport_get_default_port_for_type(tp->key.type); 522 if (rport==0) { 523 pjsip_transport_type_e tp_type; 524 tp_type = (pjsip_transport_type_e) tp->key.type; 525 rport = pjsip_transport_get_default_port_for_type(tp_type); 526 } 524 527 } else 525 528 rport = via->rport_param; … … 535 538 pjsip_parse_uri(pool, acc->contact.ptr, acc->contact.slen, 0); 536 539 pj_assert(uri != NULL); 537 uri = pjsip_uri_get_uri(uri); 538 539 if (uri->port == 0) 540 uri->port = pjsip_transport_get_default_port_for_type(tp->key.type); 540 uri = (pjsip_sip_uri*) pjsip_uri_get_uri(uri); 541 542 if (uri->port == 0) { 543 pjsip_transport_type_e tp_type; 544 tp_type = (pjsip_transport_type_e) tp->key.type; 545 uri->port = pjsip_transport_get_default_port_for_type(tp_type); 546 } 541 547 542 548 if (uri->port == rport && … … 573 579 int len; 574 580 575 tmp = pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE);581 tmp = (char*) pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE); 576 582 len = pj_ansi_snprintf(tmp, PJSIP_MAX_URL_SIZE, 577 583 "<sip:%.*s@%.*s:%d;transport=%s>", -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r1912 r1929 714 714 if (rdata->msg_info.msg->body) { 715 715 status = pjmedia_sdp_parse(rdata->tp_info.pool, 716 rdata->msg_info.msg->body->data,716 (char*)rdata->msg_info.msg->body->data, 717 717 rdata->msg_info.msg->body->len, &offer); 718 718 if (status != PJ_SUCCESS) {
Note: See TracChangeset
for help on using the changeset viewer.