UriHandlerT

The URIHandler is an interface that is implemented by Source and Sink GstElement to simplify then handling of URI.

An application can use the following functions to quickly get an element that handles the given URI for reading or writing (gst_element_make_from_uri()).

Source and Sink plugins should implement this interface when possible.

Last reviewed on 2005-11-09 (0.9.4)

Members

Functions

getUriHandlerTStruct
GstURIHandler* getUriHandlerTStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
gstUriHandlerGetProtocols
string[] gstUriHandlerGetProtocols()

Gets the list of protocols supported by handler. This list may not be modified.

gstUriHandlerGetUri
string gstUriHandlerGetUri()

Gets the currently handled URI.

gstUriHandlerGetUriType
GstURIType gstUriHandlerGetUriType()

Gets the type of the given URI handler

gstUriHandlerSetUri
int gstUriHandlerSetUri(string uri)

Tries to set the URI of the given handler.

Static functions

gstElementMakeFromUri
Element gstElementMakeFromUri(GstURIType type, string uri, string elementname)

Creates an element for handling the given URI.

gstFilenameToUri
string gstFilenameToUri(string filename)

Similar to g_filename_to_uri(), but attempts to handle relative file paths as well. Before converting filename into an URI, it will be prefixed by the current working directory if it is a relative path, and then the path will be canonicalised so that it doesn't contain any './' or '../' segments. On Windows filename should be in UTF-8 encoding.

gstUriConstruct
string gstUriConstruct(string protocol, string location)

Constructs a URI for a given valid protocol and location. Free-function: g_free

gstUriErrorQuark
GQuark gstUriErrorQuark()
gstUriGetLocation
string gstUriGetLocation(string uri)

Extracts the location out of a given valid URI, ie. the protocol and "://" are stripped from the URI, which means that the location returned includes the hostname if one is specified. The returned string must be freed using g_free(). Free-function: g_free

gstUriGetProtocol
string gstUriGetProtocol(string uri)

Extracts the protocol out of a given valid URI. The returned string must be freed using g_free().

gstUriHasProtocol
int gstUriHasProtocol(string uri, string protocol)

Checks if the protocol of a given valid URI matches protocol.

gstUriIsValid
int gstUriIsValid(string uri)

Tests if the given string is a valid URI identifier. URIs start with a valid scheme followed by ":" and maybe a string identifying the location.

isSupported
int isSupported(GstURIType type, string protocol)

Checks if an element exists that supports the given URI protocol. Note that a positive return value does not imply that a subsequent call to gst_element_make_from_uri() is guaranteed to work.

isValid
int isValid(string protocol)

Tests if the given string is a valid protocol identifier. Protocols must consist of alphanumeric characters, '+', '-' and '.' and must start with a alphabetic character. See RFC 3986 Section 3.1.

Variables

gstURIHandler
GstURIHandler* gstURIHandler;

the main Gtk struct

Meta