Steve Lhomme
eb8044cff0
d3d11_player: assert on leaks
That could be used for testing leak regressions
7 years ago
Steve Lhomme
15b3c957d0
libvlc: rename libvlc_video_direct3d_engine_d3d9
Use a similar name to the OpenGL engines
7 years ago
Steve Lhomme
bfbd2a28b9
libvlc: rename libvlc_video_direct3d_engine_d3d11
Use a similar name to the OpenGL engines
7 years ago
Steve Lhomme
6bba90162f
libvlc: fix union in output callback device config
For Direct3D9 we actually need both fields
7 years ago
Steve Lhomme
6f381abda9
doc: libvlc: get the OpenGL functions properly
The context has its own functions we already access.
7 years ago
Steve Lhomme
4df5968f37
doc: add the OpenGL callbacks libvlc player sources
7 years ago
Steve Lhomme
dc5783c950
doc: libvlc: fix line endings of OpenGL callback sample
7 years ago
Steve Lhomme
6e7495bf8c
doc: add the d3d11/d3d9 libvlc player sources
7 years ago
Steve Lhomme
73b03a5407
doc: libvlc: fix the Qt OpenGL sample compilation
7 years ago
Steve Lhomme
c819fb26f8
libvlc: use a different name for each variant of the host surface format
Now that we use a union we can differentiate each properly.
In particular the D3D9 is an unsigned FourCC.
It's still not as strongly typed as it could be (no DXGI_FORMAT for example).
7 years ago
Steve Lhomme
a595230d8d
libvlc: merge libvlc_video_direct3d_set_callbacks into libvlc_video_set_output_callbacks
The GetProcAddress callback is always NULL in that case.
7 years ago
Steve Lhomme
5bbae6d818
libvlc: pass the select_plane/frame_metadata callback to OpenGL as well
So we have the same prototype between OpenGL and D3D setup functions.
7 years ago
Steve Lhomme
7aafa1e914
libvlc: let the OpenGL host app tell libvlc its rendering area changed
VLC adjusts the text rendering based on the rendering area size, so we should
be able to adapt to changes in the host app.
This is using the wextern dummy window, like it's done with D3D callbacks. The
callback is given to the host app when the window is enabled and reset when the
window is disabled.
Not sure how it's supposed to be done with Android but given it uses a
regular window, it probably reports size changes already.
7 years ago
Steve Lhomme
8cbb0843c9
libvlc: merge libvlc_video_setup_cb and libvlc_video_direct3d_device_setup_cb
For now the OpenGL setup doesn't need to get any adapter or context from the
host app.
7 years ago
Steve Lhomme
2369082c4f
libvlc: rename libvlc_video_direct3d_device_cfg_t / libvlc_video_setup_device_info_t
To more generic names.
No functional changes.
7 years ago
Steve Lhomme
aab1165b99
libvlc: let the OpenGL host app change the opaque data used for the session
The host may only allocate the opaque structure and the related resources when
a session happens.
7 years ago
Steve Lhomme
87836261f7
libvlc: let the OpenGL host refuse a source format if it can't handle it
Changing internal resources may fail and we shouldn't try to render with this
format.
7 years ago
Steve Lhomme
abd53b1202
libvlc: merge libvlc_video_render_cfg_t and libvlc_video_direct3d_cfg_t
The OpenGL callbacks can now tell the bitdepth request, the full/studio range,
the color space/primary/transfer.
For now we only support 8-bits full range BT.709 rendering.
7 years ago
Steve Lhomme
5f23c6894f
libvlc: pass the OpenGL rendering configuration update as a structure
For now the structure only includes the width/height of the rendering area.
7 years ago
Steve Lhomme
b6a47686df
libvlc: make the OpenGL host tell the rendering colorimetry it's using
We should adapt the tone mapping between the source and the output accordingly.
For now only basic sRGB rendering is supported.
7 years ago
Steve Lhomme
965b1d9c1c
libvlc: add a callback to pass frame metadata before rendering
Only supported by the Direct3D11 rendering engine.
It replaces the metadata passed to start_end_rendering_cb.
7 years ago
Steve Lhomme
8c274f4e5a
d3d11_player: debug leaks on exit in debug mode
The code is currently no leaking so we should be able to track new leaks in the
future using this sample code.
7 years ago
Steve Lhomme
0bac9a08fe
d3d11_player: move the textures release in a separate function
7 years ago
Steve Lhomme
cde6834abf
d3d11_player: add missing d3deviceVLC release
7 years ago
Steve Lhomme
9abf1e87ba
d3d11_player: add missing CloseHandle
7 years ago
Steve Lhomme
883633e4a0
d3d11_player: move the elements that change at each UpdateOutput_cb in a structure
So we know which are which
7 years ago
Steve Lhomme
5de2d6a3b3
d3d11_player: create a new D3D11 environment when Setup_cb is called
and release it when Cleanup_cb is called
7 years ago
Steve Lhomme
3a82b7592e
d3d11_player: move up init/release of render_context code
No functional change
7 years ago
Steve Lhomme
11e0231494
d3d11_player: keep the HWND in the context
So we can reuse it to recreate the whole D3D11 context.
7 years ago
Steve Lhomme
f41cb863c7
d3d11_player: fix warning
7 years ago
Romain Vimont
abba5c2972
doc: fix make distcheck with git worktrees
In a git worktree, .git is a regular (text) file, not a directory.
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
7 years ago
Steve Lhomme
fd72480dfd
d3d11_player: document why we clear with a green tint
And merge EndRender in StartRendering_cb since it's very basic now
7 years ago
Steve Lhomme
e8e720da58
d3d11_player: only update the VLC render target when it changes
7 years ago
Steve Lhomme
3304b55ae6
d3d11_player: only set the d3dctx state once since it's not shared with VLC
7 years ago
Steve Lhomme
0ce3ee9cec
d3d11_player: the shared texture needs to be writable by libvlc
7 years ago
Steve Lhomme
a882a3a886
d3d11_player: use a different ID3D11Device between the app and VLC
The texture we render to is shared between the 2 devices and locked internally
by the driver when needed.
7 years ago
Steve Lhomme
6018909b4f
d3d11_player: don't initialize structures with 0
It doesn't work in C++ as in C.
7 years ago
Steve Lhomme
8bcea68edf
libvlc: provide the adapter to use for D3D9 rendering
7 years ago
Steve Lhomme
303cbe6c89
direct3d9: factorize the code that is always common with local/host rendering
The clear/begin/end scene is always done on our local IDirect3DDevice9. No need
to force the host to do it a second time.
7 years ago
Steve Lhomme
cfaa0bdfe6
direct3d9: the setup callback returns a IDirect3D9 not a IDirect3DDevice9
It's simpler on the host side and we don't need to be tied to the HWND it would
use internally.
7 years ago
Steve Lhomme
d57710ed8b
libvlc: set the report size callback independently from the device setup
This way it can work for all modules that render externally. And the code is
generic. It also makes more sense to handle the window size in the window
module.
7 years ago
Steve Lhomme
5c2e5221f5
doc: D3D9 callbacks: set the rendering size when the window size changes
7 years ago
Steve Lhomme
cfaf7134b4
doc: D3D11 callbacks: set the rendering size when the window size changes
7 years ago
Romain Vimont
70ee5693df
libvlc: doc: list breaking changes
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
7 years ago
Romain Vimont
80a8553e8a
libvlc: player: rename stop() to stop_async()
The new player stops asynchronously. This is a breaking change, so use a
different function name.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
7 years ago
Rémi Denis-Courmont
1c0b393127
Doxygen: remove no longer used alias
7 years ago
Steve Lhomme
cf16b6f0e7
libvlc: use a callback to select the plane to render to
When rendering in Direct3D11 to NV12 we use 2 planes in the same texture.
7 years ago
Steve Lhomme
9b6e022193
libvlc: add support for HDR10 metadata during the rendering start
7 years ago
Steve Lhomme
5ef4b70f9a
doc: add a sample app to demo D3D9 callbacks
8 years ago
Steve Lhomme
9930c40819
doc: add a sample app to demo D3D11 callbacks
8 years ago