+ added a --video-title option, courtesy of Hornsby Adrian.
* modules/video_output/directx/directx.c: minor changes.
var_Create( p_vout, "directx-hw-yuv", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
var_Create( p_vout, "directx-3buffering", VLC_VAR_BOOL|VLC_VAR_DOINHERIT );
var_Create( p_vout, "directx-device", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
+ var_Create( p_vout, "video-title", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
p_vout->p_sys->b_cursor_hidden = 0;
p_vout->p_sys->i_lastmoved = mdate();
*/
if( p_vout->p_sys->i_changes & DX_POSITION_CHANGE )
{
+ p_vout->p_sys->i_changes &= ~DX_POSITION_CHANGE;
+
if( p_vout->p_sys->b_using_overlay )
DirectXUpdateOverlay( p_vout );
/* This will force the vout core to recreate the picture buffers */
p_vout->i_changes |= VOUT_PICTURE_BUFFERS_CHANGE;
}
-
- p_vout->p_sys->i_changes &= ~DX_POSITION_CHANGE;
}
/* We used to call the Win32 PeekMessage function here to read the window
DDOVERLAYFX ddofx;
DWORD dwFlags;
HRESULT dxresult;
+ RECT rect_src = p_vout->p_sys->rect_src_clipped;
+ RECT rect_dest = p_vout->p_sys->rect_dest_clipped;
if( p_vout->p_sys->p_current_surface == NULL ||
!p_vout->p_sys->b_using_overlay )
dwFlags = DDOVER_SHOW | DDOVER_KEYDESTOVERRIDE;
dxresult = IDirectDrawSurface2_UpdateOverlay(
- p_vout->p_sys->p_current_surface,
- &p_vout->p_sys->rect_src_clipped,
- p_vout->p_sys->p_display,
- &p_vout->p_sys->rect_dest_clipped,
- dwFlags, &ddofx );
+ p_vout->p_sys->p_current_surface,
+ &rect_src, p_vout->p_sys->p_display, &rect_dest,
+ dwFlags, &ddofx );
if(dxresult != DD_OK)
{
- msg_Warn( p_vout,
- "DirectXUpdateOverlay cannot move or resize overlay" );
+ msg_Warn( p_vout, "DirectXUpdateOverlay cannot move/resize overlay" );
return VLC_EGENERIC;
}
break;
case WM_VLC_CHANGE_TEXT:
- if( p_event->p_vout->p_sys->b_using_overlay )
- SetWindowText( p_event->p_vout->p_sys->hwnd,
- VOUT_TITLE " (hardware YUV overlay DirectX output)" );
- else if( p_event->p_vout->p_sys->b_hw_yuv )
- SetWindowText( p_event->p_vout->p_sys->hwnd,
- VOUT_TITLE " (hardware YUV DirectX output)" );
- else SetWindowText( p_event->p_vout->p_sys->hwnd,
- VOUT_TITLE " (software RGB DirectX output)" );
+ var_Get( p_event->p_vout, "video-title", &val );
+
+ if( !val.psz_string || !*val.psz_string ) /* Default video title */
+ {
+ if( p_event->p_vout->p_sys->b_using_overlay )
+ SetWindowText( p_event->p_vout->p_sys->hwnd,
+ VOUT_TITLE " (hardware YUV overlay DirectX output)" );
+ else if( p_event->p_vout->p_sys->b_hw_yuv )
+ SetWindowText( p_event->p_vout->p_sys->hwnd,
+ VOUT_TITLE " (hardware YUV DirectX output)" );
+ else SetWindowText( p_event->p_vout->p_sys->hwnd,
+ VOUT_TITLE " (software RGB DirectX output)" );
+ }
+ else
+ {
+ SetWindowText( p_event->p_vout->p_sys->hwnd, val.psz_string );
+ }
break;
default:
"You can enforce the position of the top left corner of the video window "\
"here (y coordinate).")
+#define VIDEO_TITLE_TEXT N_("Video title")
+#define VIDEO_TITLE_LONGTEXT N_( \
+ "You can specify a custom video window title here.")
+
#define ALIGN_TEXT N_("Video alignment")
#define ALIGN_LONGTEXT N_( \
"You can enforce the video alignement in its window. By default (0) it " \
add_integer( "height", -1, NULL, HEIGHT_TEXT, HEIGHT_LONGTEXT, VLC_TRUE );
add_integer( "video-x", -1, NULL, VIDEOX_TEXT, VIDEOX_LONGTEXT, VLC_TRUE );
add_integer( "video-y", -1, NULL, VIDEOY_TEXT, VIDEOY_LONGTEXT, VLC_TRUE );
+ add_string( "video-title", NULL, NULL, VIDEO_TITLE_TEXT,
+ VIDEO_TITLE_LONGTEXT, VLC_TRUE );
add_integer( "align", 0, NULL, ALIGN_TEXT, ALIGN_LONGTEXT, VLC_TRUE );
change_integer_list( pi_align_values, ppsz_align_descriptions, 0 );
add_float( "zoom", 1, NULL, ZOOM_TEXT, ZOOM_LONGTEXT, VLC_TRUE );