<!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> 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 the sound
playing, the RedOffice must be killed and restart it.This 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 the bug doesn't exist 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"> </DIV>
<DIV>ps:</DIV>
<DIV> following is some code, attachment is the whole source
code:</DIV>
<DIV> </DIV>
<DIV>
<DIV>void SAL_CALL Player::start( )</DIV>
<DIV> throw (uno::RuntimeException)</DIV>
<DIV>{</DIV>
<DIV> //OSL_TRACE ("Player::start");</DIV>
<DIV></DIV>
<DIV> // set the pipeline state to READY and run the loop</DIV>
<DIV> if( mbInitialized && NULL != mpPlaybin )</DIV>
<DIV> {</DIV>
<DIV> gst_element_set_state( mpPlaybin, GST_STATE_PLAYING );</DIV>
<DIV> }</DIV>
<DIV>}</DIV></DIV>
<DIV> </DIV>
<DIV>
<DIV>void SAL_CALL Player::stop( )</DIV>
<DIV> throw (uno::RuntimeException)</DIV>
<DIV>{</DIV>
<DIV> // set the pipeline in PAUSED STATE</DIV>
<DIV> if( mpPlaybin )</DIV>
<DIV> gst_element_set_state( mpPlaybin, GST_STATE_PAUSED );</DIV>
<DIV>}</DIV></DIV>
<DIV style="TEXT-INDENT: 2em"> </DIV>
<DIV style="TEXT-INDENT: 2em"> </DIV>
<DIV>
<DIV>bool Player::create( const ::rtl::OUString& rURL )</DIV>
<DIV>{</DIV>
<DIV> bool bRet = false;</DIV>
<DIV></DIV>
<DIV> // create all the elements and link them</DIV>
<DIV></DIV>
<DIV> if( mbInitialized )</DIV>
<DIV> {</DIV>
<DIV> GstBus *pBus;</DIV>
<DIV></DIV>
<DIV> mpPlaybin = gst_element_factory_make( "playbin", "player" );</DIV>
<DIV> rtl::OString ascURL = OUStringToOString( rURL, RTL_TEXTENCODING_ASCII_US );</DIV>
<DIV> g_object_set( G_OBJECT( mpPlaybin ), "uri", ascURL.getStr() , NULL );</DIV>
<DIV></DIV>
<DIV> pBus = gst_element_get_bus( mpPlaybin );</DIV>
<DIV> gst_bus_add_watch( pBus, gst_pipeline_bus_callback, this );</DIV>
<DIV> gst_bus_set_sync_handler( pBus, gst_pipeline_bus_sync_handler, this );</DIV>
<DIV> g_object_unref( pBus );</DIV>
<DIV></DIV>
<DIV> gst_element_set_state( mpPlaybin, GST_STATE_PAUSED );</DIV>
<DIV></DIV>
<DIV> bRet = true;</DIV>
<DIV> }</DIV>
<DIV></DIV>
<DIV></DIV>
<DIV> if( bRet )</DIV>
<DIV> maURL = rURL;</DIV>
<DIV> else</DIV>
<DIV> maURL = ::rtl::OUString();</DIV>
<DIV></DIV>
<DIV> return bRet;</DIV>
<DIV>}</DIV></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=Verdana size=2></FONT> </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>