08.01.2013 Views

Dialogic IP Media Library API Programming Guide and Library ...

Dialogic IP Media Library API Programming Guide and Library ...

Dialogic IP Media Library API Programming Guide and Library ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Reserving Resources for Audio Coders<br />

2. Issue dev_GetResourceReservationInfoEx( ) to check on resource availability. In this<br />

example, RESOURCE_<strong>IP</strong>M_G726 is available.<br />

3. Issue dev_ReserveResourceEx( ) to reserve RESOURCE_<strong>IP</strong>M_G726.<br />

4. Issue ipm_Start<strong>Media</strong>( ) to start media <strong>and</strong> proceed with the call using<br />

RESOURCE_<strong>IP</strong>M_G726.<br />

5. After the call is disconnected, issue ipm_Stop( ).<br />

6. Issue dev_ReleaseResourceEx( ) to release RESOURCE_<strong>IP</strong>M_G726.<br />

The following figure illustrates this scenario.<br />

Figure 6. Reserve Resources Failure<br />

Application Device Management Interface <strong>IP</strong>ML Interface<br />

dev_ReserveResourceEx(ipmH,RESOURCE_<strong>IP</strong>M_G726,RESOURCE_<strong>IP</strong>M_G729)<br />

DMEV_RESERVE_RESOURCE_FAIL<br />

dev_GetResourceReservationInfoEx(ipmH, pResourceInfo, ASYNC)<br />

DMEV_GET_RESOURCE_RESERVATIONINFO<br />

dev_ReserveResourceEx(ipmH,RESOURCE_<strong>IP</strong>M_G726)<br />

DMEV_RESERVE_RESOURCE<br />

ipm_Start<strong>Media</strong>(ipmH,G.726)<br />

<strong>IP</strong>MEV_STARTMEDIA<br />

ipm_Stop()<br />

<strong>IP</strong>MEV_STOP<br />

dev_ReleaseResourceEx(ipmH,RESOURCE_<strong>IP</strong>M_G726)<br />

DMEV_RELEASE_RESOURCE<br />

Application queries to see which<br />

resource is available <strong>and</strong> which is not.<br />

The result shows G.726 is available <strong>and</strong><br />

G.729 is not available.<br />

36 <strong>Dialogic</strong> ® <strong>IP</strong> <strong>Media</strong> <strong>Library</strong> <strong>API</strong> <strong>Programming</strong> <strong>Guide</strong> <strong>and</strong> <strong>Library</strong> Reference<br />

<strong>Dialogic</strong> Corporation

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!