├── library ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ └── values │ │ │ │ └── strings.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── lmy │ │ │ └── lymedia │ │ │ ├── media │ │ │ ├── render │ │ │ │ ├── Filter.java │ │ │ │ ├── BaseFilter.java │ │ │ │ ├── FFmpegFilter.java │ │ │ │ └── AcvFilter.java │ │ │ ├── Player.java │ │ │ ├── AudioDevice.java │ │ │ ├── VideoRender.java │ │ │ ├── VideoPlayer.java │ │ │ └── FFmpegPlayer.java │ │ │ ├── utils │ │ │ ├── Util.java │ │ │ └── FrameUtil.java │ │ │ └── widget │ │ │ ├── VideoSurfaceView.java │ │ │ └── VideoPlayerGLSurfaceView.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── lmy │ │ └── lymedia │ │ └── ApplicationTest.java ├── proguard-rules.pro └── build.gradle ├── samples ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ └── styles.xml │ │ │ ├── values-v21 │ │ │ │ └── styles.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── layout │ │ │ │ ├── activity_render2.xml │ │ │ │ ├── activity_video_record.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── activity_video_play.xml │ │ │ │ └── activity_render.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── lmy │ │ │ │ └── samples │ │ │ │ ├── camera │ │ │ │ ├── recorder │ │ │ │ │ ├── CONSTANTS.java │ │ │ │ │ ├── Frame.java │ │ │ │ │ ├── Util.java │ │ │ │ │ ├── AudioRecorder.java │ │ │ │ │ ├── VideoRecorderWrapper.java │ │ │ │ │ └── VideoRecordManager.java │ │ │ │ ├── ImageUtil.java │ │ │ │ ├── ShotGLSurfaceView.java │ │ │ │ ├── MyCameraGLSurfaceView.java │ │ │ │ └── CameraInstance.java │ │ │ │ └── ui │ │ │ │ ├── MainActivity.java │ │ │ │ ├── VideoPlayActivity.java │ │ │ │ ├── RenderActivity2.java │ │ │ │ ├── VideoRecordActivity.java │ │ │ │ └── RenderActivity.java │ │ └── AndroidManifest.xml │ └── androidTest │ │ └── java │ │ └── com │ │ └── lmy │ │ └── samples │ │ └── ApplicationTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── README.md ├── .gitignore ├── gradle.properties ├── gradlew.bat ├── gradlew └── LICENSE /library/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /samples/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':library', ':samples' 2 | -------------------------------------------------------------------------------- /library/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Library 3 | 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LyMedia 2 | This a library about play video,play audio,render video frame.It depend org.bytedeco:javacpp and org.bytedeco:javacv. 3 | -------------------------------------------------------------------------------- /samples/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imalimin/LyMedia/HEAD/samples/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /samples/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imalimin/LyMedia/HEAD/samples/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /samples/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imalimin/LyMedia/HEAD/samples/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /samples/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imalimin/LyMedia/HEAD/samples/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /samples/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imalimin/LyMedia/HEAD/samples/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /samples/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Samples 3 | VideoRecordActivity 4 | 5 | -------------------------------------------------------------------------------- /samples/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /library/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 16dp 6 | 7 | -------------------------------------------------------------------------------- /samples/src/main/java/com/lmy/samples/camera/recorder/CONSTANTS.java: -------------------------------------------------------------------------------- 1 | package com.lmy.samples.camera.recorder; 2 | 3 | public class CONSTANTS { 4 | public final static int RESOLUTION_HIGH_VALUE = 2; 5 | public final static int RESOLUTION_MEDIUM_VALUE = 1; 6 | public final static int RESOLUTION_LOW_VALUE = 0; 7 | } 8 | -------------------------------------------------------------------------------- /samples/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | -------------------------------------------------------------------------------- /samples/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /library/src/main/java/com/lmy/lymedia/media/render/Filter.java: -------------------------------------------------------------------------------- 1 | package com.lmy.lymedia.media.render; 2 | 3 | import org.bytedeco.javacv.Frame; 4 | 5 | /** 6 | * Created by lmy on 2016/4/8. 7 | */ 8 | public interface Filter { 9 | Frame filter(Frame frame); 10 | 11 | void onStart(); 12 | 13 | void onStop(); 14 | 15 | boolean isStarting(); 16 | 17 | void onCreate(int width, int height); 18 | } 19 | -------------------------------------------------------------------------------- /library/src/androidTest/java/com/lmy/lymedia/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.lmy.lymedia; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /samples/src/androidTest/java/com/lmy/samples/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.lmy.samples; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /library/src/main/java/com/lmy/lymedia/utils/Util.java: -------------------------------------------------------------------------------- 1 | package com.lmy.lymedia.utils; 2 | 3 | /** 4 | * Created by 李明艺 on 2016/3/21. 5 | * 6 | * @author lrlmy@foxmail.com 7 | */ 8 | public class Util { 9 | 10 | public static String getSdcardPath() { 11 | if (android.os.Environment.getExternalStorageState().equals( 12 | android.os.Environment.MEDIA_MOUNTED)) { 13 | return android.os.Environment.getExternalStorageDirectory().getAbsolutePath(); 14 | } else { 15 | return "/storage/sdcard0"; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /library/src/main/java/com/lmy/lymedia/media/render/BaseFilter.java: -------------------------------------------------------------------------------- 1 | package com.lmy.lymedia.media.render; 2 | 3 | /** 4 | * Created by lmy on 2016/4/8. 5 | */ 6 | public abstract class BaseFilter implements Filter { 7 | protected boolean starting = false; 8 | protected int width, height; 9 | 10 | @Override 11 | public void onCreate(int width, int height) { 12 | this.width = width; 13 | this.height = height; 14 | onStart(); 15 | this.starting = true; 16 | } 17 | 18 | @Override 19 | public boolean isStarting() { 20 | return starting; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /local.properties 2 | /.idea 3 | .DS_Store 4 | *.iml 5 | 6 | # Built application files 7 | *.apk 8 | *.ap_ 9 | 10 | # Files for the Dalvik VM 11 | *.dex 12 | 13 | # Java class files 14 | *.class 15 | 16 | # Generated files 17 | bin/ 18 | gen/ 19 | 20 | # Gradle files 21 | .gradle/ 22 | gradle/ 23 | build/ 24 | 25 | # Local configuration file (sdk path, etc) 26 | local.properties 27 | 28 | # Proguard folder generated by Eclipse 29 | proguard/ 30 | 31 | # Log Files 32 | *.log 33 | 34 | # Android Studio Navigation editor temp files 35 | .navigation/ 36 | 37 | # Android Studio captures folder 38 | captures/ 39 | 40 | # jniLibs 41 | jniLibs/ -------------------------------------------------------------------------------- /library/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 D:\Android\sdk/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 | -------------------------------------------------------------------------------- /samples/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 D:\Android\sdk/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 | -------------------------------------------------------------------------------- /samples/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 15 | 16 |