aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/avcodec.h
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-11-15 15:34:50 -0500
committerJustin Ruggles <justin.ruggles@gmail.com>2011-11-19 10:01:05 -0500
commitf3a29b750a5979ae6847879fba758faf1fae88d0 (patch)
tree0a5bf0e6822f0adf284a76c5d28ce55e3ad21d24 /libavcodec/avcodec.h
parent513b6919555b9e2b0c1f86fd5f02caaa14bcbe69 (diff)
downloadffmpeg-f3a29b750a5979ae6847879fba758faf1fae88d0.tar.gz
avcodec: move some AVCodecContext fields to an internal struct.
A new field, AVCodecContext.internal is used to hold a new struct AVCodecInternal, which has private fields that are not codec-specific and are used by general libavcodec functions. Moved internal_buffer, internal_buffer_count, and is_copy.
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r--libavcodec/avcodec.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 7d506a1f72..67bbdf89a2 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1156,6 +1156,8 @@ typedef struct AVFrame {
void *thread_opaque;
} AVFrame;
+struct AVCodecInternal;
+
/**
* main external API structure.
* New fields can be added to the end with minor version bumps.
@@ -1979,17 +1981,21 @@ typedef struct AVCodecContext {
*/
int color_table_id;
+#if FF_API_INTERNAL_CONTEXT
/**
* internal_buffer count
* Don't touch, used by libavcodec default_get_buffer().
+ * @deprecated this field was moved to an internal context
*/
- int internal_buffer_count;
+ attribute_deprecated int internal_buffer_count;
/**
* internal_buffers
* Don't touch, used by libavcodec default_get_buffer().
+ * @deprecated this field was moved to an internal context
*/
- void *internal_buffer;
+ attribute_deprecated void *internal_buffer;
+#endif
/**
* Global quality for codecs which cannot change it per frame.
@@ -2875,14 +2881,18 @@ typedef struct AVCodecContext {
*/
AVPacket *pkt;
+#if FF_API_INTERNAL_CONTEXT
/**
* Whether this is a copy of the context which had init() called on it.
* This is used by multithreading - shared tables and picture pointers
* should be freed from the original context only.
* - encoding: Set by libavcodec.
* - decoding: Set by libavcodec.
+ *
+ * @deprecated this field has been moved to an internal context
*/
- int is_copy;
+ attribute_deprecated int is_copy;
+#endif
/**
* Which multithreading methods to use.
@@ -2945,6 +2955,14 @@ typedef struct AVCodecContext {
#define AV_EF_BITSTREAM (1<<1)
#define AV_EF_BUFFER (1<<2)
#define AV_EF_EXPLODE (1<<3)
+
+ /**
+ * Private context used for internal data.
+ *
+ * Unlike priv_data, this is not codec-specific. It is used in general
+ * libavcodec functions.
+ */
+ struct AVCodecInternal *internal;
} AVCodecContext;
/**