Gnash 0.8.10dev
GnashVaapiImage.h
Go to the documentation of this file.
00001 // GnashVaapiImage.h: GnashImage class used with VA API
00002 // 
00003 // Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
00004 // 
00005 // This program is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation; either version 3 of the License, or
00008 // (at your option) any later version.
00009 // 
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 // 
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018 //
00019 
00020 #ifndef GNASH_GNASHVAAPIIMAGE_H
00021 #define GNASH_GNASHVAAPIIMAGE_H
00022 
00023 #include <boost/shared_ptr.hpp>
00024 
00025 #include "GnashImage.h"
00026 #include "dsodefs.h"
00027 
00028 namespace gnash {
00029 
00030 // Forward declarations
00031 class VaapiSurface;
00032 class VaapiSurfaceProxy;
00033 
00035 class DSOEXPORT GnashVaapiImage : public image::GnashImage
00036 {
00037     boost::shared_ptr<VaapiSurface> _surface;
00038     boost::uint64_t _creation_time;
00039 
00041     bool transfer();
00042 
00043 public:
00044     GnashVaapiImage(boost::shared_ptr<VaapiSurface> surface,
00045             image::ImageType type);
00046     GnashVaapiImage(const GnashVaapiImage& o);
00047     ~GnashVaapiImage();
00048 
00049     virtual void update(boost::shared_ptr<VaapiSurface> surface);
00050     virtual void update(boost::uint8_t* data);
00051     virtual void update(const image::GnashImage& from);
00052 
00054     //
00056     boost::shared_ptr<VaapiSurface> surface() const
00057         { return _surface; }
00058 
00060     //
00062     //
00064     virtual iterator begin();
00065 
00067     //
00069     virtual const_iterator begin() const;
00070 };
00071 
00072 } // gnash namespace
00073 
00074 #endif // GNASH_GNASHVAAPIIMAGE_H
00075 
00076 // local Variables:
00077 // mode: C++
00078 // indent-tabs-mode: t
00079 // End: