+2006-02-28 Wim Taymans <wim@fluendo.com>
+
+ * gst/gstbin.c: (gst_bin_get_type), (gst_bin_handle_message_func):
+ Help the compiler a bit with type registration.
+ Use existing forward cod path instead of duplicating it when
+ handling a message.
+
+ * gst/gstbus.c: (gst_bus_get_type):
+ * gst/gstcaps.c: (gst_caps_get_type), (gst_static_caps_get_type):
+ * gst/gstchildproxy.c: (gst_child_proxy_get_type):
+ * gst/gstclock.c: (gst_clock_get_type):
+ * gst/gstelement.c: (gst_element_get_type),
+ * gst/gstelementfactory.c: (gst_element_factory_get_type):
+ * gst/gstindexfactory.c: (gst_index_factory_get_type):
+ * gst/gstminiobject.c: (gst_mini_object_get_type):
+ * gst/gstpad.c: (gst_pad_get_type):
+ * gst/gstsegment.c: (gst_segment_get_type):
+ * gst/gststructure.c: (gst_structure_get_type):
+ * gst/gstsystemclock.c: (gst_system_clock_get_type):
+ * gst/gsttask.c: (gst_task_get_type), (gst_task_join):
+ * gst/gstvalue.c:
+ Help compiler with type registration.
+
+ * plugins/elements/gstqueue.c: (gst_queue_handle_sink_event):
+ Small doc update.
+
+
2006-02-27 Tim-Philipp Müller <tim at centricular dot net>
* plugins/elements/gsttypefindelement.c:
{
static GType gst_bin_type = 0;
- if (!gst_bin_type) {
+ if (G_UNLIKELY (gst_bin_type == 0)) {
static const GTypeInfo bin_info = {
sizeof (GstBinClass),
gst_bin_base_init,
not_toplevel:
{
GST_OBJECT_UNLOCK (bin);
- GST_DEBUG_OBJECT (bin, "not toplevel");
-
- /* post message up, mark parent bins dirty */
- gst_element_post_message (GST_ELEMENT_CAST (bin), message);
-
- break;
+ GST_DEBUG_OBJECT (bin, "not toplevel, forwarding");
+ goto forward;
}
}
case GST_MESSAGE_SEGMENT_START:
provided, playing, forward);
GST_OBJECT_UNLOCK (bin);
- if (forward) {
+ if (forward)
goto forward;
- }
+
/* free message */
gst_message_unref (message);
-
break;
}
case GST_MESSAGE_CLOCK_PROVIDE:
if (forward)
goto forward;
+
/* free message */
gst_message_unref (message);
-
break;
}
default:
goto forward;
}
-
return;
forward:
{
static GType bus_type = 0;
- if (!bus_type) {
+ if (G_UNLIKELY (bus_type == 0)) {
static const GTypeInfo bus_info = {
sizeof (GstBusClass),
NULL,
{
static GType gst_caps_type = 0;
- if (!gst_caps_type) {
+ if (G_UNLIKELY (gst_caps_type == 0)) {
gst_caps_type = g_boxed_type_register_static ("GstCaps",
(GBoxedCopyFunc) gst_caps_copy_conditional,
(GBoxedFreeFunc) gst_caps_unref);
{
static GType staticcaps_type = 0;
- if (!staticcaps_type) {
+ if (G_UNLIKELY (staticcaps_type == 0)) {
staticcaps_type = g_pointer_type_register_static ("GstStaticCaps");
}
return staticcaps_type;
{
static GType type = 0;
- if (type == 0) {
+ if (G_UNLIKELY (type == 0)) {
static const GTypeInfo info = {
sizeof (GstChildProxyInterface),
gst_child_proxy_base_init, /* base_init */
{
static GType clock_type = 0;
- if (!clock_type) {
+ if (G_UNLIKELY (clock_type == 0)) {
static const GTypeInfo clock_info = {
sizeof (GstClockClass),
NULL,
{
static GType gst_element_type = 0;
- if (!gst_element_type) {
+ if (G_UNLIKELY (gst_element_type == 0)) {
static const GTypeInfo element_info = {
sizeof (GstElementClass),
gst_element_base_class_init,
{
static GType elementfactory_type = 0;
- if (!elementfactory_type) {
+ if (G_UNLIKELY (elementfactory_type == 0)) {
static const GTypeInfo elementfactory_info = {
sizeof (GstElementFactoryClass),
NULL,
{
static GType indexfactory_type = 0;
- if (!indexfactory_type) {
+ if (G_UNLIKELY (indexfactory_type == 0)) {
static const GTypeInfo indexfactory_info = {
sizeof (GstIndexFactoryClass),
NULL,
{
static GType _gst_mini_object_type = 0;
- if (!_gst_mini_object_type) {
+ if (G_UNLIKELY (_gst_mini_object_type == 0)) {
GTypeValueTable value_table = {
gst_value_mini_object_init,
gst_value_mini_object_free,
{
static GType gst_pad_type = 0;
- if (!gst_pad_type) {
+ if (G_UNLIKELY (gst_pad_type == 0)) {
static const GTypeInfo pad_info = {
sizeof (GstPadClass), NULL, NULL,
(GClassInitFunc) gst_pad_class_init, NULL, NULL,
{
static GType gst_segment_type = 0;
- if (!gst_segment_type) {
+ if (G_UNLIKELY (gst_segment_type == 0)) {
gst_segment_type = g_boxed_type_register_static ("GstSegment",
(GBoxedCopyFunc) gst_segment_copy, (GBoxedFreeFunc) gst_segment_free);
}
{
static GType gst_structure_type = 0;
- if (!gst_structure_type) {
+ if (G_UNLIKELY (gst_structure_type == 0)) {
gst_structure_type = g_boxed_type_register_static ("GstStructure",
(GBoxedCopyFunc) gst_structure_copy_conditional,
(GBoxedFreeFunc) gst_structure_free);
{
static GType clock_type = 0;
- if (!clock_type) {
+ if (G_UNLIKELY (clock_type == 0)) {
static const GTypeInfo clock_info = {
sizeof (GstSystemClockClass),
NULL,
{
static GType _gst_task_type = 0;
- if (!_gst_task_type) {
+ if (G_UNLIKELY (_gst_task_type == 0)) {
static const GTypeInfo task_info = {
sizeof (GstTaskClass),
NULL,
{ \
static GType gst_ ## type ## _type = 0; \
\
- if (!gst_ ## type ## _type) { \
+ if (G_UNLIKELY (gst_ ## type ## _type == 0)) { \
_info.value_table = & _gst_ ## type ## _value_table; \
gst_ ## type ## _type = g_type_register_fundamental ( \
g_type_fundamental_next (), \
g_cond_signal (queue->item_del);
GST_QUEUE_MUTEX_UNLOCK (queue);
- /* make sure it pauses */
+ /* make sure it pauses, this should happen since we sent
+ * flush_start downstream. */
gst_pad_pause_task (queue->srcpad);
GST_CAT_LOG_OBJECT (queue_dataflow, queue, "loop stopped");
goto done;