• John Rummell's avatar
    Update H264Accelerator to handle encrypted streams. · 4213dae8
    John Rummell authored
    H264Decoder will now call H264Accelerator::SetStream() for each buffer
    so that the accelerator can check for encrypted streams. It will be
    called from Decode() so that the accelerator can return kTryAgain
    if it determines that additional data is needed to handle the stream
    (e.g. decryption key is needed). Default implementation of SetStream()
    does nothing, and returns kNotSupported which allows Decode() to
    continue.
    
    The decoder will also call H264Accelerator::ParseSliceHeader() before
    calling the same method on H264Parser. This allows the accelerator to
    handle the slice header if it is encrypted. Default implementation
    returns kNotSupported which forces the decoder to call the H264Parser
    method.
    
    BUG=837455
    TEST=new media_unittests pass
    
    Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
    Change-Id: I6d31b57f85b366ca9518904923b00300341afe98
    Reviewed-on: https://chromium-review.googlesource.com/c/1166220
    Commit-Queue: John Rummell <jrummell@chromium.org>
    Reviewed-by: default avatarRintaro Kuroiwa <rkuroiwa@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#601775}
    4213dae8
h264_decoder_unittest.cc 25.6 KB