Hi All,<div><br></div><div>The streams can work now after that I have set the &quot;sync&quot; attributes of the alsasink and overlay2sink to false. But it is desultory at times.</div><div><br></div><div>Could somebody kindly give me the better solution ?</div>
<div><br></div><div><br></div><div>Thanks &amp; Best regards!</div><div><br></div><div><br><div class="gmail_quote">On Wed, Aug 5, 2009 at 6:15 PM, H Y <span dir="ltr">&lt;<a href="mailto:hy110001@gmail.com">hy110001@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi,<div><br></div><div>For some reason, I need handle the stream from a non-gst demux. I use the GStreamer as follows:</div>
<div><br></div><div>                             | ---&gt; queue2 [videoQ] ---&gt; h264dec ---&gt; overlay2sink</div>
<div>non-gst demux ---&gt; | <br clear="all">                             | ---&gt; queue2 [audioQ] ---&gt; aacdec ---&gt; alsasink</div><div><br></div><div><br></div><div>I put the audio into the sinkpad and video into the sinkpad of queue2. Just like the code as follows:</div>

<div><br></div><div>non-gst-demux.onVideo(guint timestamp, guint8 *data, guint size)</div><div>{</div><div>      // The x-h264 NAL data</div><div><br></div><div>      gst_playback-&gt;inputVideo(timestamp, data, size);</div>

<div>}</div><div><br></div><div><div>non-gst-demux.onAudio(guint timestamp, guint8 *data, guint size)</div><div>{</div><div>      gst_playback-&gt;inputAudio(timestamp, data, size);</div><div>}</div><div><br></div><div><br>

</div><div><div>GstPad *audioP = gst_element_get_static_pad(audioQ, &quot;sink&quot;);</div><div>GstPad *videoP = gst_element_get_static_pad(videoQ, &quot;sink&quot;);</div><div><br></div></div><div>......inputVideo(guint timestamp, guint8 *data, guint size)</div>

<div>{</div><div>    GstBuffer *buffer = gst_buffer_new_and_alloc(size);</div><div><br></div><div><div>    memcpy(GST_BUFFER_DATA(buffer), data, size);</div><div>    GST_BUFFER_SIZE(buffer) = size;</div><div>    GST_BUFFER_TIMESTAMP(buffer) = timeStamp;</div>

<div><br></div><div>    gst_pad_chain(m_videoP, buffer);</div></div><div>}</div><div><br></div><div>...... </div></div><div><br></div><div>It seems that it only can play the first frame. I got the info that the queue buffer was full frequently. Does somebody can help me out of the trouble? And any advices are warmly welcome!</div>

<div><br></div><div><br></div><div><br></div><div><br></div><div><br>-- <br>    H.Y<br>
</div>
</blockquote></div><br><br clear="all"><br>-- <br>    H.Y<br>
</div>