Gnash  0.8.10
VaapiDevice.h
Go to the documentation of this file.
00001 //
00002 //   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010. 2011, 2012
00003 //   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 __VAAPI_DEVICE_H__
00021 #define __VAAPI_DEVICE_H__ 1
00022 
00023 #ifdef HAVE_CONFIG_H
00024 #include "gnashconfig.h"
00025 #endif
00026 
00027 #include <boost/scoped_array.hpp>
00028 #include <boost/scoped_ptr.hpp>
00029 
00030 #include <va/va.h>
00031 
00032 namespace gnash
00033 {
00034 
00035 namespace renderer {
00036 
00037 namespace vaapi {
00038 
00039 class VaapiDevice
00040 {
00041   public:
00042     VaapiDevice();
00043     ~VaapiDevice();
00044 
00045     // Initialize Vaapi Device layer
00046     bool initDevice(int argc, char *argv[]);
00047 
00048     // Initialize Vaapi Window layer
00049     //    bool initVaapi(VaapiNativeWindowType window);
00050     
00051     // Utility methods not in the base class
00053     const char *getErrorString(DFBResult error);    
00054     
00055     // Accessors for the settings needed by higher level code.
00056     // Surface accessors
00057     size_t getWidth() {
00058         // return getWidth(_surface);
00059     }
00060     
00061     size_t getWidth(IVaapiSurface *surface) {
00062         return 0;
00063     };
00064     size_t getHeigth() {
00065         // return getHeigth(_surface);
00066     }
00067     
00068     size_t getHeigth(IVaapiSurface *surface) {
00069         return 0;
00070     }
00071     size_t getVerticalRes() {
00072         return getVerticalRes(_screen);
00073     }
00074     size_t getVerticalRes(IVaapiScreen *screen) {
00075         return 0;
00076     }
00077     size_t getHorzRes() {
00078         return getHorzRes(_screen);
00079     }
00080     size_t getHorzRes(IVaapiScreen *screen) {
00081         return 0;
00082     }
00083 
00084     bool isSurfaceSingleBuffered() {
00085         return true;
00086     }
00087     
00088     bool isSurfaceBackBuffered() {
00089         if (_surface) {
00090             DFBSurfaceCapabilities caps;
00091             _surface->GetCapabilities(_surface, &amp;caps);
00092             if (caps &amp; DSCAPS_DOUBLE) {
00093                 return true;
00094             }        
00095             return false;
00096         }
00097     }
00098     bool isBufferDestroyed() {
00099         // return isBufferDestroyed(_vaapiSurface);
00100         return false;
00101     }
00102     bool isBufferDestroyed(IVaapiSurface surface) {
00103         return false;
00104     }
00105     bool isMultiSample() {
00106         return false;
00107     }
00108     int getSurfaceID() {
00109         return 0;
00110     }
00111 
00112     // Context accessors
00113     int getContextID() {
00114         return 0;
00115     }
00116 
00117     bool isContextSingleBuffered() {
00118         return false;
00119     }
00120     bool isContextBackBuffered() {
00121         return true;
00122     }
00123 
00124     int getDepth() {
00125     }
00126     int getDepth(DFBSurfacePixelFormat format);
00127 
00128 private:
00129     
00130 };
00131 
00132 } // namespace vaapi
00133 } // namespace renderer
00134 } // namespace gnash
00135 
00136 #endif  // end of __VAAPI_DEVICE_H__
00137 
00138 // local Variables:
00139 // mode: C++
00140 // indent-tabs-mode: nil
00141 // End: