|
gstreamermm
1.10.0
|
An interface to ease URI handling in plugins. More...
#include <gstreamermm/urihandler.h>

Public Member Functions | |
| URIHandler (URIHandler&& src) noexcept | |
| URIHandler& | operator= (URIHandler&& src) noexcept |
| ~URIHandler () noexcept override | |
| GstURIHandler* | gobj () |
| Provides access to the underlying C GObject. More... | |
| const GstURIHandler* | gobj () const |
| Provides access to the underlying C GObject. More... | |
| URIType | get_uri_type () const |
| Gets the type of the given URI handler. More... | |
| std::vector< Glib::ustring > | get_protocols () const |
| Gets the list of protocols supported by handler. More... | |
| Glib::ustring | get_uri () const |
| Gets the currently handled URI. More... | |
| bool | set_uri (const Glib::ustring& uri) |
| Tries to set the URI of the given handler. More... | |
| virtual Glib::ustring | get_uri_vfunc () const |
| Virtual method which should be implemented to return the URI currently handled by the element. More... | |
| virtual bool | set_uri_vfunc (const Glib::ustring& uri, GError** error) |
| Virtual method which should be implemented to set a new URI. More... | |
| virtual const gchar* const * | get_protocols_vfunc () const |
| Method to return the list of protocols handled by the element. More... | |
| virtual URIType | get_type_vfunc () |
| Method to tell whether the element handles source or sink URI. More... | |
Public Member Functions inherited from Glib::Interface | |
| Interface () | |
| Interface (Interface &&src) noexcept | |
| Interface & | operator= (Interface &&src) noexcept |
| Interface (const Glib::Interface_Class &interface_class) | |
| Interface (GObject *castitem) | |
| ~Interface () noexcept override | |
| Interface (const Interface &)=delete | |
| Interface & | operator= (const Interface &)=delete |
| GObject * | gobj () |
| const GObject * | gobj () const |
Public Member Functions inherited from Glib::ObjectBase | |
| ObjectBase (const ObjectBase &)=delete | |
| ObjectBase & | operator= (const ObjectBase &)=delete |
| void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value) |
| void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const |
| void | set_property (const Glib::ustring &property_name, const PropertyType &value) |
| void | get_property (const Glib::ustring &property_name, PropertyType &value) const |
| void | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void > &slot) |
| void | connect_property_changed (const Glib::ustring &property_name, sigc::slot< void > &&slot) |
| sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, const sigc::slot< void > &slot) |
| sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, sigc::slot< void > &&slot) |
| void | freeze_notify () |
| void | thaw_notify () |
| virtual void | reference () const |
| virtual void | unreference () const |
| GObject * | gobj () |
| const GObject * | gobj () const |
| GObject * | gobj_copy () const |
Public Member Functions inherited from sigc::trackable | |
| trackable () noexcept | |
| trackable (const trackable &src) noexcept | |
| trackable (trackable &&src) | |
| ~trackable () | |
| void | add_destroy_notify_callback (void *data, func_destroy_notify func) const |
| void | notify_callbacks () |
| trackable & | operator= (const trackable &src) |
| trackable & | operator= (trackable &&src) |
| void | remove_destroy_notify_callback (void *data) const |
Static Public Member Functions | |
| static void | add_interface (GType gtype_implementer) |
| static GType | get_type () |
| Get the GType for this class, for use with the underlying GObject type system. More... | |
| static bool | protocol_is_valid (const Glib::ustring& protocol) |
| Tests if the given string is a valid protocol identifier. More... | |
| static bool | protocol_is_supported (const Gst::URIType type, const Glib::ustring& protocol) |
| Checks if an element exists that supports the given URI protocol. More... | |
| static bool | uri_is_valid (const Glib::ustring& uri) |
| Tests if the given string is a valid URI identifier. More... | |
| static bool | uri_has_protocol (const Glib::ustring& uri, const Glib::ustring& protocol) |
| Checks if the protocol of a given valid URI matches protocol. More... | |
| static Glib::ustring | get_protocol (const Glib::ustring& uri) |
| Extracts the protocol out of a given valid URI. More... | |
| static Glib::ustring | get_location (const Glib::ustring& uri) |
| Extracts the location out of a given valid URI, ie. More... | |
| static Glib::ustring | construct_uri (const Glib::ustring& protocol, const Glib::ustring& location) |
| Constructs a URI for a given valid protocol and location. More... | |
| static Glib::ustring | filename_to_uri (const Glib::ustring& filename) |
| Similar to Glib::filename_to_uri(), but attempts to handle relative file paths as well. More... | |
| static Glib::RefPtr< Gst::Element > | make_element_from_uri (const Gst::URIType type, const Glib::ustring& uri, const Glib::ustring& name) |
| Creates an element for handling the given URI. More... | |
Protected Member Functions | |
| URIHandler () | |
| You should derive from this class to use it. More... | |
Protected Member Functions inherited from Glib::ObjectBase | |
| ObjectBase () | |
| ObjectBase (const char *custom_type_name) | |
| ObjectBase (const std::type_info &custom_type_info) | |
| ObjectBase (ObjectBase &&src) noexcept | |
| ObjectBase & | operator= (ObjectBase &&src) noexcept |
| virtual | ~ObjectBase () noexcept=0 |
| void | initialize (GObject *castitem) |
| void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper) |
Related Functions | |
(Note that these are not member functions.) | |
| Glib::RefPtr< Gst::URIHandler > | wrap (GstURIHandler* object, bool take_copy=false) |
| A Glib::wrap() method for this object. More... | |
Additional Inherited Members | |
Public Types inherited from sigc::trackable | |
| typedef internal::func_destroy_notify | func_destroy_notify |
An interface to ease URI handling in plugins.
The Gst::URIHandler is an interface that is implemented by Source and Sink Gst::Element 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 (make_element_from_uri()).
Source and Sink plugins should implement this interface when possible.
Last reviewed on 2016-08-27 (1.8.0)
|
protected |
You should derive from this class to use it.
|
noexcept |
|
overridenoexcept |
|
static |
|
static |
Constructs a URI for a given valid protocol and location.
| protocol | Protocol for URI. |
| location | Location for URI. |
nullptr if the given URI protocol is not valid, or the given location is nullptr.
|
static |
Similar to Glib::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.
| filename | Absolute or relative file name path. |
nullptr on error.| Glib::Error |
|
static |
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.
Free-function: g_free
| uri | A URI string. |
nullptr if the URI isn't valid. If the URI does not contain a location, an empty string is returned.
|
static |
Extracts the protocol out of a given valid URI.
| uri | A URI string. |
| std::vector<Glib::ustring> Gst::URIHandler::get_protocols | ( | ) | const |
Gets the list of protocols supported by handler.
This list may not be modified.
nullptr if the handler isn't implemented properly, or the handler doesn't support any protocols.
|
virtual |
Method to return the list of protocols handled by the element.
|
static |
Get the GType for this class, for use with the underlying GObject type system.
|
virtual |
Method to tell whether the element handles source or sink URI.
| Glib::ustring Gst::URIHandler::get_uri | ( | ) | const |
Gets the currently handled URI.
nullptr if there are no URI currently handled. | URIType Gst::URIHandler::get_uri_type | ( | ) | const |
Gets the type of the given URI handler.
|
virtual |
Virtual method which should be implemented to return the URI currently handled by the element.
|
inline |
Provides access to the underlying C GObject.
|
inline |
Provides access to the underlying C GObject.
|
static |
Creates an element for handling the given URI.
| type | Whether to create a source or a sink. |
| uri | URI to create an element for. |
| name | Name of created element, can be nullptr. |
nullptr if none could be created.| Glib::Error |
|
noexcept |
|
static |
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.
| type | Whether to check for a source or a sink. |
| protocol | Protocol that should be checked for (e.g. "http" or "smb"). |
true.
|
static |
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.
| protocol | A string. |
true if the string is a valid protocol identifier, false otherwise. | bool Gst::URIHandler::set_uri | ( | const Glib::ustring & | uri | ) |
Tries to set the URI of the given handler.
| uri | URI to set. |
true if the URI was set successfully, else false.| Glib::Error |
|
virtual |
Virtual method which should be implemented to set a new URI.
|
static |
Checks if the protocol of a given valid URI matches protocol.
| uri | A URI string. |
| protocol | A protocol string (e.g. "http"). |
true if the protocol matches.
|
static |
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.
| uri | A URI string. |
true if the string is a valid URI.
|
related |
A Glib::wrap() method for this object.
| object | The C instance. |
| take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |
1.8.18