diff options
author | wm4 <wm4@nowhere> | 2017-12-02 04:33:43 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-12-02 04:53:55 +0100 |
commit | 292724538cfbe2a6c713420f8b5be0abf75ad46c (patch) | |
tree | e1bb9a2a16e347f0de3075792d18492b3dd4852c /video/hwdec.h | |
parent | 23a9efd124042e7c97f8317bcd8ae5903d039ef7 (diff) | |
download | mpv-292724538cfbe2a6c713420f8b5be0abf75ad46c.tar.bz2 mpv-292724538cfbe2a6c713420f8b5be0abf75ad46c.tar.xz |
video: remove some more hwdec legacy stuff
Finally get rid of all the HWDEC_* things, and instead rely on the
libavutil equivalents. vdpau still uses a shitty hack, but fuck the
vdpau code.
Remove all the now unneeded remains. The vdpau preemption thing was not
unused anymore; if someone cares this could probably be restored.
Diffstat (limited to 'video/hwdec.h')
-rw-r--r-- | video/hwdec.h | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/video/hwdec.h b/video/hwdec.h index 2c0f19b606..80d5cfcecc 100644 --- a/video/hwdec.h +++ b/video/hwdec.h @@ -7,27 +7,9 @@ struct mp_image_pool; -// (for some legacy stuff) -enum hwdec_type { - HWDEC_NONE = 0, - HWDEC_VDPAU, - HWDEC_VAAPI, - HWDEC_D3D11VA, -}; - struct mp_hwdec_ctx { - // Only needed for some filters. The main effect is that hwdec_devices_get() - // can be used. Leave unsert (i.e. HWDEC_NONE) if not needed. - enum hwdec_type type; - const char *driver_name; // NULL if unknown/not loaded - // The meaning depends on the .type field: - // HWDEC_VDPAU: struct mp_vdpau_ctx* - // HWDEC_VAAPI: struct mp_vaapi_ctx* - // HWDEC_D3D11VA: ID3D11Device* - void *ctx; - // libavutil-wrapped context, if available. struct AVBufferRef *av_device_ref; // AVHWDeviceContext* @@ -37,9 +19,6 @@ struct mp_hwdec_ctx { // Hint to generic code: it's using a wrapper API bool emulated; - // Optional. Crap for vdpau. Makes sure preemption recovery is run if needed. - void (*restore_device)(struct mp_hwdec_ctx *ctx); - // Optional. Do not set for VO-bound devices. void (*destroy)(struct mp_hwdec_ctx *ctx); }; @@ -54,12 +33,6 @@ void hwdec_devices_destroy(struct mp_hwdec_devices *devs); // available. Logically, the returned pointer remains valid until VO // uninitialization is started (all users of it must be uninitialized before). // hwdec_devices_request() may be used before this to lazily load devices. -struct mp_hwdec_ctx *hwdec_devices_get(struct mp_hwdec_devices *devs, - enum hwdec_type type); - -struct AVBufferRef; - -// Like hwdec_devices_get(), but search by AV_HWDEVICE_TYPE_* type. // Contains a wrapped AVHWDeviceContext. // Beware that this creates a _new_ reference. struct AVBufferRef *hwdec_devices_get_lavc(struct mp_hwdec_devices *devs, @@ -86,13 +59,6 @@ void hwdec_devices_set_loader(struct mp_hwdec_devices *devs, // if not available). void hwdec_devices_request_all(struct mp_hwdec_devices *devs); -// Convenience function: -// - return NULL if devs==NULL -// - call hwdec_devices_request(devs, type) -// - call hwdec_devices_get(devs, type) -// - then return the mp_hwdec_ctx.ctx field -void *hwdec_devices_load(struct mp_hwdec_devices *devs, enum hwdec_type type); - // Return "," concatenated list (for introspection/debugging). Use talloc_free(). char *hwdec_devices_get_names(struct mp_hwdec_devices *devs); |