Closed #1361: codec API change. Details:
 - changed encode(), packetize(), unpacketize(), and decode() to encode_begin(), encode_more(), and decode()
 - codec has new "packing" setting
 - updated stream, aviplay, codec-test, and stream-util due to above
 - minor doxygen documentation fixes here and there


git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3776 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjsip-apps/src/samples/aviplay.c b/pjsip-apps/src/samples/aviplay.c
index 0682b9e..2ceb727 100644
--- a/pjsip-apps/src/samples/aviplay.c
+++ b/pjsip-apps/src/samples/aviplay.c
@@ -153,7 +153,8 @@
         status = pjmedia_port_get_frame(port_data->src_port, frame);
         if (status != PJ_SUCCESS) goto on_error;
 	
-        status = pjmedia_vid_codec_decode(codec, frame, frame->size, &enc_frame);
+        status = pjmedia_vid_codec_decode(codec, 1, frame,
+                                          frame->size, &enc_frame);
         if (status != PJ_SUCCESS) goto on_error;
 	
         frame->size = frame_size;
@@ -166,7 +167,8 @@
     status = pjmedia_port_get_frame(port_data->src_port, &enc_frame);
     if (status != PJ_SUCCESS) goto on_error;
     
-    status = pjmedia_vid_codec_decode(codec, &enc_frame, frame->size, frame);
+    status = pjmedia_vid_codec_decode(codec, 1, &enc_frame,
+                                      frame->size, frame);
     if (status != PJ_SUCCESS) goto on_error;
     
     return PJ_SUCCESS;
@@ -291,7 +293,7 @@
             }
 	    
             pjmedia_format_copy(&codec_param.dec_fmt, &param.vidparam.fmt);
-	    
+            codec_param.packing = PJMEDIA_VID_PACKING_WHOLE;
             status = pjmedia_vid_codec_open(codec, &codec_param);
             if (status != PJ_SUCCESS) {
                 rc = 252; goto on_return;
diff --git a/pjsip-apps/src/samples/vid_streamutil.c b/pjsip-apps/src/samples/vid_streamutil.c
index 21be5c7..fd75bfb 100644
--- a/pjsip-apps/src/samples/vid_streamutil.c
+++ b/pjsip-apps/src/samples/vid_streamutil.c
@@ -301,8 +301,8 @@
 
 	write_frame.buf = play_file->dec_buf;
 	write_frame.size = play_file->dec_buf_size;
-	status = decoder->op->decode(decoder, &read_frame, write_frame.size,
-				     &write_frame);
+	status = pjmedia_vid_codec_decode(decoder, 1, &read_frame,
+	                                  write_frame.size, &write_frame);
 	if (status != PJ_SUCCESS)
 	    return;
     } else {
@@ -615,6 +615,7 @@
     if (play_file.file_name) {
 	pjmedia_video_format_detail *file_vfd;
         pjmedia_clock_param clock_param;
+        char fmt_name[5];
 
 	/* Create file player */
 	status = create_file_player(pool, play_file.file_name, &play_port);
@@ -624,12 +625,9 @@
 	/* Collect format info */
 	file_vfd = pjmedia_format_get_video_format_detail(&play_port->info.fmt,
 							  PJ_TRUE);
-	PJ_LOG(2, (THIS_FILE, "Reading video stream %dx%d %c%c%c%c @%.2ffps",
+	PJ_LOG(2, (THIS_FILE, "Reading video stream %dx%d %s @%.2ffps",
 		   file_vfd->size.w, file_vfd->size.h,
-		   ((play_port->info.fmt.id & 0x000000FF) >> 0),
-		   ((play_port->info.fmt.id & 0x0000FF00) >> 8),
-		   ((play_port->info.fmt.id & 0x00FF0000) >> 16),
-		   ((play_port->info.fmt.id & 0xFF000000) >> 24),
+		   pjmedia_fourcc_name(play_port->info.fmt.id, fmt_name),
 		   (1.0*file_vfd->fps.num/file_vfd->fps.denum)));
 
 	/* Allocate file read buffer */