Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(606)

Unified Diff: media/mf/basic_renderer.h

Issue 3156046: Changed mft_h264_decoder's API to match with video_decode_engine.h. Also chan... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/mf/basic_renderer.h
===================================================================
--- media/mf/basic_renderer.h (revision 57106)
+++ media/mf/basic_renderer.h (working copy)
@@ -1,60 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-//
-// Short / basic implementation to simulate rendering H.264 frames outputs by
-// MF's H.264 decoder to screen.
-
-#ifndef MEDIA_MF_BASIC_RENDERER_H_
-#define MEDIA_MF_BASIC_RENDERER_H_
-
-#include <d3d9.h>
-
-#include "base/scoped_ptr.h"
-#include "base/scoped_comptr_win.h"
-#include "media/base/video_frame.h"
-#include "media/mf/mft_h264_decoder.h"
-
-namespace media {
-
-class MftRenderer : public base::RefCountedThreadSafe<MftRenderer> {
- public:
- explicit MftRenderer(MftH264Decoder* decoder) : decoder_(decoder) {}
- virtual ~MftRenderer() {}
- virtual void ProcessFrame(scoped_refptr<VideoFrame> frame) = 0;
- virtual void StartPlayback() = 0;
- virtual void OnDecodeError(MftH264Decoder::Error error) = 0;
-
- protected:
- scoped_refptr<MftH264Decoder> decoder_;
-};
-
-// This renderer does nothing with the frame except discarding it.
-class NullRenderer : public MftRenderer {
- public:
- explicit NullRenderer(MftH264Decoder* decoder);
- virtual ~NullRenderer();
- virtual void ProcessFrame(scoped_refptr<VideoFrame> frame);
- virtual void StartPlayback();
- virtual void OnDecodeError(MftH264Decoder::Error error);
-};
-
-// This renderer does a basic playback by drawing to |window_|. It tries to
-// respect timing specified in the recevied VideoFrames.
-class BasicRenderer : public MftRenderer {
- public:
- explicit BasicRenderer(MftH264Decoder* decoder,
- HWND window, IDirect3DDevice9* device);
- virtual ~BasicRenderer();
- virtual void ProcessFrame(scoped_refptr<VideoFrame> frame);
- virtual void StartPlayback();
- virtual void OnDecodeError(MftH264Decoder::Error error);
-
- private:
- HWND window_;
- ScopedComPtr<IDirect3DDevice9> device_;
-};
-
-} // namespace media
-
-#endif // MEDIA_MF_BASIC_RENDERER_H_

Powered by Google App Engine
This is Rietveld 408576698