Bumping manifests a=b2g-bump
[gecko.git] / media / gmp-clearkey / 0.1 / WMFH264Decoder.h
blob2d2b39659e4796fae1234f35a2ee43eb4b20c274
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(WMFH264Decoder_h_)
18 #define WMFH264Decoder_h_
20 #include "WMFUtils.h"
22 namespace wmf {
24 class WMFH264Decoder {
25 public:
26 WMFH264Decoder();
27 ~WMFH264Decoder();
29 HRESULT Init();
31 HRESULT Input(const uint8_t* aData,
32 uint32_t aDataSize,
33 Microseconds aTimestamp,
34 Microseconds aDuration);
36 HRESULT Output(IMFSample** aOutput);
38 HRESULT Reset();
40 int32_t GetFrameWidth() const;
41 int32_t GetFrameHeight() const;
42 const IntRect& GetPictureRegion() const;
43 int32_t GetStride() const;
45 HRESULT Drain();
47 private:
49 HRESULT SetDecoderInputType();
50 HRESULT SetDecoderOutputType();
51 HRESULT SendMFTMessage(MFT_MESSAGE_TYPE aMsg, UINT32 aData);
53 HRESULT CreateInputSample(const uint8_t* aData,
54 uint32_t aDataSize,
55 Microseconds aTimestamp,
56 Microseconds aDuration,
57 IMFSample** aOutSample);
59 HRESULT CreateOutputSample(IMFSample** aOutSample);
61 HRESULT GetOutputSample(IMFSample** aOutSample);
62 HRESULT ConfigureVideoFrameGeometry(IMFMediaType* aMediaType);
64 MFT_INPUT_STREAM_INFO mInputStreamInfo;
65 MFT_OUTPUT_STREAM_INFO mOutputStreamInfo;
67 CComPtr<IMFTransform> mDecoder;
69 int32_t mVideoWidth;
70 int32_t mVideoHeight;
71 IntRect mPictureRegion;
72 int32_t mStride;
76 } // namespace wmf
78 #endif