Re: Gst::Caps and the "caps" property.



Victor Bogado da Silva Lins wrote:
On Sun, 2008-09-14 at 14:26 -0400, José Alburquerque wrote:
Gst::Element does not directly have a caps property. Instead, use the pads of the element to set the caps property that way.


I create the pipeline in the command line as that
$ gst-launch -p multifilesrc location=../testes/chess/IMG_%04d.JPG
index=3425 num-buffers=36 caps=image/jpeg,framerate=15/1 ! jpegdec !
xvimagesink

and it work correctly,

The command line (using gst-launch) operates somewhat differently from what needs to be done in a program. I believe gst-inspect allows for caps to be passed that way and handles it differently than what one would have to do in a program.

but if I set the 'src' pad to have the caps in my
test program it don't respect the framerate I stated in the caps.

I understand.

Also
the warning gst outputs seems to indicate that there is a property
called caps but I am trying to set it with an incompatible pointer.
If I try to setup a nonexistent property I get the following runtime
warning :
(teste:30218): GLib-GObject-WARNING **: IA__g_object_set_property:
object class `GstMultiFileSrc' has no property named `blah'

Even so, it would be best to use the interface already specified. If you use gst-inspect on the element (e.g. `gst-inspect multifilesrc') you'll see a list of the properties it supports (see also the GStreamer docs on using elements as GObjects: http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-elements-properties.html). There should be a way to set the caps on the pad because it would seem to be the correct way to get this done (see the "Pads and Capabilities" section: http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-pads.html).

--
José Alburquerque



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]