code: use config macro
Macro is much easier to use and more readable
This commit is contained in:
@@ -188,26 +188,26 @@ AudioParams ViewerOutput::GetFirstEnabledAudioStream() const
|
||||
|
||||
void ViewerOutput::set_default_parameters()
|
||||
{
|
||||
int width = Config::Current()["DefaultSequenceWidth"].toInt();
|
||||
int height = Config::Current()["DefaultSequenceHeight"].toInt();
|
||||
int width = OLIVE_CONFIG("DefaultSequenceWidth").toInt();
|
||||
int height = OLIVE_CONFIG("DefaultSequenceHeight").toInt();
|
||||
|
||||
SetVideoParams(VideoParams(
|
||||
width,
|
||||
height,
|
||||
Config::Current()["DefaultSequenceFrameRate"].value<rational>(),
|
||||
static_cast<VideoParams::Format>(Config::Current()["OfflinePixelFormat"].toInt()),
|
||||
OLIVE_CONFIG("DefaultSequenceFrameRate").value<rational>(),
|
||||
static_cast<VideoParams::Format>(OLIVE_CONFIG("OfflinePixelFormat").toInt()),
|
||||
VideoParams::kInternalChannelCount,
|
||||
Config::Current()["DefaultSequencePixelAspect"].value<rational>(),
|
||||
Config::Current()["DefaultSequenceInterlacing"].value<VideoParams::Interlacing>(),
|
||||
OLIVE_CONFIG("DefaultSequencePixelAspect").value<rational>(),
|
||||
OLIVE_CONFIG("DefaultSequenceInterlacing").value<VideoParams::Interlacing>(),
|
||||
VideoParams::generate_auto_divider(width, height)
|
||||
));
|
||||
SetAudioParams(AudioParams(
|
||||
Config::Current()["DefaultSequenceAudioFrequency"].toInt(),
|
||||
Config::Current()["DefaultSequenceAudioLayout"].toULongLong(),
|
||||
OLIVE_CONFIG("DefaultSequenceAudioFrequency").toInt(),
|
||||
OLIVE_CONFIG("DefaultSequenceAudioLayout").toULongLong(),
|
||||
AudioParams::kInternalFormat
|
||||
));
|
||||
|
||||
SetVideoAutoCacheEnabled(Config::Current()["DefaultSequenceAutoCache"].toBool());
|
||||
SetVideoAutoCacheEnabled(OLIVE_CONFIG("DefaultSequenceAutoCache").toBool());
|
||||
}
|
||||
|
||||
void ViewerOutput::ShiftVideoCache(const rational &from, const rational &to)
|
||||
@@ -499,7 +499,7 @@ void ViewerOutput::set_parameters_from_footage(const QVector<ViewerOutput *> foo
|
||||
SetVideoParams(VideoParams(s.width(),
|
||||
s.height(),
|
||||
using_timebase,
|
||||
static_cast<VideoParams::Format>(Config::Current()[QStringLiteral("OfflinePixelFormat")].toInt()),
|
||||
static_cast<VideoParams::Format>(OLIVE_CONFIG("OfflinePixelFormat").toInt()),
|
||||
VideoParams::kInternalChannelCount,
|
||||
s.pixel_aspect_ratio(),
|
||||
s.interlacing(),
|
||||
|
||||
Reference in New Issue
Block a user