summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2019-04-10 17:03:14 +0200
committerWim Taymans <wtaymans@redhat.com>2019-04-10 17:03:14 +0200
commit9f7c9022cf3a43707b44025e2d11456883787dbf (patch)
tree6e8828b3c51a6ba5e89cfc7bae47dd056a9cb869
parent9f2cfe1cd6fe9d986fe548306ea7a25a86602675 (diff)
format: map all mjpeg formats to video/mjpeg
Fixes #139
-rw-r--r--spa/plugins/v4l2/v4l2-utils.c4
-rw-r--r--src/gst/gstpipewireformat.c1
2 files changed, 3 insertions, 2 deletions
diff --git a/spa/plugins/v4l2/v4l2-utils.c b/spa/plugins/v4l2/v4l2-utils.c
index 024f44aa..4adf0c61 100644
--- a/spa/plugins/v4l2/v4l2-utils.c
+++ b/spa/plugins/v4l2/v4l2-utils.c
@@ -330,8 +330,8 @@ static const struct format_info format_info[] = {
/* compressed formats */
{V4L2_PIX_FMT_MJPEG, FORMAT_ENCODED, VIDEO, MJPG},
- {V4L2_PIX_FMT_JPEG, FORMAT_ENCODED, IMAGE, JPEG},
- {V4L2_PIX_FMT_PJPG, FORMAT_UNKNOWN, VIDEO, RAW},
+ {V4L2_PIX_FMT_JPEG, FORMAT_ENCODED, VIDEO, MJPG},
+ {V4L2_PIX_FMT_PJPG, FORMAT_ENCODED, VIDEO, MJPG},
{V4L2_PIX_FMT_DV, FORMAT_ENCODED, VIDEO, DV},
{V4L2_PIX_FMT_MPEG, FORMAT_ENCODED, VIDEO, MPEGTS},
{V4L2_PIX_FMT_H264, FORMAT_ENCODED, VIDEO, H264},
diff --git a/src/gst/gstpipewireformat.c b/src/gst/gstpipewireformat.c
index 5a5d4201..9fa9f342 100644
--- a/src/gst/gstpipewireformat.c
+++ b/src/gst/gstpipewireformat.c
@@ -69,6 +69,7 @@ static const struct media_type media_type_map[] = {
{ "video/x-raw", &type.media_type.video, &type.media_subtype.raw },
{ "audio/x-raw", &type.media_type.audio, &type.media_subtype.raw },
{ "image/jpeg", &type.media_type.video, &type.media_subtype_video.mjpg },
+ { "video/x-jpeg", &type.media_type.video, &type.media_subtype_video.mjpg },
{ "video/x-h264", &type.media_type.video, &type.media_subtype_video.h264 },
{ NULL, }
};