gst/gstbin.c: Help the compiler a bit with type registration.

Original commit message from CVS:
* 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.
This commit is contained in:
Wim Taymans 2006-02-28 10:52:02 +00:00
parent e4d393eb66
commit a19398105c
17 changed files with 50 additions and 28 deletions

View file

@ -1,3 +1,30 @@
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:

View file

@ -203,7 +203,7 @@ gst_bin_get_type (void)
{
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,
@ -2020,12 +2020,8 @@ gst_bin_handle_message_func (GstBin * bin, GstMessage * message)
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:
@ -2103,12 +2099,11 @@ gst_bin_handle_message_func (GstBin * bin, GstMessage * message)
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:
@ -2124,15 +2119,14 @@ gst_bin_handle_message_func (GstBin * bin, GstMessage * message)
if (forward)
goto forward;
/* free message */
gst_message_unref (message);
break;
}
default:
goto forward;
}
return;
forward:

View file

@ -110,7 +110,7 @@ gst_bus_get_type (void)
{
static GType bus_type = 0;
if (!bus_type) {
if (G_UNLIKELY (bus_type == 0)) {
static const GTypeInfo bus_info = {
sizeof (GstBusClass),
NULL,

View file

@ -103,7 +103,7 @@ gst_caps_get_type (void)
{
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);
@ -394,7 +394,7 @@ gst_static_caps_get_type (void)
{
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;

View file

@ -454,7 +454,7 @@ gst_child_proxy_get_type (void)
{
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 */

View file

@ -497,7 +497,7 @@ gst_clock_get_type (void)
{
static GType clock_type = 0;
if (!clock_type) {
if (G_UNLIKELY (clock_type == 0)) {
static const GTypeInfo clock_info = {
sizeof (GstClockClass),
NULL,

View file

@ -142,7 +142,7 @@ gst_element_get_type (void)
{
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,

View file

@ -79,7 +79,7 @@ gst_element_factory_get_type (void)
{
static GType elementfactory_type = 0;
if (!elementfactory_type) {
if (G_UNLIKELY (elementfactory_type == 0)) {
static const GTypeInfo elementfactory_info = {
sizeof (GstElementFactoryClass),
NULL,

View file

@ -50,7 +50,7 @@ gst_index_factory_get_type (void)
{
static GType indexfactory_type = 0;
if (!indexfactory_type) {
if (G_UNLIKELY (indexfactory_type == 0)) {
static const GTypeInfo indexfactory_info = {
sizeof (GstIndexFactoryClass),
NULL,

View file

@ -65,7 +65,7 @@ gst_mini_object_get_type (void)
{
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,

View file

@ -187,7 +187,7 @@ gst_pad_get_type (void)
{
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,

View file

@ -97,7 +97,7 @@ gst_segment_get_type (void)
{
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);
}

View file

@ -93,7 +93,7 @@ gst_structure_get_type (void)
{
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);

View file

@ -73,7 +73,7 @@ gst_system_clock_get_type (void)
{
static GType clock_type = 0;
if (!clock_type) {
if (G_UNLIKELY (clock_type == 0)) {
static const GTypeInfo clock_info = {
sizeof (GstSystemClockClass),
NULL,

View file

@ -81,7 +81,7 @@ gst_task_get_type (void)
{
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,

View file

@ -3655,7 +3655,7 @@ GType gst_ ## type ## _get_type (void) \
{ \
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 (), \

View file

@ -520,7 +520,8 @@ gst_queue_handle_sink_event (GstPad * pad, GstEvent * event)
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;