Index: pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/stream.c
===================================================================
--- pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/stream.c	(revision 3640)
+++ pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/stream.c	(revision 3663)
@@ -516,7 +516,7 @@
 		frame_out.buf = p_out_samp + samples_count;
 		frame_out.size = frame->size - samples_count*2;
-		status = (*stream->codec->op->recover)(stream->codec,
-						       frame_out.size,
-						       &frame_out);
+		status = pjmedia_codec_recover(stream->codec,
+					       frame_out.size,
+					       &frame_out);
 
 		++stream->plc_cnt;
@@ -565,7 +565,7 @@
 			frame_out.buf = p_out_samp + samples_count;
 			frame_out.size = frame->size - samples_count*2;
-			status = (*stream->codec->op->recover)(stream->codec,
-							       frame_out.size,
-							       &frame_out);
+			status = pjmedia_codec_recover(stream->codec,
+						       frame_out.size,
+						       &frame_out);
 			if (status != PJ_SUCCESS)
 			    break;
@@ -620,7 +620,7 @@
 		    frame_out.buf = p_out_samp + samples_count;
 		    frame_out.size = frame->size - samples_count*2;
-		    status = (*stream->codec->op->recover)(stream->codec,
-							   frame_out.size,
-							   &frame_out);
+		    status = pjmedia_codec_recover(stream->codec,
+						   frame_out.size,
+						   &frame_out);
 		    if (status != PJ_SUCCESS)
 			break;
@@ -671,6 +671,6 @@
 	    frame_out.buf = p_out_samp + samples_count;
 	    frame_out.size = frame->size - samples_count*BYTES_PER_SAMPLE;
-	    status = stream->codec->op->decode( stream->codec, &frame_in,
-						frame_out.size, &frame_out);
+	    status = pjmedia_codec_decode( stream->codec, &frame_in,
+					   frame_out.size, &frame_out);
 	    if (status != 0) {
 		LOGERR_((port->info.name.ptr, "codec decode() error", 
@@ -775,6 +775,6 @@
 	    frame_in.type = PJMEDIA_FRAME_TYPE_AUDIO;
 
-	    status = stream->codec->op->decode( stream->codec, &frame_in,
-						0, frame);
+	    status = pjmedia_codec_decode( stream->codec, &frame_in,
+					   0, frame);
 	    if (status != PJ_SUCCESS) {
 		LOGERR_((port->info.name.ptr, "codec decode() error", 
@@ -802,6 +802,5 @@
 	    status = PJ_SUCCESS;
 	    if (stream->codec->op->recover) {
-		status = (*stream->codec->op->recover)(stream->codec,
-						       0, frame);
+		status = pjmedia_codec_recover(stream->codec, 0, frame);
 	    }
 	    
@@ -1249,8 +1248,8 @@
 	
 	/* Encode! */
-	status = stream->codec->op->encode( stream->codec, &silence_frame,
-					    channel->out_pkt_size - 
-					    sizeof(pjmedia_rtp_hdr),
-					    &frame_out);
+	status = pjmedia_codec_encode( stream->codec, &silence_frame,
+				       channel->out_pkt_size - 
+				       sizeof(pjmedia_rtp_hdr),
+				       &frame_out);
 	if (status != PJ_SUCCESS) {
 	    LOGERR_((stream->port.info.name.ptr, 
@@ -1273,8 +1272,8 @@
     {
 	/* Encode! */
-	status = stream->codec->op->encode( stream->codec, frame, 
-					    channel->out_pkt_size - 
-					    sizeof(pjmedia_rtp_hdr),
-					    &frame_out);
+	status = pjmedia_codec_encode( stream->codec, frame, 
+				       channel->out_pkt_size - 
+				       sizeof(pjmedia_rtp_hdr),
+				       &frame_out);
 	if (status != PJ_SUCCESS) {
 	    LOGERR_((stream->port.info.name.ptr, 
@@ -1426,5 +1425,5 @@
     {
 	stream->codec_param.setting.vad = stream->vad_enabled;
-	stream->codec->op->modify(stream->codec, &stream->codec_param);
+	pjmedia_codec_modify(stream->codec, &stream->codec_param);
 	PJ_LOG(4,(stream->port.info.name.ptr,"VAD re-enabled"));
     }
@@ -1692,10 +1691,6 @@
 
 	/* Parse the payload. */
-	status = (*stream->codec->op->parse)(stream->codec,
-					     (void*)payload,
-					     payloadlen,
-					     &ts,
-					     &count,
-					     frames);
+	status = pjmedia_codec_parse(stream->codec, (void*)payload,
+				     payloadlen, &ts, &count, frames);
 	if (status != PJ_SUCCESS) {
 	    LOGERR_((stream->port.info.name.ptr, 
@@ -2059,5 +2054,5 @@
 
     /* Open the codec. */
-    status = stream->codec->op->open(stream->codec, &stream->codec_param);
+    status = pjmedia_codec_open(stream->codec, &stream->codec_param);
     if (status != PJ_SUCCESS)
 	goto err_cleanup;
@@ -2138,5 +2133,5 @@
 	stream->codec_param.setting.vad = 0;
 	stream->ts_vad_disabled = 0;
-	stream->codec->op->modify(stream->codec, &stream->codec_param);
+	pjmedia_codec_modify(stream->codec, &stream->codec_param);
 	PJ_LOG(4,(stream->port.info.name.ptr,"VAD temporarily disabled"));
     }
@@ -2441,5 +2436,5 @@
 
     if (stream->codec) {
-	stream->codec->op->close(stream->codec);
+	pjmedia_codec_close(stream->codec);
 	pjmedia_codec_mgr_dealloc_codec(stream->codec_mgr, stream->codec);
 	stream->codec = NULL;
