summaryrefslogtreecommitdiffstats
path: root/media/mf/mft_h264_decoder.h
diff options
context:
space:
mode:
authorimcheng@chromium.org <imcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-14 00:16:47 +0000
committerimcheng@chromium.org <imcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-14 00:16:47 +0000
commit845e795cff3c6fdc2202f559ee3f1e899f4d101c (patch)
treedb7dc6b0932037ab2c5d0c4e2754f61d45b60972 /media/mf/mft_h264_decoder.h
parentc11fd96976bb5f32bebe14a146b00f16a5928b19 (diff)
downloadchromium_src-845e795cff3c6fdc2202f559ee3f1e899f4d101c.zip
chromium_src-845e795cff3c6fdc2202f559ee3f1e899f4d101c.tar.gz
chromium_src-845e795cff3c6fdc2202f559ee3f1e899f4d101c.tar.bz2
Restored the d3d surface rendering option for mft_h264_decoder. To do this, we need to pass in the window to be drawn to when we create the device. Thus the decoder's constructor now takes an extra argument HWND.
Things to do in upcoming patches: - move files to media/video and change name to XXXdecode_engine - refactor, add helper methods in the unittest - handle the "device lost" case during rendering (this can happen if screen resolution changed after creation of device, for example) - implement the context interface and have the decoder output d3dtextures BUG=none TEST=compile, decoder's unittest still passes Review URL: http://codereview.chromium.org/3331026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59309 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/mf/mft_h264_decoder.h')
-rw-r--r--media/mf/mft_h264_decoder.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/media/mf/mft_h264_decoder.h b/media/mf/mft_h264_decoder.h
index ede63cb..61e3c65 100644
--- a/media/mf/mft_h264_decoder.h
+++ b/media/mf/mft_h264_decoder.h
@@ -33,7 +33,7 @@ class MftH264Decoder : public media::VideoDecodeEngine {
kStopped, // upon output EOS received.
} State;
- explicit MftH264Decoder(bool use_dxva);
+ explicit MftH264Decoder(bool use_dxva, HWND draw_window);
~MftH264Decoder();
virtual void Initialize(MessageLoop* message_loop,
media::VideoDecodeEngine::EventHandler* event_handler,
@@ -45,6 +45,7 @@ class MftH264Decoder : public media::VideoDecodeEngine {
virtual void ProduceVideoFrame(scoped_refptr<VideoFrame> frame);
bool use_dxva() const { return use_dxva_; }
+ IDirect3DDevice9* device() const { return device_.get(); }
State state() const { return state_; }
private:
@@ -73,7 +74,7 @@ class MftH264Decoder : public media::VideoDecodeEngine {
ScopedComPtr<IDirect3D9> d3d9_;
ScopedComPtr<IDirect3DDevice9> device_;
ScopedComPtr<IDirect3DDeviceManager9> device_manager_;
- HWND device_window_;
+ HWND draw_window_;
ScopedComPtr<IMFTransform> decoder_;
MFT_INPUT_STREAM_INFO input_stream_info_;