问题
How to set the property of sink pad in program for example:
sin_00::outWidth=1280 sin_00::outHeight=720 in this way pipeline was run using gst-launch-0.10 .....
And to set this property Ive used gst_pad_set_property() API but its not working
it shows following error :
3_video_temp.c: In function 'main':
3_video_temp.c:551: warning: implicit declaration of function 'gst_pad_set_property'
/tmp/cc2zDbzt.o: In function `main':
/home/project/compWorkspace/Edubeam/3_video_temp.c:551: undefined reference to `gst_pad_set_property'
collect2: ld returned 1 exit status
make: *** [all] Error 1
Please tell how to set that value as soon as possible.
回答1:
Most pads don't have properties. width and height are usually negotiated via caps that are set on buffers and pads.
回答2:
If the pads have properties (like the pads in videomixer has), you just use g_object_set like you would with any property, so something like:
g_object_set (pad, "width", 1280, NULL);
回答3:
What version of GStreamer do you have installed on your system? Quickly check using:
gst-inspect --version
Where did you find a doc or example for gst_pad_set_property()? I just searched for gst_pad_set_property in /usr/include/gstreamer-0.10/gst/* on my Linux development system and came up empty-handed. But when I search through the latest source snapshot for GStreamer, the function appears. This leads me to believe you might be looking at docs or examples for an in-development version of GStreamer that has new convenience APIs not seen in earlier versions (I have run into similar problems on occasion).
Exactly what property are you trying to set on the sink pad?
来源:https://stackoverflow.com/questions/10945817/how-to-set-the-property-of-sink-pad-of-element-in-gstreamer