x264enc: Avoid format decision per frame
[platform/upstream/gst-plugins-ugly.git] / ext / x264 / gstx264enc.h
index 732e124..c7de48c 100644 (file)
 #include <stdint.h>
 #endif
 
+/* The x264.h header says this isn't needed with MinGW, but sometimes the
+ * compiler is unable to correctly do the pointer indirection for us, which
+ * leads to a segfault when you try to dereference any const values provided
+ * by x264.dll. See: https://bugzilla.gnome.org/show_bug.cgi?id=779249 */
+#if defined(_WIN32) && !defined(X264_API_IMPORTS)
+# define X264_API_IMPORTS
+#endif
 #include <x264.h>
 
 G_BEGIN_DECLS
@@ -104,6 +111,7 @@ struct _GstX264Enc
   GString *option_string_prop; /* option-string property */
   GString *option_string; /* used by set prop */
   gint frame_packing;
+  gboolean insert_vui;
 
   /* input description */
   GstVideoCodecState *input_state;
@@ -115,6 +123,9 @@ struct _GstX264Enc
   const gchar *peer_profile;
   gboolean peer_intra_profile;
   gint peer_level_idc;
+
+  /* cached values to set x264_picture_t */
+  gint x264_nplanes;
 };
 
 struct _GstX264EncClass