Ignore:
Timestamp:
Oct 24, 2017 7:31:39 AM (4 years ago)
Author:
ming
Message:

Fixed #2052: Add option for pjsua callback on_stream_created to destroy application's supplied media port

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h

    r5675 r5676  
    488488 
    489489 
     490/** 
     491 * Structure to be passed to on stream created callback. 
     492 * See #on_stream_created2(). 
     493 */ 
     494typedef struct pjsua_on_stream_created_param 
     495{ 
     496    /** 
     497     * The media stream, read-only. 
     498     */ 
     499    pjmedia_stream      *stream; 
     500 
     501    /** 
     502     * Stream index in the media session, read-only. 
     503     */ 
     504    unsigned             stream_idx; 
     505 
     506    /** 
     507     * Specify if PJSUA should take ownership of the port returned in 
     508     * the port parameter below. If set to PJ_TRUE, 
     509     * pjmedia_port_destroy() will be called on the port when it is 
     510     * no longer needed. 
     511     * 
     512     * Default: PJ_FALSE 
     513     */ 
     514    pj_bool_t            destroy_port; 
     515 
     516    /** 
     517     * On input, it specifies the media port of the stream. Application 
     518     * may modify this pointer to point to different media port to be 
     519     * registered to the conference bridge. 
     520     */ 
     521    pjmedia_port        *port; 
     522 
     523} pjsua_on_stream_created_param; 
     524 
     525 
    490526/**  
    491527 * Enumeration of media transport state types. 
     
    822858     * media port then will be added to the conference bridge instead. 
    823859     * 
     860     * Note: if implemented, #on_stream_created2() callback will be called 
     861     * instead of this one.  
     862     * 
    824863     * @param call_id       Call identification. 
    825864     * @param strm          Media stream. 
     
    834873                              unsigned stream_idx, 
    835874                              pjmedia_port **p_port); 
     875 
     876    /** 
     877     * Notify application when media session is created and before it is 
     878     * registered to the conference bridge. Application may return different 
     879     * media port if it has added media processing port to the stream. This 
     880     * media port then will be added to the conference bridge instead. 
     881     * 
     882     * @param call_id       Call identification. 
     883     * @param param         The on stream created callback parameter. 
     884     */ 
     885    void (*on_stream_created2)(pjsua_call_id call_id, 
     886                               pjsua_on_stream_created_param *param); 
    836887 
    837888    /** 
Note: See TracChangeset for help on using the changeset viewer.