From 0051f0e18ecb90e900d6c4f92a01b473408f493e Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Tue, 6 Jan 2004 14:34:52 +0000 Subject: [PATCH] ifdef out ARGB type when it isn't available in xvidcore 1.0.0beta2 Original commit message from CVS: ifdef out ARGB type when it isn't available in xvidcore 1.0.0beta2 --- ChangeLog | 9 +++++++++ ext/xvid/gstxvid.c | 6 ++++++ ext/xvid/gstxviddec.c | 4 ++++ ext/xvid/gstxvidenc.c | 2 ++ 4 files changed, 21 insertions(+) diff --git a/ChangeLog b/ChangeLog index a10c3b7cd9..ce2dbd9de6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-01-07 Jan Schmidt + + * ext/xvid/gstxvid.c: (gst_xvid_structure_to_csp), + (gst_xvid_csp_to_caps): + * ext/xvid/gstxviddec.c: (gst_xviddec_src_getcaps): + * ext/xvid/gstxvidenc.c: + ifdef out ARGB type when it isn't available + in xvidcore 1.0.0beta2 + 2004-01-06 Ronald Bultje * gst/mpegstream/gstmpegparse.c: (gst_mpeg_parse_loop): diff --git a/ext/xvid/gstxvid.c b/ext/xvid/gstxvid.c index 64ab2f5643..49d2ecb3b4 100644 --- a/ext/xvid/gstxvid.c +++ b/ext/xvid/gstxvid.c @@ -147,9 +147,11 @@ gst_xvid_structure_to_csp (GstStructure *structure, case 0xff000000: xvid_cs = XVID_CSP_RGBA; break; +#ifdef XVID_CSP_ARGB case 0x00ff0000: xvid_cs = XVID_CSP_ARGB; break; +#endif case 0x0000ff00: xvid_cs = XVID_CSP_BGRA; break; @@ -185,7 +187,9 @@ gst_xvid_csp_to_caps (gint csp, gint w, gint h, gdouble fps) case XVID_CSP_BGR: case XVID_CSP_ABGR: case XVID_CSP_BGRA: +#ifdef XVID_CSP_ARGB case XVID_CSP_ARGB: +#endif case XVID_CSP_RGBA: { gint r_mask = 0, b_mask = 0, g_mask = 0, endianness = 0, bpp = 0, depth = 0; @@ -211,10 +215,12 @@ gst_xvid_csp_to_caps (gint csp, gint w, gint h, gdouble fps) r_mask = 0x0000ff00; g_mask = 0x00ff0000; b_mask = 0xff000000; endianness = G_BIG_ENDIAN; depth = 24; bpp = 32; break; +#ifdef XVID_CSP_ARGB case XVID_CSP_ARGB: r_mask = 0x00ff0000; g_mask = 0x0000ff00; b_mask = 0x000000ff; endianness = G_BIG_ENDIAN; depth = 24; bpp = 32; break; +#endif case XVID_CSP_RGBA: r_mask = 0xff000000; g_mask = 0x00ff0000; b_mask = 0x0000ff00; endianness = G_BIG_ENDIAN; depth = 24; bpp = 32; diff --git a/ext/xvid/gstxviddec.c b/ext/xvid/gstxviddec.c index 0766c3ef0c..68804f8c5e 100644 --- a/ext/xvid/gstxviddec.c +++ b/ext/xvid/gstxviddec.c @@ -55,7 +55,9 @@ GST_STATIC_PAD_TEMPLATE ( GST_PAD_ALWAYS, GST_STATIC_CAPS ( GST_VIDEO_YUV_PAD_TEMPLATE_CAPS ("{ I420, YUY2, YV12, YVYU, UYVY }") "; " +#ifdef XVID_CSP_ARGB RGB_24_32_STATIC_CAPS (32, 0x00ff0000, 0x0000ff00, 0x000000ff) "; " +#endif RGB_24_32_STATIC_CAPS (32, 0xff000000, 0x00ff0000, 0x0000ff00) "; " RGB_24_32_STATIC_CAPS (32, 0x0000ff00, 0x00ff0000, 0xff000000) "; " RGB_24_32_STATIC_CAPS (32, 0x000000ff, 0x0000ff00, 0x00ff0000) "; " @@ -288,7 +290,9 @@ gst_xviddec_src_getcaps (GstPad *pad) XVID_CSP_BGRA, XVID_CSP_ABGR, XVID_CSP_RGBA, +#ifdef XVID_CSP_ARGB XVID_CSP_ARGB, +#endif XVID_CSP_BGR, XVID_CSP_RGB555, XVID_CSP_RGB565, diff --git a/ext/xvid/gstxvidenc.c b/ext/xvid/gstxvidenc.c index 72ec9d7807..9ff4dd86f6 100644 --- a/ext/xvid/gstxvidenc.c +++ b/ext/xvid/gstxvidenc.c @@ -43,7 +43,9 @@ GST_STATIC_PAD_TEMPLATE ( GST_PAD_ALWAYS, GST_STATIC_CAPS ( GST_VIDEO_YUV_PAD_TEMPLATE_CAPS ("{ I420, YUY2, YV12, YVYU, UYVY }") "; " +#ifdef XVID_CSP_ARGB RGB_24_32_STATIC_CAPS (32, 0x00ff0000, 0x0000ff00, 0x000000ff) "; " +#endif RGB_24_32_STATIC_CAPS (32, 0xff000000, 0x00ff0000, 0x0000ff00) "; " RGB_24_32_STATIC_CAPS (32, 0x0000ff00, 0x00ff0000, 0xff000000) "; " RGB_24_32_STATIC_CAPS (32, 0x000000ff, 0x0000ff00, 0x00ff0000) "; "