use hardcoded namespace

The macro defined namespaces confused the hell out of lupdate and more or less broke translations permanently. Looks like the only way we can do it is to have a hardcoded namespace, which goes against my instinct, but honestly how likely is it that we'll change the namespace anyway (I guess forks might want to do it, but that's their problem ;) )
This commit is contained in:
itsmattkc
2020-11-17 20:24:42 +11:00
parent d241090a9f
commit 75d4cd899b
626 changed files with 1971 additions and 1972 deletions
+2 -2
View File
@@ -37,7 +37,7 @@
#include "task/taskmanager.h"
#include "project/project.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
QMutex Decoder::currently_conforming_mutex_;
QWaitCondition Decoder::currently_conforming_wait_cond_;
@@ -377,4 +377,4 @@ SampleBufferPtr Decoder::RetrieveAudioFromConform(const QString &conform_filenam
return nullptr;
}
OLIVE_NAMESPACE_EXIT
}
+3 -3
View File
@@ -36,7 +36,7 @@ extern "C" {
#include "common/rational.h"
#include "project/item/footage/footage.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
class Decoder;
using DecoderPtr = std::shared_ptr<Decoder>;
@@ -248,8 +248,8 @@ private:
};
OLIVE_NAMESPACE_EXIT
}
Q_DECLARE_METATYPE(OLIVE_NAMESPACE::Decoder::RetrieveState)
Q_DECLARE_METATYPE(olive::Decoder::RetrieveState)
#endif // DECODER_H
+2 -2
View File
@@ -24,7 +24,7 @@
#include "ffmpeg/ffmpegencoder.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
Encoder::Encoder(const EncodingParams &params) :
params_(params)
@@ -236,4 +236,4 @@ Encoder* Encoder::CreateFromID(const QString &id, const EncodingParams& params)
return new FFmpegEncoder(params);
}
OLIVE_NAMESPACE_EXIT
}
+5 -5
View File
@@ -32,7 +32,7 @@
#include "render/audioparams.h"
#include "render/videoparams.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
class Encoder;
using EncoderPtr = std::shared_ptr<Encoder>;
@@ -114,10 +114,10 @@ public:
virtual bool Open() = 0;
virtual bool WriteFrame(OLIVE_NAMESPACE::FramePtr frame, OLIVE_NAMESPACE::rational time) = 0;
virtual void WriteAudio(OLIVE_NAMESPACE::AudioParams pcm_info,
virtual bool WriteFrame(olive::FramePtr frame, olive::rational time) = 0;
virtual void WriteAudio(olive::AudioParams pcm_info,
QIODevice *file) = 0;
void WriteAudio(OLIVE_NAMESPACE::AudioParams pcm_info,
void WriteAudio(olive::AudioParams pcm_info,
const QString& pcm_filename);
virtual void Close() = 0;
@@ -132,6 +132,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
}
#endif // ENCODER_H
+2 -2
View File
@@ -25,7 +25,7 @@ extern "C" {
#include <libavutil/pixdesc.h>
}
OLIVE_NAMESPACE_ENTER
namespace olive {
QString ExportCodec::GetCodecName(ExportCodec::Codec c)
{
@@ -125,4 +125,4 @@ QStringList ExportCodec::GetPixelFormatsForCodec(ExportCodec::Codec c)
return pix_fmts;
}
OLIVE_NAMESPACE_EXIT
}
+2 -2
View File
@@ -26,7 +26,7 @@
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
class ExportCodec : public QObject
{
@@ -57,6 +57,6 @@ public:
};
OLIVE_NAMESPACE_EXIT
}
#endif // EXPORTCODEC_H
+2 -2
View File
@@ -20,7 +20,7 @@
#include "exportformat.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
QString ExportFormat::GetName(olive::ExportFormat::Format f)
{
@@ -135,4 +135,4 @@ QList<ExportCodec::Codec> ExportFormat::GetAudioCodecs(ExportFormat::Format f)
return {};
}
OLIVE_NAMESPACE_EXIT
}
+2 -2
View File
@@ -27,7 +27,7 @@
#include "common/define.h"
#include "exportcodec.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
class ExportFormat : public QObject
{
@@ -53,6 +53,6 @@ public:
};
OLIVE_NAMESPACE_EXIT
}
#endif // EXPORTFORMAT_H
+2 -2
View File
@@ -30,7 +30,7 @@ extern "C" {
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
class AVFrameWrapper {
public:
@@ -55,6 +55,6 @@ private:
using AVFramePtr = std::shared_ptr<AVFrameWrapper>;
OLIVE_NAMESPACE_EXIT
}
#endif // AVFRAMEPTR_H
+2 -2
View File
@@ -45,7 +45,7 @@ extern "C" {
#include "render/framehashcache.h"
#include "render/diskmanager.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
FFmpegDecoder::FFmpegDecoder() :
scale_ctx_(nullptr),
@@ -1085,4 +1085,4 @@ void FFmpegDecoder::Instance::Seek(int64_t timestamp)
av_seek_frame(fmt_ctx_, avstream_->index, timestamp, AVSEEK_FLAG_BACKWARD);
}
OLIVE_NAMESPACE_EXIT
}
+2 -2
View File
@@ -38,7 +38,7 @@ extern "C" {
#include "ffmpegframepool.h"
#include "project/item/footage/videostream.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
/**
* @brief A Decoder derivative that wraps FFmpeg functions as on Olive decoder
@@ -162,6 +162,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
}
#endif // FFMPEGDECODER_H
+2 -2
View File
@@ -28,7 +28,7 @@ extern "C" {
#include "common/ffmpegutils.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
FFmpegEncoder::FFmpegEncoder(const EncodingParams &params) :
Encoder(params),
@@ -634,4 +634,4 @@ void FFmpegEncoder::Error(const QString &s)
Close();
}
OLIVE_NAMESPACE_EXIT
}
+4 -4
View File
@@ -30,7 +30,7 @@ extern "C" {
#include "codec/encoder.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
class FFmpegEncoder : public Encoder
{
@@ -40,9 +40,9 @@ public:
virtual bool Open() override;
virtual bool WriteFrame(OLIVE_NAMESPACE::FramePtr frame, OLIVE_NAMESPACE::rational time) override;
virtual bool WriteFrame(olive::FramePtr frame, olive::rational time) override;
virtual void WriteAudio(OLIVE_NAMESPACE::AudioParams pcm_info,
virtual void WriteAudio(olive::AudioParams pcm_info,
QIODevice *file) override;
virtual void Close() override;
@@ -97,6 +97,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
}
#endif // FFMPEGENCODER_H
+2 -2
View File
@@ -22,7 +22,7 @@
#include "codec/frame.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
FFmpegFramePool::FFmpegFramePool(int element_count) :
MemoryPool(element_count),
@@ -48,4 +48,4 @@ size_t FFmpegFramePool::GetElementSize()
return Frame::generate_linesize_bytes(width_, format_, channel_count_) * height_;
}
OLIVE_NAMESPACE_EXIT
}
+2 -2
View File
@@ -24,7 +24,7 @@
#include "common/memorypool.h"
#include "render/videoparams.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
class FFmpegFramePool : public MemoryPool<uint8_t>
{
@@ -57,6 +57,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
}
#endif // FFMPEGFRAMEPOOL_H
+2 -2
View File
@@ -27,7 +27,7 @@
#include "common/oiioutils.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
Frame::Frame() :
timestamp_(0)
@@ -129,4 +129,4 @@ FramePtr Frame::convert(VideoParams::Format format) const
}
}
OLIVE_NAMESPACE_EXIT
}
+3 -3
View File
@@ -28,7 +28,7 @@
#include "render/color.h"
#include "render/videoparams.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
class Frame;
using FramePtr = std::shared_ptr<Frame>;
@@ -163,8 +163,8 @@ private:
};
OLIVE_NAMESPACE_EXIT
}
Q_DECLARE_METATYPE(OLIVE_NAMESPACE::FramePtr)
Q_DECLARE_METATYPE(olive::FramePtr)
#endif // FRAME_H
+2 -2
View File
@@ -31,7 +31,7 @@
#include "config/config.h"
#include "core.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
QStringList OIIODecoder::supported_formats_;
@@ -261,4 +261,4 @@ void OIIODecoder::CloseImageHandle()
}
}
OLIVE_NAMESPACE_EXIT
}
+2 -2
View File
@@ -26,7 +26,7 @@
#include "codec/decoder.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
class OIIODecoder : public Decoder
{
@@ -72,6 +72,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
}
#endif // OIIODECODER_H
+2 -2
View File
@@ -20,7 +20,7 @@
#include "samplebuffer.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
SampleBuffer::SampleBuffer() :
sample_count_per_channel_(0),
@@ -310,4 +310,4 @@ void SampleBuffer::destroy_sample_buffer(float ***data, int nb_channels)
}
}
OLIVE_NAMESPACE_EXIT
}
+3 -3
View File
@@ -25,7 +25,7 @@
#include "render/audioparams.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
class SampleBuffer;
using SampleBufferPtr = std::shared_ptr<SampleBuffer>;
@@ -94,8 +94,8 @@ private:
};
OLIVE_NAMESPACE_EXIT
}
Q_DECLARE_METATYPE(OLIVE_NAMESPACE::SampleBufferPtr)
Q_DECLARE_METATYPE(olive::SampleBufferPtr)
#endif // SAMPLEBUFFER_H
+2 -2
View File
@@ -27,7 +27,7 @@ extern "C" {
#include <QDataStream>
#include <QtMath>
OLIVE_NAMESPACE_ENTER
namespace olive {
WaveInput::WaveInput(const QString &f) :
file_(f)
@@ -239,4 +239,4 @@ qint64 WaveInput::calculate_max_read() const
return data_size_ - (file_.pos() - data_position_ );
}
OLIVE_NAMESPACE_EXIT
}
+2 -2
View File
@@ -25,7 +25,7 @@
#include "render/audioparams.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
class WaveInput
{
@@ -70,6 +70,6 @@ private:
quint32 data_size_;
};
OLIVE_NAMESPACE_EXIT
}
#endif // WAVEINPUT_H
+2 -2
View File
@@ -22,7 +22,7 @@
#include "render/audioparams.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
const int16_t kWAVIntegerFormat = 1;
const int16_t kWAVFloatFormat = 3;
@@ -177,4 +177,4 @@ void WaveOutput::write_int(QFile *file, T integer)
file->write(bytes);
}
OLIVE_NAMESPACE_EXIT
}
+2 -2
View File
@@ -26,7 +26,7 @@
#include "render/audioparams.h"
OLIVE_NAMESPACE_ENTER
namespace olive {
class WaveOutput
{
@@ -63,6 +63,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
}
#endif // WAVEAUDIO_H