diff options
Diffstat (limited to 'audio.h')
-rw-r--r-- | audio.h | 37 |
1 files changed, 13 insertions, 24 deletions
@@ -7,8 +7,7 @@ #ifndef AUDIO_H #define AUDIO_H -extern "C" -{ +extern "C" { #include <libavcodec/avcodec.h> } @@ -30,7 +29,7 @@ public: virtual int Init(void); virtual int DeInit(void); - virtual bool WriteData(const unsigned char *buf, unsigned int length, uint64_t pts = 0); + virtual int WriteData(const unsigned char *buf, unsigned int length, uint64_t pts = 0); virtual bool Poll(void); virtual void Reset(void); @@ -38,12 +37,7 @@ public: protected: virtual void Action(void); - - virtual unsigned int DecodeFrame(); - virtual unsigned int ReadFrame(unsigned char *buf, unsigned int bufsize); - - virtual bool ProbeCodec(void); - void SetCodec(cAudioCodec::eCodec codec); + void SetCodec(cAudioCodec::eCodec codec, unsigned int &channels); struct Codec { @@ -53,21 +47,16 @@ protected: private: - Codec m_codecs[cAudioCodec::eNumCodecs]; - cAudioCodec::eCodec m_codec; - cAudioCodec::eCodec m_outputFormat; - cAudioPort::ePort m_outputPort; - int m_channels; - int m_samplingRate; - bool m_passthrough; - bool m_outputFormatChanged; - uint64_t m_pts; - - AVFrame *m_frame; - cMutex *m_mutex; - cCondWait *m_newData; - cAudioParser *m_parser; - cOmx *m_omx; + Codec m_codecs[cAudioCodec::eNumCodecs]; + bool m_passthrough; + bool m_reset; + bool m_ready; + uint64_t m_pts; + + cMutex *m_mutex; + cCondWait *m_wait; + cAudioParser *m_parser; + cOmx *m_omx; }; #endif |