mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-16 19:25:18 +00:00
aye ladie, no more ugly // comments here, even if Taaz gets upset about it
Original commit message from CVS: aye ladie, no more ugly // comments here, even if Taaz gets upset about it
This commit is contained in:
parent
479d33e30d
commit
d6b9ae8b63
30 changed files with 443 additions and 430 deletions
|
@ -29,7 +29,7 @@
|
|||
#include <sys/mman.h>
|
||||
|
||||
/* we make too much noise for normal debugging... */
|
||||
//#define GST_DEBUG_FORCE_DISABLE
|
||||
/* #define GST_DEBUG_FORCE_DISABLE */
|
||||
#include "gst_private.h"
|
||||
|
||||
#include "cothreads.h"
|
||||
|
@ -67,7 +67,7 @@ cothread_init (void)
|
|||
{
|
||||
cothread_context *ctx = (cothread_context *)malloc(sizeof(cothread_context));
|
||||
|
||||
// we consider the initiating process to be cothread 0
|
||||
/* we consider the initiating process to be cothread 0 */
|
||||
ctx->nthreads = 1;
|
||||
ctx->current = 0;
|
||||
ctx->data = g_hash_table_new(g_str_hash, g_str_equal);
|
||||
|
@ -94,7 +94,7 @@ cothread_init (void)
|
|||
ctx->threads[0]->sp = (void *)CURRENT_STACK_FRAME;
|
||||
ctx->threads[0]->pc = 0;
|
||||
|
||||
// initialize the lock
|
||||
/* initialize the lock */
|
||||
#ifdef COTHREAD_ATOMIC
|
||||
atomic_set (&ctx->threads[0]->lock, 0);
|
||||
#else
|
||||
|
@ -124,15 +124,16 @@ cothread_create (cothread_context *ctx)
|
|||
return NULL;
|
||||
}
|
||||
GST_DEBUG (0,"pthread_self() %ld\n",pthread_self());
|
||||
//if (0) {
|
||||
if (pthread_self() == 0) { // FIXME uh, what does this test really do?
|
||||
/* if (0) { */
|
||||
if (pthread_self() == 0) { /* FIXME uh, what does this test really do? */
|
||||
s = (cothread_state *)malloc(COTHREAD_STACKSIZE);
|
||||
GST_DEBUG (0,"new stack (case 1) at %p\n",s);
|
||||
} else {
|
||||
void *sp = CURRENT_STACK_FRAME;
|
||||
// FIXME this may not be 64bit clean
|
||||
// could use casts to uintptr_t from inttypes.h
|
||||
// if only all platforms had inttypes.h
|
||||
/* FIXME this may not be 64bit clean
|
||||
* could use casts to uintptr_t from inttypes.h
|
||||
* if only all platforms had inttypes.h
|
||||
*/
|
||||
guchar *stack_end = (guchar *)((unsigned long)sp & ~(STACK_SIZE - 1));
|
||||
s = (cothread_state *)(stack_end + ((ctx->nthreads - 1) *
|
||||
COTHREAD_STACKSIZE));
|
||||
|
@ -149,10 +150,10 @@ cothread_create (cothread_context *ctx)
|
|||
s->threadnum = ctx->nthreads;
|
||||
s->flags = 0;
|
||||
s->sp = ((guchar *)s + COTHREAD_STACKSIZE);
|
||||
// is this needed anymore?
|
||||
/* is this needed anymore? */
|
||||
s->top_sp = s->sp;
|
||||
|
||||
// initialize the lock
|
||||
/* initialize the lock */
|
||||
#ifdef COTHREAD_ATOMIC
|
||||
atomic_set (s->lock, 0);
|
||||
#else
|
||||
|
@ -226,14 +227,15 @@ cothread_stub (void)
|
|||
GST_DEBUG_ENTER("");
|
||||
|
||||
thread->flags |= COTHREAD_STARTED;
|
||||
//#ifdef COTHREAD_ATOMIC
|
||||
// // do something here to lock
|
||||
//#else
|
||||
// g_mutex_lock(thread->lock);
|
||||
//#endif
|
||||
/* #ifdef COTHREAD_ATOMIC
|
||||
* do something here to lock
|
||||
* #else
|
||||
* g_mutex_lock(thread->lock);
|
||||
* #endif
|
||||
*/
|
||||
while (1) {
|
||||
thread->func(thread->argc,thread->argv);
|
||||
// we do this to avoid ever returning, we just switch to 0th thread
|
||||
/* we do this to avoid ever returning, we just switch to 0th thread */
|
||||
cothread_switch(cothread_main(ctx));
|
||||
}
|
||||
thread->flags &= ~COTHREAD_STARTED;
|
||||
|
@ -322,21 +324,21 @@ cothread_switch (cothread_state *thread)
|
|||
#endif
|
||||
if (current == thread) goto selfswitch;
|
||||
|
||||
// unlock the current thread, we're out of that context now
|
||||
/* unlock the current thread, we're out of that context now */
|
||||
#ifdef COTHREAD_ATOMIC
|
||||
// do something to unlock the cothread
|
||||
/* do something to unlock the cothread */
|
||||
#else
|
||||
g_mutex_unlock(current->lock);
|
||||
#endif
|
||||
|
||||
// lock the next cothread before we even switch to it
|
||||
/* lock the next cothread before we even switch to it */
|
||||
#ifdef COTHREAD_ATOMIC
|
||||
// do something to lock the cothread
|
||||
/* do something to lock the cothread */
|
||||
#else
|
||||
g_mutex_lock(thread->lock);
|
||||
#endif
|
||||
|
||||
// find the number of the thread to switch to
|
||||
/* find the number of the thread to switch to */
|
||||
GST_INFO (GST_CAT_COTHREAD_SWITCH,"switching from cothread #%d to cothread #%d",
|
||||
ctx->current,thread->threadnum);
|
||||
ctx->current = thread->threadnum;
|
||||
|
@ -359,12 +361,12 @@ cothread_switch (cothread_state *thread)
|
|||
/* restore stack pointer and other stuff of new cothread */
|
||||
if (thread->flags & COTHREAD_STARTED) {
|
||||
GST_DEBUG (0,"in thread \n");
|
||||
// switch to it
|
||||
/* switch to it */
|
||||
siglongjmp(thread->jmp,1);
|
||||
} else {
|
||||
GST_ARCH_SETUP_STACK(thread->sp);
|
||||
GST_ARCH_SET_SP(thread->sp);
|
||||
// start it
|
||||
/* start it */
|
||||
GST_ARCH_CALL(cothread_stub);
|
||||
GST_DEBUG (0,"exit thread \n");
|
||||
ctx->current = 0;
|
||||
|
@ -398,7 +400,7 @@ void
|
|||
cothread_lock (cothread_state *thread)
|
||||
{
|
||||
#ifdef COTHREAD_ATOMIC
|
||||
// do something to lock the cothread
|
||||
/* do something to lock the cothread */
|
||||
#else
|
||||
if (thread->lock)
|
||||
g_mutex_lock(thread->lock);
|
||||
|
@ -417,7 +419,7 @@ gboolean
|
|||
cothread_trylock (cothread_state *thread)
|
||||
{
|
||||
#ifdef COTHREAD_ATOMIC
|
||||
// do something to try to lock the cothread
|
||||
/* do something to try to lock the cothread */
|
||||
#else
|
||||
if (thread->lock)
|
||||
return g_mutex_trylock(thread->lock);
|
||||
|
@ -436,7 +438,7 @@ void
|
|||
cothread_unlock (cothread_state *thread)
|
||||
{
|
||||
#ifdef COTHREAD_ATOMIC
|
||||
// do something to unlock the cothread
|
||||
/* do something to unlock the cothread */
|
||||
#else
|
||||
if (thread->lock)
|
||||
g_mutex_unlock(thread->lock);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "gobject2gtk.h"
|
||||
|
||||
|
||||
// list functions not in glib 1.2
|
||||
/* list functions not in glib 1.2 */
|
||||
GList *
|
||||
g_list_delete_link (GList *list, GList *llink)
|
||||
{
|
||||
|
@ -23,7 +23,7 @@ g_slist_delete_link (GSList *list, GSList *llink)
|
|||
return temp;
|
||||
}
|
||||
|
||||
// string helper functions not in glib 1.2
|
||||
/* string helper functions not in glib 1.2 */
|
||||
|
||||
gchar*
|
||||
g_strcanon (gchar *string,
|
||||
|
@ -44,7 +44,7 @@ g_strcanon (gchar *string,
|
|||
return string;
|
||||
}
|
||||
|
||||
// GObject dummy implementation
|
||||
/* GObject dummy implementation */
|
||||
static void
|
||||
g_object_set_arg(GtkObject *object, GtkArg *arg, guint id)
|
||||
{
|
||||
|
@ -133,7 +133,7 @@ g2g_object_class_install_property(GObjectClass *oclass,guint property_id,GParamS
|
|||
gchar *arg_fullname;
|
||||
|
||||
arg_fullname = g_strdup_printf("%s::%s",gtk_type_name(oclass->type),pspec->name);
|
||||
//fprintf(stderr,"installing arg \"%s\" into class \"%s\"\n",arg_fullname,"");
|
||||
/* fprintf(stderr,"installing arg \"%s\" into class \"%s\"\n",arg_fullname,""); */
|
||||
gtk_object_add_arg_type(arg_fullname,pspec->value_type,pspec->flags,property_id);
|
||||
g_free(pspec);
|
||||
}
|
||||
|
@ -144,9 +144,9 @@ g2g_object_class_find_property(GObjectClass *class, const gchar *name)
|
|||
GtkArgInfo *info;
|
||||
GParamSpec *spec;
|
||||
|
||||
//fprintf(stderr,"class name is %s\n",gtk_type_name(class->type));
|
||||
/* fprintf(stderr,"class name is %s\n",gtk_type_name(class->type)); */
|
||||
|
||||
// the return value NULL if no error
|
||||
/* the return value NULL if no error */
|
||||
if (gtk_object_arg_get_info(class->type,name,&info) != NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ g2g_object_class_list_properties(GObjectClass *oclass,guint *n_properties) {
|
|||
int i;
|
||||
|
||||
args = gtk_object_query_args (type, &flags, &num_args);
|
||||
// FIXME: args and flags need to be freed.
|
||||
/* FIXME: args and flags need to be freed. */
|
||||
|
||||
params = g_new0(GParamSpec *,num_args);
|
||||
for (i=0;i<num_args;i++) {
|
||||
|
@ -302,7 +302,7 @@ g2g_signal_new (const gchar *name,
|
|||
GtkType object_type,
|
||||
GtkSignalRunType signal_flags,
|
||||
guint function_offset,
|
||||
gpointer accumulator, // GSignalAccumulator
|
||||
gpointer accumulator, /* GSignalAccumulator */
|
||||
gpointer accu_data,
|
||||
GtkSignalMarshaller marshaller,
|
||||
GType return_val,
|
||||
|
@ -317,7 +317,7 @@ g2g_signal_new (const gchar *name,
|
|||
if (strcmp (name, "destroy") == 0)
|
||||
name = "g2gdestroy";
|
||||
|
||||
#define MAX_SIGNAL_PARAMS (31) // from gtksignal.c
|
||||
#define MAX_SIGNAL_PARAMS (31) /* from gtksignal.c */
|
||||
g_return_val_if_fail (nparams < MAX_SIGNAL_PARAMS, 0);
|
||||
|
||||
if (nparams > 0)
|
||||
|
@ -345,7 +345,7 @@ g2g_signal_new (const gchar *name,
|
|||
|
||||
g_free (params);
|
||||
|
||||
// now register it.
|
||||
/* now register it. */
|
||||
gtk_object_class_add_signals(gtk_type_class(object_type), &signal_id, 1);
|
||||
|
||||
return signal_id;
|
||||
|
|
10
gst/gst.c
10
gst/gst.c
|
@ -95,7 +95,7 @@ gst_init (int *argc, char **argv[])
|
|||
#endif
|
||||
|
||||
if (!gst_init_check (argc,argv)) {
|
||||
exit (0); // FIXME!
|
||||
exit (0); /* FIXME! */
|
||||
}
|
||||
|
||||
llf = G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_ERROR | G_LOG_FLAG_FATAL;
|
||||
|
@ -146,7 +146,7 @@ gst_init (int *argc, char **argv[])
|
|||
gst_trace = gst_trace_new ("gst.trace",1024);
|
||||
gst_trace_set_default (gst_trace);
|
||||
}
|
||||
#endif // GST_DISABLE_TRACE
|
||||
#endif /* GST_DISABLE_TRACE */
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -219,7 +219,7 @@ gst_init_check (int *argc,
|
|||
if (!strncmp ("--gst-info-mask=", (*argv)[i], 16)) {
|
||||
guint32 val;
|
||||
|
||||
// handle either 0xHEX or dec
|
||||
/* handle either 0xHEX or dec */
|
||||
if (*((*argv)[i]+17) == 'x') {
|
||||
sscanf ((*argv)[i]+18, "%08x", &val);
|
||||
} else {
|
||||
|
@ -233,7 +233,7 @@ gst_init_check (int *argc,
|
|||
else if (!strncmp ("--gst-debug-mask=", (*argv)[i], 17)) {
|
||||
guint32 val;
|
||||
|
||||
// handle either 0xHEX or dec
|
||||
/* handle either 0xHEX or dec */
|
||||
if (*((*argv)[i]+18) == 'x') {
|
||||
sscanf ((*argv)[i]+19, "%08x", &val);
|
||||
} else {
|
||||
|
@ -247,7 +247,7 @@ gst_init_check (int *argc,
|
|||
else if (!strncmp ("--gst-mask=", (*argv)[i], 11)) {
|
||||
guint32 val;
|
||||
|
||||
// handle either 0xHEX or dec
|
||||
/* handle either 0xHEX or dec */
|
||||
if (*((*argv)[i]+12) == 'x') {
|
||||
sscanf ((*argv)[i]+13, "%08x", &val);
|
||||
} else {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//#define GST_DEBUG_ENABLED
|
||||
/* #define GST_DEBUG_ENABLED */
|
||||
|
||||
#include <gst/gstconfig.h>
|
||||
|
||||
|
@ -177,7 +177,7 @@ static void gst_autoplugfactory_restore_thyself (GstObject *object, xmlNodePt
|
|||
#endif
|
||||
|
||||
static GstPluginFeatureClass *factory_parent_class = NULL;
|
||||
//static guint gst_autoplugfactory_signals[LAST_SIGNAL] = { 0 };
|
||||
/* static guint gst_autoplugfactory_signals[LAST_SIGNAL] = { 0 }; */
|
||||
|
||||
GType
|
||||
gst_autoplugfactory_get_type (void)
|
||||
|
@ -274,7 +274,7 @@ gst_autoplugfactory_destroy (GstAutoplugFactory *factory)
|
|||
|
||||
_gst_autoplugfactories = g_list_remove (_gst_autoplugfactories, factory);
|
||||
|
||||
// we don't free the struct bacause someone might have a handle to it..
|
||||
/* we don't free the struct bacause someone might have a handle to it.. */
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
58
gst/gstbin.c
58
gst/gstbin.c
|
@ -20,7 +20,7 @@
|
|||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//#define GST_DEBUG_ENABLED
|
||||
/* #define GST_DEBUG_ENABLED */
|
||||
#include "gst_private.h"
|
||||
|
||||
#include "gstbin.h"
|
||||
|
@ -130,7 +130,7 @@ gst_bin_class_init (GstBinClass *klass)
|
|||
static void
|
||||
gst_bin_init (GstBin *bin)
|
||||
{
|
||||
// in general, we prefer to use cothreads for most things
|
||||
/* in general, we prefer to use cothreads for most things */
|
||||
GST_FLAG_SET (bin, GST_BIN_FLAG_PREFER_COTHREADS);
|
||||
|
||||
bin->numchildren = 0;
|
||||
|
@ -174,7 +174,7 @@ gst_bin_set_element_sched (GstElement *element,GstScheduler *sched)
|
|||
GST_INFO (GST_CAT_SCHEDULING, "setting element \"%s\" sched to %p",GST_ELEMENT_NAME(element),
|
||||
sched);
|
||||
|
||||
// if it's actually a Bin
|
||||
/* if it's actually a Bin */
|
||||
if (GST_IS_BIN(element)) {
|
||||
if (GST_FLAG_IS_SET (element, GST_BIN_FLAG_MANAGER)) {
|
||||
GST_INFO_ELEMENT (GST_CAT_PARENTAGE, element, "child is already a manager, not resetting");
|
||||
|
@ -184,7 +184,7 @@ gst_bin_set_element_sched (GstElement *element,GstScheduler *sched)
|
|||
GST_INFO_ELEMENT (GST_CAT_PARENTAGE, element, "setting children's schedule to parent's");
|
||||
gst_scheduler_add_element (sched, element);
|
||||
|
||||
// set the children's schedule
|
||||
/* set the children's schedule */
|
||||
children = GST_BIN(element)->children;
|
||||
while (children) {
|
||||
child = GST_ELEMENT (children->data);
|
||||
|
@ -193,7 +193,7 @@ gst_bin_set_element_sched (GstElement *element,GstScheduler *sched)
|
|||
gst_bin_set_element_sched (child, sched);
|
||||
}
|
||||
|
||||
// otherwise, if it's just a regular old element
|
||||
/* otherwise, if it's just a regular old element */
|
||||
} else {
|
||||
gst_scheduler_add_element (sched, element);
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ gst_bin_unset_element_sched (GstElement *element)
|
|||
GST_INFO (GST_CAT_SCHEDULING, "removing element \"%s\" from it sched %p",
|
||||
GST_ELEMENT_NAME(element),GST_ELEMENT_SCHED(element));
|
||||
|
||||
// if it's actually a Bin
|
||||
/* if it's actually a Bin */
|
||||
if (GST_IS_BIN(element)) {
|
||||
|
||||
if (GST_FLAG_IS_SET(element,GST_BIN_FLAG_MANAGER)) {
|
||||
|
@ -220,11 +220,11 @@ gst_bin_unset_element_sched (GstElement *element)
|
|||
return;
|
||||
}
|
||||
|
||||
// FIXME this check should be irrelevant
|
||||
/* FIXME this check should be irrelevant */
|
||||
if (GST_ELEMENT_SCHED (element))
|
||||
gst_scheduler_remove_element (GST_ELEMENT_SCHED(element), element);
|
||||
|
||||
// for each child, remove them from their schedule
|
||||
/* for each child, remove them from their schedule */
|
||||
children = GST_BIN(element)->children;
|
||||
while (children) {
|
||||
child = GST_ELEMENT (children->data);
|
||||
|
@ -233,9 +233,9 @@ gst_bin_unset_element_sched (GstElement *element)
|
|||
gst_bin_unset_element_sched (child);
|
||||
}
|
||||
|
||||
// otherwise, if it's just a regular old element
|
||||
/* otherwise, if it's just a regular old element */
|
||||
} else {
|
||||
// FIXME this check should be irrelevant
|
||||
/* FIXME this check should be irrelevant */
|
||||
if (GST_ELEMENT_SCHED (element))
|
||||
gst_scheduler_remove_element (GST_ELEMENT_SCHED(element), element);
|
||||
}
|
||||
|
@ -265,30 +265,30 @@ gst_bin_add (GstBin *bin,
|
|||
GST_DEBUG (GST_CAT_PARENTAGE, "adding element \"%s\" to bin \"%s\"\n",
|
||||
GST_ELEMENT_NAME (element), GST_ELEMENT_NAME (bin));
|
||||
|
||||
// must be not be in PLAYING state in order to modify bin
|
||||
/* must be not be in PLAYING state in order to modify bin */
|
||||
g_return_if_fail (GST_STATE (bin) != GST_STATE_PLAYING);
|
||||
|
||||
// the element must not already have a parent
|
||||
/* the element must not already have a parent */
|
||||
g_return_if_fail (GST_ELEMENT_PARENT (element) == NULL);
|
||||
|
||||
// then check to see if the element's name is already taken in the bin
|
||||
/* then check to see if the element's name is already taken in the bin */
|
||||
g_return_if_fail (gst_object_check_uniqueness (bin->children, GST_ELEMENT_NAME (element)) == TRUE);
|
||||
|
||||
// set the element's parent and add the element to the bin's list of children
|
||||
/* set the element's parent and add the element to the bin's list of children */
|
||||
gst_object_set_parent (GST_OBJECT (element), GST_OBJECT (bin));
|
||||
g_signal_connect_swapped (G_OBJECT (element), "state_change", gst_bin_child_state_change, G_OBJECT (bin));
|
||||
|
||||
bin->children = g_list_append (bin->children, element);
|
||||
bin->numchildren++;
|
||||
|
||||
// bump our internal state counter
|
||||
/* bump our internal state counter */
|
||||
state = GST_STATE (element);
|
||||
while (state>>=1) state_idx++;
|
||||
bin->child_states[state_idx]++;
|
||||
|
||||
///// now we have to deal with manager stuff
|
||||
// we can only do this if there's a scheduler:
|
||||
// if we're not a manager, and aren't attached to anything, we have no sched (yet)
|
||||
/* now we have to deal with manager stuff */
|
||||
/* we can only do this if there's a scheduler: */
|
||||
/* if we're not a manager, and aren't attached to anything, we have no sched (yet) */
|
||||
if (GST_IS_BIN(element) && GST_FLAG_IS_SET (element, GST_BIN_FLAG_MANAGER)) {
|
||||
GST_INFO_ELEMENT (GST_CAT_PARENTAGE, element, "child is a manager");
|
||||
}
|
||||
|
@ -321,27 +321,27 @@ gst_bin_remove (GstBin *bin,
|
|||
g_return_if_fail (GST_IS_ELEMENT (element));
|
||||
g_return_if_fail (bin->children != NULL);
|
||||
|
||||
// must not be in PLAYING state in order to modify bin
|
||||
/* must not be in PLAYING state in order to modify bin */
|
||||
g_return_if_fail (GST_STATE (bin) != GST_STATE_PLAYING);
|
||||
|
||||
// the element must have its parent set to the current bin
|
||||
/* the element must have its parent set to the current bin */
|
||||
g_return_if_fail (GST_ELEMENT_PARENT(element) == (GstObject *)bin);
|
||||
|
||||
// the element must be in the bin's list of children
|
||||
/* the element must be in the bin's list of children */
|
||||
if (g_list_find(bin->children, element) == NULL) {
|
||||
// FIXME this should be a warning!!!
|
||||
/* FIXME this should be a warning!!! */
|
||||
GST_ERROR_OBJECT(bin,element,"no such element in bin");
|
||||
return;
|
||||
}
|
||||
|
||||
// remove this element from the list of managed elements
|
||||
/* remove this element from the list of managed elements */
|
||||
gst_bin_unset_element_sched (element);
|
||||
|
||||
// now remove the element from the list of elements
|
||||
/* now remove the element from the list of elements */
|
||||
bin->children = g_list_remove (bin->children, element);
|
||||
bin->numchildren--;
|
||||
|
||||
// bump our internal state counter
|
||||
/* bump our internal state counter */
|
||||
state = GST_STATE (element);
|
||||
while (state>>=1) state_idx++;
|
||||
bin->child_states[state_idx]--;
|
||||
|
@ -525,8 +525,8 @@ gst_bin_dispose (GObject *object)
|
|||
orig = children = g_list_copy (bin->children);
|
||||
while (children) {
|
||||
child = GST_ELEMENT (children->data);
|
||||
//gst_object_unref (GST_OBJECT (child));
|
||||
//gst_object_unparent (GST_OBJECT (child));
|
||||
/* gst_object_unref (GST_OBJECT (child)); */
|
||||
/* gst_object_unparent (GST_OBJECT (child)); */
|
||||
gst_bin_remove (bin, child);
|
||||
children = g_list_next (children);
|
||||
}
|
||||
|
@ -688,7 +688,7 @@ gst_bin_restore_thyself (GstObject *object,
|
|||
static gboolean
|
||||
gst_bin_iterate_func (GstBin *bin)
|
||||
{
|
||||
// only iterate if this is the manager bin
|
||||
/* only iterate if this is the manager bin */
|
||||
if (GST_ELEMENT_SCHED(bin)->parent == GST_ELEMENT (bin)) {
|
||||
return gst_scheduler_iterate (GST_ELEMENT_SCHED(bin));
|
||||
} else {
|
||||
|
@ -725,7 +725,7 @@ gst_bin_iterate (GstBin *bin)
|
|||
if (!running) {
|
||||
if (GST_STATE (bin) == GST_STATE_PLAYING && GST_STATE_PENDING (bin) == GST_STATE_VOID_PENDING) {
|
||||
GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, bin, "waiting for child shutdown after useless iteration\n");
|
||||
//gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PAUSED);
|
||||
/* gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PAUSED); */
|
||||
gst_element_wait_state_change (GST_ELEMENT (bin));
|
||||
GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, bin, "child shutdown\n");
|
||||
}
|
||||
|
|
|
@ -37,19 +37,19 @@ _gst_buffer_initialize (void)
|
|||
{
|
||||
int buffersize = sizeof(GstBuffer);
|
||||
static const GTypeInfo buffer_info = {
|
||||
0, // sizeof(class),
|
||||
0, /* sizeof(class), */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
0, // sizeof(object),
|
||||
0, /* sizeof(object), */
|
||||
0,
|
||||
NULL,
|
||||
NULL,
|
||||
};
|
||||
|
||||
// round up to the nearest 32 bytes for cache-line and other efficiencies
|
||||
/* round up to the nearest 32 bytes for cache-line and other efficiencies */
|
||||
buffersize = (((buffersize-1) / 32) + 1) * 32;
|
||||
|
||||
_gst_buffer_chunk = g_mem_chunk_new ("GstBuffer", buffersize,
|
||||
|
@ -165,29 +165,29 @@ gst_buffer_create_sub (GstBuffer *parent,
|
|||
buffer->refcount = 1;
|
||||
#endif
|
||||
|
||||
// copy flags and type from parent, for lack of better
|
||||
/* copy flags and type from parent, for lack of better */
|
||||
buffer->flags = parent->flags;
|
||||
|
||||
// set the data pointer, size, offset, and maxsize
|
||||
/* set the data pointer, size, offset, and maxsize */
|
||||
buffer->data = parent->data + offset;
|
||||
buffer->size = size;
|
||||
buffer->maxsize = parent->size - offset;
|
||||
|
||||
// deal with bogus/unknown offsets
|
||||
/* deal with bogus/unknown offsets */
|
||||
if (parent->offset != (guint32)-1)
|
||||
buffer->offset = parent->offset + offset;
|
||||
else
|
||||
buffer->offset = (guint32)-1;
|
||||
|
||||
// again, for lack of better, copy parent's timestamp
|
||||
/* again, for lack of better, copy parent's timestamp */
|
||||
buffer->timestamp = parent->timestamp;
|
||||
buffer->maxage = parent->maxage;
|
||||
|
||||
// if the parent buffer is a subbuffer itself, use its parent, a real buffer
|
||||
/* if the parent buffer is a subbuffer itself, use its parent, a real buffer */
|
||||
if (parent->parent != NULL)
|
||||
parent = parent->parent;
|
||||
|
||||
// set parentage and reference the parent
|
||||
/* set parentage and reference the parent */
|
||||
buffer->parent = parent;
|
||||
gst_buffer_ref (parent);
|
||||
|
||||
|
@ -197,7 +197,7 @@ gst_buffer_create_sub (GstBuffer *parent,
|
|||
}
|
||||
|
||||
|
||||
// FIXME FIXME: how does this overlap with the newly-added gst_buffer_span() ???
|
||||
/* FIXME FIXME: how does this overlap with the newly-added gst_buffer_span() ??? */
|
||||
/**
|
||||
* gst_buffer_append:
|
||||
* @buffer: a buffer
|
||||
|
@ -224,17 +224,17 @@ gst_buffer_append (GstBuffer *buffer,
|
|||
GST_INFO (GST_CAT_BUFFER,"appending buffers %p and %p",buffer,append);
|
||||
|
||||
GST_BUFFER_LOCK (buffer);
|
||||
// the buffer is not used by anyone else
|
||||
/* the buffer is not used by anyone else */
|
||||
if (GST_BUFFER_REFCOUNT (buffer) == 1 && buffer->parent == NULL
|
||||
&& !GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_DONTFREE)) {
|
||||
// save the old size
|
||||
/* save the old size */
|
||||
size = buffer->size;
|
||||
buffer->size += append->size;
|
||||
buffer->data = g_realloc (buffer->data, buffer->size);
|
||||
memcpy(buffer->data + size, append->data, append->size);
|
||||
GST_BUFFER_UNLOCK (buffer);
|
||||
}
|
||||
// the buffer is used, create a new one
|
||||
/* the buffer is used, create a new one */
|
||||
else {
|
||||
newbuf = gst_buffer_new ();
|
||||
newbuf->size = buffer->size+append->size;
|
||||
|
@ -265,11 +265,11 @@ gst_buffer_destroy (GstBuffer *buffer)
|
|||
(buffer->parent?"sub":""),
|
||||
buffer);
|
||||
|
||||
// free the data only if there is some, DONTFREE isn't set, and not sub
|
||||
/* free the data only if there is some, DONTFREE isn't set, and not sub */
|
||||
if (GST_BUFFER_DATA (buffer) &&
|
||||
!GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_DONTFREE) &&
|
||||
(buffer->parent == NULL)) {
|
||||
// if there's a free function, use it
|
||||
/* if there's a free function, use it */
|
||||
if (buffer->free != NULL) {
|
||||
(buffer->free)(buffer);
|
||||
} else {
|
||||
|
@ -277,19 +277,19 @@ gst_buffer_destroy (GstBuffer *buffer)
|
|||
}
|
||||
}
|
||||
|
||||
// unreference the parent if there is one
|
||||
/* unreference the parent if there is one */
|
||||
if (buffer->parent != NULL)
|
||||
gst_buffer_unref (buffer->parent);
|
||||
|
||||
g_mutex_free (buffer->lock);
|
||||
//g_print("freed mutex\n");
|
||||
/* g_print("freed mutex\n"); */
|
||||
|
||||
#ifdef GST_DEBUG_ENABLED
|
||||
// make it hard to reuse by mistake
|
||||
/* make it hard to reuse by mistake */
|
||||
memset (buffer, 0, sizeof (GstBuffer));
|
||||
#endif
|
||||
|
||||
// remove it entirely from memory
|
||||
/* remove it entirely from memory */
|
||||
g_mutex_lock (_gst_buffer_chunk_lock);
|
||||
g_mem_chunk_free (_gst_buffer_chunk,buffer);
|
||||
g_mutex_unlock (_gst_buffer_chunk_lock);
|
||||
|
@ -389,27 +389,27 @@ gst_buffer_copy (GstBuffer *buffer)
|
|||
|
||||
g_return_val_if_fail (GST_BUFFER_REFCOUNT(buffer) > 0, NULL);
|
||||
|
||||
// if a copy function exists, use it, else copy the bytes
|
||||
/* if a copy function exists, use it, else copy the bytes */
|
||||
if (buffer->copy != NULL) {
|
||||
newbuf = (buffer->copy)(buffer);
|
||||
} else {
|
||||
// allocate a new buffer
|
||||
/* allocate a new buffer */
|
||||
newbuf = gst_buffer_new();
|
||||
|
||||
// copy the absolute size
|
||||
/* copy the absolute size */
|
||||
newbuf->size = buffer->size;
|
||||
// allocate space for the copy
|
||||
/* allocate space for the copy */
|
||||
newbuf->data = (guchar *)g_malloc (buffer->size);
|
||||
// copy the data straight across
|
||||
/* copy the data straight across */
|
||||
memcpy(newbuf->data,buffer->data,buffer->size);
|
||||
// the new maxsize is the same as the size, since we just malloc'd it
|
||||
/* the new maxsize is the same as the size, since we just malloc'd it */
|
||||
newbuf->maxsize = newbuf->size;
|
||||
}
|
||||
newbuf->offset = buffer->offset;
|
||||
newbuf->timestamp = buffer->timestamp;
|
||||
newbuf->maxage = buffer->maxage;
|
||||
|
||||
// since we just created a new buffer, so we have no ties to old stuff
|
||||
/* since we just created a new buffer, so we have no ties to old stuff */
|
||||
newbuf->parent = NULL;
|
||||
newbuf->pool = NULL;
|
||||
|
||||
|
@ -455,7 +455,7 @@ gst_buffer_is_span_fast (GstBuffer *buf1, GstBuffer *buf2)
|
|||
*
|
||||
* Returns: new buffer that spans the two source buffers
|
||||
*/
|
||||
// FIXME need to think about CoW and such...
|
||||
/* FIXME need to think about CoW and such... */
|
||||
GstBuffer *
|
||||
gst_buffer_span (GstBuffer *buf1, guint32 offset, GstBuffer *buf2, guint32 len)
|
||||
{
|
||||
|
@ -464,31 +464,31 @@ gst_buffer_span (GstBuffer *buf1, guint32 offset, GstBuffer *buf2, guint32 len)
|
|||
g_return_val_if_fail (GST_BUFFER_REFCOUNT(buf1) > 0, NULL);
|
||||
g_return_val_if_fail (GST_BUFFER_REFCOUNT(buf2) > 0, NULL);
|
||||
|
||||
// make sure buf1 has a lower address than buf2
|
||||
/* make sure buf1 has a lower address than buf2 */
|
||||
if (buf1->data > buf2->data) {
|
||||
GstBuffer *tmp = buf1;
|
||||
//g_print ("swapping buffers\n");
|
||||
/* g_print ("swapping buffers\n"); */
|
||||
buf1 = buf2;
|
||||
buf2 = tmp;
|
||||
}
|
||||
|
||||
// if the two buffers have the same parent and are adjacent
|
||||
/* if the two buffers have the same parent and are adjacent */
|
||||
if (gst_buffer_is_span_fast(buf1,buf2)) {
|
||||
// we simply create a subbuffer of the common parent
|
||||
/* we simply create a subbuffer of the common parent */
|
||||
newbuf = gst_buffer_create_sub (buf1->parent, buf1->data - (buf1->parent->data) + offset, len);
|
||||
}
|
||||
else {
|
||||
//g_print ("slow path taken in buffer_span\n");
|
||||
// otherwise we simply have to brute-force copy the buffers
|
||||
/* g_print ("slow path taken in buffer_span\n"); */
|
||||
/* otherwise we simply have to brute-force copy the buffers */
|
||||
newbuf = gst_buffer_new ();
|
||||
|
||||
// put in new size
|
||||
/* put in new size */
|
||||
newbuf->size = len;
|
||||
// allocate space for the copy
|
||||
/* allocate space for the copy */
|
||||
newbuf->data = (guchar *)g_malloc(len);
|
||||
// copy the first buffer's data across
|
||||
/* copy the first buffer's data across */
|
||||
memcpy(newbuf->data, buf1->data + offset, buf1->size - offset);
|
||||
// copy the second buffer's data across
|
||||
/* copy the second buffer's data across */
|
||||
memcpy(newbuf->data + (buf1->size - offset), buf2->data, len - (buf1->size - offset));
|
||||
|
||||
if (newbuf->offset != (guint32)-1)
|
||||
|
@ -521,7 +521,7 @@ GstBuffer *
|
|||
gst_buffer_merge (GstBuffer *buf1, GstBuffer *buf2)
|
||||
{
|
||||
GstBuffer *result;
|
||||
// we're just a specific case of the more general gst_buffer_span()
|
||||
/* we're just a specific case of the more general gst_buffer_span() */
|
||||
result = gst_buffer_span (buf1, 0, buf2, buf1->size + buf2->size);
|
||||
|
||||
GST_BUFFER_TIMESTAMP (result) = GST_BUFFER_TIMESTAMP (buf1);
|
||||
|
|
|
@ -273,9 +273,9 @@ gst_buffer_pool_destroy (GstBufferPool *pool)
|
|||
g_free(pool);
|
||||
}
|
||||
|
||||
//
|
||||
// This is so we don't get messed up by GST_BUFFER_WHERE.
|
||||
//
|
||||
/*
|
||||
* This is so we don't get messed up by GST_BUFFER_WHERE.
|
||||
*/
|
||||
static GstBuffer *
|
||||
_pool_gst_buffer_copy (GstBuffer *buffer)
|
||||
{ return gst_buffer_copy (buffer); }
|
||||
|
@ -300,11 +300,11 @@ gst_buffer_pool_get_default (guint buffer_size, guint pool_size)
|
|||
guint real_buffer_size;
|
||||
GstBufferPoolDefault *def;
|
||||
|
||||
// round up to the nearest 32 bytes for cache-line and other efficiencies
|
||||
/* round up to the nearest 32 bytes for cache-line and other efficiencies */
|
||||
real_buffer_size = (((buffer_size-1) / 32) + 1) * 32;
|
||||
|
||||
// check for an existing GstBufferPool with the same real_buffer_size
|
||||
// (we won't worry about the pool_size)
|
||||
/* check for an existing GstBufferPool with the same real_buffer_size */
|
||||
/* (we won't worry about the pool_size) */
|
||||
g_mutex_lock (_default_pool_lock);
|
||||
pool = (GstBufferPool*)g_hash_table_lookup(_default_pools,GINT_TO_POINTER(real_buffer_size));
|
||||
g_mutex_unlock (_default_pool_lock);
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//#define GST_DEBUG_ENABLED
|
||||
/* #define GST_DEBUG_ENABLED */
|
||||
#include "gst_private.h"
|
||||
|
||||
#include "gstcaps.h"
|
||||
|
@ -496,7 +496,7 @@ gst_caps_check_compatibility_func (GstCaps *fromcaps, GstCaps *tocaps)
|
|||
}
|
||||
}
|
||||
else {
|
||||
// assume it accepts everything
|
||||
/* assume it accepts everything */
|
||||
GST_DEBUG (GST_CAT_CAPS,"no caps\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include <sys/time.h>
|
||||
|
||||
//#define GST_DEBUG_ENABLED
|
||||
/* #define GST_DEBUG_ENABLED */
|
||||
#include "gst_private.h"
|
||||
|
||||
#include "gstelement.h"
|
||||
|
@ -180,7 +180,7 @@ gst_clock_wait (GstClock *clock, GstClockTime time, GstObject *obj)
|
|||
now = tfnow.tv_sec*1000000LL+tfnow.tv_usec - clock->start_time;
|
||||
|
||||
diff = GST_CLOCK_DIFF (time, now);
|
||||
// if we are not behind wait a bit
|
||||
/* if we are not behind wait a bit */
|
||||
GST_DEBUG (GST_CAT_CLOCK,"gst_clock: %s waiting for time %08llu %08llu %08lld\n",
|
||||
GST_OBJECT_NAME (obj), time, now, diff);
|
||||
|
||||
|
@ -188,7 +188,7 @@ gst_clock_wait (GstClock *clock, GstClockTime time, GstObject *obj)
|
|||
if (diff > 10000 ) {
|
||||
tfnow.tv_usec = (diff % 1000000);
|
||||
tfnow.tv_sec = diff / 1000000;
|
||||
// FIXME, this piece of code does not work with egcs optimisations on, had to use the following line
|
||||
/* FIXME, this piece of code does not work with egcs optimisations on, had to use the following line */
|
||||
if (!tfnow.tv_sec) {
|
||||
select(0, NULL, NULL, NULL, &tfnow);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//#define GST_DEBUG_ENABLED
|
||||
/* #define GST_DEBUG_ENABLED */
|
||||
#include <glib.h>
|
||||
#include <stdarg.h>
|
||||
#include "gst_private.h"
|
||||
|
@ -277,10 +277,10 @@ gst_element_add_pad (GstElement *element, GstPad *pad)
|
|||
g_return_if_fail (pad != NULL);
|
||||
g_return_if_fail (GST_IS_PAD (pad));
|
||||
|
||||
// first check to make sure the pad's parent is already set
|
||||
/* first check to make sure the pad's parent is already set */
|
||||
g_return_if_fail (GST_PAD_PARENT (pad) == NULL);
|
||||
|
||||
// then check to see if there's already a pad by that name here
|
||||
/* then check to see if there's already a pad by that name here */
|
||||
g_return_if_fail (gst_object_check_uniqueness (element->pads, GST_PAD_NAME(pad)) == TRUE);
|
||||
|
||||
/* set the pad's parent */
|
||||
|
@ -349,7 +349,7 @@ gst_element_add_ghost_pad (GstElement *element, GstPad *pad, gchar *name)
|
|||
g_return_if_fail (pad != NULL);
|
||||
g_return_if_fail (GST_IS_PAD (pad));
|
||||
|
||||
// then check to see if there's already a pad by that name here
|
||||
/* then check to see if there's already a pad by that name here */
|
||||
g_return_if_fail (gst_object_check_uniqueness (element->pads, name) == TRUE);
|
||||
|
||||
GST_DEBUG(GST_CAT_ELEMENT_PADS,"creating new ghost pad called %s, from pad %s:%s\n",
|
||||
|
@ -361,7 +361,7 @@ gst_element_add_ghost_pad (GstElement *element, GstPad *pad, gchar *name)
|
|||
name, GST_ELEMENT_NAME (element));
|
||||
element->pads = g_list_append (element->pads, ghostpad);
|
||||
element->numpads++;
|
||||
// set the parent of the ghostpad
|
||||
/* set the parent of the ghostpad */
|
||||
gst_object_set_parent (GST_OBJECT (ghostpad), GST_OBJECT (element));
|
||||
|
||||
GST_DEBUG(GST_CAT_ELEMENT_PADS,"added ghostpad %s:%s\n",GST_DEBUG_PAD_NAME(ghostpad));
|
||||
|
@ -386,10 +386,11 @@ gst_element_remove_ghost_pad (GstElement *element, GstPad *pad)
|
|||
g_return_if_fail (pad != NULL);
|
||||
g_return_if_fail (GST_IS_GHOST_PAD (pad));
|
||||
|
||||
// FIXME this is redundant?
|
||||
// wingo 10-july-2001: I don't think so, you have to actually remove the pad
|
||||
// from the element. gst_pad_remove_ghost_pad just removes the ghostpad from
|
||||
// the real pad's ghost pad list
|
||||
/* FIXME this is redundant?
|
||||
* wingo 10-july-2001: I don't think so, you have to actually remove the pad
|
||||
* from the element. gst_pad_remove_ghost_pad just removes the ghostpad from
|
||||
* the real pad's ghost pad list
|
||||
*/
|
||||
gst_pad_remove_ghost_pad (GST_PAD (GST_PAD_REALIZE (pad)), pad);
|
||||
gst_element_remove_pad (element, pad);
|
||||
}
|
||||
|
@ -413,11 +414,11 @@ gst_element_get_pad (GstElement *element, const gchar *name)
|
|||
g_return_val_if_fail (GST_IS_ELEMENT (element), NULL);
|
||||
g_return_val_if_fail (name != NULL, NULL);
|
||||
|
||||
// if there aren't any pads, well, we're not likely to find one
|
||||
/* if there aren't any pads, well, we're not likely to find one */
|
||||
if (!element->numpads)
|
||||
return NULL;
|
||||
|
||||
// look through the list, matching by name
|
||||
/* look through the list, matching by name */
|
||||
walk = element->pads;
|
||||
while (walk) {
|
||||
GstPad *pad = GST_PAD(walk->data);
|
||||
|
@ -553,11 +554,11 @@ gst_element_get_padtemplate_by_compatible (GstElement *element, GstPadTemplate *
|
|||
GstPadTemplate *padtempl = (GstPadTemplate*) padlist->data;
|
||||
gboolean compat = FALSE;
|
||||
|
||||
// Ignore name
|
||||
// Ignore presence
|
||||
// Check direction (must be opposite)
|
||||
// Check caps
|
||||
|
||||
/* Ignore name
|
||||
* Ignore presence
|
||||
* Check direction (must be opposite)
|
||||
* Check caps
|
||||
*/
|
||||
GST_DEBUG(GST_CAT_CAPS,"checking direction and caps\n");
|
||||
if (padtempl->direction == GST_PAD_SRC &&
|
||||
compattempl->direction == GST_PAD_SINK) {
|
||||
|
@ -837,8 +838,8 @@ gst_element_set_state (GstElement *element, GstElementState state)
|
|||
GstElementState curpending;
|
||||
GstElementStateReturn return_val = GST_STATE_SUCCESS;
|
||||
|
||||
// g_print("gst_element_set_state(\"%s\",%08lx)\n",
|
||||
// element->name,state);
|
||||
/* g_print("gst_element_set_state(\"%s\",%08lx)\n", */
|
||||
/* element->name,state); */
|
||||
|
||||
g_return_val_if_fail (element != NULL, GST_STATE_FAILURE);
|
||||
g_return_val_if_fail (GST_IS_ELEMENT (element), GST_STATE_FAILURE);
|
||||
|
@ -858,7 +859,7 @@ gst_element_set_state (GstElement *element, GstElementState state)
|
|||
else curpending>>=1;
|
||||
|
||||
/* set the pending state variable */
|
||||
// FIXME: should probably check to see that we don't already have one
|
||||
/* FIXME: should probably check to see that we don't already have one */
|
||||
GST_STATE_PENDING (element) = curpending;
|
||||
if (curpending != state)
|
||||
GST_DEBUG_ELEMENT (GST_CAT_STATES,element,"intermediate: setting state to %s\n",
|
||||
|
@ -932,11 +933,12 @@ gst_element_change_state (GstElement *element)
|
|||
GST_STATE (element) = GST_STATE_PENDING (element);
|
||||
GST_STATE_PENDING (element) = GST_STATE_VOID_PENDING;
|
||||
|
||||
// note: queues' state_change is a special case because it needs to lock
|
||||
// for synchronization (from another thread). since this signal may block
|
||||
// or (worse) make another state change, the queue needs to unlock before
|
||||
// calling. thus, gstqueue.c::gst_queue_state_change() blocks, unblocks,
|
||||
// unlocks, then emits this.
|
||||
/* note: queues' state_change is a special case because it needs to lock
|
||||
* for synchronization (from another thread). since this signal may block
|
||||
* or (worse) make another state change, the queue needs to unlock before
|
||||
* calling. thus, gstqueue.c::gst_queue_state_change() blocks, unblocks,
|
||||
* unlocks, then emits this.
|
||||
*/
|
||||
g_signal_emit (G_OBJECT (element), gst_element_signals[STATE_CHANGE], 0,
|
||||
old_state, GST_STATE (element));
|
||||
|
||||
|
@ -982,7 +984,7 @@ gst_element_dispose (GObject *object)
|
|||
orig = pads = g_list_copy (element->pads);
|
||||
while (pads) {
|
||||
pad = GST_PAD (pads->data);
|
||||
// the gst_object_unparent will do the unreffing
|
||||
/* the gst_object_unparent will do the unreffing */
|
||||
gst_element_remove_pad(element, pad);
|
||||
pads = g_list_next (pads);
|
||||
}
|
||||
|
@ -1013,7 +1015,7 @@ gst_element_save_thyself (GstObject *object,
|
|||
{
|
||||
GList *pads;
|
||||
GstElementClass *oclass;
|
||||
// GType type;
|
||||
/* GType type; */
|
||||
GstElement *element;
|
||||
|
||||
g_return_val_if_fail (GST_IS_ELEMENT (object), parent);
|
||||
|
@ -1031,11 +1033,11 @@ gst_element_save_thyself (GstObject *object,
|
|||
xmlNewChild (parent, NULL, "version", factory->details->version);
|
||||
}
|
||||
|
||||
// if (element->manager)
|
||||
// xmlNewChild(parent, NULL, "manager", GST_ELEMENT_NAME(element->manager));
|
||||
/* if (element->manager) */
|
||||
/* xmlNewChild(parent, NULL, "manager", GST_ELEMENT_NAME(element->manager)); */
|
||||
|
||||
/* FIXME FIXME FIXME!
|
||||
// output all args to the element
|
||||
/* FIXME FIXME FIXME! */
|
||||
/* output all args to the element */
|
||||
type = G_OBJECT_TYPE (element);
|
||||
while (type != G_TYPE_INVALID) {
|
||||
GtkArg *args;
|
||||
|
@ -1103,7 +1105,7 @@ gst_element_save_thyself (GstObject *object,
|
|||
|
||||
while (pads) {
|
||||
GstPad *pad = GST_PAD (pads->data);
|
||||
// figure out if it's a direct pad or a ghostpad
|
||||
/* figure out if it's a direct pad or a ghostpad */
|
||||
if (GST_ELEMENT (GST_OBJECT_PARENT (pad)) == element) {
|
||||
xmlNodePtr padtag = xmlNewChild (parent, NULL, "pad", NULL);
|
||||
gst_object_save_thyself (GST_OBJECT (pad), padtag);
|
||||
|
@ -1133,7 +1135,7 @@ gst_element_restore_thyself (xmlNodePtr self, GstObject *parent)
|
|||
guchar *value = NULL;
|
||||
guchar *type = NULL;
|
||||
|
||||
// first get the needed tags to construct the element
|
||||
/* first get the needed tags to construct the element */
|
||||
while (children) {
|
||||
if (!strcmp (children->name, "name")) {
|
||||
name = xmlNodeGetContent (children);
|
||||
|
@ -1151,12 +1153,12 @@ gst_element_restore_thyself (xmlNodePtr self, GstObject *parent)
|
|||
|
||||
g_return_val_if_fail (element != NULL, NULL);
|
||||
|
||||
// ne need to set the parent on this object bacause the pads
|
||||
// will go through the hierarchy to connect to thier peers
|
||||
/* ne need to set the parent on this object bacause the pads */
|
||||
/* will go through the hierarchy to connect to thier peers */
|
||||
if (parent)
|
||||
gst_object_set_parent (GST_OBJECT (element), parent);
|
||||
|
||||
// we have the element now, set the arguments
|
||||
/* we have the element now, set the arguments */
|
||||
children = self->xmlChildrenNode;
|
||||
|
||||
while (children) {
|
||||
|
@ -1176,7 +1178,7 @@ gst_element_restore_thyself (xmlNodePtr self, GstObject *parent)
|
|||
}
|
||||
children = children->next;
|
||||
}
|
||||
// we have the element now, set the pads
|
||||
/* we have the element now, set the pads */
|
||||
children = self->xmlChildrenNode;
|
||||
|
||||
while (children) {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//#define DEBUG_ENABLED
|
||||
/* #define DEBUG_ENABLED */
|
||||
#include "gst_private.h"
|
||||
|
||||
#include "gstelement.h"
|
||||
|
@ -39,7 +39,7 @@ static void gst_elementfactory_unload_thyself (GstPluginFeature *feature);
|
|||
static GList* _gst_elementfactories;
|
||||
|
||||
static GstPluginFeatureClass *parent_class = NULL;
|
||||
//static guint gst_elementfactory_signals[LAST_SIGNAL] = { 0 };
|
||||
/* static guint gst_elementfactory_signals[LAST_SIGNAL] = { 0 }; */
|
||||
|
||||
GType
|
||||
gst_elementfactory_get_type (void)
|
||||
|
@ -121,7 +121,7 @@ gst_elementfactory_find (const gchar *name)
|
|||
walk = g_list_next(walk);
|
||||
}
|
||||
|
||||
// this should be an ERROR
|
||||
/* this should be an ERROR */
|
||||
GST_DEBUG (GST_CAT_ELEMENTFACTORY,"no such elementfactory \"%s\"\n", name);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -241,18 +241,18 @@ gst_elementfactory_create (GstElementFactory *factory,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
// create an instance of the element
|
||||
/* create an instance of the element */
|
||||
element = GST_ELEMENT(g_object_new(factory->type,NULL));
|
||||
g_assert(element != NULL);
|
||||
|
||||
// attempt to set the elemenfactory class pointer if necessary
|
||||
/* attempt to set the elemenfactory class pointer if necessary */
|
||||
oclass = GST_ELEMENT_CLASS(G_OBJECT_GET_CLASS(element));
|
||||
if (oclass->elementfactory == NULL) {
|
||||
GST_DEBUG (GST_CAT_ELEMENTFACTORY,"class %s\n", GST_OBJECT_NAME (factory));
|
||||
oclass->elementfactory = factory;
|
||||
}
|
||||
|
||||
// copy pad template pointers to the element class
|
||||
/* copy pad template pointers to the element class */
|
||||
oclass->padtemplates = g_list_copy(factory->padtemplates);
|
||||
oclass->numpadtemplates = factory->numpadtemplates;
|
||||
|
||||
|
@ -283,7 +283,7 @@ gst_elementfactory_make (const gchar *factoryname, const gchar *name)
|
|||
|
||||
GST_DEBUG (GST_CAT_ELEMENTFACTORY, "gstelementfactory: make \"%s\" \"%s\"\n", factoryname, name);
|
||||
|
||||
//gst_plugin_load_elementfactory(factoryname);
|
||||
/* gst_plugin_load_elementfactory(factoryname); */
|
||||
factory = gst_elementfactory_find(factoryname);
|
||||
if (factory == NULL) {
|
||||
GST_INFO (GST_CAT_ELEMENTFACTORY,"no such elementfactory \"%s\"!",factoryname);
|
||||
|
|
|
@ -46,14 +46,14 @@ _gst_event_initialize (void)
|
|||
NULL,
|
||||
};
|
||||
|
||||
// round up to the nearest 32 bytes for cache-line and other efficiencies
|
||||
/* round up to the nearest 32 bytes for cache-line and other efficiencies */
|
||||
eventsize = (((eventsize-1) / 32) + 1) * 32;
|
||||
|
||||
_gst_event_chunk = g_mem_chunk_new ("GstEvent", eventsize,
|
||||
eventsize * 32, G_ALLOC_AND_FREE);
|
||||
_gst_event_chunk_lock = g_mutex_new ();
|
||||
|
||||
// register the type
|
||||
/* register the type */
|
||||
_gst_event_type = g_type_register_static (G_TYPE_INT, "GstEvent", &event_info, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -32,13 +32,13 @@ gst_extra_get_filename_type (void)
|
|||
|
||||
if (!filename_type) {
|
||||
static const GTypeInfo filename_info = {
|
||||
0, //sizeof(GstElementClass),
|
||||
0, /* sizeof(GstElementClass), */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
0, //sizeof(GstElement),
|
||||
0, /* sizeof(GstElement), */
|
||||
0,
|
||||
NULL,
|
||||
NULL
|
||||
|
|
|
@ -93,29 +93,29 @@ const gchar *_gst_category_colors[32] = {
|
|||
[GST_CAT_COTHREAD_SWITCH] = "00;37;42",
|
||||
[GST_CAT_AUTOPLUG] = "00;34",
|
||||
[GST_CAT_AUTOPLUG_ATTEMPT] = "00;36;44",
|
||||
[GST_CAT_PARENTAGE] = "01;37;41", // !!
|
||||
[GST_CAT_PARENTAGE] = "01;37;41", /* !! */
|
||||
[GST_CAT_STATES] = "00;31",
|
||||
[GST_CAT_PLANNING] = "07;35",
|
||||
[GST_CAT_SCHEDULING] = "00;35",
|
||||
[GST_CAT_DATAFLOW] = "00;32",
|
||||
[GST_CAT_BUFFER] = "00;32",
|
||||
[GST_CAT_CAPS] = "04;34",
|
||||
[GST_CAT_CLOCK] = "00;33", // !!
|
||||
[GST_CAT_ELEMENT_PADS] = "01;37;41", // !!
|
||||
[GST_CAT_ELEMENTFACTORY] = "01;37;41", // !!
|
||||
[GST_CAT_PADS] = "01;37;41", // !!
|
||||
[GST_CAT_PIPELINE] = "01;37;41", // !!
|
||||
[GST_CAT_CLOCK] = "00;33", /* !! */
|
||||
[GST_CAT_ELEMENT_PADS] = "01;37;41", /* !! */
|
||||
[GST_CAT_ELEMENTFACTORY] = "01;37;41", /* !! */
|
||||
[GST_CAT_PADS] = "01;37;41", /* !! */
|
||||
[GST_CAT_PIPELINE] = "01;37;41", /* !! */
|
||||
[GST_CAT_PLUGIN_LOADING] = "00;36",
|
||||
[GST_CAT_PLUGIN_ERRORS] = "05;31",
|
||||
[GST_CAT_PLUGIN_INFO] = "00;36",
|
||||
[GST_CAT_PROPERTIES] = "00;37;44", // !!
|
||||
[GST_CAT_PROPERTIES] = "00;37;44", /* !! */
|
||||
[GST_CAT_THREAD] = "00;31",
|
||||
[GST_CAT_TYPES] = "01;37;41", // !!
|
||||
[GST_CAT_XML] = "01;37;41", // !!
|
||||
[GST_CAT_TYPES] = "01;37;41", /* !! */
|
||||
[GST_CAT_XML] = "01;37;41", /* !! */
|
||||
[GST_CAT_NEGOTIATION] = "07;34",
|
||||
[GST_CAT_REFCOUNTING] = "00;34:42",
|
||||
[GST_CAT_EVENT] = "01;37;41", // !!
|
||||
[GST_CAT_PARAMS] = "00;30;43", // !!
|
||||
[GST_CAT_EVENT] = "01;37;41", /* !! */
|
||||
[GST_CAT_PARAMS] = "00;30;43", /* !! */
|
||||
|
||||
[GST_CAT_CALL_TRACE] = "",
|
||||
[31] = "05;31",
|
||||
|
@ -173,7 +173,7 @@ gst_default_debug_handler (gint category, gboolean incore,
|
|||
#endif
|
||||
|
||||
if (debug_string == NULL) debug_string = "";
|
||||
// if (category != GST_CAT_GST_INIT)
|
||||
/* if (category != GST_CAT_GST_INIT) */
|
||||
location = g_strdup_printf("%s:%d%s:",function,line,debug_string);
|
||||
if (element && GST_IS_ELEMENT (element))
|
||||
#ifdef GST_DEBUG_COLOR
|
||||
|
@ -307,7 +307,7 @@ gst_default_info_handler (gint category, gboolean incore,
|
|||
#else
|
||||
fprintf(stderr,"INFO (%5d:%2d)%s%s %s\n",
|
||||
pthread_id,cothread_id,location,elementname,string);
|
||||
#endif // GST_DEBUG_COLOR
|
||||
#endif /* GST_DEBUG_COLOR */
|
||||
/*
|
||||
#else
|
||||
#ifdef GST_DEBUG_COLOR
|
||||
|
@ -316,7 +316,7 @@ gst_default_info_handler (gint category, gboolean incore,
|
|||
#else
|
||||
fprintf(stderr,"INFO:%s%s %s\n",
|
||||
location,elementname,string);
|
||||
#endif // GST_DEBUG_COLOR
|
||||
#endif /* GST_DEBUG_COLOR */
|
||||
#endif
|
||||
*/
|
||||
|
||||
|
@ -413,15 +413,15 @@ gst_default_error_handler (gchar *file, gchar *function,
|
|||
gchar *path;
|
||||
int i;
|
||||
|
||||
// if there are NULL pointers, point them to null strings to clean up output
|
||||
/* if there are NULL pointers, point them to null strings to clean up output */
|
||||
if (!debug_string) debug_string = "";
|
||||
if (!string) string = "";
|
||||
|
||||
// print out a preamble
|
||||
/* print out a preamble */
|
||||
fprintf(stderr,"***** GStreamer ERROR ***** in file %s at %s:%d%s\n",
|
||||
file,function,line,debug_string);
|
||||
|
||||
// if there's an element, print out the pertinent information
|
||||
/* if there's an element, print out the pertinent information */
|
||||
if (element) {
|
||||
if (GST_IS_OBJECT(element)) {
|
||||
path = gst_object_get_path_string(element);
|
||||
|
@ -434,9 +434,9 @@ gst_default_error_handler (gchar *file, gchar *function,
|
|||
}
|
||||
}
|
||||
|
||||
// if there's an object, print it out as well
|
||||
/* if there's an object, print it out as well */
|
||||
if (object) {
|
||||
// attempt to pad the line, or create a new one
|
||||
/* attempt to pad the line, or create a new one */
|
||||
if (chars < 40)
|
||||
for (i=0;i<(40-chars)/8+1;i++) fprintf(stderr,"\t");
|
||||
else
|
||||
|
@ -467,7 +467,7 @@ gst_default_error_handler (gchar *file, gchar *function,
|
|||
|
||||
/***** DEBUG system *****/
|
||||
GHashTable *__gst_function_pointers = NULL;
|
||||
// FIXME make this thread specific
|
||||
/* FIXME make this thread specific */
|
||||
static GSList *stack_trace = NULL;
|
||||
|
||||
gchar *_gst_debug_nameof_funcptr (void *ptr) __attribute__ ((no_instrument_function));
|
||||
|
@ -535,7 +535,7 @@ gst_debug_print_stack_trace (void)
|
|||
void
|
||||
gst_debug_print_stack_trace (void)
|
||||
{
|
||||
//nothing because it's compiled out
|
||||
/* nothing because it's compiled out */
|
||||
}
|
||||
|
||||
#endif /* GST_ENABLE_FUNC_INTSTRUMENTATION */
|
||||
|
|
|
@ -120,8 +120,8 @@ gst_object_class_init (GstObjectClass *klass)
|
|||
#endif
|
||||
|
||||
klass->path_string_separator = "/";
|
||||
// FIXME!!!
|
||||
// klass->signal_object = g_object_new(gst_signal_object_get_type (,NULL));
|
||||
/* FIXME!!! */
|
||||
/* klass->signal_object = g_object_new(gst_signal_object_get_type (,NULL)); */
|
||||
|
||||
gobject_class->dispose = gst_object_dispose;
|
||||
gobject_class->finalize = gst_object_finalize;
|
||||
|
@ -371,16 +371,16 @@ gst_object_ref (GstObject *object)
|
|||
g_return_if_fail (object != NULL, NULL);
|
||||
g_return_if_fail (GST_IS_OBJECT (object), NULL);
|
||||
|
||||
//#ifdef HAVE_ATOMIC_H
|
||||
// g_return_if_fail (atomic_read (&(object->refcount)) > 0);
|
||||
// atomic_inc (&(object->refcount))
|
||||
//#else
|
||||
/* #ifdef HAVE_ATOMIC_H */
|
||||
/* g_return_if_fail (atomic_read (&(object->refcount)) > 0); */
|
||||
/* atomic_inc (&(object->refcount)) */
|
||||
/* #else */
|
||||
g_return_if_fail (object->refcount > 0);
|
||||
GST_LOCK (object);
|
||||
// object->refcount++;
|
||||
/* object->refcount++; */
|
||||
g_object_ref((GObject *)object);
|
||||
GST_UNLOCK (object);
|
||||
//#endif
|
||||
/* #endif */
|
||||
|
||||
return object;
|
||||
}
|
||||
|
@ -430,9 +430,9 @@ gst_object_unref (GstObject *object)
|
|||
object->refcount = 0;
|
||||
#endif
|
||||
/* finalize the object */
|
||||
// FIXME this is an evil hack that should be killed
|
||||
// FIXMEFIXMEFIXMEFIXME
|
||||
// gtk_object_finalize(G_OBJECT(object));
|
||||
/* FIXME this is an evil hack that should be killed */
|
||||
/* FIXMEFIXMEFIXMEFIXME */
|
||||
/* gtk_object_finalize(G_OBJECT(object)); */
|
||||
}
|
||||
}
|
||||
#endif /* gst_object_unref */
|
||||
|
@ -581,7 +581,7 @@ gst_object_get_path_string (GstObject *object)
|
|||
|
||||
path = g_strdup ("");
|
||||
|
||||
// first walk the object hierarchy to build a list of the parents
|
||||
/* first walk the object hierarchy to build a list of the parents */
|
||||
do {
|
||||
if (GST_IS_OBJECT (object)) {
|
||||
parent = gst_object_get_parent (object);
|
||||
|
@ -597,7 +597,7 @@ gst_object_get_path_string (GstObject *object)
|
|||
object = parent;
|
||||
} while (object != NULL);
|
||||
|
||||
// then walk the parent list and print them out
|
||||
/* then walk the parent list and print them out */
|
||||
parents = parentage;
|
||||
while (parents) {
|
||||
if (GST_IS_OBJECT (parents->data)) {
|
||||
|
|
38
gst/gstpad.c
38
gst/gstpad.c
|
@ -20,7 +20,7 @@
|
|||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//#define GST_DEBUG_ENABLED
|
||||
/* #define GST_DEBUG_ENABLED */
|
||||
#include "gst_private.h"
|
||||
|
||||
#include "gstpad.h"
|
||||
|
@ -173,8 +173,8 @@ gst_real_pad_class_init (GstRealPadClass *klass)
|
|||
gst_marshal_VOID__POINTER, G_TYPE_NONE, 1,
|
||||
G_TYPE_POINTER);
|
||||
|
||||
// gtk_object_add_arg_type ("GstRealPad::active", G_TYPE_BOOLEAN,
|
||||
// GTK_ARG_READWRITE, REAL_ARG_ACTIVE);
|
||||
/* gtk_object_add_arg_type ("GstRealPad::active", G_TYPE_BOOLEAN, */
|
||||
/* GTK_ARG_READWRITE, REAL_ARG_ACTIVE); */
|
||||
g_object_class_install_property (G_OBJECT_CLASS(klass), REAL_ARG_ACTIVE,
|
||||
g_param_spec_boolean("active","Active","Whether the pad is active.",
|
||||
TRUE,G_PARAM_READWRITE));
|
||||
|
@ -511,7 +511,7 @@ gst_pad_disconnect (GstPad *srcpad,
|
|||
GST_INFO (GST_CAT_ELEMENT_PADS, "disconnecting %s:%s(%p) and %s:%s(%p)",
|
||||
GST_DEBUG_PAD_NAME(srcpad), srcpad, GST_DEBUG_PAD_NAME(sinkpad), sinkpad);
|
||||
|
||||
// now we need to deal with the real/ghost stuff
|
||||
/* now we need to deal with the real/ghost stuff */
|
||||
realsrc = GST_PAD_REALIZE(srcpad);
|
||||
realsink = GST_PAD_REALIZE(sinkpad);
|
||||
|
||||
|
@ -537,7 +537,7 @@ gst_pad_disconnect (GstPad *srcpad,
|
|||
g_signal_emit(G_OBJECT(realsrc), gst_real_pad_signals[REAL_DISCONNECTED], 0, realsink);
|
||||
g_signal_emit(G_OBJECT(realsink), gst_real_pad_signals[REAL_DISCONNECTED], 0, realsrc);
|
||||
|
||||
// now tell the scheduler
|
||||
/* now tell the scheduler */
|
||||
if (realsrc->sched)
|
||||
gst_scheduler_pad_connect (realsrc->sched, (GstPad *)realsrc, (GstPad *)realsink);
|
||||
|
||||
|
@ -595,7 +595,7 @@ gst_pad_try_connect (GstPad *srcpad,
|
|||
GST_INFO (GST_CAT_PADS, "connecting %s:%s and %s:%s",
|
||||
GST_DEBUG_PAD_NAME(srcpad), GST_DEBUG_PAD_NAME(sinkpad));
|
||||
|
||||
// now we need to deal with the real/ghost stuff
|
||||
/* now we need to deal with the real/ghost stuff */
|
||||
realsrc = GST_PAD_REALIZE(srcpad);
|
||||
realsink = GST_PAD_REALIZE(sinkpad);
|
||||
|
||||
|
@ -647,7 +647,7 @@ gst_pad_try_connect (GstPad *srcpad,
|
|||
g_signal_emit(G_OBJECT(realsrc), gst_real_pad_signals[REAL_CONNECTED], 0, realsink);
|
||||
g_signal_emit(G_OBJECT(realsink), gst_real_pad_signals[REAL_CONNECTED], 0, realsrc);
|
||||
|
||||
// now tell the scheduler(s)
|
||||
/* now tell the scheduler(s) */
|
||||
if (realsrc->sched)
|
||||
gst_scheduler_pad_connect (realsrc->sched, (GstPad *)realsrc, (GstPad *)realsink);
|
||||
else if (realsink->sched)
|
||||
|
@ -845,7 +845,7 @@ gst_pad_set_caps (GstPad *pad,
|
|||
GstCaps *oldcaps;
|
||||
|
||||
g_return_val_if_fail (pad != NULL, FALSE);
|
||||
g_return_val_if_fail (GST_IS_REAL_PAD (pad), FALSE); // NOTE this restriction
|
||||
g_return_val_if_fail (GST_IS_REAL_PAD (pad), FALSE); /* NOTE this restriction */
|
||||
|
||||
GST_INFO (GST_CAT_CAPS, "setting caps %p on pad %s:%s",
|
||||
caps, GST_DEBUG_PAD_NAME(pad));
|
||||
|
@ -853,7 +853,7 @@ gst_pad_set_caps (GstPad *pad,
|
|||
if (!gst_caps_check_compatibility (caps, gst_pad_get_padtemplate_caps (pad))) {
|
||||
g_warning ("pad %s:%s tried to set caps incompatible with its padtemplate\n",
|
||||
GST_DEBUG_PAD_NAME (pad));
|
||||
//return FALSE;
|
||||
/* return FALSE; */
|
||||
}
|
||||
|
||||
oldcaps = GST_PAD_CAPS (pad);
|
||||
|
@ -1040,7 +1040,7 @@ gst_real_pad_dispose (GObject *object)
|
|||
gst_element_remove_pad (GST_ELEMENT (GST_OBJECT_PARENT (pad)), pad);
|
||||
}
|
||||
|
||||
// FIXME we should destroy the ghostpads, because they are nothing without the real pad
|
||||
/* FIXME we should destroy the ghostpads, because they are nothing without the real pad */
|
||||
if (GST_REAL_PAD (pad)->ghostpads) {
|
||||
GList *orig, *ghostpads;
|
||||
|
||||
|
@ -1120,7 +1120,7 @@ gst_pad_load_and_connect (xmlNodePtr self,
|
|||
cleanup:
|
||||
g_strfreev (split);
|
||||
}
|
||||
#endif // GST_DISABLE_LOADSAVE
|
||||
#endif /* GST_DISABLE_LOADSAVE */
|
||||
|
||||
static gboolean
|
||||
gst_pad_renegotiate_func (GstPad *pad, gpointer *data1, GstPad *peerpad, gpointer *data2, GstCaps **newcaps)
|
||||
|
@ -1288,7 +1288,7 @@ gst_pad_renegotiate (GstPad *pad)
|
|||
GST_DEBUG (GST_CAT_NEGOTIATION, "pads aggreed on caps :)\n");
|
||||
|
||||
newcaps = GST_PAD_CAPS (pad);
|
||||
//g_return_val_if_fail(newcaps != NULL, FALSE); // FIXME is this valid?
|
||||
/* g_return_val_if_fail(newcaps != NULL, FALSE); FIXME is this valid? */
|
||||
|
||||
/* here we have some sort of aggreement of the caps */
|
||||
GST_PAD_CAPS (currentpad) = gst_caps_ref (newcaps);
|
||||
|
@ -1392,8 +1392,8 @@ gst_pad_save_thyself (GstObject *object,
|
|||
xmlNewChild(parent,NULL,"name", GST_PAD_NAME (realpad));
|
||||
if (GST_RPAD_PEER(realpad) != NULL) {
|
||||
peer = GST_PAD(GST_RPAD_PEER(realpad));
|
||||
// first check to see if the peer's parent's parent is the same
|
||||
// we just save it off
|
||||
/* first check to see if the peer's parent's parent is the same */
|
||||
/* we just save it off */
|
||||
xmlNewChild(parent,NULL,"peer",g_strdup_printf("%s.%s",
|
||||
GST_OBJECT_NAME (GST_PAD_PARENT (peer)), GST_PAD_NAME (peer)));
|
||||
} else
|
||||
|
@ -1425,7 +1425,7 @@ gst_pad_ghost_save_thyself (GstPad *pad,
|
|||
xmlNewChild(self,NULL,"name", GST_PAD_NAME (pad));
|
||||
xmlNewChild(self,NULL,"parent", GST_OBJECT_NAME (GST_PAD_PARENT (pad)));
|
||||
|
||||
// FIXME FIXME FIXME!
|
||||
/* FIXME FIXME FIXME! */
|
||||
|
||||
return self;
|
||||
}
|
||||
|
@ -1884,7 +1884,7 @@ static void gst_ghost_pad_class_init (GstGhostPadClass *klass);
|
|||
static void gst_ghost_pad_init (GstGhostPad *pad);
|
||||
|
||||
static GstPad *ghost_pad_parent_class = NULL;
|
||||
//static guint gst_ghost_pad_signals[LAST_SIGNAL] = { 0 };
|
||||
/* static guint gst_ghost_pad_signals[LAST_SIGNAL] = { 0 }; */
|
||||
|
||||
GType
|
||||
gst_ghost_pad_get_type(void) {
|
||||
|
@ -1945,10 +1945,10 @@ gst_ghost_pad_new (gchar *name,
|
|||
GST_GPAD_REALPAD(ghostpad) = GST_PAD_REALIZE(pad);
|
||||
GST_PAD_PADTEMPLATE(ghostpad) = GST_PAD_PADTEMPLATE(pad);
|
||||
|
||||
// add ourselves to the real pad's list of ghostpads
|
||||
/* add ourselves to the real pad's list of ghostpads */
|
||||
gst_pad_add_ghost_pad (pad, GST_PAD(ghostpad));
|
||||
|
||||
// FIXME need to ref the real pad here... ?
|
||||
/* FIXME need to ref the real pad here... ? */
|
||||
|
||||
GST_DEBUG(GST_CAT_PADS,"created ghost pad \"%s\"\n",name);
|
||||
|
||||
|
@ -1970,7 +1970,7 @@ gst_pad_event_default (GstPad *pad, GstEvent *event)
|
|||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_EOS:
|
||||
// gst_element_signal_eos (element);
|
||||
/* gst_element_signal_eos (element); */
|
||||
gst_element_set_state (element, GST_STATE_PAUSED);
|
||||
{
|
||||
GList *pads = element->pads;
|
||||
|
|
101
gst/gstparse.c
101
gst/gstparse.c
|
@ -123,7 +123,7 @@ gst_parse_launch_cmdline (int argc, char *argv[], GstBin * parent, gst_parse_pri
|
|||
|
||||
while (i < argc) {
|
||||
arg = argv[i];
|
||||
// FIXME this is a lame solution for problems with the first parser
|
||||
/* FIXME this is a lame solution for problems with the first parser */
|
||||
if (arg == NULL) {
|
||||
i++;
|
||||
continue;
|
||||
|
@ -132,29 +132,29 @@ gst_parse_launch_cmdline (int argc, char *argv[], GstBin * parent, gst_parse_pri
|
|||
element = NULL;
|
||||
DEBUG ("** ARGUMENT is '%s'\n", arg);
|
||||
|
||||
// a null that slipped through the reconstruction
|
||||
/* a null that slipped through the reconstruction */
|
||||
if (len == 0) {
|
||||
DEBUG ("random arg, FIXME\n");
|
||||
i++;
|
||||
continue;
|
||||
|
||||
// end of the container
|
||||
/* end of the container */
|
||||
}
|
||||
else if (arg[0] == closingchar) {
|
||||
// time to finish off this bin
|
||||
/* time to finish off this bin */
|
||||
DEBUG ("exiting container %s\n", GST_ELEMENT_NAME (GST_ELEMENT (parent)));
|
||||
retval = i + 1;
|
||||
break;
|
||||
|
||||
// a pad connection
|
||||
/* a pad connection */
|
||||
}
|
||||
else if ((ptr = strchr (arg, '!'))) {
|
||||
DEBUG ("attempting to connect pads together....\n");
|
||||
|
||||
// if it starts with the !
|
||||
/* if it starts with the ! */
|
||||
if (arg[0] == '!') {
|
||||
srcpadname = NULL;
|
||||
// if there's a sinkpad...
|
||||
/* if there's a sinkpad... */
|
||||
if (len > 1)
|
||||
sinkpadname = &arg[1];
|
||||
else
|
||||
|
@ -162,7 +162,7 @@ gst_parse_launch_cmdline (int argc, char *argv[], GstBin * parent, gst_parse_pri
|
|||
}
|
||||
else {
|
||||
srcpadname = g_strndup (arg, (ptr - arg));
|
||||
// if there's a sinkpad
|
||||
/* if there's a sinkpad */
|
||||
if (len > (ptr - arg) + 1)
|
||||
sinkpadname = &ptr[1];
|
||||
else
|
||||
|
@ -176,10 +176,10 @@ gst_parse_launch_cmdline (int argc, char *argv[], GstBin * parent, gst_parse_pri
|
|||
numsrcpads = 0;
|
||||
tempname = NULL;
|
||||
|
||||
// find src pads
|
||||
/* find src pads */
|
||||
if (srcpadname != NULL) {
|
||||
while (1) {
|
||||
// split name at commas
|
||||
/* split name at commas */
|
||||
if ((ptr = strchr (srcpadname, ','))) {
|
||||
tempname = g_strndup (srcpadname, (ptr - srcpadname));
|
||||
srcpadname = &ptr[1];
|
||||
|
@ -188,13 +188,13 @@ gst_parse_launch_cmdline (int argc, char *argv[], GstBin * parent, gst_parse_pri
|
|||
tempname = srcpadname;
|
||||
}
|
||||
|
||||
// look for pad with that name
|
||||
/* look for pad with that name */
|
||||
if ((temppad = gst_element_get_pad (previous, tempname))) {
|
||||
srcpads = g_slist_append (srcpads, temppad);
|
||||
numsrcpads++;
|
||||
}
|
||||
|
||||
// try to create a pad using that padtemplate name
|
||||
/* try to create a pad using that padtemplate name */
|
||||
else if ((temppad = gst_element_request_pad_by_name (previous, tempname))) {
|
||||
srcpads = g_slist_append (srcpads, temppad);
|
||||
numsrcpads++;
|
||||
|
@ -206,14 +206,14 @@ gst_parse_launch_cmdline (int argc, char *argv[], GstBin * parent, gst_parse_pri
|
|||
GST_DEBUG (0, "have src pad %s:%s\n", GST_DEBUG_PAD_NAME (temppad));
|
||||
}
|
||||
|
||||
// if there is no more commas in srcpadname then we're done
|
||||
/* if there is no more commas in srcpadname then we're done */
|
||||
if (tempname == srcpadname)
|
||||
break;
|
||||
g_free (tempname);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// check through the list to find the first sink pad
|
||||
/* check through the list to find the first sink pad */
|
||||
GST_DEBUG (0, "CHECKING through element %s for pad named %s\n", GST_ELEMENT_NAME (previous),
|
||||
srcpadname);
|
||||
pads = gst_element_get_pad_list (previous);
|
||||
|
@ -235,14 +235,14 @@ gst_parse_launch_cmdline (int argc, char *argv[], GstBin * parent, gst_parse_pri
|
|||
GST_DEBUG (0, "have src pad %s:%s\n", GST_DEBUG_PAD_NAME (GST_PARSE_LISTPAD (srcpads)));
|
||||
}
|
||||
|
||||
// argument with = in it
|
||||
/* argument with = in it */
|
||||
}
|
||||
else if (strstr (arg, "=")) {
|
||||
gchar *argname;
|
||||
gchar *argval;
|
||||
gchar *pos = strstr (arg, "=");
|
||||
|
||||
// we have an argument
|
||||
/* we have an argument */
|
||||
argname = arg;
|
||||
pos[0] = '\0';
|
||||
argval = pos + 1;
|
||||
|
@ -252,11 +252,11 @@ gst_parse_launch_cmdline (int argc, char *argv[], GstBin * parent, gst_parse_pri
|
|||
gst_util_set_object_arg (G_OBJECT (previous), argname, argval);
|
||||
g_free (argname);
|
||||
|
||||
// element or argument, or beginning of bin or thread
|
||||
/* element or argument, or beginning of bin or thread */
|
||||
}
|
||||
else if (arg[0] == '[') {
|
||||
// we have the start of a name of the preceding element.
|
||||
// rename previous element to next arg.
|
||||
/* we have the start of a name of the preceding element. */
|
||||
/* rename previous element to next arg. */
|
||||
if (arg[1] != '\0') {
|
||||
fprintf (stderr, "error, unexpected junk after [\n");
|
||||
return GST_PARSE_ERROR_SYNTAX;
|
||||
|
@ -281,10 +281,10 @@ gst_parse_launch_cmdline (int argc, char *argv[], GstBin * parent, gst_parse_pri
|
|||
}
|
||||
else {
|
||||
DEBUG ("have element or bin/thread\n");
|
||||
// if we have a bin or thread starting
|
||||
/* if we have a bin or thread starting */
|
||||
if (strchr ("({", arg[0])) {
|
||||
if (arg[0] == '(') {
|
||||
// create a bin and add it to the current parent
|
||||
/* create a bin and add it to the current parent */
|
||||
element = gst_bin_new (g_strdup_printf ("bin%d", priv->bincount++));
|
||||
if (!element) {
|
||||
fprintf (stderr, "Couldn't create a bin!\n");
|
||||
|
@ -293,7 +293,7 @@ gst_parse_launch_cmdline (int argc, char *argv[], GstBin * parent, gst_parse_pri
|
|||
GST_DEBUG (0, "CREATED bin %s\n", GST_ELEMENT_NAME (element));
|
||||
}
|
||||
else if (arg[0] == '{') {
|
||||
// create a thread and add it to the current parent
|
||||
/* create a thread and add it to the current parent */
|
||||
element = gst_thread_new (g_strdup_printf ("thread%d", priv->threadcount++));
|
||||
if (!element) {
|
||||
fprintf (stderr, "Couldn't create a thread!\n");
|
||||
|
@ -308,14 +308,14 @@ gst_parse_launch_cmdline (int argc, char *argv[], GstBin * parent, gst_parse_pri
|
|||
}
|
||||
|
||||
j = gst_parse_launch_cmdline (argc - i, argv + i + 1, GST_BIN (element), priv);
|
||||
//check for parse error
|
||||
/* check for parse error */
|
||||
if (j < 0)
|
||||
return j;
|
||||
i += j;
|
||||
|
||||
}
|
||||
else {
|
||||
// we have an element
|
||||
/* we have an element */
|
||||
DEBUG ("attempting to create element '%s'\n", arg);
|
||||
ptr = gst_parse_unique_name (arg, priv);
|
||||
element = gst_elementfactory_make (arg, ptr);
|
||||
|
@ -342,10 +342,11 @@ gst_parse_launch_cmdline (int argc, char *argv[], GstBin * parent, gst_parse_pri
|
|||
numsinkpads = 0;
|
||||
tempname = NULL;
|
||||
|
||||
// find sink pads
|
||||
/
|
||||
find sink pads
|
||||
if (sinkpadname != NULL) {
|
||||
while (1) {
|
||||
// split name at commas
|
||||
/* split name at commas */
|
||||
if ((ptr = strchr (sinkpadname, ','))) {
|
||||
tempname = g_strndup (sinkpadname, (ptr - sinkpadname));
|
||||
sinkpadname = &ptr[1];
|
||||
|
@ -354,13 +355,13 @@ gst_parse_launch_cmdline (int argc, char *argv[], GstBin * parent, gst_parse_pri
|
|||
tempname = sinkpadname;
|
||||
}
|
||||
|
||||
// look for pad with that name
|
||||
/* look for pad with that name */
|
||||
if ((temppad = gst_element_get_pad (element, tempname))) {
|
||||
sinkpads = g_slist_append (sinkpads, temppad);
|
||||
numsinkpads++;
|
||||
}
|
||||
|
||||
// try to create a pad using that padtemplate name
|
||||
/* try to create a pad using that padtemplate name */
|
||||
else if ((temppad = gst_element_request_pad_by_name (element, tempname))) {
|
||||
sinkpads = g_slist_append (sinkpads, temppad);
|
||||
numsinkpads++;
|
||||
|
@ -372,14 +373,14 @@ gst_parse_launch_cmdline (int argc, char *argv[], GstBin * parent, gst_parse_pri
|
|||
GST_DEBUG (0, "have sink pad %s:%s\n", GST_DEBUG_PAD_NAME (temppad));
|
||||
}
|
||||
|
||||
// if there is no more commas in sinkpadname then we're done
|
||||
/* if there is no more commas in sinkpadname then we're done */
|
||||
if (tempname == sinkpadname)
|
||||
break;
|
||||
g_free (tempname);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// check through the list to find the first sink pad
|
||||
/* check through the list to find the first sink pad */
|
||||
pads = gst_element_get_pad_list (element);
|
||||
while (pads) {
|
||||
temppad = GST_PAD (pads->data);
|
||||
|
@ -426,7 +427,7 @@ gst_parse_launch_cmdline (int argc, char *argv[], GstBin * parent, gst_parse_pri
|
|||
g_slist_free (sinkpads);
|
||||
sinkpads = NULL;
|
||||
|
||||
// if we're the first element, ghost all the sinkpads
|
||||
/* if we're the first element, ghost all the sinkpads */
|
||||
if (elementcount == 1) {
|
||||
DEBUG ("first element, ghosting all of %s's sink pads to parent %s\n",
|
||||
GST_ELEMENT_NAME (element), GST_ELEMENT_NAME (GST_ELEMENT (parent)));
|
||||
|
@ -454,7 +455,7 @@ gst_parse_launch_cmdline (int argc, char *argv[], GstBin * parent, gst_parse_pri
|
|||
i++;
|
||||
}
|
||||
|
||||
// ghost all the src pads of the bin
|
||||
/* ghost all the src pads of the bin */
|
||||
if (prevelement != NULL) {
|
||||
DEBUG ("last element, ghosting all of %s's src pads to parent %s\n",
|
||||
GST_ELEMENT_NAME (prevelement), GST_ELEMENT_NAME (GST_ELEMENT (parent)));
|
||||
|
@ -515,16 +516,16 @@ gst_parse_launch (const gchar * cmdline, GstBin * parent)
|
|||
|
||||
temp = "";
|
||||
|
||||
// Extract the arguments to a gslist in reverse order
|
||||
/* Extract the arguments to a gslist in reverse order */
|
||||
for (cp = cmdline; cp < end;) {
|
||||
i = strcspn (cp, "([{}]) \"\\");
|
||||
|
||||
if (i > 0) {
|
||||
temp = g_strconcat (temp, g_strndup (cp, i), NULL);
|
||||
|
||||
// see if we have an escape char
|
||||
/* see if we have an escape char */
|
||||
if (cp[i] != '\\') {
|
||||
// normal argument - copy and add to the list
|
||||
/* normal argument - copy and add to the list */
|
||||
string_list = g_slist_prepend (string_list, temp);
|
||||
newargc++;
|
||||
temp = "";
|
||||
|
@ -535,33 +536,33 @@ gst_parse_launch (const gchar * cmdline, GstBin * parent)
|
|||
cp += i;
|
||||
}
|
||||
|
||||
// skip spaces
|
||||
/* skip spaces */
|
||||
while (cp < end && *cp == ' ') {
|
||||
cp++;
|
||||
}
|
||||
|
||||
// handle quoted arguments
|
||||
/* handle quoted arguments */
|
||||
if (*cp == '"') {
|
||||
start = ++cp;
|
||||
|
||||
// find matching quote
|
||||
/* find matching quote */
|
||||
while (cp < end && *cp != '"')
|
||||
cp++;
|
||||
|
||||
// make sure we got it
|
||||
/* make sure we got it */
|
||||
if (cp == end) {
|
||||
g_warning ("gst_parse_launch: Unbalanced quote in command line");
|
||||
// FIXME: The list leaks here
|
||||
/* FIXME: The list leaks here */
|
||||
return 0;
|
||||
}
|
||||
|
||||
// copy the string sans quotes
|
||||
/* copy the string sans quotes */
|
||||
string_list = g_slist_prepend (string_list, g_strndup (start, cp - start));
|
||||
newargc++;
|
||||
cp += 2; // skip the quote aswell
|
||||
cp += 2; /* skip the quote aswell */
|
||||
}
|
||||
|
||||
// brackets exist in a separate argument slot
|
||||
/* brackets exist in a separate argument slot */
|
||||
if (*cp && strchr ("([{}])", *cp)) {
|
||||
string_list = g_slist_prepend (string_list, g_strndup (cp, 1));
|
||||
newargc++;
|
||||
|
@ -569,12 +570,12 @@ gst_parse_launch (const gchar * cmdline, GstBin * parent)
|
|||
}
|
||||
}
|
||||
|
||||
// now allocate the new argv array
|
||||
/* now allocate the new argv array */
|
||||
argvn = g_new0 (char *, newargc);
|
||||
|
||||
GST_DEBUG (0, "got %d args\n", newargc);
|
||||
|
||||
// reverse the list and put the strings in the new array
|
||||
/* reverse the list and put the strings in the new array */
|
||||
i = newargc;
|
||||
|
||||
for (slist = string_list; slist; slist = slist->next)
|
||||
|
@ -582,19 +583,19 @@ gst_parse_launch (const gchar * cmdline, GstBin * parent)
|
|||
|
||||
g_slist_free (string_list);
|
||||
|
||||
// print them out
|
||||
/* print them out */
|
||||
for (i = 0; i < newargc; i++) {
|
||||
GST_DEBUG (0, "arg %d is: %s\n", i, argvn[i]);
|
||||
}
|
||||
|
||||
// set up the elementcounts hash
|
||||
/* set up the elementcounts hash */
|
||||
priv.elementcounts = g_hash_table_new (g_str_hash, g_str_equal);
|
||||
|
||||
// do it!
|
||||
/* do it! */
|
||||
i = gst_parse_launch_cmdline (newargc, argvn, parent, &priv);
|
||||
|
||||
// GST_DEBUG(0, "Finished - freeing temporary argument array");
|
||||
// g_strfreev(argvn);
|
||||
/* GST_DEBUG(0, "Finished - freeing temporary argument array"); */
|
||||
/* g_strfreev(argvn); */
|
||||
|
||||
return i;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//#define GST_DEBUG_ENABLED
|
||||
/* #define GST_DEBUG_ENABLED */
|
||||
#include "gst_private.h"
|
||||
|
||||
#include "gstpipeline.h"
|
||||
|
@ -58,7 +58,7 @@ static void gst_pipeline_init (GstPipeline *pipeline);
|
|||
static GstElementStateReturn gst_pipeline_change_state (GstElement *element);
|
||||
|
||||
static GstBinClass *parent_class = NULL;
|
||||
//static guint gst_pipeline_signals[LAST_SIGNAL] = { 0 };
|
||||
/* static guint gst_pipeline_signals[LAST_SIGNAL] = { 0 }; */
|
||||
|
||||
GType
|
||||
gst_pipeline_get_type (void) {
|
||||
|
@ -97,7 +97,7 @@ gst_pipeline_class_init (GstPipelineClass *klass)
|
|||
static void
|
||||
gst_pipeline_init (GstPipeline *pipeline)
|
||||
{
|
||||
// we're a manager by default
|
||||
/* we're a manager by default */
|
||||
GST_FLAG_SET (pipeline, GST_BIN_FLAG_MANAGER);
|
||||
|
||||
GST_ELEMENT_SCHED (pipeline) = gst_schedulerfactory_make ("basic", GST_ELEMENT (pipeline));
|
||||
|
|
|
@ -101,7 +101,8 @@ _gst_plugin_initialize (void)
|
|||
if (_gst_warn_old_registry)
|
||||
g_error ("gstplugin: registry needs rebuild: run gstreamer-register\n");
|
||||
gst_plugin_load_all ();
|
||||
//gst_plugin_unload_all ();
|
||||
/
|
||||
gst_plugin_unload_all ();
|
||||
return;
|
||||
}
|
||||
gst_plugin_load_thyself (doc->xmlRootNode);
|
||||
|
@ -200,8 +201,10 @@ plugin_times_older_than_recurse(gchar *path, time_t regtime)
|
|||
static gboolean
|
||||
plugin_times_older_than(time_t regtime)
|
||||
{
|
||||
// return true iff regtime is more recent than the times of all the files
|
||||
// in the plugin dirs.
|
||||
/* return true iff regtime is more recent than the times of all the files
|
||||
* in the plugin dirs.
|
||||
*/
|
||||
|
||||
GList *path;
|
||||
path = _gst_plugin_paths;
|
||||
while (path != NULL) {
|
||||
|
@ -224,7 +227,7 @@ gst_plugin_load_recurse (gchar *directory, gchar *name)
|
|||
gboolean loaded = FALSE;
|
||||
gchar *dirname;
|
||||
|
||||
//g_print("recursive load of '%s' in '%s'\n", name, directory);
|
||||
/* g_print("recursive load of '%s' in '%s'\n", name, directory); */
|
||||
dir = opendir(directory);
|
||||
if (dir) {
|
||||
while ((dirent = readdir(dir))) {
|
||||
|
@ -334,7 +337,7 @@ gst_library_load (const gchar *name)
|
|||
libraries = g_list_next(libraries);
|
||||
}
|
||||
|
||||
// for now this is the same
|
||||
/* for now this is the same */
|
||||
res = gst_plugin_load(name);
|
||||
|
||||
if (res) {
|
||||
|
@ -377,7 +380,7 @@ gst_plugin_load (const gchar *name)
|
|||
}
|
||||
g_free(pluginname);
|
||||
libspath = g_strconcat(path->data,"/.libs",NULL);
|
||||
//g_print("trying to load '%s'\n",g_module_build_path(libspath,name));
|
||||
/* g_print("trying to load '%s'\n",g_module_build_path(libspath,name)); */
|
||||
pluginname = g_module_build_path(libspath,name);
|
||||
g_free(libspath);
|
||||
if (gst_plugin_load_absolute(pluginname)) {
|
||||
|
@ -385,7 +388,7 @@ gst_plugin_load (const gchar *name)
|
|||
return TRUE;
|
||||
}
|
||||
g_free(pluginname);
|
||||
//g_print("trying to load '%s' from '%s'\n",name,path->data);
|
||||
/* g_print("trying to load '%s' from '%s'\n",name,path->data); */
|
||||
pluginname = g_module_build_path("",name);
|
||||
if (gst_plugin_load_recurse(path->data,pluginname)) {
|
||||
g_free(pluginname);
|
||||
|
@ -440,8 +443,8 @@ gst_plugin_load_absolute (const gchar *filename)
|
|||
static gboolean
|
||||
gst_plugin_check_version (gint major, gint minor)
|
||||
{
|
||||
// return NULL if the major and minor version numbers are not compatible
|
||||
// with ours.
|
||||
/* return NULL if the major and minor version numbers are not compatible */
|
||||
/* with ours. */
|
||||
if (major != GST_VERSION_MAJOR || minor != GST_VERSION_MINOR)
|
||||
return FALSE;
|
||||
|
||||
|
@ -501,7 +504,7 @@ gst_plugin_load_plugin (GstPlugin *plugin)
|
|||
}
|
||||
|
||||
if (stat (filename, &file_status)) {
|
||||
//g_print("problem opening file %s\n",filename);
|
||||
/* g_print("problem opening file %s\n",filename); */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -523,7 +526,7 @@ gst_plugin_load_plugin (GstPlugin *plugin)
|
|||
}
|
||||
return TRUE;
|
||||
} else if (_gst_plugin_spew) {
|
||||
// FIXME this should be some standard gst mechanism!!!
|
||||
/* FIXME this should be some standard gst mechanism!!! */
|
||||
g_printerr ("error loading plugin %s, reason: %s\n", filename, g_module_error());
|
||||
}
|
||||
else {
|
||||
|
@ -799,7 +802,7 @@ gst_plugin_load_thyself (xmlNodePtr parent)
|
|||
gint featurecount = 0;
|
||||
gchar *pluginname;
|
||||
|
||||
kinderen = parent->xmlChildrenNode; // Dutch invasion :-)
|
||||
kinderen = parent->xmlChildrenNode; /* Dutch invasion :-) */
|
||||
while (kinderen) {
|
||||
if (!strcmp (kinderen->name, "plugin")) {
|
||||
xmlNodePtr field = kinderen->xmlChildrenNode;
|
||||
|
|
|
@ -33,7 +33,7 @@ static void gst_plugin_feature_restore_thyself (GstObject *object, xmlNodePtr
|
|||
#endif /* GST_DISABLE_REGISTRY */
|
||||
|
||||
static GstObjectClass *parent_class = NULL;
|
||||
//static guint gst_plugin_feature_signals[LAST_SIGNAL] = { 0 };
|
||||
/* static guint gst_plugin_feature_signals[LAST_SIGNAL] = { 0 }; */
|
||||
|
||||
GType
|
||||
gst_plugin_feature_get_type (void)
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//#define GST_DEBUG_ENABLED
|
||||
/* #define GST_DEBUG_ENABLED */
|
||||
#include "gst_private.h"
|
||||
|
||||
#include "gstlog.h"
|
||||
|
@ -211,7 +211,7 @@ gst_props_merge_int_entries(GstPropsEntry * newentry, GstPropsEntry * oldentry)
|
|||
old_max = oldentry->data.int_range_data.max;
|
||||
}
|
||||
|
||||
// Put range which starts lower into (new_min, new_max)
|
||||
/* Put range which starts lower into (new_min, new_max) */
|
||||
if (old_min < new_min) {
|
||||
gint tmp;
|
||||
tmp = old_min;
|
||||
|
@ -222,10 +222,10 @@ gst_props_merge_int_entries(GstPropsEntry * newentry, GstPropsEntry * oldentry)
|
|||
new_max = tmp;
|
||||
}
|
||||
|
||||
// new_min is min of either entry - second half of the following conditional
|
||||
// is to avoid overflow problems.
|
||||
/* new_min is min of either entry - second half of the following conditional */
|
||||
/* is to avoid overflow problems. */
|
||||
if (new_max >= old_min - 1 && old_min - 1 < old_min) {
|
||||
// ranges overlap, or are adjacent. Pick biggest maximum.
|
||||
/* ranges overlap, or are adjacent. Pick biggest maximum. */
|
||||
can_merge = TRUE;
|
||||
if (old_max > new_max) new_max = old_max;
|
||||
}
|
||||
|
@ -268,15 +268,15 @@ gst_props_add_to_int_list (GList * entries, GstPropsEntry * newentry)
|
|||
gboolean merged = gst_props_merge_int_entries(newentry, oldentry);
|
||||
|
||||
if (merged) {
|
||||
// replace the existing one with the merged one
|
||||
/* replace the existing one with the merged one */
|
||||
g_mutex_lock (_gst_props_entries_chunk_lock);
|
||||
g_mem_chunk_free (_gst_props_entries_chunk, oldentry);
|
||||
g_mutex_unlock (_gst_props_entries_chunk_lock);
|
||||
entries = g_list_remove_link (entries, i);
|
||||
g_list_free_1 (i);
|
||||
|
||||
// start again: it's possible that this change made an earlier entry
|
||||
// mergeable, and the pointer is now invalid anyway.
|
||||
/* start again: it's possible that this change made an earlier entry */
|
||||
/* mergeable, and the pointer is now invalid anyway. */
|
||||
i = entries;
|
||||
}
|
||||
|
||||
|
@ -310,9 +310,9 @@ gst_props_newv (const gchar *firstname, va_list var_args)
|
|||
GST_PROPS_LIST_T_MISC,
|
||||
} list_types;
|
||||
|
||||
// type of the list
|
||||
/* type of the list */
|
||||
list_types list_type = GST_PROPS_LIST_T_UNSET;
|
||||
// type of current item
|
||||
/* type of current item */
|
||||
list_types entry_type = GST_PROPS_LIST_T_UNSET;
|
||||
|
||||
if (firstname == NULL)
|
||||
|
@ -327,7 +327,7 @@ gst_props_newv (const gchar *firstname, va_list var_args)
|
|||
|
||||
prop_name = firstname;
|
||||
|
||||
// properties
|
||||
/* properties */
|
||||
while (prop_name) {
|
||||
GstPropsEntry *entry;
|
||||
|
||||
|
@ -362,7 +362,7 @@ gst_props_newv (const gchar *firstname, va_list var_args)
|
|||
case GST_PROPS_END_ID:
|
||||
g_return_val_if_fail (inlist == TRUE, NULL);
|
||||
|
||||
// if list was of size 1, replace the list by a the item it contains
|
||||
/* if list was of size 1, replace the list by a the item it contains */
|
||||
if (g_list_length(list_entry->data.list_data.entries) == 1) {
|
||||
GstPropsEntry * subentry = (GstPropsEntry *)(list_entry->data.list_data.entries->data);
|
||||
list_entry->propstype = subentry->propstype;
|
||||
|
@ -504,7 +504,7 @@ gst_props_destroy (GstProps *props)
|
|||
while (entries) {
|
||||
GstPropsEntry *entry = (GstPropsEntry *)entries->data;
|
||||
|
||||
// FIXME also free the lists
|
||||
/* FIXME also free the lists */
|
||||
g_mutex_lock (_gst_props_entries_chunk_lock);
|
||||
g_mem_chunk_free (_gst_props_entries_chunk, entry);
|
||||
g_mutex_unlock (_gst_props_entries_chunk_lock);
|
||||
|
@ -548,7 +548,7 @@ gst_props_copy (GstProps *props)
|
|||
newentry = g_mem_chunk_alloc (_gst_props_entries_chunk);
|
||||
g_mutex_unlock (_gst_props_entries_chunk_lock);
|
||||
|
||||
// FIXME copy lists too
|
||||
/* FIXME copy lists too */
|
||||
memcpy (newentry, entry, sizeof (GstPropsEntry));
|
||||
|
||||
new->properties = g_list_prepend (new->properties, newentry);
|
||||
|
@ -764,7 +764,7 @@ gst_props_merge (GstProps *props, GstProps *tomerge)
|
|||
|
||||
merge_props = tomerge->properties;
|
||||
|
||||
// FIXME do proper merging here...
|
||||
/* FIXME do proper merging here... */
|
||||
while (merge_props) {
|
||||
GstPropsEntry *entry = (GstPropsEntry *)merge_props->data;
|
||||
|
||||
|
@ -806,7 +806,7 @@ gst_props_entry_check_compatibility (GstPropsEntry *entry1, GstPropsEntry *entry
|
|||
case GST_PROPS_LIST_ID:
|
||||
{
|
||||
GList *entrylist = entry1->data.list_data.entries;
|
||||
gboolean valid = TRUE; // innocent until proven guilty
|
||||
gboolean valid = TRUE; /* innocent until proven guilty */
|
||||
|
||||
while (entrylist && valid) {
|
||||
GstPropsEntry *entry = (GstPropsEntry *) entrylist->data;
|
||||
|
@ -820,7 +820,7 @@ gst_props_entry_check_compatibility (GstPropsEntry *entry1, GstPropsEntry *entry
|
|||
}
|
||||
case GST_PROPS_INT_RANGE_ID:
|
||||
switch (entry2->propstype) {
|
||||
// a - b <---> a - c
|
||||
/* a - b <---> a - c */
|
||||
case GST_PROPS_INT_RANGE_ID:
|
||||
return (entry2->data.int_range_data.min <= entry1->data.int_range_data.min &&
|
||||
entry2->data.int_range_data.max >= entry1->data.int_range_data.max);
|
||||
|
@ -832,7 +832,7 @@ gst_props_entry_check_compatibility (GstPropsEntry *entry1, GstPropsEntry *entry
|
|||
break;
|
||||
case GST_PROPS_FLOAT_RANGE_ID:
|
||||
switch (entry2->propstype) {
|
||||
// a - b <---> a - c
|
||||
/* a - b <---> a - c */
|
||||
case GST_PROPS_FLOAT_RANGE_ID:
|
||||
return (entry2->data.float_range_data.min <= entry1->data.float_range_data.min &&
|
||||
entry2->data.float_range_data.max >= entry1->data.float_range_data.max);
|
||||
|
@ -844,10 +844,10 @@ gst_props_entry_check_compatibility (GstPropsEntry *entry1, GstPropsEntry *entry
|
|||
break;
|
||||
case GST_PROPS_FOURCC_ID:
|
||||
switch (entry2->propstype) {
|
||||
// b <---> a
|
||||
/* b <---> a */
|
||||
case GST_PROPS_FOURCC_ID:
|
||||
return (entry2->data.fourcc_data == entry1->data.fourcc_data);
|
||||
// b <---> a,b,c
|
||||
/* b <---> a,b,c */
|
||||
case GST_PROPS_LIST_ID:
|
||||
return gst_props_entry_check_list_compatibility (entry1, entry2);
|
||||
default:
|
||||
|
@ -856,17 +856,17 @@ gst_props_entry_check_compatibility (GstPropsEntry *entry1, GstPropsEntry *entry
|
|||
break;
|
||||
case GST_PROPS_INT_ID:
|
||||
switch (entry2->propstype) {
|
||||
// b <---> a - d
|
||||
/* b <---> a - d */
|
||||
case GST_PROPS_INT_RANGE_ID:
|
||||
GST_DEBUG(GST_CAT_PROPERTIES,"%d <= %d <= %d ?\n",entry2->data.int_range_data.min,
|
||||
entry1->data.int_data,entry2->data.int_range_data.max);
|
||||
return (entry2->data.int_range_data.min <= entry1->data.int_data &&
|
||||
entry2->data.int_range_data.max >= entry1->data.int_data);
|
||||
// b <---> a
|
||||
/* b <---> a */
|
||||
case GST_PROPS_INT_ID:
|
||||
GST_DEBUG(GST_CAT_PROPERTIES,"%d == %d ?\n",entry1->data.int_data,entry2->data.int_data);
|
||||
return (entry2->data.int_data == entry1->data.int_data);
|
||||
// b <---> a,b,c
|
||||
/* b <---> a,b,c */
|
||||
case GST_PROPS_LIST_ID:
|
||||
return gst_props_entry_check_list_compatibility (entry1, entry2);
|
||||
default:
|
||||
|
@ -875,14 +875,14 @@ gst_props_entry_check_compatibility (GstPropsEntry *entry1, GstPropsEntry *entry
|
|||
break;
|
||||
case GST_PROPS_FLOAT_ID:
|
||||
switch (entry2->propstype) {
|
||||
// b <---> a - d
|
||||
/* b <---> a - d */
|
||||
case GST_PROPS_FLOAT_RANGE_ID:
|
||||
return (entry2->data.float_range_data.min <= entry1->data.float_data &&
|
||||
entry2->data.float_range_data.max >= entry1->data.float_data);
|
||||
// b <---> a
|
||||
/* b <---> a */
|
||||
case GST_PROPS_FLOAT_ID:
|
||||
return (entry2->data.float_data == entry1->data.float_data);
|
||||
// b <---> a,b,c
|
||||
/* b <---> a,b,c */
|
||||
case GST_PROPS_LIST_ID:
|
||||
return gst_props_entry_check_list_compatibility (entry1, entry2);
|
||||
default:
|
||||
|
@ -891,7 +891,7 @@ gst_props_entry_check_compatibility (GstPropsEntry *entry1, GstPropsEntry *entry
|
|||
break;
|
||||
case GST_PROPS_BOOL_ID:
|
||||
switch (entry2->propstype) {
|
||||
// t <---> t
|
||||
/* t <---> t */
|
||||
case GST_PROPS_BOOL_ID:
|
||||
return (entry2->data.bool_data == entry1->data.bool_data);
|
||||
case GST_PROPS_LIST_ID:
|
||||
|
@ -901,7 +901,7 @@ gst_props_entry_check_compatibility (GstPropsEntry *entry1, GstPropsEntry *entry
|
|||
}
|
||||
case GST_PROPS_STRING_ID:
|
||||
switch (entry2->propstype) {
|
||||
// t <---> t
|
||||
/* t <---> t */
|
||||
case GST_PROPS_STRING_ID:
|
||||
return (!strcmp (entry2->data.string_data.string, entry1->data.string_data.string));
|
||||
case GST_PROPS_LIST_ID:
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//#define DEBUG_ENABLED
|
||||
//#define STATUS_ENABLED
|
||||
/* #define DEBUG_ENABLED */
|
||||
/* #define STATUS_ENABLED */
|
||||
#ifdef STATUS_ENABLED
|
||||
#define STATUS(A) GST_DEBUG(GST_CAT_DATAFLOW, A, GST_ELEMENT_NAME(queue))
|
||||
#else
|
||||
|
@ -104,7 +104,7 @@ queue_leaky_get_type(void) {
|
|||
}
|
||||
|
||||
static GstElementClass *parent_class = NULL;
|
||||
//static guint gst_queue_signals[LAST_SIGNAL] = { 0 };
|
||||
/* static guint gst_queue_signals[LAST_SIGNAL] = { 0 }; */
|
||||
|
||||
GType
|
||||
gst_queue_get_type(void)
|
||||
|
@ -159,7 +159,7 @@ gst_queue_class_init (GstQueueClass *klass)
|
|||
static void
|
||||
gst_queue_init (GstQueue *queue)
|
||||
{
|
||||
// scheduling on this kind of element is, well, interesting
|
||||
/* scheduling on this kind of element is, well, interesting */
|
||||
GST_FLAG_SET (queue, GST_ELEMENT_DECOUPLED);
|
||||
GST_FLAG_SET (queue, GST_ELEMENT_EVENT_AWARE);
|
||||
|
||||
|
@ -178,9 +178,9 @@ gst_queue_init (GstQueue *queue)
|
|||
queue->level_buffers = 0;
|
||||
queue->level_bytes = 0;
|
||||
queue->level_time = 0LL;
|
||||
queue->size_buffers = 100; // 100 buffers
|
||||
queue->size_bytes = 100 * 1024; // 100KB
|
||||
queue->size_time = 1000000000LL; // 1sec
|
||||
queue->size_buffers = 100; /* 100 buffers */
|
||||
queue->size_bytes = 100 * 1024; /* 100KB */
|
||||
queue->size_time = 1000000000LL; /* 1sec */
|
||||
|
||||
queue->qlock = g_mutex_new ();
|
||||
queue->reader = FALSE;
|
||||
|
@ -290,10 +290,10 @@ restart:
|
|||
GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "adding buffer %p of size %d\n",buf,GST_BUFFER_SIZE(buf));
|
||||
|
||||
if (queue->level_buffers == queue->size_buffers) {
|
||||
// if this is a leaky queue...
|
||||
/* if this is a leaky queue... */
|
||||
if (queue->leaky) {
|
||||
// FIXME don't want to leak events!
|
||||
// if we leak on the upstream side, drop the current buffer
|
||||
/* FIXME don't want to leak events! */
|
||||
/* if we leak on the upstream side, drop the current buffer */
|
||||
if (queue->leaky == GST_QUEUE_LEAK_UPSTREAM) {
|
||||
GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "queue is full, leaking buffer on upstream end\n");
|
||||
if (GST_IS_EVENT (buf))
|
||||
|
@ -302,11 +302,11 @@ restart:
|
|||
GST_EVENT_TYPE(GST_EVENT(buf)));
|
||||
GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "queue is full, leaking buffer on upstream end\n");
|
||||
gst_buffer_unref(buf);
|
||||
// now we have to clean up and exit right away
|
||||
/* now we have to clean up and exit right away */
|
||||
g_mutex_unlock (queue->qlock);
|
||||
return;
|
||||
}
|
||||
// otherwise we have to push a buffer off the other end
|
||||
/* otherwise we have to push a buffer off the other end */
|
||||
else {
|
||||
GSList *front;
|
||||
GstBuffer *leakbuf;
|
||||
|
@ -328,8 +328,8 @@ restart:
|
|||
GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "pre full wait, level:%d/%d\n",
|
||||
queue->level_buffers, queue->size_buffers);
|
||||
while (queue->level_buffers == queue->size_buffers) {
|
||||
// if there's a pending state change for this queue or its manager, switch
|
||||
// back to iterator so bottom half of state change executes
|
||||
/* if there's a pending state change for this queue or its manager, switch */
|
||||
/* back to iterator so bottom half of state change executes */
|
||||
while (GST_STATE (queue) != GST_STATE_PLAYING) {
|
||||
GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "interrupted!!\n");
|
||||
g_mutex_unlock (queue->qlock);
|
||||
|
@ -395,8 +395,9 @@ restart:
|
|||
|
||||
GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "pre empty wait, level:%d/%d\n", queue->level_buffers, queue->size_buffers);
|
||||
while (queue->level_buffers == 0) {
|
||||
// if there's a pending state change for this queue or its manager, switch
|
||||
// back to iterator so bottom half of state change executes
|
||||
/* if there's a pending state change for this queue or its manager, switch
|
||||
* back to iterator so bottom half of state change executes
|
||||
*/
|
||||
while (GST_STATE (queue) != GST_STATE_PLAYING) {
|
||||
GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "interrupted!!\n");
|
||||
g_mutex_unlock (queue->qlock);
|
||||
|
@ -438,7 +439,7 @@ restart:
|
|||
g_cond_signal (queue->not_full);
|
||||
}
|
||||
|
||||
// FIXME where should this be? locked?
|
||||
/* FIXME where should this be? locked? */
|
||||
if (GST_IS_EVENT(buf)) {
|
||||
GstEvent *event = GST_EVENT(buf);
|
||||
switch (GST_EVENT_TYPE(event)) {
|
||||
|
@ -466,8 +467,9 @@ gst_queue_change_state (GstElement *element)
|
|||
|
||||
GST_DEBUG_ENTER("('%s')", GST_ELEMENT_NAME (element));
|
||||
|
||||
// lock the queue so another thread (not in sync with this thread's state)
|
||||
// can't call this queue's _get (or whatever)
|
||||
/* lock the queue so another thread (not in sync with this thread's state)
|
||||
* can't call this queue's _get (or whatever)
|
||||
*/
|
||||
g_mutex_lock (queue->qlock);
|
||||
|
||||
new_state = GST_STATE_PENDING (element);
|
||||
|
@ -481,7 +483,7 @@ gst_queue_change_state (GstElement *element)
|
|||
}
|
||||
else if (new_state == GST_STATE_PLAYING) {
|
||||
if (!GST_PAD_CONNECTED (queue->sinkpad)) {
|
||||
// FIXME can this be?
|
||||
/* FIXME can this be? */
|
||||
if (queue->reader)
|
||||
g_cond_signal (queue->not_empty);
|
||||
g_mutex_unlock (queue->qlock);
|
||||
|
|
|
@ -242,7 +242,7 @@ static void gst_schedulerfactory_restore_thyself (GstObject *object, xmlNodeP
|
|||
#endif
|
||||
|
||||
static GstPluginFeatureClass *factory_parent_class = NULL;
|
||||
//static guint gst_schedulerfactory_signals[LAST_SIGNAL] = { 0 };
|
||||
/* static guint gst_schedulerfactory_signals[LAST_SIGNAL] = { 0 }; */
|
||||
|
||||
GType
|
||||
gst_schedulerfactory_get_type (void)
|
||||
|
@ -339,7 +339,7 @@ gst_schedulerfactory_destroy (GstSchedulerFactory *factory)
|
|||
|
||||
_gst_schedulerfactories = g_list_remove (_gst_schedulerfactories, factory);
|
||||
|
||||
// we don't free the struct bacause someone might have a handle to it..
|
||||
/* we don't free the struct bacause someone might have a handle to it.. */
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include <unistd.h>
|
||||
|
||||
//#define GST_DEBUG_ENABLED
|
||||
/* #define GST_DEBUG_ENABLED */
|
||||
#include "gst_private.h"
|
||||
|
||||
#include "gstthread.h"
|
||||
|
@ -75,7 +75,7 @@ static void gst_thread_restore_thyself (GstObject *object, xmlNodePtr self);
|
|||
static void* gst_thread_main_loop (void *arg);
|
||||
|
||||
static GstBinClass *parent_class = NULL;
|
||||
//static guint gst_thread_signals[LAST_SIGNAL] = { 0 };
|
||||
/* static guint gst_thread_signals[LAST_SIGNAL] = { 0 }; */
|
||||
|
||||
GType
|
||||
gst_thread_get_type(void) {
|
||||
|
@ -123,7 +123,7 @@ gst_thread_class_init (GstThreadClass *klass)
|
|||
|
||||
gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_thread_change_state);
|
||||
|
||||
// gstbin_class->schedule = gst_thread_schedule_dummy;
|
||||
/* gstbin_class->schedule = gst_thread_schedule_dummy; */
|
||||
|
||||
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_thread_set_property);
|
||||
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_thread_get_property);
|
||||
|
@ -136,7 +136,7 @@ gst_thread_init (GstThread *thread)
|
|||
|
||||
GST_DEBUG (GST_CAT_THREAD,"initializing thread\n");
|
||||
|
||||
// we're a manager by default
|
||||
/* we're a manager by default */
|
||||
GST_FLAG_SET (thread, GST_BIN_FLAG_MANAGER);
|
||||
|
||||
thread->lock = g_mutex_new();
|
||||
|
@ -148,7 +148,7 @@ gst_thread_init (GstThread *thread)
|
|||
thread->ppid = getpid();
|
||||
thread->thread_id = -1;
|
||||
|
||||
// gst_element_set_manager(GST_ELEMENT(thread),GST_ELEMENT(thread));
|
||||
/* gst_element_set_manager(GST_ELEMENT(thread),GST_ELEMENT(thread)); */
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -227,9 +227,9 @@ gst_thread_new (const gchar *name)
|
|||
static GstElementStateReturn
|
||||
gst_thread_update_state (GstThread *thread)
|
||||
{
|
||||
// check for state change
|
||||
/* check for state change */
|
||||
if (GST_STATE_PENDING(thread) != GST_STATE_VOID_PENDING) {
|
||||
// punt and change state on all the children
|
||||
/* punt and change state on all the children */
|
||||
if (GST_ELEMENT_CLASS (parent_class)->change_state)
|
||||
return GST_ELEMENT_CLASS (parent_class)->change_state (GST_ELEMENT(thread));
|
||||
}
|
||||
|
@ -265,17 +265,17 @@ gst_thread_change_state (GstElement * element)
|
|||
|
||||
switch (transition) {
|
||||
case GST_STATE_NULL_TO_READY:
|
||||
// set the state to idle
|
||||
/* set the state to idle */
|
||||
GST_FLAG_UNSET (thread, GST_THREAD_STATE_SPINNING);
|
||||
|
||||
THR_DEBUG ("creating thread \"%s\"\n", GST_ELEMENT_NAME (element));
|
||||
|
||||
g_mutex_lock (thread->lock);
|
||||
|
||||
// create the thread
|
||||
/* create the thread */
|
||||
pthread_create (&thread->thread_id, NULL, gst_thread_main_loop, thread);
|
||||
|
||||
// wait for it to 'spin up'
|
||||
/* wait for it to 'spin up' */
|
||||
THR_DEBUG ("waiting for child thread spinup\n");
|
||||
g_cond_wait (thread->cond, thread->lock);
|
||||
THR_DEBUG ("thread claims to be up\n");
|
||||
|
@ -307,12 +307,13 @@ gst_thread_change_state (GstElement * element)
|
|||
|
||||
THR_INFO ("pausing thread");
|
||||
|
||||
// the following code ensures that the bottom half of thread will run
|
||||
// to perform each elements' change_state() (by calling gstbin.c::
|
||||
// change_state()).
|
||||
// + the pending state was already set by gstelement.c::set_state()
|
||||
// + find every queue we manage, and signal its empty and full conditions
|
||||
g_mutex_lock (thread->lock);
|
||||
/* the following code ensures that the bottom half of thread will run
|
||||
* to perform each elements' change_state() (by calling gstbin.c::
|
||||
* change_state()).
|
||||
* + the pending state was already set by gstelement.c::set_state()
|
||||
* + find every queue we manage, and signal its empty and full conditions
|
||||
*/
|
||||
g_mutex_lock (thread->lock);
|
||||
|
||||
GST_FLAG_UNSET (thread, GST_THREAD_STATE_SPINNING);
|
||||
|
||||
|
@ -323,11 +324,11 @@ gst_thread_change_state (GstElement * element)
|
|||
THR_DEBUG (" element \"%s\"\n", GST_ELEMENT_NAME (e));
|
||||
elements = g_list_next (elements);
|
||||
if (GST_IS_QUEUE (e)) {
|
||||
//FIXME make this more efficient by only waking queues that are asleep
|
||||
//FIXME and only waking the appropriate condition (depending on if it's
|
||||
//FIXME on up- or down-stream side)
|
||||
//
|
||||
//FIXME also make this more efficient by keeping list of managed queues
|
||||
/* FIXME make this more efficient by only waking queues that are asleep */
|
||||
* FIXME and only waking the appropriate condition (depending on if it's
|
||||
* FIXME on up- or down-stream side)
|
||||
* FIXME also make this more efficient by keeping list of managed queues
|
||||
*/
|
||||
THR_DEBUG ("waking queue \"%s\"\n", GST_ELEMENT_NAME (e));
|
||||
gst_element_set_state (e, GST_STATE_PAUSED);
|
||||
}
|
||||
|
@ -347,14 +348,14 @@ gst_thread_change_state (GstElement * element)
|
|||
|
||||
peerelement = GST_PAD_PARENT (peer);
|
||||
if (!peerelement)
|
||||
continue; // deal with case where there's no peer
|
||||
continue; /* deal with case where there's no peer */
|
||||
|
||||
if (!GST_FLAG_IS_SET (peerelement, GST_ELEMENT_DECOUPLED)) {
|
||||
GST_DEBUG (GST_CAT_THREAD, "peer element isn't DECOUPLED\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
// FIXME this needs to go away eventually
|
||||
/* FIXME this needs to go away eventually */
|
||||
if (!GST_IS_QUEUE (peerelement)) {
|
||||
GST_DEBUG (GST_CAT_THREAD, "peer element isn't a Queue\n");
|
||||
continue;
|
||||
|
@ -364,7 +365,7 @@ gst_thread_change_state (GstElement * element)
|
|||
GstQueue *queue = GST_QUEUE (peerelement);
|
||||
|
||||
THR_DEBUG (" element \"%s\" has pad cross sched boundary\n", GST_ELEMENT_NAME (e));
|
||||
// FIXME!!
|
||||
/* FIXME!! */
|
||||
g_mutex_lock (queue->qlock);
|
||||
g_cond_signal (queue->not_full);
|
||||
g_cond_signal (queue->not_empty);
|
||||
|
@ -383,7 +384,7 @@ gst_thread_change_state (GstElement * element)
|
|||
}
|
||||
case GST_STATE_READY_TO_NULL:
|
||||
THR_DEBUG ("telling thread to pause (null) - and joining\n");
|
||||
//MattH FIXME revisit
|
||||
/* MattH FIXME revisit */
|
||||
g_mutex_lock (thread->lock);
|
||||
THR_DEBUG ("signaling\n");
|
||||
g_cond_signal (thread->cond);
|
||||
|
@ -438,7 +439,7 @@ gst_thread_main_loop (void *arg)
|
|||
thread->pid = getpid();
|
||||
THR_INFO_MAIN("thread is running");
|
||||
|
||||
// first we need to change the state of all the children
|
||||
/* first we need to change the state of all the children */
|
||||
if (GST_ELEMENT_CLASS (parent_class)->change_state) {
|
||||
stateset = GST_ELEMENT_CLASS (parent_class)->change_state (GST_ELEMENT(thread));
|
||||
|
||||
|
@ -450,18 +451,18 @@ gst_thread_main_loop (void *arg)
|
|||
|
||||
THR_DEBUG_MAIN ("indicating spinup\n");
|
||||
g_cond_signal (thread->cond);
|
||||
// don't unlock the mutex because we hold it into the top of the while loop
|
||||
/* don't unlock the mutex because we hold it into the top of the while loop */
|
||||
THR_DEBUG_MAIN ("thread has indicated spinup to parent process\n");
|
||||
|
||||
/***** THREAD IS NOW IN READY STATE *****/
|
||||
|
||||
while (!GST_FLAG_IS_SET (thread, GST_THREAD_STATE_REAPING)) {
|
||||
// NOTE we hold the thread lock at this point
|
||||
// what we do depends on what state we're in
|
||||
/* NOTE we hold the thread lock at this point */
|
||||
/* what we do depends on what state we're in */
|
||||
switch (GST_STATE (thread)) {
|
||||
// NOTE: cannot be in NULL, we're not running in that state at all
|
||||
/* NOTE: cannot be in NULL, we're not running in that state at all */
|
||||
case GST_STATE_READY:
|
||||
// wait to be set to either the NULL or PAUSED states
|
||||
/* wait to be set to either the NULL or PAUSED states */
|
||||
THR_DEBUG_MAIN ("thread in %s state, waiting for either %s or %s\n",
|
||||
gst_element_statename (GST_STATE_READY),
|
||||
gst_element_statename (GST_STATE_NULL),
|
||||
|
@ -471,18 +472,18 @@ gst_thread_main_loop (void *arg)
|
|||
g_assert (GST_STATE_PENDING (thread) == GST_STATE_NULL ||
|
||||
GST_STATE_PENDING (thread) == GST_STATE_PAUSED);
|
||||
|
||||
// been signaled, we need to state transition now and signal back
|
||||
/* been signaled, we need to state transition now and signal back */
|
||||
gst_thread_update_state (thread);
|
||||
THR_DEBUG_MAIN ("done with state transition, signaling back to parent process\n");
|
||||
g_cond_signal (thread->cond);
|
||||
// now we decide what to do next
|
||||
/* now we decide what to do next */
|
||||
if (GST_STATE (thread) == GST_STATE_NULL) {
|
||||
// REAPING must be set, we can simply break this iteration
|
||||
/* REAPING must be set, we can simply break this iteration */
|
||||
GST_FLAG_SET (thread, GST_THREAD_STATE_REAPING);
|
||||
}
|
||||
continue;
|
||||
case GST_STATE_PAUSED:
|
||||
// wait to be set to either the READY or PLAYING states
|
||||
/* wait to be set to either the READY or PLAYING states */
|
||||
THR_DEBUG_MAIN("thread in %s state, waiting for either %s or %s\n",
|
||||
gst_element_statename (GST_STATE_PAUSED),
|
||||
gst_element_statename (GST_STATE_READY),
|
||||
|
@ -492,17 +493,17 @@ gst_thread_main_loop (void *arg)
|
|||
g_assert (GST_STATE_PENDING (thread) == GST_STATE_READY ||
|
||||
GST_STATE_PENDING (thread) == GST_STATE_PLAYING);
|
||||
|
||||
// been signaled, we need to state transition now and signal back
|
||||
/* been signaled, we need to state transition now and signal back */
|
||||
gst_thread_update_state (thread);
|
||||
// now we decide what to do next
|
||||
/* now we decide what to do next */
|
||||
if (GST_STATE (thread) != GST_STATE_PLAYING) {
|
||||
// either READY or the state change failed for some reason
|
||||
/* either READY or the state change failed for some reason */
|
||||
g_cond_signal (thread->cond);
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
GST_FLAG_SET (thread, GST_THREAD_STATE_SPINNING);
|
||||
// PLAYING is coming up, so we can now start spinning
|
||||
/* PLAYING is coming up, so we can now start spinning */
|
||||
while (GST_FLAG_IS_SET (thread, GST_THREAD_STATE_SPINNING)) {
|
||||
gboolean status;
|
||||
|
||||
|
@ -510,33 +511,33 @@ gst_thread_main_loop (void *arg)
|
|||
g_mutex_unlock (thread->lock);
|
||||
status = gst_bin_iterate (GST_BIN (thread));
|
||||
g_mutex_lock (thread->lock);
|
||||
//g_cond_signal(thread->cond);
|
||||
/* g_cond_signal(thread->cond); */
|
||||
|
||||
if (!status || GST_STATE_PENDING (thread) != GST_STATE_VOID_PENDING)
|
||||
GST_FLAG_UNSET (thread, GST_THREAD_STATE_SPINNING);
|
||||
}
|
||||
// looks like we were stopped because of a statechange
|
||||
/* looks like we were stopped because of a statechange */
|
||||
if (GST_STATE_PENDING (thread)) {
|
||||
gst_thread_update_state (thread);
|
||||
}
|
||||
// once we're here, SPINNING has stopped, we should signal that we're done
|
||||
/* once we're here, SPINNING has stopped, we should signal that we're done */
|
||||
THR_DEBUG_MAIN ("SPINNING stopped, signaling back to parent process\n");
|
||||
g_cond_signal (thread->cond);
|
||||
// now we can wait for PAUSED
|
||||
/* now we can wait for PAUSED */
|
||||
continue;
|
||||
}
|
||||
case GST_STATE_PLAYING:
|
||||
// wait to be set to PAUSED
|
||||
/* wait to be set to PAUSED */
|
||||
THR_DEBUG_MAIN ("thread in %s state, waiting for %s\n",
|
||||
gst_element_statename(GST_STATE_PLAYING),
|
||||
gst_element_statename(GST_STATE_PAUSED));
|
||||
g_cond_wait (thread->cond,thread->lock);
|
||||
|
||||
// been signaled, we need to state transition now and signal back
|
||||
/* been signaled, we need to state transition now and signal back */
|
||||
gst_thread_update_state (thread);
|
||||
g_cond_signal (thread->cond);
|
||||
// now we decide what to do next
|
||||
// there's only PAUSED, we we just wait for it
|
||||
/* now we decide what to do next */
|
||||
/* there's only PAUSED, we we just wait for it */
|
||||
continue;
|
||||
case GST_STATE_NULL:
|
||||
THR_DEBUG_MAIN ("thread in %s state, preparing to die\n",
|
||||
|
@ -548,7 +549,7 @@ gst_thread_main_loop (void *arg)
|
|||
break;
|
||||
}
|
||||
}
|
||||
// since we don't unlock at the end of the while loop, do it here
|
||||
/* since we don't unlock at the end of the while loop, do it here */
|
||||
g_mutex_unlock (thread->lock);
|
||||
|
||||
GST_INFO (GST_CAT_THREAD, "gstthread: thread \"%s\" is stopped",
|
||||
|
@ -575,4 +576,4 @@ gst_thread_restore_thyself (GstObject *object,
|
|||
if (GST_OBJECT_CLASS (parent_class)->restore_thyself)
|
||||
GST_OBJECT_CLASS (parent_class)->restore_thyself (object, self);
|
||||
}
|
||||
#endif // GST_DISABLE_LOADSAVE
|
||||
#endif /* GST_DISABLE_LOADSAVE */
|
||||
|
|
|
@ -151,11 +151,11 @@ gst_timecache_set_group(GstTimeCache *tc, gint groupnum)
|
|||
GList *list;
|
||||
GstTimeCacheGroup *tcgroup;
|
||||
|
||||
// first check for null change
|
||||
/* first check for null change */
|
||||
if (groupnum == tc->curgroup->groupnum)
|
||||
return TRUE;
|
||||
|
||||
// else search for the proper group
|
||||
/* else search for the proper group */
|
||||
list = tc->groups;
|
||||
while (list) {
|
||||
tcgroup = (GstTimeCacheGroup *)(list->data);
|
||||
|
@ -167,7 +167,7 @@ gst_timecache_set_group(GstTimeCache *tc, gint groupnum)
|
|||
}
|
||||
}
|
||||
|
||||
// couldn't find the group in question
|
||||
/* couldn't find the group in question */
|
||||
GST_DEBUG(0, "couldn't find timecache group %d\n",groupnum);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -216,10 +216,10 @@ gst_timecache_add_entry (GstTimeCache *tc, guint64 location, gint64 timestamp)
|
|||
entry->location = location;
|
||||
entry->timestamp = timestamp;
|
||||
|
||||
// add the entry to the list
|
||||
/* add the entry to the list */
|
||||
tc->curgroup->entries = g_list_prepend(tc->curgroup->entries,entry);
|
||||
|
||||
// update the bounds
|
||||
/* update the bounds */
|
||||
if (tc->curgroup->mintimestamp > timestamp) tc->curgroup->mintimestamp = timestamp;
|
||||
if (tc->curgroup->maxtimestamp < timestamp) tc->curgroup->maxtimestamp = timestamp;
|
||||
if (tc->curgroup->minlocation > location) tc->curgroup->minlocation = location;
|
||||
|
@ -253,7 +253,7 @@ gst_timecache_find_location (GstTimeCache *tc, guint64 location, gint64 *timesta
|
|||
GList *list;
|
||||
GstTimeCacheEntry *entry = NULL;
|
||||
|
||||
// first check to see if it's in the current group
|
||||
/* first check to see if it's in the current group */
|
||||
if ((tc->curgroup->minlocation <= location) && (location <= tc->curgroup->maxlocation)) {
|
||||
GST_DEBUG(0, "location %Ld is in group %d\n",location,tc->curgroup->groupnum);
|
||||
list = g_list_find_custom(tc->curgroup->entries,&location,(GCompareFunc)_gst_timecache_find_location);
|
||||
|
@ -262,9 +262,9 @@ gst_timecache_find_location (GstTimeCache *tc, guint64 location, gint64 *timesta
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
// TODO: search other groups
|
||||
/* TODO: search other groups */
|
||||
|
||||
// failure
|
||||
/* failure */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -294,7 +294,7 @@ gst_timecache_find_timestamp (GstTimeCache *tc, gint64 timestamp, guint64 *locat
|
|||
GstTimeCacheEntry *entry = NULL;
|
||||
GstTimeCacheGroup *group;
|
||||
|
||||
// first check to see if it's in the current group
|
||||
/* first check to see if it's in the current group */
|
||||
if ((tc->curgroup->mintimestamp <= timestamp) && (timestamp <= tc->curgroup->maxtimestamp)) {
|
||||
GST_DEBUG(0, "timestamp %Ld may be in group %d\n",timestamp,tc->curgroup->groupnum);
|
||||
entries = g_list_find_custom(tc->curgroup->entries,×tamp,(GCompareFunc)_gst_timecache_find_timestamp);
|
||||
|
@ -321,7 +321,7 @@ gst_timecache_find_timestamp (GstTimeCache *tc, gint64 timestamp, guint64 *locat
|
|||
}
|
||||
}
|
||||
|
||||
// failure
|
||||
/* failure */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ static void gst_typefactory_restore_thyself (GstObject *object, xmlNodePtr par
|
|||
static void gst_typefactory_unload_thyself (GstPluginFeature *feature);
|
||||
|
||||
static GstPluginFeatureClass *parent_class = NULL;
|
||||
//static guint gst_typefactory_signals[LAST_SIGNAL] = { 0 };
|
||||
/* static guint gst_typefactory_signals[LAST_SIGNAL] = { 0 }; */
|
||||
|
||||
GType
|
||||
gst_typefactory_get_type (void)
|
||||
|
@ -156,7 +156,7 @@ gst_type_register (GstTypeFactory *factory)
|
|||
|
||||
g_return_val_if_fail (factory != NULL, 0);
|
||||
|
||||
// GST_INFO (GST_CAT_TYPES,"type register %s", factory->mime);
|
||||
/* GST_INFO (GST_CAT_TYPES,"type register %s", factory->mime); */
|
||||
id = gst_type_find_by_mime (factory->mime);
|
||||
|
||||
if (!id) {
|
||||
|
@ -196,12 +196,12 @@ gst_type_find_by_mime_func (const gchar *mime)
|
|||
g_return_val_if_fail (mime != NULL, 0);
|
||||
|
||||
walk = _gst_types;
|
||||
// GST_DEBUG (GST_CAT_TYPES,"searching for '%s'\n",mime);
|
||||
/* GST_DEBUG (GST_CAT_TYPES,"searching for '%s'\n",mime); */
|
||||
mimelen = strlen (mime);
|
||||
while (walk) {
|
||||
type = (GstType *)walk->data;
|
||||
search = type->mime;
|
||||
// GST_DEBUG (GST_CAT_TYPES,"checking against '%s'\n",search);
|
||||
/* GST_DEBUG (GST_CAT_TYPES,"checking against '%s'\n",search); */
|
||||
typelen = strlen (search);
|
||||
while ((search - type->mime) < typelen) {
|
||||
found = strstr (search, mime);
|
||||
|
@ -248,7 +248,7 @@ gst_type_find_by_mime (const gchar *mime)
|
|||
guint16
|
||||
gst_type_find_by_ext (const gchar *ext)
|
||||
{
|
||||
//FIXME
|
||||
/* FIXME */
|
||||
g_warning ("gsttype: find_by_ext not implemented");
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include "gsttypefind.h"
|
||||
|
||||
//#define GST_DEBUG_ENABLED
|
||||
/* #define GST_DEBUG_ENABLED */
|
||||
|
||||
GstElementDetails gst_typefind_details = {
|
||||
"TypeFind",
|
||||
|
|
|
@ -174,7 +174,7 @@ gst_util_get_string_arg (GObject * object, const gchar * argname)
|
|||
g_value_init (&value, G_TYPE_STRING);
|
||||
g_object_get_property (G_OBJECT (object), argname, &value);
|
||||
|
||||
return g_value_get_string (&value); // memleak?
|
||||
return g_value_get_string (&value); /* memleak? */
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -357,11 +357,11 @@ gst_util_set_object_arg (GObject * object, const gchar * name, const gchar * val
|
|||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------
|
||||
//
|
||||
// The following code will be moved out of the main
|
||||
// gstreamer library someday.
|
||||
//
|
||||
/* -----------------------------------------------------
|
||||
*
|
||||
* The following code will be moved out of the main
|
||||
* gstreamer library someday.
|
||||
*/
|
||||
|
||||
#include "gstpad.h"
|
||||
#include "gsttype.h"
|
||||
|
|
|
@ -240,7 +240,7 @@ gst_xml_object_loaded (GstObject *private, GstObject *object, xmlNodePtr self, g
|
|||
{
|
||||
GstXML *xml = GST_XML (data);
|
||||
|
||||
// FIXME check that this element was created from the same xmlDocPtr...
|
||||
/* FIXME check that this element was created from the same xmlDocPtr...*/
|
||||
g_signal_emit (G_OBJECT (xml), gst_xml_signals[OBJECT_LOADED], 0, object, self);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//#define DEBUG_ENABLED
|
||||
//#define STATUS_ENABLED
|
||||
/* #define DEBUG_ENABLED */
|
||||
/* #define STATUS_ENABLED */
|
||||
#ifdef STATUS_ENABLED
|
||||
#define STATUS(A) GST_DEBUG(GST_CAT_DATAFLOW, A, GST_ELEMENT_NAME(queue))
|
||||
#else
|
||||
|
@ -104,7 +104,7 @@ queue_leaky_get_type(void) {
|
|||
}
|
||||
|
||||
static GstElementClass *parent_class = NULL;
|
||||
//static guint gst_queue_signals[LAST_SIGNAL] = { 0 };
|
||||
/* static guint gst_queue_signals[LAST_SIGNAL] = { 0 }; */
|
||||
|
||||
GType
|
||||
gst_queue_get_type(void)
|
||||
|
@ -159,7 +159,7 @@ gst_queue_class_init (GstQueueClass *klass)
|
|||
static void
|
||||
gst_queue_init (GstQueue *queue)
|
||||
{
|
||||
// scheduling on this kind of element is, well, interesting
|
||||
/* scheduling on this kind of element is, well, interesting */
|
||||
GST_FLAG_SET (queue, GST_ELEMENT_DECOUPLED);
|
||||
GST_FLAG_SET (queue, GST_ELEMENT_EVENT_AWARE);
|
||||
|
||||
|
@ -178,9 +178,9 @@ gst_queue_init (GstQueue *queue)
|
|||
queue->level_buffers = 0;
|
||||
queue->level_bytes = 0;
|
||||
queue->level_time = 0LL;
|
||||
queue->size_buffers = 100; // 100 buffers
|
||||
queue->size_bytes = 100 * 1024; // 100KB
|
||||
queue->size_time = 1000000000LL; // 1sec
|
||||
queue->size_buffers = 100; /* 100 buffers */
|
||||
queue->size_bytes = 100 * 1024; /* 100KB */
|
||||
queue->size_time = 1000000000LL; /* 1sec */
|
||||
|
||||
queue->qlock = g_mutex_new ();
|
||||
queue->reader = FALSE;
|
||||
|
@ -290,10 +290,10 @@ restart:
|
|||
GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "adding buffer %p of size %d\n",buf,GST_BUFFER_SIZE(buf));
|
||||
|
||||
if (queue->level_buffers == queue->size_buffers) {
|
||||
// if this is a leaky queue...
|
||||
/* if this is a leaky queue... */
|
||||
if (queue->leaky) {
|
||||
// FIXME don't want to leak events!
|
||||
// if we leak on the upstream side, drop the current buffer
|
||||
/* FIXME don't want to leak events! */
|
||||
/* if we leak on the upstream side, drop the current buffer */
|
||||
if (queue->leaky == GST_QUEUE_LEAK_UPSTREAM) {
|
||||
GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "queue is full, leaking buffer on upstream end\n");
|
||||
if (GST_IS_EVENT (buf))
|
||||
|
@ -302,11 +302,11 @@ restart:
|
|||
GST_EVENT_TYPE(GST_EVENT(buf)));
|
||||
GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "queue is full, leaking buffer on upstream end\n");
|
||||
gst_buffer_unref(buf);
|
||||
// now we have to clean up and exit right away
|
||||
/* now we have to clean up and exit right away */
|
||||
g_mutex_unlock (queue->qlock);
|
||||
return;
|
||||
}
|
||||
// otherwise we have to push a buffer off the other end
|
||||
/* otherwise we have to push a buffer off the other end */
|
||||
else {
|
||||
GSList *front;
|
||||
GstBuffer *leakbuf;
|
||||
|
@ -328,8 +328,8 @@ restart:
|
|||
GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "pre full wait, level:%d/%d\n",
|
||||
queue->level_buffers, queue->size_buffers);
|
||||
while (queue->level_buffers == queue->size_buffers) {
|
||||
// if there's a pending state change for this queue or its manager, switch
|
||||
// back to iterator so bottom half of state change executes
|
||||
/* if there's a pending state change for this queue or its manager, switch */
|
||||
/* back to iterator so bottom half of state change executes */
|
||||
while (GST_STATE (queue) != GST_STATE_PLAYING) {
|
||||
GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "interrupted!!\n");
|
||||
g_mutex_unlock (queue->qlock);
|
||||
|
@ -395,8 +395,9 @@ restart:
|
|||
|
||||
GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "pre empty wait, level:%d/%d\n", queue->level_buffers, queue->size_buffers);
|
||||
while (queue->level_buffers == 0) {
|
||||
// if there's a pending state change for this queue or its manager, switch
|
||||
// back to iterator so bottom half of state change executes
|
||||
/* if there's a pending state change for this queue or its manager, switch
|
||||
* back to iterator so bottom half of state change executes
|
||||
*/
|
||||
while (GST_STATE (queue) != GST_STATE_PLAYING) {
|
||||
GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "interrupted!!\n");
|
||||
g_mutex_unlock (queue->qlock);
|
||||
|
@ -438,7 +439,7 @@ restart:
|
|||
g_cond_signal (queue->not_full);
|
||||
}
|
||||
|
||||
// FIXME where should this be? locked?
|
||||
/* FIXME where should this be? locked? */
|
||||
if (GST_IS_EVENT(buf)) {
|
||||
GstEvent *event = GST_EVENT(buf);
|
||||
switch (GST_EVENT_TYPE(event)) {
|
||||
|
@ -466,8 +467,9 @@ gst_queue_change_state (GstElement *element)
|
|||
|
||||
GST_DEBUG_ENTER("('%s')", GST_ELEMENT_NAME (element));
|
||||
|
||||
// lock the queue so another thread (not in sync with this thread's state)
|
||||
// can't call this queue's _get (or whatever)
|
||||
/* lock the queue so another thread (not in sync with this thread's state)
|
||||
* can't call this queue's _get (or whatever)
|
||||
*/
|
||||
g_mutex_lock (queue->qlock);
|
||||
|
||||
new_state = GST_STATE_PENDING (element);
|
||||
|
@ -481,7 +483,7 @@ gst_queue_change_state (GstElement *element)
|
|||
}
|
||||
else if (new_state == GST_STATE_PLAYING) {
|
||||
if (!GST_PAD_CONNECTED (queue->sinkpad)) {
|
||||
// FIXME can this be?
|
||||
/* FIXME can this be? */
|
||||
if (queue->reader)
|
||||
g_cond_signal (queue->not_empty);
|
||||
g_mutex_unlock (queue->qlock);
|
||||
|
|
Loading…
Reference in a new issue