1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 
5 package org.mozilla.gecko.media;
6 
7 // Non-default types used in interface.
8 import android.os.Bundle;
9 import org.mozilla.gecko.gfx.GeckoSurface;
10 import org.mozilla.gecko.media.FormatParam;
11 import org.mozilla.gecko.media.ICodecCallbacks;
12 import org.mozilla.gecko.media.Sample;
13 import org.mozilla.gecko.media.SampleBuffer;
14 
15 interface ICodec {
setCallbacks(in ICodecCallbacks callbacks)16     void setCallbacks(in ICodecCallbacks callbacks);
configure(in FormatParam format, in GeckoSurface surface, in int flags, in String drmStubId)17     boolean configure(in FormatParam format, in GeckoSurface surface, in int flags, in String drmStubId);
isAdaptivePlaybackSupported()18     boolean isAdaptivePlaybackSupported();
isHardwareAccelerated()19     boolean isHardwareAccelerated();
isTunneledPlaybackSupported()20     boolean isTunneledPlaybackSupported();
start()21     void start();
stop()22     void stop();
flush()23     void flush();
release()24     void release();
25 
dequeueInput(int size)26     Sample dequeueInput(int size);
queueInput(in Sample sample)27     oneway void queueInput(in Sample sample);
getInputBuffer(int id)28     SampleBuffer getInputBuffer(int id);
getOutputBuffer(int id)29     SampleBuffer getOutputBuffer(int id);
30 
releaseOutput(in Sample sample, in boolean render)31     void releaseOutput(in Sample sample, in boolean render);
setBitrate(in int bps)32     oneway void setBitrate(in int bps);
33 }
34