change: change code style to Linux style except indent.
This commit is contained in:
@@ -22,60 +22,62 @@
|
||||
|
||||
#include "common/oiioutils.h"
|
||||
|
||||
namespace olive {
|
||||
|
||||
OIIOEncoder::OIIOEncoder(const EncodingParams ¶ms) :
|
||||
Encoder(params)
|
||||
namespace olive
|
||||
{
|
||||
|
||||
OIIOEncoder::OIIOEncoder(const EncodingParams ¶ms)
|
||||
: Encoder(params)
|
||||
{
|
||||
}
|
||||
|
||||
bool OIIOEncoder::Open()
|
||||
{
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OIIOEncoder::WriteFrame(FramePtr frame, rational time)
|
||||
{
|
||||
std::string filename = GetFilenameForFrame(time).toStdString();
|
||||
std::string filename = GetFilenameForFrame(time).toStdString();
|
||||
|
||||
auto output = OIIO::ImageOutput::create(filename);
|
||||
if (!output) {
|
||||
return false;
|
||||
}
|
||||
auto output = OIIO::ImageOutput::create(filename);
|
||||
if (!output) {
|
||||
return false;
|
||||
}
|
||||
|
||||
OIIO::TypeDesc type = OIIOUtils::GetOIIOBaseTypeFromFormat(frame->format());
|
||||
OIIO::ImageSpec spec(frame->width(), frame->height(), frame->channel_count(), type);
|
||||
OIIO::TypeDesc type = OIIOUtils::GetOIIOBaseTypeFromFormat(frame->format());
|
||||
OIIO::ImageSpec spec(frame->width(), frame->height(),
|
||||
frame->channel_count(), type);
|
||||
|
||||
if (!output->open(filename, spec)) {
|
||||
return false;
|
||||
}
|
||||
if (!output->open(filename, spec)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!output->write_image(type, frame->data(), OIIO::AutoStride, frame->linesize_bytes())) {
|
||||
return false;
|
||||
}
|
||||
if (!output->write_image(type, frame->data(), OIIO::AutoStride,
|
||||
frame->linesize_bytes())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!output->close()) {
|
||||
return false;
|
||||
}
|
||||
if (!output->close()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OIIOEncoder::WriteAudio(const SampleBuffer &audio)
|
||||
{
|
||||
// Do nothing
|
||||
return false;
|
||||
// Do nothing
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OIIOEncoder::WriteSubtitle(const SubtitleBlock *sub_block)
|
||||
{
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
void OIIOEncoder::Close()
|
||||
{
|
||||
// Do nothing
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user