am 2de0771d: Merge "MediaExtractor.setDataSource(...) has always thrown IOExceptions from" into jb-mr2-dev

* commit '2de0771da2b6c07f717d62ae4e4be93702af9a43':
  MediaExtractor.setDataSource(...) has always thrown IOExceptions from
This commit is contained in:
Andreas Huber
2013-04-15 08:34:37 -07:00
committed by Android Git Automerger
2 changed files with 11 additions and 10 deletions

View File

@@ -11817,10 +11817,10 @@ package android.media {
method public void seekTo(long, int);
method public void selectTrack(int);
method public final void setDataSource(android.content.Context, android.net.Uri, java.util.Map<java.lang.String, java.lang.String>) throws java.io.IOException;
method public final void setDataSource(java.lang.String, java.util.Map<java.lang.String, java.lang.String>);
method public final void setDataSource(java.lang.String);
method public final void setDataSource(java.io.FileDescriptor);
method public final void setDataSource(java.io.FileDescriptor, long, long);
method public final void setDataSource(java.lang.String, java.util.Map<java.lang.String, java.lang.String>) throws java.io.IOException;
method public final void setDataSource(java.lang.String) throws java.io.IOException;
method public final void setDataSource(java.io.FileDescriptor) throws java.io.IOException;
method public final void setDataSource(java.io.FileDescriptor, long, long) throws java.io.IOException;
method public void unselectTrack(int);
field public static final int SAMPLE_FLAG_ENCRYPTED = 2; // 0x2
field public static final int SAMPLE_FLAG_SYNC = 1; // 0x1

View File

@@ -67,7 +67,7 @@ final public class MediaExtractor {
* Sets the DataSource object to be used as the data source for this extractor
* {@hide}
*/
public native final void setDataSource(DataSource source);
public native final void setDataSource(DataSource source) throws IOException;
/**
* Sets the data source as a content Uri.
@@ -121,7 +121,8 @@ final public class MediaExtractor {
* @param path the path of the file, or the http URL
* @param headers the headers associated with the http request for the stream you want to play
*/
public final void setDataSource(String path, Map<String, String> headers) {
public final void setDataSource(String path, Map<String, String> headers)
throws IOException {
String[] keys = null;
String[] values = null;
@@ -140,7 +141,7 @@ final public class MediaExtractor {
}
private native final void setDataSource(
String path, String[] keys, String[] values);
String path, String[] keys, String[] values) throws IOException;
/**
* Sets the data source (file-path or http URL) to use.
@@ -154,7 +155,7 @@ final public class MediaExtractor {
* As an alternative, the application could first open the file for reading,
* and then use the file descriptor form {@link #setDataSource(FileDescriptor)}.
*/
public final void setDataSource(String path) {
public final void setDataSource(String path) throws IOException {
setDataSource(path, null, null);
}
@@ -164,7 +165,7 @@ final public class MediaExtractor {
*
* @param fd the FileDescriptor for the file you want to extract from.
*/
public final void setDataSource(FileDescriptor fd) {
public final void setDataSource(FileDescriptor fd) throws IOException {
setDataSource(fd, 0, 0x7ffffffffffffffL);
}
@@ -178,7 +179,7 @@ final public class MediaExtractor {
* @param length the length in bytes of the data to be extracted
*/
public native final void setDataSource(
FileDescriptor fd, long offset, long length);
FileDescriptor fd, long offset, long length) throws IOException;
@Override
protected void finalize() {