[gst-devel] how to add a new cap type for video sink like "video/x-raw-va"

Zhao, Halley halley.zhao at intel.com
Wed Nov 12 07:52:36 CET 2008


Hello All:
I try to add a new type in xvimagesink pad, but met some problem, could you kindly give some advice. Thanks.


There are pad cap for video sink like "video/x-raw-rgb " and "video/x-raw-yuv";
I try to add a new type to support another display mode, for example, video driver display the frame directly without XvPutImage.

1.       if I do not define a new cap type, but use "video/x-raw-yuv" stealthily. It could work.
That means, I still use "video/x-raw-rgb" in libgstmpeg2dec, but only provide some handler/ReferenceID in the buffer instead of YUV data. And xvimagesink parse the handler/ReferenceID in buffer for display.
2.       when I try to define a new cap type, I got some "Internal data flow error"
I try to define a new cap type in gstmpeg2dec.c:  modify in pad template and gst_mpeg2dec_negotiate_format()
Also define the same new cap in xvimagesink.c: modify in pad template and gst_xvimagesink_get_xv_support()
Seems the pad negotiation is ok, but fail at "Internal data flow error".

Detail log as following:
ume at ume-halley:~/work$ gst-launch-0.10 -v playbin uri=file:///home/ume/work/test.m2v
Setting pipeline to PAUSED ...
/playbin0/decodebin0/typefind.src: caps = video/mpeg, systemstream=(boolean)false, mpegversion=(int)1
....
Pipeline is PREROLLING ...
/playbin0/decodebin0/mpeg2dec0.sink: caps = video/mpeg, systemstream=(boolean)false, mpegversion=(int)1
/playbin0/decodebin0/mpeg2dec0.src: caps = video/x-raw-va, format=(fourcc)I420, width=(int)352, height=(int)288, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1
ERROR: from element /playbin0/source: Internal data flow error.
Additional debug info:
gstbasesrc.c(2165): gst_base_src_loop (): /playbin0/source:
streaming task paused, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
/playbin0/decodebin0/mpeg2dec0.src: caps = NULL
/playbin0/decodebin0/mpeg2dec0.sink: caps = NULL
/playbin0/decodebin0/typefind.src: caps = NULL
FREEING pipeline ...

ZHAO, Halley (Aihua)
Email: halley.zhao at intel.com<mailto:aihua.zhao at intel.com>
Tel: +86(21)61166476
iNet: 8821-6476
SSG/OTC/UMD 3W033

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20081112/ff60e085/attachment.htm>


More information about the gstreamer-devel mailing list