1 /* 2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 package org.webrtc; 12 13 import android.support.annotation.Nullable; 14 15 /** Factory for creating VideoDecoders. */ 16 public interface VideoDecoderFactory { 17 /** 18 * Creates a VideoDecoder for the given codec. Supports the same codecs supported by 19 * VideoEncoderFactory. 20 */ 21 @Deprecated 22 @Nullable createDecoder(String codecType)23 default VideoDecoder createDecoder(String codecType) { 24 throw new UnsupportedOperationException("Deprecated and not implemented."); 25 } 26 27 /** Creates a decoder for the given video codec. */ 28 @Nullable 29 @CalledByNative createDecoder(VideoCodecInfo info)30 default VideoDecoder createDecoder(VideoCodecInfo info) { 31 return createDecoder(info.getName()); 32 } 33 34 /** 35 * Enumerates the list of supported video codecs. 36 */ 37 @CalledByNative getSupportedCodecs()38 default VideoCodecInfo[] getSupportedCodecs() { 39 return new VideoCodecInfo[0]; 40 } 41 } 42