From 845e795cff3c6fdc2202f559ee3f1e899f4d101c Mon Sep 17 00:00:00 2001 From: "imcheng@chromium.org" Date: Tue, 14 Sep 2010 00:16:47 +0000 Subject: 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 --- media/mf/mft_h264_decoder.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'media/mf/mft_h264_decoder.h') 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 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 d3d9_; ScopedComPtr device_; ScopedComPtr device_manager_; - HWND device_window_; + HWND draw_window_; ScopedComPtr decoder_; MFT_INPUT_STREAM_INFO input_stream_info_; -- cgit v1.1