TypeFindFactory

These functions allow querying informations about registered typefind functions. How to create and register these functions is described in the section "Writing typefind functions".

The above example shows how to write a very simple typefinder that identifies the given data. You can get quite a bit more complicated than that though.

Last reviewed on 2005-11-09 (0.9.4)

Constructors

this
this(GstTypeFindFactory* gstTypeFindFactory)

Sets our main struct and passes it to the parent class

Members

Functions

callFunction
void callFunction(TypeFind find)

Calls the GstTypeFindFunction associated with this factory.

getCaps
Caps getCaps()

Gets the GstCaps associated with a typefind factory.

getExtensions
string[] getExtensions()

Gets the extensions associated with a GstTypeFindFactory. The returned array should not be changed. If you need to change stuff in it, you should copy it using g_strdupv(). This function may return NULL to indicate a 0-length list.

getStruct
void* getStruct()

the main Gtk struct as a void*

getTypeFindFactoryStruct
GstTypeFindFactory* getTypeFindFactoryStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
hasFunction
int hasFunction()

Check whether the factory has a typefind function. Typefind factories without typefind functions are a last-effort fallback mechanism to e.g. assume a certain media type based on the file extension.

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

getList
ListG getList()

Gets the list of all registered typefind factories. You must free the list using gst_plugin_feature_list_free(). The returned factories are sorted by highest rank first, and then by factory name. Free-function: gst_plugin_feature_list_free

Variables

gstTypeFindFactory
GstTypeFindFactory* gstTypeFindFactory;

the main Gtk struct

Inherited Members

From PluginFeature

gstPluginFeature
GstPluginFeature* gstPluginFeature;

the main Gtk struct

getPluginFeatureStruct
GstPluginFeature* getPluginFeatureStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
setRank
void setRank(uint rank)

Specifies a rank for a plugin feature, so that autoplugging uses the most appropriate feature.

getRank
uint getRank()

Gets the rank of a plugin feature.

getPlugin
Plugin getPlugin()

Get the plugin that provides this feature.

getPluginName
string getPluginName()

Get the name of the plugin that provides this feature. Since 1.2.0

load
PluginFeature load()

Loads the plugin containing feature if it's not already loaded. feature is unaffected; use the return value instead.

listCopy
ListG listCopy(ListG list)

Copies the list of features. Caller should call gst_plugin_feature_list_free when done with the list.

listFree
void listFree(ListG list)

Unrefs each member of list, then frees the list.

checkVersion
int checkVersion(uint minMajor, uint minMinor, uint minMicro)

Checks whether the given plugin feature is at least the required version

rankCompareFunc
int rankCompareFunc(void* p1, void* p2)

Compares the two given GstPluginFeature instances. This function can be used as a GCompareFunc when sorting by rank and then by name.

Meta