Changeset 3941
- Timestamp:
- Jan 12, 2012 6:09:08 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/1.x/pjmedia/src/pjmedia/conf_switch.c
r3553 r3941 1074 1074 unsigned nsamples_to_copy, nsamples_req; 1075 1075 1076 /* Copy frame to listener's TX buffer. */ 1076 /* Copy frame to listener's TX buffer. 1077 * Note that if the destination is port 0, just copy the whole 1078 * available samples. 1079 */ 1077 1080 nsamples_to_copy = f_end - f_start; 1078 1081 nsamples_req = cport_dst->info->samples_per_frame - 1079 1082 (frm_dst->size>>1); 1080 if ( nsamples_to_copy > nsamples_req)1083 if (cport_dst->slot && nsamples_to_copy > nsamples_req) 1081 1084 nsamples_to_copy = nsamples_req; 1082 1085 … … 1111 1114 /* Check if it's time to deliver the TX buffer to listener, 1112 1115 * i.e: samples count in TX buffer equal to listener's 1113 * samples per frame. 1116 * samples per frame. Note that for destination port 0 this 1117 * function will just populate all samples in the TX buffer. 1114 1118 */ 1115 if ((frm_dst->size >> 1) == cport_dst->info->samples_per_frame) 1119 if (cport_dst->slot == 0) { 1120 /* Update TX timestamp. */ 1121 pj_add_timestamp32(&cport_dst->ts_tx, nsamples_to_copy); 1122 } else if ((frm_dst->size >> 1) == 1123 cport_dst->info->samples_per_frame) 1116 1124 { 1117 if (cport_dst->slot) { 1118 pjmedia_port_put_frame(cport_dst->port, frm_dst); 1119 1120 /* Reset TX buffer. */ 1121 frm_dst->size = 0; 1122 } 1125 pjmedia_port_put_frame(cport_dst->port, frm_dst); 1126 1127 /* Reset TX buffer. */ 1128 frm_dst->size = 0; 1123 1129 1124 1130 /* Update TX timestamp. */
Note: See TracChangeset
for help on using the changeset viewer.