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_
24 class WMFH264Decoder
{
31 HRESULT
Input(const uint8_t* aData
,
33 Microseconds aTimestamp
,
34 Microseconds aDuration
);
36 HRESULT
Output(IMFSample
** aOutput
);
40 int32_t GetFrameWidth() const;
41 int32_t GetFrameHeight() const;
42 const IntRect
& GetPictureRegion() const;
43 int32_t GetStride() const;
49 HRESULT
SetDecoderInputType();
50 HRESULT
SetDecoderOutputType();
51 HRESULT
SendMFTMessage(MFT_MESSAGE_TYPE aMsg
, UINT32 aData
);
53 HRESULT
CreateInputSample(const uint8_t* aData
,
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
;
71 IntRect mPictureRegion
;