diff options
author | Benjamin Otte <otte@gnome.org> | 2004-01-12 02:01:51 +0000 |
---|---|---|
committer | Benjamin Otte <otte@gnome.org> | 2004-01-12 02:01:51 +0000 |
commit | 92bcd417632c181fdbb5deeaabbb81a84f819b5f (patch) | |
tree | e6507ad9b3b9544eb4a637a668e9c0c71247f1fb /gst/monoscope | |
parent | 44455ef9c957b349aed7f47dda7f06e5c6b66d4b (diff) |
gst-libs/gst/video/video.h: Fix caps template names to be understandable.
Original commit message from CVS:
2004-01-12 Benjamin Otte <in7y118@public.uni-hamburg.de>
* gst-libs/gst/video/video.h:
Fix caps template names to be understandable.
Prefix everything with GST_VIDEO.
* ext/aalib/gstaasink.c:
* ext/divx/gstdivxdec.c:
* ext/divx/gstdivxenc.c:
* ext/gdk_pixbuf/gstgdkpixbuf.c:
* ext/hermes/gstcolorspace.c: (gst_colorspace_base_init):
* ext/jpeg/gstjpegdec.c: (raw_caps_factory):
* ext/jpeg/gstjpegenc.c: (raw_caps_factory):
* ext/libcaca/gstcacasink.c:
* ext/libpng/gstpngenc.c: (raw_caps_factory):
* ext/snapshot/gstsnapshot.c:
* ext/swfdec/gstswfdec.c:
* ext/xvid/gstxviddec.c:
* ext/xvid/gstxvidenc.c:
* gst/chart/gstchart.c:
* gst/deinterlace/gstdeinterlace.c:
* gst/effectv/gsteffectv.c:
* gst/flx/gstflxdec.c: (gst_flxdec_loop):
* gst/goom/gstgoom.c:
* gst/median/gstmedian.c:
* gst/monoscope/gstmonoscope.c: (gst_monoscope_init),
(gst_monoscope_srcconnect), (gst_monoscope_chain):
* gst/overlay/gstoverlay.c:
* gst/smooth/gstsmooth.c:
* gst/smpte/gstsmpte.c:
* gst/synaesthesia/gstsynaesthesia.c:
* gst/videocrop/gstvideocrop.c:
* gst/videodrop/gstvideodrop.c:
* gst/y4m/gsty4mencode.c:
* sys/qcam/gstqcamsrc.c:
* sys/v4l/gstv4lsrc.c: (gst_v4lsrc_palette_to_caps):
Make them work with new video.h file.
* sys/ximage/ximagesink.c: (gst_ximagesink_chain),
(gst_ximagesink_buffer_free), (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_chain),
(gst_xvimagesink_buffer_free), (gst_xvimagesink_buffer_alloc):
Make it work with new buffer allocation system.
Diffstat (limited to 'gst/monoscope')
-rw-r--r-- | gst/monoscope/gstmonoscope.c | 43 |
1 files changed, 4 insertions, 39 deletions
diff --git a/gst/monoscope/gstmonoscope.c b/gst/monoscope/gstmonoscope.c index 37ab9f2c..3a066af6 100644 --- a/gst/monoscope/gstmonoscope.c +++ b/gst/monoscope/gstmonoscope.c @@ -86,7 +86,7 @@ GST_STATIC_PAD_TEMPLATE ( "src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_VIDEO_RGB_PAD_TEMPLATE_CAPS_32) + GST_STATIC_CAPS (GST_VIDEO_CAPS_xRGB_HOST_ENDIAN) ); static GstStaticPadTemplate sink_template = @@ -104,8 +104,6 @@ static void gst_monoscope_init (GstMonoscope *monoscope); static void gst_monoscope_chain (GstPad *pad, GstData *_data); -static GstPadLinkReturn - gst_monoscope_sinkconnect (GstPad *pad, const GstCaps *caps); static GstPadLinkReturn gst_monoscope_srcconnect (GstPad *pad, const GstCaps *caps); @@ -169,7 +167,6 @@ gst_monoscope_init (GstMonoscope *monoscope) gst_element_add_pad (GST_ELEMENT (monoscope), monoscope->srcpad); gst_pad_set_chain_function (monoscope->sinkpad, gst_monoscope_chain); - gst_pad_set_link_function (monoscope->sinkpad, gst_monoscope_sinkconnect); gst_pad_set_link_function (monoscope->srcpad, gst_monoscope_srcconnect); monoscope->next_time = 0; @@ -182,37 +179,8 @@ gst_monoscope_init (GstMonoscope *monoscope) } static GstPadLinkReturn -gst_monoscope_sinkconnect (GstPad *pad, const GstCaps *caps) -{ - GstMonoscope *monoscope; - monoscope = GST_MONOSCOPE (gst_pad_get_parent (pad)); - - return GST_PAD_LINK_OK; -} - -static GstPadLinkReturn -gst_monoscope_negotiate (GstMonoscope *monoscope) -{ - GstCaps *caps; - - caps = gst_caps_new_simple ("video/x-raw-rgb", - "bpp", G_TYPE_INT, 32, - "depth", G_TYPE_INT, 32, - "endianness", G_TYPE_INT, G_BIG_ENDIAN, - "red_mask", G_TYPE_INT, R_MASK_32, - "green_mask", G_TYPE_INT, G_MASK_32, - "blue_mask", G_TYPE_INT, B_MASK_32, - "width", G_TYPE_INT, monoscope->width, - "height", G_TYPE_INT, monoscope->height, - "framerate", G_TYPE_DOUBLE, monoscope->fps, NULL); - - return gst_pad_try_set_caps (monoscope->srcpad, caps); -} - -static GstPadLinkReturn gst_monoscope_srcconnect (GstPad *pad, const GstCaps *caps) { - GstPadLinkReturn ret; GstMonoscope *monoscope = GST_MONOSCOPE (gst_pad_get_parent (pad)); GstStructure *structure; @@ -222,10 +190,7 @@ gst_monoscope_srcconnect (GstPad *pad, const GstCaps *caps) gst_structure_get_int (structure, "height", &monoscope->height); gst_structure_get_double (structure, "framerate", &monoscope->fps); - if ((ret = gst_monoscope_negotiate (monoscope)) <= 0) - return ret; - - return GST_PAD_LINK_DONE; + return GST_PAD_LINK_OK; } static void @@ -263,8 +228,8 @@ gst_monoscope_chain (GstPad *pad, GstData *_data) monoscope->visstate = monoscope_init (monoscope->width, monoscope->height); g_assert(monoscope->visstate != 0); GST_DEBUG ("making new pad"); - if (!GST_PAD_CAPS (monoscope->srcpad)) { - if (gst_monoscope_negotiate (monoscope) <= 0) { + if (!gst_pad_is_negotiated (monoscope->srcpad)) { + if (gst_pad_renegotiate (monoscope->srcpad) <= 0) { gst_element_error (GST_ELEMENT (monoscope), "could not set caps"); return; } |