[243/906] Support for missing videoformats in glupload

Add support for missing alpha channeled videoformats (RGBA, BGRA,
ARGB, ABGR) in gst_gl_display_do_upload_fill.
This commit is contained in:
Filippo Argiolas 2008-10-15 12:42:29 +02:00 committed by Tim-Philipp Müller
parent 3d54d22894
commit 32de0e6e91

View file

@ -2603,19 +2603,23 @@ gst_gl_display_thread_do_upload_fill (GstGLDisplay *display)
GL_BGR, GL_UNSIGNED_BYTE, data); GL_BGR, GL_UNSIGNED_BYTE, data);
break; break;
case GST_VIDEO_FORMAT_RGBx: case GST_VIDEO_FORMAT_RGBx:
case GST_VIDEO_FORMAT_RGBA:
glTexSubImage2D (GL_TEXTURE_RECTANGLE_ARB, 0, 0, 0, width, height, glTexSubImage2D (GL_TEXTURE_RECTANGLE_ARB, 0, 0, 0, width, height,
GL_RGBA, GL_UNSIGNED_BYTE, data); GL_RGBA, GL_UNSIGNED_BYTE, data);
break; break;
case GST_VIDEO_FORMAT_BGRx: case GST_VIDEO_FORMAT_BGRx:
case GST_VIDEO_FORMAT_BGRA:
glTexSubImage2D (GL_TEXTURE_RECTANGLE_ARB, 0, 0, 0, width, height, glTexSubImage2D (GL_TEXTURE_RECTANGLE_ARB, 0, 0, 0, width, height,
GL_BGRA, GL_UNSIGNED_BYTE, data); GL_BGRA, GL_UNSIGNED_BYTE, data);
break; break;
case GST_VIDEO_FORMAT_AYUV: case GST_VIDEO_FORMAT_AYUV:
case GST_VIDEO_FORMAT_xRGB: case GST_VIDEO_FORMAT_xRGB:
case GST_VIDEO_FORMAT_ARGB:
glTexSubImage2D (GL_TEXTURE_RECTANGLE_ARB, 0, 0, 0, width, height, glTexSubImage2D (GL_TEXTURE_RECTANGLE_ARB, 0, 0, 0, width, height,
GL_BGRA, GL_UNSIGNED_INT_8_8_8_8, data); GL_BGRA, GL_UNSIGNED_INT_8_8_8_8, data);
break; break;
case GST_VIDEO_FORMAT_xBGR: case GST_VIDEO_FORMAT_xBGR:
case GST_VIDEO_FORMAT_ABGR:
glTexSubImage2D (GL_TEXTURE_RECTANGLE_ARB, 0, 0, 0, width, height, glTexSubImage2D (GL_TEXTURE_RECTANGLE_ARB, 0, 0, 0, width, height,
GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, data); GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, data);
break; break;