mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
videocrop: Move supported format list into private header
- Moved declaration of supported pixel formats to private header, which can be shared between videocrop and aspectvideocrop Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/515>
This commit is contained in:
parent
c8827acb93
commit
3ba8abb056
3 changed files with 26 additions and 17 deletions
|
@ -44,6 +44,8 @@
|
||||||
#include "gstvideocrop.h"
|
#include "gstvideocrop.h"
|
||||||
#include "gstvideocropelements.h"
|
#include "gstvideocropelements.h"
|
||||||
#include "gstaspectratiocrop.h"
|
#include "gstaspectratiocrop.h"
|
||||||
|
/* include private header which contains the supported formats */
|
||||||
|
#include "gstvideocrop-private.h"
|
||||||
|
|
||||||
#include "gst/glib-compat-private.h"
|
#include "gst/glib-compat-private.h"
|
||||||
|
|
||||||
|
@ -56,12 +58,8 @@ enum
|
||||||
PROP_ASPECT_RATIO_CROP,
|
PROP_ASPECT_RATIO_CROP,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* we support the same caps as videocrop (sync changes) */
|
/* we support the same caps as videocrop */
|
||||||
#define ASPECT_RATIO_CROP_CAPS \
|
#define ASPECT_RATIO_CROP_CAPS VIDEO_CROP_CAPS
|
||||||
GST_VIDEO_CAPS_MAKE ("{ RGBx, xRGB, BGRx, xBGR, " \
|
|
||||||
"RGBA, ARGB, BGRA, ABGR, RGB, BGR, AYUV, YUY2, " \
|
|
||||||
"YVYU, UYVY, I420, YV12, RGB16, RGB15, GRAY8, " \
|
|
||||||
"NV12, NV21, GRAY16_LE, GRAY16_BE }")
|
|
||||||
|
|
||||||
static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
|
static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
GST_PAD_SRC,
|
GST_PAD_SRC,
|
||||||
|
|
20
gst/videocrop/gstvideocrop-private.h
Normal file
20
gst/videocrop/gstvideocrop-private.h
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
#ifndef __GST_VIDEO_CROP_PRIVATE_H__
|
||||||
|
#define __GST_VIDEO_CROP_PRIVATE_H__
|
||||||
|
|
||||||
|
/* aspectvideocrop and videocrop support the same pixel formats, since
|
||||||
|
* aspectvideocrop uses videocrop internally.
|
||||||
|
* The definitions of supported pixe formats can thus be shared
|
||||||
|
* between both, avoiding the need of manual synchronization
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define VIDEO_CROP_CAPS \
|
||||||
|
GST_VIDEO_CAPS_MAKE ("{ RGBx, xRGB, BGRx, xBGR, " \
|
||||||
|
"RGBA, ARGB, BGRA, ABGR, RGB, BGR, AYUV, YUY2, Y444, " \
|
||||||
|
"Y42B, Y41B, YVYU, UYVY, I420, YV12, RGB16, RGB15, " \
|
||||||
|
"GRAY8, NV12, NV21, GRAY16_LE, GRAY16_BE }") "; " \
|
||||||
|
"video/x-raw(ANY), " \
|
||||||
|
"width = " GST_VIDEO_SIZE_RANGE ", " \
|
||||||
|
"height = " GST_VIDEO_SIZE_RANGE ", " \
|
||||||
|
"framerate = " GST_VIDEO_FPS_RANGE
|
||||||
|
|
||||||
|
#endif /* __GST_VIDEO_CROP_PRIVATE_H__ */
|
|
@ -63,6 +63,8 @@
|
||||||
#include "gstvideocrop.h"
|
#include "gstvideocrop.h"
|
||||||
#include "gstvideocropelements.h"
|
#include "gstvideocropelements.h"
|
||||||
#include "gstaspectratiocrop.h"
|
#include "gstaspectratiocrop.h"
|
||||||
|
/* include private header which contains the supported formats */
|
||||||
|
#include "gstvideocrop-private.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
@ -76,17 +78,6 @@ enum
|
||||||
PROP_BOTTOM
|
PROP_BOTTOM
|
||||||
};
|
};
|
||||||
|
|
||||||
/* we support the same caps as aspectratiocrop (sync changes) */
|
|
||||||
#define VIDEO_CROP_CAPS \
|
|
||||||
GST_VIDEO_CAPS_MAKE ("{ RGBx, xRGB, BGRx, xBGR, " \
|
|
||||||
"RGBA, ARGB, BGRA, ABGR, RGB, BGR, AYUV, YUY2, Y444, " \
|
|
||||||
"Y42B, Y41B, YVYU, UYVY, I420, YV12, RGB16, RGB15, " \
|
|
||||||
"GRAY8, NV12, NV21, GRAY16_LE, GRAY16_BE }") "; " \
|
|
||||||
"video/x-raw(ANY), " \
|
|
||||||
"width = " GST_VIDEO_SIZE_RANGE ", " \
|
|
||||||
"height = " GST_VIDEO_SIZE_RANGE ", " \
|
|
||||||
"framerate = " GST_VIDEO_FPS_RANGE
|
|
||||||
|
|
||||||
static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
|
static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
GST_PAD_SRC,
|
GST_PAD_SRC,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
|
|
Loading…
Reference in a new issue