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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -28,7 +28,7 @@ extern "C" {
|
||||
|
||||
#include "common/ffmpegutils.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
FFmpegEncoder::FFmpegEncoder(const EncodingParams ¶ms) :
|
||||
Encoder(params),
|
||||
@@ -634,4 +634,4 @@ void FFmpegEncoder::Error(const QString &s)
|
||||
Close();
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user