GNU ZRTP for pjproject

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 6, 2010 at 11:53 PM, Werner Dittmann
<Werner.Dittmann at t-online.de> wrote:
> Hi all,
>
>> I understand that you need a new callback in pjsua, we could add a
>> generic facility for app to attach media transport adapters to pjsua
>> call.
>
> An idea could be:
> - application creates transport_zrtp and initializes ZRTP. This transport
> ?is ready to go
> - new "pjsua_add_transport(call_id, transport_zrtp, position)". This call
> ?should add the transport to an existing transport chain at the given
> ?position (for example: position 0 is lowest transport, e.g. transport_udp,
> ?1 is one above, etc and maybe -1 means "on top of existin chain).
>

We can't do that, as currently we don't have such "position" information.

My idea is to add a new pjsua callback like this:

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);


 -Benny



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux