@@ -124,11 +124,11 @@ jobs:
124124 run : |
125125 # Equivalent to set -x
126126 Set-PSDebug -Trace 1
127-
127+
128128 $env:Path += ';C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Strawberry\c\bin;C:\Program Files\NASM;D:\producer\open-source\local\lib;D:\producer\open-source\local\bin;D:\gstreamer\1.0\msvc_x86_64\bin'
129-
129+
130130 mkdir D:\producer\debug_output
131-
131+
132132 Invoke-WebRequest -Uri https://awsj-iot-handson.s3-ap-northeast-1.amazonaws.com/kvs-workshop/sample.mp4 -OutFile sample.mp4
133133 dir
134134 $exePath = Join-Path $PWD ${{ matrix.sample.name }}.exe
@@ -139,14 +139,14 @@ jobs:
139139 working-directory : ./build/debug_output
140140 run : |
141141 shopt -s nullglob # Ensure globbing works correctly and avoids errors when no files are found
142-
142+
143143 ls -tlrh
144144 mkvfiles=(*.mkv)
145145 if [ ${#mkvfiles[@]} -eq 0 ]; then
146146 echo "No MKV files found in debug_output"
147147 exit 1
148148 fi
149-
149+
150150 for file in "${mkvfiles[@]}"; do
151151 echo "Verifying $file with mkvinfo (verbose and hexdump):"
152152 mkvinfo -v -X "$file"
@@ -171,15 +171,16 @@ jobs:
171171 }
172172
173173 multistream-sample :
174- name : Multistream sample on Mac
175- runs-on : macos-13
174+ name : Multistream sample on Ubuntu 22.04
175+ runs-on : ubuntu-22.04
176176 timeout-minutes : 30
177177
178178 env :
179179 AWS_KVS_LOG_LEVEL : 2
180180 KVS_DEBUG_DUMP_DATA_FILE_DIR : ${{ github.workspace }}/build/debug_output
181181 GST_PLUGIN_PATH : ${{ github.workspace }}/build
182182 DEBIAN_FRONTEND : noninteractive
183+ KVS_STREAM_NAME_BASE : demo-stream-producer-cpp-ubuntu-22.04-ci-kvs_gstreamer_multistream_sample
183184
184185 permissions :
185186 id-token : write
@@ -191,14 +192,26 @@ jobs:
191192
192193 - name : Install dependencies
193194 run : |
194- brew install gstreamer log4cplus mkvtoolnix coreutils
195- brew install --cask docker
195+ sudo apt-get update
196+ sudo apt-get install -y git cmake build-essential pkg-config libssl-dev libcurl4-openssl-dev \
197+ liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
198+ gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good \
199+ gstreamer1.0-plugins-ugly gstreamer1.0-tools curl mkvtoolnix libgstrtspserver-1.0
200+
201+ - name : Build GST RTSP Server Test Launch Sample
202+ run : |
203+ git clone https://gitlab.freedesktop.org/gstreamer/gstreamer.git --single-branch -b 1.22
204+ cd gstreamer/subprojects/gst-rtsp-server/examples
205+ gcc -o test-launch test-launch.c `pkg-config --cflags --libs gstreamer-rtsp-server-1.0`
206+ mv test-launch ${{ github.workspace }}
207+ cd ${{ github.workspace }}
208+ rm -rf gstreamer
196209
197210 - name : Build samples
198211 run : |
199212 mkdir build && cd build
200213 mkdir -p $KVS_DEBUG_DUMP_DATA_FILE_DIR
201- cmake .. -DBUILD_GSTREAMER_PLUGIN=ON -DBUILD_DEPENDENCIES=OFF
214+ cmake .. -DBUILD_GSTREAMER_PLUGIN=ON -DBUILD_DEPENDENCIES=OFF -DALIGNED_MEMORY_MODEL=ON
202215 make -j$(nproc)
203216
204217 - name : Configure AWS Credentials
@@ -214,32 +227,32 @@ jobs:
214227 run : |
215228 set -x
216229
217- open -a /Applications/Docker.app --args --unattended --accept-license
218- echo "We are waiting for Docker to be up and running. It can take over 2 minutes..."
219- while ! /Applications/Docker.app/Contents/Resources/bin/docker info &>/dev/null; do sleep 1; done
220-
221- sudo ln -s ~/.docker/run/docker.sock /var/run/docker.sock
222-
223- docker run -d --rm -it -e RTSP_PROTOCOLS=tcp -p 8554:8554 bluenviron/mediamtx:latest
224- docker run -d --rm -it -e RTSP_PROTOCOLS=tcp -p 8555:8554 bluenviron/mediamtx:latest
225-
226- (
227- ffmpeg -re -f lavfi -i "testsrc=size=640x480:rate=10" -vcodec libx264 -x264-params keyint=25 -f rtsp rtsp://localhost:8554/mystream
228- ) &
229- (
230- ffmpeg -re -f lavfi -i "testsrc=size=640x480:rate=10" -vcodec libx264 -x264-params keyint=25 -f rtsp rtsp://localhost:8555/mystream
231- ) &
230+ ./test-launch -p 8554 "videotestsrc is-live=true \
231+ ! textoverlay text="rtsp://127.0.0.1:8554/test" \
232+ ! video/x=raw,height=480,width=640,framerate=10/1 \
233+ ! x264enc tune-zerolatency bitrate=512 key-int-max=25 \
234+ ! h264parse \
235+ ! rtph264pay \
236+ ! name=pay0 pt=96" &
237+
238+ ./test-launch -p 8555 "videotestsrc is-live=true \
239+ ! textoverlay text="rtsp://127.0.0.1:8555/test" \
240+ ! video/x=raw,height=480,width=640,framerate=10/1 \
241+ ! x264enc tune=zerolatency bitrate=512 key-int-max=25 \
242+ ! h264parse \
243+ ! rtph264pay \
244+ ! name=pay0 pt=96" &
232245
233- echo "rtsp://0 .0.0.0 :8554/mystream " > rtsp-urls.txt
234- echo "rtsp://0 .0.0.0 :8555/mystream " >> rtsp-urls.txt
246+ echo "rtsp://127 .0.0.1 :8554/test " > rtsp-urls.txt
247+ echo "rtsp://127 .0.0.1 :8555/test " >> rtsp-urls.txt
235248
236249 sleep 10
237- gst-discoverer-1.0 rtsp://0 .0.0.0 :8554/mystream
238- gst-discoverer-1.0 rtsp://0 .0.0.0 :8555/mystream
250+ gst-discoverer-1.0 " rtsp://127 .0.0.1 :8554/test
251+ gst-discoverer-1.0 " rtsp://127 .0.0.1 :8555/test"
239252
240253 set +e # Disable exit on error for the timeout command
241- gtimeout --preserve-status --signal=SIGINT --kill-after=15s 30s \
242- ./kvs_gstreamer_multistream_sample demo-stream-producer-cpp-macos-13-ci-kvs_gstreamer_multistream_sample rtsp-urls.txt
254+ timeout --preserve-status --signal=SIGINT --kill-after=15s 30s \
255+ ./kvs_gstreamer_multistream_sample $KVS_STREAM_NAME rtsp-urls.txt
243256 EXIT_CODE=$?
244257 set -e # Re-enable exit on error
245258
@@ -265,21 +278,22 @@ jobs:
265278 exit 1
266279 fi
267280
281+ # Since there are 2 streams, check for the presence of two different prefixed MKV files
268282 found_0=0
269283 found_1=0
270284
271285 for file in "${mkvfiles[@]}"; do
272- if [[ "$file" == demo-stream-producer-cpp-macos-13-ci-kvs_gstreamer_multistream_sample_0 * ]]; then
286+ if [[ "$file" == `$KVS_STREAM_NAME`_0 * ]]; then
273287 found_0=1
274- elif [[ "$file" == demo-stream-producer-cpp-macos-13-ci-kvs_gstreamer_multistream_sample_1 * ]]; then
288+ elif [[ "$file" ==` $KVS_STREAM_NAME`_1 * ]]; then
275289 found_1=1
276290 fi
277291 done
278292
279293 if [ $found_0 -eq 0 ] || [ $found_1 -eq 0 ]; then
280294 echo "Expected at least one file starting with each prefix:"
281- echo " - demo-stream-producer-cpp-macos-13-ci-kvs_gstreamer_multistream_sample_0 "
282- echo " - demo-stream-producer-cpp-macos-13-ci-kvs_gstreamer_multistream_sample_1 "
295+ echo " - `$KVS_STREAM_NAME`_0 "
296+ echo " - `$KVS_STREAM_NAME`_1 "
283297 exit 1
284298 fi
285299
0 commit comments