Changeset 518 for pjproject/trunk/pjmedia/include/pjmedia/master_port.h
- Timestamp:
- Jun 18, 2006 2:02:36 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/include/pjmedia/master_port.h
r498 r518 27 27 #include <pjmedia/port.h> 28 28 29 /** 30 * @defgroup PJMEDIA_MASTER_PORT Master Port 31 * @ingroup PJMEDIA_PORT_CLOCK 32 * @brief Provides media clock for media ports. 33 * @{ 34 * A master port has two media ports connected to it, and by convention 35 * thay are called downstream and upstream ports. The media stream flowing to 36 * the downstream port is called encoding or send direction, and media stream 37 * flowing to the upstream port is called decoding or receive direction 38 * (imagine the downstream as stream to remote endpoint, and upstream as 39 * local media port; media flowing to remote endpoint (downstream) will need 40 * to be encoded before it is transmitted to remote endpoint). 41 * 42 * A master port internally has an instance of @ref PJMEDIA_CLOCK, which 43 * provides the essensial timing for the master port. The @ref PJMEDIA_CLOCK 44 * runs asynchronously, and whenever a clock <b>tick</b> expires, a callback 45 * will be called, and the master port performs the following tasks: 46 * - it calls <b><tt>get_frame()</tt></b> from the downstream port, 47 * when give the frame to the upstream port by calling <b><tt>put_frame 48 * </tt></b> to the upstream port, and 49 * - performs the same task, but on the reverse direction (i.e. get the stream 50 * from upstream port and give it to the downstream port). 51 * 52 * Because master port enables media stream to flow automatically, it is 53 * said that the master port supplies @ref PJMEDIA_PORT_CLOCK to the 54 * media ports interconnection. 55 * 56 */ 29 57 30 58 PJ_BEGIN_DECL … … 33 61 /** 34 62 * Opaque declaration for master port. 35 * A master port has two media ports connected to it, i.e. downstream and36 * upstream ports. The media stream flowing to the downstream port is called37 * encoding or send direction, and media stream flowing to the upstream port38 * is called decoding or receive direction.39 *40 * A master port has a "clock" that periodically passes the media frame from41 * downstream to upstream ports, and vice versa. In each run, it retrieves42 * media frame from one side with #pjmedia_port_get_frame(), and passes the43 * media frame to the other side with #pjmedia_port_put_frame(). In each run,44 * this process is done for twice, i.e. one for each direction.45 63 */ 46 64 typedef struct pjmedia_master_port pjmedia_master_port; … … 150 168 PJ_END_DECL 151 169 170 /** 171 * @} 172 */ 173 152 174 153 175 #endif /* __PJMEDIA_MASTER_PORT_H__ */
Note: See TracChangeset
for help on using the changeset viewer.