Changeset 3999 for pjproject/trunk/pjmedia/src/pjmedia/conf_switch.c
- Timestamp:
- Mar 30, 2012 7:10:13 AM (12 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk
-
pjproject/trunk/pjmedia/src/pjmedia/conf_switch.c
r3915 r3999 1087 1087 unsigned nsamples_to_copy, nsamples_req; 1088 1088 1089 /* Copy frame to listener's TX buffer. */ 1089 /* Copy frame to listener's TX buffer. 1090 * Note that if the destination is port 0, just copy the whole 1091 * available samples. 1092 */ 1090 1093 nsamples_to_copy = f_end - f_start; 1091 1094 nsamples_req = cport_dst->samples_per_frame - 1092 1095 (frm_dst->size>>1); 1093 if ( nsamples_to_copy > nsamples_req)1096 if (cport_dst->slot && nsamples_to_copy > nsamples_req) 1094 1097 nsamples_to_copy = nsamples_req; 1095 1098 … … 1124 1127 /* Check if it's time to deliver the TX buffer to listener, 1125 1128 * i.e: samples count in TX buffer equal to listener's 1126 * samples per frame. 1129 * samples per frame. Note that for destination port 0 this 1130 * function will just populate all samples in the TX buffer. 1127 1131 */ 1128 if ((frm_dst->size >> 1) == cport_dst->samples_per_frame) 1132 if (cport_dst->slot == 0) { 1133 /* Update TX timestamp. */ 1134 pj_add_timestamp32(&cport_dst->ts_tx, nsamples_to_copy); 1135 } else if ((frm_dst->size >> 1) == 1136 cport_dst->samples_per_frame) 1129 1137 { 1130 if (cport_dst->slot) { 1131 pjmedia_port_put_frame(cport_dst->port, frm_dst); 1132 1133 /* Reset TX buffer. */ 1134 frm_dst->size = 0; 1135 } 1138 pjmedia_port_put_frame(cport_dst->port, frm_dst); 1139 1140 /* Reset TX buffer. */ 1141 frm_dst->size = 0; 1136 1142 1137 1143 /* Update TX timestamp. */
Note: See TracChangeset
for help on using the changeset viewer.