Changeset 5923 for pjproject/trunk/pjsip/src/pjsua2/endpoint.cpp
- Timestamp:
- Dec 13, 2018 6:57:23 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua2/endpoint.cpp
r5912 r5923 1431 1431 virtual void execute(bool is_pending) 1432 1432 { 1433 Call *call = Call::lookup(call_id);1434 if (!call)1435 return;1436 1437 1433 if (is_pending) { 1438 1434 /* Can't do this anymore, pointer is invalid */ … … 1440 1436 } 1441 1437 1442 call->onCallMediaEvent(prm); 1438 if (call_id == PJSUA_INVALID_ID) { 1439 OnMediaEventParam prm2; 1440 prm2.ev = prm.ev; 1441 Endpoint::instance().onMediaEvent(prm2); 1442 } else { 1443 Call *call = Call::lookup(call_id); 1444 1445 if (call) 1446 call->onCallMediaEvent(prm); 1447 } 1443 1448 } 1444 1449 }; 1450 1451 void Endpoint::on_media_event(pjmedia_event *event) 1452 { 1453 PendingOnMediaEventCallback *job = new PendingOnMediaEventCallback; 1454 1455 job->call_id = PJSUA_INVALID_ID; 1456 job->prm.medIdx = 0; 1457 job->prm.ev.fromPj(*event); 1458 1459 Endpoint::instance().utilAddPendingJob(job); 1460 } 1445 1461 1446 1462 void Endpoint::on_call_media_event(pjsua_call_id call_id, … … 1448 1464 pjmedia_event *event) 1449 1465 { 1450 Call *call = Call::lookup(call_id);1451 if (!call) {1452 return;1453 }1454 1455 1466 PendingOnMediaEventCallback *job = new PendingOnMediaEventCallback; 1456 1467 … … 1666 1677 ua_cfg.cb.on_call_media_transport_state = 1667 1678 &Endpoint::on_call_media_transport_state; 1679 ua_cfg.cb.on_media_event = &Endpoint::on_media_event; 1668 1680 ua_cfg.cb.on_call_media_event = &Endpoint::on_call_media_event; 1669 1681 ua_cfg.cb.on_create_media_transport = &Endpoint::on_create_media_transport;
Note: See TracChangeset
for help on using the changeset viewer.