libgpac
Documentation of the core library of GPAC
dx_hw.h File Reference
#include <gpac/modules/audio_out.h>
#include <gpac/modules/video_out.h>
#include <gpac/list.h>
#include <gpac/constants.h>
#include <gpac/thread.h>
#include <ddraw.h>
#include <mmsystem.h>
#include <dsound.h>
#include <vfw.h>
+ Include dependency graph for dx_hw.h:
+ This graph shows which files directly or indirectly include this file:

Data Structures

struct  DDSurface
 
struct  DDContext
 

Macros

#define INITGUID
 
#define HAS_DDRAW_H
 
#define USE_DX_3
 
#define EGL_CHECK_ERR   {s32 res = eglGetError(); if (res!=12288) GF_LOG(GF_LOG_ERROR, GF_LOG_COMPOSE, ("EGL Error %d file %s line %d\n", res, __FILE__, __LINE__)); }
 
#define WM_UNICHAR   0x0109
 
#define MAKERECT(rc, dest)   { rc.left = dest->x; rc.top = dest->y; rc.right = rc.left + dest->w; rc.bottom = rc.top + dest->h; }
 
#define SAFE_DD_RELEASE(p)   { if(p) { (p)->lpVtbl->Release( (p) ); (p)=NULL; } }
 
#define SAFE_DS_RELEASE(p)   { if(p) { p->lpVtbl->Release(p); (p)=NULL; } }
 

Typedefs

typedef LPDIRECTDRAWSURFACE LPDDRAWSURFACE
 
typedef DDSURFACEDESC DDSURFDESC
 
typedef DDSURFDESCLPDDSURFDESC
 
typedef HRESULT(WINAPI * DIRECTDRAWCREATEPROC) (GUID *, LPDIRECTDRAW *, IUnknown *)
 

Functions

void DD_SetupWindow (GF_VideoOutput *dr, Bool hide)
 
void DD_ShutdownWindow (GF_VideoOutput *dr)
 
GF_Err DD_ProcessEvent (GF_VideoOutput *dr, GF_Event *evt)
 
void DestroyObjects (DDContext *dd)
 
GF_Err GetDisplayMode (DDContext *dd)
 
void DD_SetupDDraw (GF_VideoOutput *driv)
 
GF_Err InitDirectDraw (GF_VideoOutput *dr, u32 Width, u32 Height)
 
void DD_InitYUV (GF_VideoOutput *dr)
 
GF_Err DD_SetBackBufferSize (GF_VideoOutput *dr, u32 width, u32 height, Bool use_system_memory)
 
GF_Err DD_FlushEx (GF_VideoOutput *dr, GF_Window *dest, Bool wait_for_sync)
 
HWND DD_GetGlobalHWND ()
 
GF_Err DD_SetupOpenGL (GF_VideoOutput *dr, u32 offscreen_width, u32 offscreen_height)
 
void * NewAudioOutput ()
 
void DeleteDxAudioOutput (void *)
 
LRESULT APIENTRY DD_WindowProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
 

Data Structure Documentation

◆ DDSurface

struct DDSurface
Data Fields
LPDDRAWSURFACE pSurface
u32 width
u32 height
u32 format
u32 pitch
Bool is_yuv

◆ DDContext

struct DDContext
+ Collaboration diagram for DDContext:
Data Fields
HWND os_hwnd
HWND fs_hwnd
HWND cur_hwnd
HWND parent_wnd
Bool NeedRestore
Bool switch_res
LPDIRECTDRAW pDD
LPDIRECTDRAWSURFACE pPrimary
LPDIRECTDRAWSURFACE pBack
Bool ddraw_init
Bool yuv_init
Bool fullscreen
Bool systems_memory
Bool force_alpha
Bool offscreen_yuv_to_rgb
u32 width
u32 height
u32 fs_width
u32 fs_height
u32 store_width
u32 store_height
LONG backup_styles
Bool alt_down
Bool ctrl_down
Bool on_secondary_screen
u32 pixelFormat
u32 video_bpp
HDC lock_hdc
DDSurface rgb_pool
DDSurface yuv_pool
GF_Thread * th
u32 th_state
Bool owns_hwnd
u32 off_w
u32 off_h
u32 prev_styles
LONG_PTR last_mouse_pos
HCURSOR curs_normal
HCURSOR curs_hand
HCURSOR curs_collide
u32 cursor_type
Bool is_setup
Bool disable_vsync
char * caption
HDC gl_HDC
HDC pb_HDC
HGLRC gl_HRC
HGLRC pb_HRC
Bool glext_init
Bool output_3d
HWND bound_hwnd
Bool gl_double_buffer
u32 mode_high_bpp
u8 bpp
Bool has_focus
LONG_PTR orig_wnd_proc
UINT_PTR timer
u32 last_mouse_move
u32 cursor_type_backup
Bool windowless
Bool hidden
Bool dd_lost
Bool force_video_mem_for_yuv
HMODULE hDDrawLib
DIRECTDRAWCREATEPROC DirectDrawCreate

Macro Definition Documentation

◆ INITGUID

#define INITGUID

◆ HAS_DDRAW_H

#define HAS_DDRAW_H

◆ USE_DX_3

#define USE_DX_3

◆ EGL_CHECK_ERR

#define EGL_CHECK_ERR   {s32 res = eglGetError(); if (res!=12288) GF_LOG(GF_LOG_ERROR, GF_LOG_COMPOSE, ("EGL Error %d file %s line %d\n", res, __FILE__, __LINE__)); }

◆ WM_UNICHAR

#define WM_UNICHAR   0x0109

◆ MAKERECT

#define MAKERECT (   rc,
  dest 
)    { rc.left = dest->x; rc.top = dest->y; rc.right = rc.left + dest->w; rc.bottom = rc.top + dest->h; }

◆ SAFE_DD_RELEASE

#define SAFE_DD_RELEASE (   p)    { if(p) { (p)->lpVtbl->Release( (p) ); (p)=NULL; } }

◆ SAFE_DS_RELEASE

#define SAFE_DS_RELEASE (   p)    { if(p) { p->lpVtbl->Release(p); (p)=NULL; } }

Typedef Documentation

◆ LPDDRAWSURFACE

typedef LPDIRECTDRAWSURFACE LPDDRAWSURFACE

◆ DDSURFDESC

typedef DDSURFACEDESC DDSURFDESC

◆ LPDDSURFDESC

◆ DIRECTDRAWCREATEPROC

typedef HRESULT(WINAPI * DIRECTDRAWCREATEPROC) (GUID *, LPDIRECTDRAW *, IUnknown *)

Function Documentation

◆ DD_SetupWindow()

void DD_SetupWindow ( GF_VideoOutput dr,
Bool  hide 
)
+ Here is the caller graph for this function:

◆ DD_ShutdownWindow()

void DD_ShutdownWindow ( GF_VideoOutput dr)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DD_ProcessEvent()

GF_Err DD_ProcessEvent ( GF_VideoOutput dr,
GF_Event evt 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DestroyObjects()

void DestroyObjects ( DDContext dd)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDisplayMode()

GF_Err GetDisplayMode ( DDContext dd)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DD_SetupDDraw()

void DD_SetupDDraw ( GF_VideoOutput driv)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitDirectDraw()

GF_Err InitDirectDraw ( GF_VideoOutput dr,
u32  Width,
u32  Height 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DD_InitYUV()

void DD_InitYUV ( GF_VideoOutput dr)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DD_SetBackBufferSize()

GF_Err DD_SetBackBufferSize ( GF_VideoOutput dr,
u32  width,
u32  height,
Bool  use_system_memory 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DD_FlushEx()

GF_Err DD_FlushEx ( GF_VideoOutput dr,
GF_Window dest,
Bool  wait_for_sync 
)

◆ DD_GetGlobalHWND()

HWND DD_GetGlobalHWND ( )
+ Here is the caller graph for this function:

◆ DD_SetupOpenGL()

GF_Err DD_SetupOpenGL ( GF_VideoOutput dr,
u32  offscreen_width,
u32  offscreen_height 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NewAudioOutput()

void* NewAudioOutput ( )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DeleteDxAudioOutput()

void DeleteDxAudioOutput ( void *  ifce)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DD_WindowProc()

LRESULT APIENTRY DD_WindowProc ( HWND  hWnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function: