summaryrefslogtreecommitdiffstats
path: root/media/tools/player_x11/x11_video_renderer.h
diff options
context:
space:
mode:
authorscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-22 19:40:09 +0000
committerscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-22 19:40:09 +0000
commit30626f673b1aefbbd0b9b88129e10ce9c24e2ff7 (patch)
treecf794c04216b8b2b8230bfbac911e6db67c2ec6d /media/tools/player_x11/x11_video_renderer.h
parente6e35cd27ad71461e765f90f3fbdf634e2dc90a9 (diff)
downloadchromium_src-30626f673b1aefbbd0b9b88129e10ce9c24e2ff7.zip
chromium_src-30626f673b1aefbbd0b9b88129e10ce9c24e2ff7.tar.gz
chromium_src-30626f673b1aefbbd0b9b88129e10ce9c24e2ff7.tar.bz2
Replace subclass interface from VideoRendererBase with a single paint callback.
As a result, many of the existing VideoRendererBase subclasses have been simplified or even removed entirely. BUG=28208 Review URL: http://codereview.chromium.org/8999029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115583 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/tools/player_x11/x11_video_renderer.h')
-rw-r--r--media/tools/player_x11/x11_video_renderer.h29
1 files changed, 11 insertions, 18 deletions
diff --git a/media/tools/player_x11/x11_video_renderer.h b/media/tools/player_x11/x11_video_renderer.h
index 667b2cf..1ce5b62 100644
--- a/media/tools/player_x11/x11_video_renderer.h
+++ b/media/tools/player_x11/x11_video_renderer.h
@@ -7,29 +7,24 @@
#include <X11/Xlib.h>
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-#include "media/filters/video_renderer_base.h"
+#include "base/basictypes.h"
class MessageLoop;
-class X11VideoRenderer : public media::VideoRendererBase {
+namespace media {
+class VideoFrame;
+}
+
+class X11VideoRenderer {
public:
- X11VideoRenderer(Display* display, Window window,
- MessageLoop* main_message_loop);
+ X11VideoRenderer(Display* display, Window window);
+ ~X11VideoRenderer();
- protected:
- // VideoRendererBase implementation.
- virtual bool OnInitialize(media::VideoDecoder* decoder) OVERRIDE;
- virtual void OnStop(const base::Closure& callback) OVERRIDE;
- virtual void OnFrameAvailable() OVERRIDE;
+ void Paint(media::VideoFrame* video_frame);
private:
- // Only allow to be deleted by reference counting.
- friend class scoped_refptr<X11VideoRenderer>;
- virtual ~X11VideoRenderer();
-
- void PaintOnMainThread();
+ // Initializes X11 rendering for the given dimensions.
+ void Initialize(int width, int height);
Display* display_;
Window window_;
@@ -43,8 +38,6 @@ class X11VideoRenderer : public media::VideoRendererBase {
bool use_render_;
- MessageLoop* main_message_loop_;
-
DISALLOW_COPY_AND_ASSIGN(X11VideoRenderer);
};