From ba552fb76f8320653bd70005577f8b36dca723ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 2 Sep 2024 14:22:52 +0300 Subject: [PATCH] gst: Remove gstquark.c / gstquark.h Part-of: --- subprojects/gstreamer/gst/gst.c | 1 - subprojects/gstreamer/gst/gst_private.h | 8 +- subprojects/gstreamer/gst/gstbufferpool.c | 1 - subprojects/gstreamer/gst/gstcontext.c | 1 - subprojects/gstreamer/gst/gstdeviceprovider.c | 1 - subprojects/gstreamer/gst/gstelement.c | 1 - subprojects/gstreamer/gst/gstinfo.c | 1 - subprojects/gstreamer/gst/gstmeta.c | 7 +- subprojects/gstreamer/gst/gstplugin.c | 4 + subprojects/gstreamer/gst/gstquark.c | 100 ------- subprojects/gstreamer/gst/gstquark.h | 244 ------------------ subprojects/gstreamer/gst/gsttoc.c | 1 - subprojects/gstreamer/gst/gstutils.c | 14 +- subprojects/gstreamer/gst/gstvalue.c | 1 - subprojects/gstreamer/gst/meson.build | 1 - 15 files changed, 24 insertions(+), 362 deletions(-) delete mode 100644 subprojects/gstreamer/gst/gstquark.c delete mode 100644 subprojects/gstreamer/gst/gstquark.h diff --git a/subprojects/gstreamer/gst/gst.c b/subprojects/gstreamer/gst/gst.c index d766d16d56..d408c6c793 100644 --- a/subprojects/gstreamer/gst/gst.c +++ b/subprojects/gstreamer/gst/gst.c @@ -662,7 +662,6 @@ init_post (GOptionContext * context, GOptionGroup * group, gpointer data, } _priv_gst_mini_object_initialize (); - _priv_gst_quarks_initialize (); _priv_gst_allocator_initialize (); _priv_gst_memory_initialize (); _priv_gst_format_initialize (); diff --git a/subprojects/gstreamer/gst/gst_private.h b/subprojects/gstreamer/gst/gst_private.h index 4b98c7a459..cc05f871bf 100644 --- a/subprojects/gstreamer/gst/gst_private.h +++ b/subprojects/gstreamer/gst/gst_private.h @@ -114,7 +114,6 @@ G_GNUC_INTERNAL gboolean _priv_plugin_deps_env_vars_changed (GstPlugin * plugin G_GNUC_INTERNAL gboolean _priv_plugin_deps_files_changed (GstPlugin * plugin); /* init functions called from gst_init(). */ -G_GNUC_INTERNAL void _priv_gst_quarks_initialize (void); G_GNUC_INTERNAL void _priv_gst_mini_object_initialize (void); G_GNUC_INTERNAL void _priv_gst_memory_initialize (void); G_GNUC_INTERNAL void _priv_gst_allocator_initialize (void); @@ -244,6 +243,13 @@ GST_API gboolean _gst_disable_registry_cache; * as the main application in order to determine dependencies */ GST_API gchar *_gst_executable_path; +/* Internal variables used in gstutils.c and initialized in + * _priv_gst_plugin_initialize(). */ +G_GNUC_INTERNAL +extern GQuark _priv_gst_plugin_api_quark; +G_GNUC_INTERNAL +extern GQuark _priv_gst_plugin_api_flags_quark; + /* provide inline gst_g_value_get_foo_unchecked(), used in gststructure.c */ #define DEFINE_INLINE_G_VALUE_GET_UNCHECKED(ret_type,name_type,v_field) \ static inline ret_type \ diff --git a/subprojects/gstreamer/gst/gstbufferpool.c b/subprojects/gstreamer/gst/gstbufferpool.c index d90ad4b642..9deef6c426 100644 --- a/subprojects/gstreamer/gst/gstbufferpool.c +++ b/subprojects/gstreamer/gst/gstbufferpool.c @@ -72,7 +72,6 @@ #include "gstvecdeque.h" #include "gstinfo.h" -#include "gstquark.h" #include "gstvalue.h" #include "gstbufferpool.h" diff --git a/subprojects/gstreamer/gst/gstcontext.c b/subprojects/gstreamer/gst/gstcontext.c index 3d4d8532b9..402aa08777 100644 --- a/subprojects/gstreamer/gst/gstcontext.c +++ b/subprojects/gstreamer/gst/gstcontext.c @@ -64,7 +64,6 @@ #include "gst_private.h" #include #include "gstcontext.h" -#include "gstquark.h" struct _GstContext { diff --git a/subprojects/gstreamer/gst/gstdeviceprovider.c b/subprojects/gstreamer/gst/gstdeviceprovider.c index 484e891d49..3e9c0bf1e2 100644 --- a/subprojects/gstreamer/gst/gstdeviceprovider.c +++ b/subprojects/gstreamer/gst/gstdeviceprovider.c @@ -47,7 +47,6 @@ #include "gstdeviceprovider.h" #include "gstelementmetadata.h" -#include "gstquark.h" struct _GstDeviceProviderPrivate { diff --git a/subprojects/gstreamer/gst/gstelement.c b/subprojects/gstreamer/gst/gstelement.c index f34c33e90c..b81431a774 100644 --- a/subprojects/gstreamer/gst/gstelement.c +++ b/subprojects/gstreamer/gst/gstelement.c @@ -98,7 +98,6 @@ #include "gstghostpad.h" #include "gstutils.h" #include "gstinfo.h" -#include "gstquark.h" #include "gsttracerutils.h" #include "gstvalue.h" #include diff --git a/subprojects/gstreamer/gst/gstinfo.c b/subprojects/gstreamer/gst/gstinfo.c index dee73ff858..e067cafbbe 100644 --- a/subprojects/gstreamer/gst/gstinfo.c +++ b/subprojects/gstreamer/gst/gstinfo.c @@ -101,7 +101,6 @@ #include "gst_private.h" #include "gstutils.h" -#include "gstquark.h" #include "gstsegment.h" #include "gstvalue.h" #include "gstvecdeque.h" diff --git a/subprojects/gstreamer/gst/gstmeta.c b/subprojects/gstreamer/gst/gstmeta.c index 6667aff844..e542b36ad7 100644 --- a/subprojects/gstreamer/gst/gstmeta.c +++ b/subprojects/gstreamer/gst/gstmeta.c @@ -50,7 +50,6 @@ #include "gstmeta.h" #include "gstinfo.h" #include "gstutils.h" -#include "gstquark.h" static GHashTable *metainfo = NULL; static GRWLock lock; @@ -58,6 +57,7 @@ static GRWLock lock; GQuark _gst_meta_transform_copy; GQuark _gst_meta_tag_memory; GQuark _gst_meta_tag_memory_reference; +static GQuark _gst_meta_tags_quark; typedef struct { @@ -84,6 +84,7 @@ _priv_gst_meta_initialize (void) _gst_meta_tag_memory = g_quark_from_static_string ("memory"); _gst_meta_tag_memory_reference = g_quark_from_static_string ("memory-reference"); + _gst_meta_tags_quark = g_quark_from_static_string ("tags"); } static gboolean @@ -139,7 +140,7 @@ gst_meta_api_type_register (const gchar * api, const gchar ** tags) } } - g_type_set_qdata (type, GST_QUARK (TAGS), g_strdupv ((gchar **) tags)); + g_type_set_qdata (type, _gst_meta_tags_quark, g_strdupv ((gchar **) tags)); return type; } @@ -400,7 +401,7 @@ gst_meta_api_type_get_tags (GType api) const gchar **tags; g_return_val_if_fail (api != 0, FALSE); - tags = g_type_get_qdata (api, GST_QUARK (TAGS)); + tags = g_type_get_qdata (api, _gst_meta_tags_quark); if (!tags[0]) return NULL; diff --git a/subprojects/gstreamer/gst/gstplugin.c b/subprojects/gstreamer/gst/gstplugin.c index 4a99635f36..10ad0b0132 100644 --- a/subprojects/gstreamer/gst/gstplugin.c +++ b/subprojects/gstreamer/gst/gstplugin.c @@ -315,6 +315,10 @@ _priv_gst_plugin_initialize (void) _gst_plugin_inited = TRUE; + _priv_gst_plugin_api_quark = g_quark_from_static_string ("plugin-api"); + _priv_gst_plugin_api_flags_quark = + g_quark_from_static_string ("plugin-api-flags"); + whitelist = g_getenv ("GST_PLUGIN_LOADING_WHITELIST"); if (whitelist != NULL && *whitelist != '\0') { _plugin_loading_whitelist = g_strsplit (whitelist, diff --git a/subprojects/gstreamer/gst/gstquark.c b/subprojects/gstreamer/gst/gstquark.c deleted file mode 100644 index d1b5376265..0000000000 --- a/subprojects/gstreamer/gst/gstquark.c +++ /dev/null @@ -1,100 +0,0 @@ -/* GStreamer - * Copyright (C) 2006 Jan Schmidt - * - * gstquark.c: Registered quarks for the _priv_gst_quark_table, private to - * GStreamer - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "gst_private.h" -#include "gstquark.h" -#include "gstelementmetadata.h" - -/* These strings must match order and number declared in the GstQuarkId - * enum in gstquark.h! */ -static const gchar *_quark_strings[] = { - "format", "current", "duration", "rate", - "seekable", "segment-start", "segment-end", - "src_format", "src_value", "dest_format", "dest_value", - "start_format", "start_value", "stop_format", "stop_value", - "gerror", "debug", "buffer-percent", "buffering-mode", - "avg-in-rate", "avg-out-rate", "buffering-left", - "estimated-total", "old-state", "new-state", "pending-state", - "clock", "ready", "position", "reset-time", "live", "min-latency", - "max-latency", "busy", "type", "owner", "update", "applied-rate", - "start", "stop", "minsize", "maxsize", "async", "proportion", - "diff", "timestamp", "flags", "cur-type", "cur", "stop-type", - "latency", "uri", "object", "taglist", "GstEventSegment", - "GstEventBufferSize", "GstEventQOS", "GstEventSeek", "GstEventLatency", - "GstMessageError", "GstMessageWarning", "GstMessageInfo", - "GstMessageBuffering", "GstMessageStateChanged", "GstMessageClockProvide", - "GstMessageClockLost", "GstMessageNewClock", "GstMessageStructureChange", - "GstMessageSegmentStart", "GstMessageSegmentDone", - "GstMessageDurationChanged", - "GstMessageAsyncDone", "GstMessageRequestState", "GstMessageStreamStatus", - "GstQueryPosition", "GstQueryDuration", "GstQueryLatency", "GstQueryConvert", - "GstQuerySegment", "GstQuerySeeking", "GstQueryFormats", "GstQueryBuffering", - "GstQueryURI", "GstEventStep", "GstMessageStepDone", "amount", "flush", - "intermediate", "GstMessageStepStart", "active", "eos", "sink-message", - "message", "GstMessageQOS", "running-time", "stream-time", "jitter", - "quality", "processed", "dropped", "buffering-ranges", "GstMessageProgress", - "code", "text", "percent", "timeout", "GstBufferPoolConfig", "caps", "size", - "min-buffers", "max-buffers", "prefix", "padding", "align", "time", - "GstQueryAllocation", "need-pool", "meta", "pool", "GstEventCaps", - "GstEventReconfigure", "segment", "GstQueryScheduling", "pull-mode", - "allocator", "GstEventFlushStop", "options", "GstQueryAcceptCaps", - "result", "GstQueryCaps", "filter", "modes", "GstEventStreamConfig", - "setup-data", "stream-headers", "GstEventGap", "GstQueryDrain", "params", - "GstEventTocSelect", "uid", "GstQueryToc", GST_ELEMENT_METADATA_LONGNAME, - GST_ELEMENT_METADATA_KLASS, GST_ELEMENT_METADATA_DESCRIPTION, - GST_ELEMENT_METADATA_AUTHOR, "toc", "toc-entry", "updated", "extend-uid", - "uid", "tags", "sub-entries", "info", "GstMessageTag", "GstEventTag", - "GstMessageResetTime", - "GstMessageToc", "GstEventTocGlobal", "GstEventTocCurrent", - "GstEventSegmentDone", - "GstEventStreamStart", "stream-id", "GstQueryContext", - "GstMessageNeedContext", "GstMessageHaveContext", "context", "context-type", - "GstMessageStreamStart", "group-id", "uri-redirection", - "GstMessageDeviceAdded", "GstMessageDeviceRemoved", "device", - "uri-redirection-permanent", "GstMessagePropertyNotify", "property-name", - "property-value", "streams", "GstEventSelectStreams", - "GstMessageStreamCollection", "collection", "stream", "stream-collection", - "GstMessageStreamsSelected", "GstMessageRedirect", "redirect-entry-locations", - "redirect-entry-taglists", "redirect-entry-structures", - "GstEventStreamGroupDone", "GstQueryBitrate", "nominal-bitrate", - "GstMessageDeviceChanged", "device-changed", "trickmode-interval", - "GstEventInstantRateChange", - "GstEventInstantRateSyncTime", "GstMessageInstantRateRequest", - "upstream-running-time", "base", "offset", "plugin-api", "plugin-api-flags", - "gap-flags", "GstQuerySelectable", "selectable", "GstAllocationParams" -}; - -GQuark _priv_gst_quark_table[GST_QUARK_MAX]; - -void -_priv_gst_quarks_initialize (void) -{ - gint i; - - if (G_N_ELEMENTS (_quark_strings) != GST_QUARK_MAX) - g_warning ("the quark table is not consistent! %d != %d", - (int) G_N_ELEMENTS (_quark_strings), GST_QUARK_MAX); - - for (i = 0; i < GST_QUARK_MAX; i++) { - _priv_gst_quark_table[i] = g_quark_from_static_string (_quark_strings[i]); - } -} diff --git a/subprojects/gstreamer/gst/gstquark.h b/subprojects/gstreamer/gst/gstquark.h deleted file mode 100644 index 68791c0ec8..0000000000 --- a/subprojects/gstreamer/gst/gstquark.h +++ /dev/null @@ -1,244 +0,0 @@ -/* GStreamer - * Copyright (C) 2006 Jan Schmidt - * - * gstquark.h: Private header for storing quark info - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef __GST_QUARK_H__ -#define __GST_QUARK_H__ - -#include - -/* These enums need to match the number and order - * of strings declared in _quark_table, in gstquark.c */ -typedef enum _GstQuarkId -{ - GST_QUARK_FORMAT = 0, - GST_QUARK_CURRENT = 1, - GST_QUARK_DURATION = 2, - GST_QUARK_RATE = 3, - GST_QUARK_SEEKABLE = 4, - GST_QUARK_SEGMENT_START = 5, - GST_QUARK_SEGMENT_END = 6, - GST_QUARK_SRC_FORMAT = 7, - GST_QUARK_SRC_VALUE = 8, - GST_QUARK_DEST_FORMAT = 9, - GST_QUARK_DEST_VALUE = 10, - GST_QUARK_START_FORMAT = 11, - GST_QUARK_START_VALUE = 12, - GST_QUARK_STOP_FORMAT = 13, - GST_QUARK_STOP_VALUE = 14, - GST_QUARK_GERROR = 15, - GST_QUARK_DEBUG = 16, - GST_QUARK_BUFFER_PERCENT = 17, - GST_QUARK_BUFFERING_MODE = 18, - GST_QUARK_AVG_IN_RATE = 19, - GST_QUARK_AVG_OUT_RATE = 20, - GST_QUARK_BUFFERING_LEFT = 21, - GST_QUARK_ESTIMATED_TOTAL = 22, - GST_QUARK_OLD_STATE = 23, - GST_QUARK_NEW_STATE = 24, - GST_QUARK_PENDING_STATE = 25, - GST_QUARK_CLOCK = 26, - GST_QUARK_READY = 27, - GST_QUARK_POSITION = 28, - GST_QUARK_RESET_TIME = 29, - GST_QUARK_LIVE = 30, - GST_QUARK_MIN_LATENCY = 31, - GST_QUARK_MAX_LATENCY = 32, - GST_QUARK_BUSY = 33, - GST_QUARK_TYPE = 34, - GST_QUARK_OWNER = 35, - GST_QUARK_UPDATE = 36, - GST_QUARK_APPLIED_RATE = 37, - GST_QUARK_START = 38, - GST_QUARK_STOP = 39, - GST_QUARK_MINSIZE = 40, - GST_QUARK_MAXSIZE = 41, - GST_QUARK_ASYNC = 42, - GST_QUARK_PROPORTION = 43, - GST_QUARK_DIFF = 44, - GST_QUARK_TIMESTAMP = 45, - GST_QUARK_FLAGS = 46, - GST_QUARK_CUR_TYPE = 47, - GST_QUARK_CUR = 48, - GST_QUARK_STOP_TYPE = 49, - GST_QUARK_LATENCY = 50, - GST_QUARK_URI = 51, - GST_QUARK_OBJECT = 52, - GST_QUARK_TAGLIST = 53, - GST_QUARK_EVENT_SEGMENT = 54, - GST_QUARK_EVENT_BUFFER_SIZE = 55, - GST_QUARK_EVENT_QOS = 56, - GST_QUARK_EVENT_SEEK = 57, - GST_QUARK_EVENT_LATENCY = 58, - GST_QUARK_MESSAGE_ERROR = 59, - GST_QUARK_MESSAGE_WARNING = 60, - GST_QUARK_MESSAGE_INFO = 61, - GST_QUARK_MESSAGE_BUFFERING = 62, - GST_QUARK_MESSAGE_STATE_CHANGED = 63, - GST_QUARK_MESSAGE_CLOCK_PROVIDE = 64, - GST_QUARK_MESSAGE_CLOCK_LOST = 65, - GST_QUARK_MESSAGE_NEW_CLOCK = 66, - GST_QUARK_MESSAGE_STRUCTURE_CHANGE = 67, - GST_QUARK_MESSAGE_SEGMENT_START = 68, - GST_QUARK_MESSAGE_SEGMENT_DONE = 69, - GST_QUARK_MESSAGE_DURATION_CHANGED = 70, - GST_QUARK_MESSAGE_ASYNC_DONE = 71, - GST_QUARK_MESSAGE_REQUEST_STATE = 72, - GST_QUARK_MESSAGE_STREAM_STATUS = 73, - GST_QUARK_QUERY_POSITION = 74, - GST_QUARK_QUERY_DURATION = 75, - GST_QUARK_QUERY_LATENCY = 76, - GST_QUARK_QUERY_CONVERT = 77, - GST_QUARK_QUERY_SEGMENT = 78, - GST_QUARK_QUERY_SEEKING = 79, - GST_QUARK_QUERY_FORMATS = 80, - GST_QUARK_QUERY_BUFFERING = 81, - GST_QUARK_QUERY_URI = 82, - GST_QUARK_EVENT_STEP = 83, - GST_QUARK_MESSAGE_STEP_DONE = 84, - GST_QUARK_AMOUNT = 85, - GST_QUARK_FLUSH = 86, - GST_QUARK_INTERMEDIATE = 87, - GST_QUARK_MESSAGE_STEP_START = 88, - GST_QUARK_ACTIVE = 89, - GST_QUARK_EOS = 90, - GST_QUARK_EVENT_SINK_MESSAGE = 91, - GST_QUARK_MESSAGE = 92, - GST_QUARK_MESSAGE_QOS = 93, - GST_QUARK_RUNNING_TIME = 94, - GST_QUARK_STREAM_TIME = 95, - GST_QUARK_JITTER = 96, - GST_QUARK_QUALITY = 97, - GST_QUARK_PROCESSED = 98, - GST_QUARK_DROPPED = 99, - GST_QUARK_BUFFERING_RANGES = 100, - GST_QUARK_MESSAGE_PROGRESS = 101, - GST_QUARK_CODE = 102, - GST_QUARK_TEXT = 103, - GST_QUARK_PERCENT = 104, - GST_QUARK_TIMEOUT = 105, - GST_QUARK_BUFFER_POOL_CONFIG = 106, - GST_QUARK_CAPS = 107, - GST_QUARK_SIZE = 108, - GST_QUARK_MIN_BUFFERS = 109, - GST_QUARK_MAX_BUFFERS = 110, - GST_QUARK_PREFIX = 111, - GST_QUARK_PADDING = 112, - GST_QUARK_ALIGN = 113, - GST_QUARK_TIME = 114, - GST_QUARK_QUERY_ALLOCATION = 115, - GST_QUARK_NEED_POOL = 116, - GST_QUARK_META = 117, - GST_QUARK_POOL = 118, - GST_QUARK_EVENT_CAPS = 119, - GST_QUARK_EVENT_RECONFIGURE = 120, - GST_QUARK_SEGMENT = 121, - GST_QUARK_QUERY_SCHEDULING = 122, - GST_QUARK_PULL_MODE = 123, - GST_QUARK_ALLOCATOR = 124, - GST_QUARK_EVENT_FLUSH_STOP = 125, - GST_QUARK_OPTIONS = 126, - GST_QUARK_QUERY_ACCEPT_CAPS = 127, - GST_QUARK_RESULT = 128, - GST_QUARK_QUERY_CAPS = 129, - GST_QUARK_FILTER = 130, - GST_QUARK_MODES = 131, - GST_QUARK_EVENT_STREAM_CONFIG = 132, - GST_QUARK_SETUP_DATA = 133, - GST_QUARK_STREAM_HEADERS = 134, - GST_QUARK_EVENT_GAP = 135, - GST_QUARK_QUERY_DRAIN = 136, - GST_QUARK_PARAMS = 137, - GST_QUARK_EVENT_TOC_SELECT = 138, - GST_QUARK_UID = 139, - GST_QUARK_QUERY_TOC = 140, - GST_QUARK_ELEMENT_METADATA_LONGNAME = 141, - GST_QUARK_ELEMENT_METADATA_KLASS = 142, - GST_QUARK_ELEMENT_METADATA_DESCRIPTION = 143, - GST_QUARK_ELEMENT_METADATA_AUTHOR = 144, - GST_QUARK_TOC = 145, - GST_QUARK_TOC_ENTRY = 146, - GST_QUARK_UPDATED = 147, - GST_QUARK_EXTEND_UID = 148, - GST_QUARK_TOC_UID = 149, - GST_QUARK_TAGS = 150, - GST_QUARK_SUB_ENTRIES = 151, - GST_QUARK_INFO = 152, - GST_QUARK_MESSAGE_TAG = 153, - GST_QUARK_EVENT_TAG = 154, - GST_QUARK_MESSAGE_RESET_TIME = 155, - GST_QUARK_MESSAGE_TOC = 156, - GST_QUARK_EVENT_TOC_GLOBAL = 157, - GST_QUARK_EVENT_TOC_CURRENT = 158, - GST_QUARK_EVENT_SEGMENT_DONE = 159, - GST_QUARK_EVENT_STREAM_START = 160, - GST_QUARK_STREAM_ID = 161, - GST_QUARK_QUERY_CONTEXT = 162, - GST_QUARK_MESSAGE_NEED_CONTEXT = 163, - GST_QUARK_MESSAGE_HAVE_CONTEXT = 164, - GST_QUARK_CONTEXT = 165, - GST_QUARK_CONTEXT_TYPE = 166, - GST_QUARK_MESSAGE_STREAM_START = 167, - GST_QUARK_GROUP_ID = 168, - GST_QUARK_URI_REDIRECTION = 169, - GST_QUARK_MESSAGE_DEVICE_ADDED = 170, - GST_QUARK_MESSAGE_DEVICE_REMOVED = 171, - GST_QUARK_DEVICE = 172, - GST_QUARK_URI_REDIRECTION_PERMANENT = 173, - GST_QUARK_MESSAGE_PROPERTY_NOTIFY = 174, - GST_QUARK_PROPERTY_NAME = 175, - GST_QUARK_PROPERTY_VALUE = 176, - GST_QUARK_STREAMS = 177, - GST_QUARK_EVENT_SELECT_STREAMS = 178, - GST_QUARK_MESSAGE_STREAM_COLLECTION = 179, - GST_QUARK_COLLECTION = 180, - GST_QUARK_STREAM = 181, - GST_QUARK_EVENT_STREAM_COLLECTION = 182, - GST_QUARK_MESSAGE_STREAMS_SELECTED = 183, - GST_QUARK_MESSAGE_REDIRECT = 184, - GST_QUARK_REDIRECT_ENTRY_LOCATIONS = 185, - GST_QUARK_REDIRECT_ENTRY_TAGLISTS = 186, - GST_QUARK_REDIRECT_ENTRY_STRUCTURES = 187, - GST_QUARK_EVENT_STREAM_GROUP_DONE = 188, - GST_QUARK_QUERY_BITRATE = 189, - GST_QUARK_NOMINAL_BITRATE = 190, - GST_QUARK_MESSAGE_DEVICE_CHANGED = 191, - GST_QUARK_DEVICE_CHANGED = 192, - GST_QUARK_TRICKMODE_INTERVAL = 193, - GST_QUARK_EVENT_INSTANT_RATE_CHANGE = 194, - GST_QUARK_EVENT_INSTANT_RATE_SYNC_TIME = 195, - GST_QUARK_MESSAGE_INSTANT_RATE_REQUEST = 196, - GST_QUARK_UPSTREAM_RUNNING_TIME = 197, - GST_QUARK_BASE = 198, - GST_QUARK_OFFSET = 199, - GST_QUARK_PLUGIN_API = 200, - GST_QUARK_PLUGIN_API_FLAGS = 201, - GST_QUARK_GAP_FLAGS = 202, - GST_QUARK_QUERY_SELECTABLE = 203, - GST_QUARK_SELECTABLE = 204, - GST_QUARK_ALLOCATION_PARAMS = 205, - GST_QUARK_MAX = 206 -} GstQuarkId; - -extern GQuark _priv_gst_quark_table[GST_QUARK_MAX]; - -#define GST_QUARK(q) _priv_gst_quark_table[GST_QUARK_##q] - -#endif diff --git a/subprojects/gstreamer/gst/gsttoc.c b/subprojects/gstreamer/gst/gsttoc.c index bee3224487..2ee3ce640a 100644 --- a/subprojects/gstreamer/gst/gsttoc.c +++ b/subprojects/gstreamer/gst/gsttoc.c @@ -83,7 +83,6 @@ #include "gstvalue.h" #include "gsttoc.h" #include "gstpad.h" -#include "gstquark.h" struct _GstTocEntry { diff --git a/subprojects/gstreamer/gst/gstutils.c b/subprojects/gstreamer/gst/gstutils.c index e691eea9a5..401fdca9cd 100644 --- a/subprojects/gstreamer/gst/gstutils.c +++ b/subprojects/gstreamer/gst/gstutils.c @@ -44,7 +44,6 @@ #include "gstinfo.h" #include "gstparse.h" #include "gstvalue.h" -#include "gstquark.h" #include #include "glib-compat-private.h" #include @@ -4767,6 +4766,10 @@ invalid: } } +/* Initialized in _priv_gst_plugin_initialize(). */ +GQuark _priv_gst_plugin_api_quark; +GQuark _priv_gst_plugin_api_flags_quark; + /** * gst_type_mark_as_plugin_api: * @type: a GType @@ -4788,8 +4791,8 @@ invalid: void gst_type_mark_as_plugin_api (GType type, GstPluginAPIFlags flags) { - g_type_set_qdata (type, GST_QUARK (PLUGIN_API), GINT_TO_POINTER (TRUE)); - g_type_set_qdata (type, GST_QUARK (PLUGIN_API_FLAGS), + g_type_set_qdata (type, _priv_gst_plugin_api_quark, GINT_TO_POINTER (TRUE)); + g_type_set_qdata (type, _priv_gst_plugin_api_flags_quark, GINT_TO_POINTER (flags)); } @@ -4809,11 +4812,12 @@ gboolean gst_type_is_plugin_api (GType type, GstPluginAPIFlags * flags) { gboolean ret = - !!GPOINTER_TO_INT (g_type_get_qdata (type, GST_QUARK (PLUGIN_API))); + !!GPOINTER_TO_INT (g_type_get_qdata (type, _priv_gst_plugin_api_quark)); if (ret && flags) { *flags = - GPOINTER_TO_INT (g_type_get_qdata (type, GST_QUARK (PLUGIN_API_FLAGS))); + GPOINTER_TO_INT (g_type_get_qdata (type, + _priv_gst_plugin_api_flags_quark)); } return ret; diff --git a/subprojects/gstreamer/gst/gstvalue.c b/subprojects/gstreamer/gst/gstvalue.c index 44978589a3..fc9c06faf5 100644 --- a/subprojects/gstreamer/gst/gstvalue.c +++ b/subprojects/gstreamer/gst/gstvalue.c @@ -46,7 +46,6 @@ #include #include #include "gstutils.h" -#include "gstquark.h" /* GstValueUnionFunc: * @dest: a #GValue for the result diff --git a/subprojects/gstreamer/gst/meson.build b/subprojects/gstreamer/gst/meson.build index 15dbf3a004..bd637863c6 100644 --- a/subprojects/gstreamer/gst/meson.build +++ b/subprojects/gstreamer/gst/meson.build @@ -44,7 +44,6 @@ gst_sources = files( 'gstpoll.c', 'gstpreset.c', 'gstprotection.c', - 'gstquark.c', 'gstquery.c', 'gstregistry.c', 'gstregistrychunks.c',