Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
6d2319a0
Commit
6d2319a0
authored
Apr 18, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Calls directly the vout wrapper iof using function pointers.
parent
14f9486c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
38 deletions
+22
-38
include/vlc_vout.h
include/vlc_vout.h
+0
-9
src/video_output/video_output.c
src/video_output/video_output.c
+12
-13
src/video_output/vout_internal.h
src/video_output/vout_internal.h
+5
-0
src/video_output/vout_wrapper.c
src/video_output/vout_wrapper.c
+5
-16
No files found.
include/vlc_vout.h
View file @
6d2319a0
...
...
@@ -130,15 +130,6 @@ struct vout_thread_t
/**@}*/
/** \name Plugin used and shortcuts to access its capabilities */
/**@{*/
int
(
*
pf_init
)
(
vout_thread_t
*
);
void
(
*
pf_end
)
(
vout_thread_t
*
);
int
(
*
pf_manage
)
(
vout_thread_t
*
);
void
(
*
pf_render
)
(
vout_thread_t
*
,
picture_t
*
);
void
(
*
pf_display
)
(
vout_thread_t
*
,
picture_t
*
);
/**@}*/
/** \name Video heap and translation tables */
/**@{*/
int
i_heap_size
;
/**< heap size */
...
...
src/video_output/video_output.c
View file @
6d2319a0
...
...
@@ -787,7 +787,7 @@ static int InitThread( vout_thread_t *p_vout )
int
i
;
/* Initialize output method, it allocates direct buffers for us */
if
(
p_vout
->
pf_init
(
p_vout
)
)
if
(
vout_InitWrapper
(
p_vout
)
)
return
VLC_EGENERIC
;
p_vout
->
p
->
p_picture_displayed
=
NULL
;
...
...
@@ -796,7 +796,7 @@ static int InitThread( vout_thread_t *p_vout )
{
msg_Err
(
p_vout
,
"plugin was unable to allocate at least "
"one direct buffer"
);
p_vout
->
pf_end
(
p_vout
);
vout_EndWrapper
(
p_vout
);
return
VLC_EGENERIC
;
}
...
...
@@ -804,7 +804,7 @@ static int InitThread( vout_thread_t *p_vout )
{
msg_Err
(
p_vout
,
"plugin allocated too many direct buffers, "
"our internal buffers must have overflown."
);
p_vout
->
pf_end
(
p_vout
);
vout_EndWrapper
(
p_vout
);
return
VLC_EGENERIC
;
}
...
...
@@ -907,7 +907,7 @@ static int InitThread( vout_thread_t *p_vout )
if
(
ChromaCreate
(
p_vout
)
)
{
p_vout
->
pf_end
(
p_vout
);
vout_EndWrapper
(
p_vout
);
return
VLC_EGENERIC
;
}
...
...
@@ -1152,10 +1152,10 @@ static void* RunThread( void *p_this )
/*
* Call the plugin-specific rendering method if there is one
*/
if
(
p_filtered_picture
!=
NULL
&&
p_directbuffer
!=
NULL
&&
p_vout
->
pf_render
)
if
(
p_filtered_picture
!=
NULL
&&
p_directbuffer
!=
NULL
)
{
/* Render the direct buffer returned by vout_RenderPicture */
p_vout
->
pf_rend
er
(
p_vout
,
p_directbuffer
);
vout_RenderWrapp
er
(
p_vout
,
p_directbuffer
);
}
/*
...
...
@@ -1211,8 +1211,7 @@ static void* RunThread( void *p_this )
if
(
p_filtered_picture
!=
NULL
&&
p_directbuffer
!=
NULL
)
{
/* Display the direct buffer returned by vout_RenderPicture */
if
(
p_vout
->
pf_display
)
p_vout
->
pf_display
(
p_vout
,
p_directbuffer
);
vout_DisplayWrapper
(
p_vout
,
p_directbuffer
);
/* Tell the vout this was the last picture and that it does not
* need to be forced anymore. */
...
...
@@ -1236,7 +1235,7 @@ static void* RunThread( void *p_this )
/*
* Check events and manage thread
*/
if
(
p_vout
->
pf_manage
&&
p_vout
->
pf_manage
(
p_vout
)
)
if
(
vout_ManageWrapper
(
p_vout
)
)
{
/* A fatal error occurred, and the thread must terminate
* immediately, without displaying anything - setting b_error to 1
...
...
@@ -1265,7 +1264,7 @@ static void* RunThread( void *p_this )
vlc_mutex_lock
(
&
p_vout
->
picture_lock
);
p_vout
->
pf_end
(
p_vout
);
vout_EndWrapper
(
p_vout
);
p_vout
->
p
->
p_picture_displayed
=
NULL
;
for
(
i
=
0
;
i
<
I_OUTPUTPICTURES
;
i
++
)
...
...
@@ -1274,7 +1273,7 @@ static void* RunThread( void *p_this )
I_OUTPUTPICTURES
=
0
;
if
(
p_vout
->
pf_init
(
p_vout
)
)
if
(
vout_InitWrapper
(
p_vout
)
)
{
msg_Err
(
p_vout
,
"cannot resize display"
);
/* FIXME: pf_end will be called again in CleanThread()? */
...
...
@@ -1310,7 +1309,7 @@ static void* RunThread( void *p_this )
vlc_mutex_lock
(
&
p_vout
->
picture_lock
);
p_vout
->
pf_end
(
p_vout
);
vout_EndWrapper
(
p_vout
);
I_OUTPUTPICTURES
=
I_RENDERPICTURES
=
0
;
...
...
@@ -1427,7 +1426,7 @@ static void CleanThread( vout_thread_t *p_vout )
/* Destroy translation tables */
if
(
!
p_vout
->
b_error
)
p_vout
->
pf_end
(
p_vout
);
vout_EndWrapper
(
p_vout
);
}
/*****************************************************************************
...
...
src/video_output/vout_internal.h
View file @
6d2319a0
...
...
@@ -120,6 +120,11 @@ void vout_UsePictureLocked( vout_thread_t *p_vout, picture_t *p_pic );
/* */
int
vout_OpenWrapper
(
vout_thread_t
*
,
const
char
*
);
void
vout_CloseWrapper
(
vout_thread_t
*
);
int
vout_InitWrapper
(
vout_thread_t
*
);
void
vout_EndWrapper
(
vout_thread_t
*
);
int
vout_ManageWrapper
(
vout_thread_t
*
);
void
vout_RenderWrapper
(
vout_thread_t
*
,
picture_t
*
);
void
vout_DisplayWrapper
(
vout_thread_t
*
,
picture_t
*
);
#endif
src/video_output/vout_wrapper.c
View file @
6d2319a0
...
...
@@ -53,12 +53,6 @@ struct picture_sys_t {
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static
int
Init
(
vout_thread_t
*
);
static
void
End
(
vout_thread_t
*
);
static
int
Manage
(
vout_thread_t
*
);
static
void
Render
(
vout_thread_t
*
,
picture_t
*
);
static
void
Display
(
vout_thread_t
*
,
picture_t
*
);
static
void
VoutGetDisplayCfg
(
vout_thread_t
*
,
vout_display_cfg_t
*
,
const
char
*
title
);
#ifdef WIN32
...
...
@@ -120,11 +114,6 @@ int vout_OpenWrapper(vout_thread_t *vout, const char *name)
#endif
/* */
vout
->
pf_init
=
Init
;
vout
->
pf_end
=
End
;
vout
->
pf_manage
=
Manage
;
vout
->
pf_render
=
Render
;
vout
->
pf_display
=
Display
;
vout
->
p_sys
=
sys
;
return
VLC_SUCCESS
;
...
...
@@ -149,7 +138,7 @@ void vout_CloseWrapper(vout_thread_t *vout)
/*****************************************************************************
*
*****************************************************************************/
static
int
Init
(
vout_thread_t
*
vout
)
int
vout_InitWrapper
(
vout_thread_t
*
vout
)
{
vout_sys_t
*
sys
=
vout
->
p_sys
;
vout_display_t
*
vd
=
sys
->
vd
;
...
...
@@ -244,7 +233,7 @@ static int Init(vout_thread_t *vout)
/*****************************************************************************
*
*****************************************************************************/
static
void
End
(
vout_thread_t
*
vout
)
void
vout_EndWrapper
(
vout_thread_t
*
vout
)
{
vout_sys_t
*
sys
=
vout
->
p_sys
;
...
...
@@ -269,7 +258,7 @@ static void End(vout_thread_t *vout)
/*****************************************************************************
*
*****************************************************************************/
static
int
Manage
(
vout_thread_t
*
vout
)
int
vout_ManageWrapper
(
vout_thread_t
*
vout
)
{
vout_sys_t
*
sys
=
vout
->
p_sys
;
vout_display_t
*
vd
=
sys
->
vd
;
...
...
@@ -363,7 +352,7 @@ static int Manage(vout_thread_t *vout)
/*****************************************************************************
* Render
*****************************************************************************/
static
void
Rend
er
(
vout_thread_t
*
vout
,
picture_t
*
picture
)
void
vout_RenderWrapp
er
(
vout_thread_t
*
vout
,
picture_t
*
picture
)
{
vout_sys_t
*
sys
=
vout
->
p_sys
;
vout_display_t
*
vd
=
sys
->
vd
;
...
...
@@ -385,7 +374,7 @@ static void Render(vout_thread_t *vout, picture_t *picture)
/*****************************************************************************
*
*****************************************************************************/
static
void
Display
(
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_display_t
*
vd
=
sys
->
vd
;
...
...
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