Skip to content

Commit

Permalink
Read/Write: video+audio clip stretch #333
Browse files Browse the repository at this point in the history
  • Loading branch information
rodlie committed Nov 23, 2024
1 parent bea90dc commit 828b195
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/Boxes/videobox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
// Fork of enve - Copyright (C) 2016-2020 Maurycy Liebner

#include "videobox.h"
#include "ReadWrite/evformat.h"

extern "C" {
#include <libavcodec/avcodec.h>
Expand Down Expand Up @@ -103,12 +104,18 @@ void VideoBox::fileHandlerAfterAssigned(VideoFileHandler *obj) {
void VideoBox::writeBoundingBox(eWriteStream& dst) const {
AnimationBox::writeBoundingBox(dst);
dst.writeFilePath(mFileHandler->path());
dst << getStretch();
}

void VideoBox::readBoundingBox(eReadStream& src) {
AnimationBox::readBoundingBox(src);
const QString path = src.readFilePath();
setFilePathNoRename(path);
if (src.evFileVersion() >= EvFormat::avStretch) {
qreal stretch;
src >> stretch;
setStretch(stretch);
}
}

QDomElement VideoBox::prp_writePropertyXEV_impl(const XevExporter& exp) const {
Expand Down

0 comments on commit 828b195

Please sign in to comment.