mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-07 16:05:47 +00:00
Fix task creation again.
Original commit message from CVS: Fix task creation again.
This commit is contained in:
parent
864a9acf69
commit
0a4f48bd55
3 changed files with 23 additions and 18 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2005-01-18 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* gst/elements/gstfilesrc.c: (gst_filesrc_getrange),
|
||||||
|
(gst_filesrc_open_file), (gst_filesrc_activate),
|
||||||
|
(filesrc_find_peek), (gst_filesrc_type_find):
|
||||||
|
Fix task creation again.
|
||||||
|
|
||||||
2005-01-18 Wim Taymans <wim@fluendo.com>
|
2005-01-18 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* docs/design/part-states.txt:
|
* docs/design/part-states.txt:
|
||||||
|
|
|
@ -929,18 +929,17 @@ gst_filesrc_activate (GstPad * pad, GstActivateMode mode)
|
||||||
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case GST_ACTIVATE_PUSH:
|
case GST_ACTIVATE_PUSH:
|
||||||
/* try to start the task */
|
/* if we have a scheduler we can start the task */
|
||||||
GST_STREAM_LOCK (pad);
|
if (GST_ELEMENT_SCHEDULER (filesrc)) {
|
||||||
filesrc->task = gst_element_create_task (GST_ELEMENT (filesrc),
|
GST_STREAM_LOCK (pad);
|
||||||
(GstTaskFunction) gst_filesrc_loop, filesrc);
|
GST_RPAD_TASK (pad) =
|
||||||
|
gst_scheduler_create_task (GST_ELEMENT_SCHEDULER (filesrc),
|
||||||
|
(GstTaskFunction) gst_filesrc_loop, pad);
|
||||||
|
|
||||||
if (filesrc->task) {
|
gst_task_start (GST_RPAD_TASK (pad));
|
||||||
gst_task_start (filesrc->task);
|
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
} else {
|
GST_STREAM_UNLOCK (pad);
|
||||||
result = FALSE;
|
|
||||||
}
|
}
|
||||||
GST_STREAM_UNLOCK (pad);
|
|
||||||
break;
|
break;
|
||||||
case GST_ACTIVATE_PULL:
|
case GST_ACTIVATE_PULL:
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
|
|
|
@ -929,18 +929,17 @@ gst_filesrc_activate (GstPad * pad, GstActivateMode mode)
|
||||||
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case GST_ACTIVATE_PUSH:
|
case GST_ACTIVATE_PUSH:
|
||||||
/* try to start the task */
|
/* if we have a scheduler we can start the task */
|
||||||
GST_STREAM_LOCK (pad);
|
if (GST_ELEMENT_SCHEDULER (filesrc)) {
|
||||||
filesrc->task = gst_element_create_task (GST_ELEMENT (filesrc),
|
GST_STREAM_LOCK (pad);
|
||||||
(GstTaskFunction) gst_filesrc_loop, filesrc);
|
GST_RPAD_TASK (pad) =
|
||||||
|
gst_scheduler_create_task (GST_ELEMENT_SCHEDULER (filesrc),
|
||||||
|
(GstTaskFunction) gst_filesrc_loop, pad);
|
||||||
|
|
||||||
if (filesrc->task) {
|
gst_task_start (GST_RPAD_TASK (pad));
|
||||||
gst_task_start (filesrc->task);
|
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
} else {
|
GST_STREAM_UNLOCK (pad);
|
||||||
result = FALSE;
|
|
||||||
}
|
}
|
||||||
GST_STREAM_UNLOCK (pad);
|
|
||||||
break;
|
break;
|
||||||
case GST_ACTIVATE_PULL:
|
case GST_ACTIVATE_PULL:
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
|
|
Loading…
Reference in a new issue