gstindex.sgml 6.62 KB
Newer Older
Wim Taymans's avatar
Wim Taymans committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
<!-- ##### SECTION Title ##### -->
GstIndex

<!-- ##### SECTION Short_Description ##### -->
Generate indexes on objects

<!-- ##### SECTION Long_Description ##### -->
<para>
GstIndex is used to generate a stream index of one or more elements
in a pipeline.
</para>

<!-- ##### SECTION See_Also ##### -->
<para>
Wim Taymans's avatar
Wim Taymans committed
15
#GstIndexFactory
Wim Taymans's avatar
Wim Taymans committed
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
</para>

<!-- ##### STRUCT GstIndexEntry ##### -->
<para>
The basic element of an index.
</para>

@type: 
@id: 

<!-- ##### STRUCT GstIndexGroup ##### -->
<para>
A group of related entries in an index.
</para>

@groupnum: 
@entries: 
@certainty: 
@peergroup: 

<!-- ##### ENUM GstIndexCertainty ##### -->
<para>
The certainty of a group in the index.
</para>

@GST_INDEX_UNKNOWN: accuracy is not known
@GST_INDEX_CERTAIN: accuracy is perfect
@GST_INDEX_FUZZY: accuracy is fuzzy

<!-- ##### ENUM GstIndexEntryType ##### -->
<para>
The different types of entries in the index.
</para>

@GST_INDEX_ENTRY_ID: This entry is an id that maps an index id to its owner object
@GST_INDEX_ENTRY_ASSOCIATION: This entry is an association between formats
@GST_INDEX_ENTRY_OBJECT: An object
@GST_INDEX_ENTRY_FORMAT: A format definition

<!-- ##### ENUM GstIndexLookupMethod ##### -->
<para>
Specify the method to find an index entry in the index.
</para>

@GST_INDEX_LOOKUP_EXACT: There has to be an exact indexentry with the given format/value
@GST_INDEX_LOOKUP_BEFORE: The exact entry or the one before it
@GST_INDEX_LOOKUP_AFTER: The exact entry or the one after it

Wim Taymans's avatar
Wim Taymans committed
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
<!-- ##### ENUM GstIndexFlags ##### -->
<para>
Flags for this index
</para>

@GST_INDEX_WRITABLE: The index is writable
@GST_INDEX_READABLE: The index is readable
@GST_INDEX_FLAG_LAST: First flag that can be used by subclasses

<!-- ##### MACRO GST_INDEX_ID_INVALID ##### -->
<para>
An invalid index id
</para>



<!-- ##### MACRO GST_INDEX_IS_READABLE ##### -->
<para>
Check if the index can be read from
</para>

@obj: The index to check


<!-- ##### MACRO GST_INDEX_IS_WRITABLE ##### -->
<para>
Check if the index can be written to
</para>

@obj: The index to check


Wim Taymans's avatar
Wim Taymans committed
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
<!-- ##### MACRO GST_INDEX_NASSOCS ##### -->
<para>
Get the number of associations in the entry.
</para>

@entry: The entry to query


<!-- ##### MACRO GST_INDEX_ASSOC_FLAGS ##### -->
<para>
Get the flags for this entry
</para>

@entry: The entry to query


<!-- ##### MACRO GST_INDEX_ASSOC_FORMAT ##### -->
<para>
Get the i-th format of the entry.
</para>

@entry: The entry to query
@i: The format index


<!-- ##### MACRO GST_INDEX_ASSOC_VALUE ##### -->
<para>
Get the i-th value of the entry.
</para>

@entry: The entry to query
@i: The value index


<!-- ##### STRUCT GstIndexAssociation ##### -->
<para>
An association in an entry.
</para>

@format: the format of the association
@value: the value of the association

<!-- ##### ENUM GstAssocFlags ##### -->
<para>
flags for an association entry
</para>

Wim Taymans's avatar
Wim Taymans committed
143 144 145 146
@GST_ASSOCIATION_FLAG_NONE: no extra flags
@GST_ASSOCIATION_FLAG_KEY_UNIT: the entry marks a key unit, a key unit is one
                                that marks a place where one can randomly seek to.
@GST_ASSOCIATION_FLAG_LAST: extra user defined flags should start here.
Wim Taymans's avatar
Wim Taymans committed
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192

<!-- ##### MACRO GST_INDEX_FORMAT_FORMAT ##### -->
<para>
Get the format of the format entry
</para>

@entry: The entry to query


<!-- ##### MACRO GST_INDEX_FORMAT_KEY ##### -->
<para>
Get the key of the format entry
</para>

@entry: The entry to query


<!-- ##### MACRO GST_INDEX_ID_DESCRIPTION ##### -->
<para>
Get the description of the id entry
</para>

@entry: The entry to query


<!-- ##### USER_FUNCTION GstIndexFilter ##### -->
<para>
Function to filter out entries in the index.
</para>

