Changeset 2032 for pjproject/trunk/pjmedia/include/pjmedia/transport.h
- Timestamp:
- Jun 19, 2008 2:10:28 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/include/pjmedia/transport.h
r1998 r2032 321 321 322 322 /** 323 * Prepare the transport for a new media session. 324 * 325 * Application should call #pjmedia_transport_media_create() instead of 326 * calling this function directly. 327 */ 328 pj_status_t (*media_create)(pjmedia_transport *tp, 329 pj_pool_t *sdp_pool, 330 unsigned options, 331 const pjmedia_sdp_session *remote_sdp, 332 unsigned media_index); 333 334 /** 323 335 * This function is called by application to generate the SDP parts 324 336 * related to transport type, e.g: ICE, SRTP. 325 337 * 326 * Application should call #pjmedia_transport_media_create() instead of 327 * calling this function directly. 328 */ 329 pj_status_t (*media_create)(pjmedia_transport *tp, 330 pj_pool_t *pool, 331 unsigned options, 332 pjmedia_sdp_session *sdp_local, 333 const pjmedia_sdp_session *sdp_remote, 334 unsigned media_index); 338 * Application should call #pjmedia_transport_encode_sdp() instead of 339 * calling this function directly. 340 */ 341 pj_status_t (*encode_sdp)(pjmedia_transport *tp, 342 pj_pool_t *sdp_pool, 343 pjmedia_sdp_session *sdp_local, 344 const pjmedia_sdp_session *rem_sdp, 345 unsigned media_index); 335 346 336 347 /** … … 342 353 */ 343 354 pj_status_t (*media_start) (pjmedia_transport *tp, 344 pj_pool_t * pool,345 pjmedia_sdp_session *sdp_local,355 pj_pool_t *tmp_pool, 356 const pjmedia_sdp_session *sdp_local, 346 357 const pjmedia_sdp_session *sdp_remote, 347 358 unsigned media_index); … … 627 638 628 639 /** 629 * Generate local SDP parts that are related to the specified media transport. 630 * Remote SDP might be needed as reference when application is in deciding 631 * side of negotiation (callee side), otherwise it should be NULL. 632 * 633 * This API is provided to allow the media transport to add more information 634 * in the SDP offer, before the offer is sent to remote. Additionally, for 635 * answerer side, this callback allows the media transport to reject the 636 * offer before this offer is processed by the SDP negotiator. 640 * Prepare the media transport for a new media session, and optionally 641 * encode the relevant information in the \a sdp_local. Application must 642 * call this function before starting a new media session using this 643 * transport. 637 644 * 638 645 * This is just a simple wrapper which calls <tt>media_create()</tt> member … … 640 647 * 641 648 * @param tp The media transport. 642 * @param pool The memory pool. 649 * @param sdp_pool Pool object to allocate memory related to SDP 650 * messaging components. 643 651 * @param option Option flags, from #pjmedia_tranport_media_option 644 * @param sdp_local Local SDP. 645 * @param sdp_remote Remote SDP. 652 * @param rem_sdp Remote SDP if it's available. 646 653 * @param media_index Media index in SDP. 647 654 * … … 649 656 */ 650 657 PJ_INLINE(pj_status_t) pjmedia_transport_media_create(pjmedia_transport *tp, 651 pj_pool_t * pool,658 pj_pool_t *sdp_pool, 652 659 unsigned options, 653 pjmedia_sdp_session *sdp_local, 654 const pjmedia_sdp_session *sdp_remote, 660 const pjmedia_sdp_session *rem_sdp, 655 661 unsigned media_index) 656 662 { 657 return (*tp->op->media_create)(tp, pool, options, sdp_local, sdp_remote,663 return (*tp->op->media_create)(tp, sdp_pool, options, rem_sdp, 658 664 media_index); 659 665 } 666 667 668 /** 669 * Put transport specific information into the SDP. This function can be 670 * called to create SDP offer or answer, depending whether \a rem_sdp 671 * parameter is present. 672 * 673 * This is just a simple wrapper which calls <tt>encode_sdp()</tt> member 674 * of the transport. 675 * 676 * @param tp The media transport. 677 * @param sdp_pool Pool object to allocate memory related to SDP 678 * messaging components. 679 * @param sdp The local SDP to be filled in information from the 680 * media transport. 681 * @param rem_sdp Remote SDP if it's available. 682 * @param media_index Media index in SDP. 683 * 684 * @return PJ_SUCCESS on success, or the appropriate error code. 685 */ 686 PJ_INLINE(pj_status_t) pjmedia_transport_encode_sdp(pjmedia_transport *tp, 687 pj_pool_t *sdp_pool, 688 pjmedia_sdp_session *sdp, 689 const pjmedia_sdp_session *rem_sdp, 690 unsigned media_index) 691 { 692 return (*tp->op->encode_sdp)(tp, sdp_pool, sdp, rem_sdp, media_index); 693 } 694 660 695 661 696 /** … … 674 709 * 675 710 * @param tp The media transport. 676 * @param pool The memory pool.711 * @param tmp_pool The memory pool for allocating temporary objects. 677 712 * @param option The media transport option. 678 713 * @param sdp_local Local SDP. … … 683 718 */ 684 719 PJ_INLINE(pj_status_t) pjmedia_transport_media_start(pjmedia_transport *tp, 685 pj_pool_t * pool,686 pjmedia_sdp_session *sdp_local,720 pj_pool_t *tmp_pool, 721 const pjmedia_sdp_session *sdp_local, 687 722 const pjmedia_sdp_session *sdp_remote, 688 723 unsigned media_index) 689 724 { 690 return (*tp->op->media_start)(tp, pool, sdp_local, sdp_remote, media_index); 725 return (*tp->op->media_start)(tp, tmp_pool, sdp_local, sdp_remote, 726 media_index); 691 727 } 692 728
Note: See TracChangeset
for help on using the changeset viewer.