视频色彩问题,轨道上有视频时默认开启投影仪

This commit is contained in:
Sch 2023-08-20 02:21:00 +08:00
parent 016641f04d
commit 4497c2b6c4
3 changed files with 17 additions and 3 deletions

View File

@ -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<FSlateBrush> 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)

View File

@ -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<STrackHead>(CutTimeline->TrackGroupInstances[i].Head)->TrackData.TrackType == ETrackType::ProjectorTrack)

View File

@ -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)