├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ └── layout │ │ │ │ ├── activity_player.xml │ │ │ │ └── activity_main.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── wodekouwei │ │ │ └── demo │ │ │ ├── MainActivity.java │ │ │ └── PlayerAty.java │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── wodekouwei │ │ │ └── demo │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── wodekouwei │ │ └── demo │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── oarplayer ├── .gitignore ├── src │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── res │ │ │ └── values │ │ │ │ └── strings.xml │ │ ├── cpp │ │ │ ├── srs_readthread.h │ │ │ ├── oar_player_gl_thread.h │ │ │ ├── util.h │ │ │ ├── oar_player_video_hw_decode_thread.h │ │ │ ├── oar_jni_reflect.h │ │ │ ├── oar_player_audio_hw_decode_thread.h │ │ │ ├── oar_audio_player.h │ │ │ ├── oar_glsl_program.h │ │ │ ├── oar_video_render.h │ │ │ ├── oar_audio_mediacodec_ctx.h │ │ │ ├── oar_frame_queue.h │ │ │ ├── oar_clock.h │ │ │ ├── util.c │ │ │ ├── oar_audio_mediacodec_ctx.c │ │ │ ├── oar_texture.h │ │ │ ├── oar_player.h │ │ │ ├── oar_audio_mediacodec_java.h │ │ │ ├── oar_video_mediacodec_java.h │ │ │ ├── oar_video_mediacodec_ndk.h │ │ │ ├── oar_packet_queue.h │ │ │ ├── oar_audio_mediacodec_ndk.h │ │ │ ├── oar_clock.c │ │ │ ├── _android.h │ │ │ ├── oar_video_mediacodec_ctx.h │ │ │ ├── oar_video_render.c │ │ │ ├── oar_native_mediacodec.h │ │ │ ├── oar_macro.h │ │ │ ├── oar_player_audio_hw_decode_thread.c │ │ │ ├── oar_texture.c │ │ │ ├── oar_frame_queue.c │ │ │ ├── oar_player_video_hw_decode_thread.c │ │ │ ├── oar_audio_mediacodec_ndk.c │ │ │ ├── jni_utils.h │ │ │ ├── oar_jni_reflect.c │ │ │ ├── oar_packet_queue.c │ │ │ ├── oar_video_mediacodec_ndk.c │ │ │ ├── oarplayer_jni.c │ │ │ ├── oar_video_mediacodec_ctx.c │ │ │ ├── oar_audio_mediacodec_java.c │ │ │ └── oar_video_mediacodec_java.c │ │ └── java │ │ │ └── com │ │ │ └── wodekouwei │ │ │ └── srsrtmpplayer │ │ │ ├── proxy │ │ │ ├── SurfaceTextureWrapper.java │ │ │ ├── HwAudioDecodeWrapper.java │ │ │ └── HwVideoDecodeWrapper.java │ │ │ └── OARPlayer.java │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── wodekouwei │ │ │ └── srsrtmpplayer │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── wodekouwei │ │ └── srsrtmpplayer │ │ └── ExampleInstrumentedTest.java ├── jni_lib_src │ ├── libs │ │ ├── x86 │ │ │ └── libmediacodec-lib.so │ │ ├── x86_64 │ │ │ └── libmediacodec-lib.so │ │ ├── arm64-v8a │ │ │ └── libmediacodec-lib.so │ │ └── armeabi-v7a │ │ │ └── libmediacodec-lib.so │ ├── armeabi-v7a │ │ └── libmediacodec-lib.so │ └── include │ │ └── oar_native_mediacodec.h ├── proguard-rules.pro ├── gradle.properties ├── build.gradle ├── CMakeLists.txt └── gradle-mvn-push.gradle ├── nativemediacodec ├── .gitignore ├── src │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── res │ │ │ └── values │ │ │ │ └── strings.xml │ │ └── cpp │ │ │ ├── _android.h │ │ │ ├── oar_native_mediacodec.h │ │ │ └── oar_native_mediacodec.c │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── wodekouwei │ │ │ └── nativemediacodec │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── wodekouwei │ │ └── nativemediacodec │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro ├── build.gradle └── CMakeLists.txt ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── LICENSE ├── README.md ├── gradlew.bat └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /oarplayer/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /.cxx 3 | /.externalNativeBuild 4 | -------------------------------------------------------------------------------- /nativemediacodec/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /.cxx 3 | /.externalNativeBuild -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':oarplayer', ':nativemediacodec' 2 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | oar播放器 3 | 4 | -------------------------------------------------------------------------------- /oarplayer/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingkouwei/oarplayer/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /nativemediacodec/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /oarplayer/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | SrsRtmpPlayer 3 | 4 | -------------------------------------------------------------------------------- /nativemediacodec/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | nativemediacodec 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingkouwei/oarplayer/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingkouwei/oarplayer/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingkouwei/oarplayer/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingkouwei/oarplayer/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingkouwei/oarplayer/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingkouwei/oarplayer/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingkouwei/oarplayer/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingkouwei/oarplayer/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /oarplayer/jni_lib_src/libs/x86/libmediacodec-lib.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingkouwei/oarplayer/HEAD/oarplayer/jni_lib_src/libs/x86/libmediacodec-lib.so -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingkouwei/oarplayer/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingkouwei/oarplayer/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /oarplayer/jni_lib_src/armeabi-v7a/libmediacodec-lib.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingkouwei/oarplayer/HEAD/oarplayer/jni_lib_src/armeabi-v7a/libmediacodec-lib.so -------------------------------------------------------------------------------- /oarplayer/jni_lib_src/libs/x86_64/libmediacodec-lib.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingkouwei/oarplayer/HEAD/oarplayer/jni_lib_src/libs/x86_64/libmediacodec-lib.so -------------------------------------------------------------------------------- /oarplayer/jni_lib_src/libs/arm64-v8a/libmediacodec-lib.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingkouwei/oarplayer/HEAD/oarplayer/jni_lib_src/libs/arm64-v8a/libmediacodec-lib.so -------------------------------------------------------------------------------- /oarplayer/jni_lib_src/libs/armeabi-v7a/libmediacodec-lib.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingkouwei/oarplayer/HEAD/oarplayer/jni_lib_src/libs/armeabi-v7a/libmediacodec-lib.so -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | .idea -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Dec 26 11:42:55 CST 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/test/java/com/wodekouwei/demo/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.wodekouwei.demo; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /oarplayer/src/test/java/com/wodekouwei/srsrtmpplayer/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.wodekouwei.srsrtmpplayer; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /nativemediacodec/src/test/java/com/wodekouwei/nativemediacodec/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.wodekouwei.nativemediacodec; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_player.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 13 | 20 | 21 | -------------------------------------------------------------------------------- /oarplayer/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /nativemediacodec/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | org.gradle.java.home=/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home -------------------------------------------------------------------------------- /app/src/androidTest/java/com/wodekouwei/demo/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.wodekouwei.demo; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.wodekouwei.demo", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /oarplayer/gradle.properties: -------------------------------------------------------------------------------- 1 | PROJ_GROUP=com.github.qingkouwei 2 | PROJ_ARTIFACTID=oarplayer 3 | PROJ_POM_NAME=an android rtmp player without ffmpeg 4 | POM_PACKAGING=aar 5 | # !!!the following can move to ~/.gradle/gradle.properties 6 | # replace with your info 7 | RELEASE_REPOSITORY_URL=https://oss.sonatype.org/service/local/staging/deploy/maven2 8 | SNAPSHOT_REPOSITORY_URL=https://oss.sonatype.org/content/repositories/snapshots 9 | PROJ_VERSION=0.0.1 10 | PROJ_WEBSITEURL=https://github.com/qingkouwei/oarplayer 11 | PROJ_ISSUETRACKERURL=https://github.com/qingkouwei/oarplayer/issues 12 | PROJ_VCSURL=https://github.com/qingkouwei/oarplayer.git 13 | PROJ_DESCRIPTION=an android rtmp player without ffmpeg 14 | PROJ_LICENCE_NAME=The MIT License (MIT) 15 | PROJ_LICENCE_URL=https://www.mit-license.org/ 16 | PROJ_LICENCE_DEST=repo 17 | DEVELOPER_ID=wodekouwei 18 | DEVELOPER_NAME=junweishen 19 | DEVELOPER_EMAIL=282537740@qq.com 20 | -------------------------------------------------------------------------------- /oarplayer/src/androidTest/java/com/wodekouwei/srsrtmpplayer/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.wodekouwei.srsrtmpplayer; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.wodekouwei.srsrtmpplayer.test", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /nativemediacodec/src/androidTest/java/com/wodekouwei/nativemediacodec/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.wodekouwei.nativemediacodec; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.wodekouwei.nativemediacodec.test", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/shenjunwei/program/android-sdk-macosx/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 |