uvcsink: configfs.c: refactor location of GUID formats

- move GUID handling to beginning

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1304>
This commit is contained in:
Michael Grzeschik 2023-05-09 00:50:41 +02:00 committed by GStreamer Marge Bot
parent da61d8f96d
commit 38aa1fc414

View file

@ -24,6 +24,34 @@
#include "configfs.h"
/* ------------------------------------------------------------------------
* GUIDs and formats
*/
#define UVC_GUID_FORMAT_MJPEG \
{ 'M', 'J', 'P', 'G', 0x00, 0x00, 0x10, 0x00, \
0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
#define UVC_GUID_FORMAT_YUY2 \
{ 'Y', 'U', 'Y', '2', 0x00, 0x00, 0x10, 0x00, \
0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
struct uvc_function_format_info
{
uint8_t guid[16];
uint32_t fcc;
};
static struct uvc_function_format_info uvc_formats[] = {
{
.guid = UVC_GUID_FORMAT_YUY2,
.fcc = V4L2_PIX_FMT_YUYV,
},
{
.guid = UVC_GUID_FORMAT_MJPEG,
.fcc = V4L2_PIX_FMT_MJPEG,
},
};
/* -----------------------------------------------------------------------------
* Path handling and support
*/
@ -241,34 +269,6 @@ udc_find_video_device (const char *udc, const char *function)
return video;
}
/* ------------------------------------------------------------------------
* GUIDs and formats
*/
#define UVC_GUID_FORMAT_MJPEG \
{ 'M', 'J', 'P', 'G', 0x00, 0x00, 0x10, 0x00, \
0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
#define UVC_GUID_FORMAT_YUY2 \
{ 'Y', 'U', 'Y', '2', 0x00, 0x00, 0x10, 0x00, \
0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
struct uvc_function_format_info
{
uint8_t guid[16];
uint32_t fcc;
};
static struct uvc_function_format_info uvc_formats[] = {
{
.guid = UVC_GUID_FORMAT_YUY2,
.fcc = V4L2_PIX_FMT_YUYV,
},
{
.guid = UVC_GUID_FORMAT_MJPEG,
.fcc = V4L2_PIX_FMT_MJPEG,
},
};
/* -----------------------------------------------------------------------------
* Legacy g_webcam support
*/