Skip to content

Commit

Permalink
Merge pull request google#486 from google/dev-1.3.3-rc
Browse files Browse the repository at this point in the history
Release 1.3.3
  • Loading branch information
ojw28 committed May 22, 2015
2 parents 888d9db + 175ce5f commit acee566
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 39 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ accompanying demo application. To get started:

## Using Gradle ##

ExoPlayer can also be built using Gradle. You can include it as a dependent project and build from source. e.g.
ExoPlayer can also be built using Gradle. You can include it as a dependent project and build from source:

```
// settings.gradle
Expand All @@ -74,3 +74,11 @@ If you want to use ExoPlayer as a jar, run:
```

and copy library.jar to the libs-folder of your new project.

The project is also available on [jCenter](https://bintray.com/google/exoplayer/exoplayer/view):

```
compile 'com.google.android.exoplayer:exoplayer:rX.X.X'
```

Where `rX.X.X` should be replaced with the desired version.
5 changes: 5 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release notes #

### r1.3.3 ###

* HLS: Fix failure when playing HLS AAC streams.
* Misc bug fixes.

### r1.3.2 ###

* DataSource improvements: `DefaultUriDataSource` now handles http://, https://, file://, asset://
Expand Down
4 changes: 2 additions & 2 deletions demo/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.exoplayer.demo"
android:versionCode="1302"
android:versionName="1.3.2"
android:versionCode="1303"
android:versionName="1.3.3"
android:theme="@style/RootTheme">

<uses-permission android:name="android.permission.INTERNET"/>
Expand Down
2 changes: 1 addition & 1 deletion library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ publish {
userOrg = 'google'
groupId = 'com.google.android.exoplayer'
artifactId = 'exoplayer'
version = 'r1.3.2'
version = 'r1.3.3'
description = 'The ExoPlayer library.'
website = 'https://github.com/google/ExoPlayer'
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ private ExoPlayerLibraryInfo() {}
/**
* The version of the library, expressed as a string.
*/
public static final String VERSION = "1.3.2";
public static final String VERSION = "1.3.3";

/**
* The version of the library, expressed as an integer.
* <p>
* Three digits are used for each component of {@link #VERSION}. For example "1.2.3" has the
* corresponding integer version 001002003.
*/
public static final int VERSION_INT = 001003002;
public static final int VERSION_INT = 001003003;

/**
* Whether the library was compiled with {@link com.google.android.exoplayer.util.Assertions}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ public int handleBuffer(ByteBuffer buffer, int offset, int size, long presentati
// This is the first time we've seen this {@code buffer}.
// Note: presentationTimeUs corresponds to the end of the sample, not the start.
long bufferStartTime = presentationTimeUs - framesToDurationUs(bytesToFrames(size));
if (startMediaTimeUs == START_NOT_SET) {
if (startMediaTimeState == START_NOT_SET) {
startMediaTimeUs = Math.max(0, bufferStartTime);
startMediaTimeState = START_IN_SYNC;
} else {
Expand Down Expand Up @@ -573,7 +573,7 @@ public void reset() {
if (isInitialized()) {
submittedBytes = 0;
temporaryBufferSize = 0;
startMediaTimeUs = START_NOT_SET;
startMediaTimeState = START_NOT_SET;
latencyUs = 0;
resetSyncParams();
int playState = audioTrack.getPlayState();
Expand Down Expand Up @@ -623,7 +623,7 @@ public void run() {

/** Returns whether {@link #getCurrentPositionUs} can return the current playback position. */
private boolean hasCurrentPositionUs() {
return isInitialized() && startMediaTimeUs != START_NOT_SET;
return isInitialized() && startMediaTimeState != START_NOT_SET;
}

/** Updates the audio track latency and playback position parameters. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ public HlsExtractorWrapper(int trigger, Format format, long startTimeUs, Extract
this.extractor = extractor;
this.shouldSpliceIn = shouldSpliceIn;
sampleQueues = new SparseArray<DefaultTrackOutput>();
extractor.init(this);
}

/**
Expand All @@ -71,6 +70,7 @@ public HlsExtractorWrapper(int trigger, Format format, long startTimeUs, Extract
*/
public void init(Allocator allocator) {
this.allocator = allocator;
this.extractor.init(this);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public final class HlsPlaylistParser implements UriLoadable.Parser<HlsPlaylist>
private static final Pattern CODECS_ATTR_REGEX =
Pattern.compile(CODECS_ATTR + "=\"(.+?)\"");
private static final Pattern RESOLUTION_ATTR_REGEX =
Pattern.compile(RESOLUTION_ATTR + "=(\\d+(\\.\\d+)?x\\d+(\\.\\d+)?)");
Pattern.compile(RESOLUTION_ATTR + "=(\\d+x\\d+)");
private static final Pattern MEDIA_DURATION_REGEX =
Pattern.compile(MEDIA_DURATION_TAG + ":([\\d.]+),");
private static final Pattern MEDIA_SEQUENCE_REGEX =
Expand Down Expand Up @@ -168,12 +168,12 @@ private static HlsMasterPlaylist parseMasterPlaylist(LineIterator iterator, Stri
RESOLUTION_ATTR_REGEX);
if (resolutionString != null) {
String[] widthAndHeight = resolutionString.split("x");
width = Math.round(Float.parseFloat(widthAndHeight[0]));
width = Integer.parseInt(widthAndHeight[0]);
if (width <= 0) {
// Width was invalid.
width = -1;
}
height = Math.round(Float.parseFloat(widthAndHeight[1]));
height = Integer.parseInt(widthAndHeight[1]);
if (height <= 0) {
// Height was invalid.
height = -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,6 @@
*/
public final class DefaultUriDataSource implements UriDataSource {

/**
* Thrown when a {@link DefaultUriDataSource} is opened for a URI with an unsupported scheme.
*/
public static final class UnsupportedSchemeException extends IOException {

/**
* The unsupported scheme.
*/
public final String scheme;

/**
* @param scheme The unsupported scheme.
*/
public UnsupportedSchemeException(String scheme) {
super("Unsupported URI scheme: " + scheme);
this.scheme = scheme;
}

}

private static final String SCHEME_HTTP = "http";
private static final String SCHEME_HTTPS = "https";
private static final String SCHEME_FILE = "file";
private static final String SCHEME_ASSET = "asset";
private static final String SCHEME_CONTENT = "content";
Expand Down Expand Up @@ -141,9 +119,7 @@ public long open(DataSpec dataSpec) throws IOException {
Assertions.checkState(dataSource == null);
// Choose the correct source for the scheme.
String scheme = dataSpec.uri.getScheme();
if (SCHEME_HTTP.equals(scheme) || SCHEME_HTTPS.equals(scheme)) {
dataSource = httpDataSource;
} else if (SCHEME_FILE.equals(scheme) || TextUtils.isEmpty(scheme)) {
if (SCHEME_FILE.equals(scheme) || TextUtils.isEmpty(scheme)) {
if (dataSpec.uri.getPath().startsWith("/android_asset/")) {
dataSource = assetDataSource;
} else {
Expand All @@ -154,7 +130,7 @@ public long open(DataSpec dataSpec) throws IOException {
} else if (SCHEME_CONTENT.equals(scheme)) {
dataSource = contentDataSource;
} else {
throw new UnsupportedSchemeException(scheme);
dataSource = httpDataSource;
}
// Open the source and return.
return dataSource.open(dataSpec);
Expand Down

0 comments on commit acee566

Please sign in to comment.