@index: The index being queried
@entry: The entry to be added.
@Returns: This function should return TRUE if the entry is to be added
          to the index, FALSE otherwise.


<!-- ##### USER_FUNCTION GstIndexResolver ##### -->
<para>
Function to resolve ids to writer descriptions.
</para>

@index: the index being queried.
@writer: The object that wants to write
@writer_string: A description of the writer.
@user_data: user_data as registered
@Returns: TRUE if an id could be assigned to the writer.
193 194
<!-- # Unused Parameters # -->
@writer_id: A pointer to the id that has to be assigned to this writer
Wim Taymans's avatar
Wim Taymans committed
195 196


Wim Taymans's avatar
Wim Taymans committed
197 198 199 200 201 202 203 204 205
<!-- ##### ENUM GstIndexResolverMethod ##### -->
<para>
The method used to resolve index writers
</para>

@GST_INDEX_RESOLVER_CUSTOM: Use a custom resolver
@GST_INDEX_RESOLVER_GTYPE: Resolve based on the GType of the object
@GST_INDEX_RESOLVER_PATH: Resolve on the path in graph

Wim Taymans's avatar
Wim Taymans committed
206 207 208 209 210 211
<!-- ##### STRUCT GstIndex ##### -->
<para>
The GstIndex object
</para>


Benjamin Otte's avatar
Benjamin Otte committed
212 213 214 215 216 217 218 219 220 221 222 223 224
<!-- ##### SIGNAL GstIndex::entry-added ##### -->
<para>
Is emited when a new entry is added to the index.
</para>

@gstindex: the object which received the signal.
@arg1: The entry added to the index.

<!-- ##### ARG GstIndex:resolver ##### -->
<para>

</para>

Wim Taymans's avatar
Wim Taymans committed
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366
<!-- ##### FUNCTION gst_index_new ##### -->
<para>

</para>

@Returns: 


<!-- ##### FUNCTION gst_index_get_group ##### -->
<para>

</para>

@index: 
@Returns: 


<!-- ##### FUNCTION gst_index_new_group ##### -->
<para>

</para>

@index: 
@Returns: 


<!-- ##### FUNCTION gst_index_set_group ##### -->
<para>

</para>

@index: 
@groupnum: 
@Returns: 


<!-- ##### FUNCTION gst_index_set_certainty ##### -->
<para>

</para>

@index: 
@certainty: 


<!-- ##### FUNCTION gst_index_get_certainty ##### -->
<para>

</para>

@index: 
@Returns: 


<!-- ##### FUNCTION gst_index_set_filter ##### -->
<para>

</para>

@index: 
@filter: 
@user_data: 


<!-- ##### FUNCTION gst_index_set_resolver ##### -->
<para>

</para>

@index: 
@resolver: 
@user_data: 


<!-- ##### FUNCTION gst_index_get_writer_id ##### -->
<para>

</para>

@index: 
@writer: 
@id: 
@Returns: 


<!-- ##### FUNCTION gst_index_add_format ##### -->
<para>

</para>

@index: 
@id: 
@format: 
@Returns: 


<!-- ##### FUNCTION gst_index_add_association ##### -->
<para>

</para>

@index: 
@id: 
@flags: 
@format: 
@value: 
@Varargs: 
@Returns: 


<!-- ##### FUNCTION gst_index_add_object ##### -->
<para>

</para>

@index: 
@id: 
@key: 
@type: 
@object: 
@Returns: 


<!-- ##### FUNCTION gst_index_add_id ##### -->
<para>

</para>

@index: 
@id: 
@description: 
@Returns: 


<!-- ##### FUNCTION gst_index_get_assoc_entry ##### -->
<para>

</para>

@index: 
@id: 
@method: 
Wim Taymans's avatar
Wim Taymans committed
367
@flags: 
Wim Taymans's avatar
Wim Taymans committed
368 369 370 371 372 373 374 375 376 377 378 379 380
@format: 
@value: 
@Returns: 


<!-- ##### FUNCTION gst_index_get_assoc_entry_full ##### -->
<para>

</para>

@index: 
@id: 
@method: 
Wim Taymans's avatar
Wim Taymans committed
381
@flags: 
Wim Taymans's avatar
Wim Taymans committed
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407
@format: 
@value: 
@func: 
@user_data: 
@Returns: 


<!-- ##### FUNCTION gst_index_entry_free ##### -->
<para>

</para>

@entry: 


<!-- ##### FUNCTION gst_index_entry_assoc_map ##### -->
<para>

</para>

@entry: 
@format: 
@value: 
@Returns: 


Wim Taymans's avatar
Wim Taymans committed
408 409 410 411 412 413 414 415 416
<!-- ##### FUNCTION gst_index_commit ##### -->
<para>

</para>

@index: 
@id: