From 4fefeeee843459c88ec1bf471937c9ca46a00fb6 Mon Sep 17 00:00:00 2001 From: Dantali0n Date: Thu, 25 Oct 2018 22:42:28 +0200 Subject: [PATCH 1/5] Manual requirements installation procedures requirement installation procedures for a variety of different Linux distributions. --- Build/README.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 Build/README.md diff --git a/Build/README.md b/Build/README.md new file mode 100644 index 00000000..99c8b7a5 --- /dev/null +++ b/Build/README.md @@ -0,0 +1,56 @@ +## Manual requirements installation for VlcMedia + +Execute any of the given stepts from the root of your project directory. + +**Unbutu 18.04** + +``` +sudo add-apt-repository ppa:videolan/master-daily +sudo apt-get update +sudo apt install vlc +sudo ln -sf /usr/lib/x86_64-linux-gnu/libvlc.so.5 /usr/lib/x86_64-linux-gnu/libvlc.so +sudo ln -sf /usr/lib/x86_64-linux-gnu/libvlccore.so.9 /usr/lib/x86_64-linux-gnu/libvlccore.so +mkdir -p ./Plugins/VlcMedia/ThirdParty/vlc/Linux/ +ln -sf /usr/lib/x86_64-linux-gnu/ ./Plugins/VlcMedia/ThirdParty/vlc/Linux/x86_64-unknown-linux-gnu +``` + +_Ubuntu 18.04 is now done no further steps are required_ + +**Ubuntu 16.04** + +`sudo apt install live-media yasm cvs gperf ragel autoconf automake cmake make pkgconf gcc unzip git subversion apache-ant flex gettext curl libtool libcaca lua52 xcb-util-keysyms qtmir-desktop qtbase5-private-dev` + +**Arch** + +`sudo pacman -S base-devel git pkg-config autoconf automake live-media yasm cvs gperf ragel cmake pkgconf gcc unzip git subversion ant flex gettext curl libtool libcaca lua52 xcb-util-keysyms` + +`export CPATH=/usr/include/liveMedia/:$CPATH` + +**General** + +``` +NUMCORES=$(nproc --all) +installDir=$PWD +installDir+="/Plugins/VlcMedia/ThirdParty/vlc/Linux/x86_64-unknown-linux-gnu/" +git clone git://github.com/google/protobuf.git +cd protobuf +./autogen.sh +./configure +make -j $NUMCORES +sudo make install +sudo ldconfig + +git clone git://git.videolan.org/vlc.git +cd vlc +./bootstrap +cd contrib +mkdir native +cd native +../bootstrap +make -j $NUMCORES +cd ../../ +./configure --disable-srt --disable-dca --disable-libass --disable-css --disable-upnp --disable-chromaprint --disable-freetype --prefix=$installDir +make -j $NUMCORES +make install +``` + From bd82d8aed1f2ba2346838b906858523175139b77 Mon Sep 17 00:00:00 2001 From: Dantali0n Date: Wed, 12 Feb 2020 13:04:39 +0100 Subject: [PATCH 2/5] Bumb version info to silence warnings --- VlcMedia.uplugin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VlcMedia.uplugin b/VlcMedia.uplugin index 6340ff5a..088e01d1 100644 --- a/VlcMedia.uplugin +++ b/VlcMedia.uplugin @@ -7,7 +7,7 @@ "CreatedBy" : "Epic Games Inc", "CreatedByURL" : "http://epicgames.com", "DocsURL" : "https://github.com/ue4plugins/VlcMedia", - "EngineVersion" : "4.20.0", + "EngineVersion" : "4.24.0", "Description" : "Implements a media player using the Video LAN Codec (libvlc).", "Category" : "Media Players", "EnabledByDefault" : true, From 90594421a1d4a41579652dc52665a8faacd8c900 Mon Sep 17 00:00:00 2001 From: Dantali0n Date: Thu, 25 Oct 2018 22:42:28 +0200 Subject: [PATCH 3/5] Manual requirements installation procedures requirement installation procedures for a variety of different Linux distributions. --- Build/README.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 Build/README.md diff --git a/Build/README.md b/Build/README.md new file mode 100644 index 00000000..99c8b7a5 --- /dev/null +++ b/Build/README.md @@ -0,0 +1,56 @@ +## Manual requirements installation for VlcMedia + +Execute any of the given stepts from the root of your project directory. + +**Unbutu 18.04** + +``` +sudo add-apt-repository ppa:videolan/master-daily +sudo apt-get update +sudo apt install vlc +sudo ln -sf /usr/lib/x86_64-linux-gnu/libvlc.so.5 /usr/lib/x86_64-linux-gnu/libvlc.so +sudo ln -sf /usr/lib/x86_64-linux-gnu/libvlccore.so.9 /usr/lib/x86_64-linux-gnu/libvlccore.so +mkdir -p ./Plugins/VlcMedia/ThirdParty/vlc/Linux/ +ln -sf /usr/lib/x86_64-linux-gnu/ ./Plugins/VlcMedia/ThirdParty/vlc/Linux/x86_64-unknown-linux-gnu +``` + +_Ubuntu 18.04 is now done no further steps are required_ + +**Ubuntu 16.04** + +`sudo apt install live-media yasm cvs gperf ragel autoconf automake cmake make pkgconf gcc unzip git subversion apache-ant flex gettext curl libtool libcaca lua52 xcb-util-keysyms qtmir-desktop qtbase5-private-dev` + +**Arch** + +`sudo pacman -S base-devel git pkg-config autoconf automake live-media yasm cvs gperf ragel cmake pkgconf gcc unzip git subversion ant flex gettext curl libtool libcaca lua52 xcb-util-keysyms` + +`export CPATH=/usr/include/liveMedia/:$CPATH` + +**General** + +``` +NUMCORES=$(nproc --all) +installDir=$PWD +installDir+="/Plugins/VlcMedia/ThirdParty/vlc/Linux/x86_64-unknown-linux-gnu/" +git clone git://github.com/google/protobuf.git +cd protobuf +./autogen.sh +./configure +make -j $NUMCORES +sudo make install +sudo ldconfig + +git clone git://git.videolan.org/vlc.git +cd vlc +./bootstrap +cd contrib +mkdir native +cd native +../bootstrap +make -j $NUMCORES +cd ../../ +./configure --disable-srt --disable-dca --disable-libass --disable-css --disable-upnp --disable-chromaprint --disable-freetype --prefix=$installDir +make -j $NUMCORES +make install +``` + From 035095ea565eb885924169a8e04b99c496d6d84b Mon Sep 17 00:00:00 2001 From: Dantali0n Date: Tue, 23 Mar 2021 17:44:42 +0100 Subject: [PATCH 4/5] Make vlcmedia plugin compatible with 4.26 --- Source/VlcMedia/Private/Player/VlcMediaAudioSample.h | 2 +- Source/VlcMedia/Private/Player/VlcMediaPlayer.cpp | 12 +++++++++--- Source/VlcMedia/Private/Player/VlcMediaPlayer.h | 3 ++- .../VlcMedia/Private/Player/VlcMediaTextureSample.h | 2 +- Source/VlcMedia/Private/Shared/VlcMediaUtils.cpp | 6 +++--- Source/VlcMedia/Private/VlcMediaModule.cpp | 2 +- .../Private/VlcMediaFactoryModule.cpp | 6 ++++++ 7 files changed, 23 insertions(+), 10 deletions(-) diff --git a/Source/VlcMedia/Private/Player/VlcMediaAudioSample.h b/Source/VlcMedia/Private/Player/VlcMediaAudioSample.h index b6fa4eb6..def16609 100644 --- a/Source/VlcMedia/Private/Player/VlcMediaAudioSample.h +++ b/Source/VlcMedia/Private/Player/VlcMediaAudioSample.h @@ -118,7 +118,7 @@ class FVlcMediaAudioSample return SampleRate; } - virtual FTimespan GetTime() const override + virtual FMediaTimeStamp GetTime() const override { return Time; } diff --git a/Source/VlcMedia/Private/Player/VlcMediaPlayer.cpp b/Source/VlcMedia/Private/Player/VlcMediaPlayer.cpp index 29ce3bfe..c6cc724a 100644 --- a/Source/VlcMedia/Private/Player/VlcMediaPlayer.cpp +++ b/Source/VlcMedia/Private/Player/VlcMediaPlayer.cpp @@ -255,10 +255,16 @@ FString FVlcMediaPlayer::GetInfo() const } -FName FVlcMediaPlayer::GetPlayerName() const +//FName FVlcMediaPlayer::GetPlayerName() const +//{ +// static FName PlayerName(TEXT("VlcMedia")); +// return PlayerName; +//} + +FGuid FVlcMediaPlayer::GetPlayerPluginGUID() const { - static FName PlayerName(TEXT("VlcMedia")); - return PlayerName; + static FGuid PlayerPluginGUID(0x6b44ddaf, 0x35784afc, 0x891e074d, 0xad4db8df); + return PlayerPluginGUID; } diff --git a/Source/VlcMedia/Private/Player/VlcMediaPlayer.h b/Source/VlcMedia/Private/Player/VlcMediaPlayer.h index 775bb2bb..63634349 100644 --- a/Source/VlcMedia/Private/Player/VlcMediaPlayer.h +++ b/Source/VlcMedia/Private/Player/VlcMediaPlayer.h @@ -54,7 +54,8 @@ class FVlcMediaPlayer virtual IMediaCache& GetCache() override; virtual IMediaControls& GetControls() override; virtual FString GetInfo() const override; - virtual FName GetPlayerName() const override; +// virtual FName GetPlayerName() const override; + virtual FGuid GetPlayerPluginGUID() const override; virtual IMediaSamples& GetSamples() override; virtual FString GetStats() const override; virtual IMediaTracks& GetTracks() override; diff --git a/Source/VlcMedia/Private/Player/VlcMediaTextureSample.h b/Source/VlcMedia/Private/Player/VlcMediaTextureSample.h index fd8764e8..dcdef83e 100644 --- a/Source/VlcMedia/Private/Player/VlcMediaTextureSample.h +++ b/Source/VlcMedia/Private/Player/VlcMediaTextureSample.h @@ -145,7 +145,7 @@ class FVlcMediaTextureSample } #endif //WITH_ENGINE - virtual FTimespan GetTime() const override + virtual FMediaTimeStamp GetTime() const override { return Time; } diff --git a/Source/VlcMedia/Private/Shared/VlcMediaUtils.cpp b/Source/VlcMedia/Private/Shared/VlcMediaUtils.cpp index 4d555b16..da5dfe12 100644 --- a/Source/VlcMedia/Private/Shared/VlcMediaUtils.cpp +++ b/Source/VlcMedia/Private/Shared/VlcMediaUtils.cpp @@ -31,13 +31,13 @@ namespace VlcMedia case ELibvlcEventType::MediaPlayerEncounteredError: return TEXT("Player Encountered Error"); case ELibvlcEventType::MediaPlayerTimeChanged: return FString::Printf(TEXT("Player Time Changed: %s"), *FTimespan::FromMilliseconds(Event->Descriptor.MediaPlayerTimeChanged.NewTime).ToString()); case ELibvlcEventType::MediaPlayerPositionChanged: return FString::Printf(TEXT("Position Changed: %f"), Event->Descriptor.MediaPlayerPositionChanged.NewPosition); - case ELibvlcEventType::MediaPlayerSeekableChanged: return FString::Printf(TEXT("Player Seekable Changed: %s"), Event->Descriptor.MediaPlayerSeekableChanged.new_seekable ? *GTrue.ToString() : *GFalse.ToString()); - case ELibvlcEventType::MediaPlayerPausableChanged: return FString::Printf(TEXT("Player Pausable Changed: %s"), Event->Descriptor.MediaPlayerPausableChanged.NewPausable ? *GTrue.ToString() : *GFalse.ToString()); + case ELibvlcEventType::MediaPlayerSeekableChanged: return FString::Printf(TEXT("Player Seekable Changed: %s"), Event->Descriptor.MediaPlayerSeekableChanged.new_seekable ? *FCoreTexts::Get().True.ToString() : *FCoreTexts::Get().False.ToString()); + case ELibvlcEventType::MediaPlayerPausableChanged: return FString::Printf(TEXT("Player Pausable Changed: %s"), Event->Descriptor.MediaPlayerPausableChanged.NewPausable ? *FCoreTexts::Get().True.ToString() : *FCoreTexts::Get().False.ToString()); case ELibvlcEventType::MediaPlayerTitleChanged: return FString::Printf(TEXT("Player Title Changed: %s"), Event->Descriptor.MediaPlayerTitleChanged.NewTitle); case ELibvlcEventType::MediaPlayerSnapshotTaken: return TEXT("Player Snapshot Taken"); case ELibvlcEventType::MediaPlayerLengthChanged: return FString::Printf(TEXT("Player Length Changed: %i"), Event->Descriptor.MediaPlayerLengthChanged.NewLength); case ELibvlcEventType::MediaPlayerVout: return FString::Printf(TEXT("Player Vout: %i"), Event->Descriptor.MediaPlayerVout.NewCount); - case ELibvlcEventType::MediaPlayerScrambledChanged: return FString::Printf(TEXT("Player Scambled Changed: %s"), Event->Descriptor.MediaPlayerScrambledChanged.NewScrambled ? *GTrue.ToString() : *GFalse.ToString()); + case ELibvlcEventType::MediaPlayerScrambledChanged: return FString::Printf(TEXT("Player Scambled Changed: %s"), Event->Descriptor.MediaPlayerScrambledChanged.NewScrambled ? *FCoreTexts::Get().True.ToString() : *FCoreTexts::Get().False.ToString()); case ELibvlcEventType::MediaPlayerESAdded: return TEXT("Player ES Added"); case ELibvlcEventType::MediaPlayerESDeleted: return TEXT("Player ES Deleted"); case ELibvlcEventType::MediaPlayerESSelected: return TEXT("Player ES Selected"); diff --git a/Source/VlcMedia/Private/VlcMediaModule.cpp b/Source/VlcMedia/Private/VlcMediaModule.cpp index 2b57d15a..a0f08d07 100644 --- a/Source/VlcMedia/Private/VlcMediaModule.cpp +++ b/Source/VlcMedia/Private/VlcMediaModule.cpp @@ -202,7 +202,7 @@ class FVlcMediaModule // forward message to log ANSICHAR Message[1024]; - FCStringAnsi::GetVarArgs(Message, ARRAY_COUNT(Message), ARRAY_COUNT(Message) - 1, Format, Args); + FCStringAnsi::GetVarArgs(Message, UE_ARRAY_COUNT(Message), Format, Args); switch (Level) { diff --git a/Source/VlcMediaFactory/Private/VlcMediaFactoryModule.cpp b/Source/VlcMediaFactory/Private/VlcMediaFactoryModule.cpp index 0d4b4919..ca67ca44 100644 --- a/Source/VlcMediaFactory/Private/VlcMediaFactoryModule.cpp +++ b/Source/VlcMediaFactory/Private/VlcMediaFactoryModule.cpp @@ -108,6 +108,12 @@ class FVlcMediaFactoryModule return PlayerName; } + virtual FGuid GetPlayerPluginGUID() const override + { + static FGuid PlayerPluginGUID(0x6b44ddaf, 0x35784afc, 0x891e074d, 0xad4db8df); + return PlayerPluginGUID; + } + virtual const TArray& GetSupportedPlatforms() const override { return SupportedPlatforms; From 808e9538a3a25a211f70f63c9c12b79a0ab3a25c Mon Sep 17 00:00:00 2001 From: Dantali0n Date: Wed, 24 Mar 2021 08:07:35 +0100 Subject: [PATCH 5/5] Update plugin engine version to indicate compatability with 4.26 --- VlcMedia.uplugin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VlcMedia.uplugin b/VlcMedia.uplugin index 088e01d1..9da581d1 100644 --- a/VlcMedia.uplugin +++ b/VlcMedia.uplugin @@ -7,7 +7,7 @@ "CreatedBy" : "Epic Games Inc", "CreatedByURL" : "http://epicgames.com", "DocsURL" : "https://github.com/ue4plugins/VlcMedia", - "EngineVersion" : "4.24.0", + "EngineVersion" : "4.26.0", "Description" : "Implements a media player using the Video LAN Codec (libvlc).", "Category" : "Media Players", "EnabledByDefault" : true,