Changeset 633 for pjproject/trunk/pjmedia/src/pjmedia/splitcomb.c
- Timestamp:
- Jul 29, 2006 11:14:47 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/splitcomb.c
r631 r633 25 25 26 26 #define SIGNATURE PJMEDIA_PORT_SIGNATURE('S', 'p', 'C', 'b') 27 #define SIGNATURE_PORT PJMEDIA_PORT_SIGNATURE('S', 'p', 'C', 'P') 27 28 #define THIS_FILE "splitcomb.c" 28 29 #define TMP_SAMP_TYPE pj_int16_t … … 129 130 pjmedia_port **p_splitcomb) 130 131 { 132 const pj_str_t name = pj_str("splitcomb"); 131 133 struct splitcomb *sc; 132 134 … … 161 163 162 164 /* Initialize port */ 163 sc->base.info.name = pj_str("splitcomb"); 164 sc->base.info.signature = SIGNATURE; 165 sc->base.info.type = PJMEDIA_TYPE_AUDIO; 166 sc->base.info.has_info = PJ_TRUE; 167 sc->base.info.need_info = PJ_FALSE; 168 sc->base.info.pt = 0xFF; 169 sc->base.info.encoding_name = pj_str("pcm"); 170 sc->base.info.clock_rate = clock_rate; 171 sc->base.info.channel_count = channel_count; 172 sc->base.info.bits_per_sample = bits_per_sample; 173 sc->base.info.samples_per_frame = samples_per_frame; 174 sc->base.info.bytes_per_frame = samples_per_frame * bits_per_sample / 8; 165 pjmedia_port_info_init(&sc->base.info, &name, SIGNATURE, clock_rate, 166 channel_count, bits_per_sample, samples_per_frame); 175 167 176 168 sc->base.put_frame = &put_frame; … … 227 219 pjmedia_port **p_chport) 228 220 { 221 const pj_str_t name = pj_str("splitcomb-ch"); 229 222 struct splitcomb *sc = (struct splitcomb*) splitcomb; 230 223 struct reverse_port *rport; … … 251 244 /* Initialize port info... */ 252 245 port = &rport->base; 253 port->info.name = pj_str("splitcomb-ch"); 254 port->info.signature = 0; 255 port->info.type = PJMEDIA_TYPE_AUDIO; 256 port->info.has_info = PJ_TRUE; 257 port->info.need_info = PJ_FALSE; 258 port->info.pt = 0xFF; 259 port->info.encoding_name = pj_str("pcm"); 260 port->info.clock_rate = splitcomb->info.clock_rate; 261 port->info.channel_count = 1; 262 port->info.bits_per_sample = splitcomb->info.bits_per_sample; 263 port->info.samples_per_frame = splitcomb->info.samples_per_frame / 264 splitcomb->info.channel_count; 265 port->info.bytes_per_frame = port->info.samples_per_frame * 266 port->info.bits_per_sample / 8; 246 pjmedia_port_info_init(&port->info, &name, SIGNATURE_PORT, 247 splitcomb->info.clock_rate, 1, 248 splitcomb->info.bits_per_sample, 249 splitcomb->info.samples_per_frame / 250 splitcomb->info.channel_count); 267 251 268 252 /* ... and the callbacks */
Note: See TracChangeset
for help on using the changeset viewer.