mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 23:14:46 +00:00
build: Factor out endian-order RGB formats
MSVC seems to ignore preprocessor conditionals inside static pad templates
This commit is contained in:
parent
74dcb59025
commit
36332faf14
4 changed files with 28 additions and 20 deletions
|
@ -39,15 +39,17 @@
|
|||
#include <stdlib.h>
|
||||
#include "gstspacescope.h"
|
||||
|
||||
#if G_BYTE_ORDER == G_BIG_ENDIAN
|
||||
#define RGB_ORDER "xRGB"
|
||||
#else
|
||||
#define RGB_ORDER "BGRx"
|
||||
#endif
|
||||
|
||||
static GstStaticPadTemplate gst_space_scope_src_template =
|
||||
GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
#if G_BYTE_ORDER == G_BIG_ENDIAN
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("xRGB"))
|
||||
#else
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("BGRx"))
|
||||
#endif
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (RGB_ORDER))
|
||||
);
|
||||
|
||||
static GstStaticPadTemplate gst_space_scope_sink_template =
|
||||
|
|
|
@ -40,15 +40,17 @@
|
|||
|
||||
#include "gstspectrascope.h"
|
||||
|
||||
#if G_BYTE_ORDER == G_BIG_ENDIAN
|
||||
#define RGB_ORDER "xRGB"
|
||||
#else
|
||||
#define RGB_ORDER "BGRx"
|
||||
#endif
|
||||
|
||||
static GstStaticPadTemplate gst_spectra_scope_src_template =
|
||||
GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
#if G_BYTE_ORDER == G_BIG_ENDIAN
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("xRGB"))
|
||||
#else
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("BGRx"))
|
||||
#endif
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (RGB_ORDER))
|
||||
);
|
||||
|
||||
static GstStaticPadTemplate gst_spectra_scope_sink_template =
|
||||
|
|
|
@ -38,15 +38,17 @@
|
|||
|
||||
#include "gstsynaescope.h"
|
||||
|
||||
#if G_BYTE_ORDER == G_BIG_ENDIAN
|
||||
#define RGB_ORDER "xRGB"
|
||||
#else
|
||||
#define RGB_ORDER "BGRx"
|
||||
#endif
|
||||
|
||||
static GstStaticPadTemplate gst_synae_scope_src_template =
|
||||
GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
#if G_BYTE_ORDER == G_BIG_ENDIAN
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("xRGB"))
|
||||
#else
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("BGRx"))
|
||||
#endif
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (RGB_ORDER))
|
||||
);
|
||||
|
||||
static GstStaticPadTemplate gst_synae_scope_sink_template =
|
||||
|
|
|
@ -39,15 +39,17 @@
|
|||
#include <stdlib.h>
|
||||
#include "gstwavescope.h"
|
||||
|
||||
#if G_BYTE_ORDER == G_BIG_ENDIAN
|
||||
#define RGB_ORDER "xRGB"
|
||||
#else
|
||||
#define RGB_ORDER "BGRx"
|
||||
#endif
|
||||
|
||||
static GstStaticPadTemplate gst_wave_scope_src_template =
|
||||
GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
#if G_BYTE_ORDER == G_BIG_ENDIAN
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("xRGB"))
|
||||
#else
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("BGRx"))
|
||||
#endif
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (RGB_ORDER))
|
||||
);
|
||||
|
||||
static GstStaticPadTemplate gst_wave_scope_sink_template =
|
||||
|
|
Loading…
Reference in a new issue