mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
v4l2codecs: Unify the src template caps format
Notably NV12_4L4 ended up being applied to only VP9 decoder. This fixes the situation by using a central define for all static src pad templated formats. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/965>
This commit is contained in:
parent
a67e9fb05f
commit
107088a658
5 changed files with 10 additions and 5 deletions
|
@ -24,6 +24,7 @@
|
|||
#include "gstv4l2codecallocator.h"
|
||||
#include "gstv4l2codech264dec.h"
|
||||
#include "gstv4l2codecpool.h"
|
||||
#include "gstv4l2format.h"
|
||||
#include "linux/v4l2-controls.h"
|
||||
|
||||
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
||||
|
@ -52,7 +53,7 @@ GST_STATIC_PAD_TEMPLATE (GST_VIDEO_DECODER_SINK_NAME,
|
|||
static GstStaticPadTemplate src_template =
|
||||
GST_STATIC_PAD_TEMPLATE (GST_VIDEO_DECODER_SRC_NAME,
|
||||
GST_PAD_SRC, GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ NV12, YUY2, NV12_32L32 }")));
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (GST_V4L2_DEFAULT_VIDEO_FORMATS)));
|
||||
|
||||
struct _GstV4l2CodecH264Dec
|
||||
{
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "gstv4l2codecallocator.h"
|
||||
#include "gstv4l2codecmpeg2dec.h"
|
||||
#include "gstv4l2codecpool.h"
|
||||
#include "gstv4l2format.h"
|
||||
#include "linux/v4l2-controls.h"
|
||||
|
||||
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
||||
|
@ -55,7 +56,7 @@ GST_STATIC_PAD_TEMPLATE (GST_VIDEO_DECODER_SINK_NAME,
|
|||
static GstStaticPadTemplate src_template =
|
||||
GST_STATIC_PAD_TEMPLATE (GST_VIDEO_DECODER_SRC_NAME,
|
||||
GST_PAD_SRC, GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ NV12, YUY2, NV12_32L32 }")));
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (GST_V4L2_DEFAULT_VIDEO_FORMATS)));
|
||||
|
||||
struct _GstV4l2CodecMpeg2Dec
|
||||
{
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "gstv4l2codecalphadecodebin.h"
|
||||
#include "gstv4l2codecpool.h"
|
||||
#include "gstv4l2codecvp8dec.h"
|
||||
#include "gstv4l2format.h"
|
||||
|
||||
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
||||
|
||||
|
@ -56,7 +57,7 @@ GST_STATIC_PAD_TEMPLATE (GST_VIDEO_DECODER_SINK_NAME,
|
|||
static GstStaticPadTemplate src_template =
|
||||
GST_STATIC_PAD_TEMPLATE (GST_VIDEO_DECODER_SRC_NAME,
|
||||
GST_PAD_SRC, GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ NV12, YUY2, NV12_32L32 }")));
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (GST_V4L2_DEFAULT_VIDEO_FORMATS)));
|
||||
|
||||
struct _GstV4l2CodecVp8Dec
|
||||
{
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "gstv4l2codecalphadecodebin.h"
|
||||
#include "gstv4l2codecpool.h"
|
||||
#include "gstv4l2codecvp9dec.h"
|
||||
#include "gstv4l2format.h"
|
||||
#include "linux/v4l2-controls.h"
|
||||
#include "linux/videodev2.h"
|
||||
|
||||
|
@ -57,8 +58,7 @@ GST_STATIC_PAD_TEMPLATE (GST_VIDEO_DECODER_SINK_NAME,
|
|||
static GstStaticPadTemplate src_template =
|
||||
GST_STATIC_PAD_TEMPLATE (GST_VIDEO_DECODER_SRC_NAME,
|
||||
GST_PAD_SRC, GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE
|
||||
("{ NV12, YUY2, NV12_32L32, NV12_4L4 }")));
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (GST_V4L2_DEFAULT_VIDEO_FORMATS)));
|
||||
|
||||
struct _GstV4l2CodecVp9Dec
|
||||
{
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
#include <gst/video/video.h>
|
||||
#include "linux/videodev2.h"
|
||||
|
||||
#define GST_V4L2_DEFAULT_VIDEO_FORMATS "{ NV12, YUY2, NV12_4L4, NV12_32L32 }"
|
||||
|
||||
gboolean gst_v4l2_format_to_video_info (struct v4l2_format * fmt,
|
||||
GstVideoInfo * out_info);
|
||||
|
||||
|
|
Loading…
Reference in a new issue