summaryrefslogtreecommitdiffstats
path: root/video/decode/lavc.h
diff options
context:
space:
mode:
authorMartin Herkt <lachs0r@srsfckn.biz>2016-06-25 02:25:44 +0200
committerMartin Herkt <lachs0r@srsfckn.biz>2016-06-25 02:25:44 +0200
commitad56f2c46ac6deec86870ec10f2a11a644df07d4 (patch)
tree89f2d90c5586560911e67c872b530c77f151168d /video/decode/lavc.h
parent0536841647ef7931bffb4386d8ffbb5b2b568e8a (diff)
parent393bb2a565dc1e27812e1dd20747814892f80da2 (diff)
downloadmpv-ad56f2c46ac6deec86870ec10f2a11a644df07d4.tar.bz2
mpv-ad56f2c46ac6deec86870ec10f2a11a644df07d4.tar.xz
Merge branch 'master' into release/current
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