mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 04:35:34 +08:00
Add opus codec test
This commit is contained in:
28
tests/opus/OpusDecoderImpl.h
Normal file
28
tests/opus/OpusDecoderImpl.h
Normal 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
|
||||
Reference in New Issue
Block a user