Gnash  0.8.11dev
VaapiSurfaceGLX.h
Go to the documentation of this file.
1 // VaapiSurfaceGLX.h: VA/GLX surface abstraction
2 //
3 // Copyright (C) 2009, 2010, 2011, 2012 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 GNASH_VAAPISURFACEGLX_H
21 #define GNASH_VAAPISURFACEGLX_H
22 
23 #include <GL/gl.h>
24 
25 #include "dsodefs.h"
26 #include "vaapi_common.h"
27 #include "VaapiSurface.h"
28 
29 namespace gnash {
30 
33 {
34  std::unique_ptr<VaapiSurfaceImplBase> _impl;
35 
36 public:
37  VaapiSurfaceGLX(GLenum target, GLuint texture);
38 
40  void *get() const { return reinterpret_cast<void *>(_impl->surface()); }
41 
43  unsigned int width() const { return _impl->width(); }
44 
46  unsigned int height() const { return _impl->height(); }
47 
49  bool update(std::shared_ptr<VaapiSurface> surface);
50 };
51 
52 } // gnash namespace
53 
54 #endif // GNASH_VAAPISURFACEGLX_H
55 
56 // local Variables:
57 // mode: C++
58 // indent-tabs-mode: nil
59 // End:
60 
gnash::VaapiSurfaceGLX::get
void * get() const
Return VA surface id.
Definition: VaapiSurfaceGLX.h:40
dsodefs.h
gnash::VaapiSurfaceImplBase::surface
uintptr_t surface() const
Get VA surface.
Definition: VaapiSurface.h:57
gnash::log_debug
void log_debug(StringType msg, Args... args)
Definition: log.h:301
_
#define _(String)
Definition: log.h:44
gnash
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
GNASH_REPORT_FUNCTION
#define GNASH_REPORT_FUNCTION
Definition: log.h:452
gnash::VaapiGlobalContext::get
static VaapiGlobalContext * get()
Get the unique global VA context.
Definition: VaapiGlobalContext.cpp:130
ts
std::uint32_t ts
Definition: LocalConnection_as.cpp:150
gnash::VaapiSurfaceGLX
VA/GLX surface abstraction.
Definition: VaapiSurfaceGLX.h:33
gnash::vaapi_check_status
bool vaapi_check_status(VAStatus status, const char *msg)
Check VA status for success or print out an error.
Definition: vaapi_utils.cpp:51
gnash::VaapiSurfaceGLX::VaapiSurfaceGLX
VaapiSurfaceGLX(GLenum target, GLuint texture)
Definition: VaapiSurfaceGLX.cpp:231
vaapi_common.h
VaapiGlobalContext.h
VaapiSurfaceGLX.h
VaapiSurface.h
log.h
gnash::VaapiSurfaceGLX::update
bool update(std::shared_ptr< VaapiSurface > surface)
Update VA/GLX surface from VA surface.
Definition: VaapiSurfaceGLX.cpp:236
DSOEXPORT
#define DSOEXPORT
Definition: dsodefs.h:55
gnash::VaapiSurfaceGLX::height
unsigned int height() const
Get surface height.
Definition: VaapiSurfaceGLX.h:46
gnash::vaapi_dprintf
void DSOEXPORT vaapi_dprintf(const char *format,...)
Debug output.
Definition: vaapi_utils.cpp:41
gnash::VaapiSurfaceGLX::width
unsigned int width() const
Get surface width.
Definition: VaapiSurfaceGLX.h:43
vaapi_utils.h