Skip to content
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

Merged
merged 2 commits into from
Dec 11, 2023

Conversation

nianshao163
Copy link

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@nianshao163 nianshao163 force-pushed the C610_player branch 19 times, most recently from ca3f26b to 96e88e1 Compare December 6, 2023 09:26
@nianshao163 nianshao163 force-pushed the C610_player branch 2 times, most recently from a0a140d to 95d3189 Compare December 8, 2023 07:21
strategy:
matrix:
container:
["482862934379.dkr.ecr.us-east-1.amazonaws.com/qualcomm:latest"]
Copy link
Member

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?

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?

Yes, we have already uploaded it.

@@ -0,0 +1,32 @@
/*
* Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove 2023 -> Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.


// 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"
Copy link
Member

Choose a reason for hiding this comment

The 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 tcpserversink and tcpclientsrc in the middle?

Choose a reason for hiding this comment

The 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.
Maybe rtspsrc, v4l2src ...

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.
Maybe rtspsrc, v4l2src ...

gchar* debug_info;

if ((bus == NULL) || (msg == NULL)) {
goto CleanUp;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unlike KVS WebRTC SDK, we'd like to avoid use goto in new code.

* @param[in] msg the msg of the callback.
* @param[in] udata the user data.
*
* @return STATUS code of the execution. STATUS_SUCCESS on success
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no status code returned in this function as well

pipeline = g_pipeline[AUDIO_PLAYER_PIPELINE];
break;
default:
break;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider return error code if there is an unknown type

return;
}

static int initGstAppSinkSrc(GSTAppSinkSrc *handle, GSTAppModuleType type)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mark GSTAppModuleType as const, same for other functions in this file

Please configure the Qualcomm build environment first.
Replacing CMake configuration file.
```
export OE_CMAKE_TOOLCHAIN_FILE=3rdparty/QCS610/OEToolchainConfig.cmake
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's a yocto based build system, should it be better if user have a recipe for this project?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's a yocto based build system, should it be better if user have a recipe for this project?

It is not compiled on Yocto, only cross-compiled on Ubuntu. So there is no Yocto recipe file written for it.


Gstreamer capturer receive and retrieve audio and video from the device through the Gstreamer pipeline. It require user to manually install Gstreamer library. You may install it via:
```
sudo apt-get install -y libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider using apt instead of apt-get

CMakeLists.txt Outdated
@@ -8,6 +8,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

option(USE_MUCLIBC "Use muclibc" OFF)
set(SRCBOARD ${BOARD})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using BOARD_SRC_PREFIX instead of SRCBOARD

@codingspirit codingspirit changed the base branch from main to c610_dev December 11, 2023 00:38
@codingspirit codingspirit changed the base branch from c610_dev to develop December 11, 2023 00:38
@codingspirit codingspirit merged commit af4e55e into aws-samples:develop Dec 11, 2023
9 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants