invalid cast from 'GstVideoTestSrc' to 'GstBin'

videotestsrc is just an element, not a bin container, so we must use round brackets to embrace the elements all, which means rtsp://127.0.0.1:8554/test is the default mount point.

1
2
test-launch.exe "( videotestsrc ! qsvh264enc ! rtph264pay name=pay0 pt=96 )"
gst-launch-1.0.exe playbin uri=rtsp://127.0.0.1:8554/test --gst-debug=d3d11window:5

Build GStreamer in Windows

1
2
3
4
5
6
7
8
9
10
11
12
python -m pip install meson
python -m pip install ninja
 
git clone https://gitlab.freedesktop.org/gstreamer/gstreamer.git
cd gstreamer
 
rd /S /Q build
meson --buildtype=release -Dprefix=%CD%/installed -Dlibav=enabled -Dgst-plugins-ugly:x264=enabled -Dgst-plugins-bad:nvcodec=enabled build
 
meson compile -C build
 
meson install -C build

refer to:
https://gstreamer.freedesktop.org/documentation/installing/building-from-source-using-meson.html
http://dljz.nicethemes.cn/news/show-62582.html
https://blog.csdn.net/yuwg_le/article/details/126147636