mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 16:08:51 +00:00
vaapisink: handle VA/DRM API.
This is not useful in practice but for raw performance evaluation when the sink is invoked with display=drm sync=false. fakesink could also be used though.
This commit is contained in:
parent
6118e76b62
commit
dfff02689c
1 changed files with 13 additions and 0 deletions
|
@ -35,6 +35,9 @@
|
||||||
#include <gst/video/videocontext.h>
|
#include <gst/video/videocontext.h>
|
||||||
#include <gst/vaapi/gstvaapivideobuffer.h>
|
#include <gst/vaapi/gstvaapivideobuffer.h>
|
||||||
#include <gst/vaapi/gstvaapivideosink.h>
|
#include <gst/vaapi/gstvaapivideosink.h>
|
||||||
|
#if USE_DRM
|
||||||
|
# include <gst/vaapi/gstvaapidisplay_drm.h>
|
||||||
|
#endif
|
||||||
#if USE_X11
|
#if USE_X11
|
||||||
# include <gst/vaapi/gstvaapidisplay_x11.h>
|
# include <gst/vaapi/gstvaapidisplay_x11.h>
|
||||||
# include <gst/vaapi/gstvaapiwindow_x11.h>
|
# include <gst/vaapi/gstvaapiwindow_x11.h>
|
||||||
|
@ -479,6 +482,11 @@ gst_vaapisink_set_caps(GstBaseSink *base_sink, GstCaps *caps)
|
||||||
guint win_width, win_height, display_width, display_height;
|
guint win_width, win_height, display_width, display_height;
|
||||||
gint video_width, video_height, video_par_n = 1, video_par_d = 1;
|
gint video_width, video_height, video_par_n = 1, video_par_d = 1;
|
||||||
|
|
||||||
|
#if USE_DRM
|
||||||
|
if (sink->display_type == GST_VAAPI_DISPLAY_TYPE_DRM)
|
||||||
|
return TRUE;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!structure)
|
if (!structure)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!gst_structure_get_int(structure, "width", &video_width))
|
if (!gst_structure_get_int(structure, "width", &video_width))
|
||||||
|
@ -744,6 +752,11 @@ gst_vaapisink_show_frame(GstBaseSink *base_sink, GstBuffer *buffer)
|
||||||
success = gst_vaapisink_show_frame_glx(sink, surface, flags);
|
success = gst_vaapisink_show_frame_glx(sink, surface, flags);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
#if USE_DRM
|
||||||
|
case GST_VAAPI_DISPLAY_TYPE_DRM:
|
||||||
|
success = TRUE;
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
#if USE_X11
|
#if USE_X11
|
||||||
case GST_VAAPI_DISPLAY_TYPE_X11:
|
case GST_VAAPI_DISPLAY_TYPE_X11:
|
||||||
success = gst_vaapisink_put_surface(sink, surface, flags);
|
success = gst_vaapisink_put_surface(sink, surface, flags);
|
||||||
|
|
Loading…
Reference in a new issue