summaryrefslogtreecommitdiffstats
path: root/video/decode/lavc.h
diff options
context:
space:
mode:
Diffstat (limited to 'video/decode/lavc.h')
-rw-r--r--video/decode/lavc.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/video/decode/lavc.h b/video/decode/lavc.h
index 826edbff83..689222d872 100644
--- a/video/decode/lavc.h
+++ b/video/decode/lavc.h
@@ -30,7 +30,7 @@ typedef struct lavc_ctx {
int max_delay_queue;
// From VO
- struct mp_hwdec_info *hwdec_info;
+ struct mp_hwdec_devices *hwdec_devs;
// For free use by hwdec implementation
void *hwdec_priv;
@@ -49,12 +49,14 @@ struct vd_lavc_hwdec {
// If not-0: the IMGFMT_ format that should be accepted in the libavcodec
// get_format callback.
int image_format;
+ // Always returns a non-hwaccel image format.
+ bool copying;
// Setting this will queue the given number of frames before calling
// process_image() or returning them to the renderer. This can increase
// efficiency by not blocking on the hardware pipeline by reading back
// immediately after decoding.
int delay_queue;
- int (*probe)(struct vd_lavc_hwdec *hwdec, struct mp_hwdec_info *info,
+ int (*probe)(struct lavc_ctx *ctx, struct vd_lavc_hwdec *hwdec,
const char *codec);
int (*init)(struct lavc_ctx *ctx);
int (*init_decoder)(struct lavc_ctx *ctx, int w, int h);
@@ -69,6 +71,10 @@ struct vd_lavc_hwdec {
void (*unlock)(struct lavc_ctx *ctx);
// Optional; if a special hardware decoder is needed (instead of "hwaccel").
const char *(*get_codec)(struct lavc_ctx *ctx, const char *codec);
+ // Suffix for libavcodec decoder. If non-NULL, get_codec() is overridden
+ // with hwdec_find_decoder.
+ // Intuitively, this will force the corresponding wrapper decoder.
+ const char *lavc_suffix;
};
enum {
@@ -89,4 +95,6 @@ bool hwdec_check_codec_support(const char *codec,
const struct hwdec_profile_entry *table);
int hwdec_get_max_refs(struct lavc_ctx *ctx);
+const char *hwdec_find_decoder(const char *codec, const char *suffix);
+
#endif