mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 12:10:37 +00:00
a6f8cc4b95
Copy V4L2_PIX_FMT_P010 define from linux header. V4L2_PIX_FMT_P010 is the little endian definition of P010 so map it GST_VIDEO_FORMAT_P010_10LE. Add it v4l2 default video formats to allows v4l2 decoders to enumerate and use it. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2590>
38 lines
1.5 KiB
C
38 lines
1.5 KiB
C
/* GStreamer
|
|
* Copyright (C) 2020 Nicolas Dufresne <nicolas.dufresne@collabora.com>
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Library General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Library General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Library General Public
|
|
* License along with this library; if not, write to the
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
* Boston, MA 02110-1301, USA.
|
|
*/
|
|
|
|
#ifndef __GST_V4L2_FORMAT_H__
|
|
#define __GST_V4L2_FORMAT_H__
|
|
|
|
#include <gst/gst.h>
|
|
#include <gst/video/video.h>
|
|
#include "linux/videodev2.h"
|
|
|
|
#define GST_V4L2_DEFAULT_VIDEO_FORMATS "{ NV12, YUY2, NV12_4L4, NV12_32L32, NV12_16L32S, I420, P010_10LE}"
|
|
|
|
gboolean gst_v4l2_format_to_video_info (struct v4l2_format * fmt,
|
|
GstVideoInfo * out_info);
|
|
|
|
gboolean gst_v4l2_format_to_video_format (guint32 pix_fmt,
|
|
GstVideoFormat * out_format);
|
|
|
|
gboolean gst_v4l2_format_from_video_format (GstVideoFormat format,
|
|
guint32 * out_pix_fmt);
|
|
|
|
#endif /* __GST_V4L2_FORMAT_H__ */
|