Add opus codec test

This commit is contained in:
dijunkun
2023-11-21 22:30:25 -08:00
parent 19506af831
commit e44c5b1cc7
12 changed files with 368 additions and 2 deletions

View File

@@ -0,0 +1,28 @@
#ifndef __OPUSDECODERIMPL_H
#define __OPUSDECODERIMPL_H
#include <stdio.h>
#include <mutex>
#include <queue>
#include <thread>
#include <vector>
#include "base_type.h"
#include "opus/opus.h"
class OpusDecoderImpl {
private:
/* data */
OpusDecoder *decoder;
int sample_rate;
int channel_num;
FILE *pcm_file;
public:
bool Decode(unsigned char *in_data, int len);
OpusDecoderImpl(int sampleRate, int channel);
~OpusDecoderImpl();
};
#endif