Skip to content

Commit

Permalink
Add support for AK3918 (#76) (#77)
Browse files Browse the repository at this point in the history
* board: add support for anyka AK3918(#70)

Signed-off-by: [email protected] <[email protected]>
Co-authored-by: jmlxgll <[email protected]>
Co-authored-by: zhangyafei <[email protected]>
  • Loading branch information
3 people authored Sep 29, 2022
1 parent 06a29f6 commit 569f50b
Show file tree
Hide file tree
Showing 9 changed files with 841 additions and 7 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/anyka-ak3918.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: anyka-ak3918

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
branches: [ main ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
BOARD: AK3918

jobs:
ecr-prepare:
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: 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.username }} --repo ${{ github.repository }}
gh secret set --env ECR ECR_PASSWORD --body ${{ steps.login-ecr.outputs.password }} --repo ${{ github.repository }}
anyka:
environment: ECR
needs: ecr-prepare
runs-on: ubuntu-latest
strategy:
matrix:
container: [ "482862934379.dkr.ecr.us-east-1.amazonaws.com/anyka:5.5.0" ]
container:
image: ${{ matrix.container }}
credentials:
username: ${{ secrets.ECR_USERNAME }}
password: ${{ secrets.ECR_PASSWORD }}

steps:
- name: Git checkout
uses: actions/checkout@v2

- 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: Build
run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --parallel 4

- name: Test
run: ctest -C ${{ env.BUILD_TYPE }}
Empty file added 3rdparty/AK3918/.gitkeep
Empty file.
20 changes: 20 additions & 0 deletions 3rdparty/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,23 @@ FH8626V100/
├── include
└── lib
```

#AK3918

User need to put AK3918 board SDK under [3rdparty/AK3918](AK3918/):

```
AK3918/
├── framework
│ ├── include
│ └── lib
├── ipc_main.c
├── lib
│ ├── dynamic
│ └── static
└── platform
├── include
├── include_3rd
├── lib
└── sample
```
35 changes: 35 additions & 0 deletions CMake/AK3918.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
if(BOARD STREQUAL "AK3918")
set(BOARD_SDK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/${BOARD})

set(BOARD_SRCS
${BOARD_SDK_DIR}/ipc_main.c
)

set(BOARD_INCS_DIR
${BOARD_SDK_DIR}/framework/include/
${BOARD_SDK_DIR}/framework/include/common/
${BOARD_SDK_DIR}/framework/include/alarm/
${BOARD_SDK_DIR}/framework/include/record/
${BOARD_SDK_DIR}/platform/include/
)

set(USE_MUCLIBC ON)
set(BOARD_DESTINATION_PLATFORM arm-unknown-linux-uclibc)

link_directories(${BOARD_SDK_DIR}/lib/static ${BOARD_SDK_DIR}/lib/dynamic)

set(BOARD_LIBS_SHARED
pthread rt m
ipc_framework plat_common plat_log mpi_mux mpi_demux akmedia plat_mem
plat_thread plat_osal mpi_venc plat_vi plat_isp_sdk plat_vpss plat_dbg
mpi_adec plat_vqe plat_ao akaudiofilter akaudiocodec ak_mrd plat_ai
mpi_aenc app_osd_ex mpi_osd mpi_svp app_video akv_cnn app_mem_ex iconv
)
set(BOARD_LIBS_STATIC
pthread rt m
ipc_framework plat_common plat_log mpi_mux mpi_demux akmedia plat_mem
plat_thread plat_osal mpi_venc plat_vi plat_isp_sdk plat_vpss plat_dbg
mpi_adec plat_vqe plat_ao akaudiofilter akaudiocodec ak_mrd plat_ai
mpi_aenc app_osd_ex mpi_osd mpi_svp app_video akv_cnn app_mem_ex iconv
)
endif()
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@

## Supported Boards

| Name | Description | CMake Parameter | Status |
| ------------------ | --------------------------------------------------------------------- | -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| FILE | Dummy boards that can capture from [sample frames](resources/frames/) | `-DBOARD=FILE` | [![file](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/file.yml/badge.svg)](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/file.yml) |
| x86/x64 | Capture from V4L2 device or capture from dummy frames | `-DBOARD=V4L2` or `-DBOARD=FILE` | [![v4l2](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/v4l2.yml/badge.svg)](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/v4l2.yml)[![file](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/file.yml/badge.svg)](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/file.yml) |
| Raspberry Pi | Capture from V4L2 device or capture from dummy frames | `-DBOARD=V4L2` or `-DBOARD=FILE` | [![v4l2](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/v4l2.yml/badge.svg)](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/v4l2.yml)[![file](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/file.yml/badge.svg)](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/file.yml) |
| Ingenic T31 | IPC SoC designed by Ingenic | `-DBOARD=T31` | [![ingenic-t31](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/ingenic-t31.yml/badge.svg)](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/ingenic-t31.yml) |
| Fullhan FH8626V100 | IPC SoC designed by Fullhan | `-DBOARD=FH8626V100` | [![fullhan-fh8626v100](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/fullhan-fh8626v100.yml/badge.svg)](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/fullhan-fh8626v100.yml) |
| Name | Description | CMake Parameter | Status |
| ------------------ | --------------------------------------------------------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| FILE | Dummy boards that can capture from [sample frames](resources/frames/) | `-DBOARD=FILE` | [![file](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/file.yml/badge.svg)](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/file.yml) |
| x86/x64 | Capture from V4L2 device or capture from dummy frames | `-DBOARD=V4L2`<br> or `-DBOARD=FILE` | [![v4l2](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/v4l2.yml/badge.svg)](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/v4l2.yml)[![file](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/file.yml/badge.svg)](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/file.yml) |
| Raspberry Pi | Capture from V4L2 device or capture from dummy frames | `-DBOARD=V4L2`<br> or `-DBOARD=FILE` | [![v4l2](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/v4l2.yml/badge.svg)](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/v4l2.yml)[![file](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/file.yml/badge.svg)](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/file.yml) |
| Ingenic T31 | IPC SoC designed by Ingenic | `-DBOARD=T31` | [![ingenic-t31](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/ingenic-t31.yml/badge.svg)](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/ingenic-t31.yml) |
| Fullhan FH8626V100 | IPC SoC designed by Fullhan | `-DBOARD=FH8626V100` | [![fullhan-fh8626v100](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/fullhan-fh8626v100.yml/badge.svg)](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/fullhan-fh8626v100.yml) |
| Anyka AK3918 | IPC SoC designed by Anyka | `-DBOARD=AK3918` | [![anyka-ak3918](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/anyka-ak3918.yml/badge.svg)](https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface/actions/workflows/anyka-ak3918.yml) |


## Getting started with out-of-box KVS WebRTC sample
Expand Down
Loading

0 comments on commit 569f50b

Please sign in to comment.