Changeset 3664 for pjproject/trunk/pjmedia/src/test/mips_test.c
- Timestamp:
- Jul 19, 2011 3:42:28 AM (13 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk
- Property svn:mergeinfo changed
-
pjproject/trunk/pjmedia/src/test/mips_test.c
r3553 r3664 685 685 686 686 static pj_status_t codec_put_frame(struct pjmedia_port *this_port, 687 constpjmedia_frame *frame)687 pjmedia_frame *frame) 688 688 { 689 689 struct codec_port *cp = (struct codec_port*)this_port; … … 693 693 out_frame.buf = cp->pkt; 694 694 out_frame.size = sizeof(cp->pkt); 695 status = cp->codec->op->encode(cp->codec, frame, sizeof(cp->pkt),696 695 status = pjmedia_codec_encode(cp->codec, frame, sizeof(cp->pkt), 696 &out_frame); 697 697 pj_assert(status == PJ_SUCCESS); 698 698 … … 702 702 unsigned i; 703 703 704 status = cp->codec->op->parse(cp->codec, out_frame.buf,705 706 704 status = pjmedia_codec_parse(cp->codec, out_frame.buf, 705 out_frame.size, &out_frame.timestamp, 706 &frame_cnt, parsed_frm); 707 707 pj_assert(status == PJ_SUCCESS); 708 708 … … 710 710 pcm_frm.buf = cp->pcm; 711 711 pcm_frm.size = sizeof(cp->pkt); 712 status = cp->codec->op->decode(cp->codec, &parsed_frm[i],713 712 status = pjmedia_codec_decode(cp->codec, &parsed_frm[i], 713 sizeof(cp->pcm), &pcm_frm); 714 714 pj_assert(status == PJ_SUCCESS); 715 715 } … … 723 723 struct codec_port *cp = (struct codec_port*)this_port; 724 724 725 cp->codec->op->close(cp->codec);725 pjmedia_codec_close(cp->codec); 726 726 pjmedia_codec_mgr_dealloc_codec(pjmedia_endpt_get_codec_mgr(cp->endpt), 727 727 cp->codec); … … 783 783 return NULL; 784 784 785 status = (*cp->codec->op->init)(cp->codec, pool);785 status = pjmedia_codec_init(cp->codec, pool); 786 786 if (status != PJ_SUCCESS) 787 787 return NULL; 788 788 789 status = cp->codec->op->open(cp->codec, &codec_param);789 status = pjmedia_codec_open(cp->codec, &codec_param); 790 790 if (status != PJ_SUCCESS) 791 791 return NULL; … … 1132 1132 1133 1133 while (pjmedia_circ_buf_get_len(wp->circbuf) < 1134 wp->base.info.samples_per_frame* (CIRC_BUF_FRAME_CNT-1))1134 PJMEDIA_PIA_SPF(&wp->base.info) * (CIRC_BUF_FRAME_CNT-1)) 1135 1135 { 1136 1136 status = pjmedia_port_get_frame(wp->gen_port, frame); … … 1138 1138 1139 1139 status = pjmedia_circ_buf_write(wp->circbuf, (short*)frame->buf, 1140 wp->base.info.samples_per_frame);1140 PJMEDIA_PIA_SPF(&wp->base.info)); 1141 1141 pj_assert(status==PJ_SUCCESS); 1142 1142 } … … 1150 1150 ®2, ®2_len); 1151 1151 1152 del_cnt = wp->base.info.samples_per_frame;1152 del_cnt = PJMEDIA_PIA_SPF(&wp->base.info); 1153 1153 status = pjmedia_wsola_discard(wp->wsola, reg1, reg1_len, reg2, 1154 1154 reg2_len, &del_cnt); … … 2011 2011 2012 2012 static pj_status_t delaybuf_put_frame(struct pjmedia_port *this_port, 2013 constpjmedia_frame *frame)2013 pjmedia_frame *frame) 2014 2014 { 2015 2015 struct delaybuf_port *dp = (struct delaybuf_port*)this_port; … … 2220 2220 2221 2221 /* Port may decide to use different ptime (e.g. iLBC) */ 2222 samples_per_frame = port->info.samples_per_frame;2222 samples_per_frame = PJMEDIA_PIA_SPF(&port->info); 2223 2223 2224 2224 gen_port = create_gen_port(pool, clock_rate, 1,
Note: See TracChangeset
for help on using the changeset viewer.