2017-06-20 11:35:04 -07:00
|
|
|
/*
|
|
|
|
|
* 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;
|
|
|
|
|
|
2018-03-22 13:32:44 +01:00
|
|
|
import javax.annotation.Nullable;
|
2017-06-20 11:35:04 -07:00
|
|
|
|
|
|
|
|
/** Factory for Android hardware VideoDecoders. */
|
2018-09-05 16:38:57 +02:00
|
|
|
public class HardwareVideoDecoderFactory extends MediaCodecVideoDecoderFactory {
|
2017-07-18 11:33:39 -07:00
|
|
|
/** Creates a HardwareVideoDecoderFactory that does not use surface textures. */
|
|
|
|
|
@Deprecated // Not removed yet to avoid breaking callers.
|
|
|
|
|
public HardwareVideoDecoderFactory() {
|
|
|
|
|
this(null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2018-09-05 16:38:57 +02:00
|
|
|
* Creates a HardwareVideoDecoderFactory that supports surface texture rendering.
|
|
|
|
|
*
|
|
|
|
|
* @param sharedContext The textures generated will be accessible from this context. May be null,
|
|
|
|
|
* this disables texture support.
|
2017-07-18 11:33:39 -07:00
|
|
|
*/
|
2018-09-05 16:38:57 +02:00
|
|
|
public HardwareVideoDecoderFactory(@Nullable EglBase.Context sharedContext) {
|
|
|
|
|
super(sharedContext, /* prefixWhitelist= */ new String[] {""},
|
|
|
|
|
/* prefixBlacklist= */ MediaCodecUtils.SOFTWARE_IMPLEMENTATION_PREFIXES);
|
2018-05-21 13:45:51 +02:00
|
|
|
}
|
2017-06-20 11:35:04 -07:00
|
|
|
}
|