-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support C610,Gstreamer and audio Player by GStreamer
- Loading branch information
Showing
15 changed files
with
1,271 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright 2023 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 | ||
|
||
// camera0: | ||
// gst-launch-1.0 -e qtiqmmfsrc name=camsrc ! video/x-raw\(memory:GBM\),format=NV12,width=1920,height=1080,framerate=25/1 ! queue ! omxh264enc control-rate=max-bitrate target-bitrate=6000000 interval-intraframes=24 periodicity-idr=1 ! queue ! h264parse config-interval=1 ! mpegtsmux name=muxer ! tee name=t ! queue ! tcpserversink host=127.0.0.1 port=8501 t. ! queue ! tcpserversink host=127.0.0.1 port=8901 | ||
// "tcpclientsrc host=127.0.0.1 port=8501 ! tsdemux name=muxer ! h264parse ! appsink name=sink" | ||
// camera1: | ||
// gst-launch-1.0 -e qtiqmmfsrc name=camsrc camera=1 ! video/x-raw\(memory:GBM\),format=NV12,width=1920,height=1080,framerate=25/1 ! queue ! omxh264enc control-rate=max-bitrate target-bitrate=6000000 interval-intraframes=24 periodicity-idr=1 ! queue ! h264parse config-interval=1 ! mpegtsmux name=muxer ! tee name=t ! queue ! tcpserversink host=127.0.0.1 port=8502 t. ! queue ! tcpserversink host=127.0.0.1 port=8902 | ||
// "tcpclientsrc host=127.0.0.1 port=8502 ! tsdemux name=muxer ! h264parse ! appsink name=sink" | ||
#define GST_LAUNCH_VIDEO_PIPELINE_CMD \ | ||
"tcpclientsrc host=%s port=%s ! tsdemux name=muxer ! h264parse ! appsink name=%s" | ||
|
||
// audio: | ||
// gst-launch-1.0 pulsesrc volume=100 ! capsfilter caps=audio/x-raw,format=S16LE,rate=8000,channels=2 ! audioconvert ! capsfilter caps=audio/x-raw,format=S16LE,rate=8000,channels=1 ! alawenc ! tee name=t ! queue ! tcpserversink host=127.0.0.1 port=8503 t. ! queue ! tcpserversink host=127.0.0.1 port=8903 | ||
// "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 ! queue ! pulsesink volume=1" | ||
#define GST_LAUNCH_AUDIO_PLAYER_PIPELINE_CMD \ | ||
"appsrc name=%s ! capsfilter caps=audio/x-alaw,rate=8000,channels=1 ! alawdec ! queue ! pulsesink volume=1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
set( CMAKE_SYSTEM_NAME Linux ) | ||
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} $ENV{CFLAGS}" CACHE STRING "" FORCE ) | ||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} $ENV{CXXFLAGS}" CACHE STRING "" FORCE ) | ||
set( CMAKE_ASM_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "" FORCE ) | ||
set( CMAKE_SYSROOT $ENV{OECORE_TARGET_SYSROOT} ) | ||
|
||
set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} ) | ||
set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER ) | ||
set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH ) | ||
set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH ) | ||
set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH ) | ||
|
||
set(CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX "$ENV{OE_CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX}") | ||
|
||
# Set CMAKE_SYSTEM_PROCESSOR from the sysroot name (assuming processor-distro-os). | ||
if ($ENV{SDKTARGETSYSROOT} MATCHES "/sysroots/([a-zA-Z0-9_-]+)-.+-.+") | ||
set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_MATCH_1}) | ||
endif() | ||
|
||
# Include the toolchain configuration subscripts | ||
file( GLOB toolchain_config_files "${CMAKE_TOOLCHAIN_FILE}.d/*.cmake" ) | ||
foreach(config ${toolchain_config_files}) | ||
include(${config}) | ||
endforeach() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright 2023 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" | ||
#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" |
Oops, something went wrong.