hi, all
I'm a beginner on gstreamer.
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.
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).
Is anybody know the reason? It puzzles me a long
time.
THX.
ps:
following is some code, attachment is the whole source
code:
void SAL_CALL Player::start( )
throw (uno::RuntimeException)
{
//OSL_TRACE ("Player::start");
// set the pipeline state to READY and run the loop
if( mbInitialized && NULL != mpPlaybin )
{
gst_element_set_state( mpPlaybin, GST_STATE_PLAYING );
}
}
void SAL_CALL Player::stop( )
throw (uno::RuntimeException)
{
// set the pipeline in PAUSED STATE
if( mpPlaybin )
gst_element_set_state( mpPlaybin, GST_STATE_PAUSED );
}
bool Player::create( const ::rtl::OUString& rURL )
{
bool bRet = false;
// create all the elements and link them
if( mbInitialized )
{
GstBus *pBus;
mpPlaybin = gst_element_factory_make( "playbin", "player" );
rtl::OString ascURL = OUStringToOString( rURL, RTL_TEXTENCODING_ASCII_US );
g_object_set( G_OBJECT( mpPlaybin ), "uri", ascURL.getStr() , NULL );
pBus = gst_element_get_bus( mpPlaybin );
gst_bus_add_watch( pBus, gst_pipeline_bus_callback, this );
gst_bus_set_sync_handler( pBus, gst_pipeline_bus_sync_handler, this );
g_object_unref( pBus );
gst_element_set_state( mpPlaybin, GST_STATE_PAUSED );
bRet = true;
}
if( bRet )
maURL = rURL;
else
maURL = ::rtl::OUString();
return bRet;
}
2009-04-01
weikun
------------------------------------------------------------------------------
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel