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