<!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.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#cce8cf>
<DIV><FONT size=2>hi all:</FONT></DIV>
<DIV><FONT size=2> I wrote my gst app which used realvideodec
element like this( ignored some non-significant code):</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>main()</FONT></DIV>
<DIV><FONT size=2>{</FONT></DIV>
<DIV><FONT size=2> ........</FONT></DIV>
<DIV><FONT size=2> pthread_creat(&my_thread, null,
create_pipe_func, null);</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> while(1)</FONT></DIV>
<DIV><FONT size=2> {</FONT></DIV>
<DIV><FONT size=2> c =
getchar();</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> if(c = 'b')</FONT></DIV>
<DIV><FONT size=2> {</FONT></DIV>
<DIV><FONT size=2>
sleep(10);</FONT></DIV>
<DIV><FONT size=2> }</FONT></DIV>
<DIV><FONT size=2> }</FONT></DIV>
<DIV><FONT size=2> </FONT></DIV>
<DIV><FONT size=2>}</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>create_pipe_func()</FONT></DIV>
<DIV><FONT size=2>{</FONT></DIV>
<DIV><FONT size=2> loop = g_main_loop_new(null,
false);</FONT></DIV>
<DIV><FONT size=2> pipeline = _create_pipeline();//make
all element and link them, set pad-added callback for delayed link to
realvideodec sink pad</FONT></DIV>
<DIV><FONT size=2> gst_element_set_state(pipeline,
GST_STATE_PLAYING);</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> g_mainn_loop_run(loop);</FONT></DIV>
<DIV><FONT size=2>}</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>my pipeline is like this:</FONT></DIV>
<DIV><FONT size=2>filesrc --> rmdemux -->
realvideodec --> fakesink</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>my problem is:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>I use the app to play rv4 file, and stream thread blocked on
close_library().</FONT></DIV>
<DIV><FONT size=2>gst log like this(sorry, I can not copy and paste for some
reason, so i type some significant logs):</FONT></DIV>
<DIV><FONT
size=2>------------------------------------------------------------------------------------------------</FONT></DIV>
<DIV><FONT
size=2>gstelement.c:2496:gst_element_set_state_func:<realvideodec0> final:
set state from NULL to READY</FONT></DIV>
<DIV><FONT size=2>gstrealvideodec.c:456:open_library:<realvideodec0>
Attempting to open shared library for real video version 2</FONT></DIV>
<DIV><FONT size=2>....</FONT></DIV>
<DIV><FONT size=2>gstrealvideodec.c:557:close_library:<realvideodec0>
closing library module</FONT></DIV>
<DIV>
<DIV><FONT size=2>gstrealvideodec.c:456:open_library:<realvideodec0>
Attempting to open shared library for real video version 3</FONT></DIV>
<DIV><FONT size=2>....</FONT></DIV>
<DIV><FONT size=2>gstrealvideodec.c:557:close_library:<realvideodec0>
closing library module</FONT></DIV>
<DIV><FONT
size=2>------------------------------------------------------------------------------------------------</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>no more things logged. I added some print to glib source code
and found that <STRONG>dlclose() blocked</STRONG>.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>if i input 'b' now , stream tread unblocked
and went on correctly.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>If my code like :</FONT></DIV>
<DIV>
<DIV><FONT size=2>main()</FONT></DIV>
<DIV><FONT size=2>{</FONT></DIV>
<DIV><FONT size=2> ........</FONT></DIV>
<DIV><FONT size=2> create_pipe_func();</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> </FONT><FONT size=2>
</FONT></DIV>
<DIV><FONT size=2>}</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>create_pipe_func()</FONT></DIV>
<DIV><FONT size=2>{</FONT></DIV>
<DIV><FONT size=2> loop = g_main_loop_new(null,
false);</FONT></DIV>
<DIV><FONT size=2> pipeline = _create_pipeline();//make
all element and link them, set pad-added callback for delayed link to
realvideodec sink pad</FONT></DIV>
<DIV><FONT size=2> gst_element_set_state(pipeline,
GST_STATE_PLAYING);</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> g_mainn_loop_run(loop);</FONT></DIV>
<DIV><FONT size=2>}</FONT></DIV></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>every thing is ok. </FONT></DIV>
<DIV><FONT size=2>why? </FONT></DIV></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV></BODY></HTML>