| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
#include <boca.h> |
| 14 |
#include "dllinterface.h" |
| 15 |
#include "wmareader.h" |
| 16 |
|
| 17 |
BoCA_BEGIN_COMPONENT(DecoderWMA) |
| 18 |
|
| 19 |
namespace BoCA |
| 20 |
{ |
| 21 |
class DecoderWMA : public CS::DecoderComponent |
| 22 |
{ |
| 23 |
friend class WMAReader; |
| 24 |
|
| 25 |
private: |
| 26 |
WMAReader *readerCallback; |
| 27 |
|
| 28 |
Buffer<UnsignedByte> samplesBuffer; |
| 29 |
Threads::Mutex samplesBufferMutex; |
| 30 |
|
| 31 |
Bool userProvidedClock; |
| 32 |
|
| 33 |
HANDLE asyncEvent; |
| 34 |
|
| 35 |
IWMReader *reader; |
| 36 |
IWMReaderAdvanced2 *readerAdvanced; |
| 37 |
|
| 38 |
HRESULT GetHeaderAttribute(IWMHeaderInfo *, LPCWSTR, BYTE **); |
| 39 |
|
| 40 |
Void WaitForEvent(HANDLE, DWORD = INFINITE); |
| 41 |
public: |
| 42 |
static const String &GetComponentSpecs(); |
| 43 |
|
| 44 |
static Void Initialize(); |
| 45 |
static Void Cleanup(); |
| 46 |
|
| 47 |
DecoderWMA(); |
| 48 |
~DecoderWMA(); |
| 49 |
|
| 50 |
Bool CanOpenStream(const String &); |
| 51 |
Error GetStreamInfo(const String &, Track &); |
| 52 |
|
| 53 |
Bool Activate(); |
| 54 |
Bool Deactivate(); |
| 55 |
|
| 56 |
Bool Seek(Int64); |
| 57 |
|
| 58 |
Int ReadData(Buffer<UnsignedByte> &); |
| 59 |
}; |
| 60 |
}; |
| 61 |
|
| 62 |
BoCA_DEFINE_DECODER_COMPONENT(DecoderWMA) |
| 63 |
|
| 64 |
BoCA_END_COMPONENT(DecoderWMA) |