Commit Graph

7 Commits

Author SHA1 Message Date
wm4 021cb2c387 mp_image: allow passing NULL to mp_image_new_custom_ref()
A minor simplification. Most callers don't need this, and there's no
good reason why the caller should provide an "initializer" like this.
(This function calls mp_image_new_dummy_ref(), which has no reason
for an initializer either.)
2016-04-25 11:28:49 +02:00
Kevin Mitchell d88934815d dxva2: abort on mp_image_new_custom_ref failure 2016-03-30 09:01:35 -07:00
Kevin Mitchell c0848e18e9 dxva2: stop using pointer obfuscator LPDIRECT3DSURFACE9
It's just ugly and unnecessary.
2016-03-30 09:01:34 -07:00
Kevin Mitchell 5d761dd342 dxva2: check for failure of mp_image_new_custom_ref
previously, this may have caused a leak
2016-02-16 12:36:56 -08:00
Kevin Mitchell d5348a66dc dxva2: another attempt at using mp_image pool
Apparently, some drivers require you to allocate all of the decoder d3d surfaces
at once. This commit changes the strategy from allocating surfaces as needed via
mp_image_pool_set_allocator, to allocating all the surfaces in one call to
IDirectXVideoDecoderService_CreateSurface and adding them to the pool with
mp_image_pool_add.

fixes #2822
2016-02-16 12:36:56 -08:00
Kevin Mitchell cd0a34feb3 dxva2: fix license on some newly added files to lgpl v2.1+
I mistakenly copied the wrong license text into these files when
I created them. Since I'm the only one to have touched these files,
it should be OK to change them.
2016-02-16 12:07:31 -08:00
Kevin Mitchell 06f1e934db dxva2: use mp_image pool for d3d surfaces
This is required so that the individual surfaces can pass beyond the dxva2
decoder and be passed to the vo.

This also adds additional data to mp_image->planes[0] for IMGFMT_DXVA2, which is
required for maintaining and releasing the surface even if the decoder code is
uninited.

The IDirectXVideoDecoder itself is encapsulated together with its surface pool
and configuration in a dxva2_decoder structure whose creation and destruction is
managed by talloc.
2016-02-14 11:01:12 -08:00