+2006-06-12 Wim Taymans <wim@fluendo.com>
+
+ * gst/gsterror.c: (gst_g_error_get_type):
+ * gst/gstpadtemplate.c: (gst_pad_template_get_type),
+ (gst_static_pad_template_get_type):
+ * gst/gsttaglist.c: (gst_tag_list_get_type):
+ * gst/gsttagsetter.c: (gst_tag_setter_get_type):
+ * gst/gsttypefindfactory.c: (gst_type_find_factory_get_type):
+ * gst/gsturi.c: (gst_uri_handler_get_type):
+ * gst/gstvalue.c: (gst_date_get_type):
+ * gst/gstxml.c: (gst_xml_get_type):
+ * libs/gst/base/gstbasesink.c: (gst_base_sink_get_type),
+ (gst_base_sink_preroll_object), (gst_base_sink_get_position):
+ * libs/gst/base/gstbasesrc.c: (gst_base_src_get_type):
+ Add G_UNLIKELY in type registration.
+
2006-06-12 Wim Taymans <wim@fluendo.com>
* tools/gst-inspect.c: (print_signal_info):
{
static GType type = 0;
- if (!type)
+ if (G_UNLIKELY (type == 0))
type = g_boxed_type_register_static ("GstGError",
(GBoxedCopyFunc) g_error_copy, (GBoxedFreeFunc) g_error_free);
return type;
{
static GType padtemplate_type = 0;
- if (!padtemplate_type) {
+ if (G_UNLIKELY (padtemplate_type == 0)) {
static const GTypeInfo padtemplate_info = {
sizeof (GstPadTemplateClass), NULL, NULL,
(GClassInitFunc) gst_pad_template_class_init, NULL, NULL,
{
static GType staticpadtemplate_type = 0;
- if (!staticpadtemplate_type) {
+ if (G_UNLIKELY (staticpadtemplate_type == 0)) {
staticpadtemplate_type =
g_pointer_type_register_static ("GstStaticPadTemplate");
}
GType
gst_tag_list_get_type (void)
{
- static GType _gst_tag_list_type;
+ static GType _gst_tag_list_type = 0;
- if (_gst_tag_list_type == 0) {
+ if (G_UNLIKELY (_gst_tag_list_type == 0)) {
_gst_tag_list_type = g_boxed_type_register_static ("GstTagList",
(GBoxedCopyFunc) gst_tag_list_copy, (GBoxedFreeFunc) gst_tag_list_free);
{
static GType tag_setter_type = 0;
- if (!tag_setter_type) {
+ if (G_UNLIKELY (tag_setter_type == 0)) {
static const GTypeInfo tag_setter_info = {
sizeof (GstTagSetterIFace), /* class_size */
NULL, /* base_init */
{
static GType typefind_type = 0;
- if (!typefind_type) {
+ if (G_UNLIKELY (typefind_type == 0)) {
static const GTypeInfo typefind_info = {
sizeof (GstTypeFindFactoryClass),
NULL,
{
static GType urihandler_type = 0;
- if (!urihandler_type) {
+ if (G_UNLIKELY (urihandler_type == 0)) {
static const GTypeInfo urihandler_info = {
sizeof (GstURIHandlerInterface),
gst_uri_handler_base_init,
{
static GType gst_date_type = 0;
- if (!gst_date_type) {
+ if (G_UNLIKELY (gst_date_type == 0)) {
/* Not using G_TYPE_DATE here on purpose, even if we could
* if GLIB_CHECK_VERSION(2,8,0) was true: we don't want the
* serialised strings to have different type strings depending
{
static GType xml_type = 0;
- if (!xml_type) {
+ if (G_UNLIKELY (xml_type == 0)) {
static const GTypeInfo xml_info = {
sizeof (GstXMLClass),
NULL,
{
static GType base_sink_type = 0;
- if (!base_sink_type) {
+ if (G_UNLIKELY (base_sink_type == 0)) {
static const GTypeInfo base_sink_info = {
sizeof (GstBaseSinkClass),
(GBaseInitFunc) gst_base_sink_base_init,
if (bclass->preroll)
if ((ret = bclass->preroll (basesink, buf)) != GST_FLOW_OK)
goto preroll_failed;
- } else {
}
/* commit state */
{
static GType base_src_type = 0;
- if (!base_src_type) {
+ if (G_UNLIKELY (base_src_type == 0)) {
static const GTypeInfo base_src_info = {
sizeof (GstBaseSrcClass),
(GBaseInitFunc) gst_base_src_base_init,