- Timestamp:
- Feb 4, 2020 2:49:13 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/vid_codec_util.c
r6149 r6150 841 841 } 842 842 843 if (param->dir & PJMEDIA_DIR_DECODING) { 844 /* Here we just want to find the highest fps and resolution possible 845 * from the fmtp and set it as the decoder param. 846 */ 847 pjmedia_vid_codec_vpx_fmtp fmtp; 848 pjmedia_video_format_detail *vfd; 849 pj_status_t status; 850 851 /* Get remote param */ 852 status = pjmedia_vid_codec_vpx_parse_fmtp(¶m->dec_fmtp, 853 &fmtp); 854 if (status != PJ_SUCCESS) 855 return status; 856 857 vfd = pjmedia_format_get_video_format_detail(¶m->dec_fmt, 858 PJ_TRUE); 859 860 if (fmtp.max_fr > 0) { 861 vfd->fps.num = fmtp.max_fr; 862 vfd->fps.denum = 1; 863 } 864 865 if (fmtp.max_fs > 0) { 866 unsigned max_res = ((int)pj_isqrt(fmtp.max_fs * 8)) * 16; 867 868 vfd->size.w = max_res; 869 vfd->size.h = max_res; 870 } 871 } 872 843 873 return PJ_SUCCESS; 844 874 }
Note: See TracChangeset
for help on using the changeset viewer.