mmcuavqgc / qgroundcontrol

Other
1 stars 1 forks source link

Linker conflict when including gstreamer (version 1.14.4) #5

Open 4D-IT opened 3 years ago

4D-IT commented 3 years ago

We checked out the source from. This includes a pre-built apk file in mmc_build, when we install this the video is ok. However, we cannot build the software ourselves with the video working. QGroundcontrol uses gstreamer as a video library, optionally. When we don't include gstreamer we can build the software, and run it, but the video doesn't work. When we include gstreamer (version 1.14.4), however, it does not build due to a conflict during the linking, presumably because the ffmpeg library is included twice, once with gstreamer and once with the MMC plugin (qtavplayer). Depending on how we set up the linker flags during the build we can get either the MMC plugin or the Videostreaming to build, but not both and thus the overall build fails. Therefore, could you please answer the following questions: Should the gstreamer library be included in the build? If Yes, how do we solve the link conflict? And if no, how do we get the video to work?

ziyu6060 commented 3 years ago

We checked out the source from. This includes a pre-built apk file in mmc_build, when we install this the video is ok. However, we cannot build the software ourselves with the video working. QGroundcontrol uses gstreamer as a video library, optionally. When we don't include gstreamer we can build the software, and run it, but the video doesn't work. When we include gstreamer (version 1.14.4), however, it does not build due to a conflict during the linking, presumably because the ffmpeg library is included twice, once with gstreamer and once with the MMC plugin (qtavplayer). Depending on how we set up the linker flags during the build we can get either the MMC plugin or the Videostreaming to build, but not both and thus the overall build fails. Therefore, could you please answer the following questions: Should the gstreamer library be included in the build? If Yes, how do we solve the link conflict? And if no, how do we get the video to work?

Hello, in response to your question, we have done an analysis, and the analysis results are as follows:

  1. You can set up a pre-compiler to build the two and switch, but do not remove qtavplayer.pri
  2. The video signal passed through our picture is a H264 bare stream, we use ffmpeg to decode it, if you want to use gstreamer to decode the video, you need to convert the H264 bare stream from usb into a video that can be parsed by gstreamer signal
  3. The new version of qgc seems to support h264 ts stream, you can refer to how to develop it
4D-IT commented 3 years ago

Thank you for the feedback. a) We built the software from the repository exactly as-is, but then the video does not work. How do you get the app to show the video? b) Is it correct to assume that the gstreamer framework it not required to get the video to work on the Etlas Mobile controller? c) It was our idea to include gstreamer because the video didn't work, but including gstreamer results in a linker conflict, although we followed your sugesstion 1. d) Suggestion 2 and 3 are relevant for future improvements of the software (i.e. using gstreamer functionality) but currently, we want to rebuild a video-compatible apk from the source as checked out from the git-repositlory. Therefore: e) The essential question for us is how to build the app from your source with or without gstreamer where the video actually works?

ziyu6060 commented 3 years ago

Thank you for the feedback. a) We built the software from the repository exactly as-is, but then the video does not work. How do you get the app to show the video? b) Is it correct to assume that the gstreamer framework it not required to get the video to work on the Etlas Mobile controller? c) It was our idea to include gstreamer because the video didn't work, but including gstreamer results in a linker conflict, although we followed your sugesstion 1. d) Suggestion 2 and 3 are relevant for future improvements of the software (i.e. using gstreamer functionality) but currently, we want to rebuild a video-compatible apk from the source as checked out from the git-repositlory. Therefore: e) The essential question for us is how to build the app from your source with or without gstreamer where the video actually works?

Do you have a Email.I will contact you to facilitate communication

ziyu6060 commented 3 years ago

communication Hello, In response to your question, I want to know if Qt Creator reported an error when you compiled it, and what system did you compile and build under.

  1. Is it reported that the QT += usb module is not loaded? If so, please refer to the website: https://github.com/fpoussin/QtUsb.git
  1. If it is another problem, please describe it and see if I can solve it for you