mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-20 14:18:34 +00:00
ext/ffmpeg/gstffmpegcodecmap.c (gst_ffmpeg_pixfmt_to_caps): Add support for GRAY8 colorspace
Original commit message from CVS: * ext/ffmpeg/gstffmpegcodecmap.c (gst_ffmpeg_pixfmt_to_caps): Add support for GRAY8 colorspace
This commit is contained in:
parent
63d6ce9235
commit
1857bd51da
2 changed files with 37 additions and 24 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-05-13 Luca Ognibene <luogni@tin.it>
|
||||||
|
|
||||||
|
* ext/ffmpeg/gstffmpegcodecmap.c (gst_ffmpeg_pixfmt_to_caps):
|
||||||
|
Add support for GRAY8 colorspace
|
||||||
|
|
||||||
2005-05-11 Luca Ognibene <luogni@tin.it>
|
2005-05-11 Luca Ognibene <luogni@tin.it>
|
||||||
|
|
||||||
* ext/ffmpeg/gstffmpegenc.c (gst_ffmpegenc_chain_video):
|
* ext/ffmpeg/gstffmpegenc.c (gst_ffmpegenc_chain_video):
|
||||||
|
|
|
@ -880,11 +880,18 @@ gst_ffmpeg_pixfmt_to_caps (enum PixelFormat pix_fmt, AVCodecContext * context)
|
||||||
bpp = depth = 8;
|
bpp = depth = 8;
|
||||||
endianness = G_BYTE_ORDER;
|
endianness = G_BYTE_ORDER;
|
||||||
break;
|
break;
|
||||||
|
case PIX_FMT_GRAY8:
|
||||||
|
bpp = depth = 8;
|
||||||
|
caps = GST_FF_VID_CAPS_NEW ("video/x-raw-gray",
|
||||||
|
"bpp", G_TYPE_INT, bpp,
|
||||||
|
"depth", G_TYPE_INT, depth, NULL);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
/* give up ... */
|
/* give up ... */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (caps == NULL) {
|
||||||
if (bpp != 0) {
|
if (bpp != 0) {
|
||||||
if (r_mask != 0) {
|
if (r_mask != 0) {
|
||||||
caps = GST_FF_VID_CAPS_NEW ("video/x-raw-rgb",
|
caps = GST_FF_VID_CAPS_NEW ("video/x-raw-rgb",
|
||||||
|
@ -910,6 +917,7 @@ gst_ffmpeg_pixfmt_to_caps (enum PixelFormat pix_fmt, AVCodecContext * context)
|
||||||
caps = GST_FF_VID_CAPS_NEW ("video/x-raw-yuv",
|
caps = GST_FF_VID_CAPS_NEW ("video/x-raw-yuv",
|
||||||
"format", GST_TYPE_FOURCC, fmt, NULL);
|
"format", GST_TYPE_FOURCC, fmt, NULL);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (caps != NULL) {
|
if (caps != NULL) {
|
||||||
char *str = gst_caps_to_string (caps);
|
char *str = gst_caps_to_string (caps);
|
||||||
|
|
Loading…
Reference in a new issue