From d97a8e58cc7b678cb6bec440875075e26188e468 Mon Sep 17 00:00:00 2001 From: "Reynaldo H. Verdejo Pinochet" Date: Thu, 7 Sep 2017 17:35:41 -0700 Subject: [PATCH] application-development: interfaces: rewrite URI handler section --- .../application-development/advanced/interfaces.md | 31 ++++++++++++---------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/markdown/application-development/advanced/interfaces.md b/markdown/application-development/advanced/interfaces.md index 17b4110..131a014 100644 --- a/markdown/application-development/advanced/interfaces.md +++ b/markdown/application-development/advanced/interfaces.md @@ -19,28 +19,31 @@ scope and purpose of each interface. [element-object]: application-development/basics/elements.md#using-an-element-as-a-gobject -## The URI interface - -In all examples so far, we have only supported local files through the -“filesrc” element. GStreamer, obviously, supports many more location -sources. However, we don't want applications to need to know any -particular element implementation details, such as element names for -particular network source types and so on. Therefore, there is a URI -interface, which can be used to get the source element that supports a -particular URI type. There is no strict rule for URI naming, but in -general we follow naming conventions that others use too. For example, -assuming you have the correct plugins installed, GStreamer supports: +## The URI Handler interface + +In the examples so far, we have only showed support for local files +using the “filesrc” element, but GStreamer supports many more location +sources. + +GStreamer doesn't require applications to know any `URI` specifics, like +what element to use for a particular network source types. These details +are abstracted by the `GstURIHandler` interface. + +There is no strict rule for `URI` naming, but in general, we follow +common-usage naming conventions. For example, assuming you have the +correct plugins installed, GStreamer supports: ``` file://// http://// mms://// +dvb:// ... ``` + In order to get the source or sink element supporting a particular URI, -use `gst_element_make_from_uri ()`, with the URI type being either -`GST_URI_SRC` for a source element, or `GST_URI_SINK` for a sink -element. +use `gst_element_make_from_uri ()` with `GST_URI_SRC` or `GST_URI_SINK` +as `GstURIType` depending in the direction you need. You can convert filenames to and from URIs using GLib's `g_filename_to_uri ()` and `g_uri_to_filename ()`. -- 2.7.4