* all.
*/
#define FF_CODEC_CAP_INIT_CLEANUP (1 << 1)
-
+/**
+ * Decoders marked with FF_CODEC_CAP_SETS_PKT_DTS want to set
+ * AVFrame.pkt_dts manually. If the flag is set, utils.c won't overwrite
+ * this field. If it's unset, utils.c tries to guess the pkt_dts field
+ * from the input AVPacket.
+ */
+#define FF_CODEC_CAP_SETS_PKT_DTS (1 << 2)
#ifdef DEBUG
# define ff_dlog(ctx, ...) av_log(ctx, AV_LOG_DEBUG, __VA_ARGS__)
#else
-# define ff_dlog(ctx, ...) while(0)
+# define ff_dlog(ctx, ...) do { } while (0)
#endif
#ifdef TRACE
# define ff_tlog(ctx, ...) av_log(ctx, AV_LOG_TRACE, __VA_ARGS__)
#else
-# define ff_tlog(ctx, ...) while(0)
+# define ff_tlog(ctx, ...) do { } while (0)
#endif
* hwaccel-specific private data
*/
void *hwaccel_priv_data;
+
+ /**
+ * checks API usage: after codec draining, flush is required to resume operation
+ */
+ int draining;
+
+ /**
+ * buffers for using new encode/decode API through legacy API
+ */
+ AVPacket *buffer_pkt;
+ int buffer_pkt_valid; // encoding: packet without data can be valid
+ AVFrame *buffer_frame;
+ int draining_done;
} AVCodecInternal;
struct AVCodecDefault {
*/
int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame);
+/**
+ * Add a CPB properties side data to an encoding context.
+ */
+AVCPBProperties *ff_add_cpb_side_data(AVCodecContext *avctx);
+
#endif /* AVCODEC_INTERNAL_H */