summaryrefslogtreecommitdiff
path: root/libavcodec/mediacodecdec_common.h
diff options
context:
space:
mode:
authorAman Gupta <aman@tmm1.net>2018-03-10 23:43:42 -0800
committerAman Gupta <aman@tmm1.net>2018-03-12 01:23:30 -0700
commit936312d18c985335d8e90b04bb15b4227bce7b31 (patch)
tree33474f9c6a5a3ab235ce88be6b07edb7b3c41139 /libavcodec/mediacodecdec_common.h
parent939440ad1aa820bed51f54d273b4fa6c5016d9f9 (diff)
avcodec/mediacodecdec: add debug logging around hw buffer lifecycle
Some Android devices are very finicky about how quicky output buffers are returned back to the decoder, especially when they are associated with a Surface. This commit adds a new counter that keeps track of exactly how many hw output buffers are being retained by the user, along with DEBUG level logging that makes it easy to track the lifecycle of these buffers. Signed-off-by: Aman Gupta <aman@tmm1.net> Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Diffstat (limited to 'libavcodec/mediacodecdec_common.h')
-rw-r--r--libavcodec/mediacodecdec_common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/mediacodecdec_common.h b/libavcodec/mediacodecdec_common.h
index 3fd2412a65..4f3b4f9fa5 100644
--- a/libavcodec/mediacodecdec_common.h
+++ b/libavcodec/mediacodecdec_common.h
@@ -38,6 +38,7 @@ typedef struct MediaCodecDecContext {
AVCodecContext *avctx;
atomic_int refcount;
+ atomic_int hw_buffer_count;
char *codec_name;