mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
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.
This commit is contained in:
parent
f7eefea47c
commit
78cd406a76
1 changed files with 8 additions and 0 deletions
|
@ -79,6 +79,13 @@ GST_STATIC_PAD_TEMPLATE ("subpicture",
|
||||||
GST_STATIC_CAPS ("video/x-dvd-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);
|
GST_BOILERPLATE (GstDVDSpu, gst_dvd_spu, GstElement, GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
static void gst_dvd_spu_dispose (GObject * object);
|
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_dvd_spu_flush_spu_info (dvdspu, FALSE);
|
||||||
gst_segment_init (&dvdspu->subp_seg, GST_FORMAT_UNDEFINED);
|
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->ref_frame, NULL);
|
||||||
gst_buffer_replace (&dvdspu->pending_frame, NULL);
|
gst_buffer_replace (&dvdspu->pending_frame, NULL);
|
||||||
|
|
Loading…
Reference in a new issue