Ignore:
Timestamp:
Jun 12, 2006 10:13:31 AM (18 years ago)
Author:
bennylp
Message:

Added mutex protection and option not to delete upstream/downstream port in master_port.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia/master_port.h

    r404 r498  
    5353 * @param u_port        Upstream port. 
    5454 * @param d_port        Downstream port. 
    55  * @param options       Options flags. 
     55 * @param options       Options flags, bitmask from #pjmedia_master_port_flag. 
    5656 * @param p_m           Pointer to receive the master port instance. 
    5757 * 
     
    6565 
    6666 
    67  
    6867/** 
    6968 * Start the media flow. 
     
    7473 */ 
    7574PJ_DECL(pj_status_t) pjmedia_master_port_start(pjmedia_master_port *m); 
    76  
    7775 
    7876 
     
    8886 
    8987/** 
     88 * Change the upstream port. Note that application is responsible to destroy 
     89 * current upstream port (the one that is going to be replaced with the 
     90 * new port). 
     91 * 
     92 * @param m             The master port. 
     93 * @param port          Port to be used for upstream port. 
     94 * 
     95 * @return              PJ_SUCCESS on success. 
     96 */ 
     97PJ_DECL(pj_status_t) pjmedia_master_port_set_uport(pjmedia_master_port *m, 
     98                                                   pjmedia_port *port); 
     99 
     100 
     101/** 
     102 * Get the upstream port. 
     103 * 
     104 * @param m             The master port. 
     105 * 
     106 * @return              The upstream port. 
     107 */ 
     108PJ_DECL(pjmedia_port*) pjmedia_master_port_get_uport(pjmedia_master_port*m); 
     109 
     110 
     111/** 
     112 * Change the downstream port. Note that application is responsible to destroy 
     113 * current downstream port (the one that is going to be replaced with the 
     114 * new port). 
     115 * 
     116 * @param m             The master port. 
     117 * @param port          Port to be used for downstream port. 
     118 * 
     119 * @return              PJ_SUCCESS on success. 
     120 */ 
     121PJ_DECL(pj_status_t) pjmedia_master_port_set_dport(pjmedia_master_port *m, 
     122                                                   pjmedia_port *port); 
     123 
     124 
     125/** 
     126 * Get the downstream port. 
     127 * 
     128 * @param m             The master port. 
     129 * 
     130 * @return              The downstream port. 
     131 */ 
     132PJ_DECL(pjmedia_port*) pjmedia_master_port_get_dport(pjmedia_master_port*m); 
     133 
     134 
     135/** 
    90136 * Destroy the master port, and optionally destroy the upstream and  
    91137 * downstream ports. 
    92138 * 
    93139 * @param m             The master port. 
     140 * @param destroy_ports If non-zero, the function will destroy both 
     141 *                      upstream and downstream ports too. 
    94142 * 
    95143 * @return              PJ_SUCCESS on success. 
    96144 */ 
    97 PJ_DECL(pj_status_t) pjmedia_master_port_destroy(pjmedia_master_port *m); 
     145PJ_DECL(pj_status_t) pjmedia_master_port_destroy(pjmedia_master_port *m, 
     146                                                 pj_bool_t destroy_ports); 
    98147 
    99148 
Note: See TracChangeset for help on using the changeset viewer.