Skip to content
  • watk's avatar
    media: Clean up MediaCodecBridge and remove subclasses · c71ef8d7
    watk authored
    Previously we had two subclasses of MediaCodecBridgeImpl,
    VideoCodecBridge and AudioCodecBridge, which have become unnecessary.
    For simplicity and ease of mocking, now we just have
    MediaCodecBridgeImpl.
    
    This CL also includes various cleanups, including:
    * MediaCodecBridge factories return unique_ptrs.
    * Remove some unused MCB functions.
    * Use the java enum generator where possible to sync native and java
      enums.
    * Collapsing DEQUEUE_OUTPUT_TRY_AGAIN and DEQUEUE_INPUT_TRY_AGAIN into
      a single TRY_AGAIN (like MediaCodec).
    * Remove size params from isAdaptivePlaybackSupported() because they
      weren't used.
    * Localizing codec to mime type conversions to MediaCodecUtil.
    * Passing mime strings to MediaCodecUtil::CanDecode() instead of an
      ad-hoc codec name string.
    
    BUG=691828
    TEST=existing tests
    CQ_INCLUDE_TRYBOTS=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
    
    Review-Url: https://codereview.chromium.org/2697643003
    Cr-Commit-Position: refs/heads/master@{#452334}
    c71ef8d7