2017-05-08 331 views
1

我已经知道cef3的老版本像2623可以通过修改chromium \ src \ cef \ cef.gypi文件启用H264支持。 但在最近的版本,如3071或3029,cef3已经删除cef.gypi文件。 我已经使用了这个,但我发现仍然通过修改cef.gypi文件。 由于此方法仅适用于旧版本。是否有另一种方法可以让新版本启用H264支持? 非常感谢!如何在CEF3最新版本中启用H264支持?

+0

https://blog.chromium.org/2011/01/html-video-codec-support -in-chrome.html –

+0

感谢您的回复,我成功地将它建立了。 – lym

回答

3

事实上,支持proprietary codecs的编译选项已移动。

魔术现在发生在这里:

set GN_DEFINES=is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome 

有2个批处理文件,你应该更新/创建(如发现here):

C:\代码\ chromium_git \ update.bat:

set CEF_USE_GN=1 
set GN_DEFINES=is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome 
set GN_ARGUMENTS=--ide=vs2015 --sln=cef --filters=//cef/* 
python ..\automate\automate-git.py --download-dir=C:\code\chromium_git --depot-tools-dir=C:\code\depot_tools --no-distrib --no-build 

C:\代码\ chromium_git \铬\ SRC \ CEF \ create.bat:

set CEF_USE_GN=1 
set GN_DEFINES=is_win_fastlink=true proprietary_codecs=true ffmpeg_branding=Chrome 
set GN_ARGUMENTS=--ide=vs2015 --sln=cef --filters=//cef/* 
call cef_create_projects.bat 

没有解释如何建立CEF /铬2篇维基文章:

  1. https://bitbucket.org/chromiumembedded/cef/wiki/MasterBuildQuickStart.md
  2. 在同一维基

更新

  • BranchesAndBuilding 以下是对铬的相关信息更连结来制作标志:

    https://www.chromium.org/developers/gn-build-configuration
    https://www.chromium.org/audio-video
    https://chromium.googlesource.com/chromium/src/+/lkcr/docs/windows_build_instructions.md

    ... GYP/GN flags which can alter behaviour of Chromium's HTML5 audio/video implementation. 
    
    ffmpeg_branding 
        Overrides which version of FFmpeg to use 
        Default: $(branding) 
        Values: 
        Chrome - includes additional proprietary codecs (MP3, etc..) for use with Google Chrome 
        Chromium - builds default set of codecs 
    
    proprietary_codecs 
        Alters the list of codecs Chromium claims to support, which affects <source> and canPlayType() behaviour 
        Default: 0(gyp)/false(gn) 
        Values: 
        0/false - <source> and canPlayType() assume the default set of codecs 
        1/true - <source> and canPlayType() assume they support additional proprietary codecs 
    
  • 相关问题