Rename software codec classes and move them into api/

We want clients to be able to build their own factories around these
codecs.

Bug: webrtc:7925
Change-Id: Ia8f62d5d85e63ac6e3eb402c5996d8b986625615
Reviewed-on: https://webrtc-review.googlesource.com/c/109529
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Jonathan Yu <yujo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#25543}
This commit is contained in:
Jonathan Yu
2018-11-06 14:10:51 -08:00
committed by Commit Bot
parent ff7020af27
commit 50f60cb4b3
9 changed files with 115 additions and 64 deletions

View File

@ -27,10 +27,10 @@ public class SoftwareVideoDecoderFactory implements VideoDecoderFactory {
@Override
public VideoDecoder createDecoder(VideoCodecInfo codecType) {
if (codecType.getName().equalsIgnoreCase("VP8")) {
return new VP8Decoder();
return new LibvpxVp8Decoder();
}
if (codecType.getName().equalsIgnoreCase("VP9") && VP9Decoder.nativeIsSupported()) {
return new VP9Decoder();
if (codecType.getName().equalsIgnoreCase("VP9") && LibvpxVp9Decoder.nativeIsSupported()) {
return new LibvpxVp9Decoder();
}
return null;
@ -45,7 +45,7 @@ public class SoftwareVideoDecoderFactory implements VideoDecoderFactory {
List<VideoCodecInfo> codecs = new ArrayList<VideoCodecInfo>();
codecs.add(new VideoCodecInfo("VP8", new HashMap<>()));
if (VP9Decoder.nativeIsSupported()) {
if (LibvpxVp9Decoder.nativeIsSupported()) {
codecs.add(new VideoCodecInfo("VP9", new HashMap<>()));
}