[gst-devel] Another GstAppSrc Question

John Stowers john.stowers.lists at gmail.com
Thu Dec 2 06:58:22 CET 2010


Hi All,

I see quite a few similar questions to these on the gst-devel mailing
list, but none of them allowed me to get past my problem.

I'm building a streaming video thing using gstreamer, the prototype
(works fine) is

sender:
gst-launch -v videotestsrc !
video/x-raw-rgb,width=640,height=480,bpp=24,depth=24 !
ffmpegcolorspace ! videoscale method=1 ! theoraenc bitrate=150 ! udpsink
host=127.0.0.1 port=1234

viewer:
gst-launch -v udpsrc port=1234 ! theoradec ! autovideosink

I have been translating it to C starting with the appsrc-stream example.
I can't get it to negotiate the caps I set properly. The relevant
warning messages are;

basetransform
gstbasetransform.c:1047:gst_base_transform_acceptcaps:<videoscale0>
transform could not transform video/x-raw-rgb, bpp=(int)24,
depth=(int)24, width=(int)640, height=(int)480 in anything we support
0:00:00.178133697 10789  0x829a8d0 WARN           basetransform
gstbasetransform.c:1144:gst_base_transform_setcaps:<ffmpegcsp0> FAILED
to configure caps <ffmpegcsp0:src> to accept video/x-raw-yuv,
format=(fourcc)I420, framerate=(fraction)1/2147483647, width=(int)640,
height=(int)480

The relevant code is;

app->pipeline = gst_parse_launch("appsrc name=mysource !
video/x-raw-rgb,width=640,height=480,bpp=24,depth=24 !
ffmpegcolorspace ! videoscale method=1 ! theoraenc bitrate=150 ! udpsink
host=127.0.0.1 port=1234", NULL);

<snip>

caps = gst_caps_new_simple ("video/x-raw-rgb",
    "bpp",G_TYPE_INT,24,
    "depth",G_TYPE_INT,24,
     "width", G_TYPE_INT, 640,
     "height", G_TYPE_INT, 480,
     NULL);
gst_app_src_set_caps(GST_APP_SRC(app->appsrc), caps);

Full source code is here
http://pastebin.com/PJuGVJLC

Any pointers?

John




More information about the gstreamer-devel mailing list