summaryrefslogtreecommitdiff
path: root/libavcodec/internal.h
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-04-22 20:08:42 -0300
committerJames Almer <jamrial@gmail.com>2017-04-22 20:08:42 -0300
commitbddb2343b6e594e312dadb5d21b408702929ae04 (patch)
tree0295342c799268930ce61e45844af7aadb77f52a /libavcodec/internal.h
parent1fd76277708cf83572ba243e98f9e848c652f83d (diff)
parent061a0c14bb5767bca72e3a7227ca400de439ba09 (diff)
Merge commit '061a0c14bb5767bca72e3a7227ca400de439ba09'
* commit '061a0c14bb5767bca72e3a7227ca400de439ba09': decode: restructure the core decoding code CUVID decoder adapted by wm4. Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/internal.h')
-rw-r--r--libavcodec/internal.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/libavcodec/internal.h b/libavcodec/internal.h
index 90a887332e..2fd27d8431 100644
--- a/libavcodec/internal.h
+++ b/libavcodec/internal.h
@@ -101,6 +101,11 @@ typedef struct FramePool {
int samples;
} FramePool;
+typedef struct DecodeSimpleContext {
+ AVPacket *in_pkt;
+ AVFrame *out_frame;
+} DecodeSimpleContext;
+
typedef struct AVCodecInternal {
/**
* Whether the parent AVCodecContext is a copy of the context which had
@@ -137,6 +142,8 @@ typedef struct AVCodecInternal {
void *thread_ctx;
+ DecodeSimpleContext ds;
+
/**
* Properties (timestamps+side data) extracted from the last packet passed
* for decoding.
@@ -173,6 +180,17 @@ typedef struct AVCodecInternal {
int buffer_pkt_valid; // encoding: packet without data can be valid
AVFrame *buffer_frame;
int draining_done;
+ /* set to 1 when the caller is using the old decoding API */
+ int compat_decode;
+ int compat_decode_warned;
+ /* this variable is set by the decoder internals to signal to the old
+ * API compat wrappers the amount of data consumed from the last packet */
+ size_t compat_decode_consumed;
+ /* when a partial packet has been consumed, this stores the remaining size
+ * of the packet (that should be submitted in the next decode call */
+ size_t compat_decode_partial_size;
+ AVFrame *compat_decode_frame;
+
int showed_multi_packet_warning;
int skip_samples_multiplier;