Gnash  0.8.11dev
VaapiDevice.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010. 2011, 2012
3 // Free Software Foundation, Inc
4 //
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.
9 //
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.
14 //
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
18 //
19 
20 #ifndef __VAAPI_DEVICE_H__
21 #define __VAAPI_DEVICE_H__ 1
22 
23 #ifdef HAVE_CONFIG_H
24 #include "gnashconfig.h"
25 #endif
26 
27 #include <boost/scoped_array.hpp>
28 #include <boost/scoped_ptr.hpp>
29 
30 #include <va/va.h>
31 
32 namespace gnash
33 {
34 
35 namespace renderer {
36 
37 namespace vaapi {
38 
40 {
41  public:
42  VaapiDevice();
43  ~VaapiDevice();
44 
45  // Initialize Vaapi Device layer
46  bool initDevice(int argc, char *argv[]);
47 
48  // Initialize Vaapi Window layer
49  // bool initVaapi(VaapiNativeWindowType window);
50 
51  // Utility methods not in the base class
53  const char *getErrorString(DFBResult error);
54 
55  // Accessors for the settings needed by higher level code.
56  // Surface accessors
57  size_t getWidth() {
58  // return getWidth(_surface);
59  }
60 
61  size_t getWidth(IVaapiSurface *surface) {
62  return 0;
63  };
64  size_t getHeigth() {
65  // return getHeigth(_surface);
66  }
67 
68  size_t getHeigth(IVaapiSurface *surface) {
69  return 0;
70  }
71  size_t getVerticalRes() {
72  return getVerticalRes(_screen);
73  }
74  size_t getVerticalRes(IVaapiScreen *screen) {
75  return 0;
76  }
77  size_t getHorzRes() {
78  return getHorzRes(_screen);
79  }
80  size_t getHorzRes(IVaapiScreen *screen) {
81  return 0;
82  }
83 
85  return true;
86  }
87 
89  if (_surface) {
90  DFBSurfaceCapabilities caps;
91  _surface->GetCapabilities(_surface, &amp;caps);
92  if (caps &amp; DSCAPS_DOUBLE) {
93  return true;
94  }
95  return false;
96  }
97  }
99  // return isBufferDestroyed(_vaapiSurface);
100  return false;
101  }
102  bool isBufferDestroyed(IVaapiSurface surface) {
103  return false;
104  }
105  bool isMultiSample() {
106  return false;
107  }
108  int getSurfaceID() {
109  return 0;
110  }
111 
112  // Context accessors
113  int getContextID() {
114  return 0;
115  }
116 
118  return false;
119  }
121  return true;
122  }
123 
124  int getDepth() {
125  }
126  int getDepth(DFBSurfacePixelFormat format);
127 
128 private:
129 
130 };
131 
132 } // namespace vaapi
133 } // namespace renderer
134 } // namespace gnash
135 
136 #endif // end of __VAAPI_DEVICE_H__
137 
138 // local Variables:
139 // mode: C++
140 // indent-tabs-mode: nil
141 // End:
Definition: VaapiDevice.h:39
size_t getHeigth()
Definition: VaapiDevice.h:64
bool isSurfaceBackBuffered()
Definition: VaapiDevice.h:88
bool isContextBackBuffered()
Definition: VaapiDevice.h:120
int getContextID()
Definition: VaapiDevice.h:113
VaapiDevice()
Definition: VaapiDevice.cpp:46
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
bool isContextSingleBuffered()
Definition: VaapiDevice.h:117
~VaapiDevice()
Definition: VaapiDevice.cpp:51
size_t getVerticalRes(IVaapiScreen *screen)
Definition: VaapiDevice.h:74
size_t getHeigth(IVaapiSurface *surface)
Definition: VaapiDevice.h:68
size_t getWidth()
Definition: VaapiDevice.h:57
bool isMultiSample()
Definition: VaapiDevice.h:105
bool isBufferDestroyed()
Definition: VaapiDevice.h:98
bool initDevice(int argc, char *argv[])
Definition: VaapiDevice.cpp:57
cairo_surface_t * _surface
Definition: Renderer_cairo.cpp:216
bool isBufferDestroyed(IVaapiSurface surface)
Definition: VaapiDevice.h:102
int getDepth()
Definition: VaapiDevice.h:124
size_t getVerticalRes()
Definition: VaapiDevice.h:71
size_t getHorzRes()
Definition: VaapiDevice.h:77
size_t getWidth(IVaapiSurface *surface)
Definition: VaapiDevice.h:61
bool isSurfaceSingleBuffered()
Definition: VaapiDevice.h:84
const char * getErrorString(DFBResult error)
Return a string with the error code as text, instead of a numeric value.
size_t getHorzRes(IVaapiScreen *screen)
Definition: VaapiDevice.h:80
int getSurfaceID()
Definition: VaapiDevice.h:108