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 <memory>
28 
29 #include <va/va.h>
30 
31 namespace gnash
32 {
33 
34 namespace renderer {
35 
36 namespace vaapi {
37 
39 {
40  public:
41  VaapiDevice();
42  ~VaapiDevice();
43 
44  // Initialize Vaapi Device layer
45  bool initDevice(int argc, char *argv[]);
46 
47  // Initialize Vaapi Window layer
48  // bool initVaapi(VaapiNativeWindowType window);
49 
50  // Utility methods not in the base class
52  const char *getErrorString(DFBResult error);
53 
54  // Accessors for the settings needed by higher level code.
55  // Surface accessors
56  size_t getWidth() {
57  // return getWidth(_surface);
58  }
59 
60  size_t getWidth(IVaapiSurface *surface) {
61  return 0;
62  };
63  size_t getHeigth() {
64  // return getHeigth(_surface);
65  }
66 
67  size_t getHeigth(IVaapiSurface *surface) {
68  return 0;
69  }
70  size_t getVerticalRes() {
71  return getVerticalRes(_screen);
72  }
73  size_t getVerticalRes(IVaapiScreen *screen) {
74  return 0;
75  }
76  size_t getHorzRes() {
77  return getHorzRes(_screen);
78  }
79  size_t getHorzRes(IVaapiScreen *screen) {
80  return 0;
81  }
82 
84  return true;
85  }
86 
88  if (_surface) {
89  DFBSurfaceCapabilities caps;
90  _surface->GetCapabilities(_surface, &amp;caps);
91  if (caps &amp; DSCAPS_DOUBLE) {
92  return true;
93  }
94  return false;
95  }
96  }
98  // return isBufferDestroyed(_vaapiSurface);
99  return false;
100  }
101  bool isBufferDestroyed(IVaapiSurface surface) {
102  return false;
103  }
104  bool isMultiSample() {
105  return false;
106  }
107  int getSurfaceID() {
108  return 0;
109  }
110 
111  // Context accessors
112  int getContextID() {
113  return 0;
114  }
115 
117  return false;
118  }
120  return true;
121  }
122 
123  int getDepth() {
124  }
125  int getDepth(DFBSurfacePixelFormat format);
126 
127 private:
128 
129 };
130 
131 } // namespace vaapi
132 } // namespace renderer
133 } // namespace gnash
134 
135 #endif // end of __VAAPI_DEVICE_H__
136 
137 // local Variables:
138 // mode: C++
139 // indent-tabs-mode: nil
140 // End:
Definition: VaapiDevice.h:38
size_t getHeigth()
Definition: VaapiDevice.h:63
bool isSurfaceBackBuffered()
Definition: VaapiDevice.h:87
bool isContextBackBuffered()
Definition: VaapiDevice.h:119
int getContextID()
Definition: VaapiDevice.h:112
VaapiDevice()
Definition: VaapiDevice.cpp:46
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
bool isContextSingleBuffered()
Definition: VaapiDevice.h:116
~VaapiDevice()
Definition: VaapiDevice.cpp:51
size_t getVerticalRes(IVaapiScreen *screen)
Definition: VaapiDevice.h:73
size_t getHeigth(IVaapiSurface *surface)
Definition: VaapiDevice.h:67
size_t getWidth()
Definition: VaapiDevice.h:56
bool isMultiSample()
Definition: VaapiDevice.h:104
bool isBufferDestroyed()
Definition: VaapiDevice.h:97
bool initDevice(int argc, char *argv[])
Definition: VaapiDevice.cpp:57
bool isBufferDestroyed(IVaapiSurface surface)
Definition: VaapiDevice.h:101
int getDepth()
Definition: VaapiDevice.h:123
size_t getVerticalRes()
Definition: VaapiDevice.h:70
size_t getHorzRes()
Definition: VaapiDevice.h:76
size_t getWidth(IVaapiSurface *surface)
Definition: VaapiDevice.h:60
bool isSurfaceSingleBuffered()
Definition: VaapiDevice.h:83
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:79
int getSurfaceID()
Definition: VaapiDevice.h:107