giosrc

giosrc — Read from any GIO-supported location

Synopsis

struct              GstGioSrc;

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GstObject
               +----GstElement
                     +----GstBaseSrc
                           +----GstGioBaseSrc
                                 +----GstGioSrc

Implemented Interfaces

GstGioSrc implements GstURIHandler.

Properties

  "location"                 gchar*                : Read / Write
  "file"                     GFile*                : Read / Write

Description

This plugin reads data from a local or remote location specified by an URI. This location can be specified using any protocol supported by the GIO library or it's VFS backends. Common protocols are 'file', 'http', 'ftp', or 'smb'.

If an URI or GFile is not mounted giosrc will post a message of type GST_MESSAGE_ELEMENT with name "not-mounted" on the bus. The message also contains the GFile and the corresponding URI. Applications can use the "not-mounted" message to mount the GFile by calling g_file_mount_enclosing_volume() and then restart the pipeline after the mounting has succeeded. Note that right after the "not-mounted" message a normal error message is posted on the bus which should be ignored if "not-mounted" is handled by the application, for example by calling gst_bus_set_flushing(bus, TRUE) after the "not-mounted" message was received and gst_bus_set_flushing(bus, FALSE) after the mounting was successful.

Example launch lines

1
gst-launch -v giosrc location=file:///home/joe/foo.xyz ! fakesink
The above pipeline will simply read a local file and do nothing with the data read. Instead of giosrc, we could just as well have used the filesrc element here.
1
gst-launch -v giosrc location=smb://othercomputer/foo.xyz ! filesink location=/home/joe/foo.xyz
The above pipeline will copy a file from a remote host to the local file system using the Samba protocol.
1
gst-launch -v giosrc location=http://music.foobar.com/demo.mp3 ! mad ! audioconvert ! audioresample ! alsasink
The above pipeline will read and decode and play an mp3 file from a web server using the http protocol.

Synopsis

Element Information

plugin

gio

author

René Stadler <mail@renestadler.de>, Sebastian Dröge <sebastian.droege@collabora.co.uk>

class

Source/File

Element Pads

name

src

direction

source

presence

always

details

ANY

Details

struct GstGioSrc

struct GstGioSrc;

Opaque data structure.

Property Details

The "location" property

  "location"                 gchar*                : Read / Write

URI location to read from.

Default value: NULL


The "file" property

  "file"                     GFile*                : Read / Write

GFile to read from.

Since 0.10.20

See Also

GstFileSrc, GstGnomeVFSSrc, GstGioSink