Ubuntu TV Media Scanner
A centralized index for removable media content.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
mediascanner Reference Manual

description

The Ubuntu TV media scanner maintains a list of media files available to the user along with meta-data for those files. These may be accessed from a local file system which is physically attached to the device or via network mounts or sharing protocols.

This mediascanner API provides access to this information and can be used to schedule scans and to control the scanning process.

Most applications will access the mediascanner via the Grilo API, via the grl-mediascanner Grilo plugin, which uses this mediascanner API.

See mediascanner::MediaIndex and mediascanner::WritableMediaIndex.

See the Architecture page for more details.

Control

Most users will configure the mediascanner via the control panel, which uses the mediascanner's DConf settings.

Basic Usage

Include, for instance, the mediaindex header:

(You may include other headers, such as mediascanner/writeablemediaindex.h instead.)

If your source file is program.cc, you can compile it with:

g++ program.cc -o program `pkg-config --cflags --libs mediascanner-1.0`

Alternatively, if using autoconf, use the following in configure.ac:

PKG_CHECK_MODULES([MEDIASCANNER], [mediascanner-1.0])

Then use the generated MEDIASCANNER_CFLAGS and MEDIASCANNER_LIBS variables in the project Makefile.am files. For example:

program_CPPFLAGS = $(MEDIASCANNER_CFLAGS)
program_LDADD = $(MEDIASCANNER_LIBS)