Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifdef HAVE_CONFIG_H
00021 #include "gnashconfig.h"
00022 #endif
00023
00024 #include "gtk_glue.h"
00025
00026 #include <gtk/gtk.h>
00027 #include <gdk/gdk.h>
00028 #include <boost/shared_ptr.hpp>
00029 #include <boost/scoped_array.hpp>
00030 #include <memory>
00031 #include "vaapi/VaapiImageFormat.h"
00032
00033 namespace gnash
00034 {
00035
00036
00037 class VaapiImage;
00038 class VaapiSurface;
00039 class VaapiSubpicture;
00040 class VaapiRectangle;
00041 class VaapiVideoWindow;
00042 class Renderer_agg_base;
00043 class movie_root;
00044
00045 class GtkAggVaapiGlue : public GtkGlue
00046 {
00047 public:
00048 GtkAggVaapiGlue();
00049 ~GtkAggVaapiGlue();
00050
00051 bool init(int argc, char **argv[]);
00052 void prepDrawingArea(GtkWidget *drawing_area);
00053 Renderer* createRenderHandler();
00054 void setRenderHandlerSize(int width, int height);
00055 virtual void beforeRendering(movie_root* stage);
00056 void render();
00057 void render(GdkRegion * const);
00058 void configure(GtkWidget *const widget, GdkEventConfigure *const event);
00059
00060 private:
00061 VaapiVideoWindow *getVideoWindow(boost::shared_ptr<VaapiSurface> surface,
00062 GdkWindow *parent_window,
00063 VaapiRectangle const & rect);
00064
00065 void resetRenderSurface(unsigned int width, unsigned int height);
00066
00067 private:
00068 Renderer_agg_base *_agg_renderer;
00069 VaapiImageFormat _vaapi_image_format;
00070 boost::shared_ptr<VaapiImage> _vaapi_image;
00071 unsigned int _vaapi_image_width;
00072 unsigned int _vaapi_image_height;
00073 boost::shared_ptr<VaapiSubpicture> _vaapi_subpicture;
00074 std::auto_ptr<VaapiSurface> _vaapi_surface;
00075 unsigned int _window_width;
00076 unsigned int _window_height;
00077 bool _window_is_setup;
00078 };
00079
00080 }