On Tue, Jan 24, 2017 at 11:50:03AM +0000, Frediano Ziglio wrote: > This format is required to add metadata to the source buffer > using gst_buffer_add_video_meta_full. > This metadata can be used to pass strides/offsets, or > dmabuf-specific information. > > Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> Acked-by: Christophe Fergeau <cfergeau@xxxxxxxxxx> > --- > server/gstreamer-encoder.c | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/server/gstreamer-encoder.c b/server/gstreamer-encoder.c > index 4a0917e..ba81377 100644 > --- a/server/gstreamer-encoder.c > +++ b/server/gstreamer-encoder.c > @@ -26,6 +26,7 @@ > #include <gst/gst.h> > #include <gst/app/gstappsrc.h> > #include <gst/app/gstappsink.h> > +#include <gst/video/video.h> > > #include "red-common.h" > #include "video-encoder.h" > @@ -42,6 +43,7 @@ > typedef struct { > SpiceBitmapFmt spice_format; > char format[8]; > + GstVideoFormat gst_format; > uint32_t bpp; > uint32_t depth; > uint32_t endianness; > @@ -756,12 +758,12 @@ static const SpiceFormatForGStreamer format_map[] = { > /* First item is invalid. > * It's located first so the loop catch invalid values. > */ > - {SPICE_BITMAP_FMT_INVALID, "", 0, 0, 0, 0, 0, 0}, > - {SPICE_BITMAP_FMT_RGBA, "BGRA", 32, 24, 4321, 0xff000000, 0xff0000, 0xff00}, > - {SPICE_BITMAP_FMT_16BIT, "RGB15", 16, 15, 4321, 0x001f, 0x03E0, 0x7C00}, > + {SPICE_BITMAP_FMT_INVALID, "", GST_VIDEO_FORMAT_UNKNOWN, 0, 0, 0, 0, 0, 0}, > + {SPICE_BITMAP_FMT_RGBA, "BGRA", GST_VIDEO_FORMAT_BGRA, 32, 24, 4321, 0xff000000, 0xff0000, 0xff00}, > + {SPICE_BITMAP_FMT_16BIT, "RGB15", GST_VIDEO_FORMAT_RGB15, 16, 15, 4321, 0x001f, 0x03E0, 0x7C00}, > /* TODO: Test the other formats under GStreamer 0.10*/ > - {SPICE_BITMAP_FMT_32BIT, "BGRx", 32, 24, 4321, 0xff000000, 0xff0000, 0xff00}, > - {SPICE_BITMAP_FMT_24BIT, "BGR", 24, 24, 4321, 0xff0000, 0xff00, 0xff}, > + {SPICE_BITMAP_FMT_32BIT, "BGRx", GST_VIDEO_FORMAT_BGRx, 32, 24, 4321, 0xff000000, 0xff0000, 0xff00}, > + {SPICE_BITMAP_FMT_24BIT, "BGR", GST_VIDEO_FORMAT_BGR, 24, 24, 4321, 0xff0000, 0xff00, 0xff}, > }; > #define GSTREAMER_FORMAT_INVALID (&format_map[0]) > > -- > git-series 0.9.1 > _______________________________________________ > Spice-devel mailing list > Spice-devel@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/spice-devel
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel