mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
implement _destroy, and fix some bugs changing songs in the player doesn't work now, i don't know why yet
Original commit message from CVS: implement _destroy, and fix some bugs changing songs in the player doesn't work now, i don't know why yet
This commit is contained in:
parent
d3e33a16ac
commit
16074b7263
2 changed files with 30 additions and 29 deletions
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
||||||
* 2000 Wim Taymans <wtay@chello.be>
|
* 2000 Wim Taymans <wtay@chello.be>
|
||||||
*
|
*
|
||||||
* gstscheduler.c: Default scheduling code for most cases
|
* cothreads_compat.h: Compatibility macros between cothreads packages
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Library General Public
|
* modify it under the terms of the GNU Library General Public
|
||||||
|
@ -49,7 +49,7 @@ typedef cothread_state cothread;
|
||||||
new_thread = cothread_create (context); \
|
new_thread = cothread_create (context); \
|
||||||
if (new_thread) { \
|
if (new_thread) { \
|
||||||
cothread_setfunc (new_thread, (func), (argc), (argv)); \
|
cothread_setfunc (new_thread, (func), (argc), (argv)); \
|
||||||
}\
|
} \
|
||||||
}G_STMT_END
|
}G_STMT_END
|
||||||
|
|
||||||
#define do_cothread_setfunc(cothread, context, func, argc, argv) \
|
#define do_cothread_setfunc(cothread, context, func, argc, argv) \
|
||||||
|
@ -99,12 +99,13 @@ typedef cothread cothread_context;
|
||||||
#define do_cothread_switch(to) G_STMT_START{ \
|
#define do_cothread_switch(to) G_STMT_START{ \
|
||||||
cothread *from = cothread_self (); \
|
cothread *from = cothread_self (); \
|
||||||
if (from == (to)) { \
|
if (from == (to)) { \
|
||||||
GST_DEBUG (GST_CAT_COTHREAD_SWITCH, "trying to switch to the same cothread (%p), not allowed", \
|
GST_DEBUG (GST_CAT_COTHREAD_SWITCH, \
|
||||||
|
"trying to switch to the same cothread (%p), not allowed", \
|
||||||
(to)); \
|
(to)); \
|
||||||
g_warning ("trying to switch to the same cothread, not allowed"); \
|
g_warning ("trying to switch to the same cothread, not allowed"); \
|
||||||
} else { \
|
} else { \
|
||||||
GST_INFO (GST_CAT_COTHREAD_SWITCH, "switching from cothread %p to cothread %p", \
|
GST_INFO (GST_CAT_COTHREAD_SWITCH, \
|
||||||
from, (to)); \
|
"switching from cothread %p to cothread %p", from, (to)); \
|
||||||
cothread_switch (from, (to)); \
|
cothread_switch (from, (to)); \
|
||||||
GST_INFO (GST_CAT_COTHREAD_SWITCH, "we're in cothread %p now", from); \
|
GST_INFO (GST_CAT_COTHREAD_SWITCH, "we're in cothread %p now", from); \
|
||||||
} \
|
} \
|
||||||
|
|
|
@ -245,7 +245,7 @@ plugin_init (GModule *module, GstPlugin *plugin)
|
||||||
gst_plugin_set_longname (plugin, "A basic scheduler");
|
gst_plugin_set_longname (plugin, "A basic scheduler");
|
||||||
|
|
||||||
factory = gst_scheduler_factory_new (COTHREADS_NAME,
|
factory = gst_scheduler_factory_new (COTHREADS_NAME,
|
||||||
"A basic scheduler, it uses "COTHREADS_NAME" cothreads",
|
"A basic scheduler using "COTHREADS_NAME" cothreads",
|
||||||
gst_basic_scheduler_get_type());
|
gst_basic_scheduler_get_type());
|
||||||
|
|
||||||
if (factory != NULL) {
|
if (factory != NULL) {
|
||||||
|
|
Loading…
Reference in a new issue