summaryrefslogtreecommitdiffstats
path: root/sys/vdpau/gstvdpauyuvvideo.c
diff options
context:
space:
mode:
authorCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>2009-04-09 16:54:27 +0200
committerJan Schmidt <thaytan@noraisin.net>2009-06-20 15:21:26 +0100
commit86cd9b20f88b55d753b050838cdd660cda07f8c3 (patch)
tree6a0cba6b7c1e2de42a1adb3fb0a7b40cde25d86b /sys/vdpau/gstvdpauyuvvideo.c
parent072f8695485173d660363c1d8be3e62dacc69175 (diff)
downloadgst-plugins-bad-86cd9b20f88b55d753b050838cdd660cda07f8c3.tar.gz
gst-plugins-bad-86cd9b20f88b55d753b050838cdd660cda07f8c3.tar.bz2
gst-plugins-bad-86cd9b20f88b55d753b050838cdd660cda07f8c3.zip
vdpau: move definition of the VdpChromaType array and the VdpauFormats to gstdevice.h
Diffstat (limited to 'sys/vdpau/gstvdpauyuvvideo.c')
-rw-r--r--sys/vdpau/gstvdpauyuvvideo.c53
1 files changed, 3 insertions, 50 deletions
diff --git a/sys/vdpau/gstvdpauyuvvideo.c b/sys/vdpau/gstvdpauyuvvideo.c
index 4d78bae2..d5935a8f 100644
--- a/sys/vdpau/gstvdpauyuvvideo.c
+++ b/sys/vdpau/gstvdpauyuvvideo.c
@@ -196,53 +196,6 @@ gst_vdpau_yuv_video_chain (GstPad * pad, GstBuffer * buffer)
return GST_FLOW_ERROR;
}
-typedef struct
-{
- VdpChromaType chroma_type;
- VdpYCbCrFormat format;
- guint32 fourcc;
-} VdpauFormats;
-
-static VdpChromaType chroma_types[3] =
- { VDP_CHROMA_TYPE_420, VDP_CHROMA_TYPE_422, VDP_CHROMA_TYPE_444 };
-static VdpauFormats formats[7] = {
- {
- VDP_CHROMA_TYPE_420,
- VDP_YCBCR_FORMAT_NV12,
- GST_MAKE_FOURCC ('N', 'V', '1', '2')
- },
- {
- VDP_CHROMA_TYPE_422,
- VDP_YCBCR_FORMAT_UYVY,
- GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y')
- },
- {
- VDP_CHROMA_TYPE_444,
- VDP_YCBCR_FORMAT_V8U8Y8A8,
- GST_MAKE_FOURCC ('A', 'Y', 'U', 'V')
- },
- {
- VDP_CHROMA_TYPE_444,
- VDP_YCBCR_FORMAT_Y8U8V8A8,
- GST_MAKE_FOURCC ('A', 'V', 'U', 'Y')
- },
- {
- VDP_CHROMA_TYPE_422,
- VDP_YCBCR_FORMAT_YUYV,
- GST_MAKE_FOURCC ('Y', 'U', 'Y', 'V')
- },
- {
- VDP_CHROMA_TYPE_420,
- VDP_YCBCR_FORMAT_YV12,
- GST_MAKE_FOURCC ('Y', 'V', '1', '2')
- },
- {
- VDP_CHROMA_TYPE_420,
- VDP_YCBCR_FORMAT_YV12,
- GST_MAKE_FOURCC ('I', '4', '2', '0')
- }
-};
-
static GstCaps *
gst_vdpau_yuv_video_get_caps (GstVdpauYUVVideo * yuv_video)
{
@@ -254,7 +207,7 @@ gst_vdpau_yuv_video_get_caps (GstVdpauYUVVideo * yuv_video)
caps = gst_caps_new_empty ();
- for (i = 0; i < 3; i++) {
+ for (i = 0; i < N_CHROMA_TYPES; i++) {
VdpStatus status;
VdpBool is_supported;
guint32 max_w, max_h;
@@ -274,7 +227,7 @@ gst_vdpau_yuv_video_get_caps (GstVdpauYUVVideo * yuv_video)
if (is_supported) {
gint j;
- for (j = 0; j < 7; j++) {
+ for (j = 0; j < N_FORMATS; j++) {
if (formats[j].chroma_type != chroma_types[i])
continue;
@@ -337,7 +290,7 @@ gst_vdpau_yuv_video_sink_setcaps (GstPad * pad, GstCaps * caps)
gst_structure_get_fraction (structure, "pixel-aspect-ratio",
&par_numerator, &par_denominator);
- for (i = 0; i < 7; i++) {
+ for (i = 0; i < N_FORMATS; i++) {
if (formats[i].fourcc == fourcc) {
chroma_type = formats[i].chroma_type;
break;