1 // GnashVaapiImage.h: GnashImage class used with VA API
3 // Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #ifndef GNASH_GNASHVAAPIIMAGE_H
21 #define GNASH_GNASHVAAPIIMAGE_H
23 #include <boost/shared_ptr.hpp>
25 #include "GnashImage.h"
30 // Forward declarations
32 class VaapiSurfaceProxy
;
34 /// GnashImage implementation using a VA surface
35 class DSOEXPORT GnashVaapiImage
: public image::GnashImage
37 boost::shared_ptr
<VaapiSurface
> _surface
;
38 boost::uint64_t _creation_time
;
40 /// Transfer (and convert) VA surface to CPU image data
44 GnashVaapiImage(boost::shared_ptr
<VaapiSurface
> surface
,
45 image::ImageType type
);
46 GnashVaapiImage(const GnashVaapiImage
& o
);
49 virtual void update(boost::shared_ptr
<VaapiSurface
> surface
);
50 virtual void update(boost::uint8_t* data
);
51 virtual void update(const image::GnashImage
& from
);
53 /// Get access to the underlying surface
55 /// @return A pointer to the VA surface.
56 boost::shared_ptr
<VaapiSurface
> surface() const
59 /// Get access to the underlying data
61 /// NOTE: This function shall not be used
64 virtual iterator
begin();
66 /// Get read-only access to the underlying data
68 /// @return A read-only pointer to the raw image data.
69 virtual const_iterator
begin() const;
74 #endif // GNASH_GNASHVAAPIIMAGE_H
78 // indent-tabs-mode: t