Add internal helpers for pre-registering quarks from static strings and using the quark values directly instead of lo...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/Makefile.am:
* gst/gst.c: (init_post):
* gst/gst_private.h:
* gst/gstquark.c: (_priv_gst_quarks_initialize):
* gst/gstquark.h:
* gst/gstquery.c: (gst_query_new_position),
(gst_query_set_position), (gst_query_parse_position),
(gst_query_new_duration), (gst_query_set_duration),
(gst_query_parse_duration), (gst_query_new_convert),
(gst_query_set_convert), (gst_query_parse_convert),
(gst_query_new_segment), (gst_query_set_segment),
(gst_query_parse_segment), (gst_query_new_seeking),
(gst_query_set_seeking), (gst_query_parse_seeking):
Add internal helpers for pre-registering quarks from static strings
and using the quark values directly instead of looking them up when
creating and parsing queries. Can be used for event construction too.
Closes #350432.
2006-08-16 11:47:54 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 2006 Jan Schmidt <thaytan@noraisin.net>
|
|
|
|
*
|
|
|
|
* 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
|
2012-11-03 20:44:48 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
Add internal helpers for pre-registering quarks from static strings and using the quark values directly instead of lo...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/Makefile.am:
* gst/gst.c: (init_post):
* gst/gst_private.h:
* gst/gstquark.c: (_priv_gst_quarks_initialize):
* gst/gstquark.h:
* gst/gstquery.c: (gst_query_new_position),
(gst_query_set_position), (gst_query_parse_position),
(gst_query_new_duration), (gst_query_set_duration),
(gst_query_parse_duration), (gst_query_new_convert),
(gst_query_set_convert), (gst_query_parse_convert),
(gst_query_new_segment), (gst_query_set_segment),
(gst_query_parse_segment), (gst_query_new_seeking),
(gst_query_set_seeking), (gst_query_parse_seeking):
Add internal helpers for pre-registering quarks from static strings
and using the quark values directly instead of looking them up when
creating and parsing queries. Can be used for event construction too.
Closes #350432.
2006-08-16 11:47:54 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "gst_private.h"
|
|
|
|
#include "gstquark.h"
|
2012-04-09 12:40:35 +00:00
|
|
|
#include "gstelementmetadata.h"
|
Add internal helpers for pre-registering quarks from static strings and using the quark values directly instead of lo...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/Makefile.am:
* gst/gst.c: (init_post):
* gst/gst_private.h:
* gst/gstquark.c: (_priv_gst_quarks_initialize):
* gst/gstquark.h:
* gst/gstquery.c: (gst_query_new_position),
(gst_query_set_position), (gst_query_parse_position),
(gst_query_new_duration), (gst_query_set_duration),
(gst_query_parse_duration), (gst_query_new_convert),
(gst_query_set_convert), (gst_query_parse_convert),
(gst_query_new_segment), (gst_query_set_segment),
(gst_query_parse_segment), (gst_query_new_seeking),
(gst_query_set_seeking), (gst_query_parse_seeking):
Add internal helpers for pre-registering quarks from static strings
and using the quark values directly instead of looking them up when
creating and parsing queries. Can be used for event construction too.
Closes #350432.
2006-08-16 11:47:54 +00:00
|
|
|
|
|
|
|
/* 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",
|
2008-04-08 19:39:28 +00:00
|
|
|
"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",
|
2011-06-08 15:25:43 +00:00
|
|
|
"clock", "ready", "position", "reset-time", "live", "min-latency",
|
2008-10-13 17:19:25 +00:00
|
|
|
"max-latency", "busy", "type", "owner", "update", "applied-rate",
|
|
|
|
"start", "stop", "minsize", "maxsize", "async", "proportion",
|
|
|
|
"diff", "timestamp", "flags", "cur-type", "cur", "stop-type",
|
2011-05-13 16:07:24 +00:00
|
|
|
"latency", "uri", "object", "taglist", "GstEventSegment",
|
2009-05-29 17:00:06 +00:00
|
|
|
"GstEventBufferSize", "GstEventQOS", "GstEventSeek", "GstEventLatency",
|
|
|
|
"GstMessageError", "GstMessageWarning", "GstMessageInfo",
|
2012-06-12 21:45:09 +00:00
|
|
|
"GstMessageBuffering", "GstMessageStateChanged", "GstMessageClockProvide",
|
2009-05-29 17:00:06 +00:00
|
|
|
"GstMessageClockLost", "GstMessageNewClock", "GstMessageStructureChange",
|
2012-09-02 00:17:44 +00:00
|
|
|
"GstMessageSegmentStart", "GstMessageSegmentDone",
|
|
|
|
"GstMessageDurationChanged",
|
2011-06-08 11:40:32 +00:00
|
|
|
"GstMessageAsyncDone", "GstMessageRequestState", "GstMessageStreamStatus",
|
2009-05-29 17:00:06 +00:00
|
|
|
"GstQueryPosition", "GstQueryDuration", "GstQueryLatency", "GstQueryConvert",
|
|
|
|
"GstQuerySegment", "GstQuerySeeking", "GstQueryFormats", "GstQueryBuffering",
|
2009-06-01 10:19:52 +00:00
|
|
|
"GstQueryURI", "GstEventStep", "GstMessageStepDone", "amount", "flush",
|
2009-11-18 06:52:24 +00:00
|
|
|
"intermediate", "GstMessageStepStart", "active", "eos", "sink-message",
|
2010-03-17 18:16:42 +00:00
|
|
|
"message", "GstMessageQOS", "running-time", "stream-time", "jitter",
|
2011-01-05 12:41:08 +00:00
|
|
|
"quality", "processed", "dropped", "buffering-ranges", "GstMessageProgress",
|
2011-03-03 15:31:49 +00:00
|
|
|
"code", "text", "percent", "timeout", "GstBufferPoolConfig", "caps", "size",
|
2012-03-14 18:37:22 +00:00
|
|
|
"min-buffers", "max-buffers", "prefix", "padding", "align", "time",
|
2011-05-13 16:07:24 +00:00
|
|
|
"GstQueryAllocation", "need-pool", "meta", "pool", "GstEventCaps",
|
2011-05-24 10:52:09 +00:00
|
|
|
"GstEventReconfigure", "segment", "GstQueryScheduling", "pull-mode",
|
2011-11-18 16:27:16 +00:00
|
|
|
"allocator", "GstEventFlushStop", "options", "GstQueryAcceptCaps",
|
2012-01-27 17:39:12 +00:00
|
|
|
"result", "GstQueryCaps", "filter", "modes", "GstEventStreamConfig",
|
2012-04-02 19:15:09 +00:00
|
|
|
"setup-data", "stream-headers", "GstEventGap", "GstQueryDrain", "params",
|
2012-05-20 16:10:24 +00:00
|
|
|
"GstEventTocSelect", "uid", "GstQueryToc", GST_ELEMENT_METADATA_LONGNAME,
|
2012-04-09 12:40:35 +00:00
|
|
|
GST_ELEMENT_METADATA_KLASS, GST_ELEMENT_METADATA_DESCRIPTION,
|
2012-05-20 16:48:55 +00:00
|
|
|
GST_ELEMENT_METADATA_AUTHOR, "toc", "toc-entry", "updated", "extend-uid",
|
2012-07-03 16:49:18 +00:00
|
|
|
"uid", "tags", "sub-entries", "info", "GstMessageTag", "GstEventTag",
|
|
|
|
"GstMessageResetTime",
|
2012-07-28 08:41:30 +00:00
|
|
|
"GstMessageToc", "GstEventTocGlobal", "GstEventTocCurrent",
|
2012-07-28 06:37:00 +00:00
|
|
|
"GstEventSegmentDone",
|
2013-09-17 11:09:34 +00:00
|
|
|
"GstEventStreamStart", "stream-id", "GstQueryContext",
|
2013-09-17 11:50:08 +00:00
|
|
|
"GstMessageNeedContext", "GstMessageHaveContext", "context", "context-type",
|
2014-03-16 14:08:00 +00:00
|
|
|
"GstMessageStreamStart", "group-id", "uri-redirection",
|
2014-04-28 07:43:32 +00:00
|
|
|
"GstMessageDeviceAdded", "GstMessageDeviceRemoved", "device",
|
2016-03-05 14:12:36 +00:00
|
|
|
"uri-redirection-permanent", "GstMessagePropertyNotify", "property-name",
|
2015-06-12 08:53:23 +00:00
|
|
|
"property-value", "streams", "GstEventSelectStreams",
|
|
|
|
"GstMessageStreamCollection", "collection", "stream", "stream-collection",
|
2016-07-25 09:22:36 +00:00
|
|
|
"GstMessageStreamsSelected", "GstMessageRedirect", "redirect-entry-locations",
|
2016-03-14 03:20:42 +00:00
|
|
|
"redirect-entry-taglists", "redirect-entry-structures",
|
2019-01-30 13:41:58 +00:00
|
|
|
"GstEventStreamGroupDone", "GstQueryBitrate", "nominal-bitrate",
|
2019-04-01 16:34:07 +00:00
|
|
|
"GstMessageDeviceChanged", "device-changed", "trickmode-interval",
|
2018-05-09 12:28:13 +00:00
|
|
|
"GstEventInstantRateChange",
|
2018-05-14 20:14:24 +00:00
|
|
|
"GstEventInstantRateSyncTime", "GstMessageInstantRateRequest",
|
2020-06-05 19:10:29 +00:00
|
|
|
"upstream-running-time", "base", "offset", "plugin-api", "plugin-api-flags",
|
Add internal helpers for pre-registering quarks from static strings and using the quark values directly instead of lo...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/Makefile.am:
* gst/gst.c: (init_post):
* gst/gst_private.h:
* gst/gstquark.c: (_priv_gst_quarks_initialize):
* gst/gstquark.h:
* gst/gstquery.c: (gst_query_new_position),
(gst_query_set_position), (gst_query_parse_position),
(gst_query_new_duration), (gst_query_set_duration),
(gst_query_parse_duration), (gst_query_new_convert),
(gst_query_set_convert), (gst_query_parse_convert),
(gst_query_new_segment), (gst_query_set_segment),
(gst_query_parse_segment), (gst_query_new_seeking),
(gst_query_set_seeking), (gst_query_parse_seeking):
Add internal helpers for pre-registering quarks from static strings
and using the quark values directly instead of looking them up when
creating and parsing queries. Can be used for event construction too.
Closes #350432.
2006-08-16 11:47:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
GQuark _priv_gst_quark_table[GST_QUARK_MAX];
|
|
|
|
|
|
|
|
void
|
|
|
|
_priv_gst_quarks_initialize (void)
|
|
|
|
{
|
|
|
|
gint i;
|
|
|
|
|
2008-10-13 17:19:25 +00:00
|
|
|
if (G_N_ELEMENTS (_quark_strings) != GST_QUARK_MAX)
|
2008-10-14 17:10:43 +00:00
|
|
|
g_warning ("the quark table is not consistent! %d != %d",
|
|
|
|
(int) G_N_ELEMENTS (_quark_strings), GST_QUARK_MAX);
|
2008-10-13 17:19:25 +00:00
|
|
|
|
Add internal helpers for pre-registering quarks from static strings and using the quark values directly instead of lo...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/Makefile.am:
* gst/gst.c: (init_post):
* gst/gst_private.h:
* gst/gstquark.c: (_priv_gst_quarks_initialize):
* gst/gstquark.h:
* gst/gstquery.c: (gst_query_new_position),
(gst_query_set_position), (gst_query_parse_position),
(gst_query_new_duration), (gst_query_set_duration),
(gst_query_parse_duration), (gst_query_new_convert),
(gst_query_set_convert), (gst_query_parse_convert),
(gst_query_new_segment), (gst_query_set_segment),
(gst_query_parse_segment), (gst_query_new_seeking),
(gst_query_set_seeking), (gst_query_parse_seeking):
Add internal helpers for pre-registering quarks from static strings
and using the quark values directly instead of looking them up when
creating and parsing queries. Can be used for event construction too.
Closes #350432.
2006-08-16 11:47:54 +00:00
|
|
|
for (i = 0; i < GST_QUARK_MAX; i++) {
|
|
|
|
_priv_gst_quark_table[i] = g_quark_from_static_string (_quark_strings[i]);
|
|
|
|
}
|
|
|
|
}
|