-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support C610 and audio Player by GStreamer #116
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: gstreamer | ||
|
||
on: [push, pull_request, workflow_dispatch] | ||
|
||
env: | ||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | ||
BUILD_TYPE: Release | ||
BOARD: GSTREAMER | ||
CC: gcc-10 | ||
CXX: g++-10 | ||
|
||
jobs: | ||
x64-gstreamer: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Install libgstreamer | ||
run: sudo apt install libunwind-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-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: Build | ||
run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --parallel 4 | ||
|
||
- name: Test | ||
run: ctest -C ${{ env.BUILD_TYPE }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: qualcomm-qcs610 | ||
|
||
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: QCS610 | ||
|
||
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.docker_username }} --repo ${{ github.repository }} | ||
gh secret set --env ECR ECR_PASSWORD --body ${{ steps.login-ecr.outputs.docker_password }} --repo ${{ github.repository }} | ||
|
||
qualcomm: | ||
environment: ECR | ||
needs: ecr-prepare | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
container: | ||
["482862934379.dkr.ecr.us-east-1.amazonaws.com/qualcomm:latest"] | ||
container: | ||
image: ${{ matrix.container }} | ||
credentials: | ||
username: ${{ secrets.ECR_USERNAME }} | ||
password: ${{ secrets.ECR_PASSWORD }} | ||
|
||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Configure CMake | ||
run: | | ||
. /usr/local/fullstack-virtualization-debug-x86_64/environment-setup-aarch64-oe-linux | ||
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: | | ||
. /usr/local/fullstack-virtualization-debug-x86_64/environment-setup-aarch64-oe-linux | ||
cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --parallel 4 | ||
|
||
- name: Test | ||
run: | | ||
. /usr/local/fullstack-virtualization-debug-x86_64/environment-setup-aarch64-oe-linux | ||
ctest -C ${{ env.BUILD_TYPE }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). | ||
* You may not use this file except in compliance with the License. | ||
* A copy of the License is located at | ||
* | ||
* http://aws.amazon.com/apache2.0 | ||
* | ||
* or in the "license" file accompanying this file. This file is distributed | ||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
*/ | ||
#pragma once | ||
|
||
// video: | ||
// gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.60:554/stream0 latency=500 ! rtph264depay ! queue ! h264parse config-interval=1 ! mpegtsmux name=muxer ! tcpserversink host=127.0.0.1 port=8501 & | ||
// "tcpclientsrc host=127.0.0.1 port=8502 ! tsdemux name=muxer ! h264parse ! appsink name=sink" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. May I know why can't we stream rtsp directly to appsink, but with a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This way, no matter what source you use, as long as you send it to TCP 127.0.0.1, the webrtc program can receive it without changing the logic. |
||
#define GST_LAUNCH_VIDEO_PIPELINE_CMD \ | ||
"tcpclientsrc host=%s port=%s ! tsdemux name=muxer ! h264parse ! appsink name=%s" | ||
|
||
// audio: | ||
// gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.60:554/stream0 latency=500 ! rtppcmadepay ! queue ! tcpserversink host=127.0.0.1 port=8503 & | ||
// "tcpclientsrc host=127.0.0.1 port=8503 ! appsink name=sink" | ||
#define GST_LAUNCH_AUDIO_PIPELINE_CMD \ | ||
"tcpclientsrc host=%s port=%s ! appsink name=%s" | ||
|
||
// audio player: | ||
// "appsrc name=alawsrc ! capsfilter caps=audio/x-alaw,rate=8000,channels=1 ! alawdec ! autoaudiosink" | ||
#define GST_LAUNCH_AUDIO_PLAYER_PIPELINE_CMD \ | ||
"appsrc name=%s ! capsfilter caps=audio/x-alaw,rate=8000,channels=1 ! alawdec ! autoaudiosink" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have we uploaded this docker image to ECR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we have already uploaded it.