diff options
author | Jan Schmidt <thaytan@noraisin.net> | 2009-05-21 15:22:58 +0100 |
---|---|---|
committer | Jan Schmidt <thaytan@noraisin.net> | 2009-05-26 15:31:54 +0100 |
commit | 78cd406a76c71b2ebe5457e838471cd209afd6d0 (patch) | |
tree | 74f9ea5be9bd3fe90f20f1ba3794cfe86ec1c5f2 | |
parent | f7eefea47cf770107672d07189843554b10b9c6f (diff) | |
download | gst-plugins-bad-78cd406a76c71b2ebe5457e838471cd209afd6d0.tar.gz gst-plugins-bad-78cd406a76c71b2ebe5457e838471cd209afd6d0.tar.bz2 gst-plugins-bad-78cd406a76c71b2ebe5457e838471cd209afd6d0.zip |
dvdspu: Add a simple default colour table.
When we're not provided with a palette in advance, draw with a grey
colour or two, instead of YUV green.
-rw-r--r-- | gst/dvdspu/gstdvdspu.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gst/dvdspu/gstdvdspu.c b/gst/dvdspu/gstdvdspu.c index dc606d21..45e64cd0 100644 --- a/gst/dvdspu/gstdvdspu.c +++ b/gst/dvdspu/gstdvdspu.c @@ -79,6 +79,13 @@ GST_STATIC_PAD_TEMPLATE ("subpicture", GST_STATIC_CAPS ("video/x-dvd-subpicture") ); +static const guint32 default_clut[16] = { + 0xb48080, 0x248080, 0x628080, 0xd78080, + 0x808080, 0x808080, 0x808080, 0x808080, + 0x808080, 0x808080, 0x808080, 0x808080, + 0x808080, 0x808080, 0x808080, 0x808080 +}; + GST_BOILERPLATE (GstDVDSpu, gst_dvd_spu, GstElement, GST_TYPE_ELEMENT); static void gst_dvd_spu_dispose (GObject * object); @@ -183,6 +190,7 @@ gst_dvd_spu_clear (GstDVDSpu * dvdspu) { gst_dvd_spu_flush_spu_info (dvdspu, FALSE); gst_segment_init (&dvdspu->subp_seg, GST_FORMAT_UNDEFINED); + memcpy (dvdspu->spu_state.current_clut, default_clut, sizeof (guint32) * 16); gst_buffer_replace (&dvdspu->ref_frame, NULL); gst_buffer_replace (&dvdspu->pending_frame, NULL); |