GNOME Media 0.1.0 - internet radio and photographs on one map
=============================================================

gnome-media puts two layers of markers on a single OpenStreetMap:

  * radio stations, placed in the cities they broadcast from
    (from GNOME Radio 85.0.1: the station list and its GStreamer playback)
  * photographs, placed where they were taken, from the GPS position in
    their EXIF data (from gPhoto 3.0.1: the libgphoto2 camera layer and
    the picture viewer)

Click a station marker to listen.  Where several stations share a city
(Oslo has 15) the marker shows a count and opens a menu.  Open a folder
of pictures (Ctrl+O) or import from a camera (Ctrl+Shift+C); every
picture with a GPS position appears as an orange dot; click it to select
the picture, double-click a thumbnail to open the viewer.  The search box
filters the station list and the map together.


What came from where
--------------------

  src/camera.c, camera.h, gphoto.h   gPhoto 3.0.1, plus one new function,
                                     gphoto_camera_get_exif()
  src/viewer.c, viewer.h             gPhoto 3.0.1, unchanged
  data/stations.xml, stations.dtd    GNOME Radio 85.0.1, unchanged
  data/gazetteer.tsv                 coordinates from GNOME Radio's marker
                                     table, extended and corrected (below)

  New: gm-exif (EXIF GPS/time reader), gm-station (station list parser),
  gm-places (gazetteer and grouping), gm-player (GStreamer playbin),
  gm-window (the window), main.

Not carried over: GNOME Radio's three duplicated code generations
(gnome-radio-*, gtk-radio-*, gtk-internet-radio-locator-*), its recording
feature, goocanvas, geoclue and the deprecated gst-player API; gPhoto's
own window, command-line mode and HTML gallery.

The map uses libchamplain 0.12 and GTK 3, as both upstream programs do.
Both are in maintenance mode; moving to libshumate and GTK 4 is the
obvious next step, but gPhoto's viewer is GTK 3 and was reused as is.


Station positions
-----------------

The station list has no coordinates; GNOME Radio placed markers from a
table hard-coded in C.  gnome-media reads those 104 positions, adds 85
approximate city/regional centres for locations the table did not cover,
and corrects seven that contradicted their own labels (e.g. "Kyiv" was
placed near Dnipro, "Dubai" at Mecca, "Troms" off the Trondheim coast,
"Brooklyn" on top of the Bronx).  tools/make-gazetteer.py regenerates the
file and lists every change.  The 255 entries in the database are 250
distinct stations (five are listed once per location and are merged);
245 of those are placed.  The other five (the RFA language services
"China, Asia" and similar, and "Space") are in the list but not on the map.

Add or fix places in ~/.local/share/gnome-media/gazetteer.tsv
(latitude TAB longitude TAB name); it overrides the system file.  Extra
stations go in ~/.local/share/gnome-media/stations.xml.


Building
--------

  meson setup build --prefix=/usr
  meson compile -C build
  meson test -C build
  sudo meson install -C build

Requires: GLib 2.68, GTK+ 3.22, libchamplain 0.12 (champlain-0.12 and
champlain-gtk-0.12), clutter-gtk 1.0, GStreamer 1.14 (with the good and
base plugin sets; add -bad/-ugly for some stations), libgphoto2 2.5.

To run from the source tree:  GNOME_MEDIA_DATA_DIR=$PWD/data build/gnome-media [FOLDER]

The GLib-only core and its tests need nothing else:

  tests/run-tests.sh


Status - read this
------------------

Verified: gm-exif, gm-station and gm-places (and the data they read) have
38 unit tests, run under AddressSanitizer and UndefinedBehaviorSanitizer,
including truncation of every fixture at every length, every byte of every
fixture corrupted, and random garbage.  The EXIF fixtures are written by
both Pillow and an independent TIFF builder, in both byte orders.  The
station parser is tested against the real 255-entry database.

NOT verified: gm-window.c, gm-player.c, main.c, the camera.c addition and
meson.build were written without GTK, libchamplain, GStreamer, libgphoto2
or meson available, so they have not been compiled or run.  Expect
compile errors or API slips to fix on the first build, and treat the
marker click handling, the playbin error/buffering logic and photo
loading from a real camera as untested.  gphoto_camera_get_exif() asks
libgphoto2 for GP_FILE_TYPE_EXIF; if a driver cannot supply it the window
falls back to downloading the (JPEG/TIFF) file.


Licence
-------

GNU General Public License, version 2 or (at your option) any later
version; see COPYING.  OpenStreetMap map data (c) OpenStreetMap
contributors, shown under the map by libchamplain.
