<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">

<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.E-postmall17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:navy;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->




<div class=Section1>

<p class=MsoNormal><span lang=EN-US style='color:navy'>Hi,<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:navy'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:navy'>I&#8217;m new to
GStreamer and try to write a encoder and a decoder for a compressed audio
format. But I have problems to get the Caps-negotiation to work.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:navy'>I base the code on the gst-template
and have basically been looking at the alawenc/alawdec as my example. <o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:navy'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:navy'>Everything works fine if
I use &#8220;ANY&#8221; or &#8220;audio/x-raw-int&#8221; in the source of the
encoder and sink of the decoder:<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:blue'>static</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>
GstStaticPadTemplate gtest_enc_src_factory = GST_STATIC_PAD_TEMPLATE (<span
style='color:#A31515'>&quot;src&quot;</span>,<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
GST_PAD_SRC,<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
GST_PAD_ALWAYS,<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
GST_STATIC_CAPS (<span style='color:#A31515'>&quot;ANY&quot;</span>)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:blue'>static</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>
GstStaticPadTemplate gtest_dec_sink_factory = GST_STATIC_PAD_TEMPLATE (<span
style='color:#A31515'>&quot;sink&quot;</span>,<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
GST_PAD_SINK,<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
GST_PAD_ALWAYS,<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
GST_STATIC_CAPS (<span style='color:#A31515'>&quot;ANY&quot;</span>)<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:navy'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:navy'>But when I change the
MIME-type to something else, like for example &#8220;audio/mytesttype&#8221;, I
get the error &#8220;WARNING: erroneous pipeline: could not link gtestenc0 to
gtestdec0&#8221;. <o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:navy'>I&#8217;m using the pipeline:
<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:navy'>gst-launch-0.10.exe audiotestsrc
! gtestenc ! gtestdec ! audioresample ! autoaudiosink<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:navy'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:navy'>I get the same error if
I only change one of the two caps:es and keep the other one as ANY.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:navy'>What have I missed? Do I
need to register my new type in some way, or what could be the problem?<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:navy'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:navy'>Markus<o:p></o:p></span></p>

</div>





<br><hr align="left" width="300">
View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/Caps-problem-when-writing-encoder-decoder-tp2219436p2219436.html">Caps problem when writing encoder/decoder</a><br>
Sent from the <a href="http://gstreamer-devel.966125.n4.nabble.com/">GStreamer-devel mailing list archive</a> at Nabble.com.<br>