- Timestamp:
- Mar 2, 2011 8:37:31 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/2.0-dev/pjsip-apps/src/samples/vid_streamutil.c
r3432 r3435 126 126 } 127 127 128 /* 129 * Register all codecs. 130 */ 131 static void deinit_codecs() 132 { 133 #if defined(PJMEDIA_HAS_FFMPEG_CODEC) && PJMEDIA_HAS_FFMPEG_CODEC != 0 134 pjmedia_codec_ffmpeg_deinit(); 135 #endif 136 } 137 128 138 static pj_status_t create_file_player( pj_pool_t *pool, 129 139 const char *file_name, … … 616 626 file_vfd = pjmedia_format_get_video_format_detail(&play_port->info.fmt, 617 627 PJ_TRUE); 618 PJ_LOG(2, (THIS_FILE, "Reading video stream %dx%d %c%c%c%c @%.2 dfps",628 PJ_LOG(2, (THIS_FILE, "Reading video stream %dx%d %c%c%c%c @%.2ffps", 619 629 file_vfd->size.w, file_vfd->size.h, 620 630 ((play_port->info.fmt.id & 0x000000FF) >> 0), … … 622 632 ((play_port->info.fmt.id & 0x00FF0000) >> 16), 623 633 ((play_port->info.fmt.id & 0xFF000000) >> 24), 624 file_vfd->fps.num/file_vfd->fps.denum));634 (1.0*file_vfd->fps.num/file_vfd->fps.denum))); 625 635 626 636 /* Allocate file read buffer */ … … 658 668 goto on_exit; 659 669 670 codec_param2.dir = PJMEDIA_DIR_DECODING; 660 671 status = play_decoder->op->open(play_decoder, &codec_param2); 661 672 if (status != PJ_SUCCESS) … … 706 717 goto on_exit; 707 718 708 pjmedia_format_copy(&vpp.vidparam.fmt, &codec_param.dec_fmt); 719 pjmedia_format_copy(&vpp.vidparam.fmt, &codec_param.enc_fmt); 720 vpp.vidparam.fmt.id = codec_param.dec_fmt.id; 709 721 vpp.vidparam.dir = PJMEDIA_DIR_CAPTURE; 710 722 … … 836 848 837 849 if (dir & PJMEDIA_DIR_ENCODING) 838 PJ_LOG(2, (THIS_FILE, "Sending %dx%d %.*s @%.2 dfps",850 PJ_LOG(2, (THIS_FILE, "Sending %dx%d %.*s @%.2ffps", 839 851 codec_param.enc_fmt.det.vid.size.w, 840 852 codec_param.enc_fmt.det.vid.size.h, 841 853 codec_info->encoding_name.slen, 842 854 codec_info->encoding_name.ptr, 843 codec_param.enc_fmt.det.vid.fps.num/844 codec_param.enc_fmt.det.vid.fps.denum));855 (1.0*codec_param.enc_fmt.det.vid.fps.num/ 856 codec_param.enc_fmt.det.vid.fps.denum))); 845 857 846 858 for (;;) { … … 880 892 881 893 /* Destroy file decoder */ 882 if (play_decoder) 894 if (play_decoder) { 883 895 play_decoder->op->close(play_decoder); 896 pjmedia_vid_codec_mgr_dealloc_codec(NULL, play_decoder); 897 } 884 898 885 899 /* Destroy video devices */ … … 899 913 } 900 914 915 /* Deinit codecs */ 916 deinit_codecs(); 917 901 918 /* Shutdown video subsystem */ 902 919 pjmedia_vid_subsys_shutdown();
Note: See TracChangeset
for help on using the changeset viewer.