AudioDecoderACM.h
资源名称:VC++视频传输.rar [点击查看]
上传用户:hxb_1234
上传日期:2010-03-30
资源大小:8328k
文件大小:2k
源码类别:
VC书籍
开发平台:
Visual C++
- /**************************************************************************************
- * *
- * *
- **************************************************************************************/
- #ifndef AUDIO_DECODER_ACM_H
- #define AUDIO_DECODER_ACM_H
- #include "MediaClasses.h"
- #include "RingBuffer.h"
- /*
- * ACM封装器类
- *
- */
- #include <mmsystem.h>
- #include <memory.h>
- #include <stdlib.h>
- #include <stdio.h>
- #include <mmreg.h>
- #include <msacm.h>
- class MediaAudioDecoderACM : public MediaItemAudioDecoder {
- private:
- MediaItemDecaps *decaps;
- HACMSTREAM hacm;
- ACMSTREAMHEADER acmHeader;
- DWORD acm;
- DWORD acmLeft;
- DWORD acmInLeft;
- DWORD outputSize;
- DWORD inputSize;
- WAVEFORMATEX *oFormat;
- char *in_buffer;
- char *out_buffer;
- MediaRingBuffer *ring;
- public:
- MediaAudioDecoderACM();
- ~MediaAudioDecoderACM();
- /*
- * 媒体项函数(MediaItem Funcs)
- */
- media_type_t GetType();
- char *GetName();
- MP_RESULT Connect(MediaItem *item);
- MP_RESULT ReleaseConnections();
- DWORD GetCaps();
- MP_RESULT Configure(HINSTANCE hInstance, HWND hwnd);
- /*
- * 声音解码器
- */
- WAVEFORMATEX *GetAudioFormat();
- MP_RESULT EmptyAudioBuffer();
- unsigned int Decompress(void *buffer, unsigned int size);
- };
- #endif