Skip to content

Commit

Permalink
Release 1.3.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
ojw28 committed May 12, 2015
2 parents d29bd6d + 5ca5df0 commit 924ead4
Show file tree
Hide file tree
Showing 230 changed files with 17,780 additions and 9,418 deletions.
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,29 @@
ExoPlayer is an application level media player for Android. It provides an
alternative to Android’s MediaPlayer API for playing audio and video both
locally and over the Internet. ExoPlayer supports features not currently
supported by Android’s MediaPlayer API (as of KitKat), including DASH and
SmoothStreaming adaptive playbacks, persistent caching and custom renderers.
Unlike the MediaPlayer API, ExoPlayer is easy to customize and extend, and
can be updated through Play Store application updates.
supported by Android’s MediaPlayer API, including DASH and SmoothStreaming
adaptive playbacks. Unlike the MediaPlayer API, ExoPlayer is easy to
customize and extend, and can be updated through Play Store application
updates.

## News ##

## Developer guide ##
Read news, hints and tips on the [news][] page.

The [ExoPlayer developer guide][] provides a wealth of information to help you
get started.
[news]: https://google.github.io/ExoPlayer/news.html

[ExoPlayer developer guide]: http://developer.android.com/guide/topics/media/exoplayer.html
## Developer guide ##

The [developer guide][] provides a wealth of information to help you get
started.

## Reference documentation ##
[developer guide]: https://google.github.io/ExoPlayer/guide.html

[Class reference][] (Documents the ExoPlayer library classes).
## Reference documentation ##

[Class reference]: http://google.github.io/ExoPlayer/doc/reference/com/google/android/exoplayer/package-summary.html
The [class reference][] documents the ExoPlayer library classes.

[class reference]: https://google.github.io/ExoPlayer/doc/reference

## Project branches ##

Expand All @@ -35,7 +38,6 @@ get started.
[master]: https://github.com/google/ExoPlayer/tree/master
[dev]: https://github.com/google/ExoPlayer/tree/dev


## Using Eclipse ##

The repository includes Eclipse projects for both the ExoPlayer library and its
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
classpath 'com.android.tools.build:gradle:1.2.3'
classpath 'com.novoda:bintray-release:0.2.7'
}
}
Expand Down
6 changes: 3 additions & 3 deletions demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
compileSdkVersion 22
buildToolsVersion "22.0.1"

defaultConfig {
minSdkVersion 16
targetSdkVersion 21
targetSdkVersion 22
}
buildTypes {
release {
Expand Down
6 changes: 3 additions & 3 deletions demo/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.exoplayer.demo"
android:versionCode="1204"
android:versionName="1.2.4"
android:versionCode="1301"
android:versionName="1.3.1"
android:theme="@style/RootTheme">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="21"/>
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="22"/>

<application
android:label="@string/application_name"
Expand Down
35 changes: 8 additions & 27 deletions demo/src/main/java/com/google/android/exoplayer/demo/DemoUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@
*/
package com.google.android.exoplayer.demo;

import com.google.android.exoplayer.ExoPlayerLibraryInfo;

import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Build;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
Expand All @@ -32,22 +25,23 @@
import java.net.CookieManager;
import java.net.CookiePolicy;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Map;
import java.util.UUID;

/**
* Utility methods for the demo application.
*/
public class DemoUtil {

public static final UUID WIDEVINE_UUID = new UUID(0xEDEF8BA979D64ACEL, 0xA3C827DCD51D21EDL);

public static final int TYPE_DASH = 0;
public static final int TYPE_SS = 1;
public static final int TYPE_OTHER = 2;
public static final int TYPE_HLS = 3;
public static final int TYPE_HLS = 2;
public static final int TYPE_MP4 = 3;
public static final int TYPE_MP3 = 4;
public static final int TYPE_M4A = 5;
public static final int TYPE_WEBM = 6;
public static final int TYPE_TS = 7;
public static final int TYPE_AAC = 8;

private static final CookieManager defaultCookieManager;

Expand All @@ -56,21 +50,8 @@ public class DemoUtil {
defaultCookieManager.setCookiePolicy(CookiePolicy.ACCEPT_ORIGINAL_SERVER);
}

public static String getUserAgent(Context context) {
String versionName;
try {
String packageName = context.getPackageName();
PackageInfo info = context.getPackageManager().getPackageInfo(packageName, 0);
versionName = info.versionName;
} catch (NameNotFoundException e) {
versionName = "?";
}
return "ExoPlayerDemo/" + versionName + " (Linux;Android " + Build.VERSION.RELEASE +
") " + "ExoPlayerLib/" + ExoPlayerLibraryInfo.VERSION;
}

public static byte[] executePost(String url, byte[] data, Map<String, String> requestProperties)
throws MalformedURLException, IOException {
throws IOException {
HttpURLConnection urlConnection = null;
try {
urlConnection = (HttpURLConnection) new URL(url).openConnection();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import com.google.android.exoplayer.ExoPlayer;
import com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException;
import com.google.android.exoplayer.audio.AudioTrack;
import com.google.android.exoplayer.chunk.Format;
import com.google.android.exoplayer.demo.player.DemoPlayer;
import com.google.android.exoplayer.util.VerboseLogUtil;

Expand Down Expand Up @@ -91,17 +92,18 @@ public void onDroppedFrames(int count, long elapsed) {
}

@Override
public void onLoadStarted(int sourceId, String formatId, int trigger, boolean isInitialization,
int mediaStartTimeMs, int mediaEndTimeMs, long length) {
public void onLoadStarted(int sourceId, long length, int type, int trigger, Format format,
int mediaStartTimeMs, int mediaEndTimeMs) {
loadStartTimeMs[sourceId] = SystemClock.elapsedRealtime();
if (VerboseLogUtil.isTagEnabled(TAG)) {
Log.v(TAG, "loadStart [" + getSessionTimeString() + ", " + sourceId
Log.v(TAG, "loadStart [" + getSessionTimeString() + ", " + sourceId + ", " + type
+ ", " + mediaStartTimeMs + ", " + mediaEndTimeMs + "]");
}
}

@Override
public void onLoadCompleted(int sourceId, long bytesLoaded) {
public void onLoadCompleted(int sourceId, long bytesLoaded, int type, int trigger, Format format,
int mediaStartTimeMs, int mediaEndTimeMs, long elapsedRealtimeMs, long loadDurationMs) {
if (VerboseLogUtil.isTagEnabled(TAG)) {
long downloadTime = SystemClock.elapsedRealtime() - loadStartTimeMs[sourceId];
Log.v(TAG, "loadEnd [" + getSessionTimeString() + ", " + sourceId + ", " + downloadTime
Expand All @@ -110,27 +112,22 @@ public void onLoadCompleted(int sourceId, long bytesLoaded) {
}

@Override
public void onVideoFormatEnabled(String formatId, int trigger, int mediaTimeMs) {
Log.d(TAG, "videoFormat [" + getSessionTimeString() + ", " + formatId + ", "
public void onVideoFormatEnabled(Format format, int trigger, int mediaTimeMs) {
Log.d(TAG, "videoFormat [" + getSessionTimeString() + ", " + format.id + ", "
+ Integer.toString(trigger) + "]");
}

@Override
public void onAudioFormatEnabled(String formatId, int trigger, int mediaTimeMs) {
Log.d(TAG, "audioFormat [" + getSessionTimeString() + ", " + formatId + ", "
public void onAudioFormatEnabled(Format format, int trigger, int mediaTimeMs) {
Log.d(TAG, "audioFormat [" + getSessionTimeString() + ", " + format.id + ", "
+ Integer.toString(trigger) + "]");
}

// DemoPlayer.InternalErrorListener

@Override
public void onUpstreamError(int sourceId, IOException e) {
printInternalError("upstreamError", e);
}

@Override
public void onConsumptionError(int sourceId, IOException e) {
printInternalError("consumptionError", e);
public void onLoadError(int sourceId, IOException e) {
printInternalError("loadError", e);
}

@Override
Expand Down Expand Up @@ -163,6 +160,12 @@ public void onCryptoError(CryptoException e) {
printInternalError("cryptoError", e);
}

@Override
public void onDecoderInitialized(String decoderName, long elapsedRealtimeMs,
long initializationDurationMs) {
Log.d(TAG, "decoderInitialized [" + getSessionTimeString() + "]");
}

private void printInternalError(String type, Exception e) {
Log.e(TAG, "internalError [" + getSessionTimeString() + ", " + type + "]", e);
}
Expand Down
Loading

0 comments on commit 924ead4

Please sign in to comment.