Bumping manifests a=b2g-bump
[gecko.git] / media / gmp-clearkey / 0.1 / WMFAACDecoder.h
blob3099eeea28531248ce9a460019c2ed85499058cb
1 /*
2 * Copyright 2013, Mozilla Foundation and contributors
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #if !defined(WMFAACDecoder_h_)
18 #define WMFAACDecoder_h_
20 #include "WMFUtils.h"
22 namespace wmf {
24 class WMFAACDecoder {
25 public:
26 WMFAACDecoder();
27 ~WMFAACDecoder();
29 HRESULT Init(int32_t aChannelCount,
30 int32_t aSampleRate,
31 BYTE* aUserData,
32 UINT32 aUserDataLength);
34 HRESULT Input(const uint8_t* aData,
35 uint32_t aDataSize,
36 Microseconds aTimestamp);
38 HRESULT Output(IMFSample** aOutput);
40 HRESULT Reset();
42 HRESULT Drain();
44 UINT32 Channels() const { return mChannels; }
45 UINT32 Rate() const { return mRate; }
47 private:
49 HRESULT GetOutputSample(IMFSample** aOutSample);
50 HRESULT CreateOutputSample(IMFSample** aOutSample);
51 HRESULT CreateInputSample(const uint8_t* aData,
52 uint32_t aDataSize,
53 Microseconds aTimestamp,
54 IMFSample** aOutSample);
56 HRESULT SetDecoderInputType(int32_t aChannelCount,
57 int32_t aSampleRate,
58 BYTE* aUserData,
59 UINT32 aUserDataLength);
60 HRESULT SetDecoderOutputType();
61 HRESULT SendMFTMessage(MFT_MESSAGE_TYPE aMsg, UINT32 aData);
63 MFT_INPUT_STREAM_INFO mInputStreamInfo;
64 MFT_OUTPUT_STREAM_INFO mOutputStreamInfo;
66 CComPtr<IMFTransform> mDecoder;
68 UINT32 mChannels;
69 UINT32 mRate;
74 #endif