From 1df31fbdfe61f11d410bd3f5c47f04cd3f217e93 Mon Sep 17 00:00:00 2001 From: Mike Solar Date: Sun, 3 Aug 2025 02:06:45 +0800 Subject: [PATCH] fix: fix exceptions when import video --- .github/FUNDING.yml | 12 - .github/ISSUE_TEMPLATE.md | 17 -- .github/workflows/ci.yml | 510 ----------------------------------- .gitignore | 2 + CMakeLists.txt | 4 +- CONTRIBUTING.md | 2 +- README.md | 2 +- app/audio/audioprocessor.cpp | 10 +- app/widget/viewer/viewer.cpp | 3 +- 9 files changed, 14 insertions(+), 548 deletions(-) delete mode 100644 .github/FUNDING.yml delete mode 100644 .github/ISSUE_TEMPLATE.md delete mode 100644 .github/workflows/ci.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 3e9ed6db6..000000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] -patreon: olivevideoeditor -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 199220e1b..000000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Default issue template -labels: 'Triage' ---- - - -**Commit Hash** - - -**Platform** - - -**Summary** - - -**Additional Information / Output** - diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 290934e2c..000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,510 +0,0 @@ -name: CI - -on: - push: - branches: - - master - paths-ignore: - - '.github/ISSUE_TEMPLATE/**' - - '.github/FUNDING.yml' - - 'docker/**' - - 'CONTRIBUTING.md' - - 'README.md' - pull_request: - paths-ignore: - - '.github/ISSUE_TEMPLATE/**' - - '.github/FUNDING.yml' - - 'app/ts/*.ts' - - 'docker/**' - - 'CONTRIBUTING.md' - - 'README.md' - -env: - DOWNLOAD_TOOL: curl -fLOSs --retry 2 --retry-delay 60 - UPLOAD_TOOL: curl -X POST --retry 2 --retry-delay 60 - CMAKE_ARGS: -DUSE_WERROR=ON -DBUILD_TESTS=ON - -jobs: - linux: - strategy: - fail-fast: false - matrix: - include: - # Clang should catch any issues that GCC would also report - #- build-type: RelWithDebInfo - # cc-compiler: gcc - # cxx-compiler: g++ - # compiler-name: GCC 9.3.1 - # cmake-gen: Ninja - # os-name: Linux (CentOS 7) - - build-type: RelWithDebInfo - cc-compiler: clang - cxx-compiler: clang++ - compiler-name: Clang 10.0.0 - cmake-gen: Ninja - os-name: Linux (CentOS 7) - name: | - ${{ matrix.os-name }} - <${{ matrix.compiler-name }}, - ${{ matrix.build-type }}, - ${{ matrix.cmake-gen }}> - runs-on: ubuntu-20.04 - container: - image: olivevideoeditor/ci-olive:2022.3 - - steps: - - name: Install Node.js 16 - run: | - $DOWNLOAD_TOOL https://nodejs.org/dist/v16.20.2/node-v16.20.2-linux-x64.tar.xz - tar -xf node-v16.20.2-linux-x64.tar.xz - mkdir -p ${{ github.workspace }} - cp -a ./node-v16.20.2-linux-x64/bin/node ${{ github.workspace }}/node16 - ${{ github.workspace }}/node16 --version - - - name: Checkout Source Code - env: - INPUT_SUBMODULES: 'true' - INPUT_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - mkdir checkout-v3 - cd checkout-v3 - $DOWNLOAD_TOOL https://raw.githubusercontent.com/actions/checkout/refs/tags/v3/dist/index.js - $DOWNLOAD_TOOL https://raw.githubusercontent.com/actions/checkout/refs/tags/v3/dist/problem-matcher.json - cd .. - ${{ github.workspace }}/node16 ./checkout-v3/index.js - #uses: actions/checkout@v3 - #with: - # submodules: true - - - name: Generate Patreon List - env: - PATREON_KEY: ${{ secrets.PATREON_KEY }} - run: | - pip3 install requests - cd $GITHUB_WORKSPACE/app/dialog/about - python3 patreon.py - if: github.event_name == 'push' - continue-on-error: true - - - name: Configure CMake - run: | - mkdir build - cd build - cmake .. -G "${{ matrix.cmake-gen }}" \ - -DCMAKE_BUILD_TYPE="${{ matrix.build-type }}" \ - -DCMAKE_C_COMPILER="${{ matrix.cc-compiler }}" \ - -DCMAKE_CXX_COMPILER="${{ matrix.cxx-compiler }}" \ - $CMAKE_ARGS - - - name: Build - working-directory: build - run: | - cmake --build . - - - name: Test - working-directory: build - run: | - ctest -C ${{ matrix.build-type }} -V - - - name: Create Package - id: package - working-directory: build - env: - ARCH: x86_64 - run: | - # Create install tree - cmake --install app --prefix appdir/usr - - # Inject custom AppRun (linuxdeployqt won't replace if it already exists) - cp $GITHUB_WORKSPACE/app/packaging/linux/AppRun appdir - - # Process AppDir - /usr/local/linuxdeployqt-x86_64.AppImage \ - appdir/usr/share/applications/org.olivevideoeditor.Olive.desktop \ - -exclude-libs=libQt5Pdf.so,libQt5Qml.so,libQt5QmlModels.so,libQt5Quick.so,libQt5VirtualKeyboard.so \ - -bundle-non-qt-libs \ - -executable=appdir/usr/bin/crashpad_handler \ - -executable=appdir/usr/bin/minidump_stackwalk \ - -executable=appdir/usr/bin/olive-crashhandler \ - --appimage-extract-and-run - - # Dump Crashpad symbols - dump_syms appdir/usr/bin/olive-editor > olive-editor.sym - # HACK: For some reason, minidump_stackwalk reads identifier as all 0s - SYM_DIR=appdir/usr/share/olive-editor/symbols/olive-editor/000000000000000000000000000000000 - mkdir -p "$SYM_DIR" - mv olive-editor.sym "$SYM_DIR" - - # Package AppImage - $DOWNLOAD_TOOL https://github.com/AppImage/AppImageKit/releases/download/12/appimagetool-x86_64.AppImage - chmod +x appimagetool-x86_64.AppImage - VERSION=${GITHUB_SHA::8} ./appimagetool-x86_64.AppImage appdir --appimage-extract-and-run - - # Set env variables - filename=$(echo Olive*.AppImage) - pkgname="${filename/x86_64/Linux-x86_64}" - mv "${filename}" "${pkgname}" - basename="${filename%.*}" - echo "pkgname=${pkgname}" >> $GITHUB_OUTPUT - echo "artifact=${basename/x86_64/Linux-x86_64-${{ matrix.cc-compiler }}}" >> $GITHUB_OUTPUT - - - uses: Simran-B/actions-export-envs@v1.2.0 - id: envs - - - name: Upload Artifact to GitHub - env: - INPUT_NAME: '${{ steps.package.outputs.artifact }}' - INPUT_PATH: 'build/Olive*.AppImage' - INPUT_INCLUDE-HIDDEN-FILES: 'true' - INPUT_IF-NO-FILES-FOUND: error - INPUT_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ACTIONS_RUNTIME_TOKEN: ${{ steps.envs.outputs.ACTIONS_RUNTIME_TOKEN }} - ACTIONS_RUNTIME_URL: ${{ steps.envs.outputs.ACTIONS_RUNTIME_URL }} - run: | - mkdir upload-artifact-v3 - cd upload-artifact-v3 - $DOWNLOAD_TOOL https://raw.githubusercontent.com/actions/upload-artifact/refs/tags/v3/dist/index.js - cd .. - ${{ github.workspace }}/node16 ./upload-artifact-v3/index.js - continue-on-error: true - #uses: actions/upload-artifact@v3 - #with: - # name: ${{ steps.package.outputs.artifact }} - # path: build/Olive*.AppImage - - windows: - strategy: - matrix: - include: - - build-type: RelWithDebInfo - compiler-name: MSVC 16.x - os-name: Windows - os-arch: x86_64 - os: windows-2019 - cmake-gen: Ninja - name: | - ${{ matrix.os-name }} - <${{ matrix.compiler-name }}, - ${{ matrix.build-type }}, - ${{ matrix.cmake-gen }}> - runs-on: ${{ matrix.os }} - - steps: - - name: Checkout Source Code - uses: actions/checkout@v4 - with: - submodules: true - show-progress: false - - # HACK: Override CMake version to avoid an FFmpeg discovery problem - - name: Setup CMake - uses: jwlawson/actions-setup-cmake@v2 - with: - cmake-version: '3.27.x' - - name: CMake version - run: cmake --version - - - name: Automatically Generate Package Name - shell: bash - env: - PLATFORM: ${{ matrix.os-name }} - ARCH: ${{ matrix.os-arch }} - run: | - echo "PKGNAME=$(echo Olive-${GITHUB_SHA::8}-${PLATFORM}-${ARCH})" >> $GITHUB_ENV - - - name: Create Build Folder - run: | - cmake -E make_directory ${{ runner.workspace }}/build - - - name: Enable Developer Command Prompt (Windows) - uses: ilammy/msvc-dev-cmd@v1 - - - name: Acquire Dependencies - shell: bash - working-directory: ${{ runner.workspace }} - run: | - $DOWNLOAD_TOOL https://github.com/olive-editor/dependencies/releases/download/continuous/olive-dep-win32-Release.tar.gz - tar xzf olive-dep-win32-Release.tar.gz - echo "$(pwd -W)/install" >> $GITHUB_PATH - echo "$(pwd -W)/install/bin" >> $GITHUB_PATH - - - name: Acquire Google Crashpad - shell: bash - working-directory: ${{ runner.workspace }} - run: | - $DOWNLOAD_TOOL https://github.com/olive-editor/crashpad/releases/download/continuous/crashpad-win32-RelWithDebInfo.tar.gz - tar xzf crashpad-win32-RelWithDebInfo.tar.gz - echo "$(pwd -W)/install" >> $GITHUB_PATH - echo "$(pwd -W)/install/bin" >> $GITHUB_PATH - echo "$(pwd -W)/install/crashpad" >> $GITHUB_PATH - - - name: Generate Patreon List - shell: bash - env: - PATREON_KEY: ${{ secrets.PATREON_KEY }} - run: | - pip3 install requests - cd $GITHUB_WORKSPACE/app/dialog/about - python3 patreon.py - if: github.event_name == 'push' - continue-on-error: true - - - name: Configure CMake - shell: bash - working-directory: ${{ runner.workspace }}/build - run: | - cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -G "${{ matrix.cmake-gen }}" \ - $CMAKE_ARGS - - - name: Build - working-directory: ${{ runner.workspace }}/build - shell: bash - run: | - cmake --build . - - #- name: Test - # working-directory: ${{ runner.workspace }}/build - # shell: bash - # run: | - # ctest -C ${{ matrix.build-type }} -V - - - name: Create Package - working-directory: ${{ runner.workspace }}/build - shell: bash - env: - ORIGINAL_WORKSPACE: ${{ runner.workspace }} - run: | - mkdir olive-editor - cp app/olive-editor.exe olive-editor - cp app/crashhandler/olive-crashhandler.exe olive-editor - cp app/olive-editor.pdb olive-editor - windeployqt --no-angle olive-editor/olive-crashhandler.exe - windeployqt --no-angle olive-editor/olive-editor.exe - cp $(cygpath $ORIGINAL_WORKSPACE)/install/bin/*.dll olive-editor - cp $(cygpath $ORIGINAL_WORKSPACE)/install/crashpad/out/Default/crashpad_handler.exe olive-editor - cp $(cygpath $ORIGINAL_WORKSPACE)/install/bin/minidump_stackwalk.exe olive-editor - - - name: Export Crashpad symbols - working-directory: ${{ runner.workspace }}/build - shell: bash - run: | - curl -fLSs https://github.com/google/breakpad/blob/master/src/tools/windows/binaries/dump_syms.exe?raw=true > dump_syms.exe - ./dump_syms app/olive-editor.pdb > olive-editor.sym - SYM_HEADER=($(head -n 1 olive-editor.sym)) # Read first line of symbol file - SYM_DIR=olive-editor/symbols/olive-editor.pdb/${SYM_HEADER[3]} - mkdir -p "$SYM_DIR" - mv olive-editor.sym "$SYM_DIR" - - - name: Deploy Packages - working-directory: ${{ runner.workspace }}/build - shell: bash - run: | - # Create Installer Executable - #$DOWNLOAD_TOOL http://web.archive.org/web/20210226132532/http://download.microsoft.com/download/3/2/2/3224B87F-CFA0-4E70-BDA3-3DE650EFEBA5/vcredist_x64.exe - cp $(cygpath $GITHUB_WORKSPACE)/app/packaging/windows/nsis/* . - cp $(cygpath $GITHUB_WORKSPACE)/LICENSE . - $DOWNLOAD_TOOL https://nsis.sourceforge.io/mediawiki/images/6/68/ShellExecAsUser_amd64-Unicode.7z - 7z e ShellExecAsUser_amd64-Unicode.7z Plugins/x86-unicode/ShellExecAsUser.dll - makensis -V4 -DX64 "-XOutFile $PKGNAME.exe" "-X!AddPluginDir /x86-unicode $(pwd -W)" olive.nsi - - # Create Portable ZIP - echo -n > olive-editor/portable - mkdir deploy - mv olive-editor deploy - - - name: Upload Installer Artifact to GitHub - uses: actions/upload-artifact@v3 - with: - name: ${{ env.PKGNAME }}-Installer - path: ${{ runner.workspace }}/build/${{ env.PKGNAME }}.exe - - - name: Upload Portable Artifact to GitHub - uses: actions/upload-artifact@v3 - with: - name: ${{ env.PKGNAME }}-Portable - path: ${{ runner.workspace }}/build/deploy - - macos: - strategy: - fail-fast: false - matrix: - include: - - build-type: RelWithDebInfo - compiler-name: Clang LLVM - os-name: macOS - os-arch: x86_64 - os: macos-13 - cmake-gen: Ninja - min-deploy: 10.13 - - build-type: RelWithDebInfo - compiler-name: Clang LLVM - os-name: macOS - os-arch: arm64 - os: macos-13 - cmake-gen: Ninja - min-deploy: 11.0 - env: - DEP_LOCATION: /opt/olive-editor - name: | - ${{ matrix.os-name }} - <${{ matrix.os-arch }}, - ${{ matrix.compiler-name }}, - ${{ matrix.build-type }}, - ${{ matrix.cmake-gen }}> - runs-on: ${{ matrix.os }} - - steps: - - name: Checkout Source Code - uses: actions/checkout@v4 - with: - submodules: true - show-progress: false - - - name: Automatically Generate Package Name - shell: bash - env: - PLATFORM: ${{ matrix.os-name }} - ARCH: ${{ matrix.os-arch }} - run: | - echo "PKGNAME=$(echo Olive-${GITHUB_SHA::8}-${PLATFORM}-${ARCH})" >> $GITHUB_ENV - - - name: Create Build Folder - run: | - cmake -E make_directory ${{ runner.workspace }}/build - - - name: Acquire Dependencies - shell: bash - working-directory: ${{ runner.workspace }} - run: | - $DOWNLOAD_TOOL https://github.com/olive-editor/dependencies/releases/download/continuous/olive-dep-mac-${{ matrix.os-arch }}.tar.gz - sudo tar xzf olive-dep-mac-${{ matrix.os-arch }}.tar.gz -C / - - - name: Acquire Google Crashpad - shell: bash - working-directory: ${{ runner.workspace }} - run: | - $DOWNLOAD_TOOL https://github.com/olive-editor/crashpad/releases/download/continuous/crashpad-mac-${{ matrix.os-arch }}.tar.gz - sudo tar xzf crashpad-mac-${{ matrix.os-arch }}.tar.gz -C / - - - name: Generate Patreon List - env: - PATREON_KEY: ${{ secrets.PATREON_KEY }} - run: | - pip3 install requests - cd $GITHUB_WORKSPACE/app/dialog/about - python3 patreon.py - if: github.event_name == 'push' - continue-on-error: true - - - name: Install Ninja - shell: bash - run: | - brew update - brew install ninja - - - name: Configure CMake - shell: bash - working-directory: ${{ runner.workspace }}/build - run: | - PATH=$DEP_LOCATION:$DEP_LOCATION/bin:$DEP_LOCATION/include:$DEP_LOCATION/lib:$DEP_LOCATION/crashpad:$PATH \ - cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \ - -DCMAKE_OSX_DEPLOYMENT_TARGET=${{ matrix.min-deploy }} -G "${{ matrix.cmake-gen }}" \ - -DCMAKE_OSX_ARCHITECTURES="${{ matrix.os-arch }}" \ - $CMAKE_ARGS - - - name: Build - working-directory: ${{ runner.workspace }}/build - shell: bash - run: | - cmake --build . - - - name: Test - working-directory: ${{ runner.workspace }}/build - shell: bash - run: | - ctest -C ${{ matrix.build-type }} -V - if: matrix.os-arch == 'x86_64' # ARM64 tests naturally won't be able to run on x86_64 runners - - - name: Bundle Application - working-directory: ${{ runner.workspace }}/build - shell: bash - run: | - BUNDLE_NAME="Olive.app" - brew install dylibbundler - - mkdir deploy-${{ matrix.os-arch }} - cd deploy-${{ matrix.os-arch }} - - mv ../app/$BUNDLE_NAME . - mkdir $BUNDLE_NAME/Contents/Frameworks - - # Copy Qt frameworks and plugins - cp -Ra $DEP_LOCATION/lib/Qt*.framework $BUNDLE_NAME/Contents/Frameworks - cp -Ra $DEP_LOCATION/plugins $BUNDLE_NAME/Contents - - dylibbundler -b -ns -x "$BUNDLE_NAME/Contents/MacOS/Olive" -s "$DEP_LOCATION/lib" -d "$BUNDLE_NAME/Contents/Frameworks" -p "@executable_path/../Frameworks" \ - -x $BUNDLE_NAME/Contents/MacOS/olive-crashhandler -x $BUNDLE_NAME/Contents/Frameworks/QtNetwork.framework/Versions/5/QtNetwork - - # HACK: On x86_64, dylibbundler doesn't resolve this symlink. Weirdly it does on ARM64, - # but perhaps I'll bring it up with them soon. - cp -a $BUNDLE_NAME/Contents/Frameworks/libpng16.16.37.0.dylib $BUNDLE_NAME/Contents/Frameworks/libpng16.16.dylib - - # Crashpad symbols - $DEP_LOCATION/bin/dump_syms $BUNDLE_NAME/Contents/MacOS/Olive > Olive.sym - SYM_HEADER=($(head -n 1 Olive.sym)) # Read first line of symbol file - SYM_DIR=$BUNDLE_NAME/Contents/Resources/symbols/Olive/${SYM_HEADER[3]} - mkdir -p "$SYM_DIR" - mv Olive.sym "$SYM_DIR" - - - name: Sign Application - working-directory: ${{ runner.workspace }}/build/deploy-${{ matrix.os-arch }} - shell: bash - if: github.event_name == 'push' - env: - BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} - P12_PASSWORD: ${{ secrets.P12_PASSWORD }} - KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} - run: | - BUNDLE_NAME="Olive.app" - - # Install certificate - CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 - KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db - - # import certificate from secrets - echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode > $CERTIFICATE_PATH - - # create temporary keychain - security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH - security set-keychain-settings -lut 21600 $KEYCHAIN_PATH - security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH - - # import certificate to keychain - security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH - security list-keychain -d user -s $KEYCHAIN_PATH - - # HACK: Remove unsignable frameworks - rm -r $BUNDLE_NAME/Contents/Frameworks/QtUiPlugin.framework - if [ "${{ matrix.os-arch }}" == "arm64" ] - then - rm -r $BUNDLE_NAME/Contents/Frameworks/QtZlib.framework - fi - - # Sign application - codesign --deep --sign "Developer ID Application: Olive Studios LLC" $BUNDLE_NAME - - - name: Deploy - shell: bash - working-directory: ${{ runner.workspace }}/build/deploy-${{ matrix.os-arch }} - run: | - ln -s /Applications Applications - cd .. - hdiutil create img-${{ matrix.os-arch }}.dmg -volname Olive -fs HFS+ -srcfolder deploy-${{ matrix.os-arch }} - hdiutil convert img-${{ matrix.os-arch }}.dmg -format UDZO -o $PKGNAME.dmg - - - name: Upload Artifact to GitHub - uses: actions/upload-artifact@v3 - continue-on-error: true - with: - name: ${{ env.PKGNAME }} - path: ${{ runner.workspace }}/build/${{ env.PKGNAME }}.dmg diff --git a/.gitignore b/.gitignore index b10c5cddf..a21cddf06 100644 --- a/.gitignore +++ b/.gitignore @@ -98,3 +98,5 @@ compile_flags.txt *creator.user* *_qmlcache.qrc +.idea/ +.vimspector.json \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index db83ef6be..303939381 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,11 +18,11 @@ cmake_minimum_required(VERSION 3.13 FATAL_ERROR) project(olive-editor VERSION 0.2.0 LANGUAGES CXX) -option(BUILD_QT6 "Build with Qt 6 over 5 (experimental)" OFF) +option(BUILD_QT6 "Build with Qt 6 over 5 (experimental)" ON) option(BUILD_DOXYGEN "Build Doxygen documentation" OFF) option(BUILD_TESTS "Build unit tests" OFF) option(USE_WERROR "Error on compile warning" OFF) - +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ef3600f54..ba13dc1af 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,7 +24,7 @@ submitted should abide by the following standards: * The code style generally follows the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html) including, but not limited to: - * Indentation is 2 spaces wide, spaces only (no tabs) + * Indentation is 4 spaces wide, spaces only (no tabs) * `lowercase_underscored_variable_names` * `lowercase_underscored_functions()` or `SentenceCaseFunctions()` * `class SentenceCaseClassesAndStructs {}` diff --git a/README.md b/README.md index 8fc3c5cbb..9b5b5e3b1 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,6 @@ Now, we are maintaining a community edition for this project. **NOTE: Olive is alpha software and is considered highly unstable. While we highly appreciate users testing and providing usage information, please use at your own risk.** ## Binaries - +The original author compiled following binaries: - [0.1.0 alpha](https://github.com/olive-editor/olive/releases/tag/0.1.0) - [0.2.0 unstable development build](https://github.com/olive-editor/olive/releases/tag/0.2.0-nightly) \ No newline at end of file diff --git a/app/audio/audioprocessor.cpp b/app/audio/audioprocessor.cpp index 1e3eb9218..59e69927e 100644 --- a/app/audio/audioprocessor.cpp +++ b/app/audio/audioprocessor.cpp @@ -66,7 +66,7 @@ bool AudioProcessor::Open(const AudioParams &from, const AudioParams &to, double from.sample_rate(), from.sample_rate(), from_fmt_, - from.channel_layout()); + from.channel_layout().u.mask); int r; @@ -97,11 +97,11 @@ bool AudioProcessor::Open(const AudioParams &from, const AudioParams &to, double for (int i=0;i<=whole;i++) { double filter_tempo = (i == whole) ? std::pow(base, speed_log) : base; - +/* if (qFuzzyCompare(filter_tempo, 1.0)) { // This filter would do nothing continue; - } + }*/ previous_filter = CreateTempoFilter(filter_graph_, previous_filter, @@ -159,7 +159,9 @@ bool AudioProcessor::Open(const AudioParams &from, const AudioParams &to, double Close(); return false; } - + char *dump = avfilter_graph_dump(filter_graph_, nullptr); + qDebug() << dump; + av_free(dump); r = avfilter_graph_config(filter_graph_, nullptr); if (r < 0) { qCritical() << "Failed to configure graph:" << r; diff --git a/app/widget/viewer/viewer.cpp b/app/widget/viewer/viewer.cpp index 61d4c3028..98e58213b 100644 --- a/app/widget/viewer/viewer.cpp +++ b/app/widget/viewer/viewer.cpp @@ -512,6 +512,7 @@ void ViewerWidget::UpdateAudioProcessor() AudioParams ap = GetConnectedNode()->GetAudioParams(); ap.set_format(ViewerOutput::kDefaultSampleFormat); + uint64_t layout=OLIVE_CONFIG("AudioOutputChannelLayout").toULongLong(); AudioParams packed(OLIVE_CONFIG("AudioOutputSampleRate").toInt(), OLIVE_CONFIG("AudioOutputChannelLayout").toULongLong(), SampleFormat::from_string(OLIVE_CONFIG("AudioOutputSampleFormat").toString().toStdString())); @@ -981,7 +982,7 @@ void ViewerWidget::PlayInternal(int speed, bool in_to_out_only) } AudioParams ap = GetConnectedNode()->GetAudioParams(); - if (ap.is_valid()) { + if (ap.is_valid() && ap.channel_count() != 0) { UpdateAudioProcessor(); AudioManager::instance()->SetOutputNotifyInterval(audio_processor_.to().time_to_bytes(kAudioPlaybackInterval));