mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
waylandsink/waylandpool: find the video format from the GstVideoInfo instead of accessing the sink
For the sake of isolation only. The format should be the same.
This commit is contained in:
parent
d1480124a7
commit
0bec75a30f
1 changed files with 3 additions and 1 deletions
|
@ -25,6 +25,7 @@
|
||||||
/* Object header */
|
/* Object header */
|
||||||
#include "gstwaylandsink.h"
|
#include "gstwaylandsink.h"
|
||||||
#include "wldisplay.h"
|
#include "wldisplay.h"
|
||||||
|
#include "wlvideoformat.h"
|
||||||
|
|
||||||
/* Debugging category */
|
/* Debugging category */
|
||||||
#include <gst/gstinfo.h>
|
#include <gst/gstinfo.h>
|
||||||
|
@ -244,7 +245,8 @@ gst_wayland_buffer_pool_alloc (GstBufferPool * pool, GstBuffer ** buffer,
|
||||||
height = GST_VIDEO_INFO_HEIGHT (&self->info);
|
height = GST_VIDEO_INFO_HEIGHT (&self->info);
|
||||||
stride = GST_VIDEO_INFO_PLANE_STRIDE (&self->info, 0);
|
stride = GST_VIDEO_INFO_PLANE_STRIDE (&self->info, 0);
|
||||||
size = GST_VIDEO_INFO_SIZE (&self->info);
|
size = GST_VIDEO_INFO_SIZE (&self->info);
|
||||||
format = self->sink->format;
|
format =
|
||||||
|
gst_video_format_to_wayland_format (GST_VIDEO_INFO_FORMAT (&self->info));
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (self, "Allocating buffer of size %" G_GSSIZE_FORMAT
|
GST_DEBUG_OBJECT (self, "Allocating buffer of size %" G_GSSIZE_FORMAT
|
||||||
" (%d x %d, stride %d), format %d", size, width, height, stride, format);
|
" (%d x %d, stride %d), format %d", size, width, height, stride, format);
|
||||||
|
|
Loading…
Reference in a new issue