Constructor

ClapperMediaItemnew_cached

since: 0.8

Declaration [src]

ClapperMediaItem*
clapper_media_item_new_cached (
  const gchar* uri,
  const gchar* location
)

Description [src]

Same as clapper_media_item_new(), but allows to provide a location of a cache file where particular media at uri is supposed to be found.

File at location existence will be checked upon starting playback of created item. If cache file is not found, media item uri will be used as fallback. In this case when ClapperPlayer:download-enabled is set to TRUE, item will be downloaded and cached again if possible.

Available since: 0.8

Parameters

uri

Type: const gchar*

A media URI.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
location

Type: const gchar*

A path to downloaded file.

The argument can be NULL.
The data is owned by the caller of the function.
The value is a platform-native string, using the preferred OS encoding on Unix and UTF-8 on Windows.

Return value

Type: ClapperMediaItem

A new ClapperMediaItem.

The caller of the function takes ownership of the data, and is responsible for freeing it.