summaryrefslogtreecommitdiffstats
path: root/media/tools/player_x11/x11_video_renderer.h
diff options
context:
space:
mode:
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);
};