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
e7190f76
Commit
e7190f76
authored
Jul 14, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MSW/DirectX: keep only picture_sys_t * instead of picture_resource_t
parent
6a9df8ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
30 deletions
+25
-30
modules/video_output/msw/common.h
modules/video_output/msw/common.h
+1
-1
modules/video_output/msw/directx.c
modules/video_output/msw/directx.c
+24
-29
No files found.
modules/video_output/msw/common.h
View file @
e7190f76
...
...
@@ -100,7 +100,7 @@ struct vout_display_sys_t
LPDIRECTDRAWCLIPPER
clipper
;
/* clipper used for blitting */
HINSTANCE
hddraw_dll
;
/* handle of the opened ddraw dll */
picture_
resource_t
resource
;
picture_
sys_t
*
picsys
;
/* It protects the following variables */
vlc_mutex_t
lock
;
...
...
modules/video_output/msw/directx.c
View file @
e7190f76
...
...
@@ -1039,10 +1039,10 @@ static int DirectXCreatePictureResourceYuvOverlay(vout_display_t *vd,
}
/* */
picture_
resource_t
*
rsc
=
&
sys
->
resource
;
rsc
->
p_
sys
->
front_surface
=
front_surface
;
rsc
->
p_
sys
->
surface
=
surface
;
rsc
->
p_
sys
->
fallback
=
NULL
;
picture_
sys_t
*
picsys
=
sys
->
picsys
;
pic
sys
->
front_surface
=
front_surface
;
pic
sys
->
surface
=
surface
;
pic
sys
->
fallback
=
NULL
;
return
VLC_SUCCESS
;
}
static
int
DirectXCreatePictureResourceYuv
(
vout_display_t
*
vd
,
...
...
@@ -1095,10 +1095,10 @@ static int DirectXCreatePictureResourceYuv(vout_display_t *vd,
}
/* */
picture_
resource_t
*
rsc
=
&
sys
->
resource
;
rsc
->
p_
sys
->
front_surface
=
surface
;
rsc
->
p_
sys
->
surface
=
surface
;
rsc
->
p_
sys
->
fallback
=
NULL
;
picture_
sys_t
*
picsys
=
sys
->
picsys
;
pic
sys
->
front_surface
=
surface
;
pic
sys
->
surface
=
surface
;
pic
sys
->
fallback
=
NULL
;
return
VLC_SUCCESS
;
}
static
int
DirectXCreatePictureResourceRgb
(
vout_display_t
*
vd
,
...
...
@@ -1155,10 +1155,10 @@ static int DirectXCreatePictureResourceRgb(vout_display_t *vd,
}
/* */
picture_
resource_t
*
rsc
=
&
sys
->
resource
;
rsc
->
p_
sys
->
front_surface
=
surface
;
rsc
->
p_
sys
->
surface
=
surface
;
rsc
->
p_
sys
->
fallback
=
NULL
;
picture_
sys_t
*
picsys
=
sys
->
picsys
;
pic
sys
->
front_surface
=
surface
;
pic
sys
->
surface
=
surface
;
pic
sys
->
fallback
=
NULL
;
return
VLC_SUCCESS
;
}
...
...
@@ -1169,10 +1169,10 @@ static int DirectXCreatePictureResource(vout_display_t *vd,
vout_display_sys_t
*
sys
=
vd
->
sys
;
/* */
picture_resource_t
*
rsc
=
&
sys
->
resource
;
rsc
->
p_sys
=
calloc
(
1
,
sizeof
(
*
rsc
->
p_sys
));
if
(
!
rsc
->
p_sys
)
picture_sys_t
*
picsys
=
calloc
(
1
,
sizeof
(
*
picsys
));
if
(
unlikely
(
picsys
==
NULL
))
return
VLC_ENOMEM
;
sys
->
picsys
=
picsys
;
/* */
bool
allow_hw_yuv
=
sys
->
can_blit_fourcc
&&
...
...
@@ -1212,11 +1212,11 @@ static void DirectXDestroyPictureResource(vout_display_t *vd)
{
vout_display_sys_t
*
sys
=
vd
->
sys
;
if
(
sys
->
resource
.
p_sys
->
front_surface
!=
sys
->
resource
.
p_
sys
->
surface
)
DirectXDestroySurface
(
sys
->
resource
.
p_
sys
->
surface
);
DirectXDestroySurface
(
sys
->
resource
.
p_
sys
->
front_surface
);
if
(
sys
->
resource
.
p_
sys
->
fallback
)
picture_Release
(
sys
->
resource
.
p_
sys
->
fallback
);
if
(
sys
->
picsys
->
front_surface
!=
sys
->
pic
sys
->
surface
)
DirectXDestroySurface
(
sys
->
pic
sys
->
surface
);
DirectXDestroySurface
(
sys
->
pic
sys
->
front_surface
);
if
(
sys
->
pic
sys
->
fallback
)
picture_Release
(
sys
->
pic
sys
->
fallback
);
}
static
int
DirectXLock
(
picture_t
*
picture
)
...
...
@@ -1247,16 +1247,11 @@ static int DirectXCreatePool(vout_display_t *vd,
return
VLC_EGENERIC
;
/* Create the associated picture */
picture_resource_t
*
rsc
=
&
sys
->
resource
;
for
(
int
i
=
0
;
i
<
PICTURE_PLANE_MAX
;
i
++
)
{
rsc
->
p
[
i
].
p_pixels
=
NULL
;
rsc
->
p
[
i
].
i_pitch
=
0
;
rsc
->
p
[
i
].
i_lines
=
0
;
}
picture_t
*
picture
=
picture_NewFromResource
(
fmt
,
rsc
);
picture_resource_t
resource
=
{
.
p_sys
=
sys
->
picsys
};
picture_t
*
picture
=
picture_NewFromResource
(
fmt
,
&
resource
);
if
(
!
picture
)
{
DirectXDestroyPictureResource
(
vd
);
free
(
rsc
->
p_
sys
);
free
(
sys
->
pic
sys
);
return
VLC_ENOMEM
;
}
...
...
@@ -1325,7 +1320,7 @@ static int DirectXUpdateOverlay(vout_display_t *vd, LPDIRECTDRAWSURFACE2 surface
if
(
!
surface
)
{
if
(
!
sys
->
pool
)
return
VLC_EGENERIC
;
surface
=
sys
->
resource
.
p_
sys
->
front_surface
;
surface
=
sys
->
pic
sys
->
front_surface
;
}
/* The new window dimensions should already have been computed by the
...
...
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