| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
#include <pjsua-lib/pjsua.h> |
| 19 |
#include <pjsua-lib/pjsua_internal.h> |
| 20 |
|
| 21 |
#if defined(PJSUA_MEDIA_HAS_PJMEDIA) && PJSUA_MEDIA_HAS_PJMEDIA != 0 |
| 22 |
# error The PJSUA_MEDIA_HAS_PJMEDIA should be declared as zero |
| 23 |
#endif |
| 24 |
|
| 25 |
|
| 26 |
#define THIS_FILE "alt_pjsua_aud.c" |
| 27 |
#define UNIMPLEMENTED(func) PJ_LOG(2,(THIS_FILE, "*** Call to unimplemented function %s ***", #func)); |
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
static struct alt_codec |
| 38 |
{ |
| 39 |
pj_str_t encoding_name; |
| 40 |
pj_uint8_t payload_type; |
| 41 |
unsigned clock_rate; |
| 42 |
unsigned channel_cnt; |
| 43 |
unsigned frm_ptime; |
| 44 |
unsigned avg_bps; |
| 45 |
unsigned max_bps; |
| 46 |
} codec_list[] = |
| 47 |
{ |
| 48 |
|
| 49 |
{ { "G729", 4 }, 18, 8000, 1, 10, 8000, 8000 }, |
| 50 |
|
| 51 |
{ { "PCMU", 4 }, 0, 8000, 1, 10, 64000, 64000 }, |
| 52 |
|
| 53 |
{ { "FOO", 3 }, PJMEDIA_RTP_PT_START+0, 16000, 1, 20, 5000, 5000 }, |
| 54 |
}; |
| 55 |
|
| 56 |
static struct alt_codec_factory |
| 57 |
{ |
| 58 |
pjmedia_codec_factory base; |
| 59 |
} alt_codec_factory; |
| 60 |
|
| 61 |
static pj_status_t alt_codec_test_alloc( pjmedia_codec_factory *factory, |
| 62 |
const pjmedia_codec_info *id ) |
| 63 |
{ |
| 64 |
unsigned i; |
| 65 |
for (i=0; i<PJ_ARRAY_SIZE(codec_list); ++i) { |
| 66 |
if (pj_stricmp(&id->encoding_name, &codec_list[i].encoding_name)==0) |
| 67 |
return PJ_SUCCESS; |
| 68 |
} |
| 69 |
return PJ_ENOTSUP; |
| 70 |
} |
| 71 |
|
| 72 |
static pj_status_t alt_codec_default_attr( pjmedia_codec_factory *factory, |
| 73 |
const pjmedia_codec_info *id, |
| 74 |
pjmedia_codec_param *attr ) |
| 75 |
{ |
| 76 |
struct alt_codec *ac; |
| 77 |
unsigned i; |
| 78 |
|
| 79 |
PJ_UNUSED_ARG(factory); |
| 80 |
|
| 81 |
for (i=0; i<PJ_ARRAY_SIZE(codec_list); ++i) { |
| 82 |
if (pj_stricmp(&id->encoding_name, &codec_list[i].encoding_name)==0) |
| 83 |
break; |
| 84 |
} |
| 85 |
if (i == PJ_ARRAY_SIZE(codec_list)) |
| 86 |
return PJ_ENOTFOUND; |
| 87 |
|
| 88 |
ac = &codec_list[i]; |
| 89 |
|
| 90 |
pj_bzero(attr, sizeof(pjmedia_codec_param)); |
| 91 |
attr->info.clock_rate = ac->clock_rate; |
| 92 |
attr->info.channel_cnt = ac->channel_cnt; |
| 93 |
attr->info.avg_bps = ac->avg_bps; |
| 94 |
attr->info.max_bps = ac->max_bps; |
| 95 |
attr->info.pcm_bits_per_sample = 16; |
| 96 |
attr->info.frm_ptime = ac->frm_ptime; |
| 97 |
attr->info.pt = ac->payload_type; |
| 98 |
|
| 99 |
attr->setting.frm_per_pkt = 1; |
| 100 |
attr->setting.vad = 1; |
| 101 |
attr->setting.plc = 1; |
| 102 |
|
| 103 |
return PJ_SUCCESS; |
| 104 |
} |
| 105 |
|
| 106 |
static pj_status_t alt_codec_enum_codecs(pjmedia_codec_factory *factory, |
| 107 |
unsigned *count, |
| 108 |
pjmedia_codec_info codecs[]) |
| 109 |
{ |
| 110 |
unsigned i; |
| 111 |
|
| 112 |
for (i=0; i<*count && i<PJ_ARRAY_SIZE(codec_list); ++i) { |
| 113 |
struct alt_codec *ac = &codec_list[i]; |
| 114 |
pj_bzero(&codecs[i], sizeof(pjmedia_codec_info)); |
| 115 |
codecs[i].encoding_name = ac->encoding_name; |
| 116 |
codecs[i].pt = ac->payload_type; |
| 117 |
codecs[i].type = PJMEDIA_TYPE_AUDIO; |
| 118 |
codecs[i].clock_rate = ac->clock_rate; |
| 119 |
codecs[i].channel_cnt = ac->channel_cnt; |
| 120 |
} |
| 121 |
|
| 122 |
*count = i; |
| 123 |
|
| 124 |
return PJ_SUCCESS; |
| 125 |
} |
| 126 |
|
| 127 |
static pj_status_t alt_codec_alloc_codec(pjmedia_codec_factory *factory, |
| 128 |
const pjmedia_codec_info *id, |
| 129 |
pjmedia_codec **p_codec) |
| 130 |
{ |
| 131 |
|
| 132 |
UNIMPLEMENTED(alt_codec_alloc_codec) |
| 133 |
return PJ_ENOTSUP; |
| 134 |
} |
| 135 |
|
| 136 |
static pj_status_t alt_codec_dealloc_codec( pjmedia_codec_factory *factory, |
| 137 |
pjmedia_codec *codec ) |
| 138 |
{ |
| 139 |
|
| 140 |
UNIMPLEMENTED(alt_codec_dealloc_codec) |
| 141 |
return PJ_ENOTSUP; |
| 142 |
} |
| 143 |
|
| 144 |
static pj_status_t alt_codec_deinit(void) |
| 145 |
{ |
| 146 |
pjmedia_codec_mgr *codec_mgr; |
| 147 |
codec_mgr = pjmedia_endpt_get_codec_mgr(pjsua_var.med_endpt); |
| 148 |
return pjmedia_codec_mgr_unregister_factory(codec_mgr, |
| 149 |
&alt_codec_factory.base); |
| 150 |
|
| 151 |
} |
| 152 |
|
| 153 |
static pjmedia_codec_factory_op alt_codec_factory_op = |
| 154 |
{ |
| 155 |
&alt_codec_test_alloc, |
| 156 |
&alt_codec_default_attr, |
| 157 |
&alt_codec_enum_codecs, |
| 158 |
&alt_codec_alloc_codec, |
| 159 |
&alt_codec_dealloc_codec, |
| 160 |
&alt_codec_deinit |
| 161 |
}; |
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
pj_status_t pjsua_aud_subsys_init() |
| 170 |
{ |
| 171 |
pjmedia_codec_mgr *codec_mgr; |
| 172 |
pj_status_t status; |
| 173 |
|
| 174 |
|
| 175 |
alt_codec_factory.base.op = &alt_codec_factory_op; |
| 176 |
codec_mgr = pjmedia_endpt_get_codec_mgr(pjsua_var.med_endpt); |
| 177 |
status = pjmedia_codec_mgr_register_factory(codec_mgr, |
| 178 |
&alt_codec_factory.base); |
| 179 |
if (status != PJ_SUCCESS) |
| 180 |
return status; |
| 181 |
|
| 182 |
|
| 183 |
return PJ_SUCCESS; |
| 184 |
} |
| 185 |
|
| 186 |
|
| 187 |
pj_status_t pjsua_aud_subsys_start(void) |
| 188 |
{ |
| 189 |
|
| 190 |
return PJ_SUCCESS; |
| 191 |
} |
| 192 |
|
| 193 |
|
| 194 |
pj_status_t pjsua_aud_subsys_destroy() |
| 195 |
{ |
| 196 |
|
| 197 |
return PJ_SUCCESS; |
| 198 |
} |
| 199 |
|
| 200 |
|
| 201 |
static void aud_rtp_cb(void *user_data, void *pkt, pj_ssize_t size) |
| 202 |
{ |
| 203 |
pjsua_call_media *call_med = (pjsua_call_media*) user_data; |
| 204 |
|
| 205 |
|
| 206 |
PJ_LOG(4,(THIS_FILE, "RX %d bytes audio RTP packet", (int)size)); |
| 207 |
} |
| 208 |
|
| 209 |
|
| 210 |
static void aud_rtcp_cb(void *user_data, void *pkt, pj_ssize_t size) |
| 211 |
{ |
| 212 |
pjsua_call_media *call_med = (pjsua_call_media*) user_data; |
| 213 |
|
| 214 |
|
| 215 |
PJ_LOG(4,(THIS_FILE, "RX %d bytes audio RTCP packet", (int)size)); |
| 216 |
} |
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
|
| 221 |
static void timer_to_send_aud_rtp(void *user_data) |
| 222 |
{ |
| 223 |
pjsua_call_media *call_med = (pjsua_call_media*) user_data; |
| 224 |
const char *pkt = "Not RTP packet"; |
| 225 |
|
| 226 |
if (!call_med->call || !call_med->call->inv || !call_med->tp) { |
| 227 |
|
| 228 |
|
| 229 |
return; |
| 230 |
} |
| 231 |
|
| 232 |
pjmedia_transport_send_rtp(call_med->tp, pkt, strlen(pkt)); |
| 233 |
|
| 234 |
pjsua_schedule_timer2(&timer_to_send_aud_rtp, call_med, 2000); |
| 235 |
} |
| 236 |
|
| 237 |
static void timer_to_send_aud_rtcp(void *user_data) |
| 238 |
{ |
| 239 |
pjsua_call_media *call_med = (pjsua_call_media*) user_data; |
| 240 |
const char *pkt = "Not RTCP packet"; |
| 241 |
|
| 242 |
if (!call_med->call || !call_med->call->inv || !call_med->tp) { |
| 243 |
|
| 244 |
|
| 245 |
return; |
| 246 |
} |
| 247 |
|
| 248 |
pjmedia_transport_send_rtcp(call_med->tp, pkt, strlen(pkt)); |
| 249 |
|
| 250 |
pjsua_schedule_timer2(&timer_to_send_aud_rtcp, call_med, 5000); |
| 251 |
} |
| 252 |
|
| 253 |
|
| 254 |
void pjsua_aud_stop_stream(pjsua_call_media *call_med) |
| 255 |
{ |
| 256 |
|
| 257 |
if (call_med->tp) { |
| 258 |
pjmedia_transport_detach(call_med->tp, call_med); |
| 259 |
} |
| 260 |
|
| 261 |
|
| 262 |
} |
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
|
| 269 |
pj_status_t pjsua_aud_channel_update(pjsua_call_media *call_med, |
| 270 |
pj_pool_t *tmp_pool, |
| 271 |
pjmedia_stream_info *si, |
| 272 |
const pjmedia_sdp_session *local_sdp, |
| 273 |
const pjmedia_sdp_session *remote_sdp) |
| 274 |
{ |
| 275 |
pj_status_t status = PJ_SUCCESS; |
| 276 |
|
| 277 |
PJ_LOG(4,(THIS_FILE,"Alt audio channel update..")); |
| 278 |
pj_log_push_indent(); |
| 279 |
|
| 280 |
|
| 281 |
if (si->dir != PJMEDIA_DIR_NONE) { |
| 282 |
|
| 283 |
status = pjmedia_transport_attach(call_med->tp, call_med, |
| 284 |
&si->rem_addr, &si->rem_rtcp, |
| 285 |
pj_sockaddr_get_len(&si->rem_addr), |
| 286 |
&aud_rtp_cb, &aud_rtcp_cb); |
| 287 |
|
| 288 |
|
| 289 |
|
| 290 |
|
| 291 |
pjsua_schedule_timer2(&timer_to_send_aud_rtp, call_med, 0); |
| 292 |
pjsua_schedule_timer2(&timer_to_send_aud_rtcp, call_med, 2500); |
| 293 |
|
| 294 |
|
| 295 |
|
| 296 |
|
| 297 |
|
| 298 |
} |
| 299 |
|
| 300 |
on_return: |
| 301 |
pj_log_pop_indent(); |
| 302 |
return status; |
| 303 |
} |
| 304 |
|
| 305 |
void pjsua_check_snd_dev_idle() |
| 306 |
{ |
| 307 |
} |
| 308 |
|
| 309 |
|
| 310 |
|
| 311 |
|
| 312 |
|
| 313 |
|
| 314 |
|
| 315 |
PJ_DEF(pj_bool_t) pjsua_call_has_media(pjsua_call_id call_id) |
| 316 |
{ |
| 317 |
UNIMPLEMENTED(pjsua_call_has_media) |
| 318 |
return PJ_TRUE; |
| 319 |
} |
| 320 |
|
| 321 |
|
| 322 |
|
| 323 |
PJ_DEF(pjsua_conf_port_id) pjsua_call_get_conf_port(pjsua_call_id call_id) |
| 324 |
{ |
| 325 |
UNIMPLEMENTED(pjsua_call_get_conf_port) |
| 326 |
return PJSUA_INVALID_ID; |
| 327 |
} |
| 328 |
|
| 329 |
|
| 330 |
PJ_DEF(pj_status_t) |
| 331 |
pjsua_call_aud_stream_modify_codec_param(pjsua_call_id call_id, |
| 332 |
int med_idx, |
| 333 |
const pjmedia_codec_param *param) |
| 334 |
{ |
| 335 |
UNIMPLEMENTED(pjsua_call_aud_stream_modify_codec_param) |
| 336 |
return PJ_ENOTSUP; |
| 337 |
} |
| 338 |
|
| 339 |
|
| 340 |
PJ_DEF(pj_status_t) pjsua_call_get_stream_info( pjsua_call_id call_id, |
| 341 |
unsigned med_idx, |
| 342 |
pjsua_stream_info *psi) |
| 343 |
{ |
| 344 |
pj_bzero(psi, sizeof(*psi)); |
| 345 |
UNIMPLEMENTED(pjsua_call_get_stream_info) |
| 346 |
return PJ_ENOTSUP; |
| 347 |
} |
| 348 |
|
| 349 |
|
| 350 |
PJ_DEF(pj_status_t) pjsua_call_get_stream_stat( pjsua_call_id call_id, |
| 351 |
unsigned med_idx, |
| 352 |
pjsua_stream_stat *stat) |
| 353 |
{ |
| 354 |
pj_bzero(stat, sizeof(*stat)); |
| 355 |
UNIMPLEMENTED(pjsua_call_get_stream_stat) |
| 356 |
return PJ_ENOTSUP; |
| 357 |
} |
| 358 |
|
| 359 |
|
| 360 |
|
| 361 |
|
| 362 |
PJ_DEF(pj_status_t) pjsua_call_dial_dtmf( pjsua_call_id call_id, |
| 363 |
const pj_str_t *digits) |
| 364 |
{ |
| 365 |
UNIMPLEMENTED(pjsua_call_dial_dtmf) |
| 366 |
return PJ_ENOTSUP; |
| 367 |
} |
| 368 |
|
| 369 |
PJ_DEF(pj_status_t) pjsua_call_dial_dtmf2( pjsua_call_id call_id, |
| 370 |
const pj_str_t *digits, |
| 371 |
unsigned duration) |
| 372 |
{ |
| 373 |
UNIMPLEMENTED(pjsua_call_dial_dtmf2) |
| 374 |
return PJ_ENOTSUP; |
| 375 |
} |
| 376 |
|
| 377 |
|
| 378 |
|
| 379 |
|
| 380 |
|
| 381 |
|
| 382 |
PJ_DEF(void) pjsua_conf_connect_param_default(pjsua_conf_connect_param *prm) |
| 383 |
{ |
| 384 |
UNIMPLEMENTED(pjsua_conf_connect_param_default) |
| 385 |
} |
| 386 |
|
| 387 |
|
| 388 |
PJ_DEF(unsigned) pjsua_conf_get_max_ports(void) |
| 389 |
{ |
| 390 |
UNIMPLEMENTED(pjsua_conf_get_max_ports) |
| 391 |
return 0xFF; |
| 392 |
} |
| 393 |
|
| 394 |
|
| 395 |
PJ_DEF(unsigned) pjsua_conf_get_active_ports(void) |
| 396 |
{ |
| 397 |
UNIMPLEMENTED(pjsua_conf_get_active_ports) |
| 398 |
return 0; |
| 399 |
} |
| 400 |
|
| 401 |
|
| 402 |
PJ_DEF(pj_status_t) pjsua_enum_conf_ports(pjsua_conf_port_id id[], |
| 403 |
unsigned *count) |
| 404 |
{ |
| 405 |
*count = 0; |
| 406 |
UNIMPLEMENTED(pjsua_enum_conf_ports) |
| 407 |
return PJ_ENOTSUP; |
| 408 |
} |
| 409 |
|
| 410 |
|
| 411 |
PJ_DEF(pj_status_t) pjsua_conf_get_port_info( pjsua_conf_port_id id, |
| 412 |
pjsua_conf_port_info *info) |
| 413 |
{ |
| 414 |
UNIMPLEMENTED(pjsua_conf_get_port_info) |
| 415 |
return PJ_ENOTSUP; |
| 416 |
} |
| 417 |
|
| 418 |
|
| 419 |
PJ_DEF(pj_status_t) pjsua_conf_add_port( pj_pool_t *pool, |
| 420 |
pjmedia_port *port, |
| 421 |
pjsua_conf_port_id *p_id) |
| 422 |
{ |
| 423 |
*p_id = PJSUA_INVALID_ID; |
| 424 |
UNIMPLEMENTED(pjsua_conf_add_port) |
| 425 |
|
| 426 |
|
| 427 |
|
| 428 |
return PJ_SUCCESS; |
| 429 |
} |
| 430 |
|
| 431 |
|
| 432 |
PJ_DEF(pj_status_t) pjsua_conf_remove_port(pjsua_conf_port_id id) |
| 433 |
{ |
| 434 |
UNIMPLEMENTED(pjsua_conf_remove_port) |
| 435 |
return PJ_ENOTSUP; |
| 436 |
} |
| 437 |
|
| 438 |
|
| 439 |
PJ_DEF(pj_status_t) pjsua_conf_connect( pjsua_conf_port_id source, |
| 440 |
pjsua_conf_port_id sink) |
| 441 |
{ |
| 442 |
UNIMPLEMENTED(pjsua_conf_connect) |
| 443 |
return PJ_ENOTSUP; |
| 444 |
} |
| 445 |
|
| 446 |
|
| 447 |
|
| 448 |
|
| 449 |
|
| 450 |
PJ_DEF(pj_status_t) pjsua_conf_connect2( pjsua_conf_port_id source, |
| 451 |
pjsua_conf_port_id sink, |
| 452 |
const pjsua_conf_connect_param *prm) |
| 453 |
{ |
| 454 |
UNIMPLEMENTED(pjsua_conf_connect2) |
| 455 |
return PJ_ENOTSUP; |
| 456 |
} |
| 457 |
|
| 458 |
|
| 459 |
PJ_DEF(pj_status_t) pjsua_conf_disconnect( pjsua_conf_port_id source, |
| 460 |
pjsua_conf_port_id sink) |
| 461 |
{ |
| 462 |
UNIMPLEMENTED(pjsua_conf_disconnect) |
| 463 |
return PJ_ENOTSUP; |
| 464 |
} |
| 465 |
|
| 466 |
|
| 467 |
|
| 468 |
|
| 469 |
PJ_DEF(pj_status_t) pjsua_conf_adjust_tx_level(pjsua_conf_port_id slot, |
| 470 |
float level) |
| 471 |
{ |
| 472 |
UNIMPLEMENTED(pjsua_conf_adjust_tx_level) |
| 473 |
return PJ_ENOTSUP; |
| 474 |
} |
| 475 |
|
| 476 |
|
| 477 |
|
| 478 |
|
| 479 |
PJ_DEF(pj_status_t) pjsua_conf_adjust_rx_level(pjsua_conf_port_id slot, |
| 480 |
float level) |
| 481 |
{ |
| 482 |
UNIMPLEMENTED(pjsua_conf_adjust_rx_level) |
| 483 |
return PJ_ENOTSUP; |
| 484 |
} |
| 485 |
|
| 486 |
|
| 487 |
|
| 488 |
PJ_DEF(pj_status_t) pjsua_conf_get_signal_level(pjsua_conf_port_id slot, |
| 489 |
unsigned *tx_level, |
| 490 |
unsigned *rx_level) |
| 491 |
{ |
| 492 |
UNIMPLEMENTED(pjsua_conf_get_signal_level) |
| 493 |
return PJ_ENOTSUP; |
| 494 |
} |
| 495 |
|
| 496 |
|
| 497 |
|
| 498 |
|
| 499 |
PJ_DEF(pj_status_t) pjsua_player_create( const pj_str_t *filename, |
| 500 |
unsigned options, |
| 501 |
pjsua_player_id *p_id) |
| 502 |
{ |
| 503 |
UNIMPLEMENTED(pjsua_player_create) |
| 504 |
return PJ_ENOTSUP; |
| 505 |
} |
| 506 |
|
| 507 |
|
| 508 |
|
| 509 |
|
| 510 |
PJ_DEF(pj_status_t) pjsua_playlist_create( const pj_str_t file_names[], |
| 511 |
unsigned file_count, |
| 512 |
const pj_str_t *label, |
| 513 |
unsigned options, |
| 514 |
pjsua_player_id *p_id) |
| 515 |
{ |
| 516 |
UNIMPLEMENTED(pjsua_playlist_create) |
| 517 |
return PJ_ENOTSUP; |
| 518 |
} |
| 519 |
|
| 520 |
|
| 521 |
PJ_DEF(pjsua_conf_port_id) pjsua_player_get_conf_port(pjsua_player_id id) |
| 522 |
{ |
| 523 |
UNIMPLEMENTED(pjsua_player_get_conf_port) |
| 524 |
return -1; |
| 525 |
} |
| 526 |
|
| 527 |
|
| 528 |
PJ_DEF(pj_status_t) pjsua_player_get_port( pjsua_player_id id, |
| 529 |
pjmedia_port **p_port) |
| 530 |
{ |
| 531 |
UNIMPLEMENTED(pjsua_player_get_port) |
| 532 |
return PJ_ENOTSUP; |
| 533 |
} |
| 534 |
|
| 535 |
|
| 536 |
PJ_DEF(pj_status_t) pjsua_player_get_info(pjsua_player_id id, |
| 537 |
pjmedia_wav_player_info *info) |
| 538 |
{ |
| 539 |
UNIMPLEMENTED(pjsua_player_get_info) |
| 540 |
return PJ_ENOTSUP; |
| 541 |
} |
| 542 |
|
| 543 |
|
| 544 |
PJ_DEF(pj_ssize_t) pjsua_player_get_pos(pjsua_player_id id) |
| 545 |
{ |
| 546 |
UNIMPLEMENTED(pjsua_player_get_pos) |
| 547 |
return -PJ_ENOTSUP; |
| 548 |
} |
| 549 |
|
| 550 |
|
| 551 |
PJ_DEF(pj_status_t) pjsua_player_set_pos( pjsua_player_id id, |
| 552 |
pj_uint32_t samples) |
| 553 |
{ |
| 554 |
UNIMPLEMENTED(pjsua_player_set_pos) |
| 555 |
return PJ_ENOTSUP; |
| 556 |
} |
| 557 |
|
| 558 |
|
| 559 |
|
| 560 |
|
| 561 |
PJ_DEF(pj_status_t) pjsua_player_destroy(pjsua_player_id id) |
| 562 |
{ |
| 563 |
UNIMPLEMENTED(pjsua_player_destroy) |
| 564 |
return PJ_ENOTSUP; |
| 565 |
} |
| 566 |
|
| 567 |
|
| 568 |
|
| 569 |
|
| 570 |
PJ_DEF(pj_status_t) pjsua_recorder_create( const pj_str_t *filename, |
| 571 |
unsigned enc_type, |
| 572 |
void *enc_param, |
| 573 |
pj_ssize_t max_size, |
| 574 |
unsigned options, |
| 575 |
pjsua_recorder_id *p_id) |
| 576 |
{ |
| 577 |
UNIMPLEMENTED(pjsua_recorder_create) |
| 578 |
return PJ_ENOTSUP; |
| 579 |
} |
| 580 |
|
| 581 |
|
| 582 |
|
| 583 |
PJ_DEF(pjsua_conf_port_id) pjsua_recorder_get_conf_port(pjsua_recorder_id id) |
| 584 |
{ |
| 585 |
UNIMPLEMENTED(pjsua_recorder_get_conf_port) |
| 586 |
return -1; |
| 587 |
} |
| 588 |
|
| 589 |
|
| 590 |
PJ_DEF(pj_status_t) pjsua_recorder_get_port( pjsua_recorder_id id, |
| 591 |
pjmedia_port **p_port) |
| 592 |
{ |
| 593 |
UNIMPLEMENTED(pjsua_recorder_get_port) |
| 594 |
return PJ_ENOTSUP; |
| 595 |
} |
| 596 |
|
| 597 |
|
| 598 |
PJ_DEF(pj_status_t) pjsua_recorder_destroy(pjsua_recorder_id id) |
| 599 |
{ |
| 600 |
UNIMPLEMENTED(pjsua_recorder_destroy) |
| 601 |
return PJ_ENOTSUP; |
| 602 |
} |
| 603 |
|
| 604 |
|
| 605 |
PJ_DEF(pj_status_t) pjsua_enum_aud_devs( pjmedia_aud_dev_info info[], |
| 606 |
unsigned *count) |
| 607 |
{ |
| 608 |
UNIMPLEMENTED(pjsua_enum_aud_devs) |
| 609 |
return PJ_ENOTSUP; |
| 610 |
} |
| 611 |
|
| 612 |
PJ_DEF(pj_status_t) pjsua_enum_snd_devs( pjmedia_snd_dev_info info[], |
| 613 |
unsigned *count) |
| 614 |
{ |
| 615 |
UNIMPLEMENTED(pjsua_enum_snd_devs) |
| 616 |
return PJ_ENOTSUP; |
| 617 |
} |
| 618 |
|
| 619 |
|
| 620 |
PJ_DEF(pj_status_t) pjsua_set_snd_dev( int capture_dev, int playback_dev) |
| 621 |
{ |
| 622 |
UNIMPLEMENTED(pjsua_set_snd_dev) |
| 623 |
return PJ_SUCCESS; |
| 624 |
} |
| 625 |
|
| 626 |
|
| 627 |
PJ_DEF(pj_status_t) pjsua_get_snd_dev(int *capture_dev, int *playback_dev) |
| 628 |
{ |
| 629 |
*capture_dev = *playback_dev = PJSUA_INVALID_ID; |
| 630 |
UNIMPLEMENTED(pjsua_get_snd_dev) |
| 631 |
return PJ_ENOTSUP; |
| 632 |
} |
| 633 |
|
| 634 |
|
| 635 |
PJ_DEF(pj_status_t) pjsua_get_snd_dev2(pjsua_snd_dev_param *snd_param) |
| 636 |
{ |
| 637 |
UNIMPLEMENTED(pjsua_get_snd_dev2) |
| 638 |
return PJ_ENOTSUP; |
| 639 |
} |
| 640 |
|
| 641 |
|
| 642 |
|
| 643 |
|
| 644 |
|
| 645 |
PJ_DEF(pj_status_t) pjsua_set_snd_dev2(const pjsua_snd_dev_param *snd_param) |
| 646 |
{ |
| 647 |
UNIMPLEMENTED(pjsua_set_snd_dev2) |
| 648 |
return PJ_SUCCESS; |
| 649 |
} |
| 650 |
|
| 651 |
|
| 652 |
|
| 653 |
PJ_DEF(pj_status_t) pjsua_set_null_snd_dev(void) |
| 654 |
{ |
| 655 |
return PJ_SUCCESS; |
| 656 |
} |
| 657 |
|
| 658 |
|
| 659 |
PJ_DEF(pjmedia_port*) pjsua_set_no_snd_dev(void) |
| 660 |
{ |
| 661 |
UNIMPLEMENTED(pjsua_set_no_snd_dev) |
| 662 |
return NULL; |
| 663 |
} |
| 664 |
|
| 665 |
|
| 666 |
PJ_DEF(pj_status_t) pjsua_set_ec(unsigned tail_ms, unsigned options) |
| 667 |
{ |
| 668 |
UNIMPLEMENTED(pjsua_set_ec) |
| 669 |
return PJ_ENOTSUP; |
| 670 |
} |
| 671 |
|
| 672 |
|
| 673 |
PJ_DEF(pj_status_t) pjsua_get_ec_tail(unsigned *p_tail_ms) |
| 674 |
{ |
| 675 |
UNIMPLEMENTED(pjsua_get_ec_tail) |
| 676 |
return PJ_ENOTSUP; |
| 677 |
} |
| 678 |
|
| 679 |
|
| 680 |
PJ_DEF(pj_bool_t) pjsua_snd_is_active(void) |
| 681 |
{ |
| 682 |
UNIMPLEMENTED(pjsua_snd_is_active) |
| 683 |
return PJ_FALSE; |
| 684 |
} |
| 685 |
|
| 686 |
|
| 687 |
PJ_DEF(pj_status_t) pjsua_snd_set_setting( pjmedia_aud_dev_cap cap, |
| 688 |
const void *pval, pj_bool_t keep) |
| 689 |
{ |
| 690 |
UNIMPLEMENTED(pjsua_snd_set_setting) |
| 691 |
return PJ_ENOTSUP; |
| 692 |
} |
| 693 |
|
| 694 |
|
| 695 |
PJ_DEF(pj_status_t) pjsua_snd_get_setting(pjmedia_aud_dev_cap cap, void *pval) |
| 696 |
{ |
| 697 |
UNIMPLEMENTED(pjsua_snd_get_setting) |
| 698 |
return PJ_ENOTSUP; |
| 699 |
} |
| 700 |
|
| 701 |
|
| 702 |
PJ_DEF(pj_status_t) pjsua_ext_snd_dev_create( pjmedia_snd_port_param *param, |
| 703 |
pjsua_ext_snd_dev **p_snd) |
| 704 |
{ |
| 705 |
UNIMPLEMENTED(pjsua_ext_snd_dev_create) |
| 706 |
return PJ_ENOTSUP; |
| 707 |
} |
| 708 |
|
| 709 |
|
| 710 |
PJ_DEF(pj_status_t) pjsua_ext_snd_dev_destroy(pjsua_ext_snd_dev *snd) |
| 711 |
{ |
| 712 |
UNIMPLEMENTED(pjsua_ext_snd_dev_destroy) |
| 713 |
return PJ_ENOTSUP; |
| 714 |
} |
| 715 |
|
| 716 |
|
| 717 |
PJ_DEF(pjmedia_snd_port*) pjsua_ext_snd_dev_get_snd_port( |
| 718 |
pjsua_ext_snd_dev *snd) |
| 719 |
{ |
| 720 |
UNIMPLEMENTED(pjsua_ext_snd_dev_get_snd_port) |
| 721 |
return NULL; |
| 722 |
} |
| 723 |
|
| 724 |
|
| 725 |
PJ_DEF(pjsua_conf_port_id) pjsua_ext_snd_dev_get_conf_port( |
| 726 |
pjsua_ext_snd_dev *snd) |
| 727 |
{ |
| 728 |
UNIMPLEMENTED(pjsua_ext_snd_dev_get_conf_port) |
| 729 |
return PJSUA_INVALID_ID; |
| 730 |
} |