diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d1a19aad..f7f27098 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,15 +11,17 @@ jobs: name: Base Checks runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - uses: actions/setup-java@v1 + - uses: actions/checkout@v2 + - uses: actions/setup-java@v2 with: - java-version: 1.8 + java-version: 11 + distribution: temurin + cache: gradle - name: Perform base checks run: ./gradlew demo:assembleDebug lib:publishToDirectory ANDROID_EMULATOR_TESTS: name: Emulator Tests - runs-on: macOS-latest + runs-on: macos-latest strategy: fail-fast: false matrix: @@ -32,20 +34,21 @@ jobs: - EMULATOR_API: 22 EMULATOR_ARCH: x86 steps: - - uses: actions/checkout@v1 - - uses: actions/setup-java@v1 + - uses: actions/checkout@v2 + - uses: actions/setup-java@v2 with: - java-version: 1.8 + java-version: 11 + distribution: temurin + cache: gradle - name: Execute emulator tests timeout-minutes: 30 - uses: reactivecircus/android-emulator-runner@v2.2.0 + uses: reactivecircus/android-emulator-runner@v2 with: api-level: ${{ matrix.EMULATOR_API }} arch: ${{ matrix.EMULATOR_ARCH }} disable-animations: true profile: Nexus 5X emulator-options: -no-snapshot -no-window -no-boot-anim -camera-back none -camera-front none -gpu swiftshader_indirect - emulator-build: 6031357 script: ./.github/workflows/emulator_script.sh - name: Upload emulator tests artifact uses: actions/upload-artifact@v1 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 30443aae..523e092f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,9 +13,11 @@ jobs: SONATYPE_USER: ${{ secrets.SONATYPE_USER }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} steps: - - uses: actions/checkout@v1 - - uses: actions/setup-java@v1 + - uses: actions/checkout@v2 + - uses: actions/setup-java@v2 with: - java-version: 1.8 + java-version: 11 + distribution: temurin + cache: gradle - name: Perform maven upload run: ./gradlew publishToSonatype diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index dae1ea77..db169d11 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -16,8 +16,10 @@ jobs: SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} steps: - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: - java-version: 1.8 + java-version: 11 + distribution: temurin + cache: gradle - name: Publish sonatype snapshot run: ./gradlew publishToSonatypeSnapshot \ No newline at end of file diff --git a/README.md b/README.md index 8aa42823..b82ea38e 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Transcodes and compresses video files into the MP4 format, with audio support, u Android codecs available on the device. Works on API 18+. ```groovy -implementation 'com.otaliastudios:transcoder:0.10.3' +implementation 'com.otaliastudios:transcoder:0.10.4' ``` - Fast transcoding to AAC/AVC diff --git a/build.gradle.kts b/build.gradle.kts index a4bb9799..a697c900 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,8 +1,8 @@ buildscript { extra["minSdkVersion"] = 18 - extra["compileSdkVersion"] = 30 - extra["targetSdkVersion"] = 30 + extra["compileSdkVersion"] = 31 + extra["targetSdkVersion"] = 31 repositories { google() @@ -11,10 +11,9 @@ buildscript { } dependencies { - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.31") - classpath("com.android.tools.build:gradle:4.1.2") - classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.4.30") // publisher uses 1.4.20 which goes OOM - classpath("io.deepmedia.tools:publisher:0.5.0") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.30") + classpath("com.android.tools.build:gradle:7.0.2") + classpath("io.deepmedia.tools:publisher:0.6.0") } } diff --git a/demo/build.gradle.kts b/demo/build.gradle.kts index e493dd7c..be206540 100644 --- a/demo/build.gradle.kts +++ b/demo/build.gradle.kts @@ -8,20 +8,20 @@ android { defaultConfig { applicationId = "com.otaliastudios.transcoder.demo" - setMinSdkVersion(property("minSdkVersion") as Int) - setTargetSdkVersion(property("targetSdkVersion") as Int) + minSdk = property("minSdkVersion") as Int + targetSdk = property("targetSdkVersion") as Int versionCode = 1 versionName = "1.0" } compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 } } dependencies { implementation(project(":lib")) - implementation("com.google.android.material:material:1.3.0") - implementation("androidx.appcompat:appcompat:1.2.0") + implementation("com.google.android.material:material:1.4.0") + implementation("androidx.appcompat:appcompat:1.3.1") } diff --git a/demo/src/main/AndroidManifest.xml b/demo/src/main/AndroidManifest.xml index 3b363c11..7390e0d5 100644 --- a/demo/src/main/AndroidManifest.xml +++ b/demo/src/main/AndroidManifest.xml @@ -16,7 +16,8 @@ + android:label="Transcoder" + android:exported="true"> @@ -25,7 +26,8 @@ + android:label="Thumbnailer" + android:exported="true"> diff --git a/docs/_about/changelog.md b/docs/_about/changelog.md index 5a77607d..b45c371f 100644 --- a/docs/_about/changelog.md +++ b/docs/_about/changelog.md @@ -9,6 +9,13 @@ New versions are released through GitHub, so the reference page is the [GitHub R > Starting from 0.7.0, you can now [support development](https://github.com/sponsors/natario1) through the GitHub Sponsors program. Companies can share a tiny part of their revenue and get private support hours in return. Thanks! +### v0.10.4 + +- Fix: fixed crash in specific conditions ([#140][140]) +- New: AssetFileDescriptorDataSource, can be used to transcode from AssetFileDescriptors ([#140][140]) + + + ### v0.10.3 - Fix: error when merging many files, thanks to [@DamonChen117][DamonChen117] ([#134][134]) @@ -164,4 +171,5 @@ frames, the trim timestamp might be different than what was selected. [128]: https://github.com/natario1/Transcoder/pull/128 [130]: https://github.com/natario1/Transcoder/pull/130 [132]: https://github.com/natario1/Transcoder/pull/132 -[134]: https://github.com/natario1/Transcoder/pull/134 \ No newline at end of file +[134]: https://github.com/natario1/Transcoder/pull/134 +[140]: https://github.com/natario1/Transcoder/pull/140 \ No newline at end of file diff --git a/docs/_config.yml b/docs/_config.yml index cc597db7..9b1cd063 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -12,7 +12,7 @@ google_analytics_id: 'UA-155077779-2' google_site_verification: '4x49i17ABIrSvUl52SeL0-t0341aTnWWaC62-FYCRT4' github: [metadata] # TODO What's this? github_repo: Transcoder -github_version: 0.10.3 +github_version: 0.10.4 github_branch: main baseurl: '/Transcoder' # Keep as an empty string if served up at the root collections: diff --git a/docs/_docs/data-sources.md b/docs/_docs/data-sources.md index 0c31d840..ee45591a 100644 --- a/docs/_docs/data-sources.md +++ b/docs/_docs/data-sources.md @@ -24,13 +24,20 @@ using `addDataSource(context, uri)` in the transcoding builder. ##### FileDescriptorDataSource A data source backed by a file descriptor. Use `new FileDescriptorDataSource(descriptor)` or -simply `addDataSource(descriptor)` in the transcoding builder. +simply `addDataSource(descriptor)` in the transcoding builder. Note that it is the caller +responsibility to close the file descriptor. ##### FilePathDataSource A data source backed by a file absolute path. Use `new FilePathDataSource(path)` or simply `addDataSource(path)` in the transcoding builder. +##### AssetFileDescriptorDataSource + +A data source backed by Android's AssetFileDescriptor. Use `new AssetFileDescriptorDataSource(descriptor)` +or simply `addDataSource(descriptor)` in the transcoding builder. Note that it is the caller +responsibility to close the file descriptor. + ### Track specific sources Although a media source can have both audio and video, you can select a specific track diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e4908f08..26adea71 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip diff --git a/lib/build.gradle.kts b/lib/build.gradle.kts index a670c667..e4fca33c 100644 --- a/lib/build.gradle.kts +++ b/lib/build.gradle.kts @@ -12,10 +12,8 @@ plugins { android { setCompileSdkVersion(property("compileSdkVersion") as Int) defaultConfig { - setMinSdkVersion(property("minSdkVersion") as Int) - setTargetSdkVersion(property("targetSdkVersion") as Int) - versionCode = 1 - versionName = "0.10.3" + minSdk = property("minSdkVersion") as Int + targetSdk = property("targetSdkVersion") as Int testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } buildTypes["release"].isMinifyEnabled = false @@ -23,12 +21,12 @@ android { dependencies { - api("com.otaliastudios.opengl:egloo:0.6.0") - api("androidx.annotation:annotation:1.1.0") + api("com.otaliastudios.opengl:egloo:0.6.1") + api("androidx.annotation:annotation:1.2.0") - androidTestImplementation("androidx.test:runner:1.3.0") - androidTestImplementation("androidx.test:rules:1.3.0") - androidTestImplementation("androidx.test.ext:junit:1.1.2") + androidTestImplementation("androidx.test:runner:1.4.0") + androidTestImplementation("androidx.test:rules:1.4.0") + androidTestImplementation("androidx.test.ext:junit:1.1.3") androidTestImplementation("org.mockito:mockito-android:2.28.2") } @@ -42,6 +40,7 @@ publisher { project.addDeveloper("natario1", "mat.iavarone@gmail.com") release.sources = Release.SOURCES_AUTO release.docs = Release.DOCS_AUTO + release.version = "0.10.4" directory()