1 /* 2 * GPAC - Multimedia Framework C SDK 3 * 4 * Authors: Jean Le Feuvre 5 * Copyright (c) Telecom ParisTech 2000-2012 6 * All rights reserved 7 * 8 * This file is part of GPAC / DirectX audio and video render module 9 * 10 * GPAC is free software; you can redistribute it and/or modify 11 * it under the terms of the GNU Lesser General Public License as published by 12 * the Free Software Foundation; either version 2, or (at your option) 13 * any later version. 14 * 15 * GPAC is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License for more details. 19 * 20 * You should have received a copy of the GNU Lesser General Public 21 * License along with this library; see the file COPYING. If not, write to 22 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 23 * 24 */ 25 26 27 #ifndef _GAPI_H 28 #define _GAPI_H 29 30 #include <gpac/list.h> 31 #include <gpac/thread.h> 32 /*driver interface*/ 33 #include <gpac/modules/video_out.h> 34 35 #ifdef GPAC_USE_GLES1X 36 #include "GLES/egl.h" 37 #endif 38 39 /*driver interface*/ 40 41 #ifdef __cplusplus 42 extern "C" { 43 #endif 44 45 typedef struct 46 { 47 HWND hWnd; 48 DWORD orig_wnd_proc; 49 GF_Mutex *mx; 50 51 unsigned char *raw_ptr; 52 Bool contiguous_mem; 53 54 GXKeyList keys; 55 56 u32 screen_w, screen_h; 57 u32 fs_w, fs_h; 58 /*store w and h for fullscreen*/ 59 u32 backup_w, backup_h; 60 s32 x_pitch, y_pitch; 61 Bool fullscreen; 62 u32 gx_mode; 63 64 u32 sys_w, sys_h; 65 Bool scale_coords; 66 67 /*main surface info*/ 68 char *backbuffer; 69 u32 bb_size, bb_width, bb_height, bb_pitch; 70 u32 pixel_format; 71 u32 BPP, bits_per_pixel; 72 73 GF_Window dst_blt; 74 DWORD ThreadID; 75 HANDLE hThread; 76 Bool owns_hwnd; 77 78 Bool erase_dest; 79 u32 off_x, off_y; 80 81 HBITMAP bitmap, old_bitmap; 82 DWORD * bits; 83 HDC hdcBitmap, hdc; 84 BITMAPINFO* bmi; 85 86 #ifdef GPAC_USE_GLES1X 87 u32 output_3d_type; 88 EGLDisplay egldpy; 89 EGLSurface surface; 90 EGLConfig eglconfig; 91 EGLContext eglctx; 92 93 HBITMAP gl_bitmap; 94 DWORD *gl_bits; 95 HWND gl_hwnd; 96 Bool use_pbuffer; 97 #endif 98 99 } GAPIPriv; 100 101 GF_Err GAPI_SetupOGL_ES_Offscreen(GF_VideoOutput *dr, u32 width, u32 height) ; 102 103 104 #ifdef __cplusplus 105 } 106 #endif 107 108 #endif 109