#include "libavutil/pixfmt.h"
#include "avcodec.h"
+#define FF_SANE_NB_CHANNELS 128U
+
typedef struct InternalBuffer {
uint8_t *base[AV_NUM_DATA_POINTERS];
uint8_t *data[AV_NUM_DATA_POINTERS];
int width;
int height;
enum AVPixelFormat pix_fmt;
- uint8_t **extended_data;
- int audio_data_size;
- int nb_channels;
} InternalBuffer;
typedef struct AVCodecInternal {
*/
int last_audio_frame;
+ /**
+ * The data for the last allocated audio frame.
+ * Stored here so we can free it.
+ */
+ uint8_t *audio_data;
+
/**
* temporary buffer used for encoders to store their bitstream
*/
const uint8_t *value;
};
-/**
- * Determine whether pix_fmt is a hardware accelerated format.
- */
-int ff_is_hwaccel_pix_fmt(enum AVPixelFormat pix_fmt);
-
/**
* Return the hardware accelerated codec for codec codec_id and
* pixel format pix_fmt.
avctx->time_base);
}
+/**
+ * Get a buffer for a frame. This is a wrapper around
+ * AVCodecContext.get_buffer() and should be used instead calling get_buffer()
+ * directly.
+ */
+int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame);
+
int ff_thread_can_start_frame(AVCodecContext *avctx);
int ff_get_logical_cpus(AVCodecContext *avctx);