diff options
author | James Almer <jamrial@gmail.com> | 2022-03-31 15:42:56 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-31 15:42:56 +0300 |
commit | 6777dd0a61ab78cc9fab92af53558ea44c135056 (patch) | |
tree | 0c9c5ec1b803fd7ba1d5598e81965e5d0d5151af /include | |
parent | ac07a6653a5a0c0fee65dc4c229b8188bb726acb (diff) |
lib: add a function to query the decoder frame delay
Diffstat (limited to 'include')
-rw-r--r-- | include/dav1d/dav1d.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/dav1d/dav1d.h b/include/dav1d/dav1d.h index fd3b622..bd70303 100644 --- a/include/dav1d/dav1d.h +++ b/include/dav1d/dav1d.h @@ -287,6 +287,21 @@ DAV1D_API int dav1d_get_event_flags(Dav1dContext *c, enum Dav1dEventFlags *flags */ DAV1D_API int dav1d_get_decode_error_data_props(Dav1dContext *c, Dav1dDataProps *out); +/** + * Get the decoder delay, which is the number of internally buffered frames, not + * including reference frames. + * This value is guaranteed to be >= 1 and <= max_frame_delay. + * + * @param c Input settings context. + * + * @return Decoder frame delay on success, or < 0 (a negative DAV1D_ERR code) on + * error. + * + * @note The returned delay is valid only for a Dav1dContext initialized with the + * provided Dav1dSettings. + */ +DAV1D_API int dav1d_get_frame_delay(const Dav1dSettings *s); + # ifdef __cplusplus } # endif |