Add checks to HW codecs to ensure unsupported features are not used.

Add checks to ensure encoder is not used below API level 19. Removes
global @TargetApi from MediaCodecUtils since it is also used by the
decoder. Ensures that texture mode is never enabled below API level 18.

Bug: webrtc:9821
Change-Id: I2ca1014bf8995719c970eb1449b0acbf7b3c883e
Reviewed-on: https://webrtc-review.googlesource.com/c/103701
Reviewed-by: Paulina Hensman <phensman@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24990}
This commit is contained in:
Sami Kalliomäki
2018-10-04 11:26:43 +02:00
committed by Commit Bot
parent 24ee167a3d
commit d5806b289f
4 changed files with 25 additions and 4 deletions

View File

@ -27,7 +27,6 @@ import org.webrtc.ThreadUtils.ThreadChecker;
/**
* Android hardware video decoder.
*/
@TargetApi(16)
@SuppressWarnings("deprecation")
// Cannot support API 16 without using deprecated methods.
// TODO(sakal): Rename to MediaCodecVideoDecoder once the deprecated implementation is removed.