Hi,
Is anyone strugling with building gstreamer on a Hololens 2? I can’t handle with GStreamer.Build.cs and GStreamerModule.cpp. Probably I get crash on FGstCoreImpl::Init(). No error in a log or even a warning.
My build cs:
if (Target.Platform == UnrealTargetPlatform.HoloLens)
{
Log.TraceInformation("[TRACEINF][GSTREAMER.BUILD.CS] TARGET == HOLOLENS");
string GStreamerRoot = Path.Combine("$(ProjectDir)", "Content", "Gstreamer", "ThirdParty", "gstreamer", "arm64");
PublicIncludePaths.Add(Path.Combine(GStreamerRoot, "include"));
PublicIncludePaths.Add(Path.Combine(GStreamerRoot, "include", "gstreamer-1.0"));
PublicIncludePaths.Add(Path.Combine(GStreamerRoot, "include", "glib-2.0"));
PublicIncludePaths.Add(Path.Combine(GStreamerRoot, "include", "glib-2.0", "glib"));
PublicIncludePaths.Add(Path.Combine(GStreamerRoot, "lib", "glib-2.0", "include"));
var GStreamerLibPath = Path.Combine(GStreamerRoot, "lib");
var GStreamerBinPath = Path.Combine(GStreamerRoot, "bin");
PublicSystemLibraryPaths.Add(GStreamerLibPath);
PublicSystemLibraryPaths.Add(GStreamerBinPath);
PublicAdditionalLibraries.Add(Path.Combine(GStreamerLibPath, "glib-2.0.lib"));
PublicAdditionalLibraries.Add(Path.Combine(GStreamerLibPath, "gobject-2.0.lib"));
PublicAdditionalLibraries.Add(Path.Combine(GStreamerLibPath, "gstreamer-1.0.lib"));
PublicAdditionalLibraries.Add(Path.Combine(GStreamerLibPath, "gstvideo-1.0.lib"));
PublicAdditionalLibraries.Add(Path.Combine(GStreamerLibPath, "gstapp-1.0.lib"));
PublicDelayLoadDLLs.Add("glib-2.0-0.dll");
PublicDelayLoadDLLs.Add("gobject-2.0-0.dll");
PublicDelayLoadDLLs.Add("gstreamer-1.0-0.dll");
PublicDelayLoadDLLs.Add("gstvideo-1.0-0.dll");
PublicDelayLoadDLLs.Add("gstapp-1.0-0.dll");
}
And module cpp:
#if PLATFORM_HOLOLENS
FString RootPath = GstreamerPath + FString("/arm64");
if (!RootPath.IsEmpty())
{
UE_LOG(LogGStreamer, Display, TEXT("GSTREAMER_ROOT: \"%s\""), *RootPath);
BinPath = FPaths::Combine(RootPath, TEXT("bin"));
if (FPaths::DirectoryExists(BinPath))
{
//SetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_DEFAULT_DIRS);
//SetDllDirectoryW(*BinPath);
//AddDllDirectory(*BinPath);
SetDllDirectoryW(*BinPath);
}
else
{
UE_LOG(LogGStreamer, Error, TEXT("Directory not found: \"%s\""), *BinPath);
BinPath = "";
}
PluginPath = FPaths::Combine(RootPath, TEXT("lib"), TEXT("gstreamer-1.0"));
if (!FPaths::DirectoryExists(PluginPath))
{
UE_LOG(LogGStreamer, Error, TEXT("Directory not found: \"%s\""), *PluginPath);
PluginPath = "";
}
}
else
{
UE_LOG(LogGStreamer, Error, TEXT("GSTREAMER_ROOT not found"));
}
#endif
Plugin is from a wongfei gtihub, but it is dedicated to windows platform.