<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.3492" name=GENERATOR><LINK 
href="BLOCKQUOTE{margin-Top: 0px; margin-Bottom: 0px; margin-Left: 2em}" 
rel=stylesheet></HEAD>
<BODY style="FONT-SIZE: 10pt; MARGIN: 10px; FONT-FAMILY: verdana">
<DIV><FONT face=Verdana size=2>hi, </FONT>all</DIV>
<DIV>&nbsp;&nbsp;&nbsp; &nbsp;I'm a beginner on gstreamer.</DIV>
<DIV style="TEXT-INDENT: 2em">I add some gstreamer code to play sound in 
RedOffice(Openoffice.org) using gstreamer, but, at some times the RedOffice 
program will has not any response for input when it finish&nbsp;the sound 
playing, the RedOffice must be killed and restart it.This&nbsp;computer is MIPS, 
linux debian 2.6.27.1, has install gstreamer0.10-plugins-base, and 
gstreamer0.10-plugins-good.</DIV>
<DIV style="TEXT-INDENT: 2em">But&nbsp;the&nbsp;bug&nbsp;doesn't exist&nbsp;on 
other computer(MIPS, linux debian 2.6.18.1, has also install 
gstreamer0.10-plugins-base, and gstreamer0.10-plugins-good).</DIV>
<DIV style="TEXT-INDENT: 2em">Is anybody know the reason? It puzzles me a long 
time.</DIV>
<DIV style="TEXT-INDENT: 2em">THX.</DIV>
<DIV style="TEXT-INDENT: 2em">&nbsp;</DIV>
<DIV>ps:</DIV>
<DIV>&nbsp; following is&nbsp;some&nbsp;code, attachment is the whole source 
code:</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV>void&nbsp;SAL_CALL&nbsp;Player::start(&nbsp;&nbsp;)</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;(uno::RuntimeException)</DIV>
<DIV>{</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;//OSL_TRACE&nbsp;("Player::start");</DIV>
<DIV></DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;set&nbsp;the&nbsp;pipeline&nbsp;state&nbsp;to&nbsp;READY&nbsp;and&nbsp;run&nbsp;the&nbsp;loop</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;if(&nbsp;mbInitialized&nbsp;&amp;&amp;&nbsp;NULL&nbsp;!=&nbsp;mpPlaybin&nbsp;)</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;{</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gst_element_set_state(&nbsp;mpPlaybin,&nbsp;GST_STATE_PLAYING&nbsp;);</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;}</DIV>
<DIV>}</DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV>void&nbsp;SAL_CALL&nbsp;Player::stop(&nbsp;&nbsp;)</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;(uno::RuntimeException)</DIV>
<DIV>{</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;set&nbsp;the&nbsp;pipeline&nbsp;in&nbsp;PAUSED&nbsp;STATE</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;if(&nbsp;mpPlaybin&nbsp;)</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gst_element_set_state(&nbsp;mpPlaybin,&nbsp;GST_STATE_PAUSED&nbsp;);</DIV>
<DIV>}</DIV></DIV>
<DIV style="TEXT-INDENT: 2em">&nbsp;</DIV>
<DIV style="TEXT-INDENT: 2em">&nbsp;</DIV>
<DIV>
<DIV>bool&nbsp;Player::create(&nbsp;const&nbsp;::rtl::OUString&amp;&nbsp;rURL&nbsp;)</DIV>
<DIV>{</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;bool&nbsp;&nbsp;&nbsp;&nbsp;bRet&nbsp;=&nbsp;false;</DIV>
<DIV></DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;create&nbsp;all&nbsp;the&nbsp;elements&nbsp;and&nbsp;link&nbsp;them</DIV>
<DIV></DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;if(&nbsp;mbInitialized&nbsp;)</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;{</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GstBus&nbsp;*pBus;</DIV>
<DIV></DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mpPlaybin&nbsp;=&nbsp;gst_element_factory_make(&nbsp;"playbin",&nbsp;"player"&nbsp;);</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rtl::OString&nbsp;ascURL&nbsp;=&nbsp;OUStringToOString(&nbsp;rURL,&nbsp;RTL_TEXTENCODING_ASCII_US&nbsp;);</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;g_object_set(&nbsp;G_OBJECT(&nbsp;mpPlaybin&nbsp;),&nbsp;"uri",&nbsp;ascURL.getStr()&nbsp;,&nbsp;NULL&nbsp;);</DIV>
<DIV></DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pBus&nbsp;=&nbsp;gst_element_get_bus(&nbsp;mpPlaybin&nbsp;);</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gst_bus_add_watch(&nbsp;pBus,&nbsp;gst_pipeline_bus_callback,&nbsp;this&nbsp;);</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gst_bus_set_sync_handler(&nbsp;pBus,&nbsp;gst_pipeline_bus_sync_handler,&nbsp;this&nbsp;);</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;g_object_unref(&nbsp;pBus&nbsp;);</DIV>
<DIV></DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gst_element_set_state(&nbsp;mpPlaybin,&nbsp;GST_STATE_PAUSED&nbsp;);</DIV>
<DIV></DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bRet&nbsp;=&nbsp;true;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;}</DIV>
<DIV></DIV>
<DIV></DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;if(&nbsp;bRet&nbsp;)</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;maURL&nbsp;=&nbsp;rURL;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;else</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;maURL&nbsp;=&nbsp;::rtl::OUString();</DIV>
<DIV></DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;bRet;</DIV>
<DIV>}</DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV align=left><FONT face=Verdana color=#c0c0c0 size=2>2009-04-01 
</FONT></DIV><FONT face=Verdana size=2>
<HR style="WIDTH: 122px; HEIGHT: 2px" align=left SIZE=2>

<DIV><FONT face=Verdana color=#c0c0c0 size=2><SPAN>weikun</SPAN> 
</FONT></DIV></FONT></BODY></HTML>