giosrc

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 Gio.File is not mounted giosrc will post a message of type Gst.MessageType.ELEMENT with name "not-mounted" on the bus. The message also contains the Gio.File and the corresponding URI. Applications can use the "not-mounted" message to mount the Gio.File by calling Gio.File.prototype.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

 gst-launch-1.0 -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.

 gst-launch-1.0 -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.

 gst-launch-1.0 -v giosrc location=smb://othercomputer/demo.mp3 ! decodebin ! audioconvert ! audioresample ! autoaudiosink

The above pipeline will read and decode and play an mp3 file from a SAMBA server.

Hierarchy

GObject.Object
    ╰──GObject.InitiallyUnowned
        ╰──Gst.Object
            ╰──Gst.Element
                ╰──GstBase.BaseSrc
                    ╰──GstGioBaseSrc
                        ╰──giosrc

Implemented interfaces

Factory details

Authors: – René Stadler , Sebastian Dröge

Classification:Source/File

Rank – secondary

Plugin – gio

Package – GStreamer Base Plug-ins

Pad Templates

src

ANY

Presencealways

Directionsrc

Object typeGst.Pad


Signals

done-waiting-data

function done_waiting_data_callback(param_0: Gst.Element * param_0, udata: Object udata): {
    // javascript callback for the 'done-waiting-data' signal
}

Signal notifying that we are done waiting for data

Parameters:

param_0
No description available
udata
No description available

Flags: Run Last

Since : 1.20


waiting-data

function waiting_data_callback(param_0: Gst.Element * param_0, udata: Object udata): {
    // javascript callback for the 'waiting-data' signal
}

Signal notifying that we are stalled waiting for data

Parameters:

param_0
No description available
udata
No description available

Flags: Run Last

Since : 1.20


Properties

file

“file” Gio.File 

Gio.File to read from.

Flags : Read / Write


is-growing

“is-growing” Number

Whether the file is currently growing. When activated EOS is never pushed and the user needs to handle it himself. This modes allows to keep reading the file while it is being written on file.

You can reset the property to false at any time and the file will start not being considered growing and EOS will be pushed when required.

Flags : Read / Write

Default value : false

Since : 1.20


location

“location” String

URI location to read from

Flags : Read / Write

Default value : NULL


The results of the search are