<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<STYLE>.hmmessage P {
        PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
BODY.hmmessage {
        FONT-SIZE: 10pt; FONT-FAMILY: Tahoma
}
</STYLE>

<META content="MSHTML 6.00.2900.3314" name=GENERATOR></HEAD>
<BODY class=hmmessage>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV align=left><SPAN lang=EN-US><FONT face=Arial color=#0000ff size=2><SPAN 
class=592535008-18062008>yes, you can refernce how to use queue. you can set 
water mark in queue.And then post message to bus if lower than mater mark. in 
your main app you can recieve </SPAN></FONT></SPAN><SPAN lang=EN-US><FONT 
face=Arial color=#0000ff size=2><SPAN class=592535008-18062008>the message to 
pause the pipeline. </SPAN></FONT></SPAN></DIV>
<DIV align=left><SPAN lang=EN-US><FONT face=Arial color=#0000ff size=2><SPAN 
class=592535008-18062008></SPAN></FONT></SPAN>&nbsp;</DIV>
<DIV align=left><SPAN lang=EN-US><FONT face=Arial color=#0000ff size=2><SPAN 
class=592535008-18062008>if higher water mark, you can use the same 
mechanism.</DIV>
<DIV align=left><SPAN class=169584808-18062008><FONT face=Arial 
color=#0000ff></FONT></SPAN>&nbsp;</DIV>
<DIV align=left><SPAN class=169584808-18062008><FONT face=Arial 
color=#0000ff></FONT></SPAN>&nbsp;</DIV>
<DIV align=left><SPAN class=169584808-18062008><FONT face=Arial 
color=#0000ff></FONT></SPAN>&nbsp;</DIV></SPAN></FONT></SPAN><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> 
gstreamer-embedded-bounces@lists.sourceforge.net 
[mailto:gstreamer-embedded-bounces@lists.sourceforge.net] <B>On Behalf Of 
</B>Zhao Liang-E3423C<BR><B>Sent:</B> Wednesday, June 18, 2008 4:49 
PM<BR><B>To:</B> Shenhong Wang; 
gstreamer-embedded@lists.sourceforge.net<BR><B>Subject:</B> Re: [gst-embedded] 
Question on gst_plugin alsasink<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><FONT face="Courier New"><FONT color=#0000ff><FONT 
size=3>Hi&nbsp;<SPAN class=999344508-18062008>she</SPAN>nhong<SPAN 
class=999344508-18062008>,</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Courier New"><FONT color=#0000ff><FONT 
size=3><SPAN class=999344508-18062008></SPAN></FONT></FONT></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face="Courier New"><FONT color=#0000ff><FONT 
size=3><SPAN class=999344508-18062008>A simply solution you can 
try.</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Courier New"><FONT color=#0000ff><FONT 
size=3><SPAN class=999344508-18062008></SPAN></FONT></FONT></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face="Courier New"><FONT color=#0000ff><FONT 
size=3><SPAN class=999344508-18062008>Put a queue before alsasink, when queue is 
dry, pause pipeline, and restart pipeline when queue bufferred enough 
data.</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Courier New"><FONT color=#0000ff><FONT 
size=3><SPAN class=999344508-18062008></SPAN></FONT></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" color=#0000ff size=3></FONT>&nbsp;</DIV>
<DIV class=Section1>
<P class=MsoNormal align=left><B><SPAN lang=EN-US 
style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'">Best 
Regards<BR>Zhao <SPAN class=SpellE>Liang</SPAN> </SPAN></B></P></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Shenhong Wang [mailto:qch1688@hotmail.com] 
<BR><B>Sent:</B> Wednesday, June 18, 2008 4:44 PM<BR><B>To:</B> Zhao 
Liang-E3423C; gstreamer-embedded@lists.sourceforge.net<BR><B>Subject:</B> RE: 
[gst-embedded] Question on gst_plugin alsasink<BR></FONT><BR></DIV>
<DIV></DIV>Hi, Zhao Liang:<BR>Generally, the aacdec &amp;alsasink will not play 
out any audio frames(packets) after its source element has a break to send audio 
frames (packets) to them. It looks the alsasink drops all frames(packets) from 
the break. The break is needed because we have more video frames and sometime 
the wireless signal is not good. <BR>It looks the aacdec is slower than the 
expectation from alsasink.If so, how to fix the issue? thanks!<BR>&nbsp;<BR>best 
Regards!<BR>Shenhong<BR>&nbsp;<BR>&nbsp;<BR><BR><BR><BR><BR>&nbsp;<BR>
<BLOCKQUOTE>
  <HR id=EC_stopSpelling>
  Subject: RE: [gst-embedded] Question on gst_plugin alsasink<BR>Date: Wed, 18 
  Jun 2008 14:29:27 +0800<BR>From: E3423C@motorola.com<BR>To: 
  qch1688@hotmail.com; gstreamer-embedded@lists.sourceforge.net<BR><BR>
  <META content="Microsoft SafeHTML" name=Generator>
  <STYLE>.ExternalClass .EC_hmmessage P {
        PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px
}
.ExternalClass BODY.EC_hmmessage {
        FONT-SIZE: 10pt; FONT-FAMILY: Tahoma
}
</STYLE>

  <DIV dir=ltr align=left><FONT face="Courier New" color=#0000ff size=3><SPAN 
  class=EC_329532206-18062008>Hi Shenhong,</SPAN></FONT></DIV>
  <DIV dir=ltr align=left><FONT face="Courier New" color=#0000ff size=3><SPAN 
  class=EC_329532206-18062008></SPAN></FONT>&nbsp;</DIV>
  <DIV dir=ltr align=left><FONT face="Courier New" color=#0000ff size=3><SPAN 
  class=EC_329532206-18062008>Your issue is very similar with&nbsp;the issue I 
  even met. I think it is due to gstbaseaudiosink/gstaudiosink, it will drop the 
  packets by gstringbuffer when read rate is bigger than write rate in 
  ringbuffer, please see gstringbuffer.c gst_ring_buffer_commit_full 
  ().</SPAN></FONT></DIV>
  <DIV dir=ltr align=left><FONT face="Courier New" color=#0000ff size=3><SPAN 
  class=EC_329532206-18062008></SPAN></FONT>&nbsp;</DIV>
  <DIV dir=ltr align=left><FONT face="Courier New" color=#0000ff size=3><SPAN 
  class=EC_329532206-18062008>For the rootcause, I think maybe the alsasink 
  audiodevice buffer is too big or your aac decoder is too 
  slow.</SPAN></FONT></DIV>
  <DIV><FONT face="Courier New" color=#0000ff size=3></FONT>&nbsp;</DIV>
  <DIV class=EC_Section1>
  <P class=EC_MsoNormal align=left><B><SPAN lang=EN-US 
  style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'">Best 
  Regards<BR>Zhao <SPAN class=EC_SpellE>Liang</SPAN></SPAN></B><BR></P></DIV>
  <DIV class=EC_OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR>
  <FONT face=Tahoma size=2><B>From:</B> 
  gstreamer-embedded-bounces@lists.sourceforge.net 
  [mailto:gstreamer-embedded-bounces@lists.sourceforge.net] <B>On Behalf Of 
  </B>Shenhong Wang<BR><B>Sent:</B> Wednesday, June 18, 2008 2:21 
  PM<BR><B>To:</B> gstreamer-embedded@lists.sourceforge.net<BR><B>Subject:</B> 
  [gst-embedded] Question on gst_plugin alsasink<BR></FONT><BR></DIV>
  <DIV></DIV><BR>Dear all,<BR>Now we are using alsasink to play audio on Marvell 
  PXA310 board. The audio is aac format.&nbsp;The audio&nbsp;frames(packets) 
  are&nbsp;frequently sent to the aac decoder &amp;&nbsp;alsasink to play out. 
  Unfortunately only the begining frames can be played out and then nothing is 
  played out. <BR>If we save those audio frames into a file, the aac 
  decoder&amp;alsasink can be successfully played out. It means the audio frames 
  are ok. <BR>Could anyone tell me what's the difference for alsasink to process 
  audio packets and files? How to fix the above issue? thank you very 
  much!<BR>&nbsp;<BR>Best Regards!<BR>Shenhong WANG<BR><BR>
  <HR>
  Connect to the next generation of MSN Messenger&nbsp; <A 
  href="http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&amp;source=wlmailtagline" 
  target=_blank>Get it now! </A></BLOCKQUOTE><BR>
<HR>
Connect to the next generation of MSN Messenger&nbsp; <A 
href="http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&amp;source=wlmailtagline" 
target=_new>Get it now! </A></BODY></HTML>