接着在上次编译的基础上增加h265支持
编译支持视频播放的cef控件(h264)
测试页面,直接使用cef_enhancement,里边带着的那个html即可,h265视频去这个网站下载elecard,我修改的这个版本参考了里边的修改方式,不过我的这个版本改完之后,直接video.canPlayType()函数,返回的信息也是提示支持h265播放
CefClient支持播放
测试的edge浏览器不支持播放
需要修改的文件以及内容如下
media/media_options.gni
enable_platform_hevc =proprietary_codecs && (is_chromecast || enable_hevc_parser_and_hw_decoder)enable_platform_hevc = trueenable_hevc_demuxing = true
media/base/supported_types.cc
case VideoCodec::kHEVC:// return IsHevcProfileSupported(type);return true;
third_party/ffmpeg/ffmpeg_generated.gni
ffmpeg_c_sources += ["libavcodec/bswapdsp.c","libavcodec/libavcodec_hevcdec.c","libavcodec/dovi_rpu.c","libavcodec/dynamic_hdr_vivid.c","libavcodec/dynamic_hdr10_plus.c","libavcodec/hevc_cabac.c","libavcodec/hevc_data.c","libavcodec/hevc_filter.c","libavcodec/hevc_mvs.c","libavcodec/hevc_parse.c","libavcodec/hevc_parser.c","libavcodec/hevc_ps.c","libavcodec/hevc_refs.c","libavcodec/hevc_sei.c","libavcodec/hevcdsp.c","libavcodec/hevcpred.c","libavcodec/x86/bswapdsp_init.c","libavcodec/x86/hevcdsp_init.c","libavformat/libavformat_hevc.c","libavformat/hevcdec.c",]ffmpeg_asm_sources += ["libavcodec/x86/bswapdsp.asm","libavcodec/x86/hevc_deblock.asm","libavcodec/x86/hevc_idct.asm","libavcodec/x86/hevc_mc.asm","libavcodec/x86/hevc_add_res.asm","libavcodec/x86/hevc_sao.asm","libavcodec/x86/hevc_sao_10bit.asm",]
third_party\ffmpeg\chromium\config\Chrome\win\ia32\libavcodec\codec_list.c
&ff_hevc_decoder,
third_party\ffmpeg\chromium\config\Chrome\win\ia32\libavcodec\parser_list.c
&ff_hevc_parser,
third_party\ffmpeg\chromium\config\Chrome\win\ia32\libavformat\demuxer_list.c
&ff_hevc_demuxer,
third_party\ffmpeg\chromium\config\Chrome\win\ia32\config.h
#define CONFIG_HEVCPARSE 1
third_party\ffmpeg\chromium\config\Chrome\win\ia32\config.asm
$#define CONFIG_HEVCPARSE 1
重新生成就能支持h265了
改完以后编译如果报一些错误,比如说提示IsHevcProfileSupported 未调用,那就直接在其他地方调用一下就可以编译过了