Gnash  0.8.11dev
GnashVaapiImage.h
Go to the documentation of this file.
1 // GnashVaapiImage.h: GnashImage class used with VA API
2 //
3 // Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012
4 // Free Software Foundation, Inc.
5 //
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 3 of the License, or
9 // (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 //
20 
21 #ifndef GNASH_GNASHVAAPIIMAGE_H
22 #define GNASH_GNASHVAAPIIMAGE_H
23 
24 
25 #include "GnashImage.h"
26 #include "dsodefs.h"
27 
28 namespace gnash {
29 
30 // Forward declarations
31 class VaapiSurface;
32 class VaapiSurfaceProxy;
33 
36 {
37  std::shared_ptr<VaapiSurface> _surface;
38  std::uint64_t _creation_time;
39 
41  bool transfer();
42 
43 public:
44  GnashVaapiImage(std::shared_ptr<VaapiSurface> surface,
47  ~GnashVaapiImage();
48 
49  virtual void update(std::shared_ptr<VaapiSurface> surface);
50  virtual void update(std::uint8_t* data);
51  virtual void update(const image::GnashImage& from);
52 
54  //
56  std::shared_ptr<VaapiSurface> surface() const
57  { return _surface; }
58 
60  //
62  //
64  virtual iterator begin();
65 
67  //
69  virtual const_iterator begin() const;
70 };
71 
72 } // gnash namespace
73 
74 #endif // GNASH_GNASHVAAPIIMAGE_H
75 
76 // local Variables:
77 // mode: C++
78 // indent-tabs-mode: t
79 // End:
gnash::image::begin
pixel_iterator< T > begin(GnashImage &im)
Definition: ImageIterators.h:191
height
@ height
Definition: klash_part.cpp:329
gnash::image::GnashImage::_height
const size_t _height
Height of image, in pixels.
Definition: GnashImage.h:206
gnash::image::GnashImage::stride
virtual size_t stride() const
Get the pitch of the image buffer.
Definition: GnashImage.h:112
dsodefs.h
gnash::log_debug
void log_debug(StringType msg, Args... args)
Definition: log.h:301
gnash::image::GnashImage::iterator
value_type * iterator
Definition: GnashImage.h:83
gnash::GnashVaapiImage::update
virtual void update(std::shared_ptr< VaapiSurface > surface)
Definition: GnashVaapiImage.cpp:61
_
#define _(String)
Definition: log.h:44
gnash
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
gnash::image::GnashImage
Base class for different types of bitmaps.
Definition: GnashImage.h:78
GnashImage.h
gnash::GnashVaapiImage
GnashImage implementation using a VA surface.
Definition: GnashVaapiImage.h:36
gnash::log_error
void log_error(StringType msg, Args... args)
Definition: log.h:283
gnash::image::GnashImage::type
ImageType type() const
Return the ImageType of the image.
Definition: GnashImage.h:91
CLOCK_REALTIME
#define CLOCK_REALTIME
Definition: getclocktime.hpp:44
gnash::key::t
@ t
Definition: GnashKey.h:166
gnash::GnashVaapiImage::GnashVaapiImage
GnashVaapiImage(std::shared_ptr< VaapiSurface > surface, image::ImageType type)
Definition: GnashVaapiImage.cpp:43
gnash::image::GnashImage::const_iterator
const value_type * const_iterator
Definition: GnashImage.h:84
gnash::GnashVaapiImage::~GnashVaapiImage
~GnashVaapiImage()
Definition: GnashVaapiImage.cpp:55
gnash::key::type
type
Definition: GnashKey.h:330
gnash::image::GnashImage::location
ImageLocation location() const
Return the ImageLocation of the image.
Definition: GnashImage.h:98
GnashVaapiImage.h
gnash::image::GNASH_IMAGE_CPU
@ GNASH_IMAGE_CPU
Definition: GnashImage.h:56
VaapiSurface.h
log.h
gnash::GnashVaapiImage::GnashVaapiImage
GnashVaapiImage(const GnashVaapiImage &o)
gnash::image::GnashImage::size
size_t size() const
Get the size of the image buffer.
Definition: GnashImage.h:105
gnash::image::GnashImage::begin
virtual iterator begin()
Access the raw data.
Definition: GnashImage.h:154
DSOEXPORT
#define DSOEXPORT
Definition: dsodefs.h:55
gnash::image::GnashImage::_data
container_type _data
Data if held in this class.
Definition: GnashImage.h:209
gnash::image::ImageType
ImageType
The types of images handled in Gnash.
Definition: GnashImage.h:47
gnash::GnashVaapiImage::surface
std::shared_ptr< VaapiSurface > surface() const
Get access to the underlying surface.
Definition: GnashVaapiImage.h:56
gnash::image::GnashImage::_width
const size_t _width
Width of image, in pixels.
Definition: GnashImage.h:203
gnash::GnashVaapiImage::begin
virtual iterator begin()
Get access to the underlying data.
Definition: GnashVaapiImage.cpp:110
gnash::image::GNASH_IMAGE_GPU
@ GNASH_IMAGE_GPU
Definition: GnashImage.h:57
gnash::key::o
@ o
Definition: GnashKey.h:161
width
@ width
Definition: klash_part.cpp:329
data
SimpleBuffer data
Definition: LocalConnection_as.cpp:151