mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-01 22:21:13 +00:00
va: Use va_get_surface_usage_hint() to detect the modifiers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5210>
This commit is contained in:
parent
8399bc2521
commit
696d81f6f8
1 changed files with 3 additions and 17 deletions
|
@ -25,6 +25,7 @@
|
||||||
#include "gstvacaps.h"
|
#include "gstvacaps.h"
|
||||||
|
|
||||||
#include <gst/va/gstvavideoformat.h>
|
#include <gst/va/gstvavideoformat.h>
|
||||||
|
#include <gst/va/vasurfaceimage.h>
|
||||||
#include <va/va_drmcommon.h>
|
#include <va/va_drmcommon.h>
|
||||||
|
|
||||||
#include "gstvadisplay_priv.h"
|
#include "gstvadisplay_priv.h"
|
||||||
|
@ -219,23 +220,8 @@ gst_va_create_dma_caps (GstVaDisplay * display, VAEntrypoint entrypoint,
|
||||||
GstCaps *caps = NULL;
|
GstCaps *caps = NULL;
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
switch (entrypoint) {
|
usage_hint = va_get_surface_usage_hint (display,
|
||||||
case VAEntrypointVLD:
|
entrypoint, GST_PAD_UNKNOWN, TRUE);
|
||||||
usage_hint = VA_SURFACE_ATTRIB_USAGE_HINT_DECODER;
|
|
||||||
break;
|
|
||||||
case VAEntrypointEncSlice:
|
|
||||||
case VAEntrypointEncSliceLP:
|
|
||||||
case VAEntrypointEncPicture:
|
|
||||||
usage_hint = VA_SURFACE_ATTRIB_USAGE_HINT_ENCODER;
|
|
||||||
break;
|
|
||||||
case VAEntrypointVideoProc:
|
|
||||||
usage_hint = VA_SURFACE_ATTRIB_USAGE_HINT_VPP_READ |
|
|
||||||
VA_SURFACE_ATTRIB_USAGE_HINT_VPP_WRITE;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
g_assert_not_reached ();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
drm_formats_str = g_ptr_array_new_with_free_func (g_free);
|
drm_formats_str = g_ptr_array_new_with_free_func (g_free);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue