[gst-devel] GstTask does not work after gst_task_pause()

Fabrice Triboix gstdbg at yahoo.com
Wed Dec 20 13:15:02 CET 2006


Hi,

I am developing a gstreamer plugin, and it uses a
GstTask.

At some point, I want to pause the task, so I call
gst_task_pause() from within the task loop function.
Then a bit later on, I want to resume the task, so I
call gst_task_start() from another task (the main one,
actually).

The problem is that my task is resumed only for one
loop. I put some debug prints before and after
pausing. I can see the task going to pause and being
resumed, and and returns immediately. Here is a code
sample of my task:

void mytaskloop(void* p)
{
  GST_DEBUG("Hi, there");

  // do some stuff

  if (I_want_to_pause) {
    GST_DEBUG("Before pause");
    gst_task_pause(thetask);
    GST_DEBUG("After pause");
    return;
  }

  // do some other stuff
}


Basically, I can see "Hi, there" repeated over and
over, until the "I_want_to_pause" flag turns up. Then
I can see "Before pause" and it stops until I call
gst_task_start(thetask). Then I can see "After pause",
and nothing else comes up, meaning that the
"mytaskloop" function is not called anymore...

Could anybody help me out?

Thank you very much!

  Fabrice


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the gstreamer-devel mailing list