Untabifying header file.
The logging category was moved from the plugin generic category to
the display category. It can argue that video formats hacks are
display dependant.
Added validations for input parameters.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2048>
#include "gstvavideoformat.h"
-GST_DEBUG_CATEGORY_STATIC (gstva_debug);
+#define GST_CAT_DEFAULT gst_va_display_debug
+GST_DEBUG_CATEGORY_EXTERN (gst_va_display_debug);
#define VA_NSB_FIRST 0 /* No Significant Bit */
struct FormatMap *map;
guint i;
- GST_DEBUG_CATEGORY_GET (gstva_debug, "va");
-
for (i = 0; i < args->len; i++) {
image_format = &args->image_formats[i];
if (!va_format_is_rgb (image_format))
map->va_format = *image_format;
- GST_CAT_INFO (gstva_debug, "GST_VIDEO_FORMAT_%s => { fourcc %"
+ GST_INFO ("GST_VIDEO_FORMAT_%s => { fourcc %"
GST_FOURCC_FORMAT ", %s, bpp %d, depth %d, R %#010x, G %#010x, "
"B %#010x, A %#010x }", gst_video_format_to_string (map->format),
GST_FOURCC_ARGS (map->va_format.fourcc),
#pragma once
+#include <gst/va/va_fwd.h>
+#include <gst/va/va-prelude.h>
#include <gst/video/video.h>
#include <va/va.h>
G_BEGIN_DECLS
+GST_VA_API
GstVideoFormat gst_va_video_format_from_va_fourcc (guint fourcc);
+
+GST_VA_API
guint gst_va_fourcc_from_video_format (GstVideoFormat format);
+
+GST_VA_API
guint gst_va_chroma_from_video_format (GstVideoFormat format);
+
+GST_VA_API
const VAImageFormat * gst_va_image_format_from_video_format (GstVideoFormat format);
+
+GST_VA_API
GstVideoFormat gst_va_video_format_from_va_image_format (const VAImageFormat * va_format);
+
+GST_VA_API
GstVideoFormat gst_va_video_surface_format_from_image_format (GstVideoFormat image_format,
- GArray * surface_formats);
+ GArray * surface_formats);
+GST_VA_API
void gst_va_video_format_fix_map (VAImageFormat * image_formats,
- gint num);
+ gint num);
G_END_DECLS
'gstvadisplay_drm.c',
'gstvadisplay_wrapped.c',
'gstvautils.c',
+ 'gstvavideoformat.c',
]
va_headers = [
'gstvadisplay_drm.h',
'gstvadisplay_wrapped.h',
'gstvautils.h',
+ 'gstvavideoformat.h',
'va_fwd.h',
'va-prelude.h',
]
version : libversion,
soversion : soversion,
install : true,
- dependencies : [gst_dep, libva_dep, libva_drm_dep, libdrm_dep],
+ dependencies : [gst_dep, gstbase_dep, gstvideo_dep, gstallocators_dep, libva_dep, libva_drm_dep, libdrm_dep],
)
pkg_name = 'gstreamer-va-' + api_version
gstva_dep = declare_dependency(link_with : gstva,
include_directories : [libsinc],
- dependencies : [gst_dep, libva_dep, libva_drm_dep, libdrm_dep])
+ dependencies : [gst_dep, gstvideo_dep, libva_dep, libva_drm_dep, libdrm_dep])
meson.override_dependency(pkg_name, gstva_dep)
#include "gstvaallocator.h"
+#include <gst/va/gstvavideoformat.h>
#include <sys/types.h>
#include <unistd.h>
#include "gstvacaps.h"
#include "gstvasurfacecopy.h"
-#include "gstvavideoformat.h"
#include "vasurfaceimage.h"
#define GST_CAT_DEFAULT gst_va_memory_debug
#include "gstvabasedec.h"
+#include <gst/va/gstvavideoformat.h>
+
#include "gstvaallocator.h"
#include "gstvacaps.h"
#include "gstvapool.h"
-#include "gstvavideoformat.h"
#define GST_CAT_DEFAULT (base->debug_category)
#define GST_VA_BASE_DEC_GET_PARENT_CLASS(obj) (GST_VA_BASE_DEC_GET_CLASS(obj)->parent_decoder_class)
#include "gstvacaps.h"
#include <gst/allocators/allocators.h>
+#include <gst/va/gstvavideoformat.h>
#include <va/va_drmcommon.h>
#include "gstvadisplay_priv.h"
#include "gstvaprofile.h"
-#include "gstvavideoformat.h"
GST_DEBUG_CATEGORY_EXTERN (gstva_debug);
#define GST_CAT_DEFAULT gstva_debug
#include "gstvadecoder.h"
+#include <gst/va/gstvavideoformat.h>
+
#include "gstvaallocator.h"
#include "gstvacaps.h"
#include "gstvadisplay_priv.h"
#include "gstvaprofile.h"
-#include "gstvavideoformat.h"
struct _GstVaDecoder
{
#include "config.h"
#endif
+#include <gst/va/gstvavideoformat.h>
+
#include "gstvadisplay_priv.h"
#include "gstvaprofile.h"
-#include "gstvavideoformat.h"
GArray *
gst_va_display_get_profiles (GstVaDisplay * self, guint32 codec,
#include "gstvafilter.h"
#include <gst/video/video.h>
+#include <gst/va/gstvavideoformat.h>
#include <va/va_drmcommon.h>
#include "gstvaallocator.h"
#include "gstvacaps.h"
#include "gstvadisplay_priv.h"
-#include "gstvavideoformat.h"
#include "vasurfaceimage.h"
struct _GstVaFilter
'gstvapool.c',
'gstvaprofile.c',
'gstvasurfacecopy.c',
- 'gstvavideoformat.c',
'gstvavp8dec.c',
'gstvavp9dec.c',
'gstvampeg2dec.c',
#include "vasurfaceimage.h"
-#include "gstvavideoformat.h"
+#include <gst/va/gstvavideoformat.h>
#include <va/va.h>
gboolean