delthas / libnp

A tiny library for extracting information about the music/image/video currently playing on the system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

libnp builds.sr.ht status

A tiny cross-platform library for extracting information about the music/image/video that is Now Playing on the system.

Supported OS:

  • Windows (using GlobalSystemMediaTransportControlsSessionManager)
  • Linux (using DBus/MPRIS)

Building

cmake .
cmake --build .

Usage

See include/np.h and np/main.c for an example.

The general idea is:

np_init();

struct np_info *info = np_info_get();
if (info) {
    // do something with info->track, ...

    np_info_destroy(info);
}

np_destroy();

License

MIT

About

A tiny library for extracting information about the music/image/video currently playing on the system

License:MIT License


Languages

Language:C 94.3%Language:CMake 5.7%