Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
d83763e8
Commit
d83763e8
authored
Apr 18, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved some private fields out of vlc_vout.h
parent
e0e818e1
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
51 additions
and
49 deletions
+51
-49
include/vlc_vout.h
include/vlc_vout.h
+0
-8
src/video_output/video_epg.c
src/video_output/video_epg.c
+1
-1
src/video_output/video_output.c
src/video_output/video_output.c
+28
-28
src/video_output/video_text.c
src/video_output/video_text.c
+1
-1
src/video_output/video_widgets.c
src/video_output/video_widgets.c
+2
-2
src/video_output/vout_internal.h
src/video_output/vout_internal.h
+10
-0
src/video_output/vout_intf.c
src/video_output/vout_intf.c
+1
-1
src/video_output/vout_pictures.c
src/video_output/vout_pictures.c
+1
-1
src/video_output/vout_wrapper.c
src/video_output/vout_wrapper.c
+7
-7
No files found.
include/vlc_vout.h
View file @
d83763e8
...
...
@@ -91,13 +91,11 @@ typedef struct vout_thread_sys_t vout_thread_sys_t;
struct
vout_thread_t
{
VLC_COMMON_MEMBERS
bool
b_error
;
/** \name Thread properties and locks */
/**@{*/
vlc_mutex_t
picture_lock
;
/**< picture heap lock */
vlc_mutex_t
change_lock
;
/**< thread change lock */
vout_sys_t
*
p_sys
;
/**< system output method */
/**@}*/
/** \name Current display properties */
...
...
@@ -128,12 +126,6 @@ struct vout_thread_t
/* Picture heap */
picture_t
p_picture
[
2
*
VOUT_MAX_PICTURES
+
1
];
/**< pictures */
/* Subpicture unit */
spu_t
*
p_spu
;
/* Video output configuration */
config_chain_t
*
p_cfg
;
/* Private vout_thread data */
vout_thread_sys_t
*
p
;
};
...
...
src/video_output/video_epg.c
View file @
d83763e8
...
...
@@ -280,7 +280,7 @@ int vout_OSDEpg( vout_thread_t *p_vout, input_item_t *p_input )
p_vout
->
fmt_in
.
i_height
);
vlc_epg_Delete
(
p_epg
);
spu_DisplaySubpicture
(
p_vout
->
p_spu
,
p_spu
);
spu_DisplaySubpicture
(
vout_GetSpu
(
p_vout
)
,
p_spu
);
return
VLC_SUCCESS
;
}
src/video_output/video_output.c
View file @
d83763e8
...
...
@@ -259,11 +259,11 @@ vout_thread_t *vout_Request( vlc_object_t *p_this, vout_thread_t *p_vout,
{
msg_Dbg
(
p_this
,
"reusing provided vout"
);
spu_Attach
(
p_vout
->
p_spu
,
VLC_OBJECT
(
p_vout
),
false
);
spu_Attach
(
p_vout
->
p
->
p
_spu
,
VLC_OBJECT
(
p_vout
),
false
);
vlc_object_detach
(
p_vout
);
vlc_object_attach
(
p_vout
,
p_this
);
spu_Attach
(
p_vout
->
p_spu
,
VLC_OBJECT
(
p_vout
),
true
);
spu_Attach
(
p_vout
->
p
->
p
_spu
,
VLC_OBJECT
(
p_vout
),
true
);
}
}
...
...
@@ -409,12 +409,12 @@ vout_thread_t * vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
vlc_object_attach
(
p_vout
,
p_parent
);
/* Initialize subpicture unit */
p_vout
->
p_spu
=
spu_Create
(
p_vout
);
p_vout
->
p
->
p
_spu
=
spu_Create
(
p_vout
);
/* */
spu_Init
(
p_vout
->
p_spu
);
spu_Init
(
p_vout
->
p
->
p
_spu
);
spu_Attach
(
p_vout
->
p_spu
,
VLC_OBJECT
(
p_vout
),
true
);
spu_Attach
(
p_vout
->
p
->
p
_spu
,
VLC_OBJECT
(
p_vout
),
true
);
/* Take care of some "interface/control" related initialisations */
vout_IntfInit
(
p_vout
);
...
...
@@ -474,7 +474,7 @@ vout_thread_t * vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
char
*
psz_tmp
=
config_ChainCreate
(
&
psz_name
,
&
p_cfg
,
psz_parser
);
free
(
psz_parser
);
free
(
psz_tmp
);
p_vout
->
p_cfg
=
p_cfg
;
p_vout
->
p
->
p
_cfg
=
p_cfg
;
/* Create a few object variables for interface interaction */
var_Create
(
p_vout
,
"vout-filter"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
...
...
@@ -503,9 +503,9 @@ vout_thread_t * vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
if
(
vlc_clone
(
&
p_vout
->
p
->
thread
,
RunThread
,
p_vout
,
VLC_THREAD_PRIORITY_OUTPUT
)
)
{
spu_Attach
(
p_vout
->
p_spu
,
VLC_OBJECT
(
p_vout
),
false
);
spu_Destroy
(
p_vout
->
p_spu
);
p_vout
->
p_spu
=
NULL
;
spu_Attach
(
p_vout
->
p
->
p
_spu
,
VLC_OBJECT
(
p_vout
),
false
);
spu_Destroy
(
p_vout
->
p
->
p
_spu
);
p_vout
->
p
->
p
_spu
=
NULL
;
vlc_object_release
(
p_vout
);
return
NULL
;
}
...
...
@@ -519,7 +519,7 @@ vout_thread_t * vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
}
vlc_mutex_unlock
(
&
p_vout
->
change_lock
);
if
(
p_vout
->
b_error
)
if
(
p_vout
->
p
->
b_error
)
{
msg_Err
(
p_vout
,
"video output creation failed"
);
vout_CloseAndRelease
(
p_vout
);
...
...
@@ -562,8 +562,8 @@ static void vout_Destructor( vlc_object_t * p_this )
free
(
p_vout
->
p
->
psz_module_name
);
/* */
if
(
p_vout
->
p_spu
)
spu_Destroy
(
p_vout
->
p_spu
);
if
(
p_vout
->
p
->
p
_spu
)
spu_Destroy
(
p_vout
->
p
->
p
_spu
);
/* Destroy the locks */
vlc_cond_destroy
(
&
p_vout
->
p
->
change_wait
);
...
...
@@ -582,7 +582,7 @@ static void vout_Destructor( vlc_object_t * p_this )
free
(
p_vout
->
p
->
psz_filter_chain
);
free
(
p_vout
->
p
->
psz_title
);
config_ChainDestroy
(
p_vout
->
p_cfg
);
config_ChainDestroy
(
p_vout
->
p
->
p
_cfg
);
free
(
p_vout
->
p
);
...
...
@@ -613,7 +613,7 @@ void vout_ChangePause( vout_thread_t *p_vout, bool b_paused, mtime_t i_date )
vlc_cond_signal
(
&
p_vout
->
p
->
picture_wait
);
vlc_mutex_unlock
(
&
p_vout
->
picture_lock
);
spu_OffsetSubtitleDate
(
p_vout
->
p_spu
,
i_duration
);
spu_OffsetSubtitleDate
(
p_vout
->
p
->
p
_spu
,
i_duration
);
}
else
{
...
...
@@ -752,7 +752,7 @@ void vout_DisplayTitle( vout_thread_t *p_vout, const char *psz_title )
spu_t
*
vout_GetSpu
(
vout_thread_t
*
p_vout
)
{
return
p_vout
->
p_spu
;
return
p_vout
->
p
->
p
_spu
;
}
/*****************************************************************************
...
...
@@ -907,15 +907,15 @@ static void* RunThread( void *p_this )
vlc_mutex_lock
(
&
p_vout
->
change_lock
);
if
(
b_has_wrapper
)
p_vout
->
b_error
=
InitThread
(
p_vout
);
p_vout
->
p
->
b_error
=
InitThread
(
p_vout
);
else
p_vout
->
b_error
=
true
;
p_vout
->
p
->
b_error
=
true
;
/* signal the creation of the vout */
p_vout
->
p
->
b_ready
=
true
;
vlc_cond_signal
(
&
p_vout
->
p
->
change_wait
);
if
(
p_vout
->
b_error
)
if
(
p_vout
->
p
->
b_error
)
goto
exit_thread
;
/* */
...
...
@@ -926,7 +926,7 @@ static void* RunThread( void *p_this )
* Main loop - it is not executed if an error occurred during
* initialization
*/
while
(
!
p_vout
->
p
->
b_done
&&
!
p_vout
->
b_error
)
while
(
!
p_vout
->
p
->
b_done
&&
!
p_vout
->
p
->
b_error
)
{
/* Initialize loop variables */
const
mtime_t
current_date
=
mdate
();
...
...
@@ -1083,7 +1083,7 @@ static void* RunThread( void *p_this )
else
spu_render_time
=
0
;
subpicture_t
*
p_subpic
=
spu_SortSubpictures
(
p_vout
->
p_spu
,
subpicture_t
*
p_subpic
=
spu_SortSubpictures
(
p_vout
->
p
->
p
_spu
,
spu_render_time
,
b_snapshot
);
/*
...
...
@@ -1193,7 +1193,7 @@ static void* RunThread( void *p_this )
* immediately, without displaying anything - setting b_error to 1
* causes the immediate end of the main while() loop. */
// FIXME pf_end
p_vout
->
b_error
=
1
;
p_vout
->
p
->
b_error
=
1
;
break
;
}
...
...
@@ -1215,14 +1215,14 @@ static void* RunThread( void *p_this )
I_OUTPUTPICTURES
=
I_RENDERPICTURES
=
0
;
p_vout
->
b_error
=
InitThread
(
p_vout
);
if
(
p_vout
->
b_error
)
p_vout
->
p
->
b_error
=
InitThread
(
p_vout
);
if
(
p_vout
->
p
->
b_error
)
msg_Err
(
p_vout
,
"InitThread after VOUT_PICTURE_BUFFERS_CHANGE failed"
);
vlc_cond_signal
(
&
p_vout
->
p
->
picture_wait
);
vlc_mutex_unlock
(
&
p_vout
->
picture_lock
);
if
(
p_vout
->
b_error
)
if
(
p_vout
->
p
->
b_error
)
break
;
}
...
...
@@ -1272,7 +1272,7 @@ static void* RunThread( void *p_this )
/*
* Error loop - wait until the thread destruction is requested
*/
if
(
p_vout
->
b_error
)
if
(
p_vout
->
p
->
b_error
)
ErrorThread
(
p_vout
);
/* Clean thread */
...
...
@@ -1324,7 +1324,7 @@ static void CleanThread( vout_thread_t *p_vout )
}
/* Destroy translation tables */
if
(
!
p_vout
->
b_error
)
if
(
!
p_vout
->
p
->
b_error
)
vout_EndWrapper
(
p_vout
);
}
...
...
@@ -1340,8 +1340,8 @@ static void EndThread( vout_thread_t *p_vout )
/* FIXME does that function *really* need to be called inside the thread ? */
/* Detach subpicture unit from both input and vout */
spu_Attach
(
p_vout
->
p_spu
,
VLC_OBJECT
(
p_vout
),
false
);
vlc_object_detach
(
p_vout
->
p_spu
);
spu_Attach
(
p_vout
->
p
->
p
_spu
,
VLC_OBJECT
(
p_vout
),
false
);
vlc_object_detach
(
p_vout
->
p
->
p
_spu
);
/* Destroy the video filters2 */
filter_chain_Delete
(
p_vout
->
p
->
p_vf2_chain
);
...
...
src/video_output/video_text.c
View file @
d83763e8
...
...
@@ -110,7 +110,7 @@ int vout_ShowTextAbsolute( vout_thread_t *p_vout, int i_channel,
if
(
p_style
)
p_spu
->
p_region
->
p_style
=
text_style_Duplicate
(
p_style
);
spu_DisplaySubpicture
(
p_vout
->
p_spu
,
p_spu
);
spu_DisplaySubpicture
(
vout_GetSpu
(
p_vout
)
,
p_spu
);
return
VLC_SUCCESS
;
}
...
...
src/video_output/video_widgets.c
View file @
d83763e8
...
...
@@ -46,7 +46,7 @@ void vout_OSDSlider( vlc_object_t *p_caller, int i_channel, int i_position,
if
(
p_vout
&&
(
var_InheritBool
(
p_caller
,
"osd"
)
&&
(
i_position
>=
0
)
)
)
{
osd_Slider
(
p_caller
,
p_vout
->
p_spu
,
p_vout
->
render
.
i_width
,
osd_Slider
(
p_caller
,
vout_GetSpu
(
p_vout
)
,
p_vout
->
render
.
i_width
,
p_vout
->
render
.
i_height
,
p_vout
->
fmt_in
.
i_x_offset
,
p_vout
->
fmt_in
.
i_height
-
p_vout
->
fmt_in
.
i_visible_height
-
p_vout
->
fmt_in
.
i_y_offset
,
...
...
@@ -69,7 +69,7 @@ void vout_OSDIcon( vlc_object_t *p_caller, int i_channel, short i_type )
if
(
var_InheritBool
(
p_caller
,
"osd"
)
)
{
osd_Icon
(
p_caller
,
p_vout
->
p_spu
,
vout_GetSpu
(
p_vout
)
,
p_vout
->
render
.
i_width
,
p_vout
->
render
.
i_height
,
p_vout
->
fmt_in
.
i_width
-
p_vout
->
fmt_in
.
i_visible_width
...
...
src/video_output/vout_internal.h
View file @
d83763e8
...
...
@@ -43,11 +43,18 @@ struct vout_thread_sys_t
/* module */
char
*
psz_module_name
;
/* Video output configuration */
config_chain_t
*
p_cfg
;
/* Place holder for the vout_wrapper code */
vout_sys_t
*
p_sys
;
/* Thread & synchronization */
vlc_thread_t
thread
;
vlc_cond_t
change_wait
;
bool
b_ready
;
bool
b_done
;
bool
b_error
;
/* */
bool
b_picture_displayed
;
...
...
@@ -98,6 +105,9 @@ struct vout_thread_sys_t
char
*
psz_title
;
/* Subpicture unit */
spu_t
*
p_spu
;
/* */
vlc_mouse_t
mouse
;
};
...
...
src/video_output/vout_intf.c
View file @
d83763e8
...
...
@@ -400,7 +400,7 @@ static int VoutSnapshotPip( vout_thread_t *p_vout, picture_t *p_pic )
p_subpic
->
i_original_picture_width
*=
4
;
p_subpic
->
i_original_picture_height
*=
4
;
spu_DisplaySubpicture
(
p_vout
->
p_spu
,
p_subpic
);
spu_DisplaySubpicture
(
vout_GetSpu
(
p_vout
)
,
p_subpic
);
return
VLC_SUCCESS
;
}
...
...
src/video_output/vout_pictures.c
View file @
d83763e8
...
...
@@ -374,7 +374,7 @@ picture_t *vout_RenderPicture( vout_thread_t *p_vout, picture_t *p_pic,
/* Render the subtitles if present */
if
(
p_subpic
)
spu_RenderSubpictures
(
p_vout
->
p_spu
,
spu_RenderSubpictures
(
p_vout
->
p
->
p
_spu
,
p_render
,
&
p_vout
->
fmt_out
,
p_subpic
,
&
p_vout
->
fmt_in
,
render_date
);
/* Copy in case we used a temporary fast buffer */
...
...
src/video_output/vout_wrapper.c
View file @
d83763e8
...
...
@@ -114,7 +114,7 @@ int vout_OpenWrapper(vout_thread_t *vout, const char *name)
#endif
/* */
vout
->
p
_sys
=
sys
;
vout
->
p
->
p_sys
=
sys
;
return
VLC_SUCCESS
;
}
...
...
@@ -124,7 +124,7 @@ int vout_OpenWrapper(vout_thread_t *vout, const char *name)
*****************************************************************************/
void
vout_CloseWrapper
(
vout_thread_t
*
vout
)
{
vout_sys_t
*
sys
=
vout
->
p_sys
;
vout_sys_t
*
sys
=
vout
->
p
->
p
_sys
;
#ifdef WIN32
var_DelCallback
(
vout
,
"direct3d-desktop"
,
Forward
,
NULL
);
...
...
@@ -140,7 +140,7 @@ void vout_CloseWrapper(vout_thread_t *vout)
*****************************************************************************/
int
vout_InitWrapper
(
vout_thread_t
*
vout
)
{
vout_sys_t
*
sys
=
vout
->
p_sys
;
vout_sys_t
*
sys
=
vout
->
p
->
p
_sys
;
vout_display_t
*
vd
=
sys
->
vd
;
/* */
...
...
@@ -234,7 +234,7 @@ int vout_InitWrapper(vout_thread_t *vout)
*****************************************************************************/
void
vout_EndWrapper
(
vout_thread_t
*
vout
)
{
vout_sys_t
*
sys
=
vout
->
p_sys
;
vout_sys_t
*
sys
=
vout
->
p
->
p
_sys
;
for
(
int
i
=
0
;
i
<
VOUT_MAX_PICTURES
;
i
++
)
{
picture_t
*
picture
=
&
vout
->
p_picture
[
i
];
...
...
@@ -259,7 +259,7 @@ void vout_EndWrapper(vout_thread_t *vout)
*****************************************************************************/
int
vout_ManageWrapper
(
vout_thread_t
*
vout
)
{
vout_sys_t
*
sys
=
vout
->
p_sys
;
vout_sys_t
*
sys
=
vout
->
p
->
p
_sys
;
vout_display_t
*
vd
=
sys
->
vd
;
while
(
vout
->
i_changes
&
(
VOUT_FULLSCREEN_CHANGE
|
...
...
@@ -353,7 +353,7 @@ int vout_ManageWrapper(vout_thread_t *vout)
*****************************************************************************/
void
vout_RenderWrapper
(
vout_thread_t
*
vout
,
picture_t
*
picture
)
{
vout_sys_t
*
sys
=
vout
->
p_sys
;
vout_sys_t
*
sys
=
vout
->
p
->
p
_sys
;
vout_display_t
*
vd
=
sys
->
vd
;
assert
(
sys
->
use_dr
||
!
picture
->
p_sys
->
direct
);
...
...
@@ -375,7 +375,7 @@ void vout_RenderWrapper(vout_thread_t *vout, picture_t *picture)
*****************************************************************************/
void
vout_DisplayWrapper
(
vout_thread_t
*
vout
,
picture_t
*
picture
)
{
vout_sys_t
*
sys
=
vout
->
p_sys
;
vout_sys_t
*
sys
=
vout
->
p
->
p
_sys
;
vout_display_t
*
vd
=
sys
->
vd
;
picture_t
*
direct
=
picture
->
p_sys
->
direct
;
...
...
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