gstquark.c 4.58 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
/* 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
Tim-Philipp Müller's avatar
Tim-Philipp Müller committed
19 20
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 * Boston, MA 02110-1301, USA.
21 22 23 24
 */

#include "gst_private.h"
#include "gstquark.h"
25
#include "gstelementmetadata.h"
26 27 28 29 30 31 32

/* 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",
33 34 35 36
  "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",
Wim Taymans's avatar
Wim Taymans committed
37
  "clock", "ready", "position", "reset-time", "live", "min-latency",
38 39 40
  "max-latency", "busy", "type", "owner", "update", "applied-rate",
  "start", "stop", "minsize", "maxsize", "async", "proportion",
  "diff", "timestamp", "flags", "cur-type", "cur", "stop-type",
Wim Taymans's avatar
Wim Taymans committed
41
  "latency", "uri", "object", "taglist", "GstEventSegment",
42 43
  "GstEventBufferSize", "GstEventQOS", "GstEventSeek", "GstEventLatency",
  "GstMessageError", "GstMessageWarning", "GstMessageInfo",
44
  "GstMessageBuffering", "GstMessageStateChanged", "GstMessageClockProvide",
45
  "GstMessageClockLost", "GstMessageNewClock", "GstMessageStructureChange",
46 47
  "GstMessageSegmentStart", "GstMessageSegmentDone",
  "GstMessageDurationChanged",
48
  "GstMessageAsyncDone", "GstMessageRequestState", "GstMessageStreamStatus",
49 50
  "GstQueryPosition", "GstQueryDuration", "GstQueryLatency", "GstQueryConvert",
  "GstQuerySegment", "GstQuerySeeking", "GstQueryFormats", "GstQueryBuffering",
Wim Taymans's avatar
Wim Taymans committed
51
  "GstQueryURI", "GstEventStep", "GstMessageStepDone", "amount", "flush",
52
  "intermediate", "GstMessageStepStart", "active", "eos", "sink-message",
53
  "message", "GstMessageQOS", "running-time", "stream-time", "jitter",
54
  "quality", "processed", "dropped", "buffering-ranges", "GstMessageProgress",
55
  "code", "text", "percent", "timeout", "GstBufferPoolConfig", "caps", "size",
56
  "min-buffers", "max-buffers", "prefix", "padding", "align", "time",
Wim Taymans's avatar
Wim Taymans committed
57
  "GstQueryAllocation", "need-pool", "meta", "pool", "GstEventCaps",
Wim Taymans's avatar
Wim Taymans committed
58
  "GstEventReconfigure", "segment", "GstQueryScheduling", "pull-mode",
Wim Taymans's avatar
Wim Taymans committed
59
  "allocator", "GstEventFlushStop", "options", "GstQueryAcceptCaps",
60
  "result", "GstQueryCaps", "filter", "modes", "GstEventStreamConfig",
Stefan Sauer's avatar
Stefan Sauer committed
61
  "setup-data", "stream-headers", "GstEventGap", "GstQueryDrain", "params",
62
  "GstEventTocSelect", "uid", "GstQueryToc", GST_ELEMENT_METADATA_LONGNAME,
63
  GST_ELEMENT_METADATA_KLASS, GST_ELEMENT_METADATA_DESCRIPTION,
64
  GST_ELEMENT_METADATA_AUTHOR, "toc", "toc-entry", "updated", "extend-uid",
65 66
  "uid", "tags", "sub-entries", "info", "GstMessageTag", "GstEventTag",
  "GstMessageResetTime",
67
  "GstMessageToc", "GstEventTocGlobal", "GstEventTocCurrent",
68
  "GstEventSegmentDone",
69
  "GstEventStreamStart", "stream-id", "GstQueryContext",
70
  "GstMessageNeedContext", "GstMessageHaveContext", "context", "context-type",
71
  "GstMessageStreamStart", "group-id", "uri-redirection",
72
  "GstMessageDeviceAdded", "GstMessageDeviceRemoved", "device",
73
  "uri-redirection-permanent", "GstMessagePropertyNotify", "property-name",
74 75
  "property-value", "streams", "GstEventSelectStreams",
  "GstMessageStreamCollection", "collection", "stream", "stream-collection",
76
  "GstMessageStreamsSelected", "GstMessageRedirect", "redirect-entry-locations",
77 78
  "redirect-entry-taglists", "redirect-entry-structures",
  "GstEventStreamGroupDone"
79 80 81 82 83 84 85 86 87
};

GQuark _priv_gst_quark_table[GST_QUARK_MAX];

void
_priv_gst_quarks_initialize (void)
{
  gint i;

88
  if (G_N_ELEMENTS (_quark_strings) != GST_QUARK_MAX)
89 90
    g_warning ("the quark table is not consistent! %d != %d",
        (int) G_N_ELEMENTS (_quark_strings), GST_QUARK_MAX);
91

92 93 94 95
  for (i = 0; i < GST_QUARK_MAX; i++) {
    _priv_gst_quark_table[i] = g_quark_from_static_string (_quark_strings[i]);
  }
}