Files
platform-external-webrtc/sdk/android/api/org/webrtc/SoftwareVideoDecoderFactory.java
Anders Carlsson 6cb76506fe Android: Don't create VP9 encoder/decoder when not supported.
In the SoftwareVideoCodecFactories, don't try to create VP9 encoder or
decoder if WebRTC was built without support for it.

Bug: None
Change-Id: I09b87fdcf798c763310af4998dbea8011843010d
Reviewed-on: https://webrtc-review.googlesource.com/22924
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20672}
2017-11-14 13:18:16 +00:00

26 lines
789 B
Java

/*
* Copyright 2017 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
package org.webrtc;
public class SoftwareVideoDecoderFactory implements VideoDecoderFactory {
@Override
public VideoDecoder createDecoder(String codecType) {
if (codecType.equalsIgnoreCase("VP8")) {
return new VP8Decoder();
}
if (codecType.equalsIgnoreCase("VP9") && VP9Decoder.isSupported()) {
return new VP9Decoder();
}
return null;
}
}