change: change code style to Linux style except indent.
This commit is contained in:
+36
-25
@@ -31,52 +31,63 @@ extern "C" {
|
||||
|
||||
#include "common/define.h"
|
||||
|
||||
namespace olive {
|
||||
namespace olive
|
||||
{
|
||||
|
||||
using namespace core;
|
||||
|
||||
class AudioProcessor
|
||||
{
|
||||
class AudioProcessor {
|
||||
public:
|
||||
AudioProcessor();
|
||||
AudioProcessor();
|
||||
|
||||
~AudioProcessor();
|
||||
~AudioProcessor();
|
||||
|
||||
DISABLE_COPY_MOVE(AudioProcessor)
|
||||
DISABLE_COPY_MOVE(AudioProcessor)
|
||||
|
||||
bool Open(const AudioParams &from, const AudioParams &to, double tempo = 1.0);
|
||||
bool Open(const AudioParams &from, const AudioParams &to,
|
||||
double tempo = 1.0);
|
||||
|
||||
void Close();
|
||||
void Close();
|
||||
|
||||
bool IsOpen() const { return filter_graph_; }
|
||||
bool IsOpen() const
|
||||
{
|
||||
return filter_graph_;
|
||||
}
|
||||
|
||||
using Buffer = QVector<QByteArray>;
|
||||
int Convert(float **in, int nb_in_samples, AudioProcessor::Buffer *output);
|
||||
using Buffer = QVector<QByteArray>;
|
||||
int Convert(float **in, int nb_in_samples, AudioProcessor::Buffer *output);
|
||||
|
||||
void Flush();
|
||||
void Flush();
|
||||
|
||||
const AudioParams &from() const { return from_; }
|
||||
const AudioParams &to() const { return to_; }
|
||||
const AudioParams &from() const
|
||||
{
|
||||
return from_;
|
||||
}
|
||||
const AudioParams &to() const
|
||||
{
|
||||
return to_;
|
||||
}
|
||||
|
||||
private:
|
||||
static AVFilterContext* CreateTempoFilter(AVFilterGraph *graph, AVFilterContext *link, const double& tempo);
|
||||
static AVFilterContext *CreateTempoFilter(AVFilterGraph *graph,
|
||||
AVFilterContext *link,
|
||||
const double &tempo);
|
||||
|
||||
AVFilterGraph* filter_graph_;
|
||||
AVFilterGraph *filter_graph_;
|
||||
|
||||
AVFilterContext* buffersrc_ctx_;
|
||||
AVFilterContext *buffersrc_ctx_;
|
||||
|
||||
AVFilterContext* buffersink_ctx_;
|
||||
AVFilterContext *buffersink_ctx_;
|
||||
|
||||
AudioParams from_;
|
||||
AVSampleFormat from_fmt_;
|
||||
AudioParams from_;
|
||||
AVSampleFormat from_fmt_;
|
||||
|
||||
AudioParams to_;
|
||||
AVSampleFormat to_fmt_;
|
||||
AudioParams to_;
|
||||
AVSampleFormat to_fmt_;
|
||||
|
||||
AVFrame *in_frame_;
|
||||
|
||||
AVFrame *out_frame_;
|
||||
AVFrame *in_frame_;
|
||||
|
||||
AVFrame *out_frame_;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user