mirror of
https://github.com/opencv/opencv.git
synced 2024-12-17 10:58:00 +08:00
500fd453a1
Android sample for VideoWriter #24592 This PR: * adds an Android sample for video recording with MediaNDK and built-in MJPEG. * adds a flag `--no_media_ndk` for `build_sdk.py` script to disable MediaNDK linkage. ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [x] There is a reference to the original bug report and related work - [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [x] The feature is well documented and sample code can be built with the project CMake
37 lines
1.1 KiB
Groovy
37 lines
1.1 KiB
Groovy
apply plugin: 'com.android.application'
|
|
|
|
android {
|
|
namespace 'org.opencv.samples.recorder'
|
|
compileSdkVersion @ANDROID_COMPILE_SDK_VERSION@
|
|
defaultConfig {
|
|
applicationId "org.opencv.samples.recorder"
|
|
minSdkVersion @ANDROID_MIN_SDK_VERSION@
|
|
targetSdkVersion @ANDROID_TARGET_SDK_VERSION@
|
|
versionCode 301
|
|
versionName "3.01"
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
sourceSets {
|
|
main {
|
|
java.srcDirs = @ANDROID_SAMPLE_JAVA_PATH@
|
|
aidl.srcDirs = @ANDROID_SAMPLE_JAVA_PATH@
|
|
res.srcDirs = @ANDROID_SAMPLE_RES_PATH@
|
|
manifest.srcFile '@ANDROID_SAMPLE_MANIFEST_PATH@'
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
//implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
if (gradle.opencv_source == "sdk_path") {
|
|
implementation project(':opencv')
|
|
} else if (gradle.opencv_source == "maven_local" || gradle.opencv_source == "maven_cenral") {
|
|
implementation 'org.opencv:opencv:@OPENCV_VERSION_PLAIN@'
|
|
}
|
|
}
|