Thank you for reply Tim.<br><br>why I have written because aacparse plugin is not giving profile.It is only giving rate,channels,stream-format,mpegversion and framed=true.<br><br>I put the profile/level into the caps. But when I query the caps I am getting CAPS which are set in GST_STATIC_PAD_TEMPLATE.(I am getting ANY).<br>
<br>I am setting the caps in the chain function only.Is it correct way of doing?<br><br>Do I have to use gst_set_src_caps()?I am not using gst_set_src_caps() in my plugin.<br><br>Also can u please tell me about gst_set_src_caps() function why it should be used?<br>
<br>Below is the code what I am using(template and chain function which parse only header information and push the buffer at it is).<br><br><br><br>static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",<br>
    GST_PAD_SRC,<br>    GST_PAD_ALWAYS,<br>    GST_STATIC_CAPS_ANY<br>    );<br><br>and,<br>static GstFlowReturn<br>gst_MyParser_chain (GstPad * pad, GstBuffer * buf)<br>{<br>  Myfilter *filter;<br><br>  filter = GST_MYPARSER (GST_OBJECT_PARENT (pad));<br>
<br>  if (filter->silent == FALSE)<br>    g_print ("I'm plugged, therefore I'm in.\n");<br><br><br>    GstCaps *caps=NULL;<br><br>    gint8 profile;<br>    GstBuffer * tempBuffer = buf;<br>    profile = ( tempBuffer->data[2] &  0xc0 ) >> 6;<br>
<br>    switch(profile)<br>    {<br>        case AAC_MAIN_PROFILE:<br>                 caps = gst_caps_new_simple("audio/mpeg",<br>                            "profile",G_TYPE_STRING,"HE-AAC",            <br>
                           NULL);              <br>                break;<br>        case AAC_LOW_COMPLEXITY_PROFILE:<br>            caps = gst_caps_new_simple(<br>            "audio/mpeg",<br>            "profile",G_TYPE_STRING,"LC",<br>
                      NULL);           <br>            break;<br>        <br>        case AAC_SCALABLE_SAMPLING_RATE_PROFILE:           <br>            break;<br>        case AAC_RESERVED:<br>            printf("\nAAC_RESERVED\n");<br>
            break;<br>    }<br><br>       <br><br>    <br>            <br>//Sets the capabilities of this  source pad.<br>            if (FALSE == gst_pad_set_caps(filter->srcpad, caps))<br>            {<br>                return GST_FLOW_ERROR;<br>
            }<br><br>            if ( caps != NULL)<br>           {<br>               gst_caps_unref(caps);<br>               caps = NULL;<br>           }<br>            //setting the source pad caps to out buffer<br>            gst_buffer_set_caps(buf, GST_PAD_CAPS(filter->srcpad));<br>
<br><br>  /* just push out the incoming buffer without touching it */<br>  return gst_pad_push (filter->srcpad, buf);<br>}<br><br><br>I put the profile/level into the caps. But when I query the caps <br><br><br><div class="gmail_quote">
On Mon, Jul 23, 2012 at 7:34 PM, Tim-Philipp Müller <span dir="ltr"><<a href="mailto:t.i.m@zen.co.uk" target="_blank">t.i.m@zen.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Mon, 2012-07-23 at 19:17 +0530, kalyan chowdary wrote:<br>
<br>
Hi,<br>
<br>
In future you might want to consider using an actual subject line that<br>
describes your question/problem, so people interested in that area can<br>
spot it right away. Mails with empty subject often get ignored or sorted<br>
to /dev/null.<br>
<div class="im"><br>
> On Fri, Jul 20, 2012 at 8:50 PM, kalyan chowdary<br>
> <<a href="mailto:kalyanc007@gmail.com">kalyanc007@gmail.com</a>> wrote:<br>
<br>
</div><div class="im">>         I have written parser kind of plugin(aacparser) in which I<br>
>         have parsed the header name.And I linked it to the decoder<br>
>         plugin.<br>
<br>
</div>Out of curiosity - why have you written another aacparser in addition to<br>
the existing aacparse? What does it do that aacparse doesn't do?<br>
<div class="im"><br>
>         My question is how to get the profile name in gstreamer<br>
>         application.Based on that I have to link my parser to decoder.<br>
>         Ex:<br>
>         filesrc ! parser ! faad ! alsasink<br>
>               filesrc ! parser ! MyDecoder ! alsasink<br>
><br>
</div><div class="im">> If I set it as property in my parser plugin,will I be able to<br>
> read it from gstreamer application?<br>
<br>
</div>You can put the profile/level into the caps, as aacparse does. The<br>
application can then either query the caps after the pipeline is<br>
prerolled, or it could use<br>
<br>
  g_signal_connect(pipeline, "deep-notify::caps" ...)<br>
<br>
to get notified of caps changes on pads (this will be called from a<br>
streaming thread then usually).<br>
<br>
If it's just between your element and your application, you could also<br>
post a custom element message with the information you want the app to<br>
know. It will then get the element message on the GstBus.<br>
<br>
Cheers<br>
 -Tim<br>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div><br>