realvideodec element blocked when close_library (in transition of NULL to READY), why?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

realvideodec element blocked when close_library (in transition of NULL to READY), why?

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

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel