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