[gst-devel] How to change colorspace on the fly
AlannY
alanny at starlink.ru
Fri Apr 11 13:18:21 CEST 2008
Thijs Vermeir wrote:
> Hi,
>
> You can use ffmpegcolorspace like this:
> gst-launch -v videotestsrc ! ffmpegcolorspace ! video/x-raw-rgb !
fakesink
>
> But you don't need ffmpegcolorspace because the videotestsrc can
> also output video in rgb. (Try gst-inspect videotestsrc)
>
> To force videotestsrc to use rgb use something like this:
> gst-launch -v videotestsrc ! video/x-raw-rgb ! fakesink
>
> Gr,
> Thijs
>
And how to do it programmaly? I'm trying, but everything I get
video/x-raw-yuv ;-(
(example)
source = gst_element_factory_make("videotestsrc", "source");
colorspace = gst_element_factory_make("ffmpegcolorspace", "colorspace");
myplugin = gst_element_factory_make("myplugin", "myplugin");
video_sink = gst_element_factory_make("xvimagesink", "video_sink");
gst_bin_add_many(GST_BIN(pipeline), source, colorspace, libass,
video_sink, NULL);
caps = gst_caps_new_simple("video/x-raw-rgb", NULL);
gst_element_link_filtered(source, colorspace, caps);
gst_caps_unref(caps);
gst_element_link(colorspace, myplugin);
gst_element_link(mypluin, video_sink);
Nothing works. Myplugin still receives video/x-raw-yuv
More information about the gstreamer-devel
mailing list