diff --git a/.github/workflows/amlogic-c302.yml b/.github/workflows/amlogic-c302.yml index 78c93bf..f4426c2 100644 --- a/.github/workflows/amlogic-c302.yml +++ b/.github/workflows/amlogic-c302.yml @@ -2,11 +2,11 @@ name: amlogic-c302 on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] workflow_dispatch: - branches: [ main ] + branches: [main] env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) @@ -18,25 +18,25 @@ jobs: runs-on: ubuntu-latest steps: - - name: Configure AWS credentials - id: configure-aws-credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ secrets.AWS_REGION }} + - name: Configure AWS credentials + id: configure-aws-credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_REGION }} - - name: Login to Amazon ECR - id: login-ecr - uses: codingspirit/amazon-ecr-login@master + - name: Login to Amazon ECR + id: login-ecr + uses: codingspirit/amazon-ecr-login@master - - name: Set ECR credentials - id: set-ecr-credentials - run: | - gh auth login --with-token <<< ${{ secrets.PA_TOKEN }} - gh secret set --env ECR ECR_REGISTRY --body ${{ steps.login-ecr.outputs.registry }} --repo ${{ github.repository }} - gh secret set --env ECR ECR_USERNAME --body ${{ steps.login-ecr.outputs.docker_username }} --repo ${{ github.repository }} - gh secret set --env ECR ECR_PASSWORD --body ${{ steps.login-ecr.outputs.docker_password }} --repo ${{ github.repository }} + - name: Set ECR credentials + id: set-ecr-credentials + run: | + gh auth login --with-token <<< ${{ secrets.PA_TOKEN }} + gh secret set --env ECR ECR_REGISTRY --body ${{ steps.login-ecr.outputs.registry }} --repo ${{ github.repository }} + gh secret set --env ECR ECR_USERNAME --body ${{ steps.login-ecr.outputs.docker_username }} --repo ${{ github.repository }} + gh secret set --env ECR ECR_PASSWORD --body ${{ steps.login-ecr.outputs.docker_password }} --repo ${{ github.repository }} amlogic: environment: ECR @@ -44,7 +44,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - container: [ "482862934379.dkr.ecr.us-east-1.amazonaws.com/amlogic:10.3.1" ] + container: + ["482862934379.dkr.ecr.us-east-1.amazonaws.com/amlogic:10.3.1"] container: image: ${{ matrix.container }} credentials: @@ -52,18 +53,18 @@ jobs: password: ${{ secrets.ECR_PASSWORD }} steps: - - name: Git checkout - uses: actions/checkout@v2 + - name: Git checkout + uses: actions/checkout@v2 - - name: Prepare board SDK - run: | - cp -r /${{ env.BOARD }}/* ${GITHUB_WORKSPACE}/3rdparty/${{ env.BOARD }}/ + - name: Prepare board SDK + run: | + cp -r /${{ env.BOARD }}/* ${GITHUB_WORKSPACE}/3rdparty/${{ env.BOARD }}/ - - name: Configure CMake - run: cmake -B ${{ github.workspace }}/build -DBOARD=${{ env.BOARD }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DBUILD_WEBRTC_SAMPLES=ON -DBUILD_KVS_SAMPLES=ON -DBUILD_SAVE_FRAME_SAMPLES=ON + - name: Configure CMake + run: cmake -B ${{ github.workspace }}/build -DBOARD=${{ env.BOARD }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DBUILD_WEBRTC_SAMPLES=ON -DBUILD_KVS_SAMPLES=ON -DBUILD_SAVE_FRAME_SAMPLES=ON - - name: Build - run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --parallel 4 + - name: Build + run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --parallel 4 - - name: Test - run: ctest -C ${{ env.BUILD_TYPE }} + - name: Test + run: ctest -C ${{ env.BUILD_TYPE }} diff --git a/.github/workflows/anyka-ak3918.yml b/.github/workflows/anyka-ak3918.yml index 56263b7..30e262c 100644 --- a/.github/workflows/anyka-ak3918.yml +++ b/.github/workflows/anyka-ak3918.yml @@ -2,11 +2,11 @@ name: anyka-ak3918 on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] workflow_dispatch: - branches: [ main ] + branches: [main] env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) @@ -18,25 +18,25 @@ jobs: runs-on: ubuntu-latest steps: - - name: Configure AWS credentials - id: configure-aws-credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ secrets.AWS_REGION }} + - name: Configure AWS credentials + id: configure-aws-credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_REGION }} - - name: Login to Amazon ECR - id: login-ecr - uses: codingspirit/amazon-ecr-login@master + - name: Login to Amazon ECR + id: login-ecr + uses: codingspirit/amazon-ecr-login@master - - name: Set ECR credentials - id: set-ecr-credentials - run: | - gh auth login --with-token <<< ${{ secrets.PA_TOKEN }} - gh secret set --env ECR ECR_REGISTRY --body ${{ steps.login-ecr.outputs.registry }} --repo ${{ github.repository }} - gh secret set --env ECR ECR_USERNAME --body ${{ steps.login-ecr.outputs.docker_username }} --repo ${{ github.repository }} - gh secret set --env ECR ECR_PASSWORD --body ${{ steps.login-ecr.outputs.docker_password }} --repo ${{ github.repository }} + - name: Set ECR credentials + id: set-ecr-credentials + run: | + gh auth login --with-token <<< ${{ secrets.PA_TOKEN }} + gh secret set --env ECR ECR_REGISTRY --body ${{ steps.login-ecr.outputs.registry }} --repo ${{ github.repository }} + gh secret set --env ECR ECR_USERNAME --body ${{ steps.login-ecr.outputs.docker_username }} --repo ${{ github.repository }} + gh secret set --env ECR ECR_PASSWORD --body ${{ steps.login-ecr.outputs.docker_password }} --repo ${{ github.repository }} anyka: environment: ECR @@ -44,7 +44,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - container: [ "482862934379.dkr.ecr.us-east-1.amazonaws.com/anyka:5.5.0" ] + container: ["482862934379.dkr.ecr.us-east-1.amazonaws.com/anyka:5.5.0"] container: image: ${{ matrix.container }} credentials: @@ -52,18 +52,18 @@ jobs: password: ${{ secrets.ECR_PASSWORD }} steps: - - name: Git checkout - uses: actions/checkout@v2 + - name: Git checkout + uses: actions/checkout@v2 - - name: Prepare board SDK - run: | - cp -r /${{ env.BOARD }}/* ${GITHUB_WORKSPACE}/3rdparty/${{ env.BOARD }}/ + - name: Prepare board SDK + run: | + cp -r /${{ env.BOARD }}/* ${GITHUB_WORKSPACE}/3rdparty/${{ env.BOARD }}/ - - name: Configure CMake - run: cmake -B ${{ github.workspace }}/build -DBOARD=${{ env.BOARD }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DBUILD_WEBRTC_SAMPLES=ON -DBUILD_KVS_SAMPLES=ON -DBUILD_SAVE_FRAME_SAMPLES=ON + - name: Configure CMake + run: cmake -B ${{ github.workspace }}/build -DBOARD=${{ env.BOARD }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DBUILD_WEBRTC_SAMPLES=ON -DBUILD_KVS_SAMPLES=ON -DBUILD_SAVE_FRAME_SAMPLES=ON - - name: Build - run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --parallel 4 + - name: Build + run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --parallel 4 - - name: Test - run: ctest -C ${{ env.BUILD_TYPE }} + - name: Test + run: ctest -C ${{ env.BUILD_TYPE }} diff --git a/.github/workflows/eeasy-sv82x.yml b/.github/workflows/eeasy-sv82x.yml index 0a7887b..dfa89e4 100644 --- a/.github/workflows/eeasy-sv82x.yml +++ b/.github/workflows/eeasy-sv82x.yml @@ -2,11 +2,11 @@ name: eeasy-sv82x on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] workflow_dispatch: - branches: [ main ] + branches: [main] env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) @@ -18,25 +18,25 @@ jobs: runs-on: ubuntu-latest steps: - - name: Configure AWS credentials - id: configure-aws-credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ secrets.AWS_REGION }} + - name: Configure AWS credentials + id: configure-aws-credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_REGION }} - - name: Login to Amazon ECR - id: login-ecr - uses: codingspirit/amazon-ecr-login@master + - name: Login to Amazon ECR + id: login-ecr + uses: codingspirit/amazon-ecr-login@master - - name: Set ECR credentials - id: set-ecr-credentials - run: | - gh auth login --with-token <<< ${{ secrets.PA_TOKEN }} - gh secret set --env ECR ECR_REGISTRY --body ${{ steps.login-ecr.outputs.registry }} --repo ${{ github.repository }} - gh secret set --env ECR ECR_USERNAME --body ${{ steps.login-ecr.outputs.docker_username }} --repo ${{ github.repository }} - gh secret set --env ECR ECR_PASSWORD --body ${{ steps.login-ecr.outputs.docker_password }} --repo ${{ github.repository }} + - name: Set ECR credentials + id: set-ecr-credentials + run: | + gh auth login --with-token <<< ${{ secrets.PA_TOKEN }} + gh secret set --env ECR ECR_REGISTRY --body ${{ steps.login-ecr.outputs.registry }} --repo ${{ github.repository }} + gh secret set --env ECR ECR_USERNAME --body ${{ steps.login-ecr.outputs.docker_username }} --repo ${{ github.repository }} + gh secret set --env ECR ECR_PASSWORD --body ${{ steps.login-ecr.outputs.docker_password }} --repo ${{ github.repository }} eeasy: environment: ECR @@ -44,7 +44,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - container: [ "482862934379.dkr.ecr.us-east-1.amazonaws.com/eeasy:7.5.0" ] + container: ["482862934379.dkr.ecr.us-east-1.amazonaws.com/eeasy:7.5.0"] container: image: ${{ matrix.container }} credentials: @@ -52,18 +52,18 @@ jobs: password: ${{ secrets.ECR_PASSWORD }} steps: - - name: Git checkout - uses: actions/checkout@v2 + - name: Git checkout + uses: actions/checkout@v2 - - name: Prepare board SDK - run: | - cp -r /SV82x/* ${GITHUB_WORKSPACE}/3rdparty/SV82x/ + - name: Prepare board SDK + run: | + cp -r /SV82x/* ${GITHUB_WORKSPACE}/3rdparty/SV82x/ - - name: Configure CMake - run: cmake -B ${{ github.workspace }}/build -DBOARD=${{ env.BOARD }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DBUILD_WEBRTC_SAMPLES=ON -DBUILD_KVS_SAMPLES=ON -DBUILD_SAVE_FRAME_SAMPLES=ON + - name: Configure CMake + run: cmake -B ${{ github.workspace }}/build -DBOARD=${{ env.BOARD }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DBUILD_WEBRTC_SAMPLES=ON -DBUILD_KVS_SAMPLES=ON -DBUILD_SAVE_FRAME_SAMPLES=ON - - name: Build - run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --parallel 4 + - name: Build + run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --parallel 4 - - name: Test - run: ctest -C ${{ env.BUILD_TYPE }} + - name: Test + run: ctest -C ${{ env.BUILD_TYPE }} diff --git a/.github/workflows/file.yml b/.github/workflows/file.yml index 69e7daa..2035bbf 100644 --- a/.github/workflows/file.yml +++ b/.github/workflows/file.yml @@ -6,20 +6,22 @@ env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: Release BOARD: FILE + CC: gcc-10 + CXX: g++-10 jobs: x64-file: runs-on: ubuntu-latest steps: - - name: Git checkout - uses: actions/checkout@v2 + - name: Git checkout + uses: actions/checkout@v2 - - name: Configure CMake - run: cmake -B ${{ github.workspace }}/build -DBOARD=${{ env.BOARD }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DBUILD_WEBRTC_SAMPLES=ON -DBUILD_KVS_SAMPLES=ON -DBUILD_SAVE_FRAME_SAMPLES=ON + - name: Configure CMake + run: cmake -B ${{ github.workspace }}/build -DBOARD=${{ env.BOARD }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DBUILD_WEBRTC_SAMPLES=ON -DBUILD_KVS_SAMPLES=ON -DBUILD_SAVE_FRAME_SAMPLES=ON - - name: Build - run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --parallel 4 + - name: Build + run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --parallel 4 - - name: Test - run: ctest -C ${{ env.BUILD_TYPE }} + - name: Test + run: ctest -C ${{ env.BUILD_TYPE }} diff --git a/.github/workflows/fullhan-fh8626v100.yml b/.github/workflows/fullhan-fh8626v100.yml index ffccc3c..cae94f2 100644 --- a/.github/workflows/fullhan-fh8626v100.yml +++ b/.github/workflows/fullhan-fh8626v100.yml @@ -2,11 +2,11 @@ name: fullhan-fh8626v100 on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] workflow_dispatch: - branches: [ main ] + branches: [main] env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) @@ -18,25 +18,25 @@ jobs: runs-on: ubuntu-latest steps: - - name: Configure AWS credentials - id: configure-aws-credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ secrets.AWS_REGION }} + - name: Configure AWS credentials + id: configure-aws-credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_REGION }} - - name: Login to Amazon ECR - id: login-ecr - uses: codingspirit/amazon-ecr-login@master + - name: Login to Amazon ECR + id: login-ecr + uses: codingspirit/amazon-ecr-login@master - - name: Set ECR credentials - id: set-ecr-credentials - run: | - gh auth login --with-token <<< ${{ secrets.PA_TOKEN }} - gh secret set --env ECR ECR_REGISTRY --body ${{ steps.login-ecr.outputs.registry }} --repo ${{ github.repository }} - gh secret set --env ECR ECR_USERNAME --body ${{ steps.login-ecr.outputs.docker_username }} --repo ${{ github.repository }} - gh secret set --env ECR ECR_PASSWORD --body ${{ steps.login-ecr.outputs.docker_password }} --repo ${{ github.repository }} + - name: Set ECR credentials + id: set-ecr-credentials + run: | + gh auth login --with-token <<< ${{ secrets.PA_TOKEN }} + gh secret set --env ECR ECR_REGISTRY --body ${{ steps.login-ecr.outputs.registry }} --repo ${{ github.repository }} + gh secret set --env ECR ECR_USERNAME --body ${{ steps.login-ecr.outputs.docker_username }} --repo ${{ github.repository }} + gh secret set --env ECR ECR_PASSWORD --body ${{ steps.login-ecr.outputs.docker_password }} --repo ${{ github.repository }} fullhan: environment: ECR @@ -44,7 +44,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - container: [ "482862934379.dkr.ecr.us-east-1.amazonaws.com/fullhan:6.5.0" ] + container: + ["482862934379.dkr.ecr.us-east-1.amazonaws.com/fullhan:6.5.0"] container: image: ${{ matrix.container }} credentials: @@ -52,18 +53,18 @@ jobs: password: ${{ secrets.ECR_PASSWORD }} steps: - - name: Git checkout - uses: actions/checkout@v2 + - name: Git checkout + uses: actions/checkout@v2 - - name: Prepare board SDK - run: | - cp -r /FH8626V100/* ${GITHUB_WORKSPACE}/3rdparty/FH8626V100/ + - name: Prepare board SDK + run: | + cp -r /FH8626V100/* ${GITHUB_WORKSPACE}/3rdparty/FH8626V100/ - - name: Configure CMake - run: cmake -B ${{ github.workspace }}/build -DBOARD=${{ env.BOARD }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DBUILD_WEBRTC_SAMPLES=ON -DBUILD_KVS_SAMPLES=ON -DBUILD_SAVE_FRAME_SAMPLES=ON + - name: Configure CMake + run: cmake -B ${{ github.workspace }}/build -DBOARD=${{ env.BOARD }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DBUILD_WEBRTC_SAMPLES=ON -DBUILD_KVS_SAMPLES=ON -DBUILD_SAVE_FRAME_SAMPLES=ON - - name: Build - run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --parallel 4 + - name: Build + run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --parallel 4 - - name: Test - run: ctest -C ${{ env.BUILD_TYPE }} + - name: Test + run: ctest -C ${{ env.BUILD_TYPE }} diff --git a/.github/workflows/ingenic-t31.yml b/.github/workflows/ingenic-t31.yml index 613414c..796519d 100644 --- a/.github/workflows/ingenic-t31.yml +++ b/.github/workflows/ingenic-t31.yml @@ -2,11 +2,11 @@ name: ingenic-t31 on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] workflow_dispatch: - branches: [ main ] + branches: [main] env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) @@ -18,25 +18,25 @@ jobs: runs-on: ubuntu-latest steps: - - name: Configure AWS credentials - id: configure-aws-credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ secrets.AWS_REGION }} + - name: Configure AWS credentials + id: configure-aws-credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_REGION }} - - name: Login to Amazon ECR - id: login-ecr - uses: codingspirit/amazon-ecr-login@master + - name: Login to Amazon ECR + id: login-ecr + uses: codingspirit/amazon-ecr-login@master - - name: Set ECR credentials - id: set-ecr-credentials - run: | - gh auth login --with-token <<< ${{ secrets.PA_TOKEN }} - gh secret set --env ECR ECR_REGISTRY --body ${{ steps.login-ecr.outputs.registry }} --repo ${{ github.repository }} - gh secret set --env ECR ECR_USERNAME --body ${{ steps.login-ecr.outputs.docker_username }} --repo ${{ github.repository }} - gh secret set --env ECR ECR_PASSWORD --body ${{ steps.login-ecr.outputs.docker_password }} --repo ${{ github.repository }} + - name: Set ECR credentials + id: set-ecr-credentials + run: | + gh auth login --with-token <<< ${{ secrets.PA_TOKEN }} + gh secret set --env ECR ECR_REGISTRY --body ${{ steps.login-ecr.outputs.registry }} --repo ${{ github.repository }} + gh secret set --env ECR ECR_USERNAME --body ${{ steps.login-ecr.outputs.docker_username }} --repo ${{ github.repository }} + gh secret set --env ECR ECR_PASSWORD --body ${{ steps.login-ecr.outputs.docker_password }} --repo ${{ github.repository }} ingenic: environment: ECR @@ -44,7 +44,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - container: [ "482862934379.dkr.ecr.us-east-1.amazonaws.com/ingenic:4.7.2", "482862934379.dkr.ecr.us-east-1.amazonaws.com/ingenic:5.4.0" ] + container: + [ + "482862934379.dkr.ecr.us-east-1.amazonaws.com/ingenic:4.7.2", + "482862934379.dkr.ecr.us-east-1.amazonaws.com/ingenic:5.4.0", + ] container: image: ${{ matrix.container }} credentials: @@ -52,18 +56,18 @@ jobs: password: ${{ secrets.ECR_PASSWORD }} steps: - - name: Git checkout - uses: actions/checkout@v2 + - name: Git checkout + uses: actions/checkout@v2 - - name: Prepare board SDK - run: | - cp -r /ingenic-sdk/* ${GITHUB_WORKSPACE}/3rdparty/T31/ + - name: Prepare board SDK + run: | + cp -r /ingenic-sdk/* ${GITHUB_WORKSPACE}/3rdparty/T31/ - - name: Configure CMake - run: cmake -B ${{ github.workspace }}/build -DBOARD=${{ env.BOARD }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DBUILD_WEBRTC_SAMPLES=ON -DBUILD_KVS_SAMPLES=ON -DBUILD_SAVE_FRAME_SAMPLES=ON + - name: Configure CMake + run: cmake -B ${{ github.workspace }}/build -DBOARD=${{ env.BOARD }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DBUILD_WEBRTC_SAMPLES=ON -DBUILD_KVS_SAMPLES=ON -DBUILD_SAVE_FRAME_SAMPLES=ON - - name: Build - run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --parallel 4 + - name: Build + run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --parallel 4 - - name: Test - run: ctest -C ${{ env.BUILD_TYPE }} + - name: Test + run: ctest -C ${{ env.BUILD_TYPE }} diff --git a/.github/workflows/v4l2.yml b/.github/workflows/v4l2.yml index 0dc4054..01b3b8b 100644 --- a/.github/workflows/v4l2.yml +++ b/.github/workflows/v4l2.yml @@ -6,22 +6,24 @@ env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: Release BOARD: V4L2 + CC: gcc-10 + CXX: g++-10 jobs: x64-v4l2: runs-on: ubuntu-latest steps: - - name: Install libv4l2 - run: sudo apt install libv4l-dev -y - - name: Git checkout - uses: actions/checkout@v2 + - name: Install libv4l2 + run: sudo apt install libv4l-dev -y + - name: Git checkout + uses: actions/checkout@v2 - - name: Configure CMake - run: cmake -B ${{ github.workspace }}/build -DBOARD=${{ env.BOARD }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DBUILD_WEBRTC_SAMPLES=ON -DBUILD_KVS_SAMPLES=ON -DBUILD_SAVE_FRAME_SAMPLES=ON + - name: Configure CMake + run: cmake -B ${{ github.workspace }}/build -DBOARD=${{ env.BOARD }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DBUILD_WEBRTC_SAMPLES=ON -DBUILD_KVS_SAMPLES=ON -DBUILD_SAVE_FRAME_SAMPLES=ON - - name: Build - run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --parallel 4 + - name: Build + run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --parallel 4 - - name: Test - run: ctest -C ${{ env.BUILD_TYPE }} + - name: Test + run: ctest -C ${{ env.BUILD_TYPE }} diff --git a/3rdparty/C302/include/ipc_cfg_api.h b/3rdparty/C302/include/ipc_cfg_api.h index 264b42e..c6cc4e3 100644 --- a/3rdparty/C302/include/ipc_cfg_api.h +++ b/3rdparty/C302/include/ipc_cfg_api.h @@ -1,3 +1,29 @@ +/* + * Copyright (C) 2019-2024 Amlogic, Inc. All rights reserved. + * + * All information contained herein is Amlogic confidential. + * + * This software is provided to you pursuant to Software License Agreement + * (SLA) with Amlogic Inc ("Amlogic"). This software may be used + * only in accordance with the terms of this agreement. + * + * Redistribution and use in source and binary forms, with or without + * modification is strictly prohibited without prior written permission from + * Amlogic. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + #ifndef __IPC_CFG_API_H__ #define __IPC_CFG_API_H__ @@ -19,16 +45,18 @@ typedef enum IPC_CFG_VI_OPTIONS CFG_VI_OPTION_SNS_TYPE = 0, CFG_VI_OPTION_FPS_MODE, CFG_VI_OPTION_INPUT_LANE, + CFG_VI_OPTION_BUS_ID, CFG_VI_OPTION_BUTT } IPC_CFG_VI_OPTIONS; typedef enum IPC_CFG_STREAM_OPTIONS { CFG_STREAM_OPTION_VIID = 0, - CFG_STREAM_OPTION_ISPID, + CFG_STREAM_OPTION_PPUID, CFG_STREAM_OPTION_RESOLUTION, CFG_STREAM_OPTION_FORMAT, CFG_STREAM_OPTION_ENCODEC, + CFG_STREAM_OPTION_DUMP, CFG_STREAM_OPTION_FRAMERATE, CFG_STREAM_OPTION_PROFILE, CFG_STREAM_OPTION_GOP, @@ -67,6 +95,7 @@ typedef enum IPC_CFG_IMAGE_OPTIONS CFG_IMAGE_OPTION_IRCUT, CFG_IMAGE_OPTION_D2N, CFG_IMAGE_OPTION_N2D, + CFG_IMAGE_OPTION_FLICKER, CFG_IMAGE_OPTION_BUTT } IPC_CFG_IMAGE_OPTIONS; @@ -78,7 +107,7 @@ typedef enum IPC_CFG_AI_OPTIONS CFG_AI_OPTION_SAMPLERATE, CFG_AI_OPTION_BITWIDTH, CFG_AI_OPTION_VOLUME, - //CFG_AI_OPTION_VQEENABLE, + CFG_AI_OPTION_VQEENABLE, CFG_AI_OPTION_BUTT, } IPC_CFG_AI_OPTIONS; @@ -93,13 +122,6 @@ typedef enum IPC_CFG_AO_OPTIONS CFG_AO_OPTION_BUTT, } IPC_CFG_AO_OPTIONS; - -typedef enum IPC_PARAM_RESTORE -{ - PARAM_SIMPLE_RECOVERY = 0, - PARAM_FULL_RECOVERY -} IPC_PARAM_RESTORE; - typedef enum IPC_PARAM_ID { PARAM_VIDEO_ID = 0, @@ -120,15 +142,15 @@ typedef enum IPC_PARAM_VIDEO_ID /********************************************************************************* *Function : IPC_CFG_GetOptions * - *Description: Get parameters's information, such as setting range + *Description: Obtain detailed information of parameters such as settable range * - *Param : #[in] s32Chn, Channel number (parameters with channel concept are valid) - * #[in] enParamId, Parameter ID (used to distinguish the obtained parameter categories) - * #[in] s32SubId, Parameter SubID (some parameters have multiple subtypes) - * #[in/out] pOptions, Parameter details obtained + *Param : #[in] s32Chn Channel number (parameters with channel concept are valid) + * #[in] enParamId Parameter ID (used to distinguish the obtained parameter categories) + * #[in] s32SubId Parameter ID (some parameters have multiple sub types) Example:IPC_PARAM_VIDEO_ID + * #[in/out] pOptions Parameter details obtained * - *Return : =0, success - * =Other, fail + *Return : =0 Success + * =Other Failed *********************************************************************************/ int IPC_CFG_GetOptions(int s32Chn, IPC_PARAM_ID enParamId, int s32SubId, IPC_CFG_OPTIONS **pOptions); @@ -137,13 +159,13 @@ int IPC_CFG_GetOptions(int s32Chn, IPC_PARAM_ID enParamId, int s32SubId, IPC_CFG * *Description: Get parameters * - *Param : #[in] s32Chn, Channel number (parameters with channel concept are valid) - * #[in] enParamId, Parameter ID (used to distinguish the obtained parameter categories) - * #[in] s32SubId, Parameter SubID (some parameters have multiple subtypes) - * #[in/out] pConfig, Obtained parameter (cannot be NULL) + *Param : #[in] s32Chn Channel number (parameters with channel concept are valid) + * #[in] enParamId Parameter ID (used to distinguish the obtained parameter categories) + * #[in] s32SubId Parameter ID (some parameters have multiple sub types) Example:IPC_PARAM_VIDEO_ID + * #[in/out] pConfig Obtained parameter (cannot be NULL) * - *Return : =0, success - * =Other, fail + *Return : =0 Success + * =Other Failed *********************************************************************************/ int IPC_CFG_GetParam(int s32Chn, IPC_PARAM_ID enParamId, int s32SubId, void *pConfig); @@ -154,13 +176,13 @@ int IPC_CFG_CheckParam(int s32Chn, IPC_PARAM_ID enParamId, int s32SubId, void *p * *Description: Set parameters * - *Param : #[in] s32Chn, Channel number (parameters with channel concept are valid) - * #[in] enParamId, Parameter ID (used to distinguish the obtained parameter categories) - * #[in] s32SubId, Parameter SubID (some parameters have multiple subtypes) - * #[in] pConfig, Set parameter (cannot be NULL) + *Param : #[in] s32Chn Channel number (parameters with channel concept are valid) + * #[in] enParamId Parameter ID (used to distinguish the obtained parameter categories) + * #[in] s32SubId Parameter ID (some parameters have multiple sub types) Example:IPC_PARAM_VIDEO_ID + * #[in] pConfig Set parameter (cannot be NULL) * - *Return : =0, success - * =Other, fail + *Return : =0 Success + * =Other Failed *********************************************************************************/ int IPC_CFG_SetParam(int s32Chn, IPC_PARAM_ID enParamId, int s32SubId, void *pConfig); diff --git a/3rdparty/C302/include/ipc_cfg_define.h b/3rdparty/C302/include/ipc_cfg_define.h index 89f2fe4..9ad0bdc 100644 --- a/3rdparty/C302/include/ipc_cfg_define.h +++ b/3rdparty/C302/include/ipc_cfg_define.h @@ -16,8 +16,6 @@ extern "C" { #define CHN_STREMA_NUM 1 #define MAX_STREAM_NUM (MAX_SENSOR_NUM * CHN_STREMA_NUM) -//#define MAX_CAPTURE_NUM (MAX_SENSOR_NUM * 1) -//#define MAX_VENC_NUM (MAX_STREAM_NUM + MAX_CAPTURE_NUM) #define STR_COMM_LENGTH8 8 #define STR_COMM_LENGTH16 16 @@ -28,6 +26,8 @@ extern "C" { #define MAX_CFG_NUM 64 #define MAX_CFG_AREA_NUM 4 +#define EACH_VI_MAX_ISP_CHN 3 +#define CALU_ISP_CHN_BY_VI(vi, ppu) ((vi*EACH_VI_MAX_ISP_CHN)+ppu) // Each sensor has 3 physical channels typedef enum IPC_CFG_DATA_TYPE { @@ -78,7 +78,9 @@ typedef struct IPC_CFG_OPTIONS_ARRAY typedef enum IPC_FRAMERATE_MODE { - FRAMERATE_MODE_15 = 0, + FRAMERATE_MODE_10 = 0, + FRAMERATE_MODE_15, + FRAMERATE_MODE_20, FRAMERATE_MODE_25, FRAMERATE_MODE_30, FRAMERATE_MODE_50, @@ -186,43 +188,45 @@ typedef struct IPC_VI_CONFIG char szSnsType[STR_COMM_LENGTH16]; // sensor type IPC_FRAMERATE_MODE enFramerate; // input framerate mode IPC_INPUT_LANE enInputLane; // input lane + int s32BusId; // I2C id } IPC_VI_CONFIG; /* video encode stream */ typedef struct IPC_STREAM_CONFIG { int s32ViId; - int s32IspId; + int s32PpuId; IPC_RESOLUTION enResolution; // resolution - IPC_VFORMAT_TYPE enFormat; // 0-need encode,1-NV21 + IPC_VFORMAT_TYPE enFormat; // stream format,0-need encode,1-not need encode,raw NV21 IPC_VCODEC_TYPE enCodec; // encode type + unsigned int u32Dump; // save continuous frames,default 0 not save,max=300 unsigned int u32Framerate; // framerate unsigned int u32Profile; // H.264:0-baseline, 1-MP, 2-HP 3-SVC-T; H.265:0-MP, 1-Main; Jpege/MJpege:0-baseline unsigned int u32H26xGop; // H264 H265 Gop IPC_GOP_MODE enGopMode; // Gop mode IPC_RC enRcMode; // RC mode - unsigned int u32Bitrate; // CBR QVBR(TargetBitRate) valid - unsigned int u32MaxBitrate; // VBR AVBR CVBR(&LongTermMaxBitrate) valid - unsigned int u32MinBitrate; // CVBR(LongTermMinBitrate) valid - unsigned int u32IQp; // H26X FIXQP valid - unsigned int u32PQp; // H26X FIXQP valid - unsigned int u32BQp; // H26X FIXQP valid - unsigned int u32QpMapMode; // H265 QPMAP valid - unsigned int u32Quality; // MJPEG valid + unsigned int u32Bitrate; // CBR QVBR(TargetBitRate) effective + unsigned int u32MaxBitrate; // VBR AVBR CVBR(&LongTermMaxBitrate) effective + unsigned int u32MinBitrate; // CVBR(LongTermMinBitrate) effective + unsigned int u32IQp; // H26X FIXQP effective + unsigned int u32PQp; // H26X FIXQP effective + unsigned int u32BQp; // H26X FIXQP effective + unsigned int u32QpMapMode; // H265 QPMAP effective + unsigned int u32Quality; // MJPEG effective } IPC_STREAM_CONFIG; -/* 图像 */ +/* image */ typedef struct IPC_IMAGE_CONFIG { - unsigned char u8Flip; // 0-not flip, 1-flip - unsigned char u8Mirror; // 0-not mirror, 1-mirror + unsigned char u8Flip; // flip: 0-not flip 1-flip + unsigned char u8Mirror; // mirror: 0-not mirror 1-mirror unsigned char u8ExpMode; // exposure mode: 0-Auto(slow shutter) 1-Auto(fix frame) 2-Manual unsigned char u8WbMode; // whitebalance mode: 0-Manual 1-Auto unsigned int u32ExpTime; // manual exposure time - unsigned int u32ExpDGain; // manual isp digital gain - unsigned char u8RGain; // manual wb red gain - unsigned char u8BGain; // manual wb green gain - unsigned char u8Denoise3d; // 3D noise reduction + unsigned int u32ExpDGain; // manual ISP digital gain + unsigned char u8RGain; // manual whitebalance red gain + unsigned char u8BGain; // manual whitebalance blue gain + unsigned char u8Denoise3d; // 3D denoise unsigned char u8Brightness; // brightness unsigned char u8Saturation; // saturation unsigned char u8Contrast; // contrast @@ -232,8 +236,9 @@ typedef struct IPC_IMAGE_CONFIG unsigned char u8LDC; // distortion correction unsigned char u8HLC; // strong light suppression IPC_IRCUT_TYPE enIrcutType; // IRCUT type - unsigned int u32DayToNight; // time for day to night(timing mode valid) - unsigned int u32NightToDay; // time for night to day(timing mode valid) + unsigned int u32DayToNight; // day to night time, valid only in timed mode + unsigned int u32NightToDay; // night to day time, valid only in timed mode + unsigned char u8AntiFlickerMode; // antiflicker mode: 0-disable 1-50hz 2-60hz 3-Auto } IPC_IMAGE_CONFIG; typedef struct IPC_VIDEO_CONFIG @@ -241,36 +246,36 @@ typedef struct IPC_VIDEO_CONFIG int s32SensorNum; // sensor number int s32StreamNum; // video stream number IPC_VI_CONFIG stViCfg[MAX_SENSOR_NUM]; // video input - IPC_STREAM_CONFIG stStreamCfg[MAX_STREAM_NUM]; // video encode stream - IPC_IMAGE_CONFIG stImageCfg[MAX_SENSOR_NUM]; // image parameters + IPC_STREAM_CONFIG stStreamCfg[MAX_STREAM_NUM]; // encoded stream + IPC_IMAGE_CONFIG stImageCfg[MAX_SENSOR_NUM]; // image } IPC_VIDEO_CONFIG; -/*---------------------------------video parameters end--------------------------------*/ +/*---------------------------------video parameters END--------------------------------*/ /*----------------------------------audio parameters----------------------------------*/ /* audio input */ typedef struct IPC_AI_CONFIG { - unsigned int u32Enabled; // enabled - IPC_ACODEC_TYPE enCodec; // encode type - unsigned int u32Channels; // channel number + unsigned int u32Enabled; // enabled, 0-disabled, 1-enabled + IPC_ACODEC_TYPE enCodec; // codec type + unsigned int u32Channels; // channel IPC_AUDIO_SAMPLERATE enSampleRate; // samplerate - IPC_AUDIO_BITWIDTH enBitWidth; // bit width + IPC_AUDIO_BITWIDTH enBitWidth; // bitwidth unsigned int u32Volume; // volume - //unsigned int u32VqeEnable; + unsigned int u32VqeEnable; // VQE enable, 0-disabled, 1-enabled } IPC_AI_CONFIG; /* audio output */ typedef struct IPC_AO_CONFIG { - unsigned int u32Enabled; // enabled - IPC_ACODEC_TYPE enCodec; // encode type - unsigned int u32Channels; // channel number + unsigned int u32Enabled; // enabled, 0-disabled, 1-enabled + IPC_ACODEC_TYPE enCodec; // codec type + unsigned int u32Channels; // channel IPC_AUDIO_SAMPLERATE enSampleRate; // samplerate - IPC_AUDIO_BITWIDTH enBitWidth; // bit width + IPC_AUDIO_BITWIDTH enBitWidth; // bitwidth unsigned int u32Volume; // volume } IPC_AO_CONFIG; -/*--------------------------------audio parameters end---------------------------------*/ +/*--------------------------------audio parameters END---------------------------------*/ int IPC_CFG_CheckCfgDir(); int IPC_CFG_CopyFile(char *pBackFile, char *pCfgFile); diff --git a/3rdparty/C302/include/ipc_media_buffer.h b/3rdparty/C302/include/ipc_media_buffer.h index 1be3acb..d9e6899 100644 --- a/3rdparty/C302/include/ipc_media_buffer.h +++ b/3rdparty/C302/include/ipc_media_buffer.h @@ -12,6 +12,7 @@ extern "C" { #include #include #include +#include typedef enum IPC_MEDIA_FRAME_TYPE { @@ -44,14 +45,16 @@ typedef struct IPC_MEDIA_BUFFER int s32EndOffset; int s32DeadlineOffset; pthread_mutex_t mutex; - pthread_cond_t cond; + //pthread_cond_t cond; } IPC_MEDIA_BUFFER; +int IPC_MEDIA_BUFFER_Empty(IPC_MEDIA_BUFFER *pmbuffer); int IPC_MEDIA_BUFFER_Read(IPC_MEDIA_BUFFER *pmbuffer, void* pdata, unsigned int u32size, unsigned int *u32len, unsigned long long *u64pts); int IPC_MEDIA_BUFFER_Write(IPC_MEDIA_BUFFER *pmbuffer, IPC_MEDIA_FRAME_TYPE mft, void* pdata, unsigned int u32len, unsigned long long u64pts); +void IPC_MEDIA_BUFFER_Clear(IPC_MEDIA_BUFFER *pmbuffer); IPC_MEDIA_BUFFER *IPC_MEDIA_BUFFER_Init(int s32Size); void IPC_MEDIA_BUFFER_UnInit(IPC_MEDIA_BUFFER *pmbuffer); diff --git a/3rdparty/C302/include/ipc_video_api.h b/3rdparty/C302/include/ipc_video_api.h index fd6de6b..5578fd8 100644 --- a/3rdparty/C302/include/ipc_video_api.h +++ b/3rdparty/C302/include/ipc_video_api.h @@ -18,6 +18,7 @@ int IPC_VIDEO_SetStreamConfig(int nStreamId, IPC_VFORMAT_TYPE fmt, IPC_RESOLUTIO IPC_VCODEC_TYPE codec, unsigned int framerate, unsigned int profile); int IPC_VIDEO_ReqIFrame(int sStreamId); +int IPC_VIDEO_CheckFrame(int sStreamId); int IPC_VIDEO_GetFrame(IPC_VIDEO_FRAME *pvframe, int sStreamId, unsigned int uYuvSize); void IPC_VIDEO_UpdateIspAttr(); diff --git a/3rdparty/C302/include/ipc_video_define.h b/3rdparty/C302/include/ipc_video_define.h index 4426986..85d4726 100644 --- a/3rdparty/C302/include/ipc_video_define.h +++ b/3rdparty/C302/include/ipc_video_define.h @@ -38,6 +38,7 @@ typedef enum IPC_PPU_PIXEL_FORMAT { PPU_PIXEL_FORMAT_RGB_BAYER_8BPP, PPU_PIXEL_FORMAT_RGB_BAYER_16BPP, PPU_PIXEL_FORMAT_YVU_SEMIPLANAR_420, //nv21 + //PPU_PIXEL_FORMAT_YUYV_PACKAGE_422, PPU_PIXEL_FORMAT_BUTT } IPC_PPU_PIXEL_FORMAT; @@ -71,7 +72,7 @@ typedef struct IPC_VIDEO_FRAME unsigned long long u64pts; } IPC_VIDEO_FRAME; -//=====================================combo info============================================= +//=====================================sensor api============================================= int IPC_SENSOR_TypeCheck(IPC_VIDEO_CONFIG *pstVideoConfig); IPC_SNS_TYPE IPC_VIDEO_GetSnsType(char *pSnsName); int IPC_VIDEO_GetSnsSize(IPC_SNS_TYPE enSnsType, IPC_RESOLUTION_SIZE *pstSize); @@ -80,22 +81,42 @@ unsigned int IPC_VIDEO_GetMipiLane(IPC_INPUT_LANE enInLane); int IPC_VIDEO_GetResolution(IPC_RESOLUTION enResolution, IPC_RESOLUTION_SIZE *pstSize); IPC_RESOLUTION IPC_VIDEO_GetResItem(IPC_RESOLUTION_SIZE *pstSize); -int IPC_PPU_GetChn(int sViId, int sIspId); -int IPC_PPU_SetMirror(int sChn, unsigned char uMirror); -int IPC_PPU_SetFlip(int sChn, unsigned char uFlip); +//=====================================isp api============================================= +int IPC_ISP_SetSnsBus(int nViPipe, IPC_SNS_TYPE enSnsType, char s8SnsDev); +int IPC_ISP_SnsRegisterCallback(int nViPipe, IPC_SNS_TYPE enSnsType); +int IPC_ISP_SnsUnRegisterCallback(int nViPipe); +int IPC_ISP_AelibCallback(int nViPipe); +int IPC_ISP_AelibUnCallback(int nViPipe); +int IPC_ISP_AwblibCallback(int nViPipe); +int IPC_ISP_AwblibUnCallback(int nViPipe); +int IPC_ISP_AlglibCallback(int nViPipe); +int IPC_ISP_AlglibUnCallback(int nViPipe); + int IPC_ISP_SetCSCAttr(int sChn, IPC_IMAGE_CONFIG *pstImageCfg); -int IPC_ISP_SetWBAttr(int sChn, IPC_IMAGE_CONFIG *pstImageCfg); -int IPC_ISP_SetWDRExpAttr(int sChn, IPC_IMAGE_CONFIG *pstImageCfg); -int IPC_ISP_SetExpAttr(int sChn, IPC_IMAGE_CONFIG *pstImageCfg); int IPC_ISP_SetHLCAttr(int sChn, IPC_IMAGE_CONFIG *pstImageCfg); +int IPC_ISP_SetExpAttr(int sChn, IPC_IMAGE_CONFIG *pstImageCfg); +int IPC_ISP_SetWBAttr(int sChn, IPC_IMAGE_CONFIG *pstImageCfg); +int IPC_ISP_SetMirror(int sChn, unsigned char uMirror); +int IPC_ISP_SetFlip(int sChn, unsigned char uFlip); + +//=====================================ppu api============================================= +int IPC_PPU_GetChnStatus(int sViId, int sPpuId); +int IPC_PPU_GetChn(int sViId, int sPpuId); -int IPC_VI_GetViPipe(int sViId, int sPipeId); +//=====================================vi api============================================= +int IPC_VI_GetViNum(); +int IPC_VI_GetViChn(int sViId); +int IPC_VI_GetViPipe(int sViId); unsigned int IPC_VI_GetInputFps(int sViId); -int IPC_VI_GetWdrEnable(int sViId); +int IPC_VI_SetInputFps(int sViId, unsigned int uFps); +int IPC_VI_GetWdr(int sViId); +int IPC_VI_SetWdr(int sViId, int sWDR); +//=====================================ircut api============================================= int IPC_IRCUT_SetCfg(int sChn, IPC_IMAGE_CONFIG *pstImageCfg); -//=======================================api================================================= + +//=======================================base api================================================= int IPC_SYS_Init(IPC_VIDEO_CONFIG *pstVideoConfig, int sIsEncode); void IPC_SYS_UnInit(); @@ -104,14 +125,24 @@ void IPC_VI_Stop(); int IPC_VI_Init(IPC_VIDEO_CONFIG *pstVideoConfig); void IPC_VI_UnInit(); -unsigned int IPC_PPU_CalcFrameSize(int sViId, int sIspId); -int IPC_PPU_GetFrame(int sViId, int sIspId, void* pdata, unsigned int u32size, +int IPC_ISP_RestartSns(int nViPipe, IPC_SNS_TYPE enSnsType); +int IPC_ISP_StandbySns(int nViPipe, IPC_SNS_TYPE enSnsType); +unsigned int IPC_ISP_CalcFrameSize(int sViId, int sPpuId); +int IPC_ISP_ChnStart(); +void IPC_ISP_ChnStop(); +int IPC_ISP_ChnInit(IPC_VIDEO_CONFIG *pstVideoCfg); +void IPC_ISP_ChnUnInit(); + +int IPC_PPU_GetFrame(int sViId, int sPpuId, void* pdata, unsigned int u32size, unsigned int *u32len, unsigned long long *u64pts); int IPC_PPU_Start(); void IPC_PPU_Stop(); int IPC_PPU_Init(IPC_VIDEO_CONFIG *pstVideoCfg); void IPC_PPU_UnInit(); +int IPC_IRCUT_Init(IPC_VIDEO_CONFIG *pstVideoCfg); +void IPC_IRCUT_UnInit(); + void IPC_VFRAME_Init(IPC_VIDEO_FRAME *pvframe); int IPC_VFRAME_Alloc(IPC_VIDEO_FRAME *pvframe, unsigned int nsize); void IPC_VFRAME_Relase(IPC_VIDEO_FRAME *pvframe); @@ -121,11 +152,6 @@ void IPC_VENC_Stop(); int IPC_VENC_Init(IPC_VIDEO_CONFIG *pstVideoCfg, IPC_MEDIA_BUFFER *pmbuffer[]); void IPC_VENC_UnInit(); -int IPC_IRCUT_Start(int sChn); -void IPC_IRCUT_Stop(int sChn); -int IPC_IRCUT_Init(IPC_VIDEO_CONFIG *pstVideoCfg); -void IPC_IRCUT_UnInit(); - #ifdef __cplusplus #if __cplusplus } diff --git a/3rdparty/C302/lib/dynamic/libAudioSignalProcess.so b/3rdparty/C302/lib/dynamic/libAudioSignalProcess.so new file mode 100644 index 0000000..350c6f7 Binary files /dev/null and b/3rdparty/C302/lib/dynamic/libAudioSignalProcess.so differ diff --git a/3rdparty/C302/lib/dynamic/libasp.so b/3rdparty/C302/lib/dynamic/libasp.so new file mode 100644 index 0000000..b811201 Binary files /dev/null and b/3rdparty/C302/lib/dynamic/libasp.so differ diff --git a/3rdparty/C302/lib/dynamic/libaudio.so b/3rdparty/C302/lib/dynamic/libaudio.so index b062f19..53d7fdd 100755 Binary files a/3rdparty/C302/lib/dynamic/libaudio.so and b/3rdparty/C302/lib/dynamic/libaudio.so differ diff --git a/3rdparty/C302/lib/dynamic/libmbuffer.so b/3rdparty/C302/lib/dynamic/libmbuffer.so index e9b7717..2d65593 100755 Binary files a/3rdparty/C302/lib/dynamic/libmbuffer.so and b/3rdparty/C302/lib/dynamic/libmbuffer.so differ diff --git a/3rdparty/C302/lib/dynamic/libparam.so b/3rdparty/C302/lib/dynamic/libparam.so index a166073..2790609 100755 Binary files a/3rdparty/C302/lib/dynamic/libparam.so and b/3rdparty/C302/lib/dynamic/libparam.so differ diff --git a/3rdparty/C302/lib/dynamic/libvideo.so b/3rdparty/C302/lib/dynamic/libvideo.so index c2a9a90..3fab9e4 100755 Binary files a/3rdparty/C302/lib/dynamic/libvideo.so and b/3rdparty/C302/lib/dynamic/libvideo.so differ diff --git a/3rdparty/C302/lib/static/libaudio.a b/3rdparty/C302/lib/static/libaudio.a index dbeb0af..9cc1b2c 100644 Binary files a/3rdparty/C302/lib/static/libaudio.a and b/3rdparty/C302/lib/static/libaudio.a differ diff --git a/3rdparty/C302/lib/static/libmbuffer.a b/3rdparty/C302/lib/static/libmbuffer.a index 229110b..b2c10d0 100644 Binary files a/3rdparty/C302/lib/static/libmbuffer.a and b/3rdparty/C302/lib/static/libmbuffer.a differ diff --git a/3rdparty/C302/lib/static/libparam.a b/3rdparty/C302/lib/static/libparam.a index f7de182..2597b72 100644 Binary files a/3rdparty/C302/lib/static/libparam.a and b/3rdparty/C302/lib/static/libparam.a differ diff --git a/3rdparty/C302/lib/static/libvideo.a b/3rdparty/C302/lib/static/libvideo.a index 1fea953..acda68e 100644 Binary files a/3rdparty/C302/lib/static/libvideo.a and b/3rdparty/C302/lib/static/libvideo.a differ diff --git a/CMake/C302.cmake b/CMake/C302.cmake index ec08d49..4054c52 100644 --- a/CMake/C302.cmake +++ b/CMake/C302.cmake @@ -17,14 +17,14 @@ if(BOARD STREQUAL "C302") set(BOARD_LIBS_SHARED pthread dl m z fdk-aac - sns_imx307 sns_imx335 sns_gc4653 sns_imx415 - ae alg awb dewarp mbi mbi_dewarp mbi_isp mbi_venc ppu + sns_imx290 sns_imx307 sns_imx335 sns_gc4653 sns_imx415 + ae alg awb dewarp mbi mbi_dewarp mbi_isp mbi_venc ppu asp AudioSignalProcess param video audio mbuffer ) set(BOARD_LIBS_STATIC pthread dl m z fdk-aac - sns_imx307 sns_imx335 sns_gc4653 sns_imx415 - ae alg awb dewarp mbi mbi_dewarp mbi_isp mbi_venc ppu + sns_imx290 sns_imx307 sns_imx335 sns_gc4653 sns_imx415 + ae alg awb dewarp mbi mbi_dewarp mbi_isp mbi_venc ppu asp AudioSignalProcess libparam.a libvideo.a libaudio.a libmbuffer.a ) endif() diff --git a/source/C302/C302AudioCapturer.c b/source/C302/C302AudioCapturer.c index 46e286d..ca9d60e 100644 --- a/source/C302/C302AudioCapturer.c +++ b/source/C302/C302AudioCapturer.c @@ -32,7 +32,7 @@ typedef struct { AudioChannel channel; AudioBitDepth bitDepth; AudioSampleRate sampleRate; - IPC_AUDIO_FRAME aframe; + IPC_AUDIO_FRAME* aframe; } C302AudioCapturer; static int setStatus(AudioCapturerHandle handle, const AudioCapturerStatus newStatus) @@ -67,8 +67,8 @@ AudioCapturerHandle audioCapturerCreate(void) setStatus((AudioCapturerHandle) audioHandle, AUD_CAP_STATUS_STREAM_OFF); #ifdef USING_HARD_STREAM_AUDIO - if (IPC_CFG_Init(CFG_AI_FLAG | CFG_AO_FLAG | CFG_VIDEO_FLAG) < 0) { - KVS_LOG("IPC_CFG_Init err\n"); + if (IPC_CFG_Init(CFG_AI_FLAG) < 0) { + KVS_LOG("IPC_CFG_Init AI err\n"); return NULL; } #endif @@ -171,13 +171,13 @@ int audioCapturerSetFormat(AudioCapturerHandle handle, const AudioFormat format, int ret = IPC_AUDIO_SetConfig(CFG_AI_FLAG, enc_type, channels, sample_rate, bit_width, DEFAULT_VOLUME); if (ret < 0) { KVS_LOG("IPC_AUDIO_SetConfig AI failed: %d\n", ret); - IPC_CFG_UnInit(CFG_AI_FLAG | CFG_AO_FLAG | CFG_VIDEO_FLAG); + IPC_CFG_UnInit(CFG_AI_FLAG); return -EAGAIN; } ret = IPC_AUDIO_Init(CFG_AI_FLAG); if (ret < 0) { KVS_LOG("IPC_AUDIO_Init AI failed: %d\n", ret); - IPC_CFG_UnInit(CFG_AI_FLAG | CFG_AO_FLAG | CFG_VIDEO_FLAG); + IPC_CFG_UnInit(CFG_AI_FLAG); return -EAGAIN; } #endif @@ -214,10 +214,17 @@ int audioCapturerAcquireStream(AudioCapturerHandle handle) if (ret < 0) { KVS_LOG("AI device enable failed"); IPC_AUDIO_UnInit(CFG_AI_FLAG); - IPC_CFG_UnInit(CFG_AI_FLAG | CFG_AO_FLAG | CFG_VIDEO_FLAG); + IPC_CFG_UnInit(CFG_AI_FLAG); return -EAGAIN; } - IPC_AFRAME_Init(&audioHandle->aframe); + audioHandle->aframe = (IPC_AUDIO_FRAME*) malloc(sizeof(IPC_AUDIO_FRAME)); + if (!audioHandle->aframe) { + KVS_LOG("AI device alloc aframe failed"); + IPC_AUDIO_UnInit(CFG_AI_FLAG); + IPC_CFG_UnInit(CFG_AI_FLAG); + return -EAGAIN; + } + IPC_AFRAME_Init(audioHandle->aframe); #endif return setStatus(audioHandle, AUD_CAP_STATUS_STREAM_ON); @@ -238,14 +245,14 @@ int audioCapturerGetFrame(AudioCapturerHandle handle, void* pFrameDataBuffer, co #ifdef USING_HARD_STREAM_AUDIO int ret = 0; - ret = IPC_AUDIO_GetFrame(&audioHandle->aframe); + ret = IPC_AUDIO_GetFrame(audioHandle->aframe); if (ret <= 0) { // KVS_LOG("IPC_AUDIO_GetFrame failed"); return -EAGAIN; } - memcpy(pFrameDataBuffer, (void*) audioHandle->aframe.u8data, audioHandle->aframe.u32len); - *pFrameSize = audioHandle->aframe.u32len; - *pTimestamp = audioHandle->aframe.u64pts; + memcpy(pFrameDataBuffer, (void*) audioHandle->aframe->u8data, audioHandle->aframe->u32len); + *pFrameSize = audioHandle->aframe->u32len; + *pTimestamp = audioHandle->aframe->u64pts; #endif return 0; } @@ -256,7 +263,11 @@ int audioCapturerReleaseStream(AudioCapturerHandle handle) C302_HANDLE_GET(handle); #ifdef USING_HARD_STREAM_AUDIO - IPC_AFRAME_Release(&audioHandle->aframe); + if (audioHandle->aframe) { + IPC_AFRAME_Release(audioHandle->aframe); + free(audioHandle->aframe); + audioHandle->aframe = NULL; + } IPC_AUDIO_Disable(CFG_AI_FLAG); #endif @@ -271,12 +282,16 @@ void audioCapturerDestory(AudioCapturerHandle handle) C302_HANDLE_GET(handle); #ifdef USING_HARD_STREAM_AUDIO - IPC_AFRAME_Release(&audioHandle->aframe); + if (audioHandle->aframe) { + IPC_AFRAME_Release(audioHandle->aframe); + free(audioHandle->aframe); + audioHandle->aframe = NULL; + } if (audioHandle->status == AUD_CAP_STATUS_STREAM_ON) { IPC_AUDIO_Disable(CFG_AI_FLAG); } IPC_AUDIO_UnInit(CFG_AI_FLAG); - IPC_CFG_UnInit(CFG_AI_FLAG | CFG_AO_FLAG | CFG_VIDEO_FLAG); + IPC_CFG_UnInit(CFG_AI_FLAG); #endif setStatus(audioHandle, AUD_CAP_STATUS_NOT_READY); diff --git a/source/C302/C302AudioPlayer.c b/source/C302/C302AudioPlayer.c index 2333313..96d7333 100644 --- a/source/C302/C302AudioPlayer.c +++ b/source/C302/C302AudioPlayer.c @@ -67,7 +67,7 @@ AudioPlayerHandle audioPlayerCreate(void) setStatus((AudioPlayerHandle) audioHandle, AUD_PLY_STATUS_STREAM_OFF); #ifdef USING_HARD_STREAM_AUDIO - if (IPC_CFG_Init(CFG_AI_FLAG | CFG_AO_FLAG | CFG_VIDEO_FLAG) < 0) { + if (IPC_CFG_Init(CFG_AO_FLAG) < 0) { KVS_LOG("IPC_CFG_Init AO err\n"); return NULL; } @@ -167,13 +167,13 @@ int audioPlayerSetFormat(AudioPlayerHandle handle, const AudioFormat format, con int ret = IPC_AUDIO_SetConfig(CFG_AO_FLAG, enc_type, channels, sample_rate, bit_width, DEFAULT_VOLUME); if (ret < 0) { KVS_LOG("IPC_AUDIO_SetConfig AO failed: %d\n", ret); - IPC_CFG_UnInit(CFG_AI_FLAG | CFG_AO_FLAG | CFG_VIDEO_FLAG); + IPC_CFG_UnInit(CFG_AO_FLAG); return -EAGAIN; } ret = IPC_AUDIO_Init(CFG_AO_FLAG); if (ret < 0) { KVS_LOG("IPC_AUDIO_Init AO failed: %d\n", ret); - IPC_CFG_UnInit(CFG_AI_FLAG | CFG_AO_FLAG | CFG_VIDEO_FLAG); + IPC_CFG_UnInit(CFG_AO_FLAG); return -EAGAIN; } #endif @@ -220,7 +220,7 @@ int audioPlayerAcquireStream(AudioPlayerHandle handle) KVS_LOG("AO device alloc failed"); IPC_AUDIO_Disable(CFG_AO_FLAG); IPC_AUDIO_UnInit(CFG_AO_FLAG); - IPC_CFG_UnInit(CFG_AI_FLAG | CFG_AO_FLAG | CFG_VIDEO_FLAG); + IPC_CFG_UnInit(CFG_AO_FLAG); return -EAGAIN; } #endif @@ -277,7 +277,7 @@ void audioPlayerDestory(AudioPlayerHandle handle) IPC_AUDIO_Disable(CFG_AO_FLAG); } IPC_AUDIO_UnInit(CFG_AO_FLAG); - IPC_CFG_UnInit(CFG_AI_FLAG | CFG_AO_FLAG | CFG_VIDEO_FLAG); + IPC_CFG_UnInit(CFG_AO_FLAG); #endif setStatus(audioHandle, AUD_PLY_STATUS_NOT_READY); diff --git a/source/C302/C302VideoCapturer.c b/source/C302/C302VideoCapturer.c index 8fbce43..821aa48 100644 --- a/source/C302/C302VideoCapturer.c +++ b/source/C302/C302VideoCapturer.c @@ -101,7 +101,7 @@ VideoCapturerHandle videoCapturerCreate(void) memset(videoHandle, 0, sizeof(C302VideoCapturer)); #ifdef USING_HARD_STREAM_VIDEO - if (IPC_CFG_Init(CFG_AI_FLAG | CFG_AO_FLAG | CFG_VIDEO_FLAG) < 0) { + if (IPC_CFG_Init(CFG_VIDEO_FLAG) < 0) { KVS_LOG("IPC_CFG_Init video failed\n"); free(videoHandle); return NULL; @@ -178,12 +178,12 @@ int videoCapturerSetFormat(VideoCapturerHandle handle, const VideoFormat format, int ret = IPC_VIDEO_SetStreamConfig(DEFAULT_STREAM_CHN, FORMAT_NONE, &vresolution, vcodec, DEFAULT_STREAM_FPS, DEFAULT_STREAM_PRO); if (ret < 0) { - IPC_CFG_UnInit(CFG_AI_FLAG | CFG_AO_FLAG | CFG_VIDEO_FLAG); + IPC_CFG_UnInit(CFG_VIDEO_FLAG); return -EAGAIN; } ret = IPC_VIDEO_Init(); if (ret < 0) { - IPC_CFG_UnInit(CFG_AI_FLAG | CFG_AO_FLAG | CFG_VIDEO_FLAG); + IPC_CFG_UnInit(CFG_VIDEO_FLAG); return -EAGAIN; } #endif @@ -232,6 +232,7 @@ int videoCapturerGetFrame(VideoCapturerHandle handle, void* pFrameDataBuffer, co if (videoHandle->format == VID_FMT_H264) { ret = IPC_VIDEO_GetFrame(&videoHandle->vframe, DEFAULT_STREAM_CHN, 0); if (ret > 0) { + // KVS_LOG("IPC_VIDEO_GetFrame:%u\n", videoHandle->vframe.u32len); memcpy(pFrameDataBuffer, videoHandle->vframe.u8data, videoHandle->vframe.u32len); *pFrameSize = videoHandle->vframe.u32len; *pTimestamp = videoHandle->vframe.u64pts; @@ -269,7 +270,7 @@ void videoCapturerDestory(VideoCapturerHandle handle) videoCapturerReleaseStream(videoHandle); } IPC_VIDEO_UnInit(); - IPC_CFG_UnInit(CFG_AI_FLAG | CFG_AO_FLAG | CFG_VIDEO_FLAG); + IPC_CFG_UnInit(CFG_VIDEO_FLAG); #endif setStatus(videoHandle, VID_CAP_STATUS_NOT_READY);