Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
c0e40cc1
Commit
c0e40cc1
authored
Dec 13, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated vout display modules after ::get -> ::pool change.
parent
149587ec
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
150 additions
and
155 deletions
+150
-155
modules/misc/dummy/dummy.c
modules/misc/dummy/dummy.c
+2
-2
modules/misc/dummy/dummy.h
modules/misc/dummy/dummy.h
+1
-0
modules/misc/dummy/vout.c
modules/misc/dummy/vout.c
+30
-10
modules/video_output/aa.c
modules/video_output/aa.c
+10
-12
modules/video_output/caca.c
modules/video_output/caca.c
+13
-15
modules/video_output/directfb.c
modules/video_output/directfb.c
+9
-12
modules/video_output/fb.c
modules/video_output/fb.c
+8
-10
modules/video_output/msw/direct3d.c
modules/video_output/msw/direct3d.c
+9
-12
modules/video_output/msw/glwin32.c
modules/video_output/msw/glwin32.c
+11
-13
modules/video_output/sdl.c
modules/video_output/sdl.c
+9
-10
modules/video_output/snapshot.c
modules/video_output/snapshot.c
+8
-7
modules/video_output/vmem.c
modules/video_output/vmem.c
+10
-9
modules/video_output/wrapper.c
modules/video_output/wrapper.c
+4
-1
modules/video_output/xcb/glx.c
modules/video_output/xcb/glx.c
+5
-8
modules/video_output/xcb/x11.c
modules/video_output/xcb/x11.c
+6
-10
modules/video_output/xcb/xvideo.c
modules/video_output/xcb/xvideo.c
+6
-10
modules/video_output/yuv.c
modules/video_output/yuv.c
+9
-14
No files found.
modules/misc/dummy/dummy.c
View file @
c0e40cc1
...
...
@@ -98,7 +98,7 @@ vlc_module_begin ()
set_description
(
N_
(
"Dummy video output function"
)
)
set_section
(
N_
(
"Dummy Video output"
),
NULL
)
set_capability
(
"vout display"
,
1
)
set_callbacks
(
OpenVideo
,
NULL
)
set_callbacks
(
OpenVideo
,
CloseVideo
)
set_category
(
CAT_VIDEO
)
set_subcategory
(
SUBCAT_VIDEO_VOUT
)
add_category_hint
(
N_
(
"Video"
),
NULL
,
false
)
...
...
@@ -108,7 +108,7 @@ vlc_module_begin ()
set_description
(
N_
(
"Stats video output function"
)
)
set_capability
(
"vout display"
,
0
)
add_shortcut
(
"stats"
)
set_callbacks
(
OpenVideoStat
,
NULL
)
set_callbacks
(
OpenVideoStat
,
CloseVideo
)
add_submodule
()
set_description
(
N_
(
"Dummy font renderer function"
)
)
set_capability
(
"text renderer"
,
1
)
...
...
modules/misc/dummy/dummy.h
View file @
c0e40cc1
...
...
@@ -40,5 +40,6 @@ int OpenAudio ( vlc_object_t * );
int
OpenVideo
(
vlc_object_t
*
);
int
OpenVideoStat
(
vlc_object_t
*
);
void
CloseVideo
(
vlc_object_t
*
);
int
OpenRenderer
(
vlc_object_t
*
);
modules/misc/dummy/vout.c
View file @
c0e40cc1
...
...
@@ -36,7 +36,10 @@
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static
picture_t
*
Get
(
vout_display_t
*
);
struct
vout_display_sys_t
{
picture_pool_t
*
pool
;
};
static
picture_pool_t
*
Pool
(
vout_display_t
*
,
unsigned
count
);
static
void
Display
(
vout_display_t
*
,
picture_t
*
);
static
void
DisplayStat
(
vout_display_t
*
,
picture_t
*
);
static
int
Control
(
vout_display_t
*
,
int
,
va_list
);
...
...
@@ -48,6 +51,12 @@ static void Manage (vout_display_t *);
static
int
OpenVideoCommon
(
vlc_object_t
*
object
,
bool
display_stat
)
{
vout_display_t
*
vd
=
(
vout_display_t
*
)
object
;
vout_display_sys_t
*
sys
;
vd
->
sys
=
sys
=
calloc
(
1
,
sizeof
(
*
sys
));
if
(
!
sys
)
return
VLC_EGENERIC
;
sys
->
pool
=
NULL
;
/* p_vd->info is not modified */
...
...
@@ -60,7 +69,7 @@ static int OpenVideoCommon(vlc_object_t *object, bool display_stat)
}
free
(
chroma
);
}
vd
->
get
=
Get
;
vd
->
pool
=
Pool
;
vd
->
prepare
=
NULL
;
vd
->
display
=
display_stat
?
DisplayStat
:
Display
;
vd
->
control
=
Control
;
...
...
@@ -77,10 +86,21 @@ int OpenVideoStat(vlc_object_t *object)
return
OpenVideoCommon
(
object
,
true
);
}
static
picture_t
*
Get
(
vout_display_t
*
vd
)
void
CloseVideo
(
vlc_object_t
*
object
)
{
VLC_UNUSED
(
vd
);
return
picture_NewFromFormat
(
&
vd
->
fmt
);
vout_display_t
*
vd
=
(
vout_display_t
*
)
object
;
vout_display_sys_t
*
sys
=
vd
->
sys
;
picture_pool_Delete
(
sys
->
pool
);
free
(
sys
);
}
static
picture_pool_t
*
Pool
(
vout_display_t
*
vd
,
unsigned
count
)
{
vout_display_sys_t
*
sys
=
vd
->
sys
;
if
(
!
sys
->
pool
)
sys
->
pool
=
picture_pool_NewFromFormat
(
&
vd
->
fmt
,
count
);
return
sys
->
pool
;
}
static
void
Display
(
vout_display_t
*
vd
,
picture_t
*
picture
)
...
...
modules/video_output/aa.c
View file @
c0e40cc1
...
...
@@ -58,7 +58,7 @@ vlc_module_end()
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static
picture_
t
*
Get
(
vout_display_t
*
);
static
picture_
pool_t
*
Pool
(
vout_display_t
*
,
unsigned
);
static
void
Prepare
(
vout_display_t
*
,
picture_t
*
);
static
void
Display
(
vout_display_t
*
,
picture_t
*
);
static
int
Control
(
vout_display_t
*
,
int
,
va_list
);
...
...
@@ -115,7 +115,7 @@ static int Open(vlc_object_t *object)
vd
->
fmt
=
fmt
;
vd
->
info
=
info
;
vd
->
get
=
Get
;
vd
->
pool
=
Pool
;
vd
->
prepare
=
Prepare
;
vd
->
display
=
Display
;
vd
->
control
=
Control
;
...
...
@@ -152,11 +152,12 @@ static void Close(vlc_object_t *object)
}
/**
* Return a
direct buffer
* Return a
pool of direct buffers
*/
static
picture_
t
*
Get
(
vout_display_t
*
vd
)
static
picture_
pool_t
*
Pool
(
vout_display_t
*
vd
,
unsigned
count
)
{
vout_display_sys_t
*
sys
=
vd
->
sys
;
VLC_UNUSED
(
count
);
if
(
!
sys
->
pool
)
{
picture_resource_t
rsc
;
...
...
@@ -171,11 +172,8 @@ static picture_t *Get(vout_display_t *vd)
return
NULL
;
sys
->
pool
=
picture_pool_New
(
1
,
&
p_picture
);
if
(
!
sys
->
pool
)
return
NULL
;
}
return
picture_pool_Get
(
sys
->
pool
);
return
sys
->
pool
;
}
/**
...
...
modules/video_output/caca.c
View file @
c0e40cc1
...
...
@@ -55,7 +55,7 @@ vlc_module_end()
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static
picture_
t
*
Get
(
vout_display_t
*
);
static
picture_
pool_t
*
Pool
(
vout_display_t
*
,
unsigned
);
static
void
Prepare
(
vout_display_t
*
,
picture_t
*
);
static
void
Display
(
vout_display_t
*
,
picture_t
*
);
static
int
Control
(
vout_display_t
*
,
int
,
va_list
);
...
...
@@ -164,11 +164,6 @@ static int Open(vlc_object_t *object)
fmt
.
i_bmask
=
0x000000ff
;
}
/* */
sys
->
pool
=
picture_pool_NewFromFormat
(
&
fmt
,
1
);
if
(
!
sys
->
pool
)
goto
error
;
/* TODO */
vout_display_info_t
info
=
vd
->
info
;
...
...
@@ -176,7 +171,7 @@ static int Open(vlc_object_t *object)
vd
->
fmt
=
fmt
;
vd
->
info
=
info
;
vd
->
get
=
Get
;
vd
->
pool
=
Pool
;
vd
->
prepare
=
Prepare
;
vd
->
display
=
Display
;
vd
->
control
=
Control
;
...
...
@@ -215,6 +210,7 @@ static void Close(vlc_object_t *object)
vout_display_t
*
vd
=
(
vout_display_t
*
)
object
;
vout_display_sys_t
*
sys
=
vd
->
sys
;
if
(
sys
->
pool
)
picture_pool_Delete
(
sys
->
pool
);
if
(
sys
->
dither
)
cucul_free_dither
(
sys
->
dither
);
...
...
@@ -229,13 +225,15 @@ static void Close(vlc_object_t *object)
}
/**
* Return a
direct buffer
* Return a
pool of direct buffers
*/
static
picture_
t
*
Get
(
vout_display_t
*
vd
)
static
picture_
pool_t
*
Pool
(
vout_display_t
*
vd
,
unsigned
count
)
{
vout_display_sys_t
*
sys
=
vd
->
sys
;
return
picture_pool_Get
(
sys
->
pool
);
if
(
!
sys
->
pool
)
sys
->
pool
=
picture_pool_NewFromFormat
(
&
vd
->
fmt
,
count
);
return
sys
->
pool
;
}
/**
...
...
modules/video_output/directfb.c
View file @
c0e40cc1
...
...
@@ -55,7 +55,7 @@ vlc_module_end()
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static
picture_
t
*
Get
(
vout_display_t
*
);
static
picture_
pool_t
*
Pool
(
vout_display_t
*
,
unsigned
);
static
void
Display
(
vout_display_t
*
,
picture_t
*
);
static
int
Control
(
vout_display_t
*
,
int
,
va_list
);
static
void
Manage
(
vout_display_t
*
);
...
...
@@ -157,7 +157,7 @@ static int Open(vlc_object_t *object)
/* */
vd
->
fmt
=
fmt
;
vd
->
info
=
info
;
vd
->
get
=
Get
;
vd
->
pool
=
Pool
;
vd
->
prepare
=
NULL
;
vd
->
display
=
Display
;
vd
->
control
=
Control
;
...
...
@@ -182,16 +182,13 @@ static void Close(vlc_object_t *object)
}
/* */
static
picture_
t
*
Get
(
vout_display_t
*
vd
)
static
picture_
pool_t
*
Pool
(
vout_display_t
*
vd
,
unsigned
count
)
{
vout_display_sys_t
*
sys
=
vd
->
sys
;
if
(
!
sys
->
pool
)
{
sys
->
pool
=
picture_pool_NewFromFormat
(
&
vd
->
fmt
,
1
);
if
(
!
sys
->
pool
)
return
NULL
;
}
return
picture_pool_Get
(
sys
->
pool
);
sys
->
pool
=
picture_pool_NewFromFormat
(
&
vd
->
fmt
,
count
);
return
sys
->
pool
;
}
static
void
Display
(
vout_display_t
*
vd
,
picture_t
*
picture
)
...
...
modules/video_output/fb.c
View file @
c0e40cc1
...
...
@@ -98,7 +98,7 @@ vlc_module_end ()
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static
picture_
t
*
Get
(
vout_display_t
*
);
static
picture_
pool_t
*
Pool
(
vout_display_t
*
,
unsigned
);
static
void
Display
(
vout_display_t
*
,
picture_t
*
);
static
int
Control
(
vout_display_t
*
,
int
,
va_list
);
static
void
Manage
(
vout_display_t
*
);
...
...
@@ -262,7 +262,7 @@ static int Open(vlc_object_t *object)
/* */
vd
->
fmt
=
fmt
;
vd
->
info
=
info
;
vd
->
get
=
Get
;
vd
->
pool
=
Pool
;
vd
->
prepare
=
NULL
;
vd
->
display
=
Display
;
vd
->
control
=
Control
;
...
...
@@ -296,7 +296,7 @@ static void Close(vlc_object_t *object)
}
/* */
static
picture_
t
*
Get
(
vout_display_t
*
vd
)
static
picture_
pool_t
*
Pool
(
vout_display_t
*
vd
,
unsigned
count
)
{
vout_display_sys_t
*
sys
=
vd
->
sys
;
...
...
@@ -322,11 +322,9 @@ static picture_t *Get(vout_display_t *vd)
if
(
sys
->
is_hw_accel
)
sys
->
pool
=
picture_pool_New
(
1
,
&
sys
->
picture
);
else
sys
->
pool
=
picture_pool_NewFromFormat
(
&
vd
->
fmt
,
1
);
if
(
!
sys
->
pool
)
return
NULL
;
sys
->
pool
=
picture_pool_NewFromFormat
(
&
vd
->
fmt
,
count
);
}
return
picture_pool_Get
(
sys
->
pool
)
;
return
sys
->
pool
;
}
static
void
Display
(
vout_display_t
*
vd
,
picture_t
*
picture
)
{
...
...
modules/video_output/msw/direct3d.c
View file @
c0e40cc1
...
...
@@ -97,7 +97,7 @@ struct picture_sys_t
static
int
Open
(
vlc_object_t
*
);
static
picture_
t
*
Get
(
vout_display_t
*
);
static
picture_
pool_t
*
Pool
(
vout_display_t
*
,
unsigned
);
static
void
Prepare
(
vout_display_t
*
,
picture_t
*
);
static
void
Display
(
vout_display_t
*
,
picture_t
*
);
static
int
Control
(
vout_display_t
*
,
int
,
va_list
);
...
...
@@ -177,7 +177,7 @@ static int Open(vlc_object_t *object)
vd
->
fmt
=
fmt
;
vd
->
info
=
info
;
vd
->
get
=
Get
;
vd
->
pool
=
Pool
;
vd
->
prepare
=
Prepare
;
vd
->
display
=
Display
;
vd
->
control
=
Control
;
...
...
@@ -231,13 +231,10 @@ static void Close(vlc_object_t *object)
}
/* */
static
picture_
t
*
Get
(
vout_display_t
*
vd
)
static
picture_
pool_t
*
Pool
(
vout_display_t
*
vd
,
unsigned
count
)
{
vout_display_sys_t
*
sys
=
vd
->
sys
;
if
(
!
sys
->
pool
)
return
NULL
;
return
picture_pool_Get
(
sys
->
pool
);
VLC_UNUSED
(
count
);
return
vd
->
sys
->
pool
;
}
static
int
Direct3DLockSurface
(
picture_t
*
);
...
...
modules/video_output/msw/glwin32.c
View file @
c0e40cc1
...
...
@@ -74,7 +74,7 @@ vlc_module_end()
/*****************************************************************************
* Local prototypes.
*****************************************************************************/
static
picture_
t
*
Get
(
vout_display_t
*
);
static
picture_
pool_t
*
Pool
(
vout_display_t
*
,
unsigned
);
static
void
Prepare
(
vout_display_t
*
,
picture_t
*
);
static
void
Display
(
vout_display_t
*
,
picture_t
*
);
static
int
Control
(
vout_display_t
*
,
int
,
va_list
);
...
...
@@ -140,7 +140,7 @@ static int Open(vlc_object_t *object)
vd
->
fmt
=
fmt
;
vd
->
info
=
info
;
vd
->
get
=
Get
;
vd
->
pool
=
Pool
;
vd
->
prepare
=
Prepare
;
vd
->
display
=
Display
;
vd
->
control
=
Control
;
...
...
@@ -177,16 +177,14 @@ static void Close(vlc_object_t *object)
}
/* */
static
picture_
t
*
Get
(
vout_display_t
*
vd
)
static
picture_
pool_t
*
Pool
(
vout_display_t
*
vd
,
unsigned
count
)
{
vout_display_sys_t
*
sys
=
vd
->
sys
;
VLC_UNUSED
(
count
);
if
(
!
sys
->
pool
)
{
sys
->
pool
=
vout_display_opengl_GetPool
(
&
sys
->
vgl
);
if
(
!
sys
->
pool
)
return
NULL
;
}
return
picture_pool_Get
(
sys
->
pool
);
sys
->
pool
=
vout_display_opengl_GetPool
(
&
sys
->
vgl
);
return
sys
->
pool
;
}
static
void
Prepare
(
vout_display_t
*
vd
,
picture_t
*
picture
)
...
...
modules/video_output/sdl.c
View file @
c0e40cc1
...
...
@@ -77,7 +77,7 @@ vlc_module_end()
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static
picture_
t
*
Get
(
vout_display_t
*
);
static
picture_
pool_t
*
Pool
(
vout_display_t
*
,
unsigned
);
static
void
Display
(
vout_display_t
*
,
picture_t
*
);
static
int
Control
(
vout_display_t
*
,
int
,
va_list
);
static
void
Manage
(
vout_display_t
*
);
...
...
@@ -337,7 +337,7 @@ static int Open(vlc_object_t *object)
vd
->
fmt
=
fmt
;
vd
->
info
=
info
;
vd
->
get
=
Get
;
vd
->
pool
=
Pool
;
vd
->
prepare
=
NULL
;
vd
->
display
=
Display
;
vd
->
control
=
Control
;
...
...
@@ -389,11 +389,12 @@ static void Close(vlc_object_t *object)
}
/**
* Return a
direct buffer
* Return a
pool of direct buffers
*/
static
picture_
t
*
Get
(
vout_display_t
*
vd
)
static
picture_
pool_t
*
Pool
(
vout_display_t
*
vd
,
unsigned
count
)
{
vout_display_sys_t
*
sys
=
vd
->
sys
;
VLC_UNUSED
(
count
);
if
(
!
sys
->
pool
)
{
picture_resource_t
rsc
;
...
...
@@ -430,11 +431,9 @@ static picture_t *Get(vout_display_t *vd)
return
NULL
;
sys
->
pool
=
picture_pool_New
(
1
,
&
picture
);
if
(
!
sys
->
pool
)
return
NULL
;
}
return
picture_pool_Get
(
sys
->
pool
)
;
return
sys
->
pool
;
}
/**
...
...
modules/video_output/snapshot.c
View file @
c0e40cc1
...
...
@@ -90,7 +90,7 @@ vlc_module_end ()
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static
picture_
t
*
Get
(
vout_display_t
*
);
static
picture_
pool_t
*
Pool
(
vout_display_t
*
,
unsigned
);
static
void
Display
(
vout_display_t
*
,
picture_t
*
);
static
int
Control
(
vout_display_t
*
,
int
,
va_list
);
static
void
Manage
(
vout_display_t
*
);
...
...
@@ -243,7 +243,7 @@ static int Open(vlc_object_t *object)
/* */
vd
->
fmt
=
fmt
;
vd
->
info
=
info
;
vd
->
get
=
Get
;
vd
->
pool
=
Pool
;
vd
->
prepare
=
NULL
;
vd
->
display
=
Display
;
vd
->
control
=
Control
;
...
...
@@ -281,9 +281,10 @@ static void Close(vlc_object_t *object)
/*****************************************************************************
*
*****************************************************************************/
static
picture_
t
*
Get
(
vout_display_t
*
vd
)
static
picture_
pool_t
*
Pool
(
vout_display_t
*
vd
,
unsigned
count
)
{
return
picture_pool_Get
(
vd
->
sys
->
pool
);
VLC_UNUSED
(
count
);
return
vd
->
sys
->
pool
;
}
/* Return the position in ms from the start of the movie */
...
...
modules/video_output/vmem.c
View file @
c0e40cc1
...
...
@@ -98,7 +98,7 @@ struct vout_display_sys_t {
picture_pool_t
*
pool
;
};
static
picture_
t
*
Get
(
vout_display_t
*
);
static
picture_
pool_t
*
Pool
(
vout_display_t
*
,
unsigned
);
static
void
Display
(
vout_display_t
*
,
picture_t
*
);
static
int
Control
(
vout_display_t
*
,
int
,
va_list
);
static
void
Manage
(
vout_display_t
*
);
...
...
@@ -228,7 +228,7 @@ static int Open(vlc_object_t *object)
/* */
vd
->
fmt
=
fmt
;
vd
->
info
=
info
;
vd
->
get
=
Get
;
vd
->
pool
=
Pool
;
vd
->
prepare
=
NULL
;
vd
->
display
=
Display
;
vd
->
control
=
Control
;
...
...
@@ -250,9 +250,10 @@ static void Close(vlc_object_t *object)
}
/* */
static
picture_
t
*
Get
(
vout_display_t
*
vd
)
static
picture_
pool_t
*
Pool
(
vout_display_t
*
vd
,
unsigned
count
)
{
return
picture_pool_Get
(
vd
->
sys
->
pool
);
VLC_UNUSED
(
count
);
return
vd
->
sys
->
pool
;
}
static
void
Display
(
vout_display_t
*
vd
,
picture_t
*
picture
)
...
...
modules/video_output/wrapper.c
View file @
c0e40cc1
...
...
@@ -301,7 +301,10 @@ static int Init(vout_thread_t *vout)
picture
->
p_sys
=
malloc
(
sizeof
(
*
picture
->
p_sys
));
if
(
sys
->
use_dr
)
{
picture_t
*
direct
=
vout_display_Get
(
vd
);
picture_pool_t
*
pool
=
vout_display_Pool
(
vd
,
picture_max
);
if
(
!
pool
)
break
;
picture_t
*
direct
=
picture_pool_Get
(
pool
);
if
(
!
direct
)
break
;
picture
->
format
=
direct
->
format
;
...
...
modules/video_output/xcb/glx.c
View file @
c0e40cc1
...
...
@@ -76,7 +76,7 @@ struct vout_display_sys_t
picture_pool_t
*
pool
;
/* picture pool */
};
static
picture_
t
*
Get
(
vout_display_t
*
);
static
picture_
pool_t
*
Pool
(
vout_display_t
*
,
unsigned
);
static
void
PictureRender
(
vout_display_t
*
,
picture_t
*
);
static
void
PictureDisplay
(
vout_display_t
*
,
picture_t
*
);
static
int
Control
(
vout_display_t
*
,
int
,
va_list
);
...
...
@@ -375,7 +375,7 @@ static int Open (vlc_object_t *obj)
/* Setup vout_display_t once everything is fine */
vd
->
info
=
info
;
vd
->
get
=
Get
;
vd
->
pool
=
Pool
;
vd
->
prepare
=
PictureRender
;
vd
->
display
=
PictureDisplay
;
vd
->
control
=
Control
;
...
...
@@ -431,17 +431,14 @@ static void SwapBuffers (vout_opengl_t *gl)
/**
* Return a direct buffer
*/
static
picture_
t
*
Get
(
vout_display_t
*
vd
)
static
picture_
pool_t
*
Pool
(
vout_display_t
*
vd
,
unsigned
requested_count
)
{
vout_display_sys_t
*
sys
=
vd
->
sys
;
(
void
)
requested_count
;
if
(
!
sys
->
pool
)
{
sys
->
pool
=
vout_display_opengl_GetPool
(
&
sys
->
vgl
);
if
(
!
sys
->
pool
)
return
NULL
;
}
return
picture_pool_Get
(
sys
->
pool
);
return
sys
->
pool
;
}
static
void
PictureRender
(
vout_display_t
*
vd
,
picture_t
*
pic
)
...
...
modules/video_output/xcb/x11.c
View file @
c0e40cc1
...
...
@@ -83,7 +83,7 @@ struct vout_display_sys_t
picture_resource_t
resource
[
MAX_PICTURES
];
};
static
picture_
t
*
Get
(
vout_display_t
*
);
static
picture_
pool_t
*
Pool
(
vout_display_t
*
,
unsigned
);
static
void
Display
(
vout_display_t
*
,
picture_t
*
);
static
int
Control
(
vout_display_t
*
,
int
,
va_list
);
static
void
Manage
(
vout_display_t
*
);
...
...
@@ -281,7 +281,7 @@ static int Open (vlc_object_t *obj)
vd
->
fmt
=
fmt_pic
;
vd
->
info
=
info
;
vd
->
get
=
Get
;
vd
->
pool
=
Pool
;
vd
->
prepare
=
NULL
;
vd
->
display
=
Display
;
vd
->
control
=
Control
;
...
...
@@ -317,9 +317,10 @@ static void Close (vlc_object_t *obj)
/**
* Return a direct buffer
*/
static
picture_
t
*
Get
(
vout_display_t
*
vd
)
static
picture_
pool_t
*
Pool
(
vout_display_t
*
vd
,
unsigned
requested_count
)
{
vout_display_sys_t
*
p_sys
=
vd
->
sys
;
(
void
)
requested_count
;
if
(
!
p_sys
->
pool
)
{
...
...
@@ -366,16 +367,11 @@ static picture_t *Get (vout_display_t *vd)
return
NULL
;
p_sys
->
pool
=
picture_pool_New
(
count
,
pic_array
);
if
(
!
p_sys
->
pool
)
{
/* TODO release picture resources */
return
NULL
;
}
/* FIXME should also do it in case of error ? */
/* TODO release picture resources if NULL */
xcb_flush
(
p_sys
->
conn
);
}
return
p
icture_pool_Get
(
p_sys
->
pool
)
;
return
p
_sys
->
pool
;
}
/**
...
...
modules/video_output/xcb/xvideo.c
View file @
c0e40cc1
...
...
@@ -94,7 +94,7 @@ struct vout_display_sys_t
picture_resource_t
resource
[
MAX_PICTURES
];
};
static
picture_
t
*
Get
(
vout_display_t
*
);
static
picture_
pool_t
*
Pool
(
vout_display_t
*
,
unsigned
);
static
void
Display
(
vout_display_t
*
,
picture_t
*
);
static
int
Control
(
vout_display_t
*
,
int
,
va_list
);
static
void
Manage
(
vout_display_t
*
);
...
...
@@ -514,7 +514,7 @@ static int Open (vlc_object_t *obj)
vd
->
fmt
=
fmt
;
vd
->
info
=
info
;
vd
->
get
=
Get
;
vd
->
pool
=
Pool
;
vd
->
prepare
=
NULL
;
vd
->
display
=
Display
;
vd
->
control
=
Control
;
...
...
@@ -564,9 +564,10 @@ static void Close (vlc_object_t *obj)
/**
* Return a direct buffer
*/
static
picture_
t
*
Get
(
vout_display_t
*
vd
)
static
picture_
pool_t
*
Pool
(
vout_display_t
*
vd
,
unsigned
requested_count
)
{
vout_display_sys_t
*
p_sys
=
vd
->
sys
;
(
void
)
requested_count
;
if
(
!
p_sys
->
pool
)
{
...
...
@@ -621,16 +622,11 @@ static picture_t *Get (vout_display_t *vd)
return
NULL
;
p_sys
->
pool
=
picture_pool_New
(
count
,
pic_array
);
if
(
!
p_sys
->
pool
)
{
/* TODO release picture resources */
return
NULL
;
}
/* FIXME should also do it in case of error ? */
/* TODO release picture resources if NULL */
xcb_flush
(
p_sys
->
conn
);
}
return
p
icture_pool_Get
(
p_sys
->
pool
)
;
return
p
_sys
->
pool
;
}
/**
...
...
modules/video_output/yuv.c
View file @
c0e40cc1
...
...
@@ -80,7 +80,7 @@ static const char *const ppsz_vout_options[] = {
};
/* */
static
picture_
t
*
Get
(
vout_display_t
*
);
static
picture_
pool_t
*
Pool
(
vout_display_t
*
,
unsigned
);
static
void
Display
(
vout_display_t
*
,
picture_t
*
);
static
int
Control
(
vout_display_t
*
,
int
,
va_list
);
static
void
Manage
(
vout_display_t
*
);
...
...
@@ -92,7 +92,6 @@ struct vout_display_sys_t {
FILE
*
f
;
bool
is_first
;
bool
is_yuv4mpeg2
;
bool
use_dr
;
picture_pool_t
*
pool
;
};
...
...
@@ -133,7 +132,6 @@ static int Open(vlc_object_t *object)
return
VLC_EGENERIC
;
}
}
sys
->
use_dr
=
chroma
==
vd
->
fmt
.
i_chroma
;
msg_Dbg
(
vd
,
"Using chroma %4.4s"
,
(
char
*
)
&
chroma
);
/* */
...
...
@@ -166,7 +164,7 @@ static int Open(vlc_object_t *object)
/* */
vd
->
fmt
=
fmt
;
vd
->
info
=
info
;
vd
->
get
=
Get
;
vd
->
pool
=
Pool
;
vd
->
prepare
=
NULL
;
vd
->
display
=
Display
;
vd
->
control
=
Control
;
...
...
@@ -191,15 +189,12 @@ static void Close(vlc_object_t *object)
/*****************************************************************************
*
*****************************************************************************/
static
picture_
t
*
Get
(
vout_display_t
*
vd
)
static
picture_
pool_t
*
Pool
(
vout_display_t
*
vd
,
unsigned
count
)
{
vout_display_sys_t
*
sys
=
vd
->
sys
;
if
(
!
sys
->
pool
)
{
sys
->
pool
=
picture_pool_NewFromFormat
(
&
vd
->
fmt
,
sys
->
use_dr
?
VOUT_MAX_PICTURES
:
1
);
if
(
!
sys
->
pool
)
return
NULL
;
}
return
picture_pool_Get
(
sys
->
pool
);
sys
->
pool
=
picture_pool_NewFromFormat
(
&
vd
->
fmt
,
count
);
return
sys
->
pool
;
}
static
void
Display
(
vout_display_t
*
vd
,
picture_t
*
picture
)
...
...
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