ArduPilot / ArduPilot/MissionPlanner
Gstreamer detection fails on RaspberryPi OS Buster
- Dominant language
- C#
- Stars
- 2.4k
- Forks
- 2.9k
- Avg merge
- 19h 16m
- Merged PRs (30d)
- 4
Description
#### Issue details
When a gstreamer pipeline is started, MissionPlanner detects the stream; however, it presents a dialog stating that gstreamer is not setup including the options to deploy it (that don't seem to do anything).
The console log reports the following:
~~~~
INFO MissionPlanner.MainV2 - AutoConnect.NewVideoStream udpsrc port=5600 buffer-size=90000 ! application/x-rtp ! decodebin3 ! queue max-size-buffers=1 leaky=2 ! videoconvert ! video/x-raw,format=BGRA ! appsink name=outsink sync=false
INFO MissionPlanner.Utilities.GStreamer - look in dir /usr/lib/x86_64-linux-gnu
INFO MissionPlanner.Utilities.GStreamer - look in dir /usr/lib/arm-linux-gnueabihf
INFO MissionPlanner.Utilities.GStreamer - look in dir /opt/mp
INFO MissionPlanner.Utilities.GStreamer - look in dir /home/pi/Mission Planner/
INFO MissionPlanner.Utilities.GStreamer - look in dir
INFO MissionPlanner.Utilities.GStreamer - look in dir
INFO MissionPlanner.Utilities.GStreamer - look in dir /gstreamer
INFO MissionPlanner.Utilities.GStreamer - look in dir /Program Files/gstreamer
INFO MissionPlanner.Utilities.GStreamer - look in dir /Program Files (x86)/gstreamer
INFO MissionPlanner.Utilities.GStreamer - look in dir bootgstreamer
INFO MissionPlanner.Utilities.GStreamer - look in dir bootProgram Files/gstreamer
INFO MissionPlanner.Utilities.GStreamer - look in dir bootProgram Files (x86)/gstreamer
INFO MissionPlanner.Utilities.GStreamer - No gstreamer found
~~~~
Looking at the file system I see the following:
~~~~
ls /usr/lib/arm-linux-gnueabihf | grep gstreamer
gstreamer
gstreamer-1.0
gstreamer1.0
libgstreamer-1.0.so.0
libgstreamer-1.0.so.0.1404.0
~~~~
Oddly enough, when inspecting ExtLibs/Utilities/GStreamer.cs starting at line 1409 the directory search seems to be correct
~~~~
public static string LookForGstreamer()
{
List dirs = new List();
// linux
dirs.Add("/usr/lib/x86_64-linux-gnu");
// rpi
dirs.Add("/usr/lib/arm-linux-gnueabihf"); <-----------
// current
dirs.Add(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
// settings
dirs.Add(Settings.GetDataDirectory());
// custom settings
dirs.Add(Settings.CustomUserDataDirectory);
// sitl bindle
dirs.Add(GStreamer.BundledPath);
~~~~
I am baffled as to what the issue is here, hopefully someone can advise.
#### Version
Mono:
~~~~
INFO MissionPlanner.Program - 64bit os True, 64bit process True, OS Arch Arm64, OS Desc Unix 5.10.103.8, FW Desc Mono 6.12.0.122 (tarball Mon Feb 22 17:35:18 UTC 2021)
INFO MissionPlanner.Program - Runtime Version v4.0.30319
INFO MissionPlanner.Program - 6.12.0.122 (tarball Mon Feb 22 17:35:18 UTC 2021)
~~~~
MissionPlanner:
1.3.77 build 1.3.8110.38294
#### Platform
[ *] All
[ ] AntennaTracker
[ ] Copter
[ ] Plane
[ ] Rover
[ ] Sub
#### Airframe type
Any
#### Hardware type
RaspberryPi 4b/arch64
#### Logs
See attachments above.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with ExtLibs/Utilities/GStreamer.cs around LookForGstreamer at line 1409, then compare its directory search with the Raspberry Pi OS paths and the console log. Reproduce the video-stream startup on the reported Raspberry Pi configuration; done means installed GStreamer is detected and the setup dialog no longer appears.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, linux, raspberry-pi
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100