mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
Add G_UNLIKELY in type registration.
Original commit message from CVS: * 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.
This commit is contained in:
parent
da908556e1
commit
7e972ee6b9
11 changed files with 28 additions and 13 deletions
16
ChangeLog
16
ChangeLog
|
@ -1,3 +1,19 @@
|
|||
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):
|
||||
|
|
|
@ -111,7 +111,7 @@ gst_g_error_get_type (void)
|
|||
{
|
||||
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;
|
||||
|
|
|
@ -128,7 +128,7 @@ gst_pad_template_get_type (void)
|
|||
{
|
||||
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,
|
||||
|
@ -246,7 +246,7 @@ gst_static_pad_template_get_type (void)
|
|||
{
|
||||
static GType staticpadtemplate_type = 0;
|
||||
|
||||
if (!staticpadtemplate_type) {
|
||||
if (G_UNLIKELY (staticpadtemplate_type == 0)) {
|
||||
staticpadtemplate_type =
|
||||
g_pointer_type_register_static ("GstStaticPadTemplate");
|
||||
}
|
||||
|
|
|
@ -67,9 +67,9 @@ static GHashTable *__tags;
|
|||
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);
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ gst_tag_setter_get_type (void)
|
|||
{
|
||||
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 */
|
||||
|
|
|
@ -102,7 +102,7 @@ gst_type_find_factory_get_type (void)
|
|||
{
|
||||
static GType typefind_type = 0;
|
||||
|
||||
if (!typefind_type) {
|
||||
if (G_UNLIKELY (typefind_type == 0)) {
|
||||
static const GTypeInfo typefind_info = {
|
||||
sizeof (GstTypeFindFactoryClass),
|
||||
NULL,
|
||||
|
|
|
@ -58,7 +58,7 @@ gst_uri_handler_get_type (void)
|
|||
{
|
||||
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,
|
||||
|
|
|
@ -3802,7 +3802,7 @@ gst_date_get_type (void)
|
|||
{
|
||||
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
|
||||
|
|
|
@ -61,7 +61,7 @@ gst_xml_get_type (void)
|
|||
{
|
||||
static GType xml_type = 0;
|
||||
|
||||
if (!xml_type) {
|
||||
if (G_UNLIKELY (xml_type == 0)) {
|
||||
static const GTypeInfo xml_info = {
|
||||
sizeof (GstXMLClass),
|
||||
NULL,
|
||||
|
|
|
@ -237,7 +237,7 @@ gst_base_sink_get_type (void)
|
|||
{
|
||||
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,
|
||||
|
@ -1573,7 +1573,6 @@ gst_base_sink_preroll_object (GstBaseSink * basesink, GstPad * pad,
|
|||
if (bclass->preroll)
|
||||
if ((ret = bclass->preroll (basesink, buf)) != GST_FLOW_OK)
|
||||
goto preroll_failed;
|
||||
} else {
|
||||
}
|
||||
|
||||
/* commit state */
|
||||
|
|
|
@ -237,7 +237,7 @@ gst_base_src_get_type (void)
|
|||
{
|
||||
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,
|
||||
|
|
Loading…
Reference in a new issue