vaapi_encode: Add support for writing arbitrary additional packed headers
[libav.git] / libavcodec / vaapi_encode.h
index 9716578..85f3a0c 100644 (file)
@@ -172,6 +172,11 @@ typedef struct VAAPIEncodeContext {
     int p_counter;
     int end_of_stream;
 
+    // Codec-local options are allocated to follow this structure in
+    // memory (in the AVCodec definition, set priv_data_size to
+    // sizeof(VAAPIEncodeContext) + sizeof(VAAPIEncodeFooOptions)).
+    void *codec_options;
+    char codec_options_data[0];
 } VAAPIEncodeContext;
 
 
@@ -210,6 +215,10 @@ typedef struct VAAPIEncodeType {
                                  VAAPIEncodePicture *pic,
                                  int index, int *type,
                                  char *data, size_t *data_len);
+    int    (*write_extra_header)(AVCodecContext *avctx,
+                                 VAAPIEncodePicture *pic,
+                                 int index, int *type,
+                                 char *data, size_t *data_len);
 } VAAPIEncodeType;