diff options
author | Aman Gupta <aman@tmm1.net> | 2017-11-10 12:17:36 -0800 |
---|---|---|
committer | Aman Gupta <aman@tmm1.net> | 2017-11-13 14:32:48 -0800 |
commit | 76f169368da4928308b932eaea528b841bc34f9e (patch) | |
tree | 65bc42975a910741b1afc64f7dc72d22fcc18d81 | |
parent | dad42bc5a134f60164eab2dfb0892b761603e1e1 (diff) | |
download | ffmpeg-76f169368da4928308b932eaea528b841bc34f9e.tar.gz |
avcodec: add decode_params callback to AVHWAccel struct
Signed-off-by: Aman Gupta <aman@tmm1.net>
-rw-r--r-- | libavcodec/avcodec.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 8c76c9f908..74b097cdd8 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3461,6 +3461,20 @@ typedef struct AVHWAccel { int (*start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size); /** + * Callback for parameter data (SPS/PPS/VPS etc). + * + * Useful for hardware decoders which keep persistent state about the + * video parameters, and need to receive any changes to update that state. + * + * @param avctx the codec context + * @param type the nal unit type + * @param buf the nal unit data buffer + * @param buf_size the size of the nal unit in bytes + * @return zero if successful, a negative value otherwise + */ + int (*decode_params)(AVCodecContext *avctx, int type, const uint8_t *buf, uint32_t buf_size); + + /** * Callback for each slice. * * Meaningful slice information (codec specific) is guaranteed to |