Create a hardware VideoDecoder implementation using Android MediaCodec.
BUG=webrtc:7760 Change-Id: Ieae3852d22cadf24cf4184ae985062918a85f02c Reviewed-on: https://chromium-review.googlesource.com/536237 Commit-Queue: Bjorn Mellem <mellem@webrtc.org> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Reviewed-by: Peter Thatcher <pthatcher@webrtc.org> Cr-Commit-Position: refs/heads/master@{#18685}
This commit is contained in:
@ -18,9 +18,13 @@ public interface VideoDecoder {
|
||||
/** Settings passed to the decoder by WebRTC. */
|
||||
public class Settings {
|
||||
public final int numberOfCores;
|
||||
public final int width;
|
||||
public final int height;
|
||||
|
||||
public Settings(int numberOfCores) {
|
||||
public Settings(int numberOfCores, int width, int height) {
|
||||
this.numberOfCores = numberOfCores;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
}
|
||||
}
|
||||
|
||||
@ -50,15 +54,15 @@ public interface VideoDecoder {
|
||||
* Initializes the decoding process with specified settings. Will be called on the decoding thread
|
||||
* before any decode calls.
|
||||
*/
|
||||
void initDecode(Settings settings, Callback decodeCallback);
|
||||
VideoCodecStatus initDecode(Settings settings, Callback decodeCallback);
|
||||
/**
|
||||
* Called when the decoder is no longer needed. Any more calls to decode will not be made.
|
||||
*/
|
||||
void release();
|
||||
VideoCodecStatus release();
|
||||
/**
|
||||
* Request the decoder to decode a frame.
|
||||
*/
|
||||
void decode(EncodedImage frame, DecodeInfo info);
|
||||
VideoCodecStatus decode(EncodedImage frame, DecodeInfo info);
|
||||
/**
|
||||
* The decoder should return true if it prefers late decoding. That is, it can not decode
|
||||
* infinite number of frames before the decoded frame is consumed.
|
||||
|
||||
Reference in New Issue
Block a user