Changeset 141:c48f25fd6495
- Timestamp:
- 02/12/07 14:22:38
(2 years ago)
- Author:
- vadim@mbdsys.com
- Parents:
119:478ba0a42f27 140:fc10cb48c375
- Message:
Merge with verona.int
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r119 |
r141 |
|
| 7 | 7 | BoolOption('video', "Enable Video Support", True), |
|---|
| 8 | 8 | BoolOption('ssl', "Enable SSL support", True), |
|---|
| 9 | | BoolOption('httptunnel', "Enable HTTP tunneling support", True), |
|---|
| | 9 | BoolOption('httptunnel', "Enable HTTP tunneling support", False), |
|---|
| 10 | 10 | BoolOption('netlib', "Enable netlib module support", False), |
|---|
| 11 | | BoolOption('phapi_embed', 'Compile PHPAPI for embedded environment', False), |
|---|
| | 11 | BoolOption('phapi_embed', 'Compile PHPAPI for embedded environment', True), |
|---|
| 12 | 12 | BoolOption('phapi_video_hack', "enable VIDEO HACK", False), |
|---|
| 13 | | BoolOption('shared_phapi', "Compile PHAPI as shared library", True), |
|---|
| 14 | | BoolOption('vcproj', "Build .vcproj files for use with debugger", True), |
|---|
| | 13 | BoolOption('shared_phapi', "Compile PHAPI as shared library", False), |
|---|
| | 14 | BoolOption('vcproj', "Build .vcproj files for use with debugger", False), |
|---|
| 15 | 15 | BoolOption('libsamplerate', "Enable usage of libsamplerate", False), |
|---|
| 16 | 16 | BoolOption('phapi_audio_arts', "Build PortAudio/arts support", False), |
|---|
| … | … | |
| 26 | 26 | BoolOption('debug', "Enable debug build", True), |
|---|
| 27 | 27 | BoolOption('qos_debug', "Enable QoS debugging functionality", False), |
|---|
| 28 | | BoolOption('enable_alsa', "Disable ALSA driver", False), |
|---|
| | 28 | BoolOption('enable_alsa', "Disable ALSA driver", True), |
|---|
| | 29 | BoolOption('net_driver', "CASTEL, net_driver to talk with MEDIA", True), |
|---|
| 29 | 30 | ('target_os', "Target platform", sys.platform), |
|---|
| 30 | 31 | ('VERONA_VERSION', "Software version", "0.0.2") |
|---|
| r113 |
r141 |
|
| 32 | 32 | #include <sys/socket.h> |
|---|
| 33 | 33 | #include <netinet/in.h> |
|---|
| | 34 | #include <netinet/ip.h> |
|---|
| 34 | 35 | #include <arpa/inet.h> |
|---|
| 35 | 36 | #ifdef INET6 |
|---|
| … | … | |
| 65 | 66 | |
|---|
| 66 | 67 | |
|---|
| | 68 | #define USING_QOS(s) ((s)->flags & RTP_SESSION_USING_QOS) |
|---|
| 67 | 69 | #define USING_TUNNEL(s) ((s)->flags & RTP_SESSION_USING_TUNNELS) |
|---|
| 68 | 70 | #define TUNNEL_SEND(t, b, l) ((t)->tunnel_send((t)->h_tunnel, b, l)) |
|---|
| … | … | |
| 86 | 88 | { |
|---|
| 87 | 89 | session->markbit = mark; |
|---|
| | 90 | } |
|---|
| | 91 | void |
|---|
| | 92 | rtp_session_set_qos (RtpSession * session, int qos) |
|---|
| | 93 | { |
|---|
| | 94 | session->qos = IPTOS_TOS(qos); |
|---|
| | 95 | session->flags |= RTP_SESSION_USING_QOS; |
|---|
| 88 | 96 | } |
|---|
| 89 | 97 | |
|---|
| … | … | |
| 617 | 625 | getSocketError ()); |
|---|
| 618 | 626 | } |
|---|
| | 627 | /* set the TOS bits if needed address reusable */ |
|---|
| | 628 | |
|---|
| | 629 | if(USING_QOS(session)) |
|---|
| | 630 | { |
|---|
| | 631 | gint tosval = session->qos; |
|---|
| | 632 | err = setsockopt (session->rtp.socket, SOL_IP, IP_TOS, |
|---|
| | 633 | (void *) &tosval, sizeof (tosval)); |
|---|
| | 634 | if (err < 0) |
|---|
| | 635 | { |
|---|
| | 636 | g_warning ("Fail to set rtp address reusable: %s.", |
|---|
| | 637 | getSocketError ()); |
|---|
| | 638 | } |
|---|
| | 639 | } |
|---|
| 619 | 640 | } |
|---|
| 620 | 641 | |
|---|
| … | … | |
| 647 | 668 | g_warning ("Fail to set rtcp address reusable: %s.", |
|---|
| 648 | 669 | getSocketError ()); |
|---|
| | 670 | } |
|---|
| | 671 | /* set the TOS bits if needed address reusable */ |
|---|
| | 672 | |
|---|
| | 673 | if(USING_QOS(session)) |
|---|
| | 674 | { |
|---|
| | 675 | gint tosval = session->qos; |
|---|
| | 676 | err = setsockopt (session->rtcp.socket, SOL_IP, IP_TOS, |
|---|
| | 677 | (void *) &tosval, sizeof (tosval)); |
|---|
| | 678 | if (err < 0) |
|---|
| | 679 | { |
|---|
| | 680 | g_warning ("Fail to set rtp address reusable: %s.", |
|---|
| | 681 | getSocketError ()); |
|---|
| | 682 | } |
|---|
| 649 | 683 | } |
|---|
| 650 | 684 | |
|---|
| … | … | |
| 883 | 917 | session->rtcp.socket = rtcpfd; |
|---|
| 884 | 918 | session->flags |= RTP_SESSION_USING_EXT_SOCKETS; |
|---|
| | 919 | |
|---|
| | 920 | /* set the TOS bits if needed address reusable */ |
|---|
| | 921 | |
|---|
| | 922 | if(USING_QOS(session)) |
|---|
| | 923 | { |
|---|
| | 924 | gint err; |
|---|
| | 925 | gint tosval = session->qos; |
|---|
| | 926 | err = setsockopt (session->rtp.socket, SOL_IP, IP_TOS, |
|---|
| | 927 | (void *) &tosval, sizeof (tosval)); |
|---|
| | 928 | if (err < 0) |
|---|
| | 929 | { |
|---|
| | 930 | g_warning ("Fail to set TOS %x on rtp socket: %s.", tosval, getSocketError ()); |
|---|
| | 931 | } |
|---|
| | 932 | err = setsockopt (session->rtcp.socket, SOL_IP, IP_TOS, |
|---|
| | 933 | (void *) &tosval, sizeof (tosval)); |
|---|
| | 934 | if (err < 0) |
|---|
| | 935 | { |
|---|
| | 936 | g_warning ("Fail to set TOS %x on rtcp socket: %s.", tosval, getSocketError ()); |
|---|
| | 937 | } |
|---|
| | 938 | } |
|---|
| | 939 | |
|---|
| | 940 | |
|---|
| 885 | 941 | #ifdef RTCP |
|---|
| 886 | 942 | //<JT> |
|---|
| … | … | |
| 1274 | 1330 | RtpScheduler *sched; |
|---|
| 1275 | 1331 | #endif |
|---|
| 1276 | | |
|---|
| 1277 | 1332 | if (session->flags & RTP_SESSION_SEND_NOT_STARTED) |
|---|
| 1278 | 1333 | { |
|---|
| r137 |
r141 |
|
| 1353 | 1353 | rtp_session_lock (session); |
|---|
| 1354 | 1354 | |
|---|
| | 1355 | timestamp += session->base_timestamp; |
|---|
| 1355 | 1356 | /* set a seq number */ |
|---|
| 1356 | 1357 | rtp->seq_number = session->rtp.snd_seq; |
|---|
| r114 |
r141 |
|
| 3410 | 3410 | if (s->newstreams | s->activestreams) |
|---|
| 3411 | 3411 | { |
|---|
| | 3412 | s->qos = phcfg.qos; |
|---|
| | 3413 | |
|---|
| 3412 | 3414 | if (!ca->audiodev) |
|---|
| 3413 | 3415 | ca->audiodev = phcfg.audio_dev; |
|---|
| r126 |
r141 |
|
| 58 | 58 | #define strcasecmp stricmp |
|---|
| 59 | 59 | #define usleep(usecs) Sleep((usecs)/1000) |
|---|
| | 60 | #define random rand |
|---|
| 60 | 61 | #endif |
|---|
| 61 | 62 | |
|---|
| … | … | |
| 444 | 445 | buf[0] = 0; |
|---|
| 445 | 446 | |
|---|
| | 447 | if (port == -1) |
|---|
| | 448 | port = 10600 + random() % 4096; |
|---|
| 446 | 449 | |
|---|
| 447 | 450 | while(1) |
|---|
| … | … | |
| 460 | 463 | _get_local_video_sdp_port(char buf[]) |
|---|
| 461 | 464 | { |
|---|
| 462 | | int port = atoi(phcfg.local_rtp_port) + 2; |
|---|
| | 465 | int port = atoi(phcfg.local_rtp_port); |
|---|
| 463 | 466 | int i; |
|---|
| 464 | 467 | |
|---|
| 465 | 468 | |
|---|
| 466 | 469 | buf[0] = 0; |
|---|
| | 470 | |
|---|
| | 471 | if (port == -1) |
|---|
| | 472 | port = 10600 + random() % 4096; |
|---|
| | 473 | else |
|---|
| | 474 | port += 2; |
|---|
| | 475 | |
|---|
| | 476 | |
|---|
| 467 | 477 | |
|---|
| 468 | 478 | while(1) |
|---|
| … | … | |
| 3593 | 3603 | if (rca) |
|---|
| 3594 | 3604 | { |
|---|
| 3595 | | ph_refer_notify(rca->rdid, je->status_code, "Answered", 1); |
|---|
| | 3605 | ph_refer_notify(rca->rdid, je->status_code, "OK", 1); |
|---|
| 3596 | 3606 | } |
|---|
| 3597 | 3607 | |
|---|
| r117 |
r141 |
|
| 968 | 968 | int softboost; /* to be removed */ |
|---|
| 969 | 969 | int nomedia; |
|---|
| 970 | | int noaec; /* when non-zero - disable aec */ |
|---|
| | 970 | int noaec; /* when non-zero - disable aec */ |
|---|
| 971 | 971 | unsigned int vad; /* if bit31=1 DTX/VAD features activated and bits0-30 contains the power threshold */ |
|---|
| 972 | 972 | int cng; /* if 1, CNG feature will be negotiated */ |
|---|
| … | … | |
| 999 | 999 | struct phVideoConfig video_config; |
|---|
| 1000 | 1000 | char plugin_path[256]; /*!< where to look for plugin modules */ |
|---|
| | 1001 | int qos; /* QoS bits to add to TOS to : 0x2 min cost, 0x4 max reliability, 0x8 max throughput, 0x10 min delay */ |
|---|
| | 1002 | unsigned int hdxlevel; /* if bit31=1 HDX level is valid and bits0-30 contains the power threshold */ |
|---|
| 1001 | 1003 | }; |
|---|
| 1002 | 1004 | #endif |
|---|
| r135 |
r141 |
|
| 168 | 168 | #define PH_STREAM_VIDEO_RX (1 << 1) |
|---|
| 169 | 169 | #define PH_STREAM_VIDEO_TX (1 << 2) |
|---|
| 170 | | |
|---|
| | 170 | #define PH_OVERRIDE_AUDIO_ADDR (1 << 3) |
|---|
| | 171 | #define PH_OVERRIDE_VIDEO_ADDR (1 << 4) |
|---|
| 171 | 172 | |
|---|
| 172 | 173 | /********************TELEPHONY*********************/ |
|---|