<br><br><div class="gmail_quote">On Tue, Mar 16, 2010 at 2:09 PM, Stefan Kost <span dir="ltr">&lt;<a href="mailto:ensonic@hora-obscura.de">ensonic@hora-obscura.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

hi,<br>
<div class="im"><br>
vineeth wrote:<br>
&gt; Hi all,<br>
&gt;   I was going through the Plugin writers guide, and I sincerely feel<br>
&gt; that the chapter 9<br>
</div>&gt; &lt;<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/chapter-building-testapp.html" target="_blank">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/chapter-building-testapp.html</a>&gt;<br>


<div class="im">&gt; should also describe how to build the test plugin &quot;my_filter&quot;<br>
&gt;   that was described all the way along and also being used in the test<br>
&gt; app. BTW, I used the following command to do this,<br>
&gt;    gcc  `pkg-config --libs --cflags gstreamer-0.10`<br>
&gt; gstexamplefilter.c --shared -o<br>
&gt; ~/.gstreamer-0.10/plugins/libexamplefilter.so<br>
&gt;<br>
&gt;   But was unable to load it,<br>
</div>I added a paragraph to<br>
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/part-building.html" target="_blank">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/part-building.html</a><br>
it will show up after next release.<br>
<div><div></div><div class="h5"><br>
&gt;<br>
&gt;   I got the following error message, when I ran it through valgrind :<br>
&gt;<br>
&gt; ==3068== Memcheck, a memory error detector.<br>
&gt; ==3068== Copyright (C) 2002-2008, and GNU GPL&#39;d, by Julian Seward et al.<br>
&gt; ==3068== Using LibVEX rev 1884, a library for dynamic binary translation.<br>
&gt; ==3068== Copyright (C) 2004-2008, and GNU GPL&#39;d, by OpenWorks LLP.<br>
&gt; ==3068== Using valgrind-3.4.1-Debian, a dynamic binary instrumentation<br>
&gt; framework.<br>
&gt; ==3068== Copyright (C) 2000-2008, and GNU GPL&#39;d, by Julian Seward et al.<br>
&gt; ==3068== For more details, rerun with: -v<br>
&gt; ==3068==<br>
&gt; ==3069== Invalid read of size 1<br>
&gt; ==3069==    at 0x42DC3D7: g_str_hash (in /usr/lib/libglib-2.0.so.0.2000.1)<br>
&gt; ==3069==    by 0x42AA3FA: g_hash_table_lookup (in<br>
&gt; /usr/lib/libglib-2.0.so.0.2000.1)<br>
&gt; ==3069==    by 0x42A3EB6: g_intern_string (in<br>
&gt; /usr/lib/libglib-2.0.so.0.2000.1)<br>
&gt; ==3069==    by 0x4095A48: (within /usr/lib/libgstreamer-0.10.so.0.19.0)<br>
&gt; ==3069==    by 0x4096F51: gst_plugin_load_file (in<br>
&gt; /usr/lib/libgstreamer-0.10.so.0.19.0)<br>
&gt; ==3069==    by 0x40A0B8E: (within /usr/lib/libgstreamer-0.10.so.0.19.0)<br>
&gt; ==3069==    by 0x40A0CA7: gst_registry_scan_path (in<br>
&gt; /usr/lib/libgstreamer-0.10.so.0.19.0)<br>
&gt; ==3069==    by 0x40547B2: (within /usr/lib/libgstreamer-0.10.so.0.19.0)<br>
&gt; ==3069==    by 0x40551AC: (within /usr/lib/libgstreamer-0.10.so.0.19.0)<br>
&gt; ==3069==    by 0x40568FA: (within /usr/lib/libgstreamer-0.10.so.0.19.0)<br>
&gt; ==3069==    by 0x42C7DCA: g_option_context_parse (in<br>
&gt; /usr/lib/libglib-2.0.so.0.2000.1)<br>
&gt; ==3069==    by 0x4055FA5: gst_init_check (in<br>
&gt; /usr/lib/libgstreamer-0.10.so.0.19.0)<br>
&gt; ==3069==  Address 0x1 is not stack&#39;d, malloc&#39;d or (recently) free&#39;d<br>
&gt;<br>
&gt; ERROR: Caught a segmentation fault while loading plugin file:<br>
&gt; /home/pubuntu/.gstreamer-0.10/plugins/libexamplefilter.so<br>
&gt;<br>
&gt; Please either:<br>
&gt; - remove it and restart.<br>
&gt; - run with --gst-disable-segtrap and debug.<br>
&gt;                     ....<br>
&gt;<br>
&gt;<br>
&gt;  Any idea about what is going wrong?<br>
<br>
</div></div>what backtrace are you getting when you run this under gdb, e.g. via:<br>
gdb --args gst-inspect-0.10 --gst-disable-registry-fork examplefilter<br>
<br>
Stefan<br></blockquote><div><br>The problem is fixed,<br>The problem was in the way I was building the plugin, the macro VERSION was not defined in the generated filter code so I had declared it as a int leading to the crash.<br>

(I had ignored the gcc warning and later realized this to be a string.)<br>Probably the template plugin code can have a definition of macro VERSION, so that the generated filter is compilable out of the box(?).<br>Thanks.<br>

 </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
&gt;  Thanks<br>
&gt;<br>
&gt; Br,<br>
&gt; V<br>
&gt; ------------------------------------------------------------------------<br>
&gt;<br>
&gt; ------------------------------------------------------------------------------<br>
&gt; Download Intel&amp;#174; Parallel Studio Eval<br>
&gt; Try the new software tools for yourself. Speed compiling, find bugs<br>
&gt; proactively, and fine-tune applications for parallel performance.<br>
&gt; See why Intel Parallel Studio got high marks during beta.<br>
&gt; <a href="http://p.sf.net/sfu/intel-sw-dev" target="_blank">http://p.sf.net/sfu/intel-sw-dev</a><br>
&gt; ------------------------------------------------------------------------<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; gstreamer-devel mailing list<br>
<div class="im">&gt; <a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
</div>&gt; <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
&gt;<br>
<br>
<br>
------------------------------------------------------------------------------<br>
Download Intel&amp;#174; Parallel Studio Eval<br>
Try the new software tools for yourself. Speed compiling, find bugs<br>
proactively, and fine-tune applications for parallel performance.<br>
See why Intel Parallel Studio got high marks during beta.<br>
<a href="http://p.sf.net/sfu/intel-sw-dev" target="_blank">http://p.sf.net/sfu/intel-sw-dev</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<div class="im"><a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
</div><a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
</blockquote></div><br>