klass->elementfactory = NULL;
klass->padtemplates = NULL;
klass->numpadtemplates = 0;
- klass->send_event = NULL;
- klass->query = NULL;
}
static void
GST_DEBUG_PAD_NAME (pad));
if (GST_PAD_DIRECTION (pad) == dir) {
- /*
- * FIXME: for some reason a ghosted pad doesn't get it's flag
- * set, which makes this check fail for them.
if (GST_PAD_IS_USABLE (pad)) {
- */
return pad;
- /*
}
- else
+ else {
GST_DEBUG (GST_CAT_ELEMENT_PADS, "pad %s:%s is not usable",
GST_DEBUG_PAD_NAME (pad));
- */
+ }
}
- else
+ else {
GST_DEBUG (GST_CAT_ELEMENT_PADS, "pad %s:%s is in wrong direction",
GST_DEBUG_PAD_NAME (pad));
+ }
+
pads = g_list_next (pads);
}
return NULL;
};
typedef enum {
- GST_ACCOCIATION_FLAG_NONE = 0,
- GST_ACCOCIATION_FLAG_KEY_UNIT = (1 << 0),
+ GST_ASSOCIATION_FLAG_NONE = 0,
+ GST_ASSOCIATION_FLAG_KEY_UNIT = (1 << 0),
/* new flags should start here */
- GST_ACCOCIATION_FLAG_LAST = (1 << 8),
+ GST_ASSOCIATION_FLAG_LAST = (1 << 8),
} GstAssocFlags;
#define GST_INDEX_FORMAT_FORMAT(entry) ((entry)->data.format.format)
/* Some check functions (unused?) */
#define GST_PAD_IS_CONNECTED(pad) (GST_PAD_PEER(pad) != NULL)
-#define GST_PAD_IS_ACTIVE(pad) (!GST_FLAG_IS_SET(pad, GST_PAD_DISABLED))
+#define GST_PAD_IS_ACTIVE(pad) (!GST_FLAG_IS_SET(GST_PAD_REALIZE(pad), GST_PAD_DISABLED))
#define GST_PAD_IS_USABLE(pad) (GST_PAD_IS_CONNECTED (pad) && \
GST_PAD_IS_ACTIVE(pad) && GST_PAD_IS_ACTIVE(GST_PAD_PEER (pad)))
#define GST_PAD_CAN_PULL(pad) (GST_IS_REAL_PAD(pad) && GST_REAL_PAD(pad)->gethandler != NULL)
#if defined (__i386__) && defined (__GNUC__) && __GNUC__ >= 2
+#ifdef GST_CONFIG_NO_SMP
+#define SMP_LOCK ""
+#else
+#define SMP_LOCK "lock ; "
+#endif
+
/*
* intel ia32 optimized lockfree implementations
*/
__asm__ __volatile__ (
"1: \n\t"
" movl %2, (%1); \n\t" /* mem->next == stack->head */
- " lock; cmpxchg %1, %0; \n\t" /* if head unchanged, move mem into it */
+ SMP_LOCK "cmpxchg %1, %0; \n\t" /* if head unchanged, move mem into it */
" jnz 1b; \n" /* head changed, retry */
:
: "m" (*stack),
" movl (%%eax), %%ebx; \n\t" /* take value pointed to by head (head->next) */
" movl %%edx, %%ecx; \n\t" /* take counter */
" incl %%ecx; \n\t" /* and increment */
- " lock; cmpxchg8b %1; \n\t" /* if eax:edx == *stack, move ebx:ecx to *stack,
+ SMP_LOCK "cmpxchg8b %1; \n\t" /* if eax:edx == *stack, move ebx:ecx to *stack,
* else *stack is moved into eax:edx again... */
" jnz 10b; \n\t" /* ... and we retry */
"20: \n"
g_free (stack);
}
-#endif /* defined (G_CAN_INLINE) || defined (__GST_TRASH_STACK_C__)*/
+#endif /* defined (GST_CAN_INLINE) || defined (__GST_TRASH_STACK_C__)*/
G_END_DECLS