diff --git a/Source/Cut5/Utils/FFMPEGUtils.cpp b/Source/Cut5/Utils/FFMPEGUtils.cpp index 07e7697..5e99b8d 100644 --- a/Source/Cut5/Utils/FFMPEGUtils.cpp +++ b/Source/Cut5/Utils/FFMPEGUtils.cpp @@ -67,7 +67,7 @@ FString FFFMPEGUtils::LoadMedia(const FString& Path, FTimelinePropertyData* Prop { struct SwsContext* swsCtx = sws_getContext( Frame->width, Frame->height, VideoCodecContext->pix_fmt, - Frame->width, Frame->height, AV_PIX_FMT_RGBA, + Frame->width, Frame->height, AV_PIX_FMT_BGRA, SWS_BILINEAR, NULL, NULL, NULL ); if (!swsCtx) @@ -286,7 +286,7 @@ TArray FFFMPEGUtils::GetMovieBrush(FClipData* ClipData) { struct SwsContext* swsCtx = sws_getContext( Frame->width, Frame->height, VideoCodecContext->pix_fmt, - Frame->width, Frame->height, AV_PIX_FMT_RGBA, + Frame->width, Frame->height, AV_PIX_FMT_BGRA, SWS_BILINEAR, NULL, NULL, NULL ); if (!swsCtx) diff --git a/Source/Cut5/Widgets/SCutMainWindow.cpp b/Source/Cut5/Widgets/SCutMainWindow.cpp index 2612ad1..10216df 100644 --- a/Source/Cut5/Widgets/SCutMainWindow.cpp +++ b/Source/Cut5/Widgets/SCutMainWindow.cpp @@ -1327,6 +1327,20 @@ tinyxml2::XMLElement* SCutMainWindow::GetVideoElement(tinyxml2::XMLElement* Pare tinyxml2::XMLElement* ProjectorEventList = Video->InsertNewChildElement("ProjectorEventList"); { + + tinyxml2::XMLElement* ProjectorEvent = ProjectorEventList->InsertNewChildElement("ProjectorEvent"); + { + + tinyxml2::XMLElement* ProjectorTimeCode = ProjectorEvent->InsertNewChildElement("TimeCode"); + { + ProjectorTimeCode->InsertNewText(TCHAR_TO_UTF8(*FUtils::GetMsFromString(FGlobalData::GetTimeData(EncodeVideoInfo.ClipStartFrame)))); + } + tinyxml2::XMLElement* Value = ProjectorEvent->InsertNewChildElement("Value"); + { + Value->InsertNewText(TCHAR_TO_UTF8(*FString::FromInt(1))); + } + } + for (int32 i = 0; i < CutTimeline->TrackGroupInstances.Num(); i++) { if (StaticCastSharedPtr(CutTimeline->TrackGroupInstances[i].Head)->TrackData.TrackType == ETrackType::ProjectorTrack) diff --git a/Source/Cut5/Widgets/STimelineClip.cpp b/Source/Cut5/Widgets/STimelineClip.cpp index a6e0db0..e466dc0 100644 --- a/Source/Cut5/Widgets/STimelineClip.cpp +++ b/Source/Cut5/Widgets/STimelineClip.cpp @@ -288,7 +288,7 @@ void STimelineClip::Seek(int32 Frame) struct SwsContext* swsCtx = sws_getContext( AllocatedFrame->width, AllocatedFrame->height, VideoCodecContext->pix_fmt, - AllocatedFrame->width, AllocatedFrame->height, AV_PIX_FMT_RGBA, + AllocatedFrame->width, AllocatedFrame->height, AV_PIX_FMT_BGRA, SWS_BILINEAR, NULL, NULL, NULL ); if (!swsCtx)