Opened 9 years ago

Closed 8 years ago

#1173 closed enhancement (fixed)

PJSUA callback to allow creation of custom media transports by application

Reported by: bennylp Owned by: bennylp
Priority: normal Milestone: release-1.12
Component: pjsua-lib Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported:

Description

This ticket adds a new pjsua callback to allow application use custom media transport for a particular call.

Prototype:

typedef enum pjsua_create_media_transport_flag
{
   /**
    * This flag indicates that the media transport must also close its
    * "member" or "child" transport when pjmedia_transport_close() is
    * called. If this flag is not specified, then the media transport
    * must not call pjmedia_transport_close() of its member transport.
    */
   PJSUA_MED_TP_CLOSE_MEMBER = 1

} pjsua_create_media_transport_flag;

/**
 * This callback can be used by application to implement custom media
 * transport adapter for the call, or to replace the media transport
 * with something completely new altogether.
 *
 * This callback is called when a new call is created. The library has
 * created a media transport for the call, and it is provided as the
 * \a base_tp argument of this callback. Upon returning, the callback
 * must return an instance of media transport to be used by the call.
 *
 * @param call_id       Call ID
 * @param media_idx     The media index in the SDP for which this media
 *                      transport will be used.
 * @param base_tp       The media transport which otherwise will be
 *                      used by the call has this callback not been
 *                      implemented.
 * @param flags         Bitmask from pjsua_create_media_transport_flag.
 *
 * @return              The callback must return an instance of media
 *                      transport to be used by the call.
 */
pjmedia_transport *on_create_media_transport(pjsua_call_id call_id,
                                            unsigned media_idx,
                                            pjmedia_transport *base_tp,
                                            unsigned flags);

Change History (2)

comment:1 Changed 8 years ago by bennylp

  • Milestone changed from release-1.10 to release-1.11

comment:2 Changed 8 years ago by ming

  • Resolution set to fixed
  • Status changed from new to closed

(In [3585]) Closed #1173: PJSUA callback to allow creation of custom media transports by application

Note: See TracTickets for help on using tickets.