#include <cstring>#include <string.h>#include "mmstools/base.h"#include "mmstools/mmstypes.h"#include "mmstools/mmsmutex.h"#include "mmstools/mmstafffile.h"#include <X11/Xlib.h>#include <X11/Xutil.h>#include <X11/extensions/XShm.h>#include <direct/debug.h>#include <direct/trace.h>#include <directfb.h>#include <directfb_keynames.h>#include <directfb_strings.h>#include <directfb_util.h>


Go to the source code of this file.
Classes | |
| struct | MMSFBPixelDef |
Defines | |
| #define | MMSFB_TRACE() do {} while (0) |
| #define | MMSFB_BREAK() do {} while (0) |
| #define | USE_MMSFB_WINMAN |
| #define | MMSFB_BLIT_CNT 0x40 |
| max combination of blitting flags | |
| #define | MMSFB_BLIT_NOFX 0x00000000 |
| surface blitting flag: no effects | |
| #define | MMSFB_BLIT_BLEND_ALPHACHANNEL 0x00000001 |
| surface blitting flag: use alphachannel from source | |
| #define | MMSFB_BLIT_BLEND_COLORALPHA 0x00000002 |
| surface blitting flag: use alphachannel from color | |
| #define | MMSFB_BLIT_COLORIZE 0x00000004 |
| surface blitting flag: modulates source pixel with color | |
| #define | MMSFB_BLIT_SRC_PREMULTIPLY 0x00000008 |
| surface blitting flag: modulates the source color with the source alpha | |
| #define | MMSFB_BLIT_SRC_PREMULTCOLOR 0x00000010 |
| surface blitting flag: modulates the source color with the color alpha | |
| #define | MMSFB_BLIT_ANTIALIASING 0x00000020 |
| surface blitting flag: antialiasing (stretchBlit(), not all pixelformats will be supported) | |
| #define | MMSFB_DRAW_CNT 0x04 |
| max combination of drawing flags | |
| #define | MMSFB_DRAW_NOFX 0x00000000 |
| surface drawing flag: no effects | |
| #define | MMSFB_DRAW_BLEND 0x00000001 |
| surface drawing flag: alpha from surface color | |
| #define | MMSFB_DRAW_SRC_PREMULTIPLY 0x00000002 |
| surface drawing flag: multiplies the color with the alpha channel | |
| #define | MMSFB_FLIP_NONE 0x00000000 |
| surface flip flag: none | |
| #define | MMSFB_FLIP_WAIT 0x00000001 |
| surface flip flag: returns upon vertical sync | |
| #define | MMSFB_FLIP_ONSYNC 0x00000002 |
| surface flip flag: flip upon the next vertical sync | |
| #define | MMSFB_FLIP_WAITFORSYNC 0x00000004 |
| surface flip flag: WAIT and ONSYNC | |
| #define | MMSFB_FLIP_FLUSH 0x00000008 |
| surface flip flag: send pan event to fbdev every time the display buffer has changed | |
| #define | MMSFB_LOCK_NONE 0x00000000 |
| surface lock flag: none | |
| #define | MMSFB_LOCK_READ 0x00000001 |
| surface lock flag: read access | |
| #define | MMSFB_LOCK_WRITE 0x00000002 |
| surface lock flag: write access | |
| #define | MMSFB_BM_NONE "" |
| buffer mode: none | |
| #define | MMSFB_BM_FRONTONLY "FRONTONLY" |
| buffer mode: no backbuffer | |
| #define | MMSFB_BM_BACKVIDEO "BACKVIDEO" |
| buffer mode: backbuffer in video memory | |
| #define | MMSFB_BM_BACKSYSTEM "BACKSYSTEM" |
| buffer mode: backbuffer in system memory | |
| #define | MMSFB_BM_TRIPLE "TRIPLE" |
| buffer mode: triple buffering | |
| #define | MMSFB_BM_WINDOWS "WINDOWS" |
| buffer mode: no layer buffers at all, using buffer of each window | |
| #define | MMSFB_LO_NONE "" |
| layer option: none | |
| #define | MMSFB_LO_ALPHACHANNEL "ALPHACHANNEL" |
| layer option: Make usage of alpha channel for blending on a pixel per pixel basis. | |
| #define | MMSFB_LO_FLICKER_FILTERING "FLICKER_FILTERING" |
| layer option: Enable flicker filtering. | |
| #define | MMSFB_LO_DEINTERLACING "DEINTERLACING" |
| layer option: Enable deinterlacing of an interlaced (video) source. | |
| #define | MMSFB_LO_SRC_COLORKEY "SRC_COLORKEY" |
| layer option: Enable source color key. | |
| #define | MMSFB_LO_DST_COLORKEY "DST_COLORKEY" |
| layer option: Enable dest. color key. | |
| #define | MMSFB_LO_OPACITY "OPACITY" |
| layer option: Make usage of the global alpha factor set by SetOpacity. | |
| #define | MMSFB_LO_FIELD_PARITY "FIELD_PARITY" |
| layer option: Set field parity. | |
| #define | MMSFBPERF_START_MEASURING |
| #define | MMSFBPERF_STOP_MEASURING_FILLRECT(surface, dw, dh) |
| #define | MMSFBPERF_STOP_MEASURING_DRAWLINE(surface, x1, y1, x2, y2) |
| #define | MMSFBPERF_STOP_MEASURING_DRAWSTRING(surface, clipreg, text, len, x, y) |
| #define | MMSFBPERF_STOP_MEASURING_BLIT(surface, src_pixelformat, sw, sh) |
| #define | MMSFBPERF_STOP_MEASURING_STRETCHBLIT(surface, source, sw, sh, dw, dh) |
| #define | MMSFBPERF_STOP_MEASURING_XSHMPUTIMAGE(surface, sw, sh) |
| #define | MMSFBPERF_STOP_MEASURING_XVSHMPUTIMAGE(surface, sw, sh, dw, dh) |
| #define | MMSFBPERF_STOP_MEASURING_VSYNC(surface) |
| #define | MMSFBPERF_STOP_MEASURING_SWAPDISPLAY(surface) |
Typedefs | |
| typedef unsigned int | MMSFBBlittingFlags |
| surface blitting flags | |
| typedef unsigned int | MMSFBDrawingFlags |
| surface drawing flags | |
| typedef unsigned int | MMSFBFlipFlags |
| surface flip flags | |
| typedef unsigned int | MMSFBLockFlags |
| surface lock flags | |
Enumerations | |
| enum | MMSFBMergingMode { MMSFB_MM_ANAGLYPH_RED_CYAN = 0, MMSFB_MM_LINE_INTERLEAVED } |
| surface merging mode More... | |
Functions | |
| string | MMSFB_ErrorString (const int rc, const string msg) |
| void | MMSFB_SetError (const int rc, const string msg) |
| bool | isAlphaPixelFormat (MMSFBSurfacePixelFormat pf) |
| bool | isIndexedPixelFormat (MMSFBSurfacePixelFormat pf) |
| bool | isRGBPixelFormat (MMSFBSurfacePixelFormat pf) |
| void | getBitsPerPixel (MMSFBSurfacePixelFormat pf, MMSFBPixelDef *pixeldef) |
| MMSFBSurfacePixelFormat | getMMSFBPixelFormatFromDFBPixelFormat (DFBSurfacePixelFormat pf) |
| DFBSurfacePixelFormat | getDFBPixelFormatFromMMSFBPixelFormat (MMSFBSurfacePixelFormat pf) |
| string | getDFBLayerBufferModeString (DFBDisplayLayerBufferMode bm) |
| DFBDisplayLayerBufferMode | getDFBLayerBufferModeFromString (string bm) |
| string | getDFBLayerOptionsString (DFBDisplayLayerOptions opts) |
| DFBDisplayLayerOptions | getDFBLayerOptionsFromString (string opts) |
| DFBSurfaceBlittingFlags | getDFBSurfaceBlittingFlagsFromMMSFBBlittingFlags (MMSFBBlittingFlags flags) |
| DFBSurfaceDrawingFlags | getDFBSurfaceDrawingFlagsFromMMSFBDrawingFlags (MMSFBDrawingFlags flags) |
| DFBSurfaceFlipFlags | getDFBSurfaceFlipFlagsFromMMSFBFlipFlags (MMSFBFlipFlags flags) |
| DFBSurfaceLockFlags | getDFBSurfaceLockFlagsFromMMSFBLockFlags (MMSFBLockFlags flags) |
| void | calcAspectRatio (int sw, int sh, int dw, int dh, MMSFBRectangle &dest, bool aspect_ratio, bool even_aligned) |
Variables | |
| string | MMSFB_LastErrorString |
| bool | MMSFBBase_rotate180 |
| #define MMSFB_BLIT_ANTIALIASING 0x00000020 |
surface blitting flag: antialiasing (stretchBlit(), not all pixelformats will be supported)
Definition at line 113 of file mmsfbbase.h.
| #define MMSFB_BLIT_BLEND_ALPHACHANNEL 0x00000001 |
| #define MMSFB_BLIT_BLEND_COLORALPHA 0x00000002 |
| #define MMSFB_BLIT_CNT 0x40 |
| #define MMSFB_BLIT_COLORIZE 0x00000004 |
surface blitting flag: modulates source pixel with color
Definition at line 107 of file mmsfbbase.h.
| #define MMSFB_BLIT_NOFX 0x00000000 |
| #define MMSFB_BLIT_SRC_PREMULTCOLOR 0x00000010 |
surface blitting flag: modulates the source color with the color alpha
Definition at line 111 of file mmsfbbase.h.
| #define MMSFB_BLIT_SRC_PREMULTIPLY 0x00000008 |
surface blitting flag: modulates the source color with the source alpha
Definition at line 109 of file mmsfbbase.h.
| #define MMSFB_BM_BACKSYSTEM "BACKSYSTEM" |
| #define MMSFB_BM_BACKVIDEO "BACKVIDEO" |
| #define MMSFB_BM_FRONTONLY "FRONTONLY" |
| #define MMSFB_BM_NONE "" |
| #define MMSFB_BM_TRIPLE "TRIPLE" |
| #define MMSFB_BM_WINDOWS "WINDOWS" |
buffer mode: no layer buffers at all, using buffer of each window
Definition at line 177 of file mmsfbbase.h.
| #define MMSFB_BREAK | ( | ) | do {} while (0) |
Definition at line 77 of file mmsfbbase.h.
| #define MMSFB_DRAW_BLEND 0x00000001 |
| #define MMSFB_DRAW_CNT 0x04 |
| #define MMSFB_DRAW_NOFX 0x00000000 |
| #define MMSFB_DRAW_SRC_PREMULTIPLY 0x00000002 |
surface drawing flag: multiplies the color with the alpha channel
Definition at line 126 of file mmsfbbase.h.
| #define MMSFB_FLIP_FLUSH 0x00000008 |
surface flip flag: send pan event to fbdev every time the display buffer has changed
Definition at line 141 of file mmsfbbase.h.
| #define MMSFB_FLIP_NONE 0x00000000 |
| #define MMSFB_FLIP_ONSYNC 0x00000002 |
| #define MMSFB_FLIP_WAIT 0x00000001 |
| #define MMSFB_FLIP_WAITFORSYNC 0x00000004 |
| #define MMSFB_LO_ALPHACHANNEL "ALPHACHANNEL" |
layer option: Make usage of alpha channel for blending on a pixel per pixel basis.
Definition at line 183 of file mmsfbbase.h.
| #define MMSFB_LO_DEINTERLACING "DEINTERLACING" |
layer option: Enable deinterlacing of an interlaced (video) source.
Definition at line 187 of file mmsfbbase.h.
| #define MMSFB_LO_DST_COLORKEY "DST_COLORKEY" |
| #define MMSFB_LO_FIELD_PARITY "FIELD_PARITY" |
| #define MMSFB_LO_FLICKER_FILTERING "FLICKER_FILTERING" |
| #define MMSFB_LO_NONE "" |
| #define MMSFB_LO_OPACITY "OPACITY" |
layer option: Make usage of the global alpha factor set by SetOpacity.
Definition at line 193 of file mmsfbbase.h.
| #define MMSFB_LO_SRC_COLORKEY "SRC_COLORKEY" |
| #define MMSFB_LOCK_NONE 0x00000000 |
| #define MMSFB_LOCK_READ 0x00000001 |
| #define MMSFB_LOCK_WRITE 0x00000002 |
| #define MMSFB_TRACE | ( | ) | do {} while (0) |
Definition at line 71 of file mmsfbbase.h.
| #define MMSFBPERF_START_MEASURING |
Definition at line 302 of file mmsfbbase.h.
| #define MMSFBPERF_STOP_MEASURING_BLIT | ( | surface, | |||
| src_pixelformat, | |||||
| sw, | |||||
| sh | ) |
Definition at line 306 of file mmsfbbase.h.
| #define MMSFBPERF_STOP_MEASURING_DRAWLINE | ( | surface, | |||
| x1, | |||||
| y1, | |||||
| x2, | |||||
| y2 | ) |
Definition at line 304 of file mmsfbbase.h.
| #define MMSFBPERF_STOP_MEASURING_DRAWSTRING | ( | surface, | |||
| clipreg, | |||||
| text, | |||||
| len, | |||||
| x, | |||||
| y | ) |
Definition at line 305 of file mmsfbbase.h.
| #define MMSFBPERF_STOP_MEASURING_FILLRECT | ( | surface, | |||
| dw, | |||||
| dh | ) |
Definition at line 303 of file mmsfbbase.h.
| #define MMSFBPERF_STOP_MEASURING_STRETCHBLIT | ( | surface, | |||
| source, | |||||
| sw, | |||||
| sh, | |||||
| dw, | |||||
| dh | ) |
Definition at line 307 of file mmsfbbase.h.
| #define MMSFBPERF_STOP_MEASURING_SWAPDISPLAY | ( | surface | ) |
Definition at line 311 of file mmsfbbase.h.
| #define MMSFBPERF_STOP_MEASURING_VSYNC | ( | surface | ) |
Definition at line 310 of file mmsfbbase.h.
| #define MMSFBPERF_STOP_MEASURING_XSHMPUTIMAGE | ( | surface, | |||
| sw, | |||||
| sh | ) |
Definition at line 308 of file mmsfbbase.h.
| #define MMSFBPERF_STOP_MEASURING_XVSHMPUTIMAGE | ( | surface, | |||
| sw, | |||||
| sh, | |||||
| dw, | |||||
| dh | ) |
Definition at line 309 of file mmsfbbase.h.
| #define USE_MMSFB_WINMAN |
Definition at line 84 of file mmsfbbase.h.
| typedef unsigned int MMSFBBlittingFlags |
| typedef unsigned int MMSFBDrawingFlags |
| typedef unsigned int MMSFBFlipFlags |
| typedef unsigned int MMSFBLockFlags |
| enum MMSFBMergingMode |
surface merging mode
Definition at line 156 of file mmsfbbase.h.
| void calcAspectRatio | ( | int | sw, | |
| int | sh, | |||
| int | dw, | |||
| int | dh, | |||
| MMSFBRectangle & | dest, | |||
| bool | aspect_ratio, | |||
| bool | even_aligned | |||
| ) |
Definition at line 549 of file mmsfbbase.cpp.
| void getBitsPerPixel | ( | MMSFBSurfacePixelFormat | pf, | |
| MMSFBPixelDef * | pixeldef | |||
| ) |
Definition at line 107 of file mmsfbbase.cpp.
| DFBDisplayLayerBufferMode getDFBLayerBufferModeFromString | ( | string | bm | ) |
Definition at line 437 of file mmsfbbase.cpp.
| string getDFBLayerBufferModeString | ( | DFBDisplayLayerBufferMode | bm | ) |
Definition at line 416 of file mmsfbbase.cpp.
| DFBDisplayLayerOptions getDFBLayerOptionsFromString | ( | string | opts | ) |
Definition at line 480 of file mmsfbbase.cpp.
| string getDFBLayerOptionsString | ( | DFBDisplayLayerOptions | opts | ) |
Definition at line 456 of file mmsfbbase.cpp.
| DFBSurfacePixelFormat getDFBPixelFormatFromMMSFBPixelFormat | ( | MMSFBSurfacePixelFormat | pf | ) |
Definition at line 380 of file mmsfbbase.cpp.
| DFBSurfaceBlittingFlags getDFBSurfaceBlittingFlagsFromMMSFBBlittingFlags | ( | MMSFBBlittingFlags | flags | ) |
Definition at line 503 of file mmsfbbase.cpp.
| DFBSurfaceDrawingFlags getDFBSurfaceDrawingFlagsFromMMSFBDrawingFlags | ( | MMSFBDrawingFlags | flags | ) |
Definition at line 518 of file mmsfbbase.cpp.
| DFBSurfaceFlipFlags getDFBSurfaceFlipFlagsFromMMSFBFlipFlags | ( | MMSFBFlipFlags | flags | ) |
Definition at line 527 of file mmsfbbase.cpp.
| DFBSurfaceLockFlags getDFBSurfaceLockFlagsFromMMSFBLockFlags | ( | MMSFBLockFlags | flags | ) |
Definition at line 538 of file mmsfbbase.cpp.
| MMSFBSurfacePixelFormat getMMSFBPixelFormatFromDFBPixelFormat | ( | DFBSurfacePixelFormat | pf | ) |
Definition at line 346 of file mmsfbbase.cpp.
| bool isAlphaPixelFormat | ( | MMSFBSurfacePixelFormat | pf | ) |
Definition at line 64 of file mmsfbbase.cpp.
| bool isIndexedPixelFormat | ( | MMSFBSurfacePixelFormat | pf | ) |
Definition at line 86 of file mmsfbbase.cpp.
| bool isRGBPixelFormat | ( | MMSFBSurfacePixelFormat | pf | ) |
Definition at line 93 of file mmsfbbase.cpp.
| string MMSFB_ErrorString | ( | const int | rc, | |
| const string | msg | |||
| ) |
Definition at line 44 of file mmsfbbase.cpp.
| void MMSFB_SetError | ( | const int | rc, | |
| const string | msg | |||
| ) |
Definition at line 59 of file mmsfbbase.cpp.
| string MMSFB_LastErrorString |
Definition at line 38 of file mmsfbbase.cpp.
| bool MMSFBBase_rotate180 |
Definition at line 41 of file mmsfbbase.cpp.