Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
b28b9388
Commit
b28b9388
authored
Sep 28, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified the way title is updated (msw).
parent
c4508cad
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
56 additions
and
43 deletions
+56
-43
modules/video_output/msw/direct3d.c
modules/video_output/msw/direct3d.c
+1
-1
modules/video_output/msw/directx.c
modules/video_output/msw/directx.c
+10
-2
modules/video_output/msw/events.c
modules/video_output/msw/events.c
+35
-38
modules/video_output/msw/glwin32.c
modules/video_output/msw/glwin32.c
+1
-1
modules/video_output/msw/vout.h
modules/video_output/msw/vout.h
+4
-0
modules/video_output/msw/wingdi.c
modules/video_output/msw/wingdi.c
+5
-1
No files found.
modules/video_output/msw/direct3d.c
View file @
b28b9388
...
...
@@ -275,7 +275,7 @@ static int Init( vout_thread_t *p_vout )
}
/* Change the window title bar text */
PostMessage
(
p_vout
->
p_sys
->
hwnd
,
WM_VLC_CHANGE_TEXT
,
0
,
0
);
EventThreadUpdateTitle
(
p_vout
->
p_sys
->
p_event
,
VOUT_TITLE
" (Direct3D output)"
);
p_vout
->
fmt_out
.
i_chroma
=
p_vout
->
output
.
i_chroma
;
return
VLC_SUCCESS
;
...
...
modules/video_output/msw/directx.c
View file @
b28b9388
...
...
@@ -385,10 +385,18 @@ static int Init( vout_thread_t *p_vout )
NewPictureVec
(
p_vout
,
p_vout
->
p_picture
);
}
p_vout
->
fmt_out
.
i_chroma
=
p_vout
->
output
.
i_chroma
;
/* Change the window title bar text */
PostMessage
(
p_vout
->
p_sys
->
hwnd
,
WM_VLC_CHANGE_TEXT
,
0
,
0
);
const
char
*
psz_fallback
;
if
(
p_vout
->
p_sys
->
b_using_overlay
)
psz_fallback
=
VOUT_TITLE
" (hardware YUV overlay DirectX output)"
;
else
if
(
p_vout
->
p_sys
->
b_hw_yuv
)
psz_fallback
=
VOUT_TITLE
" (hardware YUV DirectX output)"
;
else
psz_fallback
=
VOUT_TITLE
" (software RGB DirectX output)"
;
EventThreadUpdateTitle
(
p_vout
->
p_sys
->
p_event
,
psz_fallback
);
p_vout
->
fmt_out
.
i_chroma
=
p_vout
->
output
.
i_chroma
;
return
VLC_SUCCESS
;
}
...
...
modules/video_output/msw/events.c
View file @
b28b9388
...
...
@@ -330,50 +330,30 @@ static void *EventThread( void *p_this )
break
;
case
WM_VLC_CHANGE_TEXT
:
var_Get
(
p_vout
,
"video-title"
,
&
val
);
if
(
!
val
.
psz_string
||
!*
val
.
psz_string
)
/* Default video title */
{
free
(
val
.
psz_string
);
#ifdef MODULE_NAME_IS_wingdi
val
.
psz_string
=
strdup
(
VOUT_TITLE
" (WinGDI output)"
);
#endif
#ifdef MODULE_NAME_IS_wingapi
val
.
psz_string
=
strdup
(
VOUT_TITLE
" (WinGAPI output)"
);
#endif
#ifdef MODULE_NAME_IS_glwin32
val
.
psz_string
=
strdup
(
VOUT_TITLE
" (OpenGL output)"
);
#endif
#ifdef MODULE_NAME_IS_direct3d
val
.
psz_string
=
strdup
(
VOUT_TITLE
" (Direct3D output)"
);
#endif
#ifdef MODULE_NAME_IS_directx
if
(
p_event
->
p_vout
->
p_sys
->
b_using_overlay
)
val
.
psz_string
=
strdup
(
VOUT_TITLE
" (hardware YUV overlay DirectX output)"
);
else
if
(
p_event
->
p_vout
->
p_sys
->
b_hw_yuv
)
val
.
psz_string
=
strdup
(
VOUT_TITLE
" (hardware YUV DirectX output)"
);
else
val
.
psz_string
=
strdup
(
VOUT_TITLE
" (software RGB DirectX output)"
);
#endif
}
{
vlc_mutex_lock
(
&
p_event
->
lock
);
wchar_t
*
pwz_title
=
NULL
;
if
(
p_event
->
psz_title
)
{
wchar_t
*
psz_title
=
malloc
(
strlen
(
val
.
psz_string
)
*
2
+
2
);
if
(
psz_title
)
const
size_t
i_length
=
strlen
(
p_event
->
psz_title
);
pwz_title
=
malloc
(
2
*
(
i_length
+
1
)
);
if
(
pwz_title
)
{
mbstowcs
(
psz_title
,
val
.
psz_string
,
strlen
(
val
.
psz_string
)
*
2
);
psz_title
[
strlen
(
val
.
psz_string
)]
=
0
;
free
(
val
.
psz_string
);
val
.
psz_string
=
(
char
*
)
psz_title
;
mbstowcs
(
pwz_title
,
p_event
->
psz_title
,
2
*
i_length
);
pwz_title
[
i_length
]
=
0
;
}
}
vlc_mutex_unlock
(
&
p_event
->
lock
);
SetWindowText
(
p_event
->
p_vout
->
p_sys
->
hwnd
,
(
LPCTSTR
)
val
.
psz_string
);
if
(
p_event
->
p_vout
->
p_sys
->
hfswnd
)
SetWindowText
(
p_event
->
p_vout
->
p_sys
->
hfswnd
,
(
LPCTSTR
)
val
.
psz_string
);
free
(
val
.
psz_string
);
if
(
pwz_title
)
{
SetWindowText
(
p_vout
->
p_sys
->
hwnd
,
(
LPCTSTR
)
pwz_title
);
if
(
p_vout
->
p_sys
->
hfswnd
)
SetWindowText
(
p_vout
->
p_sys
->
hfswnd
,
(
LPCTSTR
)
pwz_title
);
free
(
pwz_title
);
}
break
;
}
default:
/* Messages we don't handle directly are dispatched to the
...
...
@@ -913,6 +893,21 @@ void EventThreadMouseAutoHide( event_thread_t *p_event )
}
}
}
void
EventThreadUpdateTitle
(
event_thread_t
*
p_event
,
const
char
*
psz_fallback
)
{
char
*
psz_title
=
var_GetNonEmptyString
(
p_event
->
p_vout
,
"video-title"
);
if
(
!
psz_title
)
psz_title
=
strdup
(
psz_fallback
);
if
(
!
psz_title
)
return
;
vlc_mutex_lock
(
&
p_event
->
lock
);
free
(
p_event
->
psz_title
);
p_event
->
psz_title
=
psz_title
;
vlc_mutex_unlock
(
&
p_event
->
lock
);
PostMessage
(
p_event
->
p_vout
->
p_sys
->
hwnd
,
WM_VLC_CHANGE_TEXT
,
0
,
0
);
}
event_thread_t
*
EventThreadCreate
(
vout_thread_t
*
p_vout
)
{
...
...
@@ -936,12 +931,14 @@ event_thread_t *EventThreadCreate( vout_thread_t *p_vout )
p_event
->
i_lastmoved
=
mdate
();
p_event
->
i_mouse_hide_timeout
=
var_GetInteger
(
p_vout
,
"mouse-hide-timeout"
)
*
1000
;
p_event
->
psz_title
=
NULL
;
return
p_event
;
}
void
EventThreadDestroy
(
event_thread_t
*
p_event
)
{
free
(
p_event
->
psz_title
);
vlc_cond_destroy
(
&
p_event
->
wait
);
vlc_mutex_destroy
(
&
p_event
->
lock
);
free
(
p_event
);
...
...
modules/video_output/msw/glwin32.c
View file @
b28b9388
...
...
@@ -123,7 +123,7 @@ static int Init( vout_thread_t *p_vout )
int
iFormat
;
/* Change the window title bar text */
PostMessage
(
p_vout
->
p_sys
->
hwnd
,
WM_VLC_CHANGE_TEXT
,
0
,
0
);
EventThreadUpdateTitle
(
p_vout
->
p_sys
->
p_event
,
VOUT_TITLE
" (OpenGL output)"
);
p_vout
->
p_sys
->
hGLDC
=
GetDC
(
p_vout
->
p_sys
->
hvideownd
);
...
...
modules/video_output/msw/vout.h
View file @
b28b9388
...
...
@@ -42,6 +42,9 @@ typedef struct
volatile
mtime_t
i_lastmoved
;
mtime_t
i_mouse_hide_timeout
;
/* Title */
char
*
psz_title
;
}
event_thread_t
;
#ifdef MODULE_NAME_IS_wingapi
...
...
@@ -263,6 +266,7 @@ int EventThreadStart( event_thread_t * );
void
EventThreadStop
(
event_thread_t
*
);
void
EventThreadMouseAutoHide
(
event_thread_t
*
);
void
EventThreadUpdateTitle
(
event_thread_t
*
,
const
char
*
psz_fallback
);
/*****************************************************************************
* Prototypes from common.c
...
...
modules/video_output/msw/wingdi.c
View file @
b28b9388
...
...
@@ -270,7 +270,11 @@ static int Init( vout_thread_t *p_vout )
PP_OUTPUTPICTURE
[
I_OUTPUTPICTURES
++
]
=
p_pic
;
/* Change the window title bar text */
PostMessage
(
p_vout
->
p_sys
->
hwnd
,
WM_VLC_CHANGE_TEXT
,
0
,
0
);
#ifdef MODULE_NAME_IS_wingapi
EventThreadUpdateTitle
(
p_vout
->
p_sys
->
p_event
,
VOUT_TITLE
" (WinGAPI output)"
);
#else
EventThreadUpdateTitle
(
p_vout
->
p_sys
->
p_event
,
VOUT_TITLE
" (WinGDI output)"
);
#endif
UpdateRects
(
p_vout
,
true
);
return
VLC_SUCCESS
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment