Changeset 141:c48f25fd6495

Show
Ignore:
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
  • SConstruct

    r119 r141  
    77        BoolOption('video', "Enable Video Support", True), 
    88        BoolOption('ssl', "Enable SSL support",  True), 
    9         BoolOption('httptunnel', "Enable HTTP tunneling support", True), 
     9        BoolOption('httptunnel', "Enable HTTP tunneling support", False), 
    1010        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), 
    1212        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), 
    1515        BoolOption('libsamplerate', "Enable usage of libsamplerate", False), 
    1616        BoolOption('phapi_audio_arts', "Build PortAudio/arts support",  False), 
     
    2626        BoolOption('debug', "Enable debug build", True), 
    2727        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), 
    2930        ('target_os', "Target platform", sys.platform), 
    3031        ('VERONA_VERSION', "Software version", "0.0.2") 
  • ortp/src/rtpsession.c

    r113 r141  
    3232#include <sys/socket.h> 
    3333#include <netinet/in.h> 
     34#include <netinet/ip.h> 
    3435#include <arpa/inet.h> 
    3536#ifdef INET6 
     
    6566 
    6667 
     68#define USING_QOS(s) ((s)->flags & RTP_SESSION_USING_QOS) 
    6769#define USING_TUNNEL(s) ((s)->flags & RTP_SESSION_USING_TUNNELS) 
    6870#define TUNNEL_SEND(t, b, l) ((t)->tunnel_send((t)->h_tunnel, b, l)) 
     
    8688{ 
    8789  session->markbit = mark; 
     90} 
     91void 
     92rtp_session_set_qos (RtpSession * session, int qos) 
     93{ 
     94  session->qos = IPTOS_TOS(qos); 
     95  session->flags |= RTP_SESSION_USING_QOS; 
    8896} 
    8997 
     
    617625                     getSocketError ()); 
    618626        } 
     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        } 
    619640    } 
    620641 
     
    647668          g_warning ("Fail to set rtcp address reusable: %s.", 
    648669                     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            } 
    649683        } 
    650684 
     
    883917  session->rtcp.socket = rtcpfd; 
    884918  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 
    885941#ifdef RTCP 
    886942//<JT> 
     
    12741330  RtpScheduler *sched; 
    12751331#endif 
    1276  
    12771332  if (session->flags & RTP_SESSION_SEND_NOT_STARTED) 
    12781333    { 
  • ortp/src/rtpsession.c

    r137 r141  
    13531353  rtp_session_lock (session); 
    13541354 
     1355  timestamp += session->base_timestamp; 
    13551356  /* set a seq number */ 
    13561357  rtp->seq_number = session->rtp.snd_seq; 
  • phapi/phapi.c

    r114 r141  
    34103410    if (s->newstreams | s->activestreams) 
    34113411      { 
     3412        s->qos = phcfg.qos; 
     3413 
    34123414        if (!ca->audiodev) 
    34133415          ca->audiodev = phcfg.audio_dev; 
  • phapi/phapi.c

    r126 r141  
    5858#define strcasecmp stricmp 
    5959#define usleep(usecs) Sleep((usecs)/1000) 
     60#define random rand 
    6061#endif 
    6162 
     
    444445  buf[0] = 0; 
    445446 
     447  if (port == -1) 
     448    port = 10600 + random() % 4096; 
    446449 
    447450  while(1) 
     
    460463_get_local_video_sdp_port(char buf[])  
    461464{ 
    462   int port = atoi(phcfg.local_rtp_port) + 2
     465  int port = atoi(phcfg.local_rtp_port)
    463466  int i; 
    464467 
    465468 
    466469  buf[0] = 0; 
     470 
     471  if (port == -1) 
     472    port = 10600 + random() % 4096; 
     473  else 
     474    port += 2; 
     475 
     476 
    467477 
    468478  while(1) 
     
    35933603    if (rca) 
    35943604    { 
    3595         ph_refer_notify(rca->rdid, je->status_code, "Answered", 1); 
     3605        ph_refer_notify(rca->rdid, je->status_code, "OK", 1); 
    35963606    } 
    35973607 
  • phapi/phapi.h

    r117 r141  
    968968  int softboost;            /* to be removed */ 
    969969  int nomedia; 
    970   int noaec;                           /* when non-zero - disable aec */ 
     970  int noaec;                /* when non-zero - disable aec */ 
    971971  unsigned int vad;         /* if bit31=1  DTX/VAD features activated and bits0-30 contains the power threshold */ 
    972972  int cng;                  /* if 1,  CNG feature will be negotiated */ 
     
    999999  struct phVideoConfig video_config; 
    10001000  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 */ 
    10011003}; 
    10021004#endif 
  • phapi/phapi.h

    r135 r141  
    168168#define PH_STREAM_VIDEO_RX (1 << 1) 
    169169#define PH_STREAM_VIDEO_TX (1 << 2) 
    170  
     170#define PH_OVERRIDE_AUDIO_ADDR (1 << 3) 
     171#define PH_OVERRIDE_VIDEO_ADDR (1 << 4) 
    171172 
    172173/********************TELEPHONY*********************/