Index: /pjproject/branches/projects/2.0-dev/pjmedia/build/Makefile
===================================================================
--- /pjproject/branches/projects/2.0-dev/pjmedia/build/Makefile	(revision 3615)
+++ /pjproject/branches/projects/2.0-dev/pjmedia/build/Makefile	(revision 3616)
@@ -68,5 +68,5 @@
 			transport_ice.o transport_loop.o transport_srtp.o transport_udp.o \
 			types.o vid_codec.o vid_codec_util.o \
-			videoport.o vid_stream.o \
+			vid_port.o vid_stream.o vid_tee.o \
 			wav_player.o wav_playlist.o wav_writer.o wave.o \
 			wsola.o
Index: /pjproject/branches/projects/2.0-dev/pjmedia/include/pjmedia/vid_tee.h
===================================================================
--- /pjproject/branches/projects/2.0-dev/pjmedia/include/pjmedia/vid_tee.h	(revision 3615)
+++ /pjproject/branches/projects/2.0-dev/pjmedia/include/pjmedia/vid_tee.h	(revision 3616)
@@ -46,5 +46,5 @@
  * The video tee is not thread-safe, so it is application responsibility
  * to synchronize video tee operations, e.g: make sure the source port is
- * paused during adding or removing a destination channel.
+ * paused during adding or removing a destination port.
  */
 
@@ -60,4 +60,6 @@
      * Tell the video tee that the destination port will do in-place
      * processing, so the delivered data may be modified by this port.
+     * If this flag is used, buffer will be copied before being given to
+     * the destination port.
      */
     PJMEDIA_VID_TEE_DST_DO_IN_PLACE_PROC    = 4,
@@ -67,9 +69,11 @@
 
 /**
- * Create a video tee port with the specified source media port.
+ * Create a video tee port with the specified source media port. Application
+ * should destroy the tee with pjmedia_port_destroy() as usual. Note that
+ * destroying the tee does not destroy its destination ports.
  *
  * @param pool		    The pool.
- * @param src		    The source media port.
- * @param max_ch_cnt	    The maximum channel count.
+ * @param fmt		    The source media port's format.
+ * @param max_dst_cnt	    The maximum number of destination ports supported.
  * @param p_vid_tee	    Pointer to receive the video tee port.
  *
@@ -78,6 +82,6 @@
  */
 PJ_DECL(pj_status_t) pjmedia_vid_tee_create(pj_pool_t *pool,
-					    pjmedia_format *fmt,
-					    unsigned max_ch_cnt,
+					    const pjmedia_format *fmt,
+					    unsigned max_dst_cnt,
 					    pjmedia_port **p_vid_tee);
 
@@ -86,5 +90,5 @@
  *
  * @param vid_tee	    The video tee.
- * @param ch_option	    Channel option, see @pjmedia_vid_tee_flag.
+ * @param option	    Video tee option, see @pjmedia_vid_tee_flag.
  * @param port		    The destination media port.
  *
@@ -92,7 +96,7 @@
  *			    code.
  */
-PJ_DECL(pj_status_t) pjmedia_vid_tee_add_channel(pjmedia_port *vid_tee,
-						 unsigned option,
-						 pjmedia_port *port);
+PJ_DECL(pj_status_t) pjmedia_vid_tee_add_dst_port(pjmedia_port *vid_tee,
+						  unsigned option,
+						  pjmedia_port *port);
 
 
@@ -106,6 +110,6 @@
  *			    code.
  */
-PJ_DECL(pj_status_t) pjmedia_vid_tee_remove_channel(pjmedia_port *vid_tee,
-						    pjmedia_port *port);
+PJ_DECL(pj_status_t) pjmedia_vid_tee_remove_dst_port(pjmedia_port *vid_tee,
+						     pjmedia_port *port);
 
 
Index: /pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/vid_tee.c
===================================================================
--- /pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/vid_tee.c	(revision 3615)
+++ /pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/vid_tee.c	(revision 3616)
@@ -26,9 +26,9 @@
 
 
-typedef struct vid_tee_channel
+typedef struct vid_tee_dst_port
 {
     pjmedia_port	*dst;
     unsigned		 option;
-} vid_tee_channel;
+} vid_tee_dst_port;
 
 
@@ -38,7 +38,7 @@
     void		*buf;
     pj_size_t		 buf_size;
-    unsigned		 channel_maxcnt;
-    unsigned		 channel_cnt;
-    vid_tee_channel	*channels;
+    unsigned		 dst_port_maxcnt;
+    unsigned		 dst_port_cnt;
+    vid_tee_dst_port	*dst_ports;
 } vid_tee_port;
 
@@ -52,6 +52,6 @@
  */
 PJ_DEF(pj_status_t) pjmedia_vid_tee_create( pj_pool_t *pool,
-					    pjmedia_format *fmt,
-					    unsigned max_ch_cnt,
+					    const pjmedia_format *fmt,
+					    unsigned max_dst_cnt,
 					    pjmedia_port **p_vid_tee)
 {
@@ -69,7 +69,8 @@
 
     /* Initialize video tee structure */
-    tee->channel_maxcnt = max_ch_cnt;
-    tee->channels = (vid_tee_channel*)pj_pool_calloc(pool, max_ch_cnt,
-						     sizeof(vid_tee_channel));
+    tee->dst_port_maxcnt = max_dst_cnt;
+    tee->dst_ports = (vid_tee_dst_port*)
+                     pj_pool_calloc(pool, max_dst_cnt,
+                                    sizeof(vid_tee_dst_port));
 
     /* Initialize video tee buffer, its size is one frame */
@@ -110,5 +111,5 @@
  * Add a destination media port to the video tee.
  */
-PJ_DEF(pj_status_t) pjmedia_vid_tee_add_channel( pjmedia_port *vid_tee,
+PJ_DEF(pj_status_t) pjmedia_vid_tee_add_dst_port(pjmedia_port *vid_tee,
 						 unsigned option,
 						 pjmedia_port *port)
@@ -120,5 +121,5 @@
 		     PJ_EINVAL);
 
-    if (tee->channel_cnt >= tee->channel_maxcnt)
+    if (tee->dst_port_cnt >= tee->dst_port_maxcnt)
 	return PJ_ETOOMANY;
 
@@ -133,7 +134,7 @@
     }
 
-    tee->channels[tee->channel_cnt].dst = port;
-    tee->channels[tee->channel_cnt].option = option;
-    ++tee->channel_cnt;
+    tee->dst_ports[tee->dst_port_cnt].dst = port;
+    tee->dst_ports[tee->dst_port_cnt].option = option;
+    ++tee->dst_port_cnt;
 
     return PJ_SUCCESS;
@@ -144,6 +145,6 @@
  * Remove a destination media port from the video tee.
  */
-PJ_DECL(pj_status_t) pjmedia_vid_tee_remove_channel(pjmedia_port *vid_tee,
-						    pjmedia_port *port)
+PJ_DECL(pj_status_t) pjmedia_vid_tee_remove_dst_port(pjmedia_port *vid_tee,
+						     pjmedia_port *port)
 {
     vid_tee_port *tee = (vid_tee_port*)vid_tee;
@@ -153,9 +154,9 @@
 		     PJ_EINVAL);
 
-    for (i = 0; i < tee->channel_cnt; ++i) {
-	if (tee->channels[i].dst == port) {
-	    pj_array_erase(tee->channels, sizeof(tee->channels[0]),
-			   tee->channel_cnt, i);
-	    --tee->channel_cnt;
+    for (i = 0; i < tee->dst_port_cnt; ++i) {
+	if (tee->dst_ports[i].dst == port) {
+	    pj_array_erase(tee->dst_ports, sizeof(tee->dst_ports[0]),
+			   tee->dst_port_cnt, i);
+	    --tee->dst_port_cnt;
 	    return PJ_SUCCESS;
 	}
@@ -171,11 +172,11 @@
     unsigned i;
 
-    for (i = 0; i < tee->channel_cnt; ++i) {
+    for (i = 0; i < tee->dst_port_cnt; ++i) {
 	pjmedia_frame frame_ = *frame;
 
-	/* For channels that do in-place processing, we need to duplicate
+	/* For dst_ports that do in-place processing, we need to duplicate
 	 * the data source first.
 	 */
-	if (tee->channels[i].option & PJMEDIA_VID_TEE_DST_DO_IN_PLACE_PROC) {
+	if (tee->dst_ports[i].option & PJMEDIA_VID_TEE_DST_DO_IN_PLACE_PROC) {
 	    PJ_ASSERT_RETURN(tee->buf_size <= frame->size, PJ_ETOOBIG);
 	    frame_.buf = tee->buf;
@@ -185,5 +186,5 @@
 
 	/* Deliver the data */
-	pjmedia_port_put_frame(tee->channels[i].dst, &frame_);
+	pjmedia_port_put_frame(tee->dst_ports[i].dst, &frame_);
     }
 
