<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">hi all,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I'm writing my own video plugin, which should support 2 types of input video format (I420, UYVY). The initialization (internal memory allocation, configuration, etc...) for these 2 types of format are seperated, so need
to be told by a format parameter from caps negotiation with upstream element. Now my question is: when does the caps negotiation take place? So that I can place my internal initialization after it.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">At first I put my init function intuitively in the state change function, to be precise, the READY TO PAUSED transition part. Then I found that caps negotiation finishes much later than READY-TO-PAUSED transition, even
later than the PAUSED-TO-PLAYING transition. </p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">BTW, when I say "caps negotiation finishes", I mean when my element get the GST_EVENT_CAPS.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Any help would be much appreciated.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Thanks,</p>
<p style="margin-top:0;margin-bottom:0">Xin</p>
</div>
</body>
</html>