Skip to content

Commit

Permalink
UE 5.3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan COLINET authored and julienalofs committed May 3, 2024
1 parent b42f8b2 commit 96b627b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DeltacastMedia.uplugin
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"IsBetaVersion": false,
"IsExperimentalVersion": false,
"Installed": false,
"EngineVersion": "5.2",
"EngineVersion": "5.3",
"SupportedTargetPlatforms": [ "Win64", "Linux" ],
"Modules": [
{
Expand Down
12 changes: 9 additions & 3 deletions Source/DeltacastMediaSource/Private/DeltacastMediaPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "MediaIOCoreEncodeTime.h"
#include "MediaIOCoreFileWriter.h"
#include "MediaIOCoreSamples.h"
#include "MediaIOCorePlayerBase.h"


#define LOCTEXT_NAMESPACE "FDeltacastMediaPlayer"
Expand Down Expand Up @@ -361,10 +362,10 @@ bool FDeltacastMediaPlayer::OnInputFrameReceived(const FDeltacastVideoFrameData&
DecodedTimecodeF2 = DecodedTimecode;
++DecodedTimecodeF2->Frames;

if (bUseTimeSynchronization)
if (EvaluationType == EMediaIOSampleEvaluationType::Timecode)
{
const FFrameNumber ConvertedFrameNumber = DecodedTimecode.GetValue().ToFrameNumber(VideoFrameRate);
const double NumberOfSeconds = ConvertedFrameNumber.Value * VideoFrameRate.AsInterval();
const FFrameNumber ConvertedFrameNumber = DecodedTimecode.GetValue().ToFrameNumber(VideoFrameRate);
const double NumberOfSeconds = ConvertedFrameNumber.Value * VideoFrameRate.AsInterval();
const FTimespan TimecodeDecodedTime = FTimespan::FromSeconds(NumberOfSeconds);

DecodedTime = TimecodeDecodedTime;
Expand Down Expand Up @@ -528,4 +529,9 @@ void FDeltacastMediaPlayer::VerifyFrameDropCount()
}
}

TSharedPtr<FMediaIOCoreTextureSampleBase> FDeltacastMediaPlayer::AcquireTextureSample_AnyThread() const
{
return TextureSamplePool->AcquireShared();
}

#undef LOCTEXT_NAMESPACE
1 change: 1 addition & 0 deletions Source/DeltacastMediaSource/Private/DeltacastMediaPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class FDeltacastMediaPlayer : public FMediaIOCorePlayerBase,
protected: //~ FMediaIOCorePlayerBase
virtual bool IsHardwareReady() const override;
virtual void SetupSampleChannels() override;
virtual TSharedPtr<FMediaIOCoreTextureSampleBase> AcquireTextureSample_AnyThread() const override;

private:
void VerifyFrameDropCount();
Expand Down

0 comments on commit 96b627b

Please sign in to comment.