Merge "AmrInputStream is not a public API" am: c3b1442d52
am: fa55320f5d
Change-Id: I44e4bbdb4919fa76bd47a25f4260ee943c9a6ecc
This commit is contained in:
@@ -25,7 +25,7 @@ import android.util.Log;
|
||||
|
||||
|
||||
/**
|
||||
* AmrInputStream
|
||||
* DO NOT USE
|
||||
* @hide
|
||||
*/
|
||||
public final class AmrInputStream extends InputStream {
|
||||
@@ -51,10 +51,10 @@ public final class AmrInputStream extends InputStream {
|
||||
private byte[] mOneByte = new byte[1];
|
||||
|
||||
/**
|
||||
* Create a new AmrInputStream, which converts 16 bit PCM to AMR
|
||||
* @param inputStream InputStream containing 16 bit PCM.
|
||||
* DO NOT USE - use MediaCodec instead
|
||||
*/
|
||||
public AmrInputStream(InputStream inputStream) {
|
||||
Log.w(TAG, "@@@@ AmrInputStream is not a public API @@@@");
|
||||
mInputStream = inputStream;
|
||||
|
||||
MediaFormat format = new MediaFormat();
|
||||
@@ -83,17 +83,26 @@ public final class AmrInputStream extends InputStream {
|
||||
mInfo = new BufferInfo();
|
||||
}
|
||||
|
||||
/**
|
||||
* DO NOT USE
|
||||
*/
|
||||
@Override
|
||||
public int read() throws IOException {
|
||||
int rtn = read(mOneByte, 0, 1);
|
||||
return rtn == 1 ? (0xff & mOneByte[0]) : -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* DO NOT USE
|
||||
*/
|
||||
@Override
|
||||
public int read(byte[] b) throws IOException {
|
||||
return read(b, 0, b.length);
|
||||
}
|
||||
|
||||
/**
|
||||
* DO NOT USE
|
||||
*/
|
||||
@Override
|
||||
public int read(byte[] b, int offset, int length) throws IOException {
|
||||
if (mCodec == null) {
|
||||
|
||||
Reference in New Issue
Block a user