-
-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'merge_attempt4' into 2.6-evo
- Loading branch information
Showing
15 changed files
with
236 additions
and
234 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
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,10 @@ | ||
How to: | ||
1. Create folder `build-libs-windows` in repository root | ||
2. Download and extract `ffmpeg-release-full-shared.7z` into `build-libs-windows` ( from https://www.gyan.dev/ffmpeg/builds/ ) | ||
Maybe it will be good idea to fix version and put this version in download script | ||
3. Rename extracted folder to `ffmpeg`. Chech that `ffmpeg` folder contains `bin`, `include`, etc. folders. | ||
4. Trying to use prebuild angle from https://github.com/mmozeiko/build-angle | ||
Download latest release and extract to `build-libs-windows`. | ||
Maybe it better to clone/adjust this build pipeline | ||
|
||
5. After build you need to copy `bin` folders content to folder with `.exe` |
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
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
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,100 +1,57 @@ | ||
DEFINES += QOPENHD_ENABLE_GSTREAMER_QMLGLSINK | ||
INCLUDEPATH += $$PWD | ||
INCLUDEPATH += C:/ffmpeg/include | ||
|
||
#DEFINES += QOPENHD_GSTREAMER_PRIMARY_VIDEO | ||
DEFINES += QOPENHD_GSTREAMER_SECONDARY_VIDEO | ||
LIBS += -LC:/ffmpeg/lib -lavcodec -lavutil -lavformat | ||
# TODO dirty | ||
LIBS += -lGLESv2 -lEGL | ||
|
||
SOURCES += \ | ||
$$PWD/gstqmlglsinkstream.cpp \ | ||
$$PWD/gstrtpaudioplayer.cpp \ | ||
$$PWD/gstrtpreceiver.cpp | ||
win32 { | ||
INCLUDEPATH += $$PWD/../../../build-libs-windows/ffmpeg/include | ||
LIBS += -L$$PWD/../../../build-libs-windows/ffmpeg/lib -lavcodec -lavutil -lavformat | ||
|
||
HEADERS += \ | ||
$$PWD/gst_helper.hpp \ | ||
$$PWD/gstqmlglsinkstream.h \ | ||
$$PWD/gstrtpaudioplayer.h \ | ||
$$PWD/gstrtpreceiver.h | ||
INCLUDEPATH += $$PWD/../../../build-libs-windows/angle-x64/include | ||
LIBS += -L$$PWD/../../../build-libs-windows/angle-x64/bin -lGLESv2 -lEGL | ||
|
||
android{ | ||
message("gst android") | ||
# More or less taken from QGroundControl. | ||
# this is already the "least dirty" solution I could come up with :/ | ||
#DOWNLOADED_GST_FOLDER= /home/hyperion/gstreamer-1.0-android-universal-1.20.5 | ||
#DOWNLOADED_GST_FOLDER= /home/consti10/Downloads/gstreamer-1.0-android-universal-1.20.5 | ||
#DOWNLOADED_GST_FOLDER= $$PWD/../../../lib/gstreamer_prebuilts/gstreamer-1.0-android-universal-1.20.5 | ||
DOWNLOADED_GST_FOLDER= $$PWD/../../../lib/gstreamer_prebuilts/gstreamer-1.0-android-universal | ||
DEFINES += EGL_EGLEXT_PROTOTYPES | ||
DEFINES += GL_GLEXT_PROTOTYPES | ||
# LIBS += -lOpengl32 | ||
} | ||
|
||
# Set the right folder for the compile arch | ||
GSTREAMER_ARCH_FOLDER = armv7 | ||
contains(ANDROID_TARGET_ARCH, armeabi-v7a) { | ||
GSTREAMER_ARCH_FOLDER = armv7 | ||
} else:contains(ANDROID_TARGET_ARCH, arm64-v8a) { | ||
GSTREAMER_ARCH_FOLDER = arm64 | ||
} else:contains(ANDROID_TARGET_ARCH, x86_64) { | ||
GSTREAMER_ARCH_FOLDER = x86_64 | ||
} else { | ||
message(Unknown ANDROID_TARGET_ARCH $$ANDROID_TARGET_ARCH) | ||
GSTREAMER_ARCH_FOLDER = armv7 | ||
} | ||
# just using the something something webrtc from stephen was the easiest solution. | ||
#include(../../lib/h264/h264.pri) | ||
|
||
#GSTREAMER_ARCH_FOLDER = arm64 | ||
SOURCES += \ | ||
$$PWD/QSGVideoTextureItem.cpp \ | ||
$$PWD/gl/gl_shaders.cpp \ | ||
$$PWD/gl/gl_videorenderer.cpp \ | ||
$$PWD/texturerenderer.cpp \ | ||
$$PWD/avcodec_decoder.cpp \ | ||
|
||
GSTREAMER_ROOT_ANDROID = $$DOWNLOADED_GST_FOLDER/$$GSTREAMER_ARCH_FOLDER | ||
message(gstreamer root android:) | ||
message($$GSTREAMER_ROOT_ANDROID) | ||
HEADERS += \ | ||
$$PWD/QSGVideoTextureItem.h \ | ||
$$PWD/gl/gl_shaders.h \ | ||
$$PWD/gl/gl_videorenderer.h \ | ||
$$PWD/texturerenderer.h \ | ||
$$PWD/avcodec_decoder.h \ | ||
|
||
GST_ROOT = $$GSTREAMER_ROOT_ANDROID | ||
exists($$GST_ROOT) { | ||
message(Doing QGC gstreamer stuff) | ||
message($$GST_ROOT) | ||
QMAKE_CXXFLAGS += -pthread | ||
CONFIG += VideoEnabled | ||
|
||
LIBS += -L$$GST_ROOT/lib/gstreamer-1.0 \ | ||
-lgstvideo-1.0 \ | ||
-lgstcoreelements \ | ||
-lgstplayback \ | ||
-lgstudp \ | ||
-lgstrtp \ | ||
-lgstrtsp \ | ||
-lgstx264 \ | ||
-lgstlibav \ | ||
-lgstsdpelem \ | ||
-lgstvideoparsersbad \ | ||
-lgstrtpmanager \ | ||
-lgstisomp4 \ | ||
-lgstmatroska \ | ||
-lgstmpegtsdemux \ | ||
-lgstandroidmedia \ | ||
-lgstopengl \ | ||
-lgsttcp \ | ||
-lgstapp \ | ||
-lgstalaw \ | ||
-lgstautodetect | ||
|
||
# experimental | ||
#INCLUDEPATH += /usr/local/include/uvgrtp | ||
#LIBS += -L/usr/local/lib -luvgrtp | ||
|
||
# Rest of GStreamer dependencies | ||
LIBS += -L$$GST_ROOT/lib \ | ||
-lgraphene-1.0 -ljpeg -lpng16 \ | ||
-lgstfft-1.0 -lm \ | ||
-lgstnet-1.0 -lgio-2.0 \ | ||
-lgstphotography-1.0 -lgstgl-1.0 -lEGL \ | ||
-lgstaudio-1.0 -lgstcodecparsers-1.0 -lgstbase-1.0 \ | ||
-lgstreamer-1.0 -lgstrtp-1.0 -lgstpbutils-1.0 -lgstrtsp-1.0 -lgsttag-1.0 \ | ||
-lgstvideo-1.0 -lavformat -lavcodec -lavutil -lx264 -lavfilter -lswresample \ | ||
-lgstriff-1.0 -lgstcontroller-1.0 -lgstapp-1.0 \ | ||
-lgstsdp-1.0 -lbz2 -lgobject-2.0 -lgstmpegts-1.0 \ | ||
-Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0 -lorc-0.4 -liconv -lffi -lintl \ | ||
# dirty way to check if we are on rpi and therefore should use the external decode service | ||
CONFIG += link_pkgconfig | ||
packagesExist(mmal) { | ||
DEFINES += IS_PLATFORM_RPI | ||
} | ||
|
||
INCLUDEPATH += \ | ||
$$GST_ROOT/include/gstreamer-1.0 \ | ||
$$GST_ROOT/lib/gstreamer-1.0/include \ | ||
$$GST_ROOT/include/glib-2.0 \ | ||
$$GST_ROOT/lib/glib-2.0/include | ||
}else { | ||
message(Gstreamer prebuilt directory does not exist) | ||
} | ||
}else { | ||
message(gst linux) | ||
CONFIG += link_pkgconfig | ||
PKGCONFIG += gstreamer-1.0 gstreamer-video-1.0 gstreamer-gl-1.0 gstreamer-app-1.0 #gstreamer1.0-plugins-good | ||
exists(/usr/local/share/openhd/platform/rock/) { | ||
message(This is a Rock) | ||
DEFINES += IS_PLATFORM_ROCK | ||
} else { | ||
message(This is not a Rock) | ||
} | ||
|
||
# can be used in c++, also set to be exposed in qml | ||
DEFINES += QOPENHD_ENABLE_VIDEO_VIA_AVCODEC |
Oops, something went wrong.