summaryrefslogtreecommitdiff
path: root/libavcodec/internal.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-01-17 01:40:45 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-01-17 02:37:30 +0100
commit67f5650a78de2567c58dbd7545434cc6d3ef9b7e (patch)
tree34b08ed769cd7a1f071bf9ff4eca1348481c0bf1 /libavcodec/internal.h
parent905c4dc2b0d564e1b9b6bc6eeca0b8915b81cd8c (diff)
parent9e12002f114d7e0b0ef69519518cdc0391e5e198 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: rv34: add NEON rv34_idct_add rv34: 1-pass inter MB reconstruction add SMJPEG muxer avformat: split out common SMJPEG code pictordec: Use bytestream2 functions avconv: use avcodec_encode_audio2() pcmenc: use AVCodec.encode2() avcodec: bump minor version and add APIChanges for the new audio encoding API avcodec: Add avcodec_encode_audio2() as replacement for avcodec_encode_audio() avcodec: add a public function, avcodec_fill_audio_frame(). rv34: Intra 16x16 handling rv34: Inter/intra MB code split Conflicts: Changelog libavcodec/avcodec.h libavcodec/pictordec.c libavcodec/utils.c libavcodec/version.h libavcodec/x86/rv34dsp.asm libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/internal.h')
-rw-r--r--libavcodec/internal.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/libavcodec/internal.h b/libavcodec/internal.h
index e6270f81bf..72a89441c2 100644
--- a/libavcodec/internal.h
+++ b/libavcodec/internal.h
@@ -61,6 +61,14 @@ typedef struct AVCodecInternal {
* should be freed from the original context only.
*/
int is_copy;
+
+#if FF_API_OLD_DECODE_AUDIO
+ /**
+ * Internal sample count used by avcodec_encode_audio() to fabricate pts.
+ * Can be removed along with avcodec_encode_audio().
+ */
+ int sample_count;
+#endif
} AVCodecInternal;
struct AVCodecDefault {
@@ -111,4 +119,21 @@ int avpriv_unlock_avformat(void);
*/
#define FF_MAX_EXTRADATA_SIZE ((1 << 28) - FF_INPUT_BUFFER_PADDING_SIZE)
+/**
+ * Check AVPacket size and/or allocate data.
+ *
+ * Encoders supporting AVCodec.encode2() can use this as a convenience to
+ * ensure the output packet data is large enough, whether provided by the user
+ * or allocated in this function.
+ *
+ * @param avpkt the AVPacket
+ * If avpkt->data is already set, avpkt->size is checked
+ * to ensure it is large enough.
+ * If avpkt->data is NULL, a new buffer is allocated.
+ * All other AVPacket fields will be reset with av_init_packet().
+ * @param size the minimum required packet size
+ * @return 0 on success, negative error code on failure
+ */
+int ff_alloc_packet(AVPacket *avpkt, int size);
+
#endif /* AVCODEC_INTERNAL_H */