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 #ifdef HAVE_CONFIG_H
00020 #include "gnashconfig.h"
00021 #endif
00022
00023 #include "gtk_glue.h"
00024
00025 #include <gtk/gtk.h>
00026 #include <gdk/gdk.h>
00027 #include <boost/shared_ptr.hpp>
00028 #include <boost/scoped_array.hpp>
00029 #include <memory>
00030 #include "VaapiImageFormat.h"
00031
00032 namespace gnash
00033 {
00034
00035
00036 class VaapiImage;
00037 class VaapiSurface;
00038 class VaapiSubpicture;
00039 class VaapiRectangle;
00040 class VaapiVideoWindow;
00041 class Renderer_agg_base;
00042
00043 class GtkAggVaapiGlue : public GtkGlue
00044 {
00045 public:
00046 GtkAggVaapiGlue();
00047 ~GtkAggVaapiGlue();
00048
00049 bool init(int argc, char **argv[]);
00050 void prepDrawingArea(GtkWidget *drawing_area);
00051 Renderer* createRenderHandler();
00052 void setRenderHandlerSize(int width, int height);
00053 void beforeRendering();
00054 void render();
00055 void render(GdkRegion * const);
00056 void configure(GtkWidget *const widget, GdkEventConfigure *const event);
00057
00058 private:
00059 VaapiVideoWindow *getVideoWindow(boost::shared_ptr<VaapiSurface> surface,
00060 GdkWindow *parent_window,
00061 VaapiRectangle const & rect);
00062
00063 void resetRenderSurface(unsigned int width, unsigned int height);
00064
00065 private:
00066 Renderer_agg_base *_agg_renderer;
00067 VaapiImageFormat _vaapi_image_format;
00068 boost::shared_ptr<VaapiImage> _vaapi_image;
00069 unsigned int _vaapi_image_width;
00070 unsigned int _vaapi_image_height;
00071 boost::shared_ptr<VaapiSubpicture> _vaapi_subpicture;
00072 std::auto_ptr<VaapiSurface> _vaapi_surface;
00073 unsigned int _window_width;
00074 unsigned int _window_height;
00075 bool _window_is_setup;
00076 };
00077
00078 }