summaryrefslogtreecommitdiff
path: root/ffmpeg/libavcodec/internal.h
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
committerTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
commitf7813a5324be39d13ab536c245d15dfc602a7849 (patch)
treefad99148b88823d34a5df2f0a25881a002eb291b /ffmpeg/libavcodec/internal.h
parentb7a5a477b8ff4d4e3028b9dfb9a9df0a41463f92 (diff)
basic type mechanism working
Diffstat (limited to 'ffmpeg/libavcodec/internal.h')
-rw-r--r--ffmpeg/libavcodec/internal.h37
1 files changed, 24 insertions, 13 deletions
diff --git a/ffmpeg/libavcodec/internal.h b/ffmpeg/libavcodec/internal.h
index e51757f..35bfcd4 100644
--- a/ffmpeg/libavcodec/internal.h
+++ b/ffmpeg/libavcodec/internal.h
@@ -30,6 +30,7 @@
#include "libavutil/mathematics.h"
#include "libavutil/pixfmt.h"
#include "avcodec.h"
+#include "config.h"
#define FF_SANE_NB_CHANNELS 63U
@@ -81,7 +82,7 @@ typedef struct AVCodecInternal {
* Internal sample count used by avcodec_encode_audio() to fabricate pts.
* Can be removed along with avcodec_encode_audio().
*/
- int sample_count;
+ int64_t sample_count;
#endif
/**
@@ -90,10 +91,18 @@ typedef struct AVCodecInternal {
*/
int last_audio_frame;
- AVFrame to_free;
+ AVFrame *to_free;
FramePool *pool;
+ void *thread_ctx;
+
+ /**
+ * Current packet as passed into the decoder, to avoid having to pass the
+ * packet into every function.
+ */
+ AVPacket *pkt;
+
/**
* temporary buffer used for encoders to store their bitstream
*/
@@ -117,11 +126,10 @@ struct AVCodecDefault {
* Return the hardware accelerated codec for codec codec_id and
* pixel format pix_fmt.
*
- * @param codec_id the codec to match
- * @param pix_fmt the pixel format to match
+ * @param avctx The codec context containing the codec_id and pixel format.
* @return the hardware accelerated codec, or NULL if none was found.
*/
-AVHWAccel *ff_find_hwaccel(enum AVCodecID codec_id, enum AVPixelFormat pix_fmt);
+AVHWAccel *ff_find_hwaccel(AVCodecContext *avctx);
/**
* Return the index into tab at which {a,b} match elements {[0],[1]} of tab.
@@ -139,11 +147,6 @@ int ff_init_buffer_info(AVCodecContext *s, AVFrame *frame);
void avpriv_color_frame(AVFrame *frame, const int color[4]);
-/**
- * Remove and free all side data from packet.
- */
-void ff_packet_free_side_data(AVPacket *pkt);
-
extern volatile int ff_avcodec_locked;
int ff_lock_avcodec(AVCodecContext *log_ctx);
int ff_unlock_avcodec(void);
@@ -175,7 +178,7 @@ int avpriv_unlock_avformat(void);
* @param size the minimum required packet size
* @return 0 on success, negative error code on failure
*/
-int ff_alloc_packet2(AVCodecContext *avctx, AVPacket *avpkt, int size);
+int ff_alloc_packet2(AVCodecContext *avctx, AVPacket *avpkt, int64_t size);
int ff_alloc_packet(AVPacket *avpkt, int size);
@@ -206,8 +209,6 @@ int ff_reget_buffer(AVCodecContext *avctx, AVFrame *frame);
int ff_thread_can_start_frame(AVCodecContext *avctx);
-int ff_get_logical_cpus(AVCodecContext *avctx);
-
int avpriv_h264_has_num_reorder_frames(AVCodecContext *avctx);
/**
@@ -227,4 +228,14 @@ int ff_codec_close_recursive(AVCodecContext *avctx);
*/
int avpriv_bprint_to_extradata(AVCodecContext *avctx, struct AVBPrint *buf);
+const uint8_t *avpriv_find_start_code(const uint8_t *p,
+ const uint8_t *end,
+ uint32_t *state);
+
+/**
+ * Check that the provided frame dimensions are valid and set them on the codec
+ * context.
+ */
+int ff_set_dimensions(AVCodecContext *s, int width, int height);
+
#endif /* AVCODEC_INTERNAL_H */