<div dir="ltr">Hi Mike,<br><br>The problem is resolved now. Here is something that I did.<br><br>I took reference of AlsaSrc plugin for writing this DroidAudioSrc plugin.<br><br>I did write these statements in droidaudiosrc_init() function.<br>
<br>GstPad* src_pad = gst_pad_new_from_static_template (&src_factory, "src");<br> gst_pad_set_getcaps_function (src_pad,<br> GST_DEBUG_FUNCPTR(gst_pad_proxy_getcaps));<br>
gst_element_add_pad (GST_ELEMENT (asrc), src_pad);<br><br>It resolved the problem.<br><br>Thanks for your help.<br><br>Kind Regards<br>-Durgesh O Mishra<br><br><div class="gmail_quote">On 18 February 2010 21:49, Durgesh Mishra <span dir="ltr"><<a href="mailto:durgesh.mishra@gmail.com">durgesh.mishra@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr">Hi Mike,<br><br>I have inherited droidaudiosrc from GstAudioSrc.<br><br>Here is the code for doing this. But still I am getting the same error. What could be wrong ?<br>
<br>struct _Gstdroidaudiosrc<br>{ <br>
GstAudioSrc source;<br> AudioRecordDeviceHandle audiorecord_device;<br> gboolean m_init;<br> gint bytes_per_sample;<br> gpointer m_audiosrc;<br> GstCaps *probed_caps;<br>};<br><br>struct _GstdroidaudiosrcClass <br>
{<br> GstAudioSrcClass parent_class;<br>};<br><br>static void<br>gst_droidaudiosrc_base_init (gpointer gclass)<br>{<br> GstElementClass *element_class = GST_ELEMENT_CLASS (gclass);<br><br> gst_element_class_set_details_simple(element_class,<br>
"droidaudiosrc",<br> "Src/Audio",<br> "Input from android audio record",<br> "durgesh o mishra <a href="mailto:durgesh.mishra@gmail.com" target="_blank">durgesh.mishra@gmail.com</a>");<br>
<br> gst_element_class_add_pad_template (element_class,<br> gst_static_pad_template_get (&src_factory));<br>}<br><br>Thanks in advance<br><br>Regards<br>-Durgesh O Mishra<div><div></div><div class="h5"><br><br>
<div class="gmail_quote">On 18 February 2010 03:04, Michael Smith <span dir="ltr"><<a href="mailto:msmith@xiph.org" target="_blank">msmith@xiph.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>On Wed, Feb 17, 2010 at 12:19 PM, Durgesh Mishra<br>
<<a href="mailto:durgesh.mishra@gmail.com" target="_blank">durgesh.mishra@gmail.com</a>> wrote:<br>
> Hi Experts,<br>
><br>
> I am writing audio source plugin for Android. I am new to gstreamer and<br>
> would appreciate your help on this.<br>
><br>
> While running the plugin with gst-launch, I am getting following error.<br>
><br>
> gst-launch-0.10 droidaudiosrc ! audioconvert ! audioresample ! fakesink<br>
><br>
> GStreamer-WARNING **: Element droidaudiosrc0 has an ALWAYS template src,<br>
> but no pad of the same name<br>
<br>
</div>Your audio source plugin should inherit from GstAudioSrc (or if<br>
there's a particular reason that that isn't appopriate,<br>
GstBaseAudioSrc). If you do it this way, the pad will be created for<br>
you, so you shouldn't have this problem.<br>
<br>
Mike<br>
<br>
------------------------------------------------------------------------------<br>
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,<br>
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW<br>
<a href="http://p.sf.net/sfu/solaris-dev2dev" target="_blank">http://p.sf.net/sfu/solaris-dev2dev</a><br>
<div><div></div><div>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><br></div></div><div class="im">-- <br>"If you only have a hammer, you tend to see every problem as a nail."<br>
</div></div>
</blockquote></div><br><br clear="all"><br>-- <br>"If you only have a hammer, you tend to see every problem as a nail."<br>
</div>