Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
449
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
97bd7ac8
Commit
97bd7ac8
authored
5 years ago
by
Steve Lhomme
Browse files
Options
Downloads
Patches
Plain Diff
d3d11_fmt: make the d3d11_handle_t private
It's not used outside and doesn't need to be shared.
parent
1e2212b1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/video_chroma/d3d11_fmt.c
+56
-46
56 additions, 46 deletions
modules/video_chroma/d3d11_fmt.c
modules/video_chroma/d3d11_fmt.h
+0
-15
0 additions, 15 deletions
modules/video_chroma/d3d11_fmt.h
with
56 additions
and
61 deletions
modules/video_chroma/d3d11_fmt.c
+
56
−
46
View file @
97bd7ac8
...
...
@@ -223,6 +223,17 @@ static void D3D11_GetDriverVersion(vlc_object_t *obj, d3d11_device_t *d3d_dev)
}
#endif
/* VLC_WINSTORE_APP */
typedef
struct
{
#if !VLC_WINSTORE_APP
HINSTANCE
hdll
;
/* handle of the opened d3d11 dll */
#if !defined(NDEBUG) && defined(HAVE_DXGIDEBUG_H)
HINSTANCE
dxgidebug_dll
;
HRESULT
(
WINAPI
*
pf_DXGIGetDebugInterface
)(
const
GUID
*
riid
,
void
**
ppDebug
);
#endif
#endif
}
d3d11_handle_t
;
typedef
struct
{
struct
{
void
*
opaque
;
...
...
@@ -233,6 +244,51 @@ typedef struct {
d3d11_decoder_device_t
dec_device
;
}
d3d11_decoder_device
;
static
int
D3D11_Create
(
vlc_object_t
*
obj
,
d3d11_handle_t
*
hd3d
)
{
#if !VLC_WINSTORE_APP
hd3d
->
hdll
=
LoadLibrary
(
TEXT
(
"D3D11.DLL"
));
if
(
!
hd3d
->
hdll
)
{
msg_Warn
(
obj
,
"cannot load d3d11.dll, aborting"
);
return
VLC_EGENERIC
;
}
# if !defined(NDEBUG) && defined(HAVE_DXGIDEBUG_H)
hd3d
->
dxgidebug_dll
=
NULL
;
hd3d
->
pf_DXGIGetDebugInterface
=
NULL
;
if
(
IsDebuggerPresent
())
{
hd3d
->
dxgidebug_dll
=
LoadLibrary
(
TEXT
(
"DXGIDEBUG.DLL"
));
if
(
hd3d
->
dxgidebug_dll
)
{
hd3d
->
pf_DXGIGetDebugInterface
=
(
void
*
)
GetProcAddress
(
hd3d
->
dxgidebug_dll
,
"DXGIGetDebugInterface"
);
if
(
unlikely
(
!
hd3d
->
pf_DXGIGetDebugInterface
))
{
FreeLibrary
(
hd3d
->
dxgidebug_dll
);
hd3d
->
dxgidebug_dll
=
NULL
;
}
}
}
# endif // !NDEBUG && HAVE_DXGIDEBUG_H
#endif // !VLC_WINSTORE_APP
return
VLC_SUCCESS
;
}
static
void
D3D11_Destroy
(
d3d11_handle_t
*
hd3d
)
{
#if !VLC_WINSTORE_APP
if
(
hd3d
->
hdll
)
FreeLibrary
(
hd3d
->
hdll
);
#if !defined(NDEBUG) && defined(HAVE_DXGIDEBUG_H)
if
(
hd3d
->
dxgidebug_dll
)
FreeLibrary
(
hd3d
->
dxgidebug_dll
);
#endif
#endif
}
void
D3D11_ReleaseDevice
(
d3d11_decoder_device_t
*
dev_sys
)
{
d3d11_decoder_device
*
sys
=
container_of
(
dev_sys
,
d3d11_decoder_device
,
dec_device
);
...
...
@@ -782,39 +838,6 @@ error:
return
VLC_EGENERIC
;
}
#undef D3D11_Create
int
D3D11_Create
(
vlc_object_t
*
obj
,
d3d11_handle_t
*
hd3d
)
{
#if !VLC_WINSTORE_APP
hd3d
->
hdll
=
LoadLibrary
(
TEXT
(
"D3D11.DLL"
));
if
(
!
hd3d
->
hdll
)
{
msg_Warn
(
obj
,
"cannot load d3d11.dll, aborting"
);
return
VLC_EGENERIC
;
}
# if !defined(NDEBUG) && defined(HAVE_DXGIDEBUG_H)
hd3d
->
dxgidebug_dll
=
NULL
;
hd3d
->
pf_DXGIGetDebugInterface
=
NULL
;
if
(
IsDebuggerPresent
())
{
hd3d
->
dxgidebug_dll
=
LoadLibrary
(
TEXT
(
"DXGIDEBUG.DLL"
));
if
(
hd3d
->
dxgidebug_dll
)
{
hd3d
->
pf_DXGIGetDebugInterface
=
(
void
*
)
GetProcAddress
(
hd3d
->
dxgidebug_dll
,
"DXGIGetDebugInterface"
);
if
(
unlikely
(
!
hd3d
->
pf_DXGIGetDebugInterface
))
{
FreeLibrary
(
hd3d
->
dxgidebug_dll
);
hd3d
->
dxgidebug_dll
=
NULL
;
}
}
}
# endif // !NDEBUG && HAVE_DXGIDEBUG_H
#endif
return
VLC_SUCCESS
;
}
void
D3D11_LogResources
(
d3d11_decoder_device_t
*
dev_sys
)
{
#if !VLC_WINSTORE_APP
...
...
@@ -831,19 +854,6 @@ void D3D11_LogResources(d3d11_decoder_device_t *dev_sys)
#endif
}
void
D3D11_Destroy
(
d3d11_handle_t
*
hd3d
)
{
#if !VLC_WINSTORE_APP
if
(
hd3d
->
hdll
)
FreeLibrary
(
hd3d
->
hdll
);
#if !defined(NDEBUG) && defined(HAVE_DXGIDEBUG_H)
if
(
hd3d
->
dxgidebug_dll
)
FreeLibrary
(
hd3d
->
dxgidebug_dll
);
#endif
#endif
}
const
struct
vlc_video_context_operations
d3d11_vctx_ops
=
{
NULL
,
};
...
...
This diff is collapsed.
Click to expand it.
modules/video_chroma/d3d11_fmt.h
+
0
−
15
View file @
97bd7ac8
...
...
@@ -51,17 +51,6 @@ typedef struct
DXGI_ADAPTER_DESC
adapterDesc
;
}
d3d11_device_t
;
typedef
struct
{
#if !VLC_WINSTORE_APP
HINSTANCE
hdll
;
/* handle of the opened d3d11 dll */
#if !defined(NDEBUG) && defined(HAVE_DXGIDEBUG_H)
HINSTANCE
dxgidebug_dll
;
HRESULT
(
WINAPI
*
pf_DXGIGetDebugInterface
)(
const
GUID
*
riid
,
void
**
ppDebug
);
#endif
#endif
}
d3d11_handle_t
;
/* owned by the vout for VLC_CODEC_D3D11_OPAQUE */
typedef
struct
{
...
...
@@ -157,10 +146,6 @@ HRESULT D3D11_CreateDeviceExternal(vlc_object_t *obj, ID3D11DeviceContext *,
void
D3D11_ReleaseDevice
(
d3d11_decoder_device_t
*
);
int
D3D11_Create
(
vlc_object_t
*
,
d3d11_handle_t
*
);
#define D3D11_Create(a,b) D3D11_Create( VLC_OBJECT(a), b )
void
D3D11_Destroy
(
d3d11_handle_t
*
);
void
D3D11_LogResources
(
d3d11_decoder_device_t
*
);
bool
isXboxHardware
(
const
d3d11_device_t
*
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment