Mercurial > mplayer.hg
changeset 28433:701150ac1b54
Unify info/error messages to a common style:
<vo_direct3d> in the beginning, "." at the end.
Shorter/more descriptive sentences.
author | gogothebee |
---|---|
date | Thu, 05 Feb 2009 09:06:09 +0000 |
parents | eb42079ed5f7 |
children | 6d926d2693ec |
files | libvo/vo_direct3d.c |
diffstat | 1 files changed, 43 insertions(+), 43 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_direct3d.c Wed Feb 04 19:17:03 2009 +0000 +++ b/libvo/vo_direct3d.c Thu Feb 05 09:06:09 2009 +0000 @@ -190,7 +190,7 @@ } mp_msg(MSGT_VO, MSGL_V, - "<vo_direct3d>Fullscreen Movie Rect: t: %ld, l: %ld, r: %ld, b:%ld\r\n", + "<vo_direct3d>Fullscreen movie rectangle: t: %ld, l: %ld, r: %ld, b:%ld\n", priv->fs_movie_rect.top, priv->fs_movie_rect.left, priv->fs_movie_rect.right, priv->fs_movie_rect.bottom); @@ -205,7 +205,7 @@ */ static void destroy_d3d_surfaces(void) { - mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d>destroy_d3d_surfaces called\r\n"); + mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d>destroy_d3d_surfaces called.\n"); /* Let's destroy the old (if any) D3D Surfaces */ if (priv->locked_rect.pBits) @@ -238,14 +238,14 @@ { int osd_width = vo_dwidth, osd_height = vo_dheight; int tex_width = osd_width, tex_height = osd_height; - mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d><INFO>create_d3d_surfaces called.\n"); + mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d>create_d3d_surfaces called.\n"); if (!priv->d3d_surface && FAILED(IDirect3DDevice9_CreateOffscreenPlainSurface( priv->d3d_device, priv->src_width, priv->src_height, priv->movie_src_fmt, D3DPOOL_DEFAULT, &priv->d3d_surface, NULL))) { mp_msg(MSGT_VO, MSGL_ERR, - "<vo_direct3d><INFO>IDirect3D9_CreateOffscreenPlainSurface Failed.\n"); + "<vo_direct3d>Allocating offscreen surface failed.\n"); return 0; } @@ -253,7 +253,7 @@ FAILED(IDirect3DDevice9_GetBackBuffer(priv->d3d_device, 0, 0, D3DBACKBUFFER_TYPE_MONO, &priv->d3d_backbuf))) { - mp_msg(MSGT_VO, MSGL_ERR, "<vo_direct3d>Back Buffer address get failed\n"); + mp_msg(MSGT_VO, MSGL_ERR, "<vo_direct3d>Allocating backbuffer failed.\n"); return 0; } @@ -284,7 +284,7 @@ priv->osd_texture_width = tex_width; priv->osd_texture_height = tex_height; - mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d><INFO>surface (%d, %d) requested = (%d, %d)\n", + mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d>OSD texture size (%dx%d), requested (%dx%d).\n", vo_dwidth, vo_dheight, priv->osd_texture_width, priv->osd_texture_height); /* create OSD */ @@ -299,7 +299,7 @@ &priv->d3d_texture_system, NULL))) { mp_msg(MSGT_VO,MSGL_ERR, - "<vo_direct3d><INFO>IDirect3DDevice9_CreateTexture Failed (d3d_texture_system).\n"); + "<vo_direct3d>Allocating OSD texture in system RAM failed.\n"); return 0; } @@ -316,7 +316,7 @@ &priv->d3d_texture_osd, NULL))) { mp_msg(MSGT_VO,MSGL_ERR, - "<vo_direct3d><INFO>IDirect3DDevice9_CreateTexture Failed (d3d_texture_osd).\n"); + "<vo_direct3d>Allocating OSD texture in video RAM failed.\n"); return 0; } } @@ -383,19 +383,19 @@ D3DCREATE_SOFTWARE_VERTEXPROCESSING, &present_params, &priv->d3d_device))) { mp_msg(MSGT_VO, MSGL_ERR, - "<vo_direct3d><INFO>Could not create the D3D device\n"); + "<vo_direct3d>Creating Direct3D device failed.\n"); return 0; } if (action == BACKBUFFER_RESET && FAILED(IDirect3DDevice9_Reset(priv->d3d_device, &present_params))) { mp_msg(MSGT_VO, MSGL_ERR, - "<vo_direct3d><INFO>Could not reset the D3D device\n"); + "<vo_direct3d>Reseting Direct3D device failed.\n"); return 0; } mp_msg(MSGT_VO, MSGL_V, - "<vo_direct3d><INFO>New backbuffer: Width: %d, Height:%d. VO Dest Width:%d, Height: %d\n", + "<vo_direct3d>New backbuffer (%dx%d), VO (%dx%d)\n", present_params.BackBufferWidth, present_params.BackBufferHeight, vo_dwidth, vo_dheight); @@ -411,7 +411,7 @@ D3DDISPLAYMODE disp_mode; D3DVIEWPORT9 vp = {0, 0, vo_dwidth, vo_dheight, 0, 1}; - mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d><INFO>configure_d3d called\n"); + mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d>configure_d3d called.\n"); destroy_d3d_surfaces(); @@ -421,7 +421,7 @@ D3DADAPTER_DEFAULT, &disp_mode))) { mp_msg(MSGT_VO, MSGL_ERR, - "<vo_direct3d><INFO>Could not read adapter display mode.\n"); + "<vo_direct3d>Reading adapter display mode failed.\n"); return 0; } @@ -436,7 +436,7 @@ if (FAILED(IDirect3DDevice9_SetViewport(priv->d3d_device, &vp))) { - mp_msg(MSGT_VO, MSGL_ERR, "<vo_direct3d>Unable to set the viewport\n"); + mp_msg(MSGT_VO, MSGL_ERR, "<vo_direct3d>Setting viewport failed.\n"); return 0; } @@ -451,7 +451,7 @@ */ static int reconfigure_d3d(void) { - mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d><INFO>reconfigure_d3d called.\n"); + mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d>reconfigure_d3d called.\n"); /* Destroy the offscreen, OSD and backbuffer surfaces */ destroy_d3d_surfaces(); @@ -467,7 +467,7 @@ /* Initialize Direct3D from the beginning */ priv->d3d_handle = Direct3DCreate9(D3D_SDK_VERSION); if (!priv->d3d_handle) { - mp_msg(MSGT_VO, MSGL_ERR, "<vo_direct3d>Unable to initialize Direct3D\n"); + mp_msg(MSGT_VO, MSGL_ERR, "<vo_direct3d>Initializing Direct3D failed.\n"); return 0; } @@ -485,7 +485,7 @@ { D3DVIEWPORT9 vp = {0, 0, vo_dwidth, vo_dheight, 0, 1}; - mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d><INFO>resize_d3d called.\n"); + mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d>resize_d3d called.\n"); /* Make sure that backbuffer is large enough to accomodate the new viewport dimensions. Grow it if necessary. */ @@ -519,7 +519,7 @@ if (FAILED(IDirect3DDevice9_SetViewport(priv->d3d_device, &vp))) { - mp_msg(MSGT_VO, MSGL_ERR, "<vo_direct3d>Unable to set the viewport\n"); + mp_msg(MSGT_VO, MSGL_ERR, "<vo_direct3d>Setting viewport failed.\n"); return 0; } @@ -539,7 +539,7 @@ */ static void uninit_d3d(void) { - mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d>uninit_d3d called\r\n"); + mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d>uninit_d3d called.\n"); destroy_d3d_surfaces(); @@ -550,7 +550,7 @@ /* Stop the whole D3D. */ if (priv->d3d_handle) { - mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d>Calling IDirect3D9_Release\r\n"); + mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d>Stopping Direct3D.\n"); IDirect3D9_Release(priv->d3d_handle); } priv->d3d_handle = NULL; @@ -583,7 +583,7 @@ if (!priv->locked_rect.pBits) { if (FAILED(IDirect3DSurface9_LockRect(priv->d3d_surface, &priv->locked_rect, NULL, 0))) { - mp_msg(MSGT_VO, MSGL_ERR, "<vo_direct3d>Surface lock failure\n"); + mp_msg(MSGT_VO, MSGL_ERR, "<vo_direct3d>Surface lock failed.\n"); return VO_ERROR; } } @@ -594,13 +594,13 @@ skip_upload: /* This unlock is used for both slice_draw path and render_d3d_frame path. */ if (FAILED(IDirect3DSurface9_UnlockRect(priv->d3d_surface))) { - mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d>Surface unlock failure\n"); + mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d>Surface unlock failed.\n"); return VO_ERROR; } priv->locked_rect.pBits = NULL; if (FAILED(IDirect3DDevice9_BeginScene(priv->d3d_device))) { - mp_msg(MSGT_VO, MSGL_ERR, "<vo_direct3d>BeginScene failed\n"); + mp_msg(MSGT_VO, MSGL_ERR, "<vo_direct3d>BeginScene failed.\n"); return VO_ERROR; } @@ -617,12 +617,12 @@ &priv->fs_movie_rect, D3DTEXF_LINEAR))) { mp_msg(MSGT_VO, MSGL_ERR, - "<vo_direct3d>Unable to copy the frame to the back buffer\n"); + "<vo_direct3d>Copying frame to the backbuffer failed.\n"); return VO_ERROR; } if (FAILED(IDirect3DDevice9_EndScene(priv->d3d_device))) { - mp_msg(MSGT_VO, MSGL_ERR, "<vo_direct3d>EndScene failed\n"); + mp_msg(MSGT_VO, MSGL_ERR, "<vo_direct3d>EndScene failed.\n"); return VO_ERROR; } @@ -693,7 +693,7 @@ /* Set to zero all global variables. */ priv = calloc(1, sizeof(struct global_priv)); if (!priv) { - mp_msg(MSGT_VO, MSGL_ERR, "<vo_direct3d>Not enough memory\r\n"); + mp_msg(MSGT_VO, MSGL_ERR, "<vo_direct3d>Allocating private memory failed.\n"); return -1; } @@ -704,14 +704,14 @@ priv->d3d_handle = Direct3DCreate9(D3D_SDK_VERSION); if (!priv->d3d_handle) { - mp_msg(MSGT_VO, MSGL_ERR, "<vo_direct3d>Unable to initialize Direct3D\n"); + mp_msg(MSGT_VO, MSGL_ERR, "<vo_direct3d>Initializing Direct3D failed.\n"); return -1; } if (FAILED(IDirect3D9_GetAdapterDisplayMode(priv->d3d_handle, D3DADAPTER_DEFAULT, &disp_mode))) { - mp_msg(MSGT_VO, MSGL_ERR, "<vo_direct3d>Could not read display mode\n"); + mp_msg(MSGT_VO, MSGL_ERR, "<vo_direct3d>Reading display mode failed.\n"); return -1; } @@ -720,14 +720,14 @@ priv->cur_backbuf_width = disp_mode.Width; priv->cur_backbuf_height = disp_mode.Height; - mp_msg(MSGT_VO, MSGL_V, "Setting backbuffer to the screen width: %d, height: %d\n", + mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d>Setting backbuffer dimensions to (%dx%d).\n", disp_mode.Width, disp_mode.Height); if (FAILED(IDirect3D9_GetDeviceCaps(priv->d3d_handle, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, &disp_caps))) { - mp_msg(MSGT_VO, MSGL_ERR, "<vo_direct3d>Could not read display capabilities\n"); + mp_msg(MSGT_VO, MSGL_ERR, "<vo_direct3d>Reading display capabilities failed.\n"); return -1; } @@ -752,7 +752,7 @@ * fullscreen dimensions and does other useful stuff. */ if (!vo_w32_init()) { - mp_msg(MSGT_VO, MSGL_V, "Unable to configure onscreen window\r\n"); + mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d>Configuring onscreen window failed.\n"); return -1; } @@ -771,7 +771,7 @@ return query_format(*(uint32_t*) data); case VOCTRL_GET_IMAGE: /* Direct Rendering. Not implemented yet. */ mp_msg(MSGT_VO, MSGL_V, - "<vo_direct3d>Direct Rendering request. Not implemented yet\n"); + "<vo_direct3d>Direct Rendering request. Not implemented yet.\n"); return VO_NOTIMPL; case VOCTRL_DRAW_IMAGE: return render_d3d_frame(data); @@ -835,7 +835,7 @@ * the given coordinates. */ if (!vo_w32_config(d_width, d_height, options)) { - mp_msg(MSGT_VO, MSGL_V, "Unable to create onscreen window\r\n"); + mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d>Creating onscreen window failed.\n"); return VO_ERROR; } @@ -881,7 +881,7 @@ */ static void uninit(void) { - mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d>Uninitialization\r\n"); + mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d>uninit called.\n"); uninit_d3d(); vo_w32_uninit(); /* w32_common framework call */ @@ -924,7 +924,7 @@ if (!priv->locked_rect.pBits) { if (FAILED(IDirect3DSurface9_LockRect(priv->d3d_surface, &priv->locked_rect, NULL, 0))) { - mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d>Surface lock failure\n"); + mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d>Surface lock failure.\n"); return VO_FALSE; } } @@ -971,7 +971,7 @@ */ static int draw_frame(uint8_t *src[]) { - mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d>draw_frame called\n"); + mp_msg(MSGT_VO, MSGL_V, "<vo_direct3d>draw_frame called.\n"); return VO_FALSE; } @@ -1008,7 +1008,7 @@ if (FAILED(IDirect3DTexture9_LockRect(priv->d3d_texture_system, 0, &locked_rect, NULL, 0))) { - mp_msg(MSGT_VO,MSGL_ERR,"<vo_direct3d>IDirect3DTexture9_LockRect failure.\n"); + mp_msg(MSGT_VO,MSGL_ERR,"<vo_direct3d>OSD texture lock failed.\n"); return; } @@ -1017,7 +1017,7 @@ /* this unlock is used for both slice_draw path and D3DRenderFrame path */ if (FAILED(IDirect3DTexture9_UnlockRect(priv->d3d_texture_system, 0))) { - mp_msg(MSGT_VO,MSGL_ERR,"<vo_direct3d>IDirect3DTexture9_UnlockRect failure.\n"); + mp_msg(MSGT_VO,MSGL_ERR,"<vo_direct3d>OSD texture unlock failed.\n"); return; } @@ -1039,7 +1039,7 @@ /* clear the OSD */ if (FAILED(IDirect3DTexture9_LockRect(priv->d3d_texture_system, 0, &locked_rect, NULL, 0))) { - mp_msg(MSGT_VO,MSGL_ERR,"<vo_direct3d>IDirect3DTexture9_LockRect failure.\n"); + mp_msg(MSGT_VO,MSGL_ERR, "<vo_direct3d>OSD texture lock failed.\n"); return; } @@ -1048,7 +1048,7 @@ /* this unlock is used for both slice_draw path and D3DRenderFrame path */ if (FAILED(IDirect3DTexture9_UnlockRect(priv->d3d_texture_system, 0))) { - mp_msg(MSGT_VO,MSGL_ERR,"<vo_direct3d>IDirect3DTexture9_UnlockRect failure.\n"); + mp_msg(MSGT_VO,MSGL_ERR, "<vo_direct3d>OSD texture unlock failed.\n"); return; } @@ -1064,7 +1064,7 @@ if (FAILED(IDirect3DDevice9_UpdateTexture(priv->d3d_device, (IDirect3DBaseTexture9 *)priv->d3d_texture_system, (IDirect3DBaseTexture9 *)priv->d3d_texture_osd))) { - mp_msg(MSGT_VO,MSGL_ERR,"<vo_direct3d>IDirect3DDevice9_UpdateTexture failure.\n"); + mp_msg(MSGT_VO,MSGL_ERR, "<vo_direct3d>OSD texture transfer failed.\n"); return; } } @@ -1088,7 +1088,7 @@ osd_quad_vb[3].tv = (float)priv->osd_height / priv->osd_texture_height; if (FAILED(IDirect3DDevice9_BeginScene(priv->d3d_device))) { - mp_msg(MSGT_VO,MSGL_ERR,"<vo_direct3d>BeginScene failed\n"); + mp_msg(MSGT_VO,MSGL_ERR,"<vo_direct3d>BeginScene failed.\n"); return; } @@ -1109,7 +1109,7 @@ IDirect3DDevice9_SetRenderState(priv->d3d_device, D3DRS_ALPHABLENDENABLE, FALSE); if (FAILED(IDirect3DDevice9_EndScene(priv->d3d_device))) { - mp_msg(MSGT_VO,MSGL_ERR,"<vo_direct3d>EndScene failed\n"); + mp_msg(MSGT_VO,MSGL_ERR,"<vo_direct3d>EndScene failed.\n"); return; } }