From: Benjamin Otte Date: Tue, 27 Apr 2004 15:59:57 +0000 (+0000) Subject: gst/monoscope/gstmonoscope.c: make sure we only provide 256x128 X-Git-Tag: 1.19.3~509^2~14890 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f7b65944ee085591c00c1b31aab7b9b3a64d2714;p=platform%2Fupstream%2Fgstreamer.git gst/monoscope/gstmonoscope.c: make sure we only provide 256x128 Original commit message from CVS: * gst/monoscope/gstmonoscope.c: make sure we only provide 256x128 * gst/monoscope/monoscope.c: (monoscope_init): assert size of 256x128 --- diff --git a/ChangeLog b/ChangeLog index fa3e205..1f35ad3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-04-27 Benjamin Otte + + * gst/monoscope/gstmonoscope.c: + make sure we only provide 256x128 + * gst/monoscope/monoscope.c: (monoscope_init): + assert size of 256x128 + 2004-04-27 Thomas Vander Stichele * Makefile.am: diff --git a/gst/monoscope/gstmonoscope.c b/gst/monoscope/gstmonoscope.c index 4582e5b..d7fe991 100644 --- a/gst/monoscope/gstmonoscope.c +++ b/gst/monoscope/gstmonoscope.c @@ -88,7 +88,20 @@ enum static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_VIDEO_CAPS_xRGB_HOST_ENDIAN) + GST_STATIC_CAPS ("video/x-raw-rgb, " + "bpp = (int) 32, " + "depth = (int) 24, " "endianness = (int) BIG_ENDIAN, " +#if G_BYTE_ORDER == G_BIG_ENDIAN + "red_mask = (int) " GST_VIDEO_BYTE2_MASK_32 ", " + "green_mask = (int) " GST_VIDEO_BYTE3_MASK_32 ", " + "blue_mask = (int) " GST_VIDEO_BYTE4_MASK_32 ", " +#else + "red_mask = (int) " GST_VIDEO_BYTE3_MASK_32 ", " + "green_mask = (int) " GST_VIDEO_BYTE2_MASK_32 ", " + "blue_mask = (int) " GST_VIDEO_BYTE1_MASK_32 ", " +#endif + "width = (int)256, " + "height = (int)128, " "framerate = " GST_VIDEO_FPS_RANGE) ); static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", diff --git a/gst/monoscope/monoscope.c b/gst/monoscope/monoscope.c index 356237e..c8c32ac 100644 --- a/gst/monoscope/monoscope.c +++ b/gst/monoscope/monoscope.c @@ -45,6 +45,10 @@ struct monoscope_state * monoscope_init (guint32 resx, guint32 resy) { struct monoscope_state *stateptr; + + /* I didn't program monoscope to only do 256*128, but it works that way */ + g_return_val_if_fail (resx == 256, 0); + g_return_val_if_fail (resy == 128, 0); stateptr = calloc (1, sizeof (struct monoscope_state)); if (stateptr == 0) return 0;