Changeset 4581 for pjproject/trunk/pjsip-apps/src/python/_pjsua.h
- Timestamp:
- Aug 9, 2013 8:39:20 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/python/_pjsua.h
r3553 r4581 1328 1328 PyObject *public_addr; 1329 1329 PyObject *bound_addr; 1330 pj_qos_type qos_type; 1331 pj_uint8_t qos_params_flags; 1332 pj_uint8_t qos_params_dscp_val; 1333 pj_uint8_t qos_params_so_prio; 1334 pj_qos_wmm_prio qos_params_wmm_prio; 1335 1330 1336 } PyObj_pjsua_transport_config; 1331 1337 … … 1338 1344 { 1339 1345 Py_XDECREF(self->public_addr); 1340 Py_XDECREF(self->bound_addr); 1346 Py_XDECREF(self->bound_addr); 1341 1347 self->ob_type->tp_free((PyObject*)self); 1342 1348 } … … 1350 1356 cfg->bound_addr = PyString_ToPJ(obj->bound_addr); 1351 1357 cfg->port = obj->port; 1352 1358 cfg->qos_type = obj->qos_type; 1359 cfg->qos_params.flags = obj->qos_params_flags; 1360 cfg->qos_params.dscp_val = obj->qos_params_dscp_val; 1361 cfg->qos_params.so_prio = obj->qos_params_so_prio; 1362 cfg->qos_params.wmm_prio = obj->qos_params_wmm_prio; 1353 1363 } 1354 1364 … … 1362 1372 obj->bound_addr = PyString_FromPJ(&cfg->bound_addr); 1363 1373 1364 obj->port = cfg->port; 1374 obj->port = cfg->port; 1375 obj->qos_type = cfg->qos_type; 1376 obj->qos_params_flags = cfg->qos_params.flags; 1377 obj->qos_params_dscp_val = cfg->qos_params.dscp_val; 1378 obj->qos_params_so_prio = cfg->qos_params.so_prio; 1379 obj->qos_params_wmm_prio = cfg->qos_params.wmm_prio; 1380 1365 1381 } 1366 1382 … … 1382 1398 if (self != NULL) { 1383 1399 self->public_addr = PyString_FromString(""); 1384 1400 self->bound_addr = PyString_FromString(""); 1385 1401 } 1386 1402 … … 1420 1436 "used for that purpose)." 1421 1437 }, 1438 { 1439 "qos_type", T_INT, 1440 offsetof(PyObj_pjsua_transport_config, qos_type), 0, 1441 "High level traffic classification." 1442 "Enumerator:" 1443 " 0: PJ_QOS_TYPE_BEST_EFFORT" 1444 " Best effort traffic (default value). Any QoS function calls with " 1445 " specifying this value are effectively no-op" 1446 " 1: PJ_QOS_TYPE_BACKGROUND" 1447 " Background traffic." 1448 " 2: PJ_QOS_TYPE_VIDEO" 1449 " Video traffic." 1450 " 3: PJ_QOS_TYPE_VOICE" 1451 " Voice traffic." 1452 " 4: PJ_QOS_TYPE_CONTROL" 1453 " Control traffic." 1454 }, 1455 { 1456 "qos_params_flags", T_INT, 1457 offsetof(PyObj_pjsua_transport_config, qos_params_flags), 0, 1458 "Determines which values to set, bitmask of pj_qos_flag." 1459 " PJ_QOS_PARAM_HAS_DSCP = 1" 1460 " PJ_QOS_PARAM_HAS_SO_PRIO = 2" 1461 " PJ_QOS_PARAM_HAS_WMM = 4" 1462 }, 1463 { 1464 "qos_params_dscp_val", T_INT, 1465 offsetof(PyObj_pjsua_transport_config, qos_params_dscp_val), 0, 1466 "The 6 bits DSCP value to set." 1467 "Example: 46=EF, 26=AF31, 24=CS3..." 1468 }, 1469 { 1470 "qos_params_so_prio", T_INT, 1471 offsetof(PyObj_pjsua_transport_config, qos_params_so_prio), 0, 1472 "Socket SO_PRIORITY value." 1473 }, 1474 { 1475 "qos_params_wmm_prio", T_INT, 1476 offsetof(PyObj_pjsua_transport_config, qos_params_wmm_prio), 0, 1477 "Standard WMM priorities." 1478 "Enumerator:" 1479 " 0: PJ_QOS_WMM_PRIO_BULK_EFFORT" 1480 " Bulk effort priority" 1481 " 1: PJ_QOS_WMM_PRIO_BULK" 1482 " Bulk priority." 1483 " 2: PJ_QOS_WMM_PRIO_VIDEO" 1484 " Video priority" 1485 " 3: PJ_QOS_WMM_PRIO_VOICE" 1486 " Voice priority." 1487 }, 1422 1488 {NULL} /* Sentinel */ 1423 1489 }; … … 1676 1742 unsigned use_srtp; 1677 1743 unsigned srtp_secure_signaling; 1744 PyObject *rtp_transport_cfg; 1678 1745 } PyObj_pjsua_acc_config; 1679 1746 … … 1695 1762 Py_XDECREF(self->contact_uri_params); 1696 1763 Py_XDECREF(self->ka_data); 1764 Py_XDECREF(self->rtp_transport_cfg); 1697 1765 self->ob_type->tp_free((PyObject*)self); 1698 1766 } … … 1728 1796 for (i=0; i<cfg->cred_count; ++i) { 1729 1797 PyObj_pjsip_cred_info * ci; 1730 1798 1731 1799 ci = (PyObj_pjsip_cred_info *) 1732 1800 PyObj_pjsip_cred_info_new(&PyTyp_pjsip_cred_info,NULL,NULL); … … 1756 1824 obj->use_srtp = cfg->use_srtp; 1757 1825 obj->srtp_secure_signaling = cfg->srtp_secure_signaling; 1826 1827 Py_XDECREF(obj->rtp_transport_cfg); 1828 PyObj_pjsua_transport_config *tconf; 1829 tconf = (PyObj_pjsua_transport_config*) PyObj_pjsua_transport_config_new(&PyTyp_pjsua_transport_config,NULL, NULL); 1830 PyObj_pjsua_transport_config_import(tconf, &cfg->rtp_cfg); 1831 obj->rtp_transport_cfg = (PyObject *) tconf; 1758 1832 } 1759 1833 … … 1785 1859 cfg->cred_count = PJ_ARRAY_SIZE(cfg->cred_info); 1786 1860 for (i = 0; i < cfg->cred_count; i++) { 1787 1788 ci = (PyObj_pjsip_cred_info*) 1861 PyObj_pjsip_cred_info *ci; 1862 ci = (PyObj_pjsip_cred_info*) 1789 1863 PyList_GetItem((PyObject *)obj->cred_info, i); 1790 1864 PyObj_pjsip_cred_info_export(&cfg->cred_info[i], ci); … … 1806 1880 cfg->use_srtp = obj->use_srtp; 1807 1881 cfg->srtp_secure_signaling = obj->srtp_secure_signaling; 1882 1883 PyObj_pjsua_transport_config *tconf; 1884 tconf = (PyObj_pjsua_transport_config*) obj->rtp_transport_cfg; 1885 PyObj_pjsua_transport_config_export(&cfg->rtp_cfg, tconf); 1808 1886 } 1809 1887 … … 1997 2075 offsetof(PyObj_pjsua_acc_config, srtp_secure_signaling), 0, 1998 2076 "Specify if SRTP requires secure signaling to be used." 2077 }, 2078 { 2079 "rtp_transport_cfg", T_OBJECT_EX, 2080 offsetof(PyObj_pjsua_acc_config, rtp_transport_cfg), 0, 2081 "Transport configuration for RTP." 1999 2082 }, 2000 2083
Note: See TracChangeset
for help on using the changeset viewer.