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:
committed by
Commit Bot
parent
24ee167a3d
commit
d5806b289f
@ -28,7 +28,11 @@ import java.util.concurrent.TimeUnit;
|
||||
import javax.annotation.Nullable;
|
||||
import org.webrtc.ThreadUtils.ThreadChecker;
|
||||
|
||||
/** Android hardware video encoder. */
|
||||
/**
|
||||
* Android hardware video encoder.
|
||||
*
|
||||
* @note This class is only supported on Android Kitkat and above.
|
||||
*/
|
||||
@TargetApi(19)
|
||||
@SuppressWarnings("deprecation") // Cannot support API level 19 without using deprecated methods.
|
||||
class HardwareVideoEncoder implements VideoEncoder {
|
||||
|
||||
Reference in New Issue
Block a user