• Xiaohan Wang's avatar
    media: Refactor MediaCodec creation requirements · 4396b7a7
    Xiaohan Wang authored
    Today we pass in both |requires_secure_codec| and
    |require_software_codec| which may cotradict with each other given
    secure codecs are all hardware codecs. Add an enum to avoid this issue.
    
    Also fixes a bug where if both |requires_secure_codec| and
    |require_software_codec| are true, we would still create a secure (and
    hence hardware) codec which may hang the GPU process. In this case, we
    should just fail to create the codec.
    
    BUG=459414
    
    Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
    Change-Id: Icd8a403fe5a63b68cfe4045da7057be64ea9de66
    Reviewed-on: https://chromium-review.googlesource.com/530098Reviewed-by: default avatarChris Watkins <watk@chromium.org>
    Reviewed-by: default avatarFrank Liberato <liberato@chromium.org>
    Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#478782}
    4396b7a7
media_codec_util.cc 13.4 KB