-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a0df523
commit 884d9c4
Showing
51 changed files
with
4,062 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
apply plugin: 'com.android.library' | ||
|
||
android { | ||
// http://tools.android.com/tech-docs/new-build-system/tips | ||
//noinspection GroovyAssignabilityCheck | ||
compileSdkVersion rootProject.ext.compileSdkVersion | ||
//noinspection GroovyAssignabilityCheck | ||
buildToolsVersion rootProject.ext.buildToolsVersion | ||
|
||
defaultConfig { | ||
minSdkVersion 9 | ||
targetSdkVersion rootProject.ext.targetSdkVersion | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
buildToolsVersion '25.0.0' | ||
} | ||
|
||
dependencies { | ||
compile fileTree(dir: 'libs', include: ['*.jar']) | ||
} | ||
|
||
ext { | ||
optionalPlugins = ['tools/gradle-mvn-push.gradle', 'tools/gradle-bintray-upload.gradle']; | ||
} | ||
|
||
ext.optionalPlugins.each{ value -> | ||
def plugin_file = new File(rootProject.projectDir, value); | ||
if (plugin_file.exists()) { | ||
apply from: plugin_file | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
POM_NAME=ijkplayer-java | ||
POM_ARTIFACT_ID=ijkplayer-java | ||
POM_PACKAGING=aar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Add project specific ProGuard rules here. | ||
# By default, the flags in this file are appended to flags specified | ||
# in /opt/android/ADK/tools/proguard/proguard-android.txt | ||
# You can edit the include path and order by changing the proguardFiles | ||
# directive in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# Add any project specific keep options here: | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} |
13 changes: 13 additions & 0 deletions
13
...ries/ijkplayer-java/src/androidTest/java/tv/danmaku/ijk/media/player/ApplicationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package tv.danmaku.ijk.media.player; | ||
|
||
import android.app.Application; | ||
import android.test.ApplicationTestCase; | ||
|
||
/** | ||
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> | ||
*/ | ||
public class ApplicationTest extends ApplicationTestCase<Application> { | ||
public ApplicationTest() { | ||
super(Application.class); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="java"/> | ||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/> | ||
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/> | ||
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="src" path="gen"/> | ||
<classpathentry kind="output" path="bin/classes"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>ijkplayer-java</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>com.android.ide.eclipse.adt.ApkBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>com.android.ide.eclipse.adt.AndroidNature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
4 changes: 4 additions & 0 deletions
4
app/libraries/ijkplayer-java/src/main/.settings/org.eclipse.jdt.core.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 | ||
org.eclipse.jdt.core.compiler.compliance=1.6 | ||
org.eclipse.jdt.core.compiler.source=1.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="tv.danmaku.ijk.media.player" > | ||
|
||
<uses-sdk | ||
android:minSdkVersion="9" /> | ||
|
||
</manifest> |
109 changes: 109 additions & 0 deletions
109
...braries/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/AbstractMediaPlayer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
/* | ||
* Copyright (C) 2013-2014 Zhang Rui <[email protected]> | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package tv.danmaku.ijk.media.player; | ||
|
||
import tv.danmaku.ijk.media.player.misc.IMediaDataSource; | ||
|
||
@SuppressWarnings("WeakerAccess") | ||
public abstract class AbstractMediaPlayer implements IMediaPlayer { | ||
private OnPreparedListener mOnPreparedListener; | ||
private OnCompletionListener mOnCompletionListener; | ||
private OnBufferingUpdateListener mOnBufferingUpdateListener; | ||
private OnSeekCompleteListener mOnSeekCompleteListener; | ||
private OnVideoSizeChangedListener mOnVideoSizeChangedListener; | ||
private OnErrorListener mOnErrorListener; | ||
private OnInfoListener mOnInfoListener; | ||
|
||
public final void setOnPreparedListener(OnPreparedListener listener) { | ||
mOnPreparedListener = listener; | ||
} | ||
|
||
public final void setOnCompletionListener(OnCompletionListener listener) { | ||
mOnCompletionListener = listener; | ||
} | ||
|
||
public final void setOnBufferingUpdateListener( | ||
OnBufferingUpdateListener listener) { | ||
mOnBufferingUpdateListener = listener; | ||
} | ||
|
||
public final void setOnSeekCompleteListener(OnSeekCompleteListener listener) { | ||
mOnSeekCompleteListener = listener; | ||
} | ||
|
||
public final void setOnVideoSizeChangedListener( | ||
OnVideoSizeChangedListener listener) { | ||
mOnVideoSizeChangedListener = listener; | ||
} | ||
|
||
public final void setOnErrorListener(OnErrorListener listener) { | ||
mOnErrorListener = listener; | ||
} | ||
|
||
public final void setOnInfoListener(OnInfoListener listener) { | ||
mOnInfoListener = listener; | ||
} | ||
|
||
public void resetListeners() { | ||
mOnPreparedListener = null; | ||
mOnBufferingUpdateListener = null; | ||
mOnCompletionListener = null; | ||
mOnSeekCompleteListener = null; | ||
mOnVideoSizeChangedListener = null; | ||
mOnErrorListener = null; | ||
mOnInfoListener = null; | ||
} | ||
|
||
protected final void notifyOnPrepared() { | ||
if (mOnPreparedListener != null) | ||
mOnPreparedListener.onPrepared(this); | ||
} | ||
|
||
protected final void notifyOnCompletion() { | ||
if (mOnCompletionListener != null) | ||
mOnCompletionListener.onCompletion(this); | ||
} | ||
|
||
protected final void notifyOnBufferingUpdate(int percent) { | ||
if (mOnBufferingUpdateListener != null) | ||
mOnBufferingUpdateListener.onBufferingUpdate(this, percent); | ||
} | ||
|
||
protected final void notifyOnSeekComplete() { | ||
if (mOnSeekCompleteListener != null) | ||
mOnSeekCompleteListener.onSeekComplete(this); | ||
} | ||
|
||
protected final void notifyOnVideoSizeChanged(int width, int height, | ||
int sarNum, int sarDen) { | ||
if (mOnVideoSizeChangedListener != null) | ||
mOnVideoSizeChangedListener.onVideoSizeChanged(this, width, height, | ||
sarNum, sarDen); | ||
} | ||
|
||
protected final boolean notifyOnError(int what, int extra) { | ||
return mOnErrorListener != null && mOnErrorListener.onError(this, what, extra); | ||
} | ||
|
||
protected final boolean notifyOnInfo(int what, int extra) { | ||
return mOnInfoListener != null && mOnInfoListener.onInfo(this, what, extra); | ||
} | ||
|
||
public void setDataSource(IMediaDataSource mediaDataSource) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
} |
Oops, something went wrong.