Debian Codegraph @

components/decoder/wma/wma.h

raw symbols SCIP
1 /* BoCA - BonkEnc Component Architecture
2 * Copyright (C) 2007-2019 Robert Kausch <[email protected]>
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation, either version 2 of
7 * the License, or (at your option) any later version.
8 *
9 * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
10 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
11 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */
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)