GST_VA_FEATURE_AUTO,
} GstVaFeature;
+enum
+{
+ /* jpeg decoder in i965 driver cannot create surfaces with fourcc */
+ GST_VA_HACK_SURFACE_NO_FOURCC = 1 << 0,
+};
+
#include <gst/va/va-prelude.h>
#include <gst/va/va-enumtypes.h>
#include <gst/va/gstvadisplay.h>
GstVideoInfo info;
guint usage_hint;
+ guint32 hacks;
+
GstVaSurfaceCopy *copy;
GstVaMemoryPool pool;
self->fourcc = 0;
self->rt_format = gst_va_chroma_from_video_format (self->img_format);
} else {
- self->fourcc = gst_va_fourcc_from_video_format (self->surface_format);
+ if (G_LIKELY (!(self->hacks & GST_VA_HACK_SURFACE_NO_FOURCC)))
+ self->fourcc = gst_va_fourcc_from_video_format (self->surface_format);
self->rt_format = gst_va_chroma_from_video_format (self->surface_format);
}
return TRUE;
}
+void
+gst_va_allocator_set_hacks (GstAllocator * allocator, guint32 hacks)
+{
+ GstVaAllocator *self;
+
+ g_return_if_fail (GST_IS_VA_ALLOCATOR (allocator));
+ self = GST_VA_ALLOCATOR (allocator);
+
+ self->hacks = hacks;
+}
+
/*============ Utilities =====================================================*/
VASurfaceID
GstVideoInfo * info,
guint * usage_hint,
GstVaFeature * use_derived);
+GST_VA_API
+void gst_va_allocator_set_hacks (GstAllocator * allocator,
+ guint32 hack);
GST_VA_API
VASurfaceID gst_va_memory_get_surface (GstMemory * mem);
GArray *surface_formats =
gst_va_decoder_get_surface_formats (base->decoder);
allocator = gst_va_allocator_new (base->display, surface_formats);
+ gst_va_allocator_set_hacks (allocator, base->hacks);
}
return allocator;
GstVideoConverter *convert;
gboolean need_negotiation;
+
+ guint32 hacks;
};
struct _GstVaBaseDecClass