From 28a4710cd01ec76a70afee79778c1231f552e034 Mon Sep 17 00:00:00 2001 From: Jaeyun Jung Date: Mon, 6 Nov 2023 20:55:27 +0900 Subject: [PATCH] [Decoder] macro for video formats Define macro to specify video formats supported in decoder direct-video. Signed-off-by: Jaeyun Jung --- ext/nnstreamer/tensor_decoder/tensordec-directvideo.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ext/nnstreamer/tensor_decoder/tensordec-directvideo.c b/ext/nnstreamer/tensor_decoder/tensordec-directvideo.c index e67c224..56c7121 100644 --- a/ext/nnstreamer/tensor_decoder/tensordec-directvideo.c +++ b/ext/nnstreamer/tensor_decoder/tensordec-directvideo.c @@ -38,8 +38,10 @@ void init_dv (void) __attribute__((constructor)); void fini_dv (void) __attribute__((destructor)); +#define DECODER_DV_FORMATS "{ GRAY8, RGB, BGR, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, GRAY16_BE, GRAY16_LE }" + #define DECODER_DV_VIDEO_CAPS_STR \ - GST_VIDEO_CAPS_MAKE ("{ GRAY8, RGB, BGR, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, GRAY16_BE, GRAY16_LE }") \ + GST_VIDEO_CAPS_MAKE (DECODER_DV_FORMATS) \ ", views = (int) 1, interlace-mode = (string) progressive" /** @@ -375,8 +377,8 @@ init_dv (void) nnstreamer_decoder_probe (&directVideo); nnstreamer_decoder_set_custom_property_desc (decoder_subplugin_direct_video, "option1", - "The output video format. If this is unspecified, it is 'GRAY8' (dim[0]/channel == 1), 'RGB' (dim[0]/channel == 3), or 'BGRx' (dim[0]/channel == 4). Available options are: { GRAY8, RGB, BGR, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, GRAY16_BE, GRAY16_LE }.", - NULL); + "The output video format. If this is unspecified, it is 'GRAY8' (dim[0]/channel == 1), 'RGB' (dim[0]/channel == 3), or 'BGRx' (dim[0]/channel == 4). Available options are: " + DECODER_DV_FORMATS, NULL); } /** @brief Destruct this object for tensordec-plugin */ -- 2.7.4