├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── drawable │ │ │ │ └── scan.png │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── drawable-hdpi │ │ │ │ └── ic_capture.png │ │ │ ├── drawable-mdpi │ │ │ │ └── ic_capture.png │ │ │ ├── drawable-xhdpi │ │ │ │ └── ic_capture.png │ │ │ ├── drawable-xxhdpi │ │ │ │ └── ic_capture.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 │ │ │ ├── values │ │ │ │ ├── colors.xml │ │ │ │ ├── styles.xml │ │ │ │ └── strings.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── layout │ │ │ │ ├── activity_capture.xml │ │ │ │ ├── fragment_socket_server.xml │ │ │ │ ├── activity_rtsplayer.xml │ │ │ │ ├── activity_screen_record_by_codec.xml │ │ │ │ ├── activity_camera_record.xml │ │ │ │ ├── activity_socket.xml │ │ │ │ ├── activity_record.xml │ │ │ │ ├── activity_scanqr.xml │ │ │ │ ├── dlg_scan_result.xml │ │ │ │ ├── fragment_socket_client.xml │ │ │ │ └── activity_main.xml │ │ │ ├── values-zh-rCN │ │ │ │ └── strings.xml │ │ │ └── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── softard │ │ │ │ └── wow │ │ │ │ └── screencapture │ │ │ │ ├── Utils │ │ │ │ ├── SocketUtils.java │ │ │ │ ├── ScreenUtils.java │ │ │ │ └── ImageUtils.java │ │ │ │ ├── CodecTools │ │ │ │ ├── Encoder.java │ │ │ │ ├── AudioEncoder.java │ │ │ │ ├── VideoEncoder.java │ │ │ │ ├── AudioEncodeConfig.java │ │ │ │ └── VideoEncodeConfig.java │ │ │ │ ├── MainApplication.java │ │ │ │ ├── View │ │ │ │ ├── RTSPlayerActivity.java │ │ │ │ └── SocketActivity.java │ │ │ │ ├── QRCode │ │ │ │ ├── Utils.java │ │ │ │ └── ResultDialog.java │ │ │ │ └── BaseActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── softard │ │ │ └── wow │ │ │ └── screencapture │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── softard │ │ └── wow │ │ └── screencapture │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── zxing ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ └── values │ │ │ │ └── strings.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── google │ │ │ └── zxing │ │ │ ├── ResultPointCallback.java │ │ │ ├── common │ │ │ ├── reedsolomon │ │ │ │ ├── ReedSolomonException.java │ │ │ │ └── ReedSolomonEncoder.java │ │ │ ├── DetectorResult.java │ │ │ ├── detector │ │ │ │ └── MathUtils.java │ │ │ └── BitSource.java │ │ │ ├── qrcode │ │ │ ├── encoder │ │ │ │ ├── BlockPair.java │ │ │ │ ├── ByteMatrix.java │ │ │ │ └── QRCode.java │ │ │ ├── detector │ │ │ │ ├── FinderPatternInfo.java │ │ │ │ ├── AlignmentPattern.java │ │ │ │ └── FinderPattern.java │ │ │ └── decoder │ │ │ │ ├── ErrorCorrectionLevel.java │ │ │ │ ├── QRCodeDecoderMetaData.java │ │ │ │ └── Mode.java │ │ │ ├── WriterException.java │ │ │ ├── oned │ │ │ ├── UPCEANWriter.java │ │ │ ├── rss │ │ │ │ ├── Pair.java │ │ │ │ ├── expanded │ │ │ │ │ ├── decoders │ │ │ │ │ │ ├── DecodedObject.java │ │ │ │ │ │ ├── AI013103decoder.java │ │ │ │ │ │ ├── DecodedChar.java │ │ │ │ │ │ ├── AI01320xDecoder.java │ │ │ │ │ │ ├── BlockParsedResult.java │ │ │ │ │ │ ├── AnyAIDecoder.java │ │ │ │ │ │ ├── AI013x0xDecoder.java │ │ │ │ │ │ ├── AI01weightDecoder.java │ │ │ │ │ │ ├── DecodedInformation.java │ │ │ │ │ │ ├── CurrentParsingState.java │ │ │ │ │ │ ├── AI01AndOtherAIs.java │ │ │ │ │ │ ├── DecodedNumeric.java │ │ │ │ │ │ ├── AI01392xDecoder.java │ │ │ │ │ │ ├── AI01decoder.java │ │ │ │ │ │ ├── AI01393xDecoder.java │ │ │ │ │ │ ├── AI013x0x1xDecoder.java │ │ │ │ │ │ └── AbstractExpandedDecoder.java │ │ │ │ │ ├── ExpandedRow.java │ │ │ │ │ ├── BitArrayBuilder.java │ │ │ │ │ └── ExpandedPair.java │ │ │ │ ├── DataCharacter.java │ │ │ │ └── FinderPattern.java │ │ │ ├── UPCEANExtensionSupport.java │ │ │ ├── UPCAWriter.java │ │ │ ├── EAN8Reader.java │ │ │ ├── ITFWriter.java │ │ │ ├── UPCAReader.java │ │ │ ├── Code39Writer.java │ │ │ ├── EAN8Writer.java │ │ │ └── UPCEWriter.java │ │ │ ├── NotFoundException.java │ │ │ ├── multi │ │ │ ├── MultipleBarcodeReader.java │ │ │ └── qrcode │ │ │ │ └── detector │ │ │ │ └── MultiDetector.java │ │ │ ├── ChecksumException.java │ │ │ ├── FormatException.java │ │ │ ├── ReaderException.java │ │ │ ├── Dimension.java │ │ │ ├── BarcodeFormat.java │ │ │ ├── Writer.java │ │ │ ├── InvertedLuminanceSource.java │ │ │ ├── Reader.java │ │ │ ├── ResultMetadataType.java │ │ │ └── Binarizer.java │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── google │ │ │ └── zxing │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── google │ │ └── zxing │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── README.md ├── .idea ├── caches │ ├── gradle_models.ser │ └── build_file_checksums.ser ├── encodings.xml ├── vcs.xml ├── modules.xml ├── runConfigurations.xml └── misc.xml ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradle.properties ├── .gitignore ├── LICENSE └── gradlew.bat /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /zxing/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':zxing' 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ScreenCapture 2 | Android capture screen to image or record screen to video. 3 | -------------------------------------------------------------------------------- /zxing/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | zxing 3 | 4 | -------------------------------------------------------------------------------- /.idea/caches/gradle_models.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wossoneri/ScreenCapture/HEAD/.idea/caches/gradle_models.ser -------------------------------------------------------------------------------- /app/src/main/res/drawable/scan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wossoneri/ScreenCapture/HEAD/app/src/main/res/drawable/scan.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wossoneri/ScreenCapture/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wossoneri/ScreenCapture/HEAD/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wossoneri/ScreenCapture/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wossoneri/ScreenCapture/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_capture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wossoneri/ScreenCapture/HEAD/app/src/main/res/drawable-hdpi/ic_capture.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_capture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wossoneri/ScreenCapture/HEAD/app/src/main/res/drawable-mdpi/ic_capture.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_capture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wossoneri/ScreenCapture/HEAD/app/src/main/res/drawable-xhdpi/ic_capture.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_capture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wossoneri/ScreenCapture/HEAD/app/src/main/res/drawable-xxhdpi/ic_capture.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wossoneri/ScreenCapture/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wossoneri/ScreenCapture/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wossoneri/ScreenCapture/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wossoneri/ScreenCapture/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/wossoneri/ScreenCapture/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/wossoneri/ScreenCapture/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wossoneri/ScreenCapture/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wossoneri/ScreenCapture/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #525c5e 6 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon May 20 12:57:41 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-5.1.1-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/java/com/softard/wow/screencapture/Utils/SocketUtils.java: -------------------------------------------------------------------------------- 1 | package com.softard.wow.screencapture.Utils; 2 | 3 | /** 4 | * Created by wOw on 2019-05-21. 5 | * Email: wossoneri@163.com 6 | * Copyright (c) 2019 Softard. All rights reserved. 7 | */ 8 | public class SocketUtils { 9 | public final static int PORT = 4321; 10 | } 11 | -------------------------------------------------------------------------------- /zxing/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/java/com/softard/wow/screencapture/CodecTools/Encoder.java: -------------------------------------------------------------------------------- 1 | 2 | package com.softard.wow.screencapture.CodecTools; 3 | 4 | import java.io.IOException; 5 | 6 | interface Encoder { 7 | void prepare() throws IOException; 8 | 9 | void stop(); 10 | 11 | void release(); 12 | 13 | void setCallback(Callback callback); 14 | 15 | interface Callback { 16 | void onError(Encoder encoder, Exception exception); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/softard/wow/screencapture/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.softard.wow.screencapture; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | 6 | /** 7 | * Created by wow on 5/8/18. 8 | */ 9 | 10 | public class MainApplication extends Application { 11 | public static Context sAppContext; 12 | 13 | @Override 14 | public void onCreate() { 15 | super.onCreate(); 16 | sAppContext = this; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /zxing/src/test/java/com/google/zxing/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.google.zxing; 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_capture.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/test/java/com/softard/wow/screencapture/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.softard.wow.screencapture; 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 | } -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/java/com/softard/wow/screencapture/CodecTools/AudioEncoder.java: -------------------------------------------------------------------------------- 1 | package com.softard.wow.screencapture.CodecTools; 2 | 3 | import android.media.MediaFormat; 4 | 5 | /** 6 | * Created by wOw on 2019-08-19. 7 | * Email: wossoneri@163.com 8 | * Copyright (c) 2019 Softard. All rights reserved. 9 | */ 10 | public class AudioEncoder extends BaseEncoder { 11 | private final AudioEncodeConfig mConfig; 12 | 13 | AudioEncoder(AudioEncodeConfig config) { 14 | super(config.codecName); 15 | this.mConfig = config; 16 | } 17 | 18 | @Override 19 | protected MediaFormat createMediaFormat() { 20 | return mConfig.toFormat(); 21 | } 22 | 23 | } 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/values-zh-rCN/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 截屏 4 | 扫一扫 5 | Socket 服务器 6 | Socket 客户端 7 | 需要录音权限和存储权限进行录制 8 | 没有权限! 9 | 创建ScreenRecorder失败 10 | 停止录制 11 | 重新录制 12 | 没有SD权限保存文件 13 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ScreenCapture 3 | Scan 4 | 5 | Socket Server 6 | Socket Client 7 | 8 | Using your mic to record audio and your sd card to save video file 9 | No Permission! 10 | Create Screen Recorder failed 11 | Stop Recorder 12 | Restart recorder 13 | No permission to write sd card 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/java/com/softard/wow/screencapture/Utils/ScreenUtils.java: -------------------------------------------------------------------------------- 1 | package com.softard.wow.screencapture.Utils; 2 | 3 | import android.content.Context; 4 | import android.os.Environment; 5 | import android.util.DisplayMetrics; 6 | 7 | import com.softard.wow.screencapture.MainApplication; 8 | 9 | /** 10 | * Created by wow on 5/8/18. 11 | */ 12 | 13 | public class ScreenUtils { 14 | 15 | public static final String VIDEO_PATH = Environment.getExternalStoragePublicDirectory( 16 | android.os.Environment.DIRECTORY_DOWNLOADS) + "/video.mp4"; 17 | 18 | public static float getScreenDensity() { 19 | Context context = MainApplication.sAppContext; 20 | DisplayMetrics dm = context.getResources().getDisplayMetrics(); 21 | return dm.density; 22 | } 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /app/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 | -------------------------------------------------------------------------------- /zxing/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 | android.enableJetifier=true 13 | android.useAndroidX=true 14 | org.gradle.jvmargs=-Xmx1536m 15 | 16 | # When configured, Gradle will run in incubating parallel mode. 17 | # This option should only be used with decoupled projects. More details, visit 18 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 19 | # org.gradle.parallel=true 20 | -------------------------------------------------------------------------------- /zxing/src/androidTest/java/com/google/zxing/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.google.zxing; 2 | 3 | import android.content.Context; 4 | import androidx.test.InstrumentationRegistry; 5 | import androidx.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.google.zxing.test", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/softard/wow/screencapture/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.softard.wow.screencapture; 2 | 3 | import android.content.Context; 4 | import androidx.test.InstrumentationRegistry; 5 | import androidx.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.softard.wow.screencapture", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /zxing/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 25 5 | 6 | 7 | 8 | defaultConfig { 9 | minSdkVersion 21 10 | targetSdkVersion 25 11 | versionCode 1 12 | versionName "1.0" 13 | 14 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 15 | 16 | } 17 | 18 | buildTypes { 19 | release { 20 | minifyEnabled false 21 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 22 | } 23 | } 24 | 25 | } 26 | 27 | dependencies { 28 | implementation fileTree(dir: 'libs', include: ['*.jar']) 29 | 30 | implementation 'androidx.appcompat:appcompat:1.0.0' 31 | testImplementation 'junit:junit:4.12' 32 | androidTestImplementation 'androidx.test:runner:1.1.0' 33 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0' 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/softard/wow/screencapture/View/RTSPlayerActivity.java: -------------------------------------------------------------------------------- 1 | package com.softard.wow.screencapture.View; 2 | 3 | import android.os.Bundle; 4 | import androidx.appcompat.app.AppCompatActivity; 5 | import android.widget.VideoView; 6 | 7 | import com.softard.wow.screencapture.R; 8 | 9 | import butterknife.BindView; 10 | import butterknife.ButterKnife; 11 | 12 | public class RTSPlayerActivity extends AppCompatActivity { 13 | 14 | @BindView(R.id.videoView) VideoView mVideoView; 15 | 16 | private String mURL = "rtsp://118.25.39.144/sample_h264_1mbit.mp4"; 17 | 18 | @Override 19 | protected void onCreate(Bundle savedInstanceState) { 20 | super.onCreate(savedInstanceState); 21 | setContentView(R.layout.activity_rtsplayer); 22 | ButterKnife.bind(this); 23 | 24 | mVideoView.setVideoPath(mURL); 25 | mVideoView.requestFocus(); 26 | mVideoView.start(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_socket_server.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the ART/Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | out/ 15 | 16 | # Gradle files 17 | .gradle/ 18 | build/ 19 | 20 | # Local configuration file (sdk path, etc) 21 | local.properties 22 | 23 | # Proguard folder generated by Eclipse 24 | proguard/ 25 | 26 | # Log Files 27 | *.log 28 | 29 | # Android Studio Navigation editor temp files 30 | .navigation/ 31 | 32 | # Android Studio captures folder 33 | captures/ 34 | 35 | # Intellij 36 | *.iml 37 | .idea/workspace.xml 38 | .idea/tasks.xml 39 | .idea/gradle.xml 40 | .idea/dictionaries 41 | .idea/libraries 42 | 43 | # Keystore files 44 | *.jks 45 | 46 | # External native build folder generated in Android Studio 2.2 and later 47 | .externalNativeBuild 48 | 49 | # Google Services (e.g. APIs or Firebase) 50 | google-services.json 51 | 52 | # Freeline 53 | freeline.py 54 | freeline/ 55 | freeline_project_description.json 56 | -------------------------------------------------------------------------------- /zxing/src/main/java/com/google/zxing/ResultPointCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.zxing; 18 | 19 | /** 20 | * Callback which is invoked when a possible result point (significant 21 | * point in the barcode image such as a corner) is found. 22 | * 23 | * @see DecodeHintType#NEED_RESULT_POINT_CALLBACK 24 | */ 25 | public interface ResultPointCallback { 26 | 27 | void foundPossibleResultPoint(ResultPoint point); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_rtsplayer.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_screen_record_by_codec.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 |