Skip to content

Commit

Permalink
OutputSettings;: add formati options
Browse files Browse the repository at this point in the history
  • Loading branch information
rodlie committed Sep 6, 2024
1 parent e0204e1 commit 2912ba2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/outputsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ void OutputSettings::write(eWriteStream &dst) const
dst.write(&fVideoPixelFormat, sizeof(AVPixelFormat));
dst << fVideoBitrate;
dst << fVideoProfile;
dst << fVideoOptions;

dst << fAudioEnabled;
dst << (fAudioCodec ? fAudioCodec->id : -1);
Expand All @@ -142,6 +143,9 @@ void OutputSettings::read(eReadStream &src)
if (src.evFileVersion() >= EvFormat::codecProfile) {
src >> fVideoProfile;
}
if (src.evFileVersion() >= EvFormat::formatOptions) {
src >> fVideoOptions;
}

src >> fAudioEnabled;
int audioCodecId; src >> audioCodecId;
Expand Down
2 changes: 2 additions & 0 deletions src/core/outputsettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "Private/esettings.h"
#include "smartPointers/ememory.h"
#include "ReadWrite/basicreadwrite.h"
#include "formatoptions.h"

extern "C" {
#include <libavcodec/avcodec.h>
Expand Down Expand Up @@ -56,6 +57,7 @@ struct CORE_EXPORT OutputSettings
AVPixelFormat fVideoPixelFormat = AV_PIX_FMT_NONE;
int fVideoBitrate = 0;
int fVideoProfile = FF_PROFILE_UNKNOWN;
FormatOptions fVideoOptions;

bool fAudioEnabled = false;
const AVCodec *fAudioCodec = nullptr;
Expand Down

0 comments on commit 2912ba2

Please sign in to comment.