summaryrefslogtreecommitdiff
path: root/pjsip-apps/src/samples/vid_streamutil.c
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2011-09-29 08:31:15 +0000
committerBenny Prijono <bennylp@teluu.com>2011-09-29 08:31:15 +0000
commit21bee233619f1e2187345efd4eaed85e49facc5b (patch)
tree53db607a42e99c01d67c8e0612b29ec9313b4755 /pjsip-apps/src/samples/vid_streamutil.c
parent90bbdfb85e44e2be7a185a7f8288bd50371d735a (diff)
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: http://svn.pjsip.org/repos/pjproject/trunk@3776 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps/src/samples/vid_streamutil.c')
-rw-r--r--pjsip-apps/src/samples/vid_streamutil.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/pjsip-apps/src/samples/vid_streamutil.c b/pjsip-apps/src/samples/vid_streamutil.c
index 21be5c7c..fd75bfb3 100644
--- a/pjsip-apps/src/samples/vid_streamutil.c
+++ b/pjsip-apps/src/samples/vid_streamutil.c
@@ -301,8 +301,8 @@ static void clock_cb(const pj_timestamp *ts, void *user_data)
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 @@ int main(int argc, char *argv[])
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 @@ int main(int argc, char *argv[])
/* 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 